<?xml version="1.0" encoding="iso-8859-1"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<?xml-stylesheet type="text/css" href="http://www.tonkersten.com/"?>


<title type="html">Ton Kersten</title>
<subtitle type="html">Thoughts of a geek</subtitle>
<link rel="alternate" type="text/html" href="http://www.tonkersten.com"/>
<link rel="self" type="application/atom+xml" href="http://www.tonkersten.com/atom.xml"/>
<updated>2010-03-05T12:34:35+01:00</updated>
<author>
<name>Ton Kersten</name>
<uri>http://www.tonkersten.com</uri>
</author>
<id>http://www.tonkersten.com/</id>
<generator uri="http://nanoblogger.sourceforge.net" version="3.4.2">
NanoBlogger
</generator>

<entry>
<title type="html">Got asciidoc working again</title>
<author>
<name>Ton Kersten</name>
</author>
<link rel="alternate" type="text/html" href="http://www.tonkersten.com/archives/2010/03/05/got_asciidoc_working_again/index.html"/>

<id>http://www.tonkersten.com/archives/2010/03/05/got_asciidoc_working_again/index.html</id>
<published>2010-03-05T12:34:22+01:00</published>
<updated>2010-03-05T12:34:22+01:00</updated>
<category term="news" />
<category term="Linux" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>On my own server I tried to build the Git RPM's and that worked,
but on the server at work it borked on building the documentation.</p>

<p>The message I got was</p>

<pre><code>asciidoc: FAILED: [tabledef-default] missing section: [tabletags-header]
</code></pre>

<p>and Google has never heard of it.</p>

<p>Both servers are running CentOS 5.4 i386, so no differences
there. I started looking for the responsible program and I found
out that at home I have <code>asciidoc version 8.5.1</code> and at work I have
<code>asciidoc version 8.5.3</code>.</p>

<p>So, at home I saved the current <code>/etc/asciidoc/asciidoc.conf</code> and upgraded
the package. What a surprise, the docs did not build anymore. So I found the
program that messes up things. But why?</p>

<p>Diffing the new config file with the old one I found two lines with the text</p>

<pre><code>header-style=tags="header"
</code></pre>

<p>Knowing almost nothing about <code>asciidoc</code> I am not hindered with knowledge,
so I commented out these lines. I do not have any idea if I break other
things, but now my Git RPM's build correctly and the documentation
looks good.</p>

<p>As far as I'm concerned: Problem Solved.</p>
</div>
</content>

</entry>
<entry>
<title type="html">New MySQLBackup</title>
<author>
<name>Ton Kersten</name>
</author>
<link rel="alternate" type="text/html" href="http://www.tonkersten.com/archives/2010/03/03/new_mysqlbackup/index.html"/>

<id>http://www.tonkersten.com/archives/2010/03/03/new_mysqlbackup/index.html</id>
<published>2010-03-03T07:25:10+01:00</published>
<updated>2010-03-03T07:25:10+01:00</updated>
<category term="news" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>It's been a while, but now there is a new version of the
MySQLBackup script.</p>

<p>This version has a few enhancements and some configuration
options were added.</p>

<p>The main new feature is that it now supports multiple dumps
per day. The old backups will be removed, of course, but only
when they are over a day old.</p>

<p>An added configuration option is that it's no possible to
choose whether you want the databases locked during the backup.</p>

<p>I will try to see if it's possible to create an option to
specify if you this for every backup or not.</p>

<p>Have fun with it. It's in the files section.</p>
</div>
</content>

</entry>
<entry>
<title type="html">(Not) building git RPM's</title>
<author>
<name>Ton Kersten</name>
</author>
<link rel="alternate" type="text/html" href="http://www.tonkersten.com/archives/2010/03/02/not_building_git_rpms/index.html"/>

<id>http://www.tonkersten.com/archives/2010/03/02/not_building_git_rpms/index.html</id>
<published>2010-03-02T20:33:22+01:00</published>
<updated>2010-03-02T20:33:22+01:00</updated>
<category term="news" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Today I saw that git version 1.7.0.1 was out and while I missed out
on 1.7.0 I decided it was time for some RPM's again.</p>

<p>Well, NOT. The sources built like a charm and I'm using 1.7.0.1
now for the daily work.</p>

<p>The big problem is the documentation, as always. When I want to build
the docs, the build proces fails with some strange <code>table-header</code> and
<code>table-definition</code> error, that even Google has never heard off.</p>

<p>All I know now that it has something to do with <code>asciidoc</code> being the
wrong version. It does build on Debian Lenny and Ubuntu 9.10 though.</p>

<p>Update:</p>

<p>It took some time, but I did get it working. For some way or another
after a <code>make clean</code> it all worked. So I repacked the sources and
built the RPM.</p>

<p>You will know. It's in the files section.</p>
</div>
</content>

</entry>
<entry>
<title type="html">Nanoblogger update</title>
<author>
<name>Ton Kersten</name>
</author>
<link rel="alternate" type="text/html" href="http://www.tonkersten.com/archives/2010/02/16/nanoblogger_update/index.html"/>

<id>http://www.tonkersten.com/archives/2010/02/16/nanoblogger_update/index.html</id>
<published>2010-02-16T14:22:04+01:00</published>
<updated>2010-02-16T14:22:04+01:00</updated>

<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Today I saw that a new version of <a href="http://nanoblogger.sourceforge.net" target="_blank">Nanoblogger</a>
was released, so I decided to update.</p>

<p>I thought this would be a breeze, but it turned out that Kevin (the
maintainer of Nanoblogger) changed a lot between the last two versions.
Nanoblogger calls (in my setup) Markdown to format the webpages and
that's where it stopped. A little debugging got things going again and I mailed
Kevin the patch. </p>

<p>I guess it will be resolved in the next release.</p>

<p>But I am running version 3.4.2 now.</p>
</div>
</content>

</entry>
<entry>
<title type="html">Git version 1.6.6.1</title>
<author>
<name>Ton Kersten</name>
</author>
<link rel="alternate" type="text/html" href="http://www.tonkersten.com/archives/2010/01/22/git_version_1_6_6_1/index.html"/>

<id>http://www.tonkersten.com/archives/2010/01/22/git_version_1_6_6_1/index.html</id>
<published>2010-01-22T11:23:24+01:00</published>
<updated>2010-01-22T11:23:24+01:00</updated>

<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>This morning a <code>git</code> (1.6.6.1) arrived with a copule of nice
bug fixes.
I created complete CentOS5 RPM's for this again.</p>

<p>These new RPM's can be found in the files section.</p>
</div>
</content>

</entry>
<entry>
<title type="html">Software patents</title>
<author>
<name>Ton Kersten</name>
</author>
<link rel="alternate" type="text/html" href="http://www.tonkersten.com/archives/2010/01/19/software_patents/index.html"/>

<id>http://www.tonkersten.com/archives/2010/01/19/software_patents/index.html</id>
<published>2010-01-19T09:06:16+01:00</published>
<updated>2010-01-19T09:06:16+01:00</updated>

<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>They have started again, those EU nitwits. When does the EU just stop with
this madness?</p>

<p><a href="http://petition.stopsoftwarepatents.eu/441004184101/"><img
src="http://petition.stopsoftwarepatents.eu/banner/441004184101/ssp-468-96.gif"
alt="stopsoftwarepatents.eu petition banner"
width="468" height="96" /></a> </p>

<p>Stop them now and (re)sign the petition against software patents.</p>
</div>
</content>

</entry>
<entry>
<title type="html">Nanoblogger upgrade</title>
<author>
<name>Ton Kersten</name>
</author>
<link rel="alternate" type="text/html" href="http://www.tonkersten.com/archives/2010/01/14/nanoblogger_upgrade/index.html"/>

<id>http://www.tonkersten.com/archives/2010/01/14/nanoblogger_upgrade/index.html</id>
<published>2010-01-14T08:47:09+01:00</published>
<updated>2010-01-14T08:47:09+01:00</updated>
<category term="news" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Today I upgraded my NanoBlogger software from version 3.3 to version
3.4.1.</p>

<p>This whole process was completely painless. Just installed Nanoblogger
3.4.1 and regenerated everything and that was it.</p>

<p>A quick 'side by side' compare of the old and the new one revealed nothing
special.</p>

<p>If you see any errors, please let me know.</p>
</div>
</content>

</entry>
<entry>
<title type="html">SSH troubles resolved</title>
<author>
<name>Ton Kersten</name>
</author>
<link rel="alternate" type="text/html" href="http://www.tonkersten.com/archives/2010/01/05/ssh_troubles_resolved/index.html"/>

<id>http://www.tonkersten.com/archives/2010/01/05/ssh_troubles_resolved/index.html</id>
<published>2010-01-05T09:32:11+01:00</published>
<updated>2010-01-05T09:32:11+01:00</updated>

<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>When I was installing a new server I thought that it would be nice
to have the server display a nice banner when I contact it.
With OpenSSH this is rather easy to achieve. Just setting the
<code>Banner</code> option in <code>/etc/ssh/sshd_config</code> should do the trick.
I also thought it would be nice to have the servername displayed,
created with <a href="http://www.figlet.org/" target="_blank">Figlet</a>. So when I login
the screen should look something like this:</p>

<pre><code> _ __ ___  _   _ ___  ___ _ ____   _____ _ __ 
| '_ ` _ \| | | / __|/ _ \ '__\ \ / / _ \ '__|
| | | | | | |_| \__ \  __/ |   \ V /  __/ |   
|_| |_| |_|\__, |___/\___|_|    \_/ \___|_|   
           |___/
</code></pre>

<p>I set this all up and when I logged in the screen looked like:</p>

<pre><code> _ __ ___  _   _ ___  ___ _ ____   _____ _ __ 
| '_ ` _ \\| | | / __|/ _ \\ '__\\ \\ / / _ \\ '__|
| | | | | | |_| \\__ \\  __/ |   \\ V /  __/ |   
|_| |_| |_|\\__, |___/\\___|_|    \\_/ \\___|_|   
           |___/
</code></pre>

<p>I guess you can understand it's not what I wanted.
All backslashes are doubled, hmmm weird.</p>

<p>Poking around in the system (CentOS 5.4) seemed to lead me to 
the <code>mingetty</code> command, because that's what's used to login.</p>

<p>In the source code of <code>mingetty</code> I found:</p>

<pre><code>if ((fd = fopen (ISSUE, "r"))) {
    while ((c = getc (fd)) != EOF) {
        if (c == '\\')
            output_special_char (getc(fd));
        else
            putchar (c);
    }
    fflush (stdout);
    fclose (fd);
}
</code></pre>

<p>so that could be it.</p>

<p>As a test I put a <code>mingetty</code> escape sequence in the <code>/etc/issue</code> file,
but that showed up completely the same, no <code>mingetty</code> translation.
So that's not it. Not that many options left. Maybe the OpenSSH server
displaying the backslashes the wrong way.</p>

<p>Tracing the OpenSSH server source code showed that it couldn't be that
one, because the <code>Banner</code> file is just sent by an atomic write.</p>

<p>But, if it's not the server, maybe it's the client. Another source code scan
of the OpenSSH stuff revealed the culprit. In the file <code>sshconnect2.c</code> the
function <code>input_userauth_banner</code> displays the banner, sent from the server.
On line 417 (in my source tree, OpenSSH version 5.3p1) it says</p>

<pre><code>strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL);
</code></pre>

<p>So "unsafe" characters and "octal" characters are encoded. The man page of
<code>strnvis</code> states: </p>

<pre><code>There is one additional flag, VIS_NOSLASH, which inhibits
the doubling of backslashes and the backslash before the
default format
</code></pre>

<p>So I changed the line to </p>

<pre><code>strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL|VIS_NOSLASH);
</code></pre>

<p>recompiled SSH and reconnected to my new, shiny server.</p>

<p>Hurray, problem solved.</p>

<p>Checking the Internet I found out that someone already found this bug and
checked it in with the OpenSSH developers (about an hour before I tried to
check it in). It will be resolved in version 5.4, but it can still take some
time to find it's way into all distributions.</p>
</div>
</content>

</entry>
<entry>
<title type="html">Git version 1.6.6</title>
<author>
<name>Ton Kersten</name>
</author>
<link rel="alternate" type="text/html" href="http://www.tonkersten.com/archives/2010/01/04/git_version_1_6_6/index.html"/>

<id>http://www.tonkersten.com/archives/2010/01/04/git_version_1_6_6/index.html</id>
<published>2010-01-04T12:33:45+01:00</published>
<updated>2010-01-04T12:33:45+01:00</updated>

<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>A new <code>git</code> (1.6.6) arrived and I thought I should create RPM's for this again.</p>

<p>These new RPM's can be found in the files section.</p>
</div>
</content>

</entry>
<entry>
<title type="html">It's broken again</title>
<author>
<name>Ton Kersten</name>
</author>
<link rel="alternate" type="text/html" href="http://www.tonkersten.com/archives/2009/11/20/its_broken_again/index.html"/>

<id>http://www.tonkersten.com/archives/2009/11/20/its_broken_again/index.html</id>
<published>2009-11-20T15:34:15+01:00</published>
<updated>2009-11-20T15:34:15+01:00</updated>

<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>A new <code>git</code> (1.6.5.3) arrived and I thought I should create RPM's for this again.</p>

<p>This turned out to be rather tedious and frustrating.</p>

<p>Running</p>

<pre><code>rpmbuild -ba git.spec
</code></pre>

<p>as usual gave me this error</p>

<pre><code>I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
/home/tonk/rpmbuild/BUILD/git-1.6.5.2/Documentation/git-add.xml:2: warning: \
failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
</code></pre>

<p>Hmm, never seen that one before. Digging around in the <code>Makefile</code> and adding a lot of <code>echo</code>s to
display some debugging info, I found it.</p>

<p>I recently upgraded to CentOS 5.4 and now it turns out that CentOS breaks things.
In the file <code>/etc/asciidoc/docbook.conf</code> it says:</p>

<pre><code>&lt;!DOCTYPE {doctype-article?article}{doctype-book?book}{doctype-manpage?refentry} PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"&gt;
</code></pre>

<p>... and that's wrong. There is no file for version 4.5. I didn't feel like finding out
how to repair all these packages and the "dependency hell" involved. I just didn't have
the stomach for it, right now (not at 01:30 AM).</p>

<p>So, no nice repairs, but I just changed the above line to:</p>

<pre><code>&lt;!DOCTYPE {doctype-article?article}{doctype-book?book}{doctype-manpage?refentry} PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"&gt;
</code></pre>

<p>(See the subtle difference between the two, 4.5 versus 4.2)</p>

<p>Now it all works, although I still do not know which package really breaks things.</p>

<p>If I ever find out I will let you know.</p>
</div>
</content>

</entry>

</feed>
