Bug 11905

Summary: rpm doesn't recognize options in rpmrc
Product: [Retired] Red Hat Linux Reporter: Adi Linden <adi>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1   
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: 2000-06-04 21:04:02 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 Adi Linden 2000-06-04 21:04:01 UTC
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

Comment 1 Jeff Johnson 2000-06-04 21:21:11 UTC
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