Bug 78053 - incompatible changes in behavior of MakeMaker; affects rpm build process
incompatible changes in behavior of MakeMaker; affects rpm build process
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Chip Turner
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-11-18 10:41 EST by Jeremy Portzer
Modified: 2007-04-18 12:48 EDT (History)
4 users (show)

See Also:
Fixed In Version: 9.0.93
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-10-08 19:10:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fixes MakeMaker so PREFIX appears INSTALL variables like it used to be (2.41 KB, patch)
2002-11-18 10:43 EST, Jeremy Portzer
no flags Details | Diff

  None (edit)
Description Jeremy Portzer 2002-11-18 10:41:46 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
I feel that an important part of maintaining a Red Hat Linux system is
installing everything via RPM.  The "cpan2rpm" tool
(http://perl.arix.com/cpan2rpm/ ) makes an easy RPM-ify perl modules.  However,
changes to MakeMaker in Perl 5.8.0 break cpan2rpm and any other applications
that depend on the "make PREFIX=$RPM_BUILD_ROOT install" construct.

Version-Release number of selected component (if applicable):
perl-5.8.0-55


How reproducible:
Always

Steps to Reproduce:
1.  Download cpan2rpm; modify it to use "rpmbuild" instead of "rpm" for building
RPMs  
2.  Attempt to build an RPM of a CPAN module, for example "cpan2rpm MD5"

	

Actual Results:  rpm build process fails on the make install step, because the
Makefile has changed in an incompatible manner -- the PREFIX variable is not
being overriden properly, and "make install" doesn't install to RPM_BUILD_ROOT.

Expected Results:  rpm build process should have completed successfully, as it
does on prior releases of Red Hat Linux

Additional info:

A small modification to MakeMaker could restore the previous functionality,
allowing the PREFIX to be overridden on the "make install" step of the rpm build
process.  See attached patch (modified from Mandrake Linux 9.0).   This will
make the rpm build process much simpler for perl modules, including the use of
scripts such as cpan2rpm.
Comment 1 Jeremy Portzer 2002-11-18 10:43:11 EST
Created attachment 85446 [details]
fixes MakeMaker so PREFIX appears INSTALL variables like it used to be
Comment 2 Need Real Name 2002-11-18 11:02:46 EST
Reference http://archive.develooper.com/makemaker@perl.org/msg00361.html as to
why this behavior was removed from MakeMaker.  For rpm based distributions, I
think this is the wrong behavior and that the previous behavior would be more
desirable.
Comment 3 Jeremy Portzer 2002-11-18 11:06:35 EST
Sorry, version 1.79 of cpan2rpm fixes the "rpmbuild" vs. "rpm" issue.  Please
ignore my comment about this in Step 1 of Steps to Reproduce.
Comment 4 Michael G Schwern 2002-11-28 15:00:51 EST
Its a bug in MakeMaker, not a feature.  At the time of the above post I didn't realize "make install PREFIX=foo" was important to anyone.  See:
http://archive.develooper.com/makemaker@perl.org/msg00758.html

Next version of MakeMaker released to CPAN will have at least "perl Makefile.PL PREFIX=foo;  make install PREFIX=bar" fixed but I'm still having trouble getting "perl Makefile.PL;  make install PREFIX=bar" to work.
Comment 5 Need Real Name 2002-11-28 23:22:14 EST
How about adding DESTDIR support to MakeMaker instead?  (Reference:
http://www.gnu.org/manual/make-3.79.1/html_chapter/make_14.html#SEC119 see the
bottom of that section).  DESTDIR is normally not set by anything in the
Makefile.  It is left to be set by the user on the command line.  Since it
prepends all paths in the Makefile, if it's not set, all paths work as normal. 
If it is set, the makefile installs everything into a root defined by the
DESTDIR variable.  Since this variable isn't used for anything else, this would
accomplish the what rpm needs for installing into a buildroot directory.
Comment 6 Michael G Schwern 2002-11-29 03:27:05 EST
DESTDIR plus the partial "make install PREFIX=foo" fix might just work.
Comment 7 Michael G Schwern 2002-12-08 06:53:38 EST
DESTDIR has been added to MakeMaker.

Also, this works again:

    perl Makefile.PL PREFIX=foo
    make test
    make install PREFIX=bar

but this still does not:

    perl Makefile.PL
    make test
    make install PREFIX=bar

I don't think anyone will miss the latter now that there is DESTDIR.

Snapshot available from makemaker.org.  The prefix work was done between 
SNAP-2002-12-08T03-40-41-0800 and SNAP-2002-12-07T18-43-55-0800 (those are CVS
tags).  There have been major internal changes between 5.8.0's MakeMaker and the
current snapshots.
Comment 8 Michael G Schwern 2002-12-13 19:20:43 EST
I may not have been clear above.

You should be able to extract just the PREFIX and DESTDIR fixes from the current
snapshot by examining
cvs diff -rSNAP-2002-12-07T18-43-55-0800 -rSNAP-2002-12-08T03-40-41-0800 -u
and manually apply the relevent bits to 5.8.0's MakeMaker.
Comment 9 Rob Brown 2002-12-16 23:51:27 EST
perl Makefile.PL PREFIX=foo 
 
is now added to the spec file by the cpan2rpm utility 
( http://perl.arix.com/cpan2rpm/ ) 
when 5.91_01 <= $ExtUtils::MakeMaker::VERSION <= 6.05. 
 
Thanks for the spot Jeremy. 
 
Comment 10 Michael G Schwern 2003-03-30 21:18:16 EST
ExtUtils::MakeMaker 6.06_03 has been released and is pretty well tested.  It has the restored PREFIX behavior and new DESTDIR features as discussed above.  6.06_04 will be following sortly with small additional fixes.  There will probably be a 6.06_05 before a final 6.06 release (whichmight end up being 6.10 just to reflect that so much as changed).To make a long story short, 6.06_03 should be safe for RH to put into development releases and there will be a stable release soon.
Comment 11 Jeremy Portzer 2003-10-08 19:10:25 EDT
ExtUtils::MakeMaker is now at 6.17 (in Severn beta/test) and has full DESTDIR
support, so this problem is solved in my view... marking resolved.

Note You need to log in before you can comment on or make changes to this bug.