[packages/rpm-build-macros] fix __spec_install_post_check_shebangs for spaces

jajcus jajcus at pld-linux.org
Tue Apr 26 15:16:05 CEST 2016


commit b5868bc343fd555e7ffed76dd15142f9446f0bd2
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Tue Apr 26 15:13:59 2016 +0200

    fix __spec_install_post_check_shebangs for spaces
    
    Paths with spaces would cause the macro to fail.
    
    Version: 1.716

 rpm-build-macros.spec | 2 +-
 rpm.macros            | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/rpm-build-macros.spec b/rpm-build-macros.spec
index 204dd44..72331d4 100644
--- a/rpm-build-macros.spec
+++ b/rpm-build-macros.spec
@@ -1,4 +1,4 @@
-%define		rpm_macros_rev	1.715
+%define		rpm_macros_rev	1.716
 %define		find_lang_rev	1.38
 Summary:	PLD Linux RPM build macros
 Summary(pl.UTF-8):	Makra do budowania pakietów RPM dla Linuksa PLD
diff --git a/rpm.macros b/rpm.macros
index 93a955d..1c07df4 100644
--- a/rpm.macros
+++ b/rpm.macros
@@ -738,9 +738,10 @@ __spec_install_post_check_shebangs() { \
 %{!?debug:set +x;} \
 	fail=0; \
 	echo "Checking script shebangs..."; \
-	for f in $(find $RPM_BUILD_ROOT -type f -perm -500 -print) ; do \
-		shebang=$(sed -e'1s/#! *\(.*\)/\1/;t;d;q' "$f") ; \
-		f=${f##$RPM_BUILD_ROOT}; \
+	find $RPM_BUILD_ROOT -type f -perm -500 -print | \
+	while read f ; do \
+		shebang="$(sed -e'1s/#! *\(.*\)/\1/;t;d;q' "$f")" ; \
+		f="${f##$RPM_BUILD_ROOT}"; \
 		case "$shebang" in \
 			"%{__python}"|"%{__python3}"|"%{__python} "*|"%{__python3} "* \
 			|"/usr/bin/python%{py_ver}"|"/usr/bin/python%{py_ver} "* \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-macros.git/commitdiff/b5868bc343fd555e7ffed76dd15142f9446f0bd2



More information about the pld-cvs-commit mailing list