Bug 113082 - building perl srpm overwrites the existing installed perl.
Summary: building perl srpm overwrites the existing installed perl.
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: perl   
(Show other bugs)
Version: 3.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Warren Togami
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2004-01-08 09:56 UTC by Dave Miller
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-31 01:58:02 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Dave Miller 2004-01-08 09:56:21 UTC
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

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

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):

How reproducible:

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 13:49:13 UTC
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 12:57:04 UTC
Confirmed here.

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

+ /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-22 03:30:53 UTC
This has been reproduced independently per comment 2, attempting to

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