]> sipb.mit.edu Git - ikiwiki.git/blob - doc/patchqueue/various_fixes.mdwn
9ffd17b30427a3d17d459b47ab7d021c3a353909
[ikiwiki.git] / doc / patchqueue / various_fixes.mdwn
1 Sorry if you don't appreciate me lumping all of these patches together.
2
3 These are various fixes I had to make when installing Ikiwiki. Some are
4 due it being a non-Debian system, the others are actual bugs.
5
6     --- upstream/IkiWiki/Rcs/svn.pm 2006-09-16 01:11:55.000000000 +0100
7     +++ main/IkiWiki/Rcs/svn.pm     2006-09-16 01:12:50.000000000 +0100
8     @@ -34,7 +34,7 @@
9             my $field=shift;
10             my $file=shift;
11     
12     -       my $info=`LANG=C svn info $file`;
13     +       my $info=`svn info $file`;
14             my ($ret)=$info=~/^$field: (.*)$/m;
15             return $ret;
16      } #}}}
17     @@ -140,7 +140,7 @@
18                     if $svn_version =~ /\d\.(\d)\.\d/ && $1 >= 2;
19     
20             my $svn_url=svn_info("URL", $config{srcdir});
21     -       my $xml = XMLin(scalar `svn $svn_limit --xml -v log '$svn_url'`,
22     +       my $xml = XMLin(scalar `svn $svn_limit --xml -v log '$svn_url' --config-dir /tmp`,
23                     ForceArray => [ 'logentry', 'path' ],
24                     GroupTags => { paths => 'path' },
25                     KeyAttr => { path => 'content' },
26
27 The first hunk of this patch is strange. It just failed to work with this
28 in place, and it took me a long time to figure it out. I realise what you
29 are trying to do, and it still works here as I use a similar LANG anyway.
30
31 For reference svn version 1.3.1 (r19032), my $LANG=en_GB.utf8, but I'm not 
32 sure what the CGI was running under. 
33
34 The second removes problems with cannot access /home/$user/.svnsomething in
35 the logs. I think this problem was also fatal (I should have reported these
36 sooner). 
37
38 I can try and debug these problems if you could suggest some way to do so, 
39 but I am probably losing the server in a couple of days, so I can't be of too
40 much help I'm afraid.
41
42     --- IkiWiki/Plugin/search.pm
43     +++ IkiWiki/Plugin/search.pm
44     @@ -99,7 +99,7 @@
45             close TEMPLATE;
46             $cgi="$estdir/".IkiWiki::basename($config{cgiurl});
47             unlink($cgi);
48     -       symlink("/usr/lib/estraier/estseek.cgi", $cgi) ||
49     +       symlink("/usr/local/libexec/estseek.cgi", $cgi) ||
50                     error("symlink $cgi: $!");
51      } # }}}
52
53 obviously I'm not asking you to include this patch, but it would
54 be good if this sort of thing was configurable (at build time?). I can
55 have a go if you like, but I'm not sure what would be acceptable to
56 you.
57
58     --- IkiWiki.pm
59     +++ IkiWiki.pm
60     @@ -734,7 +734,18 @@
61             my $page=shift;
62             my $spec=shift;
63     
64     -       return eval pagespec_translate($spec);
65     +        my $pagespec = pagespec_translate($spec);
66     +
67     +        my $newpagespec;
68     +
69     +       local($1);
70     +       if ($pagespec =~ /(.*)/) {
71     +               $newpagespec = $1;
72     +       } else {
73     +               die "oh";
74     +       }
75     +
76     +       return eval $newpagespec;
77      } #}}}
78     
79      sub match_glob ($$) { #{{{
80
81 This works around a silly, but extremely annoying, taint bug in older
82 versions of perl. I'm not sure of the details, but it means that either
83 values become tainted from nowhere, or they don't get untainted possibly.
84 This also affects backports to sarge. `"oh"` is not going to be very 
85 informative if that code path is ever taken, but I hope that it never is.
86
87 As for backports there is a problem with the sarge version of libcgi-session-perl
88 and my sslcookie patch (complaints about a missing include file auto/CGI/Session/cookie.al IIRC).
89 This file does not and has not ever existed, but it appears to be fixed in 
90 the backport of libcgi-session-perl that I did. That puts the dependency
91 required at somewhere between 3.95-2 and 4.14-1. This could then be added
92 to debian/control. It would mean one more package to backport, but stops the
93 bug if anyone actually uses my sslcookie option except me.
94
95 As for backports I managed with 
96
97  * ikiwiki_1.26
98  * libcgi-formbuilder-perl_3.03.01-1
99  * libcgi-session-perl_4.14-1
100
101 backported to sarge, with bpo in sources.list. This only covers Depends: though,
102 for instance hyperestraier needs to be backported, which I haven't got
103 round to yet as there is a chain to do.
104