[packages/geninitrd] - rel 4; support for compressed modules used in 3.18.x kernels

arekm arekm at pld-linux.org
Tue Oct 14 10:05:44 CEST 2014


commit b66ea229dda1682e588b48ed93b334aa13315872
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Oct 14 10:05:34 2014 +0200

    - 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.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
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}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/geninitrd.git/commitdiff/b66ea229dda1682e588b48ed93b334aa13315872



More information about the pld-cvs-commit mailing list