Sat Jan 24 13:18:26 CET 2009

Why I block ads

Cleanse Your Body
Colon cleansing kit. Gently removes toxins in your body. View photos.
That's what Google ads threw at me while on a social networking site. You know ... seeing that kind of ads on a machine where I hadn't installed the full filterset reminds me very strongly why blocking ads is not only ethical and economical, it's also good for your mental health. I do not want to see photos of a colon cleansing kit in action! Strong flashbacks to a certain image containing a bath tub and some other things make me want to stab whoever placed this ad.
Increase your sanity! Block all ads!

Posted by Patrick | Permalink

Sat Jan 24 13:14:58 CET 2009

A look at Debian, part two

Package Management

Now this is one aspect where Gentoo is just convenient. Y'all know what I mean. Now apt ... apt is special.
The "let's show you 1000 results" package search is something you can get used to. (I already blogged about that :) ). The memory limit apt hits regularly can be configured away. (Sidenote: Never seen portage hit a limit. Why add one?).

# apt-get install php5 --dry-run
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  apache2-mpm-prefork libapache2-mod-php5 php5-common
Suggested packages:
  php-pear
The following packages will be REMOVED:
  apache2-mpm-worker
The following NEW packages will be installed:
  apache2-mpm-prefork libapache2-mod-php5 php5 php5-common
0 upgraded, 4 newly installed, 1 to remove and 0 not upgraded.
Remv apache2-mpm-worker [2.2.3-4+etch6] [apache2 ]
Right, so installing php forces the removal of the mpm-worker and adss the prefork mpm. Why not.
dpkg: apache2-mpm-worker: dependency problems, but removing anyway as you request:
 apache2 depends on apache2-mpm-worker (>= 2.2.3-4+etch6) | apache2-mpm-prefork (>= 2.2.3-4+etch6) | apache2-mpm-event (>= 
2.2.3-4+etch6); however:
  Package apache2-mpm-worker is to be removed.
  Package apache2-mpm-prefork is not installed.
  Package apache2-mpm-event is not installed.
(Reading database ... 19366 files and directories currently installed.)
Uhm what. I did not request that. I was not given an option!
This warning is quite misleading and wrong, but what can you do but ignore it. Which is another kind of braindamage, but let's not question that ;)
Unpacking php5 (from .../php5_5.2.0-8+etch13_all.deb) ...
Setting up apache2-mpm-prefork (2.2.3-4+etch6) ...
grep: /etc/apache2/mods-enabled/*.load: No such file or directory
It looks like you've deleted /etc/apache2/mods-available/cgi.load, so cgi can not be enabled.  To fix this, please purge and 
reinstall
apache2.2-common.
Starting web server (apache2)...apache2: Could not open configuration file /etc/apache2/apache2.conf: No such file or directory
 failed!
invoke-rc.d: initscript apache2, action "start" failed.
Now this is farqing retarded! The management scripts are not properly escaped, so errors leak through without showing an obvious way to fix or at least supress them. And why does installing php start apache? I did stop it on purpose. But no, installing means running. Open all ports, talk to anyone.
Which brings me to my next point of AAARGH: package names.
What is the php package called again? Well, there's ... uhm ...
apt-cache search php | wc -l shows 406 results ... let's see ... uhm ...
After some guessing and cheating by looking at what was installed on other machines I realized that I wanted "libapache2-mod-php5". Obviously.
And here's a nice warning from the rest of the install:
Preparing to replace cpp 4:4.1.1-15 (using .../cpp_4%3a4.3.2-2_amd64.deb) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
So ... just a random idea (yeah, I know ...)
Maybe set that locale at the beginning of the script if you can't handle other locales anyway.
Anyway, now we have php installed, we need to tell apache that we want to use it. Here's how:
# a2enmod
Which module would you like to enable?
Your choices are: php5
Module name?
So I have to explicitly type the name of the module. That's so much fun! Usability here we come.
Oh, another great thing I noticed:
dpkg -l | grep apache
ii  apache2                 2.2.3-4+etch6                            Next generation, scalable, extendable web se
So why the fringlepleep does dpkg cut off the output at 80 chars when you pipe it anywhere? Makes scripting complicated, makes output unreadable, and it's a pain in the rectum!

Setting up libapache2-svn (1.5.1dfsg1-2) ...
Enabling dav as a dependency
This module does not exist!
dpkg: error processing libapache2-svn (--configure):
 subprocess post-installation script returned error exit status 1

Error: an error occured in the error handler ... or what? I have no idea how to debug this, there's no info how to debug this, and there's no idea what went wrong. So I just, like, reinstall the machine or what?
So much for ease of use. Portage is quite different, but it looks to me as if portage is focussed on getting the job done. And if you look at those random failures it becomes extremely tempting to just say "Screw this" and install packages from source. Then at least you know what happens and how to handle it. In which case ... why aren't you using a from-source distro anyway?

Posted by Patrick | Permalink

Sat Jan 24 12:55:36 CET 2009

A look at other distros: Debian

When you're using Gentoo all day you get used to many things. You start accepting that certain things work that way, you're used to the fact that some things just work and you never have to worry about them.
Due to various reasons I've spent quite a lot of time with debian and Ubuntu in the last weeks and have noticed some ... ahem ... interesting things. Let's have a look:

Using multiple repositories randomly breaks apt

Hit http://ftp.de.debian.org etch/main Sources
Fetched 5490kB in 1s (3089kB/s)
Reading package lists... Error!
E: Dynamic MMap ran out of room
E: Error occurred while processing tntnet (NewVersion1)
E: Problem with MergeList /var/lib/apt/lists/ftp.de.debian.org_debian_dists_testing_main_binary-amd64_Packages
E: The package lists or status file could not be parsed or opened.
What happens here is that there are so many packages around that apt hits an internal memory limit. It happens to everyone adding the unstable sources or not using the en-us locale. Total n00b-killer and really really annoying. Best of all I've hit it on every machine with apt whenever I wanted to actually use apt to install packages ...

Stupid Init-Scripts

On Gentoo you have OpenRC and the old baselayout doing things quite nicely. So when you start things they actually start, and when you stop them they get stopped. Watch this:
 # /etc/init.d/puppetmaster restart
Restarting puppet configuration management tool master serverCould not start WEBrick: Address already in use - bind(2)

# /etc/init.d/puppetmaster stop
Stopping puppet configuration management tool master server failed!
# ps aux | grep puppet
root     19615  0.0  0.3 106036 36056 ?        Ssl  15:50   0:00 ruby /usr/sbin/puppetd -w 5
puppet   19708  0.0  0.4 113180 40672 ?        Ssl  15:52   0:00 ruby /usr/sbin/puppetmasterd --masterport=8140
root     20826  0.0  0.0   3868   612 pts/0    S+   16:38   0:00 grep puppet
So why does it fail? It took me quite some time to realize what happens ... but ...
When you upgrade a package it cycles the daemon (reasonable, although it can be really annoying). It does that without changing the .pid file the init-script uses. So the init script notices that no process is running and thus no need to stop ...
For added bonus the init-scripts have no state handling, so you can start, start,start without problems. In the case of nagios you get three instances fighting for resources then ... oh so very funny. And randomly restart forgets to stop the old service, so suddenly you have two instances running.
So what every sane debianista does is to never use restart, always explicitly stop, then start (why is restart there anyway?) and usually a "ps aux | grep servicename" after the stop to make sure it is stopped. I think I haven't seen that in Gentoo since ... ever. And people wonder why I slap them when they suggest debian!

Posted by Patrick | Permalink

Sat Jan 24 12:20:37 CET 2009

Nice way to put it ...

C'est on faisant n'importe quoi
qu'on devient n'importe quoi

Posted by Patrick | Permalink

Mon Jan 19 10:51:31 CET 2009

How bad tools can make easy things very hard

Through some funny limitations I'm using debian and Ubuntu in a few places. And it is an interesting lesson in "how not to do things". Compare:

Searching...
[ Results for search key : openoffice ]
[ Applications found : 2 ]

*  app-office/openoffice
      Latest version available: 3.0.0
      Latest version installed: [ Not Installed ]
      Size of files: 363,509 kB
      Homepage:      http://go-oo.org
      Description:   OpenOffice.org, a full office productivity suite.
      License:       LGPL-2

*  app-office/openoffice-bin
      Latest version available: 3.0.0
      Latest version installed: [ Not Installed ]
      Size of files: 2,990,063 kB
      Homepage:      http://www.openoffice.org/
      Description:   OpenOffice productivity suite
      License:       LGPL-2
That's pretty much what I asked for. Now ...
apt-cache search openoffice
It spews out 936 results. That's about 934 more than I expected. And there's some gems included ...

language-support-xh - metapackage for Xhosa language support
libhyphen-dev - ALTLinux hyphenation library - development files
bkchem - Python based chemical structures editor 
gkrellm-hdplop - A hard drive activity monitor GKrellM plugin
lsr - The Linux Screen Reader for GNOME
recoll - Personal full text search package with a QT GUI                                                        
strigi-utils - command-line tools for Strigi Desktop Search
xjed - editor for programmers (x11 version)
language-pack-gnome-oc-base - GNOME translations for language Occitan (post 1500); Provençal (post 1500)
language-pack-kde-fur-base - KDE translations for language Friulian
ttf-opensymbol - The OpenSymbol TrueType font
Uhm, what ?!?!?!
and here's some of the relevant results:
openoffice.org - OpenOffice.org Office suite                                                                            
openoffice.org-base - OpenOffice.org office suite - database                                                            
openoffice.org-base-core - OpenOffice.org office suite -- libdba                                                        
openoffice.org-calc - OpenOffice.org office suite - spreadsheet                                                         
openoffice.org-common - OpenOffice.org office suite architecture independent files
openoffice.org-core - OpenOffice.org office suite architecture dependent files
Uhm. Wow. base, core and base-core. It's really frustrating ... how do I know what to use? And where is the package that gives me import capability for PNGs? I still don't know. Screw this. Clockwise.

Posted by Patrick | Permalink

Thu Jan 15 12:26:20 CET 2009

Having fun at FOSDEM

So it looks like I'll be at FOSDEM again this year. Like last year. And the year before. And ... well, you get the idea.

And like every year there's a beer event on friday, which is good.

So I thought to myself "Hmm, I want to have a nice dinner on Saturday". I know a nice restaurant in Brussels, and a few people decided to join me. I still have about a dozen seats free, so anyone else who wants to come along should just poke me. The more the merrier, and if there's some cross-project fun happening that's even better.
If you have any questions, ideas or just want to have some fun on fosdem saturday ...

Posted by Patrick | Permalink

Sun Jan 11 21:22:11 CET 2009

Hug a Developer!

If you do your daily emerge --sync in the morning, as I used to do (now it is "cvs up" :) ), you may notice a package or a dozen updated. There's a constant stream of packages being tested, updated, patched, improved. And best of all it doesn't cost you anything!

That's why I want you to invest something. It's quite small ... but ...
Show a developer of your choice your appreciation. Say thanks to them on IRC, send them a small mail explaining how their bumping of a package fixed three annoying bugs for you. Offer them a beer next time you meet them or just hug them when you get a chance. After all we're humans, and in a community of volunteers that kind of feedback can improve motivation a lot. And more motivated devs will make more good things so that you can enjoy an even better software environment.

It costs a minute of your time. They invest hours of theirs. It's a small price to pay ...

Posted by Patrick | Permalink

Sat Jan 10 21:04:31 CET 2009

Fixing Gentoo, one commit at a time

Since I've quit quitting being a dev I've mostly taken over two herds (app-benchmarks, which was abandoned, and app-forensics, which had fallen asleep with only dragonheart having a tangential interest).

This shows a rather worrying trend: Some areas like KDE are mostly well-maintained, but the fringe stuff that few people use depends in many cases on one dev. And if that dev disappears for any reason (work, wine, women ... many causes :) ) ... we are stuck with unmaintained packages. Over time bugs tend to pile up and few devs look outside their usual area of work. Unless someone needs a package and starts reanimating it nothing happens.

So here's an offer:
I'll try to work on all bugs in umaintained packages if someone points me at it. Since my time is limited I can't really focus on patching things or trying to hunt down failures in obscure languages. But if the bug contains a working solution I'll see that it is committed and the bug closed.
What I expect of you, the users (and maybe lazy devs ;) ) is simple: Provide patches. Test it as much as you can so we can be reasonably sure it works. You make sure the bug can be closed, and I'll be your commit monkey. If you find a bug that noone has touched in a few weeks which has a solution attached CC: me to the bug so I notice it.
What do we get out of it? Hopefully lots of fixed bugs and maybe some users that find more motivation to contribute fixes. Every small fix improves the overall quality. Everything we fix now won't bite us later.
And maybe some more people will work on bugwrangling - there's not enough people doing this, so please try to help us. After all we're only volunteers and working on things mostly in our spare time, so the more work you do the more time we have for the really interesting things :)

Posted by Patrick | Permalink