1 I'm using Ikiwiki on a box where I don't have root access, so I install all of my Perl modules in `~/lib`. The `ikiwiki.in` script is ran in Taint mode, which means that it ignores the contents of `$ENV{PERL5LIB}`. The result is that the current versions of the pre-requisite modules I've installed in `~/lib` are ignored by `./make`, which uses the outdated, and therefore incompatible versions, from the system-wide `@INC`... ;-)
3 I imagine that there's a clean and elegant solution to this, but the hack I'm currently using is to have `./make` alter `ikiwki.in` before it's run, by inserting `use lib ...` lines for each of the directories in `$ENV{PERL5LIB}`. Again, this is clearly ugly, but it allows me to run `./make`, so I'm submitting it FWIW.
5 > I don't like this patch because it's not expected that an environment
6 > variable will stick around outside the shell that it's set in. It could
7 > lead to suprising behavior if PERL5LIB happened to be set during build,
8 > and it's even possible for it to lead to security issues, imagine if I
9 > accidentially built the debian package of ikiwiki with PERL5LIB set --
10 > then it would be hardcoded to look in /home/joey for libraries, which
11 > someone with a "joey" account elsewhere could use to exploit it.
13 > You could remove the taint switch locally, it's very unlikely to find
14 > tainting problems that nobody else has noticed. --[[Joey]]
16 >> I completely understand rejecting this patch, but would you accept one to automate the removal of -T as a `make` option, then? I was trying to install Ikiwiki on a very popular
17 >> web host, and the aforementioned issue took quite a while to debug; I imagine many people would have simply given up. -- Ben
19 >>> Well, the problem with an option is finding the option before you give
20 >>> up. Maybe an option and adding some docs to the [[setup]] or [[tips]] page
21 >>> about how to use ikiwiki with $BIG_HOSTING_PROVIDER, that can mention
22 >>> the option. --[[Joey]]
24 >>>> I was going to write a guide for shared hosting setup anyway, so that sounds great. My `make`-fu is weak, so I don't know the Right Way to add an extra option, but here's a patch for removing the -T flag. -- Ben
28 ===================================================================
29 --- pm_filter (revision 2644)
30 +++ pm_filter (working copy)
38 if (/INSTALLDIR_AUTOREPLACE/) {
41 $_="use lib '$libdir';\n";
44 +elsif ($. == 1 && $notaint && m{^(#!/usr/bin/perl) -T$}) {