Red Hat Bugzilla – Bug 159117
/usr/lib/rpm/redhat/brp-strip breaks when exposed to files with exotic names -- ones with shell operators
Last modified: 2007-11-30 17:11:07 EST
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):
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
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.
Fixed in CVS