debian tips/ tips/ Installing IkiWiki from source
.........................

ikiwiki is still young, and so you may need to get hacking to get it to work.

The ikiwiki setup page is a good start.

Make sure you have all of the perl modules installed to save you some cryptic error messages later.

It is a good idea to use the ikiwiki.setup file, but name it something different and do not place it in svn (or whatever). Also do not put it under the source directory of your wiki, as it will then be viewable by anybody.

I was a little unsure with the instructions for using cgi, but you simply uncomment the cgi section in the example file, and then run ikiwiki --setup, which will generate the script for you. It really is that simple.

I had to hack a few things to get ikiwiki to install and work. Firstly with perl 5.8.3 there is a bug in taint mode that stops it compiling. This appears to be fixed in 5.8.8. It can be worked around by making the "pagespec_match" of IkiWiki.pm function read:

    sub pagespec_match ($$) { #{{{
      my $page=shift;
      my $spec=shift;

      my $pagespec = pagespec_translate($spec);
      my $newpagespec;
      local($1);
      if ($pagespec =~ /(.*)/) {
        $newpagespec = $1;
      } else {
        die "oh";
      }

      return eval $newpagespec;
    } #}}}

I also had to change the two occurences of "Markdown" to "Text::Markdown" in IkiWiki/Plugin/mdwn.pm

To use the search plugin you may need to edit line 105 of IkiWiki/Plugin/search.pm to point to where estseek.cgi is on your system.

To get RecentChanges link to work i had to change (line 38 of IkiWiki/Rcs/svn.pm) from

    my $info=`LANG=C svn info $file`;

to

    my $info=`svn info $file`;

I'm not sure why though.

I also had errors in my error_log saying "could not access /home/user/.subversion" or similar. This was fixed by using

    svn $svn_limit --xml -v log '$svn_url' --config-dir /tmp

on line 145 of IkiWiki/Rcs/svn.pm.