[packages/rpm-pld-macros/rpm.org] - version 1.747: support for filenames with spaces in shebang checks

baggins baggins at pld-linux.org
Mon May 18 09:17:13 CEST 2020


commit 8bf7fbaa63d5ed8795116c3260fe40b6368a2187
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Apr 16 21:33:39 2020 +0200

    - version 1.747: support for filenames with spaces in shebang checks

 macros.pld          | 6 ++++--
 rpm-pld-macros.spec | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/rpm-pld-macros.spec b/rpm-pld-macros.spec
index 2f039ae..a0dda50 100644
--- a/rpm-pld-macros.spec
+++ b/rpm-pld-macros.spec
@@ -1,4 +1,4 @@
-%define		rpm_macros_rev	1.744
+%define		rpm_macros_rev	1.747
 %define		find_lang_rev	1.40
 Summary:	PLD Linux RPM macros
 Summary(pl.UTF-8):	Makra RPM dla Linuksa PLD
diff --git a/macros.pld b/macros.pld
index fa86208..f9f4006 100644
--- a/macros.pld
+++ b/macros.pld
@@ -961,9 +961,9 @@ __spec_install_post_check_tmpfiles() { \
 %__spec_install_post_check_shebangs { \
 __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 \
+	fail=` \
+	find $RPM_BUILD_ROOT -type f -perm -500 -print | { fail=0; while IFS= read -r f; do \
 		shebang="$(sed -e'1s/#! *\(.*\)/\1/;t;d;q' "$f")" ; \
 		f="${f##$RPM_BUILD_ROOT}"; \
 		case "$shebang" in \
@@ -982,6 +982,8 @@ __spec_install_post_check_shebangs() { \
 			*) ;;\
 		esac ; \
 	done ; \
+	echo "$fail" ; \
+	}`; \
 	echo " DONE" ; \
         %{!?no_install_post_check_shebangs:return $fail;} \
 }; __spec_install_post_check_shebangs }}
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list