Bug 159117 - /usr/lib/rpm/redhat/brp-strip breaks when exposed to files with exotic names -- ones with shell operators
Summary: /usr/lib/rpm/redhat/brp-strip breaks when exposed to files with exotic names ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-05-30 05:45 UTC by D. Hugh Redelmeier
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-06-10 17:28:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description D. Hugh Redelmeier 2005-05-30 05:45:35 UTC
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):
redhat-rpm-config-8.0.32-1

How reproducible:
Always

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 || :
to
        $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 17:28:39 UTC
Fixed in CVS


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