Red Hat Bugzilla – Bug 60874
Need rpm macro for rename command
Last modified: 2008-05-01 11:38:01 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012
Description of problem:
Spec files which use the rename command are dependent on /usr/bin/rename
being first in the command search path. There should be an rpm macro
for rename if it is used in spec files.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.cd; mkdir tmpbin; cp /bin/false tmpbin/rename
3.rpm --rebuild openssl-0.9.6b-8.src.rpm
Actual Results: ...SNIP...
+ mv /var/tmp/openssl-0.9.6b-root/usr/lib/libcrypto.so.0.9.6
+ mv /var/tmp/openssl-0.9.6b-root/usr/share/ssl/man/man1
+ rmdir /var/tmp/openssl-0.9.6b-root/usr/share/ssl/man
+ rename so.0.9.6 so.0.9.6b /var/tmp/openssl-0.9.6b-root/lib/libcrypto.so.0.9.6
error: Bad exit status from /var/tmp/rpm-tmp.19983 (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.19983 (%install)
Expected Results: a normal package build
While rebuilding openssl-0.9.6b-8.src.rpm, I discovered that the
openssl spec file uses the rename command. I happened to have a different
rename command in my path ahead of /usr/bin/rename. Because of this,
the build failed. Unlike cp, mv, rm, and friends, there is no macro
for the rename command, so /usr/bin must be in PATH, and /usr/bin/rename
must be ahead of any other rename executables.
I assuming that the addition of a macro for the rename command would
There's nothing stopping you from using
a rename macro if you choose.
There's no way that rpm can auto-detect a
default path to rename, particularly when
there are several candidates.
Fix your %install script to do the Right
I should have said that this source rpm is straight from the 7.2 distribution.
bash$ rpm -qip openssl-0.9.6b-8.src.rpm
Name : openssl Relocations: (not relocateable)
Version : 0.9.6b Vendor: Red Hat, Inc.
Release : 8 Build Date: Fri 07 Sep 2001 04:48:38
Install date: (not installed) Build Host: stripples.devel.redhat.com
Group : System Environment/Libraries Source RPM: (none)
Size : 2091899 License: BSDish
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL : http://www.openssl.org/
Summary : The OpenSSL toolkit.
The OpenSSL toolkit provides support for secure communications between
machines. OpenSSL includes a certificate management tool and shared
libraries which provide various cryptographic algorithms and
The spec file of this rpm uses rename without a complete path. If rename
is used in many other Redhat spec files, a standard macro with the complete
path is in order. If not, I should submit a bug against the openssl package.
What is your preference?