Hello community, here is the log from the commit of package mkinitrd for openSUSE:Factory checked in at Sun Apr 25 18:43:23 CEST 2010. -------- --- mkinitrd/mkinitrd.changes 2010-03-26 15:43:16.000000000 +0100 +++ /mounts/work_src_done/STABLE/mkinitrd/mkinitrd.changes 2010-04-23 16:38:23.000000000 +0200 @@ -1,0 +2,49 @@ +Wed Apr 21 10:38:18 CEST 2010 - thomas@novell.com + +- boot-boot.sh: Load selinux only if selinux=1 and enforcing=[0|1] + is given on the command line (bnc#598075) + +------------------------------------------------------------------- +Fri Apr 16 13:20:21 UTC 2010 - mmarek@novell.com + +- boot-start: Support double-quoted strings in /proc/cmdline + (bnc#551967). + +------------------------------------------------------------------- +Fri Apr 16 12:07:20 UTC 2010 - mmarek@novell.com + +- Clean up load_modules(). + +------------------------------------------------------------------- +Fri Apr 16 11:30:39 UTC 2010 - mmarek@novell.com + +- Load KMS modules after udev has started (bnc#596268). + +------------------------------------------------------------------- +Tue Apr 13 14:19:45 CEST 2010 - mmarek@suse.cz + +- setup-prepare: Fix feature check (bnc#596086). + +------------------------------------------------------------------- +Tue Apr 13 13:16:28 CEST 2010 - mmarek@suse.cz + +- setup-ibft: Include the NIC driver (bnc#596076). + +------------------------------------------------------------------- +Tue Apr 13 08:56:06 CEST 2010 - hare@suse.de + +- Only set nettype to 'dhcp' if a valid DHCP address was found + (bnc#576601) + +------------------------------------------------------------------- +Fri Apr 9 15:50:40 CEST 2010 - mmarek@suse.cz + +- Do not call update-bootloader if not available (bnc#595071). + +------------------------------------------------------------------- +Wed Apr 7 14:18:30 CEST 2010 - thomas@novell.com + +- added call to load_policy to load the SELinux policy during + the boot process (bnc#594041). + +------------------------------------------------------------------- @@ -22,0 +72,5 @@ + +------------------------------------------------------------------- +Mon Mar 15 13:59:11 CET 2010 - mmarek@suse.cz + +- scripts/boot-start.sh: avoid using eval statements (bnc#525668). calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mkinitrd.spec ++++++ --- /var/tmp/diff_new_pack.mU8zae/_old 2010-04-25 18:43:07.000000000 +0200 +++ /var/tmp/diff_new_pack.mU8zae/_new 2010-04-25 18:43:07.000000000 +0200 @@ -31,7 +31,7 @@ %endif AutoReqProv: on Version: 2.5.10 -Release: 15 +Release: 16 Conflicts: udev < 118 Requires: dhcpcd Summary: Creates an Initial RAM Disk Image for Preloading Modules ++++++ mkinitrd.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/lib/mkinitrd/bin/linuxrc new/mkinitrd-2.5.10/lib/mkinitrd/bin/linuxrc --- old/mkinitrd-2.5.10/lib/mkinitrd/bin/linuxrc 2010-03-26 15:30:24.000000000 +0100 +++ new/mkinitrd-2.5.10/lib/mkinitrd/bin/linuxrc 2010-04-23 16:36:14.000000000 +0200 @@ -10,30 +10,6 @@ } ################################################## -# mod_opt $kernelmodule -# get module parameter from kernel command line -################################################## -mod_opt() -{ - local module=$1 - local name=${module%%.ko} - local param - - test -e /proc/cmdline || return 1 - - name=$(eval echo $name | sed "s/[-_]/\*/g") - for i in `cat /proc/cmdline` - do - case $i in - ${name}.*=*) - param="${param}${param:+ }${i##${name}.}" - ;; - esac - done - echo $param -} - -################################################## # load_modules # loads all kernelmodules that belong to the # current init module @@ -42,19 +18,10 @@ # e.g. load_modules ################################################## load_modules() { - local option - local i - for file in $(eval echo $modules) + local module + for module in $(eval echo $modules) do - options=$(mod_opt $file) - if [ "n" != "n$options" ] - then - for i in $options - do - add_module_param ${file%%.ko} $i - done - fi - modprobe $file + modprobe $module done modules="" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/mkinitrd.changes new/mkinitrd-2.5.10/mkinitrd.changes --- old/mkinitrd-2.5.10/mkinitrd.changes 2010-03-26 15:30:24.000000000 +0100 +++ new/mkinitrd-2.5.10/mkinitrd.changes 2010-04-23 16:36:14.000000000 +0200 @@ -1,4 +1,53 @@ ------------------------------------------------------------------- +Wed Apr 21 10:38:18 CEST 2010 - thomas@novell.com + +- boot-boot.sh: Load selinux only if selinux=1 and enforcing=[0|1] + is given on the command line (bnc#598075) + +------------------------------------------------------------------- +Fri Apr 16 13:20:21 UTC 2010 - mmarek@novell.com + +- boot-start: Support double-quoted strings in /proc/cmdline + (bnc#551967). + +------------------------------------------------------------------- +Fri Apr 16 12:07:20 UTC 2010 - mmarek@novell.com + +- Clean up load_modules(). + +------------------------------------------------------------------- +Fri Apr 16 11:30:39 UTC 2010 - mmarek@novell.com + +- Load KMS modules after udev has started (bnc#596268). + +------------------------------------------------------------------- +Tue Apr 13 14:19:45 CEST 2010 - mmarek@suse.cz + +- setup-prepare: Fix feature check (bnc#596086). + +------------------------------------------------------------------- +Tue Apr 13 13:16:28 CEST 2010 - mmarek@suse.cz + +- setup-ibft: Include the NIC driver (bnc#596076). + +------------------------------------------------------------------- +Tue Apr 13 08:56:06 CEST 2010 - hare@suse.de + +- Only set nettype to 'dhcp' if a valid DHCP address was found + (bnc#576601) + +------------------------------------------------------------------- +Fri Apr 9 15:50:40 CEST 2010 - mmarek@suse.cz + +- Do not call update-bootloader if not available (bnc#595071). + +------------------------------------------------------------------- +Wed Apr 7 14:18:30 CEST 2010 - thomas@novell.com + +- added call to load_policy to load the SELinux policy during + the boot process (bnc#594041). + +------------------------------------------------------------------- Fri Mar 26 15:25:22 CET 2010 - mmarek@suse.cz - setup-storage: Do not assume that anything that contains a colon @@ -22,6 +71,11 @@ - setup-sharedlibs.sh: Do not run ldd on scripts (bnc#588609). ------------------------------------------------------------------- +Mon Mar 15 13:59:11 CET 2010 - mmarek@suse.cz + +- scripts/boot-start.sh: avoid using eval statements (bnc#525668). + +------------------------------------------------------------------- Fri Mar 12 12:07:11 CET 2010 - coolo@suse.de - support upstart in providing a file with the initrd exports. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/mkinitrd.spec new/mkinitrd-2.5.10/mkinitrd.spec --- old/mkinitrd-2.5.10/mkinitrd.spec 2010-03-26 15:30:24.000000000 +0100 +++ new/mkinitrd-2.5.10/mkinitrd.spec 2010-04-23 16:36:14.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package mkinitrd (Version 2.5.10) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ Name: mkinitrd -License: GPL v2 or later +License: GPLv2+ Group: System/Base #!BuildIgnore: module-init-tools e2fsprogs udev reiserfs fop BuildRequires: asciidoc libxslt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/sbin/mkinitrd new/mkinitrd-2.5.10/sbin/mkinitrd --- old/mkinitrd-2.5.10/sbin/mkinitrd 2010-03-26 15:30:24.000000000 +0100 +++ new/mkinitrd-2.5.10/sbin/mkinitrd 2010-04-23 16:36:14.000000000 +0200 @@ -3,7 +3,7 @@ # mkinitrd - create the initramfs images # usage: see below usage() or call with -h # -# Copyright (C) 1999-2006 SuSE Linux Products GmbH, Nuernberg, Germany +# Copyright (C) 1999-2010 SuSE Linux Products GmbH, Nuernberg, Germany # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -539,7 +539,7 @@ cleanup_finish if [ ! -x /sbin/update-bootloader ] ; then - no_bootloader_update= + no_bootloader_update=1 fi if [ "$exit_code" -eq 0 ] ; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/boot-boot.sh new/mkinitrd-2.5.10/scripts/boot-boot.sh --- old/mkinitrd-2.5.10/scripts/boot-boot.sh 2010-03-26 15:30:24.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/boot-boot.sh 2010-04-23 16:36:14.000000000 +0200 @@ -14,9 +14,76 @@ ## ----------------------- ## + +# based on rd_load_policy() from fedora 12 dracut package +selinux_load_policy() +{ + local NEWROOT=$1 + local CR="${NEWROOT}/usr/bin/chroot" + + local SELINUX="enforcing" + [ -e "$NEWROOT/etc/selinux/config" ] && . "$NEWROOT/etc/selinux/config" + + # If SELinux is disabled exit now + if [ -z $cmd_selinux ]; then + return 0 + fi + if [ -z $cmd_enforcing ]; then + return 0 + fi + if [ $cmd_selinux == 0 ]; then + return 0 + fi + + # Check whether SELinux is in permissive mode + local permissive=0 + if [ $cmd_enforcing == 0 ]; then + permissive=1 + fi + + # Attempt to load SELinux Policy + if [ -x "$NEWROOT/usr/sbin/load_policy" -o -x "$NEWROOT/sbin/load_policy" ]; then + local ret=0 + echo "Loading SELinux policy" + # load_policy does mount /proc and /selinux in + # libselinux,selinux_init_load_policy() + if [ -x "$NEWROOT/sbin/load_policy" ]; then + $CR "$NEWROOT" /sbin/load_policy -i + ret=$? + else + $CR "$NEWROOT" /usr/sbin/load_policy -i + ret=$? + fi + + if [ $ret -eq 0 -o $ret -eq 2 ]; then + return 0 + fi + + echo "Initial SELinux policy load failed." + if [ $ret -eq 3 -o $permissive -eq 0 ]; then + echo "Machine in enforcing mode." + echo "Not continuing" + sleep 100d # XXX well... + exit 1 + fi + return 0 + elif [ $permissive -eq 0 ]; then + echo "Machine in enforcing mode and cannot execute load_policy." + echo "To disable selinux, add selinux=0 to the kernel command line." + echo "Not continuing" + sleep 100d + exit 1 + fi +} + + # Move device nodes /bin/mount --move /dev /root/dev /bin/mount -t proc proc /root/proc + +# SELinux load policy +selinux_load_policy "/root" + # ready to leave cd /root umount -l /proc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/boot-ibft.sh new/mkinitrd-2.5.10/scripts/boot-ibft.sh --- old/mkinitrd-2.5.10/scripts/boot-ibft.sh 2010-03-26 15:30:24.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/boot-ibft.sh 2010-04-23 16:36:14.000000000 +0200 @@ -39,6 +39,8 @@ if [ -d $ibft_nic ]; then if [ -s $ibft_nic/dhcp ]; then nettype='dhcp' + read ibft_dhcp < $ibft_nic/dhcp + [ "$ibft_dhcp" = "0.0.0.0" ] && nettype='static' else nettype='static' fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/boot-kms.sh new/mkinitrd-2.5.10/scripts/boot-kms.sh --- old/mkinitrd-2.5.10/scripts/boot-kms.sh 2010-03-26 15:30:24.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/boot-kms.sh 2010-04-23 16:36:14.000000000 +0200 @@ -2,7 +2,7 @@ # #%stage: boot # -#%depends: start +#%depends: start udev # #%modules: $kms_modules # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/boot-start.sh new/mkinitrd-2.5.10/scripts/boot-start.sh --- old/mkinitrd-2.5.10/scripts/boot-start.sh 2010-03-26 15:30:24.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/boot-start.sh 2010-04-23 16:36:14.000000000 +0200 @@ -63,20 +63,65 @@ [ "$debug" ] && set -a # kernel commandline parsing -for o in $(cat /proc/cmdline); do - key="${o%%=*}" +cmdline=$(cat /proc/cmdline) +pos=0 + +# stores next character from /proc/cmdline in $c +next_char() { + c=${cmdline:pos++:1} + test -n "$c" +} + +# stores next var[=value] string from /proc/cmdline in $var +# supports double quotes to some extent +next_var() { + local c quoted=false + + var= + # eat leading whitespace + next_char || return + while test "$c" = ' ' -o "$c" = $'\t'; do + next_char || return + done + while true; do + case "$c" in + ' ' | $'\t') + if $quoted; then + var="$var$c" + else + break + fi + ;; + '"') + if $quoted; then + quoted=false + else + quoted=true + fi + ;; + *) + var="$var$c" + ;; + esac + next_char || break + done +} + +while next_var; do + key="${var%%=*}" key="${key//-/_}" if [ "${key%.*}" != "${key}" ]; then : # module parameter, ignored else # environment variable # set local variables too, in case somehow the kernel does not do this correctly - value="${o#*=}" + value="${var#*=}" value=${value:=1} - eval cmd_$key="${value}" - eval $key="${value}" 2> /dev/null + read cmd_$key < <(echo "$value") + read $key < <(echo "$value") fi done +unset next_char next_var c pos cmdline var if ! $have_devtmpfs; then tty_driver= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/setup-ibft.sh new/mkinitrd-2.5.10/scripts/setup-ibft.sh --- old/mkinitrd-2.5.10/scripts/setup-ibft.sh 2010-03-26 15:30:24.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/setup-ibft.sh 2010-04-23 16:36:14.000000000 +0200 @@ -7,8 +7,11 @@ local if=$(cd $ibft_nic/device/net; ls -d eth* 2>/dev/null) [ "$if" ] && { interface=$if + drvlink=$(get_network_module $interface) if [ ! "$nettype" -a -e $ibft_nic/dhcp ]; then nettype=dhcp + read ibft_dhcp < $ibft_nic/dhcp + [ "$ibft_dhcp" = "0.0.0.0" ] && nettype=static else nettype=static fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/setup-prepare.sh new/mkinitrd-2.5.10/scripts/setup-prepare.sh --- old/mkinitrd-2.5.10/scripts/setup-prepare.sh 2010-03-26 15:30:24.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/setup-prepare.sh 2010-04-23 16:36:14.000000000 +0200 @@ -44,12 +44,10 @@ # check if we should use script or feature $1 use_script() { - local condition feature script file check - - check="$2" + local condition feature script file # always use when creating monster initrd - [ -z "$check" -a "$create_monster_initrd" ] && return 0 + [ "$create_monster_initrd" ] && return 0 # Normalize to feature name feature="${1##*/}" @@ -58,7 +56,7 @@ # when using additional features defined in the sysconfig # script / command line, always use them - if [ -z "$check" -a "$ADDITIONAL_FEATURES" ]; then + if [ "$ADDITIONAL_FEATURES" ]; then for addfeature in $ADDITIONAL_FEATURES; do if [ "$addfeature" = "$feature" ]; then return 0 @@ -88,6 +86,16 @@ return 0 } +# returns true if feature exists +feature_exists() { + local feature=$1 script + + for script in $INITRD_PATH/boot/*-$feature.sh; do + return 0 + done + return 1 +} + create_monster_initrd=$param_A local kernel_version @@ -133,7 +141,7 @@ # check features for feature in $ADDITIONAL_FEATURES ; do - use_script "$feature" "check" || echo "[WARNING] Feature \"$feature\" not found. A typo?" + feature_exists "$feature" || echo "[WARNING] Feature \"$feature\" not found. A typo?" done # create an empty initrd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/setup-udev.sh new/mkinitrd-2.5.10/scripts/setup-udev.sh --- old/mkinitrd-2.5.10/scripts/setup-udev.sh 2010-03-26 15:30:24.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/setup-udev.sh 2010-04-23 16:36:14.000000000 +0200 @@ -20,6 +20,7 @@ 62-dm_linear.rules \ 64-device-mapper.rules \ 64-md-raid.rules \ + 79-kms.rules \ 80-drivers.rules; do if [ -f /lib/udev/rules.d/$rule ]; then cp /lib/udev/rules.d/$rule $tmp_mnt/lib/udev/rules.d ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org