[packages/geninitrd] - rel 3; crc32c handling from svn

arekm arekm at pld-linux.org
Sun Jan 6 21:48:56 CET 2013


commit c20a1e230751bf08b28708bad0a0047468b92846
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Jan 6 21:48:53 2013 +0100

    - rel 3; crc32c handling from svn

 geninitrd-svn.patch | 47 ++++++++++++++++++++++++++++++++++++++++++++---
 geninitrd.spec      |  2 +-
 2 files changed, 45 insertions(+), 4 deletions(-)
---
diff --git a/geninitrd.spec b/geninitrd.spec
index 3f9c462..b39ee66 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:	12582
-Release:	2
+Release:	3
 License:	GPL
 Group:		Applications/System
 Source0:	%{name}-%{version}.tar.gz
diff --git a/geninitrd-svn.patch b/geninitrd-svn.patch
index 2567a69..9573f3c 100644
--- a/geninitrd-svn.patch
+++ b/geninitrd-svn.patch
@@ -1,8 +1,49 @@
 Index: geninitrd
 ===================================================================
---- geninitrd	(revision 12585)
-+++ geninitrd	(revision 12586)
-@@ -1445,6 +1445,7 @@
+--- geninitrd	(wersja 12585)
++++ geninitrd	(wersja 12612)
+@@ -332,6 +332,15 @@
+ 	/lib/geninitrd/extract-ikconfig /boot/vmlinuz-$kernel
+ }
+ 
++# @param    $module
++basename_module() {
++	local module=$1
++
++	module=${module##*/}
++	module=${module%$modext*}
++	echo $module
++}
++
+ # Finds module dependencies
+ #
+ # @param	$module
+@@ -366,9 +375,23 @@
+ 		warn "If $module isn't compiled in kernel then this initrd may not start your system."
+ 	fi
+ 
++	local smodule
++
+ 	echo "$modprobe" | \
+ 	while read insmod modpath options; do
+-		[ "$insmod" = "insmod" ] && echo $modpath
++		if [ "$insmod" = "insmod" ]; then
++
++			# XXX: find a away to autodetect
++			smodule=$(basename_module $modpath)
++			case "$smodule" in
++				libcrc32c)
++					find_depmod "-crc32c-intel"
++					find_depmod "-crc32c"
++					;;
++			esac
++
++			echo $modpath
++		fi
+ 	done
+ 	return 0
+ }
+@@ -1445,6 +1468,7 @@
  else
  	initrd_gen_md
  	initrd_gen_lvm
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list