create directories after evaluting spec file macros
Bug #633657 reported by
Jeff Johnson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
RPM |
New
|
Wishlist
|
Unassigned | ||
Fedora |
Won't Fix
|
Medium
|
Bug Description
Tracker
Changed in rpm: | |
importance: | Undecided → Wishlist |
tags: | added: fedora rpmbuild |
tags: | added: macros |
Changed in fedora: | |
importance: | Unknown → Medium |
status: | Unknown → Won't Fix |
To post a comment you must log in.
Created attachment 436681 2-reorder- spec-eval. patch
rpm-4.7.
Description of problem:
I use macros that are defined in the spec file for rpm directory location, for example:
%_rpmtopdir %{_topdir} /%{name} /%{version} -%{release}
This is fine for rpm -i, but rpmbuild builds the directories before evaluating the spec file, so ~/rpmbuild directory has this:
[james@xavier rpmbuild]$ ls %\{name\}/ -%{release}
%{version}
And, when building an rpm I get this:
$ rpmbuild -bp rpm.spec rpm-tmp. SHLyud rpmbuild/ rpm/4.7. 2-3.spec_ first.fc12/ work rpm-tmp. SHLyud: line 23: cd: /home/james/ rpmbuild/ rpm/4.7. 2-3.spec_ first.fc12/ work: No such file or directory rpm-tmp. SHLyud (%prep)
Executing(%prep): /bin/sh -e /var/tmp/
+ umask 022
+ cd /home/james/
/var/tmp/
error: Bad exit status from /var/tmp/
RPM build errors: rpm-tmp. SHLyud (%prep)
Bad exit status from /var/tmp/
Version-Release number of selected component (if applicable):
rpm-4.7. 2-2.fc12. x86_64
I know I filed in 13, but the bug is present there as well
How reproducible:
Always
Steps to Reproduce:
1. rpm -i *.src.rpm
2. rpmbuild -bp *.spec
3. errors
Actual results:
$ rpmbuild -bp rpm.spec rpm-tmp. SHLyud rpmbuild/ rpm/4.7. 2-3.spec_ first.fc12/ work rpm-tmp. SHLyud: line 23: cd: /home/james/ rpmbuild/ rpm/4.7. 2-3.spec_ first.fc12/ work: No such file or directory rpm-tmp. SHLyud (%prep)
Executing(%prep): /bin/sh -e /var/tmp/
+ umask 022
+ cd /home/james/
/var/tmp/
error: Bad exit status from /var/tmp/
RPM build errors: rpm-tmp. SHLyud (%prep)
Bad exit status from /var/tmp/
Expected results:
rpmbuild unpacks rpm
Additional info:
Patch attached