Paul's Blog Entries for March 2007

Thursday 1st March 2007

Fedora Project

Friday 2nd March 2007

Local Packages

Fedora Project

Monday 5th March 2007

Local Packages

Wednesday 7th March 2007

Local Packages

Thursday 8th March 2007

Local Packages

Fedora Project

Friday 9th March 2007

Fedora Project

Saturday 10th March 2007

Allotment

Plamted my early potatoes in the 7th bay of our plot, 45 Pentland Javelin at the Glebelands Road end and 34 Arran Pilot at the other end.

Monday 12th March 2007

Fedora Project

Thursday 15th March 2007

Local Packages

Friday 16th March 2007

Local Packages

Monday 19th March 2007

Local Packages

Over the weekend I've started populating a repository for Red Hat Enterprise Linux 5. Since CentOS5 isn't out yet, I've been building against the last beta release (4.92). I believe this will be OK for the resulting packages since there won't be any soname or other major changes between 4.92 and 5. Building the packages this way has caused me to have to update a large number of packages to get the dist tag to work properly (i.e. to be rhel5 rather than c4.92 or rhel4 etc.). These changes have resulted in lots of package updates for other distribution releases since I try to use the same SRPM for all distributions.

Other updates today:

Tuesday 20th March 2007

Fedora Project

Local Packages

Car Crash

I was involved in a collision with another car around 100 yards from home when returning from work. I was turning right on a mini-roundabout and another car shot across the roundabout from the opposite direction. The front drivers' sides of both vehicles collided and my car was spun round to face the direction I had come from, the other car also ending up facing that direction. I suspect the Micra I was driving will be written off as I struggle to imagine the repair cost being less than the value of the car. More importantly though, neither driver appeared to suffer any serious injuries, just being a bit dazed and shocked but otherwise OK, at least so far.

Wednesday 21st March 2007

Local Packages

Saturday 24th March 2007

Joe Job

Some pill spammer decided to use a random username on my dsbltest.city-fan.org domain as the From address for a spam run. This domain is one that I used to use a few years ago when I was doing relay and proxy testing for dsbl.org, and all mail for any address in that domain ends up in my mailbox. The result of the joe job was around 650 email bounces in my inbox before I added an appropriate entry to my /etc/mail/access to reject further mail to that address:

To:junbeersazm@dsbltest.city-fan.org    ERROR:5.1.1:551 Joe-job in progress

Sunday 25th March 2007

Joe Job

The pill spammer I referred to yesterday has started using a variety of usernames in the dsbltest.city-fan.org domain, and there were another 600+ bounces in my inbox as a result.

Since I no longer use this domain, the easiest fix was simply to disable the domain.

Short term, for spam-in-progress:

To:dsbltest.city-fan.org                ERROR:5.1.1:551 Joe-job in progress
To:postmaster@dsbltest.city-fan.org     OK

Long term (DNS cache expiry is one day) I've simply removed the dsbltest.city-fan.org subdomain from the city-fan.org zone.

Fedora Project

Michael Schwendt must have been running a script through Fedora cvs to find unowned directories, as I received two bug reports from him for my Fedora Extras packages:

Monday 26th March 2007

Local Packages

I'd previously decided that next time a perl-Module-Build update came along, I'd add one of the currently-missing optional build dependencies, so I picked perl(YAML) as the one to add. Unfortunately this meant that I also ended up needing perl(XML::Simple), and in turn perl(XML::LibXML), perl(XML::LibXML::Common), perl(XML::SAX), and perl(XML::NamespaceSupport). Now perl(XML::LibXML) has been in Fedora since Fedora Core 2 but I needed a package for Red Hat Linux 9, Fedora Core 1, and Red Hat Enterprise Linux 3. The current XML::LibXML is very picky about the libxml2 version it's built with and I had great trouble getting a version that would work. In fact I ended up using version 1.57 and disabling the test suite. I also had to use an old version (0.35) of YAML for Red Hat Linux 9 and Red Hat Enterprise Linux 3. Anyway, all of the packages build OK as they stand and have dependency closure, but what a pain...

Tuesday 27th March 2007

Local Packages

Thursday 29th March 2007

Local Packages

Friday 30th March 2007

Mail Tidying

Just deleted around a gigabyte of mail (about 25% of the mail on my IMAP server). This was messages more than 6 months old on a few high-traffic mailing lists I'm on. I was comfortable deleting these messages because they're available on a variety of public archive sites. It was easy to write a script to do this since I have the messages stored in maildir format on the server. It's careful to only delete messages containing some list-recognition regex so as to avoid removing personal emails that are stored in the same folder for whatever reason.

The script itself (~/bin/list-cleanse):

# list-cleanse; remove old mailing list messages from folders

# Source configuration
declare -a LIST_NAME LIST_REGEX LIST_FOLDER LIST_RETENTION
source ~/lib/list-cleanse.conf || exit 1

# Generate tempfile
TMPFILE1=/tmp/list-cleanse.$(id -u -n).$$.1
TMPFILE2=/tmp/list-cleanse.$(id -u -n).$$.2
trap 'rm -f $TMPFILE1 $TMPFILE2; exit 1' 1 2 15

# Iterate through lists
LISTNUM=0
while [ -n "${LIST_NAME[$LISTNUM]}" ]; do
        echo "list-cleanse: processing ${LIST_NAME[$LISTNUM]}"
        if [ -z "${LIST_REGEX[$LISTNUM]}" -o -z "${LIST_FOLDER[$LISTNUM]}" -o -z "${LIST_RETENTION[$LISTNUM]}" ]; then
                echo "list-cleanse: list info incomplete for ${LIST_NAME[$LISTNUM]}" 1>&2
                exit 1
        fi
        find ${MAILDIR}/${LIST_FOLDER[$LISTNUM]}/cur -type f > $TMPFILE1
        echo "list-cleanse: files in folder: $(wc -l < $TMPFILE1)"
        rm -f $TMPFILE1
        find ${MAILDIR}/${LIST_FOLDER[$LISTNUM]}/cur -type f -mtime +${LIST_RETENTION[$LISTNUM]} > $TMPFILE1
        echo "list-cleanse: candidates for deletion: $(wc -l < $TMPFILE1)"
        xargs --max-args=1 grep --files-with-matches "${LIST_REGEX[$LISTNUM]}" < $TMPFILE1 > $TMPFILE2
        echo "list-cleanse: matched candidates: $(wc -l < $TMPFILE2)"
        xargs rm -f < $TMPFILE2
        echo "list-cleanse: folder cleansed"
        rm -f $TMPFILE1 $TMPFILE2
        let LISTNUM+=1
done

# Clean up
rm -f $TMPFILE1 $TMPFILE2

The configuration file (~/lib/list-cleanse.conf):

# Folders are relative to here
MAILDIR=$HOME/mail/inbox

LIST_NAME[0]=fedora-list
LIST_REGEX[0]="^List-Id:.*fedora-list\.redhat\.com"
LIST_FOLDER[0]=.Linux.fedora-list
LIST_RETENTION[0]=180

LIST_NAME[1]=fedora-devel-list
LIST_REGEX[1]="^List-Post:.*fedora-devel-list@redhat\.com"
LIST_FOLDER[1]=.Linux.fedora-devel-list
LIST_RETENTION[1]=180

LIST_NAME[2]=fedora-package-review
LIST_REGEX[2]="^List-Id:.*fedora-package-review\.redhat\.com"
LIST_FOLDER[2]=.Linux.fedora-package-review
LIST_RETENTION[2]=180

LIST_NAME[3]=fedora-extras-commits
LIST_REGEX[3]="^List-Id:.*fedora-extras-commits\.redhat\.com"
LIST_FOLDER[3]=.Linux.fedora-extras-commits
LIST_RETENTION[3]=180

LIST_NAME[4]=fedora-extras-list
LIST_REGEX[4]="^List-Id:.*fedora-extras-list\.redhat\.com"
LIST_FOLDER[4]=.Linux.fedora-extras-list
LIST_RETENTION[4]=180

Result:

[paul@goalkeeper lib]$ du -ks ~/mail/inbox
3687784 /home/paul/mail/inbox
[paul@goalkeeper lib]$ list-cleanse 
list-cleanse: processing fedora-list
list-cleanse: files in folder: 10453
list-cleanse: candidates for deletion: 19
list-cleanse: matched candidates: 10
list-cleanse: folder cleansed
list-cleanse: processing fedora-devel-list
list-cleanse: files in folder: 21690
list-cleanse: candidates for deletion: 13893
list-cleanse: matched candidates: 13883
list-cleanse: folder cleansed
list-cleanse: processing fedora-package-review
list-cleanse: files in folder: 32573
list-cleanse: candidates for deletion: 14518
list-cleanse: matched candidates: 14517
list-cleanse: folder cleansed
list-cleanse: processing fedora-extras-commits
list-cleanse: files in folder: 59525
list-cleanse: candidates for deletion: 41129
list-cleanse: matched candidates: 41124
list-cleanse: folder cleansed
list-cleanse: processing fedora-extras-list
list-cleanse: files in folder: 29354
list-cleanse: candidates for deletion: 25577
list-cleanse: matched candidates: 25493
list-cleanse: folder cleansed
$ du -ks ~/mail/inbox
2544208 /home/paul/mail/inbox

I already see the benefit of this is faster mail reading times, and of course there will be a benefit next time I do a full backup of the server.

Previous Month: February 2007
Next Month: April 2007