Bug 113082 - building perl srpm overwrites the existing installed perl.
building perl srpm overwrites the existing installed perl.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: perl (Show other bugs)
3.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Warren Togami
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-08 04:56 EST by Dave Miller
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-30 21:58:02 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)

  None (edit)
Description Dave Miller 2004-01-08 04:56:21 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;
rv:1.7a) Gecko/20040103

Description of problem:
If you build the perl-5.8.0-88.4.src.rpm, it overwrites the live
/usr/bin/perl.

In this case, I was building it on an AS2.1 system which had perl
5.6.1 already installed.  Just building (not installing) the srpm for
perl 5.8.0 overwrote /usr/bin/perl with perl 5.8.0, which of course
was pointing at libraries that hadn't yet been installed, and
everything on the system using perl subsequently crashed, until I
deleted /usr/bin/perl and replaced it with a symlink to
/usr/bin/perl5.6.1.

Building an srpm I believe shouldn't touch anything outside the
buildroot.  That's VERY bad that it tries to.

In the spec file it has -Dinstallusrbinperl in the Config options. 
The easiest way to fix this is probably make that -Uinstallusrbinperl,
then create ${BUILD_ROOT}/usr/bin/perl manually in the build script. 
Otherwise I suppose you'd have to patch the Makefile...  which would
probably be more flexible.

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

How reproducible:
Always

Steps to Reproduce:
1. rpm -ba perl.spec


Actual Results:  /usr/bin/perl gets overwritten

Expected Results:  building an srpm shouldn't touch anything outside
of the buildroot.

Additional info:

marking high severity because decapitating the existing perl crashes
half the apps running on your average server (cgi, mail scripts, etc)
Comment 1 Milan Kerslager 2004-04-14 09:49:13 EDT
I tryed to rebuild perl-5.8.0-88.4.src.rpm (with two UTF-8 patches), 
but perl binaries was not replaced (even build has been done under 
root user). So dropping severity to normal and changing to NEEDINFO.

If the owner of the bug don't see the same problem too, this bug 
could be closed as WORKSFORME.
Comment 2 Andreas Thienemann 2004-07-12 08:57:04 EDT
Confirmed here.

When rebuilding perl in an empty chroot-enivronment with a limited
number of packages installed the install part fails with the following
message:

+ /usr/lib/rpm/brp-strip-comment-note
Processing files: perl-5.8.0-88.4
warning: File listed twice: /usr/lib/perl5/5.8.0/Net/libnet.cfg
/usr/bin/perl: error while loading shared libraries: libperl.so:
cannot open shared object file: No such file or directory
[repeated 30 times or so]
getOutputFrom(): Broken pipe

NB: there was no /usr/bin/perl before calling the rpmbuild --rebuild
command, now there is.
Comment 3 Dave Miller 2005-02-21 22:30:53 EST
This has been reproduced independently per comment 2, attempting to
remove NEEDINFO

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