Search Results: "rkd"

23 June 2010

Bernd Zeimetz: creating a google sitemap for ikiwiki

ikiwiki is not yet able to create a Google sitemap internally, so I'm using google-sitemapgen. To run it automatically when the website is being updated, I've changed the git hook to run it after the ikiwiki hook. /path/to/myikiwiki.git/hooks/post-update
#!/bin/sh
/path/to/myikiwiki.git/hooks/post-update.ikiwiki
/usr/bin/google-sitemapgen --config=/path/to/mywikiconfig/sitemap_config.xml
exec git-update-server-info
/path/to/mywikiconfig/sitemap_config.xml
<?xml version="1.0" encoding="UTF-8"?>
<site
  base_url="http://bzed.de/"
  store_into="/path/to/bzed.de/sitemap.xml.gz"
  verbose="0"
  suppress_search_engine_notify="0"
  default_encoding="UTF-8"
  >
  <directory
    path="/path/to/bzed.de"
    url="http://bzed.de/"
    default_file="index.html"
  />
  <!-- Exclude URLs that end with a '~'   (IE: emacs backup files)      -->
  <filter  action="drop"  type="wildcard"  pattern="*~"           />
  <!-- Exclude URLs within UNIX-style hidden files or directories       -->
  <filter  action="drop"  type="regexp"    pattern="/\.*"     />
  <!-- Exclude ikiwiki directories -->
  <filter  action="drop"  type="regexp"  pattern="/helponformatting/*"           />
  <filter  action="drop"  type="regexp"  pattern="/ikiwiki/*"                    />
  <filter  action="drop"  type="regexp"  pattern="/markdown/*"                   />
  <filter  action="drop"  type="regexp"  pattern="/openid/*"                     />
  <filter  action="drop"  type="regexp"  pattern="/pagespec/*"                   />
  <filter  action="drop"  type="regexp"  pattern="/preprocessordirective/*"      />
  <filter  action="drop"  type="regexp"  pattern="/sandbox/*"                    />
  <filter  action="drop"  type="regexp"  pattern="/shortcuts/*"                  />
  <filter  action="drop"  type="regexp"  pattern="/smileys/*"                    />
  <filter  action="drop"  type="regexp"  pattern="/subpage/*"                    />
  <filter  action="drop"  type="regexp"  pattern="/templates/*"                  />
  <filter  action="drop"  type="regexp"  pattern="/theme/*"                      />
  <filter  action="drop"  type="regexp"  pattern="/wikiicons/*"                  />
  <filter  action="drop"  type="regexp"  pattern="/wikilink/*"                   />
  <filter  action="drop"  type="regexp"  pattern="/wmd/*"                        />
  <!-- Exclude css files, favicon and javascript -->
  <filter  action="drop"  type="wildcard"    pattern="*.css"                         />
  <filter  action="drop"  type="wildcard"    pattern="*favicon.ico"                  />
  <filter  action="drop"  type="wildcard"    pattern="*.js"                          />
  <!-- Exclude ikiwiki.cgi -->
  <filter  action="drop"  type="wildcard"    pattern="ikiwiki.cgi"                   />
</site>
See the examples and README files in /usr/share/doc/google-sitemapgen/ for an introduction into configuring google-sitemapgen. So far the generated sitemaps works very well, especially for search engines which are not able to use the rss feeds like Google does.

26 April 2010

Christoph Egger: [Review] AI Touchbook

Having my primary working Computer, a Lenovo Thinkpad, going into repair at the end of December I finally got up to ordering on of those TouchBook ARM based netbooks I was looking at for some time. After some processing time it finally got shipped in April and arrived here last Monday, time to write up my first impressions. Some words about the Hardware. The TouchBook ships with a so called "Beagle Board" featuring a OMAP3 Processor, ARM Cortex A8 running at 600MHz, 512MiB of RAM and a 8GiB SD Card for storage. It has a 8.9" touch screen and comes with USB and Bluetooth Sticks for wireless connectivity. The Display part contains all the needed Hardware and is detachable from the bottom that is just a keyboard sitting on the secondary Battery. You can open the Top to get at 4 intern USBs (3 USB-A and one Mini-USB) where 2 of these spots are occupied already for wireless networking and Bluetooth. First experience The TouchBook comes with an US Power Adaptor only so when I got the device I was running for some tiny Adaptor to get the plug into a normal EU Power Outlet (it's incredibly hard to get one for this Direction while it's easy to get some travelling stuff to plug EU Hardware into various different Outlets!). When I finally booted it the first thing you'll notice is the touch interface for the bootloader. That's quite a difference to all-text-based old grub! The shipped SD Card offers 3 Operating Systems, one custom Linux that might well be interesting to the average User, a Ubuntu Karmic that really OK for a Debianoid Hacker- both running a XFCE Desktop - and a Android that is really slow and doesn't seem to be good at anything. Needless to say I sticked with the Ubuntu for now. What to not expect Well this is a 600MHz CPU with half a Gig of RAM running of a SD Card. So don't expect it to be good at anything that can profit from today's High-End Hardware. The good Points First of all, I have to admit that the touch screen is a neat interface, way superior to the Touchpad Area you'll normally find on a Notebook - at least if you use the stylus. It's quite different from the inside-the-keyboard trackball the thinkpads have of course. The Website claims 10h of Battery life and while I've emptied the battery much faster under certain workloads (e.g. Playing cards) it does hold that promise with emacs fired up in org-mode, IRCing on a server over SSH and the mandatory wireless working. Same for a always-on on campus day which just works. Again putting the screen on the keyboard the wrong way 'round will give you a touchscreen tablet with the keyboard out of your way, an ideal configuration for playing. And I have to admit playing games like gtkballs or aisle riot real fun. So much fun actually I'm currently thinking on whether it would be feasible to get openpandora working on it. What I'm really missing There are two Properties that are really lacking from the device which would make it (in my personal opinion at least) a whole lot better: A simple Ethernet controller I could use to go online when sitting in the server room doing some maintenance without taking my WRT with me and some slot to store the stylus when not using it where it's easy to get out (currently I'm having it in my wallet). Then there's something (maybe a Kernel Bug): The Wireless is unable to find any new Access Point after disconnecting from some and walking out of reach from that. Force-unloading the kernel module and waiting 30 minutes worked for me multiple times but that's purely inacceptable. Finally there are some minor glitches. The shiny red cover just gets dirty every time you touch the thing and the Keyboard is really small (what a surprise on a 9" device) and has some of the special Keys (like the Home key) located at unusual spots (Page-Up/Down only available through the FN modifier). Shift and End at the right side are also labeled opposite from their actual function (at least on Ubuntu). The last ugliness is the top part battery only charging when the device is running, which means you"ll have the TouchBook running all night to get the battery charged and the Battery Monitor not working at all (at least in the current version of the operating systems). Where to go now I've not yet come around to really play with the operating system (apart from installing wicd, urxvt-unicode and awesome getting the most needed of my working environment). As I'm a Debian Developer I'll definitely need a Debian running on it (although I was told it'll be slow with software compiled for armv4te) and, as it needs to be running all night anyway, I'll try out gentoo pending another SD Card for experiments. Secondly there's currently no useable conforming Common Lisp Implementation in Debian for armel as far as I can tell. As arm was already working it shouldn't be that hard, let's see if I can change that but feel free to join me! Final Notes I was thinking of some mobile-ish note-taking device and remote ssh terminal for University which the device clearly can do even for 10h away from any power plug while being some non-standard non-x86 device to toy on (It's actually my second armel next to the sheeva plug mounted on my window board. As a final Remark: This blogpost was written on the TouchBook hacking some markdown into emacs while traveling by train to Erlangen where I study on Sunday Night after having read some chapters of Cory Doctorow's Little Brother on my E-Slick E-Book reader and finished later in my Room. Maybe I'll find some time to write a review for this device as well one day!

24 February 2010

Michal &#268;iha&#345;: Blog breakage

Hmm, it looks like upgrading markdown was not clever idea, it seems to have broken lot of posts on the blog. Hopefully it is correct now.

7 January 2010

Kumar Appaiah: Brief updates and some advice

So, while Richard is busy doing research and arranging or facilitating several Debian workshops, here I am, gulping down Idlis and Dosas by the dozen. It's been a fun visit, and I got to visit several places in my native state, but since my visit to Mumbai is rather short, I won't be able to say hello to several friends this time (Sorry Kartik). Maybe this would happen only when I am back in India on a permanent basis; let's see...Here are some general guidelines for travelers which I'd like to share:It's been a really fun trip, and I am sure I'll enjoy the rest of the trip, till I get back to my old routine and resume work.Finally, in keeping with the spirit of a blog I try to understand (albeit, in vain, I must accept), I duplicate the concept of a post from that blog, here is an up-to-date list of airports in which I have sat, but never left except by way of airplane:More updates later. Bye for now.

1 November 2009

Joerg Jaspert: Debian FTPMaster meeting, all broken

Heyho. The last morning and we are all very tired. Yesterday we had a nice 20hour workday that only ended this morning at 03:30h. But it was entirely worth it, as we managed to get the last big patchset working. Something where the idea is years old, but noone ever came around to do it. Granted, it is a really big change, so not easy to do and it took us time and lots of energy, but it is really worth it. Especially as it will instantly kick out a lot of race conditions we could never properly fix with the old code. And will help also against the case where an orig tarball could get lost, this is no longer possible. Now I am way too tired writing up more in this post, just two things: So, lots of changes, stay tuned, we will post multiple times to d-d-a when we are back home and feel human again. :)

6 October 2009

Steve Kemp: Poppa's got a brand new bang.

Recently I posted a brief tool for managing "dotfile collections". This tool was the rationalisation of a couple of adhoc scripts I already used, and was a quick hack written in nasty bash. I've updated my tool so that it is coded in slightly less nasty Perl. You can find the dotfile-manager repository online now. This tool works well with my dotfile repository, and the matching, but non-public dotfiles-private repository. I'm suspect that this post might flood a couple of feed agregators, because I've recently my chronicle blog compiler with a new release. This release has updated all the supplied themes/templates such that they validate strictly, and as part of that I had to edit some of my prior blog entries to remove bogus HTML markup. (Usually simple things suck as failing to escape & characters correctly, or using "[p][/P]" due to sloppy shift-driving.) I should probably update the way I post entries, and use markdown or textile instead of manually writing HTML inside Emacs, but the habit has been here for too long. Even back when I used wordpress I wrote my entries in HTML... Finally one other change in the most recent chronicle release is that the "mail-scanning.com theme" has been removed, as the service itself is no longer available. But all is not lost. ObFilm: Blade II

23 March 2009

Clint Adams: Let us see what markdown mangles

certtool --generate-privkey > cakey.pem
echo 'cn = exampleCA' > ca.tmpl
echo 'ca' >> ca.tmpl
echo 'cert_signing_key' >> ca.tmpl
echo 'expiration_days = 732' >> ca.tmpl
certtool --generate-self-signed --load-privkey cakey.pem \
  --template ca.tmpl --outfile cacert.pem
for i in host1.example.org host2.example.org host3.example.org
do
certtool --generate-privkey > $i-key.pem
echo 'organization = Example' > server.tmpl
echo 'unit = Messaging' >>server.tmpl
echo "cn = $i" >> server.tmpl
echo 'email = postmaster@example.org' >> server.tmpl
echo 'expiration_days = 366' >> server.tmpl
#    echo 'tls_www_server' >> server.tmpl
echo 'encryption_key' >> server.tmpl
echo 'signing_key' >> server.tmpl
echo "dns_name = $i" >> server.tmpl
certtool --generate-certificate --load-privkey $i-key.pem \
  --load-ca-certificate cacert.pem --load-ca-privkey cakey.pem \
  --template server.tmpl --outfile $i.pem
done

26 December 2008

David Bremner: Prolegomenon to any future tg-buildpackage

So I have been getting used to madduck's workflow for topgit and debian packaging, and one thing that bugged me a bit was all the steps required to to build. I tend to build quite a lot when debugging, so I wrote up a quick and dirty script to I don't claim this is anywhere ready production quality, but maybe it helps someone. Assumptions (that I remember) Here is the actual script:
#!/bin/sh
set -x
if [ x$1 = x-k ]; then
    keep=1
else
    keep=0
fi
WORKROOT=/tmp
WORKDIR= mktemp -d $WORKROOT/tg-debuild-XXXX 
# yes, this could be nicer
SOURCEPKG= dpkg-parsechangelog   grep ^Source:   sed 's/^Source:\s*//' 
UPSTREAM= dpkg-parsechangelog   grep ^Version:   sed -e 's/^Version:\s*//' -e s/-[^-]*// 
ORIG=$WORKDIR/$ SOURCEPKG _$ UPSTREAM .orig.tar.gz
pristine-tar checkout $ORIG
WORKTREE=$WORKDIR/$SOURCEPKG-$UPSTREAM
CDUP= git rev-parse --show-cdup 
GDPATH=$PWD/$CDUP/.git
DEST=$PWD/$CDUP/../build-area
git archive --prefix=$WORKTREE/ --format=tar master   tar xfP -
GIT_DIR=$GDPATH make -C $WORKTREE -f debian/rules tg-export
cd $WORKTREE && GIT_DIR=$GDPATH debuild 
if [ $?==0 -a -d $DEST ]; then
    cp $WORKDIR/*.deb $WORKDIR/*.dsc $WORKDIR/*.diff.gz $WORKDIR/*.changes $DEST
fi
if [ $keep = 0 ]; then
    rm -fr $WORKDIR
fi

22 August 2008

Enrico Zini: Unpacking the new FreeRunner

Unpacking the new FreeRunner I got myself a FreeRunner. Here are some notes from the first few days: Available operating systems The FreeRunner comes with the Om 2007.2 distribution: it works for basic phone things, and it has an opkg package manager that you can use to install all sort of extra software. Only issue: the SMS application was rather unstable with my SIM card. I then tried Om 2008.8, which is a major new redesign, partly based on Qtopia. It's definitely more advanced on how it looks, with smooth animations all around, but I did not manage to get the GSM part to work, because I did not manage to get it to ask for a PIN. I then tried plain Qtopia and I got what looks and feels like a properly working mobile phone. The only issue that it has is that I did not manage to make it suspend, so battery life is much shorter than it could be. Apparently, this should improve as kernel 2.6.26 reaches the phone. I kept Qtopia installed in the phone flash as a "stable" phone system. And finally, Debian. Debian is based on the freesmartphone.org software stack, which is an attempt to create a UI agnostic DBUS frontend to the hardware that supports multiple applications running on top of it. It is a young project, but it can already drive a mobile phone in a useful way. It has a demo interface that is basically a showcase of what is implemented in the DBUS frontend, but does most of the basic things you need from a mobile phone, including taking and making phone calls. And then it has Debian behind, all of it. I need to buy a bigger microsd card. Tips and tricks Flashing things
  1. apt-get install dfu-util
  2. Start the Freerunner bios/bootloader, by holding down Power and then pressing AUX (standard bootloader), or by holding down AUX and then pressing Power (factory, unbrickable, read only fail safe bootloader).
  3. dfu-util -l shows you a list of devices it can access. If you see more than once, you need to specify in all dfu-util commands which one you want, using -d USBID. In my case, I have to always use dfu-util -d 0x1d50:0x5119
  4. To flash the kernel: dfu-util -a kernel -R -D /path/to/uImage
  5. To flash the root file system: dfu-util -a rootfs -R -D rootfs_filename.jffs2
  6. To flash the bootloader: dfu-util -a u-boot -R -D uboot_filename.bin
  7. To flash the u-boot configuration: dfu-util -a u-boot_env -D env.new
You can also download all of these things from the FreeRunner by using -U instead of -D. Networking via USB All of the distributions I tried, by default configure the USB as a gadget with ethernet over usb. You can form a lan with it using the cdc_ether module, and you will find your phone preconfigured as 192.168.0.202 expecting to find a gateway at 192.168.0.200. I made myself this script to start and stop networking with the phone:
#!/bin/sh
case "$1" in
    start)
        iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE -s 192.168.0.200/29
        ifconfig usb0 192.168.0.200 netmask 255.255.255.248
        /etc/init.d/dnsmasq start
        echo 1 > /proc/sys/net/ipv4/ip_forward
        ;;
    stop)
        echo 0 > /proc/sys/net/ipv4/ip_forward
        /etc/init.d/dnsmasq stop
        iptables -t nat -F POSTROUTING
        ifconfig usb0 down
        ;;
esac

Besides doing masquerading, it also brings up dnsmasq so that the phone can always find a DNS together with the router. Another useful trick is to configure the phone to share the approx cache with the laptop:
deb http://192.168.0.200:9999/debian unstable main
deb http://192.168.0.200:9999/debian experimental main
deb http://pkg-fso.alioth.debian.org/debian unstable main

So yes, my laptop can now be turned into a phone charger with networking, DNS and apt cache services. I shall look into hooking that script into dbus to have it run automatically when the phone is plugged and unplugged. Changing the ringtone in Debian In case you don't like the default ringtone, this is how to change it:
  1. vi /usr/share/python-support/fso-frameworkd/framework/subsystems/oeventd/receiver.py
  2. look for def _play( self ):
  3. change the codec in decoder = gst.element_factory_make, if needed. The list of available plugins is on the gstreamer website.
  4. change the path in filesrc.set_property
  5. /etc/init.d/fso-frameworkd restart and maybe /etc/init.d/zhone-session restart
Yes, the ringtone is currently hardcoded, but it does say it's a prototype after all. Or, if you prefer, it's fully configurable and the configuration can be found in /usr/share/python-support/fso-frameworkd. Configuring the bootloader You can connect to the u-boot bootloader via a serial terminal on /dev/ttyACM0. Type help and you will find that it can do a lot of things. The OpenMoko wiki has pages on the bootloader itself, its commands and the environment. The environment is the configuration of the bootloader, similar somehow to /boot/grub/menu.lst. Unlike grub, you can edit the environment from within the bootloader and then save it using the saveenv command. What I did:
  1. A boot entry for Debian, with the kernel on an ext2 partition instead of fat: setenv menu_3 Boot from microSD (FAT+ext2): setenv bootargs \$ bootargs_base rootfstype=ext2 root=/dev/mmcblk0p2 rootdelay=5 \$ mtdparts ro\; mmcinit\; fatload mmc 1 0x32000000 \$ sd_image_name \; bootm 0x32000000
  2. Stay in the bootloader until a choice has been made: setenv bootdelay -1
  3. Don't power down the bootloader when idle: setenv boot_menu_timeout 99999
  4. Always show the menu at boot: setenv stop_in_menu yes
  5. saveenv
So now my phone dual boots, and I can choose if I want a more reliable phone now (Qtopia) or if I want to play with my future phone (Debian). Configuring ssh for two host keys on the same host Minor issue, but annoying: since both QTopia and Debian show up on 192.168.0.202, ssh will complain about changed host keys. Here is how to configure ssh to avoid the problem (in ~/.ssh/config):
Host debian
HostName 192.168.0.202
User root
HostKeyAlias debian
Host qtopia
HostName 192.168.0.202
User root
HostKeyAlias qtopia

5 August 2008

Eddy Petri&#537;or: git-core etch backport is useless

Update:

It seems that the lenny version (1:1.5.6.3-1) plus some small changes to allow building and running on etch does not have this problem.

The changes include:

* backported to etch
- compile against tcl8.4, instead of tcl8.5
- gtik and git-gui depend on tk8.4, instead of tk8.5
- drop the versioned dep on asciidoc and docbook-xsl


It s really nice that git-core is backported to etch, but is kind of hard to convince people to use it when gitk needs tk8.5, which is unavailable in etch.

This was the reason why previosely I made a local backport (1:1.5.6-1~bpo40+1~local) thinking the missing/extra[*] dep was a temporary glitch. According to bug 456423, this should be safe.


Does backports.org have a buildd network? IIRC, it uses the experimental buildd network, but that doesn't explain the desynchronisation of the packages in etch-backports.


Oddly enough, the build now fails on my etch machine during the tests in t9400-git-cvsserver-server.sh (looks like it is not related to the tk8.5 change):

* FAIL 23: cvs update (create new file)
echo testfile1 >testfile1 &&
git add testfile1 &&
git commit -q -m "Add testfile1" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test "$(echo $(grep testfile1 CVS/Entries cut -d/ -f2,3,5))" = "testfile1/1.1/" &&
diff -q testfile1 ../testfile1

* expecting success: echo line 2 >>testfile1 &&
git add testfile1 &&
git commit -q -m "Append to testfile1" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test "$(echo $(grep testfile1 CVS/Entries cut -d/ -f2,3,5))" = "testfile1/1.2/" &&
diff -q testfile1 ../testfile1
Counting objects: 5, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 282 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
To gitcvs.git
0879984..e6bd37b master -> master
cvs update: Updating .
cvs update: New directory master'
* FAIL 24: cvs update (update existing file)
echo line 2 >>testfile1 &&
git add testfile1 &&
git commit -q -m "Append to testfile1" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test "$(echo $(grep testfile1 CVS/Entries cut -d/ -f2,3,5))" = "testfile1/1.2/" &&
diff -q testfile1 ../testfile1

* checking known breakage:
mkdir test &&
echo >test/empty &&
git add test &&
git commit -q -m "Single Subdirectory" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test ! -d test

Counting objects: 4, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 388 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
To gitcvs.git
e6bd37b..4a13ee9 master -> master
cvs update: Updating .
cvs update: New directory master'
* FIXED 25: cvs update w/o -d doesn't create subdir (TODO)

* expecting success: (for dir in A A/B A/B/C A/D E; do
mkdir $dir &&
echo "test file in $dir" >"$dir/file_in_$(echo $dir sed -e "s#/# #g")" &&
git add $dir;
done) &&
git commit -q -m "deep sub directory structure" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update -d &&
(for dir in A A/B A/B/C A/D E; do
filename="file_in_$(echo $dir sed -e "s#/# #g")" &&
if test "$(echo $(grep -v ^D $dir/CVS/Entries cut -d/ -f2,3,5))" = "$filename/1.1/" &&
diff -q "$dir/$filename" "../$dir/$filename"; then
:
else
echo >failure
fi
done) &&
test ! -f failure
Counting objects: 13, done.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (12/12), 754 bytes, done.
Total 12 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (12/12), done.
To gitcvs.git
4a13ee9..f573218 master -> master
cvs update: Updating .
cvs update: New directory master'
grep: A/CVS/Entries: No such file or directory
grep: A/B/CVS/Entries: No such file or directory
grep: A/B/C/CVS/Entries: No such file or directory
grep: A/D/CVS/Entries: No such file or directory
grep: E/CVS/Entries: No such file or directory
* FAIL 26: cvs update (subdirectories)
(for dir in A A/B A/B/C A/D E; do
mkdir $dir &&
echo "test file in $dir" >"$dir/file_in_$(echo $dir sed -e "s#/# #g")" &&
git add $dir;
done) &&
git commit -q -m "deep sub directory structure" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update -d &&
(for dir in A A/B A/B/C A/D E; do
filename="file_in_$(echo $dir sed -e "s#/# #g")" &&
if test "$(echo $(grep -v ^D $dir/CVS/Entries cut -d/ -f2,3,5))" = "$filename/1.1/" &&
diff -q "$dir/$filename" "../$dir/$filename"; then
:
else
echo >failure
fi
done) &&
test ! -f failure

* expecting success: git rm testfile1 &&
git commit -q -m "Remove testfile1" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test -z "$(grep testfile1 CVS/Entries)" &&
test ! -f testfile1
rm 'testfile1'
Counting objects: 3, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 233 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (2/2), done.
To gitcvs.git
f573218..2ed3834 master -> master
cvs update: Updating .
cvs update: New directory master'
* ok 27: cvs update (delete file)

* expecting success: echo readded testfile >testfile1 &&
git add testfile1 &&
git commit -q -m "Re-Add testfile1" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test "$(echo $(grep testfile1 CVS/Entries cut -d/ -f2,3,5))" = "testfile1/1.4/" &&
diff -q testfile1 ../testfile1
Counting objects: 4, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 300 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
To gitcvs.git
2ed3834..3f3e927 master -> master
cvs update: Updating .
cvs update: New directory master'
* FAIL 28: cvs update (re-add deleted file)
echo readded testfile >testfile1 &&
git add testfile1 &&
git commit -q -m "Re-Add testfile1" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test "$(echo $(grep testfile1 CVS/Entries cut -d/ -f2,3,5))" = "testfile1/1.4/" &&
diff -q testfile1 ../testfile1

* expecting success: echo Line 0 >expected &&
for i in 1 2 3 4 5 6 7
do
echo Line $i >>merge
echo Line $i >>expected
done &&
echo Line 8 >>expected &&
git add merge &&
git commit -q -m "Merge test (pre-merge)" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test "$(echo $(grep merge CVS/Entries cut -d/ -f2,3,5))" = "merge/1.1/" &&
diff -q merge ../merge &&
( echo Line 0; cat merge ) >merge.tmp &&
mv merge.tmp merge &&
cd "$WORKDIR" &&
echo Line 8 >>merge &&
git add merge &&
git commit -q -m "Merge test (merge)" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
sleep 1 && touch merge &&
GIT_CONFIG="$git_config" cvs -Q update &&
diff -q merge ../expected
Counting objects: 4, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 302 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
To gitcvs.git
3f3e927..28c1b4a master -> master
cvs update: Updating .
cvs update: New directory master'
* FAIL 29: cvs update (merge)
echo Line 0 >expected &&
for i in 1 2 3 4 5 6 7
do
echo Line $i >>merge
echo Line $i >>expected
done &&
echo Line 8 >>expected &&
git add merge &&
git commit -q -m "Merge test (pre-merge)" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test "$(echo $(grep merge CVS/Entries cut -d/ -f2,3,5))" = "merge/1.1/" &&
diff -q merge ../merge &&
( echo Line 0; cat merge ) >merge.tmp &&
mv merge.tmp merge &&
cd "$WORKDIR" &&
echo Line 8 >>merge &&
git add merge &&
git commit -q -m "Merge test (merge)" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
sleep 1 && touch merge &&
GIT_CONFIG="$git_config" cvs -Q update &&
diff -q merge ../expected

* expecting success: ( echo LINE 0; cat merge ) >merge.tmp &&
mv merge.tmp merge &&
git add merge &&
git commit -q -m "Merge test (conflict)" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
diff -q merge ../expected.C
Counting objects: 5, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 303 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
To gitcvs.git
28c1b4a..1f0f9c8 master -> master
cvs update: Updating .
cvs update: New directory master'
diff: merge: No such file or directory
* FAIL 30: cvs update (conflict merge)
( echo LINE 0; cat merge ) >merge.tmp &&
mv merge.tmp merge &&
git add merge &&
git commit -q -m "Merge test (conflict)" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
diff -q merge ../expected.C

* expecting success: cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update -C &&
diff -q merge ../merge
cvs update: Updating .
cvs update: New directory master'
diff: merge: No such file or directory
* FAIL 31: cvs update (-C)
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update -C &&
diff -q merge ../merge

* expecting success: echo Line 9 >>merge &&
cp merge cvswork/merge &&
git add merge &&
git commit -q -m "Merge test (no-op)" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
sleep 1 && touch merge &&
GIT_CONFIG="$git_config" cvs -Q update &&
diff -q merge ../merge
Counting objects: 5, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 303 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
To gitcvs.git
1f0f9c8..e6c5fc1 master -> master
cvs update: Updating .
cvs update: New directory master'
* ok 32: cvs update (merge no-op)

* expecting success:
touch really-empty &&
echo Line 1 > no-lf &&
echo -n Line 2 >> no-lf &&
git add really-empty no-lf &&
git commit -q -m "Update -p test" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs update &&
rm -f failures &&
for i in merge no-lf empty really-empty; do
GIT_CONFIG="$git_config" cvs update -p "$i" >$i.out
diff $i.out ../$i >>failures 2>&1
done &&
test -z "$(cat failures)"

Counting objects: 4, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 305 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
To gitcvs.git
e6c5fc1..4d0f85b master -> master
cvs update: Updating .
cvs update: New directory master'
cvs update: Updating .
cvs update: New directory master'
cvs update: Updating .
cvs update: New directory master'
cvs update: Updating .
cvs update: New directory master'
cvs update: Updating .
cvs update: New directory master'
* FAIL 33: cvs update (-p)

touch really-empty &&
echo Line 1 > no-lf &&
echo -n Line 2 >> no-lf &&
git add really-empty no-lf &&
git commit -q -m "Update -p test" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs update &&
rm -f failures &&
for i in merge no-lf empty really-empty; do
GIT_CONFIG="$git_config" cvs update -p "$i" >$i.out
diff $i.out ../$i >>failures 2>&1
done &&
test -z "$(cat failures)"


* expecting success:
mkdir status.dir &&
echo Line > status.dir/status.file &&
echo Line > status.file &&
git add status.dir status.file &&
git commit -q -m "Status test" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs update &&
GIT_CONFIG="$git_config" cvs status grep "^File: status.file" >../out &&
test $(wc -l ../out) = 2 Counting objects: 5, done. Compressing objects: 100% (2/2), done. Writing objects: 100% (4/4), 366 bytes, done. Total 4 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (4/4), done. To gitcvs.git 4d0f85b..a146cf3 master -> master
cvs update: Updating .
cvs update: New directory master'
Invalid module '' at /home/eddy/usr/src/tools/git-backports/1.5.6.3-1~bpo40+3~local/git-core-1.5.6.3/t/../git-cvsserver line 2895,
line 18.
cvs [status aborted]: end of file from server (consult above messages if any)
* FAIL 34: cvs status

mkdir status.dir &&
echo Line > status.dir/status.file &&
echo Line > status.file &&
git add status.dir status.file &&
git commit -q -m "Status test" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs update &&
GIT_CONFIG="$git_config" cvs status grep "^File: status.file" >../out &&
test $(wc -l ../out) = 2 * expecting success: cd cvswork && GIT_CONFIG="$git_config" cvs status -l grep "^File: status.file" >../out &&
test $(wc -l ../out) = 1 Invalid module '' at /home/eddy/usr/src/tools/git-backports/1.5.6.3-1~bpo40+3~local/git-core-1.5.6.3/t/../git-cvsserver line 2895,
line 19.
cvs [status aborted]: end of file from server (consult above messages if any)
* FAIL 35: cvs status (nonrecursive)

cd cvswork &&
GIT_CONFIG="$git_config" cvs status -l grep "^File: status.file" >../out &&
test $(wc -l ../out) = 1 * expecting success: cd cvswork && GIT_CONFIG="$git_config" cvs status grep ^File: >../out &&
! grep / ../out Invalid module '' at /home/eddy/usr/src/tools/git-backports/1.5.6.3-1~bpo40+3~local/git-core-1.5.6.3/t/../git-cvsserver line 2895,
line 18.
cvs [status aborted]: end of file from server (consult above messages if any)
* FAIL 36: cvs status (no subdirs in header)

cd cvswork &&
GIT_CONFIG="$git_config" cvs status grep ^File: >../out &&
! grep / ../out * fixed 1 known breakage(s) * failed 11 among 36 test(s) make[2]: *** [t9400-git-cvsserver-server.sh] Error 1 make[2]: Leaving directory /home/eddy/usr/src/tools/git-backports/1.5.6.3-1~bpo40+3~local/git-core-1.5.6.3/t' make[1]: *** [test] Error 2 make[1]: Leaving directory /home/eddy/usr/src/tools/git-backports/1.5.6.3-1~bpo40+3~local/git-core-1.5.6.3' make: *** [build-arch-stamp] Error 2



[*] depends on how you look at it

8 June 2008

Manoj Srivastava: Manoj: Using org-mode with Ikiwiki

Using org mode to write ikiwiki posts I have been much taken by org-mode in Emacs recently. Firstly, this has allowed me to actually effectively implement the tenets of Getting things done , which is amazing by itself. I always used to start with great enthusiasm, which rarely lasted longer than a week. Until org-mode. Then this is so amazingly flexible. It has better handling of tables and even a spreadsheet mode than anything I have used and it has a pretty decent HTML export function. I practically live in org-mode on work days now. I strongly recommend org-mode, from things like agendas, TODO lists, calendars, appointments, articles, and now Ikiwiki posts. I rarely ever use markdown, apart from blogging using Ikiwiki and thus, since I blog so infrequently, I rarely ever remember all the syntax. On the other hand, org-mode syntax is now at my finger tips so I decided it was time to write a Ikiwiki plugin so I can now write my blog posts using syntax I can actually remember. It is still rough around the edges firstly, this requires emacs23 (or, on Debian, there is the unofficial emacs-snapshot package), secondly, it uses hueristic hacks to prune away the bits of the stand alone HTML page that org-mode creates; all I can say is that it currently works for me, as you can see from this post. How git this is for mainlne inclusion is another matter. The code is here: org.pm. It can be dropped in to the Ikiwiki plug-in directory, and that s all you need. With this, Ikiwiki pre-process things in the input file, and then passes it to emacs to htmlize it.

13 April 2008

Axel Beckert: New mobile phone and what the Nokia 6310i did better than the E51

Habits control our choice sometimes more than we would like to admit… New mobile phone Since about two weeks ago I’ve a new mobile phone. The Nokia E51 will replace my slowly dying Nokia 6130i. I knew I needed a new mobile phone when my 6310i started to turn off itself shortly after I turned it on. I needed up to about ten times switching it on to make it stay on. Sometimes it already switched itself off before I could enter the PIN. Looks like a loose contact, but I never figured out where it is. Although I know about Nokia’s behaviour in Germany, I still had to buy a Nokia, because after using a 6130 (the GSM 1800 only clone of 6110 and 6150), a 6210i and the already mentioned 6130i over the last decade, I got so used to how Nokia mobile phones are navigated and how you type with Nokia phones (blank on 0, point and comma on 1, case changing on #), everything else (especially those with blank on 0 and case changing on *) would be worse than the half-dead mobile phone, I’m currently using. Spoilt for choice So which Nokia? For a long time I refused to buy a mobile phone with a camera or radio in it. But since the E70 was no more available (and is said to have quite buggy software) and the E61 has been replaced with the E61i, there are no more smartphones without a camera, at least not from Nokia. But I also found some useful uses of camera phones. After a while I could track down the number of choices to four: Communicator E90, E61i, E65 or E51:
Sizeasy Size Comparison: Nokia E90 vs Nokia 6310i vs Nokia E61i vs Nokia E51 vs Nokia E65
The picture above shows that the main differences of those models is size: Although having a QWERTY keyboard on the phone would be nice (for ssh, Jabber, the web, etc.) and the E90 being only slightly bigger than the 6310i on the paper, the size difference to the 6130i is more than only noticeable since the 6310i tapers off at the top. Besides, for the price of an E90, I get an E51 and an EeePC together… (Thanks to maol in whose blog I read about Sizeasy.) The E61i also has a (very small) QWERTY keyboard and is primarily only much wider than any of the other phones. It even has no bigger screen resolution than the E51 or E65. (Only the no more available E60 – a normal monoblock smart phone like the E51 – had a better resolution: 352x416 pixel instead of 240x320 pixels.) And since I usually carry my mobile phone in my trouser pockets, width matters most. So I had the choice to either get a phone which is too big for my trouser pockets or one without a QWERTY keyboard. The I remembered those foldable external keyboards for PDAs. There are at least three different makers of foldable bluetooth keyboards said to be working with Nokia Symbian S60 3rd Edition phones, so a QWERTY keyboard on the phone itself was no more important. (Only passwords will need to be entered over the number keypad since I don’t want to broadcast them… ;-) The choice between E65 and E51 was made easier by their reviews (E65, E51) at Xonio: The E65 seems to have not that good standby and phoning times while the E51 seems to be quite good regarding endurance. I looked through the usual shops around Z¨rich HB: Swisscom Shop, MobileZone, Phonehouse: All had the same prices (about CHF 250 for a two years contract at CHF 25 per month), except that Phonehouse had no E51 available in the shop. Interestingly digitec had a much lower price (CHF 100 for the same contract) and the choice of color (the shops always only offered one color), so I ordered a black one there. Converting a prepaid card to a postpaid contract isn’t that easy I wanted to change from a prepaid card to a postpaid contract, both at Swisscom, so I already own a SIM card. But digitec only offers new contracts including a SIM card or contract renewals, but no switching to a contract with keeping the number. And a new SIM card costs CHF 40 extra in their online shop. So I called their hotline and asked. The answer was: I need a new SIM card since prepaid SIM cards can’t be converted to postpaid SIM cards (but can be used with different providers). When I came to the shop, the employee needed three tries to fill out the Swisscom form for the number migration and still did it wrong somehow. No postpaid contract acknowledgement from Swisscom after two workdays. So I called their hotline. They told me, the wrong SIM card number has been entered and I need to make digitec to enter the correct one. A few days later back at the shop they were overextended. After a while an internal e-mail was on the employee’s screen which clearly stated that in case of prepaid to postpaid conversions (and a few other cases) no new SIM card must be given out and if this happens too often for the same employee he will be charged the CHF 30 a new SIM card costs digitec… (So they have a 25% margin of every sold SIM card…) About one hour after they closed their doors (I was there about ten minutes before shop closing time) Swisscom had accepted the contract changes and I had a credit note of CHF 40 for the erroneously sold SIM card. And the mobile phone became even cheaper than in all the other shops. :-) New gadget, new features So after a week, I can say that in general I’m quite happy with the new phone. It has a nice web browser, an IMAP over SSL capable mail reader and a feed reader, it can connect to the internet via WLAN and the 240x320 resolution isn’t as bad as I expected. I already have a Symbian port of PuTTY on it and sshing into my workstation works fine, even if I currently only have the phone keyboard and T9 as input device and helper. I also have Opera and Opera Mini installed, but to my own surprise the included web browser from Nokia (said to be based on Apple’s HTML rendering engine WebKit which itself is based on KDE’s HTML rendering engine KHTML) is way better, especially in navigation, even although Opera Mini 4.1 caught up a little bit in comparison to Opera Mini 4.0. (Hey, and you hear that from a web browser fetishist and Opera fan!) The only thing which currently really bugs me on the builtin web browser is that even an enforced updating of my feeds sometimes just results in nothing. Maybe a firmware upgrade can help… As barcode reader, I have installed the i-nigma Reader. (The Quickmark QR Code Reader download just showed the content of something which seems to be a Windows DLL instead of downloading it. *plonk*) It’s amazing how fast the i-nigma Reader recognizes a 2D barcode from Semapedia on my laptop screen. Of course I also have ScummVM on my new Symbian phone. I will also play around with Amora which turns your Symbian S60 mobile phone into a remote control for your presentations on Linux (or any other unixoid operating system) running laptop as soon as I managed to get an amd64 Debian package of it. (Currently there seems only i386 packages and no source packages available, but this may be due to the “Show all downloads” link gives a server error…) Oh, and many thanks to foosel since I found Amora in her blog. BTW: Any recommendations for a free (preferably free as in DFSG) Jabber and/or IRC client for Symbian S60 3rd Edition? I already downloaded and installed Gizmo5, but somehow it refuses to work each time I try to create an Gizmo account. Accessories Since the E51 has no QWERTY keyboard, I ordered a Nokia SU-8W Foldable Bluetooth Keyboard at Brack. It was a little bit bigger and thicker than expected, but OTOH the metal case seems to be very stable and robust. Since this keyboard is designed to fit on Nokia mobile phones it also has the two Nokia typical soft keys and the middle select key. So nearly all phone functions can be used with the external keyboard, even turning off the phone’s key lock. Only locking the phone’s keys again doesn’t work via the external keyboard. Additionally I equipped my E51 with a 2GB microSD card. Probably a bluetooth headset for driving will come once, too. What the Nokia 6310i did better than the E51 There are a few things which are annoying regarding Nokia’s UI consistency over the years. That the backspace key is no more the right soft-key is ok. It took me only five tries to get my e-mail account setup without hitting the abort key (no “Do you really want to abort?” questions ;-) instead of backspace key. But what’s really annoying is that the menu navigation via number keys only works for the first level and no more for all levels. So no more “menu 4 4 4” to switch to manual network selection. It’s also annoying that you (or at least I ;-) can’t enter phone numbers as the recipient of SMS directly anymore, at least those SMS never reach their receipient neither do I get an error message. Same counts for the missing acoustic acknowledgment of locking the keypad. You only hear pressing the first key but not even the second key anymore. And if you press the volume keys on the side of the phone, you also have neither acoustic nor visual feedback if you pressed them hard enough so that the volume changed. The 6310i had visual and acoustic feedback. The alarm clock in the E51 seems to be artifically castrated: After having pressed the snooze button two or three times there is no more snooze button on the right the soft key anymore. With the 6310i you could press snooze as often as you want. Only disadvantage with the 6310i in regards of the alarm clock: the snooze time was much too long (10 minutes)… Oh, and what’s also annoying is that I can’t move over the whole addressbook of my 6310i in one piece but have to send each contact via bluetooth or infrared and then the E51 even get’s the contact names mixed up: ‘Beckert, Axel’ becomes ‘Firstname: “Beckert,” Lastname: “Axel”’… Great! I have to edit nearly all contacts manually… The cut and paste feature helps here, but it takes about one to two dozens of key clicks to copy the whole content of a filed into the clipboard… The E51 can run several applications at the same time and that you can switch between them any time. While that’s generally a nice feature I started using quite soon, it’s sometimes annoying that you have to wait up to a second or so after you’ve chosen some menu entry until you can do anything further. Also the screen often flickers while loading applications, showing them, then showing only the background, showing them again, etc. … but finally I already got used to the new mobile phone so much that I already have the feeling that my old 6310i became more thick since I have the E51. (Won’t think about how thick the about ten years old 6130 feels now compared to the slim E51… :-)

15 March 2008

Daniel Burrows: HOWTO convert your Blogger/BlogSpot blog to ikiwiki

Until recently, my blog was hosted on Google's free Blogger service. When I decided to move to my own server and ikiwiki, I didn't want to lose all my old posts. But exporting your blog from Blogger is a bit tricky. In fact, the Blogger page that provides instructions on how to do so starts off by saying:
Blogger does not have an export or download function.
Regardless of what they say, you can cajole Blogger into exporting text for use in other blog systems. Instructions for moving from Blogger to various pieces of software are available out there on the Web, but to switch to ikiwiki I had to tweak them a bit. Here's the procedure I used:
  1. Extract your information from Blogger's clutches and add minimal IkiWiki tags. As in the official Blogger instructions, change your template temporarily. However, instead of using the page template they suggest, use the following template, which you can find as a text file here.
    <Blogger>
    [[meta author="<$BlogItemAuthor$>"]]
    [[meta date="<$BlogItemDateTime$>"]]
    [[meta title="<$BlogItemSubject$>"]]
    <$BlogItemBody$>
    </Blogger>
    <BlogItemComments>
    Comment by <$BlogCommentAuthor$> at <$BlogCommentDateTime$>:
    <$BlogCommentBody$>
    </BlogItemComments>
    
    I recommend saving the file that's produced by this step even after you process it in the next step, in case you discover that you made a mistake.
  2. Split the extracted file into pieces. Exporting your blog using the template above will get you all your blog posts in reasonable Markdown format, with all dates and titles preserved. But they'll all be scrunched into one file. Blogspot also won't interpret paragraph breaks into blank lines, and it inserts strange empty <div> tags all over. So the next step is to split this file into pieces and clean up the HTML. Since I had over a hundred posts, I wrote a Python script to do this postprocessing for me. You can find it here. You can run it like this to output each blog post as a separate file in the current directory:
    /path/to/fixup-blogspot-export input-file
    
    This script makes a few assumptions about its input file:
    1. It assumes that the text [[meta author="NAME']] does not appear at the start of a line anywhere except the first line of a blog post. If you write about MarkDown syntax on your blog, you will run into problems.
    2. It makes a similar assumption about Ikiwiki's date meta.
    3. It assumes that line breaks are expressed using a variant of <br/>, and that <br/> never appears in the text of your blog.
    4. It assumes that the text Comment by does not appear at the start of a line in any post.
    5. It assumes, in general, that no Markdown or Ikiwiki commands appear in the blog text. If any do, you'll have to manually escape them, either before or after running the conversion script.
    All in all, it's probably a good idea to at least skim the output once.
  3. Create a top-level Ikiwiki page for your blog. The Ikiwiki site has instructions on doing this that are probably better than I could write. The most important thing is to use the created-after tag to limit your RSS feeds, so you don't spew new posts all over the planet (pun intended). For instance:
     [[inline pages="./blog/entry/*"
              feedpages="created_after(last_page_of_the_old_blog)"]]
    

11 February 2008

Julian Andres Klode: JAK LINUX website now powered by ikiwiki


I’m glad to announce that finally, after being powered by ftpsync for more than six months, the JAK LINUX website now uses ikiwiki. I currently have some small issues with the website: After using –rebuild, tarballs have a different modification time and are therefore reuploaded everytime, though the content is actually the same. I would also need a plugin to create directory indexes with sha1sums, but I haven’t found one yet. (If you know one, please let me know). If you have never heard of ikiwiki: ikiwiki is a wiki system used and developed by Debian Developer Joey Hess and many contributors. In contrast to ftpsync, a python script I wrote in 2007, it has an active upstream with multiple contributors, and supports multiple markup languages (e.g. Markdown). This switch to ikiwiki is also a switch back to the design used at mentors.debian.net, which had been replaced in December 2007 with a (CC-licensed) design created by styleshout.com. This template just looks better and has the better license (GPL-2). In the next days, I will cleanup and extend the website and the template and release both under the terms of the GNU GPL version 2. I will alsoI will also try to write a plugin for directory indexes, write a plugin to create directory indexes (although I have almost no experience with perl), and will release it under the GPL 2. Thank you, Joey and all contributors for creating this software.

2 February 2008

Adeodato Sim : Markdown links with newlines in the anchor text

Links in Markdown can be done in a couple ways. First, similarly to HTML links, where you place the link next to the anchor text, like this:
  I am a [Debian](http://www.debian.org) Developer.
Or, if you feel this clutters your paragraphs too much, you can choose an alternate syntax, which I prefer (particulary handy for very long links):
  I am a [Debian][] Developer. Bla bla bla...
    [debian]: http://www.debian.org
There is however a gotcha with this alternate syntax, namely, anchor text with spaces in them. This works fine:
  I study Computer Science in [this University][].
    [this University]: http://www.ua.es
But this does not:
  Some years ago, I started studying Computer Science in [this
  University][]. Bla bla bla...
    [this University]: http://www.ua.es
This actually happens quite a lot when formatting the paragraphs in the editor, which made this otherwise-pleasant syntax almost a no-go for me. (Well, to be honest you could use it like this, but still:
  Some years ago, I started studying Computer Science in [this
  University][uni]. Bla bla bla...
    [uni]: http://www.ua.es
)
There is a beta version of Markdown in experimental that almost fixes the problem. This version introduces a new but similar syntax for links: you can omit the second pair of empty brackets. And when using that newer syntax, there is code in the program to change newlines into a space when looking for the link definition. It is not applied to the code path of the old syntax, though, which is a pity. This is all explained in bug #459885, with a patch as well (that applies both to 1.0.1 and 1.0.2). You can find packages with that patch applied here.

25 December 2007

Adeodato Sim : Moving to ikiwiki

As many others, I’ve moved this blog to ikiwiki. In fact, I’ve moved my whole 3-page website to ikiwiki, and it only felt natural to migrate the blog as well (I may miss hobix’s webpage, though). Anyway, this gives me a bit more flexibility when creating the RSS feeds, so I’ve now created a separate feed for Planet Debian (which won’t have only Debian-related content, mind you), and left the old RSS URL to include all posts, e.g. some more personal ones, or some that I’d find unsuitable for the planet. If you’re interested, here is the full feed. I run ikiwiki in my laptop to generate static html, and rsync the generated output to the webserver. I have a Bazaar branch in my laptop as well, but it doesn’t interact with ikiwiki in any way. Finally, I’m very grateful that Joey committed this minutes after me mentioning on IRC, and I’m very grateful as well to whoever wrote the typography plugin. Migrating the old blog wasn’t hard, just tedious and boring, particularly since I didn’t want to keep using Textile, but migrate to Markdown. I switched off usedirs to keep old URLs working (I’d rather not mess with redirections), and used the date option of the meta plugin, so that the “Posted” information for old entries when inlining would be accurate. This still left the “Last modified” timestamp in the individual pages wrong, so I just used a script that would change the mtime of the entries in the filesystem to their creation time. One wart I’ve found is that I’m very used to having both a filename and a title for each entry, and have the filename just present in the navigation bar of the browser, and the title shown in big inside the page. You can do this in ikiwiki by using the title option of the meta plugin, and giving a H1 element in the entry content. However, this makes the H1 show in the RSS feed, which I had always noticed in Zack’s blog, and always found inconvenient. Oh well. It also makes for the same title to appear twice in the default [[inline]] page; to solve it, I just hide with CSS the H1 there — zack, e.g., does not use [[meta title]], and aligns the permalink to the right. Update: So I was washing the dishes and it struck me: maybe with a conditional! And, effectively, it is possible, given that there is a convenient included test. So now I start my entries with:
  [[meta title="This is the long title"]]
  [[if test="!included()"
       then="# This is the long title"]]
Yay! Update (2007-12-27): Lars does it differently, by only providing [[meta title]], and modifying the page template to include:
  <h1><TMPL_VAR TITLE></h1>
Update (2007-12-29): I finally decided, at least for now, that is cleaner not having the title duplicated in two lines, and went with a template. I didn’t want the <h1>title</h1> bit in all pages, though, and Joey pointed out that I could use a different template for blog entries using the pagetemplate_plugin.

29 November 2007

Daniel Burrows: Moved to ikiwiki

As of this posting, my blog has moved to an ikiwiki instance on my own server. I made this change for several reasons, with the primary ones being that
  • I can edit my posts offline in any editor I want. Since I often work offline, this is a huge advantage for me.
  • I can use revision control to manage the site.
  • The data that is valuable to me (i.e., my posts) is under my control and in a format that is easy to extract.
  • ikiwiki is also a nice tool for managing a Web site, so I can kill two birds with one stone (once I actually write a Web site, that is).
Obviously some of those could be acheived using blogspot, with a sufficiently complicated workflow, but ikiwiki makes this painless and natural. The major downsides seem to be:
  • ikiwiki doesn't support blog comments. For the time being, please email me with any comments on my blog posts and I'll post them myself. My email address is Daniel_Burrows@alumni.brown.edu.
  • The Emacs Markdown mode has some annoying flaws, such as not understanding Markdown lists.
I haven't set gitweb up yet, so there are no history links available. Once I feel confident that I understand the security implications of using gitweb, I'll see how to enable it.

25 April 2007

Marc 'Zugschlus' Haber: Automatic Wikification of Configuration Files

In the company I work for, most documentation is maintained in Word format. Except mine. I have a dokuwiki and am thankfully allowed this exception as I am the only Linuxer in the company. Since Windows systems need external documentation (being hindered by the absence of commentable text configuration files), there is a policy that all configuration data needs to be explicitly documented. I hate that idea, since documentation is always outdated, and documenting configuration changes doubles the work that needs to be done. After finding out that dokuwiki has a command line interface, I implemented a mechanism that can run from cron and keeps wiki pages of configuration files up to date on an automated basis. On the target systems (the ones that need to have their configuration documented), I installed a script which generates a tarball containing the relevant configuration files on standard output. For more sensitive data, the script could do some basic sanitazion such as removing passwords from the configuration files before putting them into the tarball. On the system running the cron job, the following script runs:
#!/bin/bash
set -e
set -C
set -u
JOBNAME=“update-wiki-firewall-config”
DWPAGE=“php4 /usr/share/dokuwiki/bin/dwpage.php”
TMPBASE=“/tmp”
SSHID=“$HOME/.ssh/$USER-passphraseless-$(hostname)”
REMOTEHOST=“remote.fqdn.example”
REMOTEJOB=“pull-netfilter-init-config-tar”
SHAREDIR=“$HOME/share/$JOBNAME”
WIKINAMESPACE=“pointer:to:namespace”
start=’/*BEGIN generated firewall rules */’
end=’/*END generated firewall rules */’
insert=’/*INSERT generated firewall rules */’
umask 077
if ! TMPDIR=“$(mktemp -d $TMPBASE/fwconfig.XXXXXXXXXX)”; then
        echo >&2 “ERR: cannot create temp dir in $TMPBASE”
        exit 1
fi
cd $TMPDIR
mkdir remote
ssh -i $SSHID root@$REMOTEHOST $REMOTEJOB   \
 tar --extract --gzip --file - --directory remote
mkdir workdir
touch workdir/rulelistfile
echo “$start” >> workdir/rulelistfile
for fwfile in $(find $TMPDIR/remote/rules/up -type f   sort); do
  MTIME=“$(stat --format=”%y“ $fwfile)”
  PROSEEXPLANATION="$( $fwfile sed -n '/^#::#/ s/^#::#[[:space:]]*//;p;q; ')"
  if [ -z "$PROSEEXPLANATION" ]; then
    PROSEEXPLANATION="netfilter-init internal code"
  fi
  rm -f workdir/newwikipage
   $SHAREDIR/wikipagetemplate \
    sed \
        -e "s PLHfilenamePLH $(basename $fwfile) " \
        -e "s PLHproseexplanationPLH $PROSEEXPLANATION " \
        -e "s PLHmtimePLH $MTIME " \
        -e "/PLHcontentsPLH/r$fwfile" \
        -e "s/PLHcontentsPLH//" \
  > workdir/newwikipage
  WIKIPAGENAME=“$WIKINAMESPACE:regeln:$(basename $fwfile .rul)”
  $DWPAGE checkout $WIKIPAGENAME workdir/wikipage
  if ! cmp --quiet workdir/wikipage workdir/newwikipage; then
    cp workdir/newwikipage workdir/wikipage
    $DWPAGE -m “new contents imported from $fwfile” commit workdir/wikipage $WIKIPAGENAME
  fi
  echo “  * [[$WIKIPAGENAME $(basename $fwfile)]] - $PROSEEXPLANATION” >> workdir/rulelistfile
done
echo “$end” >> workdir/rulelistfile
$DWPAGE checkout $WIKINAMESPACE workdir/contentspage.txt
 workdir/contentspage.txt \
  sed -e "\ ^$ start//\\*/\\* \$ ,\ ^$ end//\\*/\\* \$ d; "   \
  sed -e "\ ^$ insert//\\*/\\* \$ rworkdir/rulelistfile" \
  > workdir/newcontentspage.txt
if ! cmp --quiet workdir/contentspage.txt workdir/newcontentspage.txt; then
  cp workdir/newcontentspage.txt workdir/contentspage.txt
  $DWPAGE -m “new contents page” commit workdir/contentspage.txt $WIKINAMESPACE
fi
cd /
rm -rf “$TMPDIR”
Yes, this needs some more documentation and generalization. But it’s just a proof of concept that needs some polishing before being put into real life use. Here are the two template files for wiki page and contents page:
====== Firewallregeln PLHfilenamePLH ======
Last changed on target system: PLHmtimePLH
PLHproseexplanationPLH
<code>
PLHcontentsPLH
</code>
===== Dump of firewall rules =====
/*INSERT generated firewall rules */
/*BEGIN generated firewall rules */
/*END generated firewall rules */
The index page template relys on the HiddenComment dokuwiki plugin to be installed, or the placeholders show up in the rendered wiki page. The code uses the first comment line marked with #::# to generate a short explanation of the file being pulled into the wiki. dwpage.php is a fully-fledged command line interface to dokuwiki, committed new pages are fulled versioned as if entered through the wiki web front end. This way, the documentation in the wiki is guaranteed to be current and to fit the configuration found on the live system - it is directly pulled from the live system. Yes, rendering of the code is currently suboptimal. Working on it.

18 January 2007

MJ Ray: sxw2text en python

I wrote sxw2text as a 5-minute email-helper hack some years ago. Now I notice that there's also a version of sxw2txt in python on a French site, but it doesn't seem to do any checking at all, not even the minimal bit of my script. Update: following more links, I found odt2txt.py which outputs markdown and is probably a better choice if you have python installed.

14 January 2007

David Welton: Stuff To Do updates

After two weeks of being operational, Stuff To Do has been a big success at work, because it lets people keep track of what they're doing with a minimum of hassle. Truth be told, I've never been that wild about "productivity" software, but I'm pretty happy with the system I've created. I really have attempted to make something that stays out of your way as much as possible. That has involved making some choices - for instance, instead of buttons to start or stop time tracking for a given task, Stuff To Do [aside: it would be much faster to write 'STD', but I think that might not be such a good idea in terms of marketing] uses some javascript to see if you've moused over (or blurred, or typed, or done anything, basically) to the window where it lives in the last 15 minutes. This will certainly reduce the accuracy a little bit, and if you get 'in the zone' and don't hit the browser for a while, it won't count your time, but all things considered, this is better than having to hit a stupid button every time you do anything, because you will invariably forget to hit the button, and leave it going overnight, and then have to go back and manually edit everything, and.... yuck. I also have some ideas about how to further improve the javascript in order to make it even easier to track whether you're active or not (with your consent, of course!). In any case, I've fixed up a number of small bugs, and added a few new features: Some other things I'm considering for the near future: In the process, I also happened upon Active Merchant, which is some cool code by the fine folks at jadedpixel.com, which was quite handy for integrating Paypal. Being somewhat of a perfectionist, I found a few things that I wanted to do just slightly differently, and sent in a patch.

Next.

Previous.