]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- strip kernel modules, but keep sections needed for kernel (main pkg is now 3mb...
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 5 Mar 2007 21:28:03 +0000 (21:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm.macros -> 1.376

rpm.macros

index 6e9901ada56c1d57a39d859cdfaf3e924224cc82..58bf7c8e89d2a3e5a907583a11de31637cd71f2e 100644 (file)
@@ -316,6 +316,8 @@ unset DISPLAY ||:\
 ; do echo $l; done >> %1 \
 }
 
+# vim - "
+
 # minimum file size needed for compressed documents.
 # just smaller files than this get larger when compressed.
 # some stats:
@@ -351,7 +353,15 @@ unset DISPLAY ||:\
 %__spec_install_post_strip {%{!?debug: \
 %{!?no_install_post_strip:__spec_install_post_strip() { \
 if [ -d "$RPM_BUILD_ROOT" ]; then \
+       if [ -d $RPM_BUILD_ROOT/lib/modules ]; then \
+               modulelist=$(find $RPM_BUILD_ROOT/lib/modules -name '*o' -type f -print); \
+               printf "Stripping %d kernel modules..." $(echo "$modulelist" | wc -l); \
+               echo "$modulelist" | xargs -l512 chmod u+w; \
+               echo "$modulelist" | xargs -l512 %{__strip} --strip-unneeded --remove-section=.comment --remove-section=.note.GNU-stack; \
+               echo "DONE"; \
+       fi; \
        filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" ! -regex ".*/usr/lib[0-9]*/debug/.*\.debug" ! -regex ".*%{_docdir}/.*" ! -regex ".*%{_includedir}/.*" %{?_noautostrip:! -regex "%{_noautostrip}"}`; \
+       # vim - " \
        if [ -z "$filelist" ]; then \
                return; \
        fi; \
This page took 0.039957 seconds and 4 git commands to generate.