Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 159117

Summary: /usr/lib/rpm/redhat/brp-strip breaks when exposed to files with exotic names -- ones with shell operators
Product: [Fedora] Fedora Reporter: D. Hugh Redelmeier <hugh>
Component: redhat-rpm-configAssignee: Elliot Lee <sopwith>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-06-10 17:28:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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):

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