Bug 57449 - building of spec files with "BuildRequires" fail when --rcfile is used
Summary: building of spec files with "BuildRequires" fail when --rcfile is used
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-12 19:55 UTC by Matthew R. MacIntyre
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-12-12 19:55:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Matthew R. MacIntyre 2001-12-12 19:55:10 UTC
Description of Problem:

The package builds of all redhat packages fail when the --rcfile argument
is used.


Version-Release number of selected component (if applicable):
rpm-4.0.3-1.03

How Reproducible:

Here are the contents of the rcfile being used:

    include: /usr/lib/rpm/rpmrc 
    macrofiles: /tmp/rpmmacros 
 
Here are the contents of the rpmmacros file being referenced by the rcfile:

%_topdir               /usr/src/pipfield/baseline/0.72.1/updates/os 
%vendor                Pipfield Software 

In /usr/src/pipfield/baseline/0.72.1/updates/os, I have a directory
structure in the same manner as /usr/src/redhat.  I have installed all of
the redhat 7.2 SRPMS into this "rpmroot".

Steps to Reproduce:
1.  Create rpmroot, as above.
2.  Create rpmmacros and rpmrc files, as above
3.  Try to build a package, e.g.:

rpm --rcfile=/tmp/rpmrc -bs
/usr/src/pipfield/baseline/0.72.1/updates/os/SPECS/balsa.spec

Actual Results:
error: unrecognized db option: "db3" ignored.
error: cannot open Packages index using db1 - No such file or directory (2)
error: cannot open rpm database in /var/lib/rpm

Expected Results:
Something like:
Wrote:
/usr/src/pipfield/baseline/0.72.1/updates/os/SRPMS/balsa-1.2.3-1.src.rpm

Additional Information:
This happens on any package with one or more "BuildRequires" lines in the
spec file.  It happens both as root and non-root users.  When I comment out
the BuildRequires line, the building of source packages work, and the
building of binary packages fail due to compilation errors (that is to say,
it gets past where it is broken now).

Comment 1 Jeff Johnson 2001-12-19 19:01:05 UTC
You need more than
	macrofiles: /tmp/rpmmacros
Copy the full macrofiles line from /usr/lib/rpm/rpmrc, add your
/tmp/rpmmacros to the end.


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