Skip to Content

Posts Tagged ‘linux’

suckless screen lock

Permalink

A useful tool: slock is a tiny c program that locks your screen like xlock. But, with only 147 lines of very straightforward code it would be very difficult to introduce vulnerabilities :)

procmail magic: I am not afraid of lists anymore

Permalink

Yesterday a number of list posts from lists I had forgotten to write a procmail rule for made their way into my inbox. I didn’t like the idea of adding yet more cookie cutter rules to my ever expanding .procmailrc to fix the issue so, I went hunting for a better solution.

After searching for a bit I found jdub’s procmail which got me most of the way there:

# MOST LISTS - Automagically handle lists
:0
* ^((List-Id|X-(Mailing-)?List):(.*[< ]\/[^>]*))
{
    LISTID=$MATCH

    :0:
    * LISTID ?? ^\/[^@\.]*
    ifup.$MATCH/

}

# MAJORDOMO - Automagically handle Majordomo lists
:0
* ^Sender:.*owner-[^@]+@[^@\+]+
* ^Sender:.*owner-\/[^@\+]+
{
    :0:
    ifup.$MATCH/
}

But, vger.kernel.org mailing lists have listname-owner instead of owner-listname so I wrote this:

# MAJORDOMO with inverse owner
:0
* ^Sender:.*-owner@[^@\+]+
* ^Sender:[     ]*\/[^@\+]+
{
    :0:
    ifup.`echo $MATCH | /bin/sed -e s/-owner//g`/
}

Does anyone know how to skip that sed call? I am not too terribly happy with it but it works.

Final result: 80 insertions, 116 deletions and it handles all of my lists- not just the ones that I remember to add. w00t

guilt: my first Debian package

Permalink

Debian LogoFor the last few weeks I have been working on a Debian package for guilt, a quilt like tool that works on top of a git repository.

Getting the initial package together was easy thanks to dh_make. This created the debian/ directory and basic control files that were needed to Debianize the source. After customizing all of the control files I built the package with dpkg-buildpackage and it seemed to work!

But, I quickly hit a bump in the road, lintian, the Debian package checker complained that there were no man pages.

$ lintian -c guilt_0.20-1_i386.deb
W: guilt: binary-without-manpage guilt
W: guilt: binary-without-manpage guilt-add
...
W: guilt: binary-without-manpage guilt-top
W: guilt: binary-without-manpage guilt-unapplied

Knowing the package would never get sponsored without docs I worked with Josef Sipek, guilt author, to get an asciidoc documentation system built for guilt. In a few days we had built a man page for every command in the system and the lintian warnings were gone, w00t.

With the package in good shape Debian developer Pierre Habouzit kindly sponsored my package. And today I got notification that the package has been uploaded Debian!

Next step: Become a Debian developer.

P.S. If any Debian developers from around Oregon are reading I need my GPG key signed :)