From b66ea229dda1682e588b48ed93b334aa13315872 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 14 Oct 2014 10:05:34 +0200 Subject: [PATCH] - rel 4; support for compressed modules used in 3.18.x kernels --- geninitrd-git.patch | 38 ++++++++++++++++++++++++++++++++++++++ geninitrd.spec | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/geninitrd-git.patch b/geninitrd-git.patch index 59fae92..864d1ea 100644 --- a/geninitrd-git.patch +++ b/geninitrd-git.patch @@ -61,3 +61,41 @@ index 2478063..f31f00d 100755 mount_proc kmsg "geninitrd/$VERSION starting" +diff --git a/geninitrd b/geninitrd +index f31f00d..74d8b70 100755 +--- a/geninitrd ++++ b/geninitrd +@@ -784,9 +784,22 @@ modules_install() { + MODULEDIR=${mod%/*} + 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 ++ case $mod in ++ *.gz) ++ gunzip "$DESTDIR/lib/modules/$kernel/$mod" ++ mod=${mod%.gz} ++ ;; ++ *.xz) ++ xz -d "$DESTDIR/lib/modules/$kernel/$mod" ++ mod=${mod%.xz} ++ ;; ++ *.bz2) ++ bzip2 -d "$DESTDIR/lib/modules/$kernel/$mod" ++ mod=${mod%.bz2} ++ ;; ++ esac + if [ "$STRIP" ] && [ -x "$STRIP" ]; then +- $STRIP -g --remove-section=.comment "$DESTDIR/lib/modules/$kernel/${mod%.gz}" ++ $STRIP -g --remove-section=.comment "$DESTDIR/lib/modules/$kernel/${mod}" + fi + done + } +@@ -797,6 +810,8 @@ modules_add_linuxrc() { + for mod in "$@"; do + # module path without optional compression + modpath=${mod%.gz} ++ modpath=${modpath%.xz} ++ modpath=${modpath%.bz2} + + # name of the module + local module=${modpath##*/}; module=${module%$modext} diff --git a/geninitrd.spec b/geninitrd.spec index 6005d3d..0b7a001 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: 12736 -Release: 3 +Release: 4 License: GPL Group: Applications/System Source0: %{name}-%{version}.tar.gz -- 2.44.0