Hello community, here is the log from the commit of package mkinitrd for openSUSE:Factory checked in at Mon Dec 8 16:50:27 CET 2008. -------- --- mkinitrd/mkinitrd.changes 2008-12-06 17:21:57.000000000 +0100 +++ /mounts/work_src_done/STABLE/mkinitrd/mkinitrd.changes 2008-12-08 16:26:06.000000000 +0100 @@ -1,0 +2,5 @@ +Mon Dec 08 16:14:39 CET 2008 - bwalle@suse.de + +- Implement program dependencies for modules (bnc #449123). + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mkinitrd.spec ++++++ --- /var/tmp/diff_new_pack.h32680/_old 2008-12-08 16:50:01.000000000 +0100 +++ /var/tmp/diff_new_pack.h32680/_new 2008-12-08 16:50:01.000000000 +0100 @@ -25,7 +25,7 @@ Requires: coreutils modutils util-linux grep gzip sed cpio udev sysvinit file perl-Bootloader AutoReqProv: on Version: 2.4 -Release: 38 +Release: 39 Conflicts: udev < 118 Requires: dhcpcd Summary: Creates an Initial RAM Disk Image for Preloading Modules @@ -121,6 +121,8 @@ %doc %{_mandir}/man8/lsinitrd.8.gz %changelog +* Mon Dec 08 2008 bwalle@suse.de +- Implement program dependencies for modules (bnc #449123). * Sat Dec 06 2008 bwalle@suse.de - Include virtio_pci module if necessary (bnc #456439). * Fri Dec 05 2008 bwalle@suse.de ++++++ mkinitrd.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.4/mkinitrd.changes new/mkinitrd-2.4/mkinitrd.changes --- old/mkinitrd-2.4/mkinitrd.changes 2008-12-06 17:21:40.000000000 +0100 +++ new/mkinitrd-2.4/mkinitrd.changes 2008-12-08 16:23:53.000000000 +0100 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Mon Dec 08 16:14:39 CET 2008 - bwalle@suse.de + +- Implement program dependencies for modules (bnc #449123). + +------------------------------------------------------------------- Sat Dec 6 17:21:00 CET 2008 - bwalle@suse.de - Include virtio_pci module if necessary (bnc #456439). diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.4/scripts/setup-modules.sh new/mkinitrd-2.4/scripts/setup-modules.sh --- old/mkinitrd-2.4/scripts/setup-modules.sh 2008-12-06 17:21:40.000000000 +0100 +++ new/mkinitrd-2.4/scripts/setup-modules.sh 2008-12-08 16:23:53.000000000 +0100 @@ -6,6 +6,7 @@ # take xen into account # Global variables + # Array that stores additional dependencies. Each entry looks like # module:module1 module2 # The array is initialised with some known dependency and extended at runtime @@ -105,13 +106,18 @@ # # This function loads that dependencies into the global # additional_module_dependencies array. +# +# The function also scans for lines like +# +# # SUSE INITRD: foot REQUIRES /bar +# +# where /bar is the full path to the binary that is required. Of course +# we know we have something like /sbin/modprobe there, but we can for +# example include "sysctl" with that mechanism. +# +# For that lines, we use cp_bin to actually include the binary. load_additional_dependencies() { - # array already filled - if [ ${#additional_module_dependencies[*]} -ne 0 ] ; then - return - fi - for file in /etc/modprobe.conf \ /etc/modprobe.conf.local \ /etc/modprobe.d/* ; do @@ -132,25 +138,34 @@ continue fi - number=0 - added=0 - for entry in ${additional_module_dependencies[@]} ; do - local module2 requirements2 val - module2=${entry/:*} - requirements2=${entry/*:} - if [ "$module2" = "$module" ] ; then - added=1 - val="$module:$requirements2 $requirement" - additional_module_dependencies[$number]=$val - break + # file dependency + if [[ "$requirement" == /* ]] ; then + local dir=${requirement##*/} + mkdir -p "$tmp_mnt/$dir" + cp_bin "$requirement" "$tmp_mnt/$dir" + verbose "[MODULES]\tIncluding $requirement per initrd comment" + # module dependency + else + number=0 + added=0 + for entry in ${additional_module_dependencies[@]} ; do + local module2 requirements2 val + module2=${entry/:*} + requirements2=${entry/*:} + if [ "$module2" = "$module" ] ; then + added=1 + val="$module:$requirements2 $requirement" + additional_module_dependencies[$number]=$val + break + fi + number=$[number+1] + done + + if [ $added -eq 0 ] ; then + additional_module_dependencies=( \ + "${additional_module_dependencies[@]}" \ + "$module:$requirement" ) fi - number=$[number+1] - done - - if [ $added -eq 0 ] ; then - additional_module_dependencies=( \ - "${additional_module_dependencies[@]}" \ - "$module:$requirement" ) fi done < <(grep '^# SUSE INITRD: ' $file) done ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org