Joey Hess: linuxgazette on Debian on the nslu2
Nice article. My favorite quote:
"If I don't install Debian on this, it will feel like a brick to me anyway!"
"If I don't install Debian on this, it will feel like a brick to me anyway!"
custom_url_rewrite function to change the
target of the URL alias depending on the value of the
$locale variable (which contains the current interface
language). Turns out that this breaks the language prefix (i18n.module
installs its own custom_url_rewrite function). Efforts to
change my function or the i18n version of that function to change in
such a way that both translations are done have failed; they seem to
confuse drupal in some way. This is possibly due to the fact that the
custom_url_rewrite function in i18n.module only performs one end of the
translation, while my needs require both ends; I don't know enough about
drupal to figure out how i18n's other side is implemented./dev/usb/hiddev0 device shows
up. This is enough to make Transcribe! happy,
and you can assign actions to the pedal devices in Transcribe! and go on using
it.
In Ubuntu Feisty /dev/usb/hiddev0 won't appear automatically. Luckily, an old
style mkdir /dev/usb; mknod /dev/usb/hiddev0 c 180 96 does the job.
What I couldn't do is make the device show up as a joystick, a keyboard or
whatever else that could generate usable events. This is strange, because
the device seem to identify properly as a HID device.
Dear Lazyweb, how can I get events out of the thing, and then map one pedal to
Alt, one to Enter and one to TAB?
Sune Vuorela started some similar things for kde a while ago, so, thinking this could be useful for a whole lot more people than KDE and Mozilla maintainers, I also started graphing the bug counts for all packages. There is not enough backlog to have more than the last week, though. I’m a bit concerned about the fact that the RRD updates take a lot of time and may induce some load on gluck… Please DSA hit me if you want it to be moved elsewhere.
Anyways, back to iceape bugs, the oldest bug I closed was #80787, which was actually fixed as soon as I first uploaded xulrunner a year ago. On the other hand, the oldest I didn’t close is #78654. There are some other winners that I’m amazed they’ve not been treated upstream in the last 6 years.
Now, while I tried to correctly and conveniently tag these oldest bugs, I didn’t take the required amount of time to track them in upstream bugzilla. So if you, dear reader, have a little bit of time, I would really appreciate if you could go through the list of bugs* that are tagged upstream, but not yet forwarded and either find them in upstream bugzilla, or file them if they don’t exist there.
* strangely enough, the raw=yes argument to the BTS doesn’t seem to work properly. You can get a raw list (with no ordering by status or severity) through the LDAP gateway with the following command line:
ldapsearch -p 10101 -h bts2ldap.debian.net -x -b dc=current,dc=bugs,dc=debian,dc=org '(&(debbugsSourcePackage=iceape) (debbugsTag=upstream) (!(debbugsState=forwarded)) (!(debbugsState=done)))'
Note the LDAP query is probably not optimal. You can add debbugsID at the end of the command line if you’re only interested in the bug numbers.
Guten Tag! Wir grüßen Sie ganz herzlich und informieren ine Erstattung zu der Betreff genannten Bestellung. Unsere Zahlungsabteilung hat Ihnen EUR 12,29 \374berwiesen.etc...
Meanwhile, Gian-marco, my future flat mate, had spent the day packing up
everything that was left in my old flat, where I had left an utter mess.
A colleague of mine was to sublet the place starting that Saturday, so there
were roughly 48 hours left to empty and clean it, and to hand it over. There
are more pleasant things in heaven and earth than to have someone else empty
your flat for you.
Morphine is a really crazy drug. Most people think of it as fuzzy and often
joke about taking it if only they could get their hands on it. Having made the
experience, I'd rather not take it again unless I have to. Watching television
turned out to be impossible, even the weather report went too fast for me.
Visitors appeared sort of blurry, I would often not follow the things they
said, and it was definitely impossible to entertain thoughts for prolonged
periods of time, or to engage in any sort of productive thinking. Organising
a cleaning lady for my old flat and giving instructions to my cousin, who
would hand over the flat took all my energy
On Friday, I was to have an important business meeting with three people, so
I organised a room in the hospital and asked the nurses to put me on optional
morphine so I could be a bit more present during the meeting. As
a consequence, I could press a button once every ten minutes for a dose of
morphine, and with this new level of control, I began to reduce the drug
amount in my blood gradually.
The meeting did not take place in the end but I came to regret my choice to
reduce the morphine at around midnight, when the pain in my knee became
unbearable. I kept pressing the button for more morphine like a madman, but
the device would only deliver a new shot every 10 minutes. The nurse was not
authorised to change that and instead gave me other pain and sleep medication,
but not even the combination of morphine, Tramal (an opiod), Novalgin,
Mefenacid, and Paracetamol could dampen the level of pain, and so I spent
almost three hours in real agony, biting the pillow with tears running down my
cheeks, until finally the medication won, I became indifferent (thanks to
Temesta) and drifted off into sleep.
After breakfast the next morning, the morphine applicator suddenly had a fit,
started beeping, and pumped more drug into my body than it should have. It
took me about 20 minutes or maybe an hour (who knows ) to put my brain
together, realise what had happened, and come up with a way to lift my finger
to the button to call the nurse. Despite the horrible night, I told them to
remove the morphine because I'd rather stand the pain than have my brain
mushed like that, plus there are always plain morphine injections delivered by
humans instead of machines.
In fact, the next night I could feel the pain approaching and since it's
easier to suppress pain than it is to remove it, I asked for a sleeping pill
and a morphine injection. The injection did three things: first, it hurt so
much that my knee immediately became pain-free while nerve central was
occupied trying to figure out what the heck had just happened in my right
thigh. Second, it did not take three minutes to kick in, and it kicked in so
strongly that I just barely realised that my head was suboptimally positioned
on the pillow and the lights still on, but failed to do anything about it.
I did not wake once until breakfast. And third, I am glad to know that
morphine does actually (still) work. Pain is complex, fascinating, useful,
sometimes even pleasurable to some, but when you know the cause and you'd
rather make it stop, it's comforting to know that there are ways the
previous night had instilled some doubt in me.
From then it was all downhill and I left the hospital after eleven days on
Thursday, got by without pain medication the same day and off the sleeping
pills the next night. Two days later I was already racing around town in my
wheel chair:
By now I can actually walk again, albeit slowly, and even though I still
cannot lift heavy stuff or get my hands wet, my hands are a lot better; on 21
May, the casts shall be removed and I'll be able to bend my knee again, but it
may take up to a year to return to sports, such as running, to which I had
just become addicted. In fact, I can comfortably claim that I had just
reached an acceptable level of fitness just before the injury. Tough luck.
My mother has come to Zurich twice already to help unpack and with her
invaluable help, as well as the help of Gian-marco and several others, we are
actually almost done moving in. Ironically, it's actually quite annoying to
sit and watch others do your work; I would have helped as well, had the roles
been inverted, and yet I am still greatly indebted. Human relations tend to be
funny like that.
Let me end with two points: first, Zurich's university hospital probably ranks among the best hospitals in the
world, and that makes Zurich even more attractive to me (even though I
certainly don't plan my next hospital stay). I felt very comfortable throughout
my stay, had the impression of being in very capable hands, and had most of my
countless questions answered. In addition, the hospital is very nicely
surrounded by a park and could not be more central, which makes it easier for
visitors.
And that brings me to my final thought: thanks to everyone who stopped by or
called in to make my stay a lot more pleasant. I spent eleven days in the
hospital and I got bored and annoyed for the first time on Wednesday, the day
before my release. Most of the credit for those ten days of lack of boredom
goes to everyone who supported me. It did help that I had Internet access via
a convenient 2 /day GPRS flatrate
(even though I could not really type), but it became crystal clear to me that
visiting someone in the hospital, whether you're close to the patient or not,
is one of the most beautiful gifts you can give. In the past I have neglected
this opportunity occasionally; now I would want to make a special effort (even
though I hope there won't be any need).
And I would not be a geek if I did not end this post with a reference to
Debian: I know of a case when one of our developers
ended up in hospital and two others (or was it more?) drove hours to visit and
check in on him/her. Now even more than before can I say that I am proud to be
a member of a project in which such things happen.
PS: this post took me about 4 hours to compose. Sucks to be typing one-handed.
#!/bin/bash
set -e
set -C
set -u
JOBNAME=“update-wiki-firewall-config”
DWPAGE=“php4 /usr/share/dokuwiki/bin/dwpage.php”
TMPBASE=“/tmp”
SSHID=“$HOME/.ssh/$USER-passphraseless-$(hostname)”
REMOTEHOST=“remote.fqdn.example”
REMOTEJOB=“pull-netfilter-init-config-tar”
SHAREDIR=“$HOME/share/$JOBNAME”
WIKINAMESPACE=“pointer:to:namespace”
start=’/*BEGIN generated firewall rules */’
end=’/*END generated firewall rules */’
insert=’/*INSERT generated firewall rules */’
umask 077
if ! TMPDIR=“$(mktemp -d $TMPBASE/fwconfig.XXXXXXXXXX)”; then
echo >&2 “ERR: cannot create temp dir in $TMPBASE”
exit 1
fi
cd $TMPDIR
mkdir remote
ssh -i $SSHID root@$REMOTEHOST $REMOTEJOB \
tar --extract --gzip --file - --directory remote
mkdir workdir
touch workdir/rulelistfile
echo “$start” >> workdir/rulelistfile
for fwfile in $(find $TMPDIR/remote/rules/up -type f sort); do
MTIME=“$(stat --format=”%y“ $fwfile)”
PROSEEXPLANATION="$( $fwfile sed -n '/^#::#/ s/^#::#[[:space:]]*//;p;q; ')"
if [ -z "$PROSEEXPLANATION" ]; then
PROSEEXPLANATION="netfilter-init internal code"
fi
rm -f workdir/newwikipage
$SHAREDIR/wikipagetemplate \
sed \
-e "s PLHfilenamePLH $(basename $fwfile) " \
-e "s PLHproseexplanationPLH $PROSEEXPLANATION " \
-e "s PLHmtimePLH $MTIME " \
-e "/PLHcontentsPLH/r$fwfile" \
-e "s/PLHcontentsPLH//" \
> workdir/newwikipage
WIKIPAGENAME=“$WIKINAMESPACE:regeln:$(basename $fwfile .rul)”
$DWPAGE checkout $WIKIPAGENAME workdir/wikipage
if ! cmp --quiet workdir/wikipage workdir/newwikipage; then
cp workdir/newwikipage workdir/wikipage
$DWPAGE -m “new contents imported from $fwfile” commit workdir/wikipage $WIKIPAGENAME
fi
echo “ * [[$WIKIPAGENAME $(basename $fwfile)]] - $PROSEEXPLANATION” >> workdir/rulelistfile
done
echo “$end” >> workdir/rulelistfile
$DWPAGE checkout $WIKINAMESPACE workdir/contentspage.txt
workdir/contentspage.txt \
sed -e "\ ^$ start//\\*/\\* \$ ,\ ^$ end//\\*/\\* \$ d; " \
sed -e "\ ^$ insert//\\*/\\* \$ rworkdir/rulelistfile" \
> workdir/newcontentspage.txt
if ! cmp --quiet workdir/contentspage.txt workdir/newcontentspage.txt; then
cp workdir/newcontentspage.txt workdir/contentspage.txt
$DWPAGE -m “new contents page” commit workdir/contentspage.txt $WIKINAMESPACE
fi
cd /
rm -rf “$TMPDIR”
Yes, this needs some more documentation and generalization. But it’s just a proof of concept that needs some
polishing before being put into real life use.
Here are the two template files for wiki page and contents page:
====== Firewallregeln PLHfilenamePLH ======
Last changed on target system: PLHmtimePLH
PLHproseexplanationPLH
<code>
PLHcontentsPLH
</code>
===== Dump of firewall rules =====
/*INSERT generated firewall rules */
/*BEGIN generated firewall rules */
/*END generated firewall rules */
The index page template relys on the HiddenComment dokuwiki plugin to be installed, or the placeholders show up in the
rendered wiki page. The code uses the first comment line marked with #::# to generate a short explanation of the file
being pulled into the wiki. dwpage.php is a fully-fledged command line interface to dokuwiki, committed new pages are
fulled versioned as if entered through the wiki web front end. This way, the documentation in the wiki is guaranteed to
be current and to fit the configuration found on the live system - it is directly pulled from the live system.
Yes, rendering of the code is currently suboptimal. Working on it.
$DISPLAY (“:0.0” and
“:0.1”) set.
This is neither a problem for FVWM nor xlock nor XScreenSaver. But it
is a problem for nearly every modern web browser available which
checks, if there’s already an instance of it running. So if you try to
start a new instance of a web browser on the other screen, most
graphical web browsers make more or less problems:
$DISPLAY completely except on the first call.-g
option for a GUI), Chimera 2, Amaya and of course Dillo. Unfortunately
I’m neither a fan of KDE nor of Konqueror and I do want a web browser
with CSS and tab support… And Amaya is, well, only a reference
implementation… (Chimera 2 from Sarge btw. segfaulted on two of the
four pages I tested it with. Seems to have problems with PNG images.)
So my current setup is to have Kazehakase as my main work web browser
(with all the local web applications I need) on the right screen while
I have Opera on the left screen for surfing, looking up documentation,
testing web pages and other things.
BTW: I don’t use Gecko based browsers for surfing on that box at the
moment, since there are some web pages (the spammer vandalised
Kazehakase wiki for example, at least a few months ago) which manage
to be rendered in such an ugly way by Gecko so that XFree86 with the
binary Nvidia (at least the last five or six versions I tried) just
crashes away — either at once or when you try to switch to a
text console by pressing e.g. Ctrl-Alt-F1 while such a
page is displayed.
I/O error, and I dropped into an
unusable remote terminal with no working commands. Fortunately, apache2 was
still up and running, and the web service has been working without
interruption since the hard drive crash, albeit with no syncs from
www-master.
Today, Sergio visited
the campus and had a look. It was a XFS crash, which got cleanly repaired
using an install CD. We have an empty partition in the box, and will probably
move the system to it temporarily, and back to the RAID, but on ext3. When
the box was back online, I just had to resume the upgrade process, make mdadm
happy and update lilo.conf before rebooting into the new
kernel.
This box uses LILO for some obscure reason I can't remember too clearly
anymore. The box has just one partition on a md array, on two SCSI disks on
a aic7xxx-based controller. Can anyone hint me why GRUB would have failed on
us back in sarge, and if any fixes in the etch version would
work any better? Using LILO here is error prone, and basically feels like a
step back. Anyway, www.es.debian.org
is now back up and running with updated content.
Sindominio.net had its bi-annual
upgrading party last monday, but unfortunately I wasn't able to help much
as when I tried to log into the server, I must have caught the system in the
middle of some key lib upgrade or something, and again I was locked in a
unusable shell which would only segfault. Given my previous experience, I
assumed that something had gone wrong and the box would need to be fixed at
the console, and after 20 minutes I gave up helping on that front. Until I
noticed, quite a long while later that I was still getting mail from the
server. I managed to log in to discover the upgrade was done, with just
a few bits remaining to be done. The major issues were encountered with our
pam and ldap setup, plus
nscd kept dying
causing quite a lot of mayhem all over the place. Great work from Seajob,
Syvic, nogates, apardo and the rest of the people who handled it! With etch,
we can finally move back to an official Debian kernel, something we've been
longing to do for a long time. The only pending upgrade issue is that we need
to move from our old jabber server to either the traditional
jabberd 1.x or
ejabberd; our
current implementation is no longer supported in Debian.
The last of the etch upgrades stories involves
Sofcatal 's servers. The box was
running on a CentOS 4.4, which was moved
away into a subdir just after booting Debian-Installer, and then lobotomised
so it would run as a Linux-VServer
under a new Debian etch install. I'll probably write more details about it
soon though, as it could be a maybe less scary alternative to Guillem's
debtakeover.
Yay for etch!
Next.