[rt-users] Problem installing RTFM 2.2.0RC5

Mike Friedman mikef at ack.berkeley.edu
Mon Jul 16 23:46:43 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 16 Jul 2007 at 13:49 (-0400), Jesse Vincent wrote:

>> It turns out that the Makefile generated by Makefile.PL didn't include 
>> my ../local/lib in the 'initdb' target definition.  So, I edited the 
>> Makefile manually (which I know you're not supposed to do, but I can't 
>> figure out how to correct Makefile.PL), to insert
>
> Out of curiosity, why do you need your local lib dir included for RTIR's 
> initialization script?

Jesse,

I can't say I understand it completely, but I figure it's because I have a 
local mod to RT.pm and it seems that when my local/lib isn't present, the 
'make initdb' has trouble finding some things.  I say 'some things', 
because I'm not exactly sure what the symptoms actually mean:

1.  One error message said RT_SiteConfig.pm couldn't be loaded (and it did 
mention the correct path to to that file and the correct userid/groupid):

    Couldn't load RT config file /users/ist-rt/RT/rt/ist-rt/etc/RT_SiteConfig.pm
    as user ist-rt / group ist-rt.  The file is owned by user ist-rt and group
    ist-rt.  This usually means that the user/group your webserver is running as
    cannot read the file.  Be careful not to make the permissions on this file
    too liberal, because it contains database passwords.  You may need to put
    the webserver user in the appropriate group (ist-rt) or change permissions
    be able to run successfully

    [Typos in the last sentence as in the original].

2.  The next message said it couldn't find RT/Extension/BrandedQueues.pm, 
which is included at the bottom of my RT_SiteConfig.pm:

    Can't locate RT/Extension/BrandedQueues.pm in @INC (@INC contains:
    inc lib /opt/rt3/local/lib /users/ist-rt/RT/rt/ist-rt/lib
    /users/ist-rt/lib/perl5 /users/ist-rt/lib/perl5/site_perl/5.8.8/i86pc-solaris-thread-multi
    /users/ist-rt/lib/perl5/site_perl/5.8.8 /users/ist-rt/lib/perl5/site_perl
    /users/ist-rt/lib/perl/5.8.8 /users/ist-rt/lib/perl /users/ist-rt/lib/perl/5.8.8
    /users/ist-rt/share/perl/5.8.8 /users/ist-rt/share/perl
    /users/ist-rt/share/perl/5.8.8 /opt/csw/lib/perl/5.8.8 /opt/csw/share/perl/5.8.8
    /opt/csw/lib/perl/site_perl /opt/csw/share/perl/site_perl
    /opt/csw/share/perl/site_perl /opt/csw/lib/perl/csw
    /opt/csw/share/perl/csw /opt/csw/share/perl/csw .) at
    /users/ist-rt/RT/rt/ist-rt/etc/RT_SiteConfig.pm line 623.
    BEGIN failed--compilation aborted at /users/ist-rt/RT/rt/ist-rt/etc/RT_SiteConfig.pm line 623.
    Compilation failed in require at /users/ist-rt/RT/rt/ist-rt/lib/RT.pm line 141.
    *** Error code 2

Nowhere in the above path does my local/lib appear.

I couldn't figure out why it would try to look for the BrandedQueues stuff 
if it couldn't load my RT_SiteConfig.pm in the first place.

(Hmm, it occurs to me now that perhaps what the first message really meant 
was just that it couldn't load something it found *inside* 
RT_SiteConfig.pm!).

So, I looked inside the Makefile and didn't see any reference to my 
local/lib, which made we wonder how it would find other things it might 
need (I didn't know exactly what those might be, but given that I have 
some mods in local/lib, shouldn't that always be in the search path?).

I was confused about what's going on, but I inserted the reference to my 
local/lib into the Makefile and the errors went away; 'make initdb' was 
able to add the required RTFM tables to the database.

I would have liked to edit Makefile.PL, instead of the generated Makefile. 
But the entire contents of Makefile.PL look like this:

    use inc::Module::Install;
    RTx('RT-FM');
    name('RTFM');
    version_from('lib/RT/FM.pm');
    license('GPL version 2');
    requires(
        perl              => 5.008,
        RT                => '3.4.2',
        Text::WikiFormat  => 0,
        Tree::Simple      => 0,
        HTML::TreeBuilder => 0,
        Time::ParseDate   => 0,
        HTML::FormatText  => 0,
        YAML              => 0,
    );
    auto_install();
    &WriteAll;

which doesn't really tell me how to get the results I (apparently) needed.

One more thing.  I didn't actually run 'perl Makefile.PL'.  Instead, 
because of my 'virtual private server' environment, I had to run this:

   perl Makefile.PL `cat ../perl5prefs-ist-rt `

where the file '../perl5prefs-ist-rt' contains settings of a bunch of 
variables to tell Makefile.PL where actually to install stuff, especially 
perl modules (i.e., in my home directory -- /users/ist-rt -- , not the 
system perl libraries to which I don't have write access):

    PREFIX=/users/ist-rt/RT/rt/ist-rt/share \
    INSTALLPRIVLIB=/users/ist-rt/share/perl/5.8.8
    INSTALLSITELIB=/users/ist-rt/RT/rt/ist-rt/local/lib
    INSTALLARCHLIB=/users/ist-rt/lib/perl/5.8.8
    INSTALLSITEARCH=/users/ist-rt/lib/perl5/site_perl
    INSTALLSITEBIN=/users/ist-rt/RT/rt/ist-rt/bin \
    INSTALLSCRIPT=/users/ist-rt/RT/rt/ist-rt/sbin \
    INSTALLSITEMAN1DIR=/users/ist-rt/lib/perl5/man \
    INSTALLSITEMAN3DIR=/users/ist-rt/lib/perl5/man/man3 \
    SITEARCHEXP=/users/ist-rt/lib/perl5/site_perl

Notice that (third line above) my RT local lib is specified, in case 
'Makefile.PL needs to know where all my RT stuff is.  (But apparently this 
wasn't enough to cause my local/lib to appear in the generated Makefile).

[BTW:  the above 'perl5pref-ist-rt' file is the same as I had already used 
to install the BrandedQueues Extension in this same environment, with no 
problem].

Perhaps you have a better explanation of what's going on here.

Thanks.

Mike

_________________________________________________________________________
Mike Friedman                        Information Services & Technology
mikef at ack.Berkeley.EDU               2484 Shattuck Avenue
1-510-642-1410                       University of California at Berkeley
http://socrates.berkeley.edu/~mikef  http://ist.berkeley.edu
_________________________________________________________________________

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBRpw7qq0bf1iNr4mCEQKQ6ACfYE+r1stV0BPM+R9K+ubAZJXieBcAniJW
O/5zJHoOydxXhVtom/UWqRtl
=vaLp
-----END PGP SIGNATURE-----



More information about the rt-users mailing list