Bug 60874 - Need rpm macro for rename command
Need rpm macro for rename command
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.2
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-03-07 21:45 EST by Galen Seitz
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-03-07 21:46:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Galen Seitz 2002-03-07 21:45:57 EST
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):


How reproducible:
Always

Steps to Reproduce:
1.cd; mkdir tmpbin; cp /bin/false tmpbin/rename
2.PATH=~/tmpbin:$PATH
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
/var/tmp/openssl-0.9.6b-root/usr/lib/libssl.so.0.9.6
/var/tmp/openssl-0.9.6b-root/lib/
+ mv /var/tmp/openssl-0.9.6b-root/usr/share/ssl/man/man1
/var/tmp/openssl-0.9.6b-root/usr/share/ssl/man/man3
/var/tmp/openssl-0.9.6b-root/usr/share/ssl/man/man5
/var/tmp/openssl-0.9.6b-root/usr/share/ssl/man/man7
/var/tmp/openssl-0.9.6b-root/usr/share/man
+ 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
/var/tmp/openssl-0.9.6b-root/lib/libssl.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)
lion:~$ 


Expected Results:  a normal package build

Additional info:

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
fix this.
Comment 1 Jeff Johnson 2002-03-09 12:18:07 EST
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
Thing.
Comment 2 Galen Seitz 2002-03-09 13:01:55 EST
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
PM PDT
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.
Description :
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
protocols.


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?

galen

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