aboutsummaryrefslogtreecommitdiffstats
path: root/brp-strip-comment-note
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-07-27 17:38:37 +0000
committerThierry Vignaud <tv@mageia.org>2012-07-27 17:38:37 +0000
commit2d2ba482a77ac385b318afe2f4db22ceaad70d76 (patch)
tree98c84c810564b0cd94245a3260dbfb634cc5c08f /brp-strip-comment-note
parent7396ca2979ec9b954f015da48444fa7068c86d11 (diff)
downloadrpm-setup-2d2ba482a77ac385b318afe2f4db22ceaad70d76.tar
rpm-setup-2d2ba482a77ac385b318afe2f4db22ceaad70d76.tar.gz
rpm-setup-2d2ba482a77ac385b318afe2f4db22ceaad70d76.tar.bz2
rpm-setup-2d2ba482a77ac385b318afe2f4db22ceaad70d76.tar.xz
rpm-setup-2d2ba482a77ac385b318afe2f4db22ceaad70d76.zip
backported from rpm.org (Jeff Tickle <jeff@jefftickle.com>, 2011-09-06)
$RPM_BUILD_ROOT breaks brp-* scripts if it contains spaces (ticket #843) - This patch adds quotes around $RPM_BUILD_ROOT in places that I noticed they were missing, and attempts to handle some of the problems that can occur when looping over the output of find.
Diffstat (limited to 'brp-strip-comment-note')
-rwxr-xr-xbrp-strip-comment-note2
1 files changed, 1 insertions, 1 deletions
diff --git a/brp-strip-comment-note b/brp-strip-comment-note
index 0985795..3d7ad4e 100755
--- a/brp-strip-comment-note
+++ b/brp-strip-comment-note
@@ -6,7 +6,7 @@ fi
# Strip .comment and .note sections (the latter only if it is not allocated)
# for already stripped elf files in the build root
-for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
+for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do
note="-R .note"