Le weblog entièrement nu

Roland, entièrement nu... de temps en temps.

Archives 2006-07

Migrated to Ikiwiki

I finally took some time to migrate my blog from a (very old) Wordpress to a fairly new Ikiwiki. As I write these lines, the version of Ikiwiki I'm using isn't even released, and it includes two patches made by yours truly (and submitted upstream, of course, as bugs #380680 and #380743), allowing the creation of monthly archives and the possibility of making these archives RSS-less (it doesn't make much sense to have an RSS feed for something that's supposed to be static).

The whole blog is now static, since I haven't investigated the comments system. I will probably enable the comments eventually, and I will of course migrate the existing ones (much like I migrated the existing articles, with a combination of a Perl script and some hand-tuning). In the meantime, I'll enjoy a spamless blog.

The other regression is the lack of a search facility, but from what I can see it was hardly ever used anyway.

Note to readers: old URLs should still work (thanks to Apache's magic mod_rewrite), but please update your bookmarks and feed readers and agregators and so on to use the new ones, since I'll probably disable URLs at some point.

Update: I also hacked a new plugin, linkbar.pm, which appends a static Markdown string to all *.mdwn pages before they are rendered. So you should now see the lovely navigation menu on all pages, including the article pages.

Tags:
Posted Tue 01 Aug 2006 00:00:00 CEST
Adieu Wordpress, bonjour Ikiwiki

Je viens de changer mon logiciel de gestion de blog ; de Wordpress, je suis passé à Ikiwiki. J'ai fait ce que j'ai pu pour que l'interface reste similaire, mais les commentaires sont pour l'instant désactivés. Les anciennes URLs doivent continuer à fonctionner, mais ce n'est pas une garantie, donc prenez soin de mettre à jour vos signets et vos configurations d'agrégateurs de flux.

Tags:
Posted Tue 01 Aug 2006 00:00:00 CEST
Gforge in Debian, July 2006

Following about a month of irregular activity, I just uploaded three source packages (along with related binary packages, of course) to Debian unstable: gforge (4.5.14-9), gforge-plugin-scmcvs (4.5.14-3), and gforge-plugin-scmsvn (4.5.14-2). I hope unstable will give them more exposure than experimental did. Plans for the future: I’ll focus on getting these packages into testing, without too many changes if possible. I haven’t managed to get dbconfig-common to work reliably (or at all) with PostgreSQL so far, so I’ll consider the migration to its infrastructure as a nice option, but not a blocker. The problem is that it would make the install scripts simpler and (hopefully) more reliable if it worked. Again, help would be very much appreciated. (And yes, I will be submitting bug reports when I get some time to do some more thorough testing of dbconfig-common.)

Tags:
Posted Sat 22 Jul 2006 00:00:00 CEST
File set split utility, or the backpack problem

Joey Hess is looking for a tool that allows him to split sets of files across subsets with a known maximal size, for archival on DVD. That sounds a bit like what my ~/bin/prepare-gallery-backups.pl script does. Actually, my script doesn't operate on a per-file granularity, but per-directory (think photo gallery albums), but I suppose it would be rather simple to adapt. Also, there's no guarantee of optimality, and it may well be that you'll end up with a few subsets more than what is strictly needed. I'm not trying to solve the notoriously hard "backpack problem", just looking for a "good enough for me" solution. Now if Joey wants to recode that properly and add it to moreutils, I'll be a happy man.

I was about to paste just the relevant excerpt of my script, but since only a few lines would have been omitted, I figured what the hell. Here's the whole script, licensed under a "send me a lot of money if you like, otherwise do what you want" license.

#! /usr/bin/perl

use File::Find ;

$maxsize = 700000 ;
$remote_dir = "/srv/www/gallery.placard.fr.eu.org" ;
$rsync_dir = "/space/backups/gallery-backup/rsync/" ;
$albumsdir = "/space/backups/gallery-backup/rsync/gallery.placard.fr.eu.org/albums" ;
$backupdir = "/space/backups/gallery-backup/backups" ;

# system "rsync -avL --rsh=ssh --delete clodomir:$remote_dir $rsync_dir" ;
system "rsync -avL --rsh=ssh --delete mirobole:$remote_dir $rsync_dir" ;

if ( (defined $ARGV[0])
   && ($ARGV[0] eq "--make-isos") ) {

  File::Find::find({wanted => \&wanted, follow => 1}, $albumsdir);
    for $i (@alist) {
  $fname = $i ;
  $fname =~ s,.*/,, ;
  $du = qx/du -hk $i/ ;
  $size = $du ;
  $size =~ s,\s.*,, ;
  $albums{$fname}{size} = $size ;
  $albums{$fname}{path} = $i ;
    }

    foreach $album (sort {$albums{$b}{size} <=> $albums{$a}{size}} keys %albums) {
  $size = $albums{$album}{size} ;
  $name = $album ;
  $name =~ s,.*/,,;
  if($cur + $size > $maxsize) {
      my @bplist = @curlist ;
      my %entry = ('list' => \@bplist,
           'size' => $cur) ;
      push @backpacks, \%entry ;
      $cur = 0 ;
      @curlist = () ;
  }
  $cur += $size ;
  push @curlist, $name ;
    }
    my @bplist = @curlist ;
    my %entry = ('list' => \@bplist,
       'size' => $cur) ;
    push @backpacks, \%entry ;

    $i = 1 ;
    foreach $bp (@backpacks) {
  print "Backpack $i (size $bp->{size}) :\n" ;
  $bpdir = $backupdir . "/backup-$i" ;
  system "mkdir -p $bpdir" ;
  foreach $n (@{$bp->{list}}) {
      print "\t$n\n" ;
      system "cp -a $albumsdir/$n $bpdir/" ;
  }
  system "mkisofs -quiet -r -o $backupdir/backup-$i.iso $bpdir" ;
  system "rm -rf $bpdir" ;
  $i++ ;
    }
}


sub wanted {
  my ($dev,$ino,$mode,$nlink,$uid,$gid);

  (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) ;
  # print "$File::Find::name ; $File::Find::dir\n" ;

  if ((-f $File::Find::name) && ($File::Find::dir eq $albumsdir)) {
      # print "Keeping file $File::Find::name\n" ;
      push @alist, "$File::Find::name" ;
  }
  if ((-d $File::Find::name) && ($File::Find::dir eq $albumsdir)
    && ($File::Find::name ne $albumsdir)) {
      # print "Keeping dir $File::Find::name\n" ;
      push @alist, "$File::Find::name" ;
  }
}
Tags:
Posted Tue 11 Jul 2006 00:00:00 CEST
Un autre livre sur Debian

Pour ceux à qui le Cahier de l'Admin Debian ne suffit pas, ceux qui veulent un ouvrage plus gros et plus complet, qui va plus loin dans les détails, j'ai une bonne nouvelle. En effet, le livre « Debian, Administration et configuration avancée » de Martin Krafft, sort ces jours-ci chez Eyrolles. Sauf que comme Martin l'a initialement écrit en anglais, Raphaël Hertzog et moi-même l'avons traduit en français (et je peux donc vous assurer que c'est un bon bouquin). Nous en avons profité pour le mettre à jour par endroits (notamment pour signaler quelques différences significatives entre la version Sarge de Debian, décrite par le livre original, et ce qui deviendra la version Etch d'ici la fin de l'année).

J'ai reçu mes exemplaires personnels ce matin (et à 1350 g par exemplaire, ça fait son poids), donc ça devrait pas tarder à arriver chez les libraires.

Tags:
Posted Tue 11 Jul 2006 00:00:00 CEST
Creative Commons License Sauf indication contraire, le contenu de ce site est mis à disposition sous un contrat Creative Commons.