Red Hat Bugzilla – Bug 11905
rpm doesn't recognize options in rpmrc
Last modified: 2008-05-01 11:37:55 EDT
I am trying to get started in using rpm. I read through the RPM-HOWTO and
the pertinent sections in the Maximum RPM book. I am trying to build rpm's
in a directory different than the system default to avoid contaminating the
system with my trial attempts.
I am assuming the rpmrc file is where the directory options are to go. Here
is an rpmrc file I created:
When I run rpm with in the followinf way:
rpm --rcfile=rpmrc --showrc
I get the following errors:
bad option 'topdir' at rpmrc:2
bad option 'vendor' at rpmrc:3
bad option 'buildroot' at rpmrc:4
ARCHITECTURE AND OS:
build arch : i686
compatible build archs: i686
build os : Linux
I tried relocating my rpmrc file to /etc/rpmrc and ~/.rpmrc and the results
are the same.
So I am assuming rpm is broken and doesn't have a clue how to read it's
rpmrc file. So how can I customize my rpm building environment???
The manner in which rpm is configured has changed since "Maximum RPM" was
You have two choices:
1) Build/install rpm-2.5.x from ftp.rpm.org
2) Configure using rpm-3.0 macros. For your example above this is
done by putting in ~/.rpmmacros:
The complete list of configuration macros is in /usr/lib/rpmrc/macros.
The other gotcha is that --rcfile now takes a colon separated list of
rpmrc files, so either invoke (as above) like
or add at the top of your rpmrc file