What package is eating up my disk space?
Enrico, how about dpigs(1) from the debian-goodies package to solve your disk usage problem?
It's written in #!/bin/sh and not that nifty, but, if you omit the option parsing and usage code, it's even shorter. It basically does
grep-status -nsInstalled-size,Package -F Status ' installed' $STATUS \ | perl -p00l12 -e 's/\n/ /' \ | sort -rn \ | head --lines=$LINES
Audio::XMMSClient
Yesterday I did some work for the XMMS2 Debian packages. Thereby I noticed that libxmmsclient0, the xmms2 client library, that allows you to write your own xmms2 clients, is bound to quite a lot of languages, but perl bindings were still missing.
I took a look at the library interface and it seemed that creating bindings shouldn't be a big deal. Therefor I gave a try and wrote Audio::XMMSClient.
There are still some rough edges, but it works pretty well already. The interface is quite close to the C API, so it's possible to work with it even if documentation, examples and a test suite are still missing.
Comments on the API, the namespace and whether this module should go into the xmms2 distribution, like other language bindings, or directly to CPAN are most welcome.
aircrack-ng hacking
Aircrack, one my favourite wifi tools, was quite dead for a while. Bad enough, but after I switched to the madwifi-ng driver recently I discovered that I can't do injection anymore, which is quite bad. I searched for a workaround and found aircrack-ng, a fork of aircrack, which has been made recently. There weren't much changes to the aircrack codebase yet, but at least everything works well with madwifi-ng now.
Now, as aircrack seems to be moving again I mplemented some changes I always wanted to have, such as attack names (documentation patch) instead of attack numbers I could never remember and tried to get them submitted to upstream.
What I normally do that situation is to check out the latest development version from the projects version control system, prepare a patch against it and send it to the development mailing-list afterwards. That's hardly possible with aircrack-ng. Not only that one or two persons are having a master copy of the code instead of using a nice, public accessibly version control system, but also the total lack of mailing-lists or any other possibility to coordinate development besides an IRC channel and a wiki, which is only partially editable, makes contributing quite hard. After announcing some of my patches on IRC several times one of the upstream developers finally took a look at it and said he applied it so it'll be released in the near future.
I'm happy about that, but the deficits in the development process still exist. Therefor I offered to sponsor hosting, including mailing-lists, a version control system, a bug-tracking system and whatnot. It was thankfully declined as they already seem to have a hosting plan. Great! Unfortunately they don't have the money for that currently, but they at least have plan. Hooray for aircrack-ng..
Debian packages for the latest release already exist and should be upload in the next days, btw.
Even more wireless fun
After having some fun with madwifi-ng and hostap already, I decided to put the Atheros MiniPCI card I bought some months ago in my laptop to be able to use the cool madwifi-ng drivers there as well.
Unfortunately after putting it in and booting you get that:
1802: Unauthorized network card is plugged in - Power off and remove the miniPCI network card.
Some investigation brought up that this is caused he card's PCI-ID being checked against a whitelist in the BIOS. I liked IBM ThinkPads, and especially my X41, quite much so far, but this check hardly seems to have a technical background. It just forces people to buy IBM authorized cards..
Anyway, I wanted to use an Atheros card. So what were the possibilities?
Buying a PCMCIA card with Atheros chip? No.. I already had an Atheros card around and wanted to use the integrated wifi. Some people reported that the check could be switched of by flipping a CMOS bit. That doesn't seem to work with my X41. I could still have flashed the BIOS with a version with a changed whitelist, but I didn't want to fuck up a 1,600 EUR laptop. Therefor I decided to change the PCI-ID of my card. Only 40 EUR would have been lost if I did it wrong.
I found a nice article that explains how to do that very well. Basically you need to
- remove the MiniPCI wifi card
- switch the laptop on
- put the card in while the laptop is running (after the BIOS checks and before the Linux kernel boots)
- install madwifi
- use a special tool to change the PCI-ID to the ID of an authorized card
- hack the driver to recognize the card with the new PCI-ID
- go outside, enjoy the nice weather and hack
Life can be so easy.
Wifi::WpaCtrl
I wrote a bit of perl glue around wpa_ctrl.[ch] in the wpasupplicant
source, so it's now easily possible to communicate with wpa_supplicant, hostap
or compatible programs using Perl. The module is available for
download in my
CPAN directory.
Now, as my wifi works again, I can actually use it myself.
Wireless fun
Have you ever been bitten by a problem that resets all wifi settings like mode, essid and whatnot just some seconds after you set them? A certain mister Dreker suggest to simply shut down wpa_supplicant on that machine if it is running, as it always resets such settings to be able to receive all packets from all access points.
So, after doing so I now know why my wifi access point, which is just a normal Debian box, wasn't working for the last couple of months. For some reason wpa_supplicant was installed and running.. I just can't remember to have installed it as it hardly makes sense to me. Anyway, after I could set the wifi settings again I thought it wouldn't be much of a problem to get hostapd with WPA-EAP working again. Wrong!
wpa_supplicant on the client side somehow thought it was authenticated, but it actually wasn't. So I checked the debug output of hostapd which said something like that:
ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long
and after that line it said the it deauthenticated the client because of a local request, so I thought that's the problem. It pretty much looks like a binary incompatibility to me. I updated the madwifi drivers before in an attempt to to fix the essid reset problem, so hostapd, which needs to be compiled against the madwifi headers didn't work properly anymore. So I tried to recompile it and things got even worse:
ioctl[unknown???]: Operation not supported
I had no idea what to do about that, so I joined #madwifi on freenode. I have been told that I'll need at least hostapd 0.4.whatnot to make it run with madwifi-ng. Unstable has 0.5.0, so I downloaded that package, which contains madwifi-ng includes do build against, and compiled it on my sarge box. Almost exactly in the moment I was done I found out that I would need hostapd 0.5.2 to make it work with madwifi-ng and WPA2. Grr...
So I compiled it again, installed it and everything should have run fine. For some reason it didn't. After a while starting and stopping it to take a look at the debug output it somehow started to work and it keeps working up to now. I have actually no idea what could have caused that problem. Stijn Tintel on #madwifi could think of re-keying at the wrong moment or something like that, but isn't quite sure about that.
Anyway, wifi is up and working again and that makes me happy. :-)
Geek Tour
As I already said, I wanted to do a little geek tour with Juerd, a fellow #perl6 guy. We did so and visited Fosdem, GPW and CLT. Some pictures of those events can be found here. Unfortunately I wasn't able to visit Amsterdam.PM for financial reasons.
Nevertheless I had much fun on the tip! Therefor I'm already looking forward to go to the Easter Hegg, the German Linuxtag and some other events.
See you there!
PS: Did someone notice the fancy new CSS at http://perldition.org? :-)