Bug 80846

Summary: "rpm -ivh --excludedocs --badreloc --relocate /=/newroot" fails
Product: [Retired] Red Hat Linux Reporter: Jim Gleason <jim.gleason.work>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: jim.gleason.work
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-03 13:56:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jim Gleason 2002-12-31 23:37:07 UTC
Description of problem:
"rpm -ivh --excludedocs --badreloc --relocate /=/newroot" fails to relocate the
package from the / directory to the /newroot directory

Version-Release number of selected component (if applicable):
I have tried both rpm-4.1-1.06 and rpm-4.1-8x and both fail.

How reproducible:
Every time

Steps to Reproduce:
1.Download binutils-sh-linux-2.11.2-6.i386.rpm and gcc-sh-linux-3.0.3-5.i386.rpm
from www.sh-linux.org (These are the RPMs I used, but any RPM should work (that
is they should fail :) )).
2.Create a /newroot directory
3.Try to install a relocated RPM using the folllowing command:
rpm -ivh --excludedocs --badreloc --relocate /=/newroot XXX.i386.rpm
    
Actual results:
Using the sh-linux packages mentioned in step 1. allows me to see that the files
(sh*-linux-*) are installed in /usr/bin/... instead of /newroot/usr/bin/...

Expected results:
I expect the package to be installed as if the root was /newroot.

Additional info:
Using the version of RPM that came (and I kept up2date) with RedHat 7.2 worked.
 It wasn't until I upgraded to RedHat 8.0 that things started to fail.

Comment 1 Jeff Johnson 2003-01-03 13:56:43 UTC
Yup, --relocate is/was broken in rpm-4.1.

This is now fixed in rpm-4.2.