From d174cb310633b39b7c199af51f8078c39eba72a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 9 Nov 2011 18:21:23 +0000 Subject: [PATCH] - rel 4; fix strip to work also with compressed modules Changed files: geninitrd-svn.patch -> 2.11 geninitrd.spec -> 2.191 --- geninitrd-svn.patch | 24 ++++++++++++++++-------- geninitrd.spec | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/geninitrd-svn.patch b/geninitrd-svn.patch index 772ab85..fe11a36 100644 --- a/geninitrd-svn.patch +++ b/geninitrd-svn.patch @@ -82,13 +82,13 @@ Index: functions /^Class:/ { if (req_class == $2) { found=1 } } Index: geninitrd =================================================================== ---- geninitrd (wersja 12408) +--- geninitrd (wersja 12380) +++ geninitrd (kopia robocza) @@ -18,6 +18,7 @@ # list of geninitrd modules which need setup routine after commandline args parsing GENINITRD_MODS="" COMPRESS=yes -+STRIP=yes ++STRIP=strip target="" kernel="" force="" @@ -96,26 +96,34 @@ Index: geninitrd echo "Usage: $PROGRAM [--version] [-v] [-f] [--ifneeded] [--preload ]" echo " [--with=] [--image-version] [--fstab=] [--nocompress]" echo " [--compress=yes|xz|lzma|bzip2|gzip|lzo]" -+ echo " [--nostrip ]" ++ echo " [--nostrip ] [--strip PATH/strip] [--strip=PATH/strip]" echo " [--initrdfs=rom|initramfs|ext2|cram] [--modules-conf=]" echo " [--with-bootsplash] [--without-bootsplash]" echo " [--with-fbsplash] [--without-fbsplash]" -@@ -630,6 +632,9 @@ +@@ -630,6 +632,10 @@ inst_d "/lib/modules/$kernel/$MODULEDIR" cp -a "/lib/modules/$kernel/$mod" "$DESTDIR/lib/modules/$kernel/$mod" gunzip "$DESTDIR/lib/modules/$kernel/$mod" 2> /dev/null -+ if [ -x /usr/bin/strip ] && is_yes "$STRIP"; then -+ /usr/bin/strip --strip-unneeded --remove-section=.comment --remove-section=.note.GNU-stack "$DESTDIR/lib/modules/$kernel/$mod" ++ if [ "$STRIP" ] ; then ++ mod_nocomp=${mod%.gz} ++ $STRIP --strip-unneeded --remove-section=.comment --remove-section=.note.GNU-stack "$DESTDIR/lib/modules/$kernel/$mod_nocomp" + fi done } -@@ -1017,6 +1022,9 @@ +@@ -1017,6 +1023,16 @@ --nocompress) COMPRESS=no ;; + --nostrip) -+ STRIP=no ++ STRIP= ++ ;; ++ --strip=*) ++ STRIP="${1#--strip=}" ++ ;; ++ --strip) ++ STRIP=$2 ++ shift + ;; --ifneeded) ifneeded=1 diff --git a/geninitrd.spec b/geninitrd.spec index 75855aa..07ff0bd 100644 --- a/geninitrd.spec +++ b/geninitrd.spec @@ -7,7 +7,7 @@ Summary: Creates an initial ramdisk image for preloading modules Summary(pl.UTF-8): Narzędzie do tworzenia inicjalnego ramdysku używanego przy starcie systemu Name: geninitrd Version: 12385 -Release: 3 +Release: 4 License: GPL Group: Applications/System Source0: %{name}-%{version}.tar.gz -- 2.44.0