Subject: | PERL_INSTALL_ROOT considered dangerous |
Date: | Fri, 30 Nov 2012 13:31:54 -0800 |
To: | bug-RPM-Specfile [...] rt.cpan.org |
From: | PFudd <pfudd [...] mailinator.com> |
Hi...
My cpanflute2-generated rpms have not been working, because the files are
installing into the BUILDROOT of the user who built them, for example:
/home/pfudd/rpmbuild/BUILDROOT/perl-CPANPLUS-Dist-
Fedora-0.0.3-8.x86_64/home/pfudd/rpmbuild/BUILDROOT/perl-CPANPLUS-Dist-
Fedora-0.0.3-8.x86_64/usr/local/share/perl5/CPANPLUS/Dist/Fedora.pm
The problem comes from Extutils, in that if there is an environment variable
named 'PERL_INSTALL_ROOT' then Extutils will prepend that to all paths. This
is compounded by the Makefile, as it has a variable PERL_INSTALL_ROOT, and all
Make variables get exported as environment variables to all child processes by
default.
This was discovered here:
https://bugzilla.redhat.com/show_bug.cgi?id=557015#c16
where they found that the solution is to use DESTDIR instead of
PERL_INSTALL_ROOT.
I'm including a one-line patch for cpanflute2 to fix this.
Cheers!
Message body is not shown because sender requested not to inline it.