Archive for January, 2010

cvs status parser script

Sunday, January 31st, 2010

As other people already found out, the cvs status output sucks pretty much. I found some simple bash scripts to make them a little more useful, but then I quickly wrote a simple MIT-licensed python script that creates an output like modern scms do. It can be downloaded from my Fedorapeople space. Luckily Fedora will anyhow move to git, soon, so I won’t have to use CVS that much anymore then.

It will fail, if files are in a state unknown to the script, but it should cover the most common states (read: the states I found in my cvs checkout). Feel free to report any states that it should handle and I’ll update it.
Here is some example output (I defined an cvss alias for it):

$ cvss
? unknown
O common/Makefile.common
O devel/Makefile
? devel/xz-4.999.8beta
? devel/xz-4.999.8beta.tar.gz
M devel/xz.spec
O EL-5/Makefile

As you can see, it sorts the output and also handles subdirs

fedora mailinglist migration List-Id conversion script

Friday, January 8th, 2010

Starting tomorrow, the Fedora mailing lists will be migrated from redhat.com to lists.fedoraproject.org. This will mess up everybody’s mailfilters that use the List-Id-Header. I just changed my .procmailrc to use the old and the new List-Ids with a huge sed command. This script can be temporarily downloaded from my Fedorapeople webspace. Maybe it is helpful for you, too. Here is a short excerpt:

#!/bin/bash
# Author: Till Maas
# The sed expressions have been created with:
# sed -e 's/^\(.*\) \(.*\)/-e '\''s!\1.redhat.com!(\1.redhat.com|\2.lists.fedoraproject.org)!'\'' \\/' mlmigration.csv
# mlmigration.csv is a csv version of
# http://jstanley.fedorapeople.org/mlmigration.ods with the first line removed
# and a space used as delimiter
sed -e 's!fedora-announce-list.redhat.com!(fedora-announce-list.redhat.com|announce.lists.fedoraproject.org)!' \
-e 's!fedora-list.redhat.com!(fedora-list.redhat.com|users.lists.fedoraproject.org)!' \
...
-e 's!fedora-trans-fa.redhat.com!(fedora-trans-fa.redhat.com|Trans-fa.lists.fedoraproject.org)!' \
-e 's!fedora-trans-te.redhat.com!(fedora-trans-te.redhat.com|Trans-te.lists.fedoraproject.org)!' \
-e 's!fedora-virt-maint.redhat.com!(fedora-virt-maint.redhat.com|Virt-maint.lists.fedoraproject.org)!' \
-e 's!fedora-trans-as.redhat.com!(fedora-trans-as.redhat.com|Trans-as.lists.fedoraproject.org)!' \
"${@}"

This script might of course break something in your setup, so please use it only if you understood what it does. Also I do not know, whether the new values for List-Id are really accurate, I just assumed the suffix to be “lists.fedoraproject.org” like it is for the logistics mailing list.

acpi workaround for broken display reset after lid close in fedora 12

Monday, January 4th, 2010

Yesterday I started to migrrate my notebook to Fedora 12. First it was all fun, but then the bugs hit me. A currently very annoying commonly known bug is, that on intel notebooks, the display may not get switched on, if the lid was closed. The current workaround is to create a shortcut to call xrandr to reset the output. I wanted this to happen automatically and after I failed to even get a gasp about how to do this with hal. Is there even any documentation or guide that explains this for anyone like “man acpid” explains how to perform actions when the lid is opened/closed? I was first foolished by acpid not wanting to start because hal-addon-acpi already opened /proc/acpi/events, but thanks to the bug report I knew that it is just an problem of the startup order. Hal was already started, but after I stoppped it, I could easily start acpid and then haldaemon again.

Now here is the configuration to get the he workaround xrandr calls run automatically:

cat /etc/acpi/actions/reset-display.sh
#!/bin/bash
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export DISPLAY=:0.0
if grep open /proc/acpi/button/lid/LID/state
then
su "$(getent passwd 500 | cut -d: -f1)" -c "xrandr --output LVDS1 --off"
su "$(getent passwd 500 | cut -d: -f1)" -c "xrandr --output LVDS1 --auto"
fi


cat /etc/acpi/events/reset-display.conf
event=button/lid LID 00000080.*
action=/etc/acpi/actions/reset-display.sh

It will only work if the user with uid 500 uses display :0.0. Probably this could be changed to work in all cases, but it works for me. :-)

Rheinschwimmen

Sunday, January 3rd, 2010

Argh, leider erstmal zu spät für dieses Jahr habe ich mitbekommen dass vom DLRG-Düsseldorf regelmäßig ein Rheinschwimmen veranstaltet wird. Dieses mal am 16.02

Nach dem Big Jump 2009 habe ich schonmal nach Möglichkeiten in NRW im Rhein zu schwimmen gesucht und nur die Veranstaltung vom DUC Köln zu Christi Himmelfahrt gefunden. Es wird wohl mal Zeit eine Liste dafür zusammenzustellen, damit man diese Veranstaltungen leichter findet:

Außerhalb von NRW: