packages: geninitrd/geninitrd-svn.patch, geninitrd/geninitrd.spec - changes...
arekm
arekm at pld-linux.org
Sat Oct 15 11:06:16 CEST 2011
Author: arekm Date: Sat Oct 15 09:06:16 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- changes from trunk; rel 1.1 for now (testing purposes)
---- Files affected:
packages/geninitrd:
geninitrd-svn.patch (2.5 -> 2.6) , geninitrd.spec (2.186 -> 2.187)
---- Diffs:
================================================================
Index: packages/geninitrd/geninitrd-svn.patch
diff -u packages/geninitrd/geninitrd-svn.patch:2.5 packages/geninitrd/geninitrd-svn.patch:2.6
--- packages/geninitrd/geninitrd-svn.patch:2.5 Thu Aug 25 19:55:58 2011
+++ packages/geninitrd/geninitrd-svn.patch Sat Oct 15 11:06:11 2011
@@ -1,13 +1,232 @@
+Index: mod-usbkbd.sh
+===================================================================
+--- mod-usbkbd.sh (wersja 0)
++++ mod-usbkbd.sh (wersja 12376)
+@@ -0,0 +1,45 @@
++#!/bin/sh
++SATA_RCSID='$Revision$ $Date$'
++
++# geninitrd mod: usbkbd
++
++# setup geninitrd module
++# @access public
++setup_mod_usbkbd() {
++}
++
++find_modules_usbkbd() {
++ debug "Finding USB keyboard modules"
++
++ if [ "$(echo /sys/class/input/input*)" = "/sys/class/input/input*" ]; then
++ return
++ fi
++
++ local modules
++
++ for i in /sys/class/input/input*; do
++ [ ! -f $i/device/bInterfaceClass -o ! -f $i/device/bInterfaceProtocol ] && continue
++ bInterfaceClass=$(cat $i/device/bInterfaceClass)
++ bInterfaceProtocol=$(cat $i/device/bInterfaceProtocol)
++ if [ "$bInterfaceClass" = "03" -a "$bInterfaceProtocol" = "01" ]; then
++ module=$(readlink $i/device/driver/module)
++ module=$(basename $module)
++
++ if [ -n "$module" ]; then
++ debug "Found USB Keyboard: $(cat $i/name)"
++ modules="$modules $module"
++ fi
++ fi
++ done
++
++ if [ -n "$modules" ]; then
++ # usb controllers
++ for m in $(find_modules_by_class "0c03"); do
++ find_module $m
++ done
++
++ for m in $modules; do
++ find_module $m
++ done
++ fi
++}
+Index: geninitrd
+===================================================================
+--- geninitrd (wersja 12345)
++++ geninitrd (kopia robocza)
+@@ -613,7 +613,7 @@
+ [ "$FIRMWAREDIR" != "$firmware" ] && inst_d /lib/firmware/$FIRMWAREDIR
+ inst /lib/firmware/$firmware /lib/firmware/$firmware
+ else
+- die "firmware file /lib/firmware/$firmware nor /lib/firmware/$kernel/$firmware found."
++ warn "Possible missing firmware file /lib/firmware/$firmware or /lib/firmware/$kernel/$firmware for module $module."
+ fi
+ done
+
+@@ -915,7 +915,7 @@
+ warn "/proc filesystem not mounted, may cause wrong results or failure."
+ fi
+
+-geninitrd_load_mods ide luks multipath dmraid lvm md blkid udev tuxonice suspend fbsplash condecor bootsplash uvesafb nfs sata scsi
++geninitrd_load_mods ide luks multipath dmraid lvm md blkid udev tuxonice suspend fbsplash condecor bootsplash uvesafb nfs sata scsi usbkbd
+
+ while [ $# -gt 0 ]; do
+ case $1 in
+@@ -1157,6 +1157,9 @@
+ find_module "$FBMODULE"
+ fi
+
++# autodetect USB keyboards
++find_modules_usbkbd
++
+ # allow forcing loading SCSI and/or IDE modules
+ # XXX: where ADDSCSI cames from? drop?
+ if is_yes "$ADDSCSI"; then
+Index: mod-luks.sh
+===================================================================
+--- mod-luks.sh (wersja 12345)
++++ mod-luks.sh (kopia robocza)
+@@ -119,7 +119,7 @@
+
+ while read dst src key opt; do
+ [ -z "$dst" -o "${dst#\#}" != "$dst" ] && continue
+- [ "$src" != "$LUKSDEV" ] && continue
++ [ "$src" != "$LUKSDEV" ] && [ "$(readlink -f $src)" != "$LUKSDEV" ] && continue
+
+ if [ -n "$key" -a "x$key" != "xnone" ]; then
+ if test -e "$key" ; then
+@@ -155,11 +155,23 @@
+ # cryptsetup can be called twice and in case on crypt on lvm only second
+ # will succeed because there will be no src device in first cryptsetup call
+ # this can be called multiple times, before lvm and after lvm.
+- if [ -e "$src" ]; then
++ luksdev='$src'
++ if [ \${luksdev##/dev/disk/by-uuid/} != \${luksdev} ]; then
++ src_uuid=\${luksdev##/dev/disk/by-uuid/}
++ while read x y z name; do
++ found_uuid=\$(cryptsetup luksUUID /dev/\${name} 2>/dev/null)
++ if [ "\$found_uuid" = "\$src_uuid" ]; then
++ luksdev=/dev/\$name
++ break
++ fi
++ done < /proc/partitions
++ fi
++
++ if [ -e "\$luksdev" ]; then
+ crypt_status=\$(cryptsetup status '$dst')
+ if [ "\${crypt_status%%is inactive.}" != "\$crypt_status" ]; then
+ # is inactive
+- cryptsetup ${keyfile:+-d $keyfile} luksOpen '$src' '$dst' <&1
++ cryptsetup ${keyfile:+-d $keyfile} luksOpen "\$luksdev" '$dst' <&1
+ fi
+ fi
+
+Index: functions
+===================================================================
+--- functions (wersja 12345)
++++ functions (kopia robocza)
+@@ -166,3 +166,46 @@
+ local node="$1"
+ printf "/dev/mapper/%s" $(dm_name "$node")
+ }
++
++# find modules by class eg
++# find_modules_by_class 0106 - finds modules for SATA devices in the system
++# find_modules_by_class 0c03 - finds modules for USB controllers
++find_modules_by_class() {
++ local req_class="$1"
++
++ pcimap="/lib/modules/$kernel/modules.pcimap"
++
++ lspci=$(find_tool /sbin/lspci)
++ if [ ! -x "$lspci" ]; then
++ warn "Failed to execute lspci. Is pciutils package installed?"
++ fi
++
++ # no pcimap, nothing to lookup from
++ if [ ! -f "$pcimap" ]; then
++ return
++ fi
++
++ if [ -z "$lspci" ]; then
++ return
++ fi
++
++ set -- $($lspci -n | awk -vclass=$req_class '$2 == class":" {split($3, p, ":"); printf("0x0000%s 0x0000%s\n", p[1], p[2])}')
++
++ req_class="0x${req_class}00"
++
++ local PCI_ANY_ID=0xffffffff pci_module vendor device subvendor subdevice class class_mask driver_data
++ while read pci_module vendor device subvendor subdevice class class_mask driver_data; do
++ # ignore program interface (last two digits) - we want any
++ class_mask=$(($class_mask & 0xffffff00))
++ # some devices (like hcd) have very specific class
++ class=$(($class & $class_mask))
++ [ "$(($req_class & $class_mask))" = "$class" ] || continue
++ # match vendor
++ [ "$1" = "$vendor" -o "$vendor" = "$PCI_ANY_ID" ] || continue
++ # match device, allow PCI_ANY_ID
++ [ "$2" = "$device" -o "$device" = "$PCI_ANY_ID" ] || continue
++
++ echo "$pci_module"
++ done < $pcimap
++}
++
+Index: Makefile
+===================================================================
+--- Makefile (wersja 12345)
++++ Makefile (kopia robocza)
+@@ -1,6 +1,6 @@
+ # when making release, make sure you do it as RELEASE document describes
+ VERSION := 12345
+-MODS := ide luks multipath dmraid lvm md blkid udev tuxonice suspend fbsplash condecor bootsplash uvesafb nfs sata scsi
++MODS := ide luks multipath dmraid lvm md blkid udev tuxonice suspend fbsplash condecor bootsplash uvesafb nfs sata scsi usbkbd
+ FILES_MODS := $(MODS:%=mod-%.sh)
+ FILES_ADDON := extract-ikconfig
+ FILES := Makefile geninitrd.sysconfig geninitrd functions $(FILES_MODS) $(FILES_ADDON) geninitrd.8 geninitrd.8.xml ChangeLog
Index: mod-sata.sh
===================================================================
---- mod-sata.sh (wersja 12334)
+--- mod-sata.sh (wersja 12345)
+++ mod-sata.sh (kopia robocza)
-@@ -33,7 +33,7 @@
- local PCI_ANY_ID=0x0000ffff pci_module vendor device subvendor subdevice class class_mask driver_data
- while read pci_module vendor device subvendor subdevice class class_mask driver_data; do
- # match class
-- [ "$(($req_class & $class_mask))" = "$class" ] || continue
-+ [ "$(($req_class & $class_mask))" = "$(($class))" ] || continue
- # match vendor
- [ "$1" = "$vendor" ] || continue
- # match device, allow PCI_ANY_ID
+@@ -6,43 +6,8 @@
+ # setup geninitrd module
+ # @access public
+ setup_mod_sata() {
+- lspci=$(find_tool /sbin/lspci)
+-
+- pcimap="/lib/modules/$kernel/modules.pcimap"
+-
+- if [ ! -x "$lspci" ]; then
+- warn "Failed to execute lspci. Is pciutils package installed?"
+- fi
+ }
+
+-# private until only mod-sata uses the function
+-find_modules_by_class() {
+- local req_class=$1
+-
+- # no pcimap, nothing to lookup from
+- if [ ! -f "$pcimap" ]; then
+- return
+- fi
+-
+- if [ -z "$lspci" ]; then
+- return
+- fi
+-
+- set -- $($lspci -n | awk -vclass=$req_class '$2 == class":" {split($3, p, ":"); printf("0x0000%s 0x0000%s\n", p[1], p[2])}')
+-
+- local PCI_ANY_ID=0x0000ffff pci_module vendor device subvendor subdevice class class_mask driver_data
+- while read pci_module vendor device subvendor subdevice class class_mask driver_data; do
+- # match class
+- [ "$(($req_class & $class_mask))" = "$(($class))" ] || continue
+- # match vendor
+- [ "$1" = "$vendor" ] || continue
+- # match device, allow PCI_ANY_ID
+- [ "$2" = "$device" -o $device = $PCI_ANY_ID ] || continue
+-
+- echo "$pci_module"
+- done < $pcimap
+-}
+-
+ find_modules_sata() {
+ debug "Finding SATA modules (class=0x0106)"
+
================================================================
Index: packages/geninitrd/geninitrd.spec
diff -u packages/geninitrd/geninitrd.spec:2.186 packages/geninitrd/geninitrd.spec:2.187
--- packages/geninitrd/geninitrd.spec:2.186 Tue Oct 4 21:15:07 2011
+++ packages/geninitrd/geninitrd.spec Sat Oct 15 11:06:11 2011
@@ -8,14 +8,14 @@
Summary(pl.UTF-8): Narzędzie do tworzenia inicjalnego ramdysku używanego przy starcie systemu
Name: geninitrd
Version: 12345
-Release: 1
+Release: 1.1
License: GPL
Group: Applications/System
Source0: %{name}-%{version}.tar.gz
# Source0-md5: efafc272f06bb028adbab2926dc7f983
Patch0: %{name}-romfs.patch
Patch1: %{name}-gzip-compressor.patch
-#Patch2: %{name}-svn.patch
+Patch2: %{name}-svn.patch
URL: http://svn.pld-linux.org/trac/svn/wiki/packages/geninitrd
BuildRequires: xmlto >= 0:0.0.18-1
Requires: /usr/bin/ldd
@@ -94,7 +94,7 @@
%patch0 -p1
%patch1 -p1
%endif
-#%patch2 -p0
+%patch2 -p0
%build
%{__make}
@@ -125,6 +125,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 2.187 2011/10/15 09:06:11 arekm
+- changes from trunk; rel 1.1 for now (testing purposes)
+
Revision 2.186 2011/10/04 19:15:07 glen
- switch_root with two args is since busybox 1.1.0
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/geninitrd/geninitrd-svn.patch?r1=2.5&r2=2.6&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/geninitrd/geninitrd.spec?r1=2.186&r2=2.187&f=u
More information about the pld-cvs-commit
mailing list