Bug 159117 - /usr/lib/rpm/redhat/brp-strip breaks when exposed to files with exotic names -- ones with shell operators
/usr/lib/rpm/redhat/brp-strip breaks when exposed to files with exotic names ...
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Depends On:
  Show dependency treegraph
Reported: 2005-05-30 01:45 EDT by D. Hugh Redelmeier
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-06-10 13:28:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description D. Hugh Redelmeier 2005-05-30 01:45:35 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4

Description of problem:
If you have a file with an exec permission, and its name (for example) contains parens, brp-strip will fail.

Concrete example: a file named "timer(milliseconds)_control.htm" had execute permissions because it came from some stupid MS filesystem.  brp-strip failed with messages:

 sh: -c: line 0: `file -- timer(milliseconds)_control.htm'
 sh: -c: line 0: syntax error near unexpected token `('

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

How reproducible:

Steps to Reproduce:
1. build an RPM with a file with execute permission and a nasty name

Actual Results:  brp-strip fails.

Expected Results:  brp-strip should handle this gracefully

Additional info:

Simple fix: proper quoting in the brp-strip script.

Change second last line from:
        $STRIP -g $f || :
        $STRIP -g "$f" || :

Although this is in a Redhat script, the script appears to be copied in Mandrake too.
Comment 1 Elliot Lee 2005-06-10 13:28:39 EDT
Fixed in CVS

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