]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/taint_and_-T.mdwn
(no commit message)
[ikiwiki.git] / doc / bugs / taint_and_-T.mdwn
1 By default, tflag is not defined. But ikiwiki.in has -T causing build failure:
2
3 perl -Iblib/lib   ikiwiki.out -libdir . -setup docwiki.setup -refresh
4 "-T" is on the #! line, it must also be used on the command line at ikiwiki.out
5 line 1.
6
7 > pm_filter removes the -T from ikiwiki.in when generating ikiwiki.out
8 > unless NOTAINT=0 is set. I cannot reproduce your problem. --[[Joey]]
9
10 >> Thanks. Now I see. NetBSD and DragonFly and several other systems don't have /usr/bin/perl so that path is replaced in the sh-bang lines of various scripts. So it doesn't match in the pm_filter expression. Can you please consider providing a variable or not matching on that assumed path to perl.
11
12     --- pm_filter.orig      2008-04-28 07:59:58 -0700
13     +++ pm_filter   2008-04-28 08:01:21 -0700
14     @@ -20,6 +20,6 @@
15                     $_="use lib '$libdir';\n";
16             }
17      }
18     -elsif ($. == 1 && ($ENV{NOTAINT} || ! exists $ENV{NOTAINT}) && m{^(#!/usr/bin/perl) -T$}) {
19     +elsif ($. == 1 && ($ENV{NOTAINT} || ! exists $ENV{NOTAINT}) && m{^(#!.*) -T$}) {
20             $_=qq{$1\n};
21      }
22
23 >> --[[JeremyReed]]
24
25 >> I could look for "#!.*perl -T", if that would work. #!.*-T is perhaps
26 >> over-broad. --[[Joey]]
27
28 >>> Yes, being more precise should be fine. Note that some may have bin/perl5 or bin/perl5.8.8 for example, so please consider optional number, like ^(#!/.*/perl[0-9]*.*) -T$ or something like that.
29
30 [[done]]