Bug 5003 - rpm --root issues and errors
Summary: rpm --root issues and errors
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.0
Hardware: sparc
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-09-08 23:39 UTC by kestes
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-09-09 14:12:34 UTC

Attachments (Terms of Use)

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> ..."

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