[rt-users] Redhat Enterprise 5.5 install errors

Jeff Fearn jfearn at redhat.com
Sun Jul 25 23:28:58 EDT 2010


On Fri, 2010-07-09 at 12:45 -0700, Kevin Gagel wrote:
> Enter into Perl:
> perl -MCPAN -e shell
> 
> Have perl recomend updateds:
> r
> 
> Update the XML::RSS and XML::Parser modules and any others that RT is
> using.

Sorry for the delay in replying to this, I have been on medical leave.

IMHO you are much better off using cpanspec instead of CPAN. In
conjunction with a local yum repo it allows you to redeploy, duplicate,
and update your current production system with greater ease. cpanspec is
available in the EPEL repository [1].

The idea is to run cpanspec on your development machine, push the RPMs
in to a local yum repo, then install the RPMs on your server from there.

The downside is that you have to manually build the dependency tree,
which isn't so big for RT3. Once you have the packages in a local yum
repo updating them is simple.

Couple of gotchas with cpanspec:

1: Sometimes it misses arch specific files, like man1/* or scripts, just
add the files to the %files section in the generated spec file and
rebuild it. rpmbuild will tell you which files are not packaged.

2: To upgrade core modules you need to be a little sneaky, since you
will get file clashes when trying to install the new RPM. This can be
overcome by modifying the spec file.

2A: Modify the build line to use an earlier path.

e.g. ExtUtils::MakeMaker has script, man1, and man3 files that clash, so
lets push those files in to paths used before the core path:

[]$ cpanspec ExtUtils::MakeMaker

perl-ExtUtils-MakeMaker.spec is the spec file generated by cpanspec

perl-ExtUtils-MakeMaker.spec.noclashes is the spec file edited to avoid
file clashes

[]$ diff -u perl-ExtUtils-MakeMaker.spec
perl-ExtUtils-MakeMaker.spec.noclashes 

@@ -20,7 +20,7 @@
 %setup -q -n ExtUtils-MakeMaker-%{version}
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+%{__perl} Makefile.PL INSTALLDIRS=vendor
INSTALLVENDORSCRIPT=/usr/local/bin INSTALLVENDORBIN=/usr/local/bin
INSTALLVENDORMAN1DIR=/usr/local/share/man/man1
INSTALLVENDORMAN3DIR=/usr/local/share/man/man3
 make %{?_smp_mflags}
 
 %install
@@ -43,8 +43,10 @@
 %defattr(-,root,root,-)
 %doc Changes NOTES PATCHING README TODO
 %{perl_vendorlib}/*
-%{_mandir}/man3/*
+/usr/local/share/man/man3/*
+/usr/local/share/man/man1/*
+/usr/local/bin/instmodsh

The above changes move the perl files from the default path in to the
vendor path, and moves the scripts and man pages in to /usr/local/. All
of these paths come earlier in the search for files, so this effectively
over rides these files without affecting the files shipped by Red Hat.

2B: There are similar options to INSTALLVENDORSCRIPT et.al for
Module::Build based modules. See the "INSTALL PATHS" section in the
Module::Build man page. If you see Build.PL instead of Makefile.PL then
it's using Module::Build.


2C: If there are clashes with files in the vendor directories, then use
site, it is searched before vendor.

e.g.:

%{__perl} Makefile.PL INSTALLDIRS=site
INSTALLSITEMAN3DIR=/usr/local/share/man/man3
 ...


I've found this approach not only makes maintaining RT3 systems on RHEL
much easier, it also makes sys-admins much less grumpy ... which is
always a good thing for ones health and well being! [2]

Hope this helps.

Cheers, Jeff.

[1] http://fedoraproject.org/wiki/EPEL/FAQ#Using_EPEL
[2] http://www.theregister.co.uk/odds/bofh/






More information about the rt-users mailing list