Bug 5003

Summary: rpm --root issues and errors
Product: [Retired] Red Hat Linux Reporter: kestes
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: jbj
Target Milestone: ---   
Target Release: ---   
Hardware: sparc   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-09-09 14:12:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description kestes 1999-09-08 23:39:31 UTC
rpm command line argument '--initdb' does not accept
the '--root' argument.  This is bad since our automated
boostrap of RPM on Solaris would be easier if we could
treat every command the same and always use the '--root'
for each rpm command until our OS is completely installed
and the chroot is no longer necessary.

There is a futher complication as it appears that the rpmrc
file is needed to be in the default locatoin EVEN if we
specify its true location.  You will notice that we get
errors redirecting the '--dbpath' since there is no rpmrc
on the solaris machine where the jumpstart is taking place.

We use rpm-2.5.6.

Here is some hardware stuff but that should be irrelivant
SunOS build01 5.6 Generic_105181-15 sun4u sparc

Here is my error log:

# /a/usr/local/bin/rpm --root /a --initdb
Unable to open /usr/local/lib/rpm/rpmrc for reading: No such
file or
# /a/usr/local/bin/rpm --root /a/ --initdb
Unable to open /usr/local/lib/rpm/rpmrc for reading: No such
file or

# /a/usr/local/bin/rpm --initdb --dbpath
/a/usr/local/lib/rpm --rcfile
Unable to open /usr/local/lib/rpm/rpmrc for reading: No such
file or

Comment 1 Jeff Johnson 1999-09-09 14:12:59 UTC
rpm-2.5.x *requires* .../usr/lib/rpm/rpmrc to be present. This
has been fixed in rpm-3.0.x by permitting --rcfile to permit
colon separated paths only the 1st of which is required to
exist. If you wish to change this behavior in rpm-2.5.x, look
at lib/rpmrc.c: it's a pretty easy hack to implement the rpm-3.0.x
behavior (read: add --rcfile /usr/lib/rpm/rpmrc w/o chroot).

	mkdir -p <your_root_here>/usr/local/lib/rpm
	cp /usr/lib/rpm/rpmrc <your_root_here>/usr/local/lib/rpm/rpmrc
before running "rpm -r <your_root_here> ..."