]> sipb.mit.edu Git - ikiwiki.git/blob - doc/patchqueue/pm_filter-priority.mdwn
16705e33e6a8290e0311f1cd973a5a2432744b14
[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 ===================================================================
6 --- Makefile.PL (revision 2682)
7 +++ Makefile.PL (working copy)
8 @@ -23,8 +23,10 @@
9         fi \\
10  )
11  
12 -extra_build:
13 -       LANG=C ./ikiwiki.in doc html --templatedir=templates \
14 +extra_build:
15 +       ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out
16 +       chmod +x ikiwiki.out
17 +       LANG=C ./ikiwiki.out doc html --templatedir=templates \
18                 --underlaydir=basewiki \
19                 --wikiname="ikiwiki" --verbose --no-rcs \
20                 --exclude=/discussion --no-discussion --userdir=users \
21 @@ -32,7 +34,6 @@
22                 --plugin=haiku --plugin=polygen --plugin=fortune
23         ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
24         ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man
25 -       ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out
26         $(MAKE) -C po
27  
28  extra_clean:
29 </pre>
30
31 > It was failing before because taint mode was enabled, so it didn't see your PERL5LIB setting. 
32 > Your patch is ok, except that needs to set PERL5LIB=. before calling
33 > ikiwiki.out, so that it builds using the libs in the source tree, not
34 > whatever old ikiwiki libs might already be installed. And if it has to
35 > set PERL5LIB=. , well, that makes any PERL5LIB setting you might have in
36 > your environment a no-op. Unless it sets `PERL5LIB=.:$PERL5LIB` or
37 > something. --[[Joey]]
38
39 (Is there any reason to create `ikiwiki.out`? Couldn't we just do an in-place replace on `ikiwiki.in`?)
40
41 > Yes, it's there because "ikwiki" == "Ikiwiki" on Mac OS X. Also because 
42 > I don't like automatically modifying source files I have in svn. --[[Joey]]
43
44 So, to install from the trunk I can say:
45
46     svn co svn://ikiwiki.kitenet.net/ikiwiki/trunk ikiwiki 
47     cd ikiwiki
48     patch -p0 <../patches/pm_filter_priority.patch #IOW, apply this patch
49     perl Makefile.PL PREFIX=~ LIB=~/lib
50     make
51     NOTAINT=1 make install
52     perl -p -i.bak -e 's{^(use IkiWiki;)}{use lib "$ENV{HOME}/lib";\n$1}' ~/bin/ikiwiki
53
54 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.
55
56 > Hmm, the Makefile is supposed to figure out when ikiwiki is installed to
57 > a location outside of perl's regular lib dirs, and if so, shove its own
58 > "use lib" setting in, to make it find the ikiwiki libs. Is this not working
59 > for you? Maybe that `LIB=~/lib` is defeating it? Not familiar with that
60 > variable.
61 > --[[Joey]]