SOURCES: rpm.macros - for strip and chrpath require that files are...

glen glen at pld-linux.org
Mon Feb 11 18:15:40 CET 2008


Author: glen                         Date: Mon Feb 11 17:15:40 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- for strip and chrpath require that files are executable in buildroot (RFC?)

---- Files affected:
SOURCES:
   rpm.macros (1.430 -> 1.431) 

---- Diffs:

================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.430 SOURCES/rpm.macros:1.431
--- SOURCES/rpm.macros:1.430	Sun Feb 10 14:02:51 2008
+++ SOURCES/rpm.macros	Mon Feb 11 18:15:35 2008
@@ -372,7 +372,7 @@
 			echo "DONE"; \
 		fi; \
 	fi; \
-	filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*/usr/lib[0-9]*/debug/.*\.debug" ! -regex ".*/lib/modules/.*" ! -regex ".*%{_docdir}/.*" ! -regex ".*%{_includedir}/.*" %{?_noautostrip:! -regex "%{_noautostrip}"} %{?_autostripall:! -regex "%{_autostripall}"} %{?_autostripunneeded:! -regex "%{_autostripunneeded}"} %{?_autostripdebug:! -regex "%{_autostripdebug}"}`; \
+	filelist=$(find $RPM_BUILD_ROOT -type f ! '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')' -regex ".*/usr/lib[0-9]*/debug/.*\.debug" ! -regex ".*/lib/modules/.*" ! -regex ".*%{_docdir}/.*" ! -regex ".*%{_includedir}/.*" %{?_noautostrip:! -regex "%{_noautostrip}"} %{?_autostripall:! -regex "%{_autostripall}"} %{?_autostripunneeded:! -regex "%{_autostripunneeded}"} %{?_autostripdebug:! -regex "%{_autostripdebug}"}); \
 	if [ -n "$filelist" ]; then \
 		filetypes=`echo "$filelist" | xargs -r -d'\\n' file`; \
 		elfexelist=`echo "$filetypes" | awk -F: '/ELF.*executable/ {print $1}'`; \
@@ -397,9 +397,9 @@
 			echo "DONE"; \
 		fi; \
 	fi; \
-    filelist_all=%{?_autostripall:`find $RPM_BUILD_ROOT -type f -regex "%{_autostripall}"`}; \
-    filelist_unneeded=%{?_autostripunneeded:`find $RPM_BUILD_ROOT -type f -regex "%{_autostripunneeded}"`}; \
-    filelist_debug=%{?_autostripdebug:`find $RPM_BUILD_ROOT -type f -regex "%{_autostripdebug}"`}; \
+    filelist_all=%{?_autostripall:$(find $RPM_BUILD_ROOT -type f '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')' -regex "%{_autostripall}")}; \
+    filelist_unneeded=%{?_autostripunneeded:$(find $RPM_BUILD_ROOT -type f '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')' -regex "%{_autostripunneeded}")}; \
+    filelist_debug=%{?_autostripdebug:$(find $RPM_BUILD_ROOT -type f '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')' -regex "%{_autostripdebug}")}; \
 	if [ -n "$filelist_all" ]; then \
 		printf "Stripping everything from %d additional files..." $(echo "$filelist_all" | wc -l); \
 		chmod u+w $filelist_all; \
@@ -432,7 +432,7 @@
 %__spec_install_post_chrpath {%{!?debug: \
 %{!?no_install_post_chrpath: __spec_install_post_chrpath() { \
 if [ -d "$RPM_BUILD_ROOT" ]; then \
-	files=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" ! -regex ".*/usr/lib[0-9]*/debug/.*" ! -regex ".*/lib/modules/.*" ! -regex ".*%{_docdir}/.*" ! -regex ".*%{_includedir}/.*" %{?_noautochrpath:! -regex "%{_noautochrpath}"}`; \
+	files=`find $RPM_BUILD_ROOT -type f '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')' ! -regex ".*ld-[0-9.]*so.*" ! -regex ".*/usr/lib[0-9]*/debug/.*" ! -regex ".*/lib/modules/.*" ! -regex ".*%{_docdir}/.*" ! -regex ".*%{_includedir}/.*" %{?_noautochrpath:! -regex "%{_noautochrpath}"}`; \
 	if [ -n "$files" ]; then \
 		objs=`echo "$files" | xargs -r -d'\\n' file | awk -F: '/ELF.*(executable.*dynamically linked|shared object)/ {print $1}'`; \
 	fi; \
@@ -1122,7 +1122,7 @@
 cat %{-z:$_N/}.install.log | %__pear_install_log \
 \
 # undos sources \
-find . -type f -print0 | xargs -0 sed -i -e 's,\\r$,,' \
+find -type f -print0 | xargs -0 sed -i -e 's,\\r$,,' \
 %{!?_noautocompressdoc:%global _noautocompressdoc %{nil}}%{expand:%%global _noautocompressdoc %{_noautocompressdoc} optional-packages.txt} \
 %{!?_noautoprov:%global _noautoprov %{nil}}%{expand:%%global _noautoprov %{_noautoprov} 'pear(tests/.*)'} \
 %{nil}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm.macros?r1=1.430&r2=1.431&f=u



More information about the pld-cvs-commit mailing list