]> sipb.mit.edu Git - ikiwiki.git/blob - doc/patchqueue/pm_filter-priority.mdwn
web commit by http://id.inelegant.org/
[ikiwiki.git] / doc / patchqueue / pm_filter-priority.mdwn
1 Thanks to [r2677](http://ikiwiki.info/cgi-bin/viewvc.cgi/trunk/pm_filter?revision=2677&root=ikiwiki&view=markup), we're closer to getting clean installs on shared hosts. 
2
3 The main problem is that `pm_filter` runs after `./ikiwiki.in`, so the build still fails. If it runs before, we're fine.
4
5 <pre>
6 ===================================================================
7 --- Makefile.PL (revision 2682)
8 +++ Makefile.PL (working copy)
9 @@ -23,8 +23,10 @@
10         fi \\
11  )
12  
13 -extra_build:
14 -       LANG=C ./ikiwiki.in doc html --templatedir=templates \
15 +extra_build:
16 +       ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out
17 +       chmod +x ikiwiki.out
18 +       LANG=C ./ikiwiki.out doc html --templatedir=templates \
19                 --underlaydir=basewiki \
20                 --wikiname="ikiwiki" --verbose --no-rcs \
21                 --exclude=/discussion --no-discussion --userdir=users \
22 @@ -32,7 +34,6 @@
23                 --plugin=haiku --plugin=polygen --plugin=fortune
24         ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
25         ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man
26 -       ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out
27         $(MAKE) -C po
28  
29  extra_clean:
30 </pre>
31
32 > It was failing before because taint mode was enabled, so it didn't see your PERL5LIB setting. 
33 > Your patch is ok, except that needs to set PERL5LIB=. before calling
34 > ikiwiki.out, so that it builds using the libs in the source tree, not
35 > whatever old ikiwiki libs might already be installed. And if it has to
36 > set PERL5LIB=. , well, that makes any PERL5LIB setting you might have in
37 > your environment a no-op. Unless it sets `PERL5LIB=.:$PERL5LIB` or
38 > something. --[[Joey]]
39
40 >> Heh, I guess it's obvious that I don't normally do packaging/build stuff -- probably best if I stop with these kind of patches. :-) OK, why not try the latter then? I think this is a worthy goal, because if we can make it easy to install on shared hosts, it will reach far more people, IMO.
41
42 (Is there any reason to create `ikiwiki.out`? Couldn't we just do an in-place replace on `ikiwiki.in`?)
43
44 > Yes, it's there because "ikwiki" == "Ikiwiki" on Mac OS X. Also because 
45 > I don't like automatically modifying source files I have in svn. --[[Joey]]
46
47 So, to install from the trunk I can say:
48
49     svn co svn://ikiwiki.kitenet.net/ikiwiki/trunk ikiwiki 
50     cd ikiwiki
51     patch -p0 <../patches/pm_filter_priority.patch #IOW, apply this patch
52     perl Makefile.PL PREFIX=~ LIB=~/lib
53     make
54     NOTAINT=1 make install
55     perl -p -i.bak -e 's{^(use IkiWiki;)}{use lib "$ENV{HOME}/lib";\n$1}' ~/bin/ikiwiki
56
57 The last line is necessary for the CGI, because, as with most shared hosts, the user's environment is ignored by the server . It's ugly, but ATM I can't think of a clean way to get rid of it.
58
59 > Hmm, the Makefile is supposed to figure out when ikiwiki is installed to
60 > a location outside of perl's regular lib dirs, and if so, shove its own
61 > "use lib" setting in, to make it find the ikiwiki libs. Is this not working
62 > for you? Maybe that `LIB=~/lib` is defeating it? Not familiar with that
63 > variable.
64 > --[[Joey]]
65
66 >> You're completely right; without the LIB argument the `Makefile.PL` heuristics work perfectly. I think I was juggling too many patches at once. ;-)