aboutsummaryrefslogtreecommitdiff
path: root/doc/forum/PERL5LIB__44___wrappers_and_homedir_install.mdwn
blob: a140b3718823ece4b410b9b6204740f2a10dbf6c (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
What is the way to tell wrappers that PERL5LIB should include ~/bin directories?

Having this in the wiki.setup doesn't help anymore:

        # environment variables
        ENV => {
          PATH => '/home/user/bin/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/user/ikiwiki/usr/bin/:/home/user/ikiwiki/usr/sbin/:/home/user/bin/bin/:~/bin/bin/',
          PERL5LIB => '/home/user/bin/share/perl/5.10.0:/home/user/bin/lib/perl/5.10.0'
        },

Or at least I get CGI errors and running ikiwiki.cgi manually fails too:

        Use of uninitialized value $tainted in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 233.
        Argument "" isn't numeric in umask at /usr/share/perl5/IkiWiki.pm line 139.
        Undefined subroutine &IkiWiki::cgierror called at /home/user/bin/bin/ikiwiki line 199.

Server has an older ikiwiki installed but I'd like to use a newer version from git, and I don't have root access.

> You can't set `PERL5LIB` in `ENV` in a setup file, because ikiwiki is already
> running before it reads that, and so it has little effect.
>> That's [fixed now](http://source.ikiwiki.branchable.com/?p=source.git;a=commitdiff;h=9d928bd69496648cd7a2d4542a2d533992c01757;hp=f574bc2ed470b60f576a2906998bc7c129f2f983)
>> for anything invoked through the generated wrappers: they put all the setup `ENV`
>> values into the real environment before starting Perl. (When running `ikiwiki` at the
>> command line, `PERL5LIB` just has to be in the environment, as it would normally be.)
>
> Your error
> messages do look like a new bin/ikiwiki is using an old version of
> `IkiWiki.pm`.
> 
> The thing to do is set `INSTALL_BASE` when you're installing ikiwiki from
> source. Like so:

        cd ikiwiki
        perl Makefile.PL INSTALL_BASE=$HOME PREFIX=
        make install

> Then `$HOME/bin/ikiwiki` will have hardcoded into it to look
> for ikiwiki's perl modules in `$HOME/lib/perl5/`
> (This is documented in the README file by the way.) --[[Joey]] 

>> Ok, *perl Makefile.PL INSTALL_BASE=$HOME/bin PREFIX=* finally did it for me. I tried too many things with
>> these paths so I wasn't sure which actually worked. After that I did 
>> *$ ikiwiki --setup www.setup --wrappers --rebuild*. Somehow in this update mess I seem to have lost the user
>> accounts, maybe the --rebuild was too much.