aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-03-24 13:37:11 +0100
committerGerd Hoffmann <kraxel@redhat.com>2018-03-24 13:37:11 +0100
commitbd835bbcb9b182441dfbde71e100b07b66dafa73 (patch)
tree62dfbdd8fa6e3615a25a802c11bbb4e4b637d2f4
parent9ed08275cba49d3bcd801767bc676d678de47195 (diff)
downloadjenkinsfiles-bd835bbcb9b182441dfbde71e100b07b66dafa73.tar.gz
cleanup tweaks
-rw-r--r--kernel.spec.template7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel.spec.template b/kernel.spec.template
index a11a776..e49f5bd 100644
--- a/kernel.spec.template
+++ b/kernel.spec.template
@@ -51,17 +51,22 @@ make INSTALL_PATH=%{buildroot}/boot \
-C build \
install modules_install headers_install
+# rename /boot files, add config
mv %{buildroot}/boot/System.map \
%{buildroot}/boot/System.map-%{KVERREL}
mv %{buildroot}/boot/vmlinuz \
%{buildroot}/boot/vmlinuz-%{KVERREL}
cp build/.config %{buildroot}/boot/config-%{KVERREL}
+# cleanup
rm -rf %{buildroot}/lib/firmware
-rm -f %{buildroot}/lib/modules/*/modules.*
+rm -f %{buildroot}/lib/modules/%{KVERREL}/modules.*
+rm -f %{buildroot}/lib/modules/%{KVERREL}/source
+rm -f %{buildroot}/lib/modules/%{KVERREL}/build
find %{buildroot}/usr -name .install -print | xargs rm
find %{buildroot}/usr -name ..install.cmd -print | xargs rm
+# strip and compress modules
find %{buildroot}/lib/modules -name "*.ko" | xargs strip --strip-debug
find %{buildroot}/lib/modules -name "*.ko" | xargs gzip