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: topdir: /home/adi/RPM_TESTING/build vendor: PeeWeeLinux buildroot: /home/adi/RPM_TESTING/tmp 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??? Adi
The manner in which rpm is configured has changed since "Maximum RPM" was written. 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: %_topdir /home/adi/RPM_TESTING/build %vendor PeeWeeLinux %buildroot /home/adi/RPM_TESTING/tmp 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 --rcfile /usr/lib/rpm/rpmrc:./rpmrc or add at the top of your rpmrc file include: /usr/lib/rpm/rpmrc