Bug 11248 - RPM 3.0.4-0.48 executes install script incorrectly
Summary: RPM 3.0.4-0.48 executes install script incorrectly
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 6.2
Hardware: All Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-05-05 17:54 UTC by Richard Cobbe
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-05-05 18:15:45 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Richard Cobbe 2000-05-05 17:54:53 UTC
I'm trying to build an RPM out of the MICO orb, and my %install section
contains the following commands:

pushd $RPM_BUILD_ROOT/usr/share/mico
JAVA_CUP_DIR=dirname `locate lalr_item_set.class`
cp -a $JAVA_CUP_DIR .

The intent is to determine the location of another package, which is

Now, the actual bash script generated by RPM appears to be correct:

pushd $RPM_BUILD_ROOT/usr/share/mico
JAVA_CUP_DIR=dirname `locate lalr_item_set.class`
cp -a $JAVA_CUP_DIR .

However, when this script is actually run, it is not interpreted correctly:

+ pushd /var/tmp/mico-root/usr/share/mico
/var/tmp/mico-root/usr/share/mico /usr/src/redhat/BUILD/mico
++ locate lalr_item_set.class
+ JAVA_CUP_DIR=dirname
+ /usr/lib/java/java_cup/lalr_item_set.class
/var/tmp/rpm-tmp.25852: /usr/lib/java/java_cup/lalr_item_set.class:
Permission denied
Bad exit status from /var/tmp/rpm-tmp.25852 (%install)

It appears that rpm interprets the script as follows:

pushd $RPM_BUILD_ROOT/usr/share/mico
`locate lalr_item_set.class`
dirname # etc.

Comment 1 Jeff Johnson 2000-05-05 18:15:59 UTC
Fix your script:
	JAVA_CUP_DIR=$(dirname `locate lalr_item_set.class`)

Comment 2 Richard Cobbe 2000-05-05 19:12:59 UTC
Thanks....boy do I feel dumb....

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