Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 157015 - rpmbuild should ignore backup files in /etc/rpm
Summary: rpmbuild should ignore backup files in /etc/rpm
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2005-05-06 01:19 UTC by Robin Green
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-08-27 03:00:40 UTC

Attachments (Terms of Use)

Description Robin Green 2005-05-06 01:19:38 UTC
Description of problem:
When editing macro files in /etc/rpm, a backup file may be left behind by the
text editor, i.e. a file ending in ~. This backup file is picked up by rpmbuild,
resulting in confusion for the user as the old macros are still in effect, until
the file is changed again and saved. The symptom of this problem is that the
penultimate changes made to a macro file, instead of the last changes made, take
effect in an rpmbuild.

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

How reproducible:
Every time

Steps to Reproduce:
1. echo '%_bogo  foo' >/etc/rpm/macros.bogus~   
2. Take an existing .spec file, e.g. coreutils.spec, and replace the Name:
coreutils line with Name: %{_bogo}
3. rpmbuild -bp the spec file just edited
4. Press ctrl+c to kill the build
Actual results:
+ umask 022
+ cd /usr/src/redhat/BUILD
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf foo_1_1_src
... etc.

Expected results:
rpmbuild should say 
+ umask 022
+ cd /usr/src/redhat/BUILD
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf %{_bogo}_1_1_src
... etc.

Comment 1 Jeff Johnson 2005-08-27 03:00:40 UTC
Rpm reads what is configured in the macrofiles: directive.

The default value for that includes a glob:

macrofiles:     /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/etc/rpm/macros.*:/etc/rpm/

Changer that to something else, or remove your backup files in /etc/rpm if you wish different behavior.

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