[TriLUG] Perl modules and RPMs
Tanner Lovelace
lovelace at wayfarer.org
Mon Nov 18 09:17:41 EST 2002
On Mon, 2002-11-18 at 08:57, Jeremy Portzer wrote:
> Yep, this is correct. So maybe I'm misunderstanding the problem then.
> Here's an example of an error I get (after fixing cpan2rpm to use
> "rpmbuild" instead of "rpm"). Command is "cpan2rpm MD5" -- the MD5
> module is trivial; all it does is call Digest::MD5.
>
> [snip]
> + mkdir -p
> /var/tmp/perl-MD5-2.02-jeremy//usr/lib/perl5/5.8.0/i386-linux-thread-multi
> + make PREFIX=/var/tmp/perl-MD5-2.02-jeremy/usr install
> Warning: You do not have permissions to install into
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi at
> /usr/lib/perl5/5.8.0/ExtUtils/Install.pm line 84.Writing
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/MD5/.packlist
> Can't open file
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/MD5/.packlist: Permission denied at /usr/lib/perl5/5.8.0/ExtUtils/Install.pm line 167
> make: *** [pure_site_install] Error 255
> error: Bad exit status from /var/tmp/rpm-tmp.93326 (%install)
>
> I think the problem is that overriding the PREFIX variable on the
> command line doesn't override everything correctly. If you look at the
> Makefile, you see stuff like this.
>
> INSTALLPRIVLIB = /usr/lib/perl5/5.8.0
> INSTALLSITELIB = /usr/lib/perl5/site_perl/5.8.0
> [etc.]
>
This looks like a bug in the Redhat perl. Under Mandrake 9, on this
same module, I get the following lines in the Makefile:
INSTALLPRIVLIB = $(PREFIX)/lib/perl5/5.8.0
INSTALLSITELIB = $(PREFIX)/lib/perl5/site_perl/5.8.0
> So even though PREFIX is being overriden on the command-line, it doesn't
> affect these various INSTALL* variables, and therefore the make install
> doesn't install to RPM_BUILD_ROOT correctly. However, building the same
> module on Red Hat 7.3, which uses MakeMaker version 5.45, works fine,
> and the Makefile generated by MakeMaker looks like this:
>
> INSTALLPRIVLIB = $(PREFIX)/lib/perl5/5.6.1
> INSTALLARCHLIB = $(PREFIX)/lib/perl5/5.6.1/i386-linux
>
> In this case, cpan2rpm can properly override the PREFIX when running
> "make install".
>
> So what I'm wondering is what does the Makefile look like on Mandrake so
> that it works correctly?
Looking at the Mandrake 9 perl rpm yields this little tidbit:
Patch12:
perl-5.8.0-RC2-MakeMaker--have-PREFIX-appear-in-INSTALLs-variables-like-it-used-to-be.patch.bz2
So, it appears that Mandrake 9 patches MakeMaker to fix this
"new behavior". I wonder why it was changed?
Tanner
--
Tanner Lovelace | lovelace at wayfarer.org | http://wtl.wayfarer.org/
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
GPG Fingerprint = A66C 8660 924F 5F8C 71DA BDD0 CE09 4F8E DE76 39D4
GPG Key can be found at http://wtl.wayfarer.org/lovelace.gpg.asc
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
Si hoc legere scis, nimium eruditionis habes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20021118/7d7b2430/attachment.pgp>
More information about the TriLUG
mailing list