aboutsummaryrefslogtreecommitdiff
path: root/doc/patchqueue/various_fixes.mdwn
blob: 9ffd17b30427a3d17d459b47ab7d021c3a353909 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Sorry if you don't appreciate me lumping all of these patches together.

These are various fixes I had to make when installing Ikiwiki. Some are
due it being a non-Debian system, the others are actual bugs.

    --- upstream/IkiWiki/Rcs/svn.pm 2006-09-16 01:11:55.000000000 +0100
    +++ main/IkiWiki/Rcs/svn.pm     2006-09-16 01:12:50.000000000 +0100
    @@ -34,7 +34,7 @@
            my $field=shift;
            my $file=shift;
    
    -       my $info=`LANG=C svn info $file`;
    +       my $info=`svn info $file`;
            my ($ret)=$info=~/^$field: (.*)$/m;
            return $ret;
     } #}}}
    @@ -140,7 +140,7 @@
                    if $svn_version =~ /\d\.(\d)\.\d/ && $1 >= 2;
    
            my $svn_url=svn_info("URL", $config{srcdir});
    -       my $xml = XMLin(scalar `svn $svn_limit --xml -v log '$svn_url'`,
    +       my $xml = XMLin(scalar `svn $svn_limit --xml -v log '$svn_url' --config-dir /tmp`,
                    ForceArray => [ 'logentry', 'path' ],
                    GroupTags => { paths => 'path' },
                    KeyAttr => { path => 'content' },

The first hunk of this patch is strange. It just failed to work with this
in place, and it took me a long time to figure it out. I realise what you
are trying to do, and it still works here as I use a similar LANG anyway.

For reference svn version 1.3.1 (r19032), my $LANG=en_GB.utf8, but I'm not 
sure what the CGI was running under. 

The second removes problems with cannot access /home/$user/.svnsomething in
the logs. I think this problem was also fatal (I should have reported these
sooner). 

I can try and debug these problems if you could suggest some way to do so, 
but I am probably losing the server in a couple of days, so I can't be of too
much help I'm afraid.

    --- IkiWiki/Plugin/search.pm
    +++ IkiWiki/Plugin/search.pm
    @@ -99,7 +99,7 @@
            close TEMPLATE;
            $cgi="$estdir/".IkiWiki::basename($config{cgiurl});
            unlink($cgi);
    -       symlink("/usr/lib/estraier/estseek.cgi", $cgi) ||
    +       symlink("/usr/local/libexec/estseek.cgi", $cgi) ||
                    error("symlink $cgi: $!");
     } # }}}

obviously I'm not asking you to include this patch, but it would
be good if this sort of thing was configurable (at build time?). I can
have a go if you like, but I'm not sure what would be acceptable to
you.

    --- IkiWiki.pm
    +++ IkiWiki.pm
    @@ -734,7 +734,18 @@
            my $page=shift;
            my $spec=shift;
    
    -       return eval pagespec_translate($spec);
    +        my $pagespec = pagespec_translate($spec);
    +
    +        my $newpagespec;
    +
    +       local($1);
    +       if ($pagespec =~ /(.*)/) {
    +               $newpagespec = $1;
    +       } else {
    +               die "oh";
    +       }
    +
    +       return eval $newpagespec;
     } #}}}
    
     sub match_glob ($$) { #{{{

This works around a silly, but extremely annoying, taint bug in older
versions of perl. I'm not sure of the details, but it means that either
values become tainted from nowhere, or they don't get untainted possibly.
This also affects backports to sarge. `"oh"` is not going to be very 
informative if that code path is ever taken, but I hope that it never is.

As for backports there is a problem with the sarge version of libcgi-session-perl
and my sslcookie patch (complaints about a missing include file auto/CGI/Session/cookie.al IIRC).
This file does not and has not ever existed, but it appears to be fixed in 
the backport of libcgi-session-perl that I did. That puts the dependency
required at somewhere between 3.95-2 and 4.14-1. This could then be added
to debian/control. It would mean one more package to backport, but stops the
bug if anyone actually uses my sslcookie option except me.

As for backports I managed with 

 * ikiwiki_1.26
 * libcgi-formbuilder-perl_3.03.01-1
 * libcgi-session-perl_4.14-1

backported to sarge, with bpo in sources.list. This only covers Depends: though,
for instance hyperestraier needs to be backported, which I haven't got
round to yet as there is a chain to do.