Lars wonders
about debhelper's approach of inserting script fragments into package
maintainer scripts.
It's really very interesting to survey debhelper's collection
of fragments, in its autoscripts directory. Of the 55 fragments,
the mean length is 4.5 lines, and the mode (and also shortest[1])
length is 3 lines.
The 32 scripts that are each three lines follow a very simple pattern:
if [ "$1" = something ] && exists some-script; then
some-script some-parameters
fi
It would be nice to get that down to Lar's more declarative one
line approach:
some-script some-parameters $@
In practice though, many of these scripts are not always available, and so
the postinst has to test for them before running them. And making them test
the postinst's parameters to see if they should do anything makes them less
general and less flexible (ie, not able to be run easily by a sysadmin),
and so keeping the "$1" test in the postinst is reasonable.
So, I think I've done a pretty good job at keeping debhelper script
fragments short and keeping most of the possibly buggy bits that might need
maintenace out of debhelper. The exceptions tend to be either older
scripts, from a time when I was less careful about doing do, and fragments
of code that I could not pawn off onto some other package, often because
there was no package that owned the issue. (The dh_usrlocal code
is the best example of that.)
The most promising way to improve things seems to be using dpkg triggers,
which is why I was very enthuisiastic when we finally got them, over a year
ago. Triggers let many of these hooks into maintainer scripts go away
completely. Rather than each package having to test for and call
update-menus, menu can simply trigger on the modification of any menu file.
Once menu finishes the conversion to using triggers, debhelper can drop
those fragments entirely.
Triggers seem likely to be able to eliminate well over 90% of the things
we need to put into maintainer scripts, and I hope at least half of
debhelper's script fragments can eventually go away thanks to them. The
others seem more difficult.
You probably cannot, for example, make a trigger that does something sane
when an init script is installed. Debhelper has at least three different
fragements that it can put into postinst scripts to handle init scripts,
and these only cover the most common three cases (start, don't start,
don't restart on upgrade).
Moving even these things into a declarative form has long been a dream
of mine. Maybe it could be done with a control file that specifies which
of the methods for running the package's init script to use for this
package.
But it seems we can't do away with maintainer scripts entirely, no matter
how hard we try. That's because maintainer scripts are our only way to deal
with other crippling bugs in old versions of a package, and with upgrade
issues, and with all the other myriad things that we put custom code in
them to deal with. Pity.
After a long hiatus for various reasons, I finally had the chance to try my
hand at loading a TeleMetrum
board today!
Sadly, I wasn't able to completely load any boards, because I somehow ended
up with the wrong Digi-Key part numbers for 4
capacitors, one of which is a critical value. I placed an order for the
missing parts and a few other bits we'll need eventually, hopefully they'll
be here in a couple days and I can try to load a board with all the parts.
Instead, what I did today was a a partial load of a board with the goal of
testing the various power supplies. Seemed like a good idea, since I've
had my share of odd problems with power supplies in the past. This also
gave me a chance to try out my solder paste stencil, get some experience
hand-placing the tiny 0402 passive parts, and an excuse to see if I could
hit the solder reflow temperature profile adequately with my electric
cooking skillet and IR non-contact thermometer.
The good news is that it all worked right the first time! We're successfully
charging a LiPo battery from USB power, and successfully making 3.3 volts for
the electronics from that. The resistor divider designed to allow the LiPo
battery voltage to be sampled by the CPU's analog to digital converter is
also working fine.
A few observations are in order, however.
Getting the right amount of solder paste down on the board requires some
finesse with the spreading blade and the stencil. I think the paste was a
bit heavy around the CC1111 footprint, as I ended up with some bridged
pads. Since I didn't load the actual CPU part, it could just be that not
having something real there to wick up some solder meant there was enough
to form the bridges. Don't know. The amount of solder on the ground pad
in the middle of the chip looks good, though!
The 0603 sized LED in the power supply circuit was the only part that didn't
self-align correctly. I may have had it a bit too far to one side. The pads
on the part have notches in the end, and it looks like one side of each is
more or less centered, so I think surface tension did the best it could with
what I gave it to work with. The LED soldered ok, isn't shorting to anything
else, and clearly works fine... but I'd be happier if it were aligned better.
Found and fixed a solder bridge between two pins on the surface-mount USB
connector before first application of power. Could be further data that the
paste layer was a bit too thick. On the other hand, I had to wiggle the
connector around a bit to get it aligned correctly, so I may have smudged
the paste into a bridge while doing that.
I also note that there's some visible flux left on the surface of the solder,
particularly on big paste areas like the feet of the USB connector. I
suspect this means I didn't dwell long enough at either or both of the preheat
or ultimate reflow temperatures. Since all the parts clearly soldered
adequately to function, I'm still pretty happy... but since the rockets we
fly experience violent accelerations during boost, this is something I'll
play with on future reflows.
All in all, a great way to spend an afternoon, and a big step forward for
the TeleMetrum project!

I have uploaded dosfstools version 3.0.2 that contains another few fixes. Source tarballs can be downloaded as usual from its homepage.
The aim for 3.0 was to unify all the patches out there that have been accumulated over the years. As this is mostly completed now, I will soon start doing real work which will lead to dosfstools 3.1 eventually.
I have no idea how such a great open-source game as Teeworlds has been able to exist without me hearing about it until recently.
Teeworlds is a fast-paced realtime multiplayer shooter. You control a small "Tee" which can hold various weapons (hammer, gun, shotgun, laser-rifle, rocket launcher, ninja-sword) while running and jumping around frantically on the map, trying to frag as many other Tees as you can before you're killed by some other guy. Easy, eh?
There's are many game servers to choose from, as well as various game modes (death match, team death match, capfure the flag and some unofficial "mods"). You can join servers on the Internet, or create your own server, be it a public one or a LAN server.
Installation
Usually I would suggest apt-get install teeworlds, but for now the packages in unstable are an older 0.4.x version, whereas upstream released a much-improved 0.5.1 version. I have already filed a bug and I'm optimistic there'll be a new version in unstable soon.
In the mean-time however, you can manually build the game from source via:
$ apt-get install zlib-dev libsdl1.2-dev (maybe also libgl, libglu, and python, if not already installed) $ wget 'http://teeworlds.com/trac/bam/browser/releases/bam-0.2.0.zip?format=raw' -O bam-0.2.0.zip $ wget http://teeworlds.com/files/teeworlds-0.5.1-src.zip $ unzip bam-0.2.0.zip $ unzip teeworlds-0.5.1-src.zip $ cd bam-0.2.0 $ ./make_unix.sh $ cd ../teeworlds-0.5.1-src $ ../bam-0.2.0/src/bam release
Running the game
$ ./teeworldsYou'll obviously need a working OpenGL/DRI setup (check if "glxinfo grep direct" says "Yes"), otherwise the game will be way too slow. In case you experience graphics glitches and distortions, first exit the game, then:
$ vi ~/.teeworlds/settings.cfgChange the "gfx_noclip 0" option there to "gfx_noclip 1" and restart the game.
Firewalls
If you use a local firewall as I do, you need to open at least ports 8300-8303 (UDP), even better 8300-8310 for more choice in game servers:
$ iptables -A OUTPUT -m state --state NEW -p udp --dport 8300:8310 -j ACCEPTFurther resources
natura.oskuro.net, the home server which still serves this
blog, has been suffering hardware problems for some weeks. Apparently the
hard drive is failing intermittently, so every now the kernel starts spewing
out noisy errors about its main disk dying. If I notice this quickly, it can
be rebooted and that normally fixes it for a few more days. But if I don't,
it'll end up giving nasty bus errors which will make remote
logins a challenge. Most processes still work, but the filesystem appears
to be gone. It's easy to know what's going on if you visit the blog's url
and get some 404, and in that case I can only phone my father
and tell him to press the reset button (I've tried sysrqd, but I need to
open the port in the router and haven't had chance to do that yet).
So it was time to do something about it, and the other day I installed a
dirty 40GB drive on the second IDE controller, in case I could find the time
to do somethng about it. Being with an endless pharyngitis that doesn't seem
to get cured entirely, I've had some time today to look at it. This evening,
I was about to transfer all the system to the new disk (it's half
the size as the broken one, and probably slower, but it hopefully has
no bad sectors), but I decided to upgrade the system first.
natura was first installed in late 1997 or at the beginning
of 1998, using the Debian bo install media on a Pentium 150MHz, and
has gone through seven dist-upgrades which, as far as I can remember, have
always worked out without major problems.
The upgrade to lenny hasn't been an exception. The server has
gradually lost many of the services it once hosted, so there aren't too many
services to take care of anymore. All the mail services I setup for my father
ended up being deprecated as they started to get used to Hotmail, GMail and
so on, and the frequent hardware crashes made me switch them to the Linksys
based DHCP server. In the end, the problems I saw after the upgrade were
very similar to what I faced when I
upgraded to etch:
apache2 restored the 000-default symlink in
the sites-enabled dir, which resulted in my website showing
the classic It works message for a while.coding=utf-8 line to the
beginning of my config.py to get it working.dhcp3-server apparently restored its init scripts and got
started again. This time, it got removed.apt-show-versions to find out what didn't match my
package sources. I found I had every single version of cpp, gcc and g++ from
2.95 to 4.3, and a myriad of obsolete libs. But there were also real gems:
Spaniards will remember queso because it was written by Jordi Murg and became a classic tool to find out what OS was running on a remote host. update was apparently needed to flush your filesystems prior to Linux 2.2.8, and defrag is obvious, although leaves me wondering why it was needed at the time. With the upgrade done successfully, next step is trying to get the system transfered to the spare hard drive. For this, I first partitioned it creating a primary partition using up more or less half of the available space, and setup a LVM volume, leaving some free PE's in the volume group just in case I want to do snapshots in the future, and formatted it using ext3. I then transfered the system to the new disk and now face the boot challenge. I haven't created a boot partition and that should be a double problem: the BIOS is buggy and will only boot from the first 1024 cylinders, and my root is on LVM and GRUB legacy might not like it (but I'm not sure). However, I've become a big fan of GRUB2, and know I will be able to boot no matter what my BIOS thinks of my disks and regardless the complex root partition setup I throw at it. The plan is to install GRUB onto the new drive's MBR, and set it up using thedefrag 0.73pjm1-7 installed: No available version in archive figlet 2.2.1-3 installed: No available version in archive ipmasqadm 0.4.2-2 installed: No available version in archive isapnptools 1.26-5 installed: No available version in archive ms-sys 2.1.0-1 installed: No available version in archive queso 0.980922b-3 installed: No available version in archive update 2.11-4 installed: No available version in archive
ata module, which should
allow to ignore what the BIOS says, and read beyond cylinder 1024 or even boot
from CD-ROM. However, this isn't a setup I haven't tried before, and a single
failure will result in me taking a train to fix it on-site.
So, GRUB experts out there, any suggestions? Of course, for now I guess I
can install GRUB in the current drive's MBR and make it boot the old kernel
using the new system as root, but that's dirty and would just postpone the
problem.
This is my first entry from my Acer Aspire1 since installing the latest Emdebian Grip and the 2.6.28 kernel that now provides free wireless support. A few tweaks still needed to get a few packages sorted out so I've got a Debian source on this box too. Still, with my usual packages (iceweasel, sylpheed, grisbi, geany), all my email cached data, liferea data, a few documents and a few Debian packages and I'm still at only 753Mb used.
Earlier this week, Tom Watson, Cabinet Office Parliamentary Secretary, published the Open Source, Open Standards and Re Use: Government Action Plan. It s had a pretty mixed reaction, with mild scepticism (niq s soapbox: Is gov.uk going open-source?) being the average reaction from what I ve read. I particularly liked the kind offer by Bristol Wireless to debianise Tom Watson s laptop.
I think commentators are bang-on that the procurement process needs to change and that this sounds positive. I ll love it if I m wrong, but this looks like the lip service as usual which I ve seen in the last 10 years working on FOSS in the UK. I want to see the action that comes from this plan! When government actually starts buying FOSS from typical FOSS service providers and not just the IBMs of this world, then I ll believe it.
My suspicion is re-ignited by some of the activites around this action plan. For example, does anyone know why the Cabinet Office didn t select FOSS to run their special public FOSS Aggregation page? (Actually, what s the best FOSS tag aggregator web service out there? I know we can set them up in Wordpress widgets, but what hosted services are there?)
I m also a bit bemused that their page requires users to accept cookies until they expire, yet its privacy policy explicitly says You may suppress cookies after your visit or configure your Internet browser to prevent them. Yes, I can prevent them, but then it does nothing useful!
(Based on a comment I made at the OSS Watch team blog and discussions with a few user groups.)
Dear Lazyweb
I m looking to retire my basement server. It is a athlon 700MHz processor with 384mb ram and 200G harddrive (of which 40 or so is used)
I don t currently need a more beefy machine for this, so I kind of thought of just going for a small virtual private server.| Pass | ext4 old allocator | ext4 new allocator | |||||||||
| time (s) | I/O | time (s) | I/O | ||||||||
| real | user | system | MB read | MB/s | real | user | system | MB read | MB/s | ||
| 1 | 6.69 | 4.06 | 0.90 | 82 | 12.25 | 6.70 | 3.63 | 1.58 | 82 | 12.23 | |
| 2 | 13.34 | 2.30 | 3.78 | 133 | 9.97 | 4.24 | 1.27 | 2.46 | 133 | 31.36 | |
| 3 | 0.02 | 0.01 | 0 | 1 | 63.85 | 0.01 | 0.01 | 0.01 | 1 | 82.69 | |
| 4 | 0.28 | 0.27 | 0 | 0 | 0 | 0.23 | 0.22 | 0 | 0 | 0 | |
| 5 | 2.60 | 2.31 | 0.03 | 1 | 0.38 | 2.42 | 2.15 | 0.07 | 1 | 0.41 | |
| Total | 23.06 | 9.03 | 4.74 | 216 | 9.37 | 13.78 | 7.33 | 4.19 | 216 | 15.68 | |
For comparison s sake, here is a comparison of the fsck time of the same collection of files and directories, comparing ext3 and the original ext4 block and inode allocator. The file system in question is a 32GB install of Ubuntu Jaunty, with a personal home directory, a rather large Maildir directory, some linux kernel trees, and an e2fsprogs tree. It s basically the emergency environment I set up on my Netbook at FOSDEM.
In all cases the file systems were freshly copied from the original root directory using the command rsync -axH / /mnt. It s actually a bit surprising to me that ext3 s pass 2 e2fsck times was that much better than e2fsck time under the old ext4 allocator. My previous experience has shown that the two are normally about the same, with a write throughput of around 9-10 MB/s on for e2fsck s pass 2 for both ext3 file systems and ext4 file systems with the original inode/block allocators. Hence, I would have expected ext3 s pass2 time to have been 12-13 seconds, and not 6. I m not sure how that happened, unless it was the luck of draw in terms of how things ended up getting allocated on disk. So I m not too sure what happened there, but overall things look quite good for ext4 and fsck times!
| Pass | ext3 | ext4 old allocator | |||||||||
| time (s) | I/O | time (s) | I/O | ||||||||
| real | user | system | MB read | MB/s | real | user | system | MB read | MB/s | ||
| 1 | 108.40 | 13.74 | 11.53 | 583 | 5.38 | 6.69 | 4.06 | 0.90 | 82 | 12.25 | |
| 2 | 5.91 | 1.74 | 2.56 | 133 | 22.51 | 13.34 | 2.30 | 3.78 | 133 | 9.97 | |
| 3 | 0.03 | 0.01 | 0 | 1 | 31.21 | 0.02 | 0.01 | 0 | 1 | 63.85 | |
| 4 | 0.28 | 0.27 | 0 | 0 | 0 | 0.28 | 0.27 | 0 | 0 | 0 | |
| 5 | 3.17 | 0.92 | 0.13 | 2 | 0.63 | 2.60 | 2.31 | 0.03 | 1 | 0.38 | |
| Total | 118.15 | 16.75 | 14.25 | 718 | 6.08 | 23.06 | 9.03 | 4.74 | 216 | 9.37 | |
| 312214 | inodes used (14.89%) |
| 263 | non-contiguous files (0.1%) |
| 198 | non-contiguous directories (0.1%) |
| # of inodes with ind/dind/tind blocks: 0/0/0 | |
| Extent depth histogram: 292698/40 | |
| 4388697 | blocks used (52.32%) |
| 0 | bad blocks |
| 1 | large file |
| 263549 | regular files |
| 28022 | directories |
| 5 | character device files |
| 1 | block device file |
| 5 | fifos |
| 615 | links |
| 20618 | symbolic links (19450 fast symbolic links) |
| 5 | sockets |
| 312820 | files |
| Pass | ext4 old allocator | ext4 new allocator | |||||||||
| time (s) | I/O | time (s) | I/O | ||||||||
| real | user | system | MB read | MB/s | real | user | system | MB read | MB/s | ||
| 1 | 6.69 | 4.06 | 0.90 | 82 | 12.25 | 6.70 | 3.63 | 1.58 | 82 | 12.23 | |
| 2 | 13.34 | 2.30 | 3.78 | 133 | 9.97 | 4.24 | 1.27 | 2.46 | 133 | 31.36 | |
| 3 | 0.02 | 0.01 | 0 | 1 | 63.85 | 0.01 | 0.01 | 0.01 | 1 | 82.69 | |
| 4 | 0.28 | 0.27 | 0 | 0 | 0 | 0.23 | 0.22 | 0 | 0 | 0 | |
| 5 | 2.60 | 2.31 | 0.03 | 1 | 0.38 | 2.42 | 2.15 | 0.07 | 1 | 0.41 | |
| Total | 23.06 | 9.03 | 4.74 | 216 | 9.37 | 13.78 | 7.33 | 4.19 | 216 | 15.68 | |
For comparison s sake, here is a comparison of the fsck time of the same collection of files and directories, comparing ext3 and the original ext4 block and inode allocator. The file system in question is a 32GB install of Ubuntu Jaunty, with a personal home directory, a rather large Maildir directory, some linux kernel trees, and an e2fsprogs tree. It s basically the emergency environment I set up on my Netbook at FOSDEM.
In all cases the file systems were freshly copied from the original root directory using the command rsync -axH / /mnt. It s actually a bit surprising to me that ext3 s pass 2 e2fsck times was that much better than e2fsck time under the old ext4 allocator. My previous experience has shown that the two are normally about the same, with a write throughput of around 9-10 MB/s on for e2fsck s pass 2 for both ext3 file systems and ext4 file systems with the original inode/block allocators. Hence, I would have expected ext3 s pass2 time to have been 12-13 seconds, and not 6. I m not sure how that happened, unless it was the luck of draw in terms of how things ended up getting allocated on disk. So I m not too sure what happened there, but overall things look quite good for ext4 and fsck times!
| Pass | ext3 | ext4 old allocator | |||||||||
| time (s) | I/O | time (s) | I/O | ||||||||
| real | user | system | MB read | MB/s | real | user | system | MB read | MB/s | ||
| 1 | 108.40 | 13.74 | 11.53 | 583 | 5.38 | 6.69 | 4.06 | 0.90 | 82 | 12.25 | |
| 2 | 5.91 | 1.74 | 2.56 | 133 | 22.51 | 13.34 | 2.30 | 3.78 | 133 | 9.97 | |
| 3 | 0.03 | 0.01 | 0 | 1 | 31.21 | 0.02 | 0.01 | 0 | 1 | 63.85 | |
| 4 | 0.28 | 0.27 | 0 | 0 | 0 | 0.28 | 0.27 | 0 | 0 | 0 | |
| 5 | 3.17 | 0.92 | 0.13 | 2 | 0.63 | 2.60 | 2.31 | 0.03 | 1 | 0.38 | |
| Total | 118.15 | 16.75 | 14.25 | 718 | 6.08 | 23.06 | 9.03 | 4.74 | 216 | 9.37 | |
| 312214 | inodes used (14.89%) |
| 263 | non-contiguous files (0.1%) |
| 198 | non-contiguous directories (0.1%) |
| # of inodes with ind/dind/tind blocks: 0/0/0 | |
| Extent depth histogram: 292698/40 | |
| 4388697 | blocks used (52.32%) |
| 0 | bad blocks |
| 1 | large file |
| 263549 | regular files |
| 28022 | directories |
| 5 | character device files |
| 1 | block device file |
| 5 | fifos |
| 615 | links |
| 20618 | symbolic links (19450 fast symbolic links) |
| 5 | sockets |
| 312820 | files |
Two small tricks that I feel should be circulated more widely, because Google only disclosed them to me after a few false starts:
To figure out which processes are writing to the disk, I eventually found /proc/sys/vm/block_dump (see also chapter 5 of the Laptop Mode FAQ) which does exactly what I was hoping to find: it shows down to the level of process and file where disk writes are coming from. (Turns out, that kded and PowerDevil are currently appending to the .xsession-errors file regularly, keeping the disk busy on my new toy. Unlimited scrollback in konsole was the other culprit, but that one is switched off easily.)
Since I want to start backup on my netbook when it comes online at home, I figured the DHCP server was the likely place to trigger this. But the execute feature to start hook scripts on the DHCP server (see the dhcp-eval man page) was only added quite recently, so google first showed me a huge load of discussions involving tail on syslog and parsing its output. (I also found the simple event correlator which might be useful where run command features are not available.)
I didn't want to miss the opportunity to share this discovery, maybe the
feminists or the sci-fans out there already know her well, but to me it's a
completely new name. By this post I came to know Joanna Russ, a visionary intellectual, an incredible writer a, legendarily fiery critic [...], an unrepentant sci-fi fan [...], feminist crusader and one of the first major female and openly lesbian sci-fi scribe to hit major success.I was instantly hooked by her short story named When it changed (full text there). I cannot add more to what's said there, take a look. PS: Thanks, Coilhouse, one more book to already big list of wishlists... Tags: Planet Debian
I had an existential experience in my local drug store last night while
pondering this sign.
I m caught between a rock and a hard place due to the EMC PowerPath binary only kernel crack. Which makes it painful to both me and my customers to regularly upgrade the kernel. Not to mention the EMC supportability matrix of doom.That pretty much sums it all up right there. The good news is that I ve been told that dm-multipath is almost at the point where it has enough functionality to replace PowerPath. Of course, that version isn t yet shipping in distributions, and I m sure it needs more testing, but it ll be good when enterprise users who need this functionality can move to a 100% fully open source storage stack. About the only thing left to do is to work in a mention of the Frying Pan of Doom
I m caught between a rock and a hard place due to the EMC PowerPath binary only kernel crack. Which makes it painful to both me and my customers to regularly upgrade the kernel. Not to mention the EMC supportability matrix of doom.That pretty much sums it all up right there. The good news is that I ve been told that dm-multipath is almost at the point where it has enough functionality to replace PowerPath. Of course, that version isn t yet shipping in distributions, and I m sure it needs more testing, but it ll be good when enterprise users who need this functionality can move to a 100% fully open source storage stack. About the only thing left to do is to work in a mention of the Frying Pan of Doom
Client revenue declined 8% as a result of PC market weakness and a continued shift to lower priced netbooks.Sounds like Microsoft unwillingness to sell XP instead of Vista has a very big effect on it. The adaptaion to the new situation might come after the release on Windows 7. Let s just wait and see Also read Ballmer: Linux Bigger Competitor than Apple, and the follow ups made about the slide presented there. Posted in Proprietary software

Next.