Hello community, here is the log from the commit of package mkinitrd for openSUSE:Factory checked in at Sun Feb 14 22:35:26 CET 2010. -------- --- mkinitrd/mkinitrd.changes 2010-01-27 15:20:50.000000000 +0100 +++ /mounts/work_src_done/STABLE/mkinitrd/mkinitrd.changes 2010-02-05 22:04:11.000000000 +0100 @@ -1,0 +2,38 @@ +Fri Feb 5 16:22:29 CET 2010 - mmarek@suse.cz + +- scripts/setup-network.sh: change [ "$foo" ] to [ -n "$foo" ] + (bnc#471943). + +------------------------------------------------------------------- +Fri Feb 5 15:38:53 CET 2010 - eich@novell.com + +- change handling of upper<>lower case matching for SLE-11. + +------------------------------------------------------------------- +Fri Feb 5 15:27:15 CET 2010 - mmarek@suse.cz + +- scripts/boot-start.sh: fallback to tmpfs for kerneles without + devtmpfs. + +------------------------------------------------------------------- +Thu Feb 4 22:53:27 CET 2010 - kasievers@novell.com + +- Use devtmpfs and mount /dev/shm as its own tmpfs mount + (bnc#561994). + +------------------------------------------------------------------- +Thu Feb 4 22:27:55 CET 2010 - mmarek@suse.cz + +- Handle low space below /dev/shm better (bnc#553629). + +------------------------------------------------------------------- +Thu Feb 4 16:15:45 CET 2010 - mmarek@suse.cz + +- Avoid using process substitution in setup scripts (bnc#575819). + +------------------------------------------------------------------- +Thu Jan 28 13:01:16 CET 2010 - mmarek@suse.cz + +- scripts/setup-kms.sh: properly restore $IFS (bnc#574683). + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mkinitrd.spec ++++++ --- /var/tmp/diff_new_pack.iq533G/_old 2010-02-14 22:34:15.000000000 +0100 +++ /var/tmp/diff_new_pack.iq533G/_new 2010-02-14 22:34:15.000000000 +0100 @@ -26,7 +26,7 @@ Requires: coreutils modutils util-linux grep gzip sed cpio udev sysvinit file perl-Bootloader AutoReqProv: on Version: 2.5.10 -Release: 9 +Release: 10 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/mkinitrd.changes new/mkinitrd-2.5.10/mkinitrd.changes --- old/mkinitrd-2.5.10/mkinitrd.changes 2010-01-27 15:19:31.000000000 +0100 +++ new/mkinitrd-2.5.10/mkinitrd.changes 2010-02-05 16:23:21.000000000 +0100 @@ -1,4 +1,42 @@ ------------------------------------------------------------------- +Fri Feb 5 16:22:29 CET 2010 - mmarek@suse.cz + +- scripts/setup-network.sh: change [ "$foo" ] to [ -n "$foo" ] + (bnc#471943). + +------------------------------------------------------------------- +Fri Feb 5 15:38:53 CET 2010 - eich@novell.com + +- change handling of upper<>lower case matching for SLE-11. + +------------------------------------------------------------------- +Fri Feb 5 15:27:15 CET 2010 - mmarek@suse.cz + +- scripts/boot-start.sh: fallback to tmpfs for kerneles without + devtmpfs. + +------------------------------------------------------------------- +Thu Feb 4 22:53:27 CET 2010 - kasievers@novell.com + +- Use devtmpfs and mount /dev/shm as its own tmpfs mount + (bnc#561994). + +------------------------------------------------------------------- +Thu Feb 4 22:27:55 CET 2010 - mmarek@suse.cz + +- Handle low space below /dev/shm better (bnc#553629). + +------------------------------------------------------------------- +Thu Feb 4 16:15:45 CET 2010 - mmarek@suse.cz + +- Avoid using process substitution in setup scripts (bnc#575819). + +------------------------------------------------------------------- +Thu Jan 28 13:01:16 CET 2010 - mmarek@suse.cz + +- scripts/setup-kms.sh: properly restore $IFS (bnc#574683). + +------------------------------------------------------------------- Wed Jan 27 14:59:02 CET 2010 - mmarek@suse.cz - scripts/setup-modules.sh: fix for module options in /proc/cmdline 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-01-27 15:19:31.000000000 +0100 +++ new/mkinitrd-2.5.10/sbin/mkinitrd 2010-02-05 16:23:21.000000000 +0100 @@ -40,9 +40,9 @@ } read_options() { - egrep -h '%param_' $INITRD_PATH/setup/*.sh /dev/null | sed 's/^.*_\(.\): \(.*\)$/ tmp_option=\$(read_options_eval \1 \2); [ \"$tmp_option\" ] \&\& cmd_option[\${#cmd_option[@]}]=\"\$tmp_option\"/' > $tmp_dir/$$.params - . $tmp_dir/$$.params - rm -f $tmp_dir/$$.params + egrep -h '%param_' $INITRD_PATH/setup/*.sh /dev/null | sed 's/^.*_\(.\): \(.*\)$/ tmp_option=\$(read_options_eval \1 \2); [ \"$tmp_option\" ] \&\& cmd_option[\${#cmd_option[@]}]=\"\$tmp_option\"/' > $work_dir/params + . $work_dir/params + rm -f $work_dir/params } parse_option() { @@ -245,17 +245,44 @@ . /etc/sysconfig/initrd fi -if [ -w /dev/shm ]; then - tmp_dir=${TMPDIR:-/dev/shm} -else - tmp_dir=${TMPDIR:-/tmp} -fi +find_tmpdir() +{ + local dir st size last_size=0 + + for dir in "$TMPDIR" /dev/shm /tmp /var/tmp; do + if test ! -w "$dir"; then + continue + fi + # try to find a directory with at least 50MB free space + st=`stat -f -c '%f * %S' "$dir/"` + if test -z "$st"; then + continue + fi + size=$(($st)) + if test "$size" -ge $((50 << 20)); then + tmp_dir="$dir" + return + elif test "$size" -gt "$last_size"; then + tmp_dir="$dir" + last_size="$size" + fi + done + if [ ! -d "$tmp_dir" ]; then + echo "$tmp_dir is not a directory" >&2 + exit 1 + fi + echo "warning: using $tmp_dir with $(($last_size >> 20))MB free space" >&2 + echo "this might not be enough" >&2 +} +find_tmpdir -if [ ! -d "$tmp_dir" ]; then - echo "$tmp_dir is not a directory" >&2 - exit 1 +work_dir=$(mktemp -qd $tmp_dir/${mkinit_name}.XXXXXX) +if [ $? -ne 0 ]; then + echo "$0: Can't create temp dir, exiting." >&2 + exit 1 fi + saved_args=$@ read_options while getopts $( cmd_getopts ) a ; do @@ -364,12 +391,6 @@ # Fixup old installations unset CDPATH -work_dir=$(mktemp -qd $tmp_dir/${mkinit_name}.XXXXXX) -if [ $? -ne 0 ]; then - echo "$0: Can't create temp dir, exiting." >&2 - exit 1 -fi - umount_proc() { [ "$mounted_proc" ] && umount -n $mounted_proc mounted_proc= 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-01-27 15:19:31.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/boot-boot.sh 2010-02-05 16:23:21.000000000 +0100 @@ -16,7 +16,7 @@ # Move device nodes /bin/mount --move /dev /root/dev -/bin/mount -t proc /root/proc /root/proc +/bin/mount -t proc proc /root/proc # 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-network.sh new/mkinitrd-2.5.10/scripts/boot-network.sh --- old/mkinitrd-2.5.10/scripts/boot-network.sh 2010-01-27 15:19:31.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/boot-network.sh 2010-02-05 16:23:21.000000000 +0100 @@ -22,7 +22,7 @@ load_modules # mac address based config -if [ "$macaddress" ] ; then +if [ -n "$macaddress" ] ; then for dev in /sys/class/net/* ; do # skip files that are no directories if ! [ -d $dev ] ; then @@ -36,7 +36,7 @@ fi done - if [ "$ip" ] ; then + if [ -n "$ip" ] ; then nettype=${ip##*:} ip=${ip%:*} tmpip=${ip%:*} @@ -44,11 +44,11 @@ fi fi -if [ "$nfsaddrs" -a ! "$(get_param ip)" ]; then +if [ -n "$nfsaddrs" -a -z "$(get_param ip)" ]; then ip=$nfsaddrs fi -if [ "$ip" -a ! "$(echo $ip | sed '/:/P;d')" ]; then +if [ -n "$ip" -a ! "$(echo $ip | sed '/:/P;d')" ]; then echo "[NETWORK] using dhcp on $interface based on ip=$ip" nettype=dhcp elif [ "${ip##*:}" = dhcp ]; then @@ -59,7 +59,7 @@ echo "[NETWORK] using dhcp on $interface based on ip=$ip" fi -if [ "$(get_param dhcp)" -a "$(get_param dhcp)" != "off" ]; then +if [ -n "$(get_param dhcp)" -a "$(get_param dhcp)" != "off" ]; then echo "[NETWORK] using dhcp based on dhcp=$dhcp" interface=$(get_param dhcp) nettype=dhcp @@ -67,7 +67,7 @@ [ "$(get_param dhcp)" = "off" ] && nettype=static -if [ "$ip" -a "$nettype" != "dhcp" ]; then +if [ -n "$ip" -a "$nettype" != "dhcp" ]; then echo "[NETWORK] using static config based on ip=$ip" nettype=static fi 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-01-27 15:19:31.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/boot-start.sh 2010-02-05 16:23:21.000000000 +0100 @@ -31,33 +31,37 @@ exit $1 } -mount -t proc proc /proc +mount -t proc proc /proc mount -t sysfs sysfs /sys -mount -t tmpfs -o mode=0755,nr_inodes=0 udev /dev - -mknod -m 0666 /dev/tty c 5 0 -mknod -m 0600 /dev/console c 5 1 -mknod -m 0666 /dev/ptmx c 5 2 - -exec < /dev/console > /dev/console 2>&1 - -mknod -m 0666 /dev/null c 1 3 -mknod -m 0600 /dev/kmsg c 1 11 -mknod -m 0660 /dev/snapshot c 10 231 -mknod -m 0666 /dev/random c 1 8 -mknod -m 0644 /dev/urandom c 1 9 -mkdir -m 0755 /dev/pts +if mount -t devtmpfs -o mode=0755,nr_inodes=0 devtmpfs /dev; then + have_devtmpfs=true +else + have_devtmpfs=false + mount -t tmpfs -o mode=0755,nr_inodes=0 udev /dev + + mknod -m 0666 /dev/tty c 5 0 + mknod -m 0600 /dev/console c 5 1 + mknod -m 0666 /dev/ptmx c 5 2 + mknod -m 0666 /dev/null c 1 3 + mknod -m 0600 /dev/kmsg c 1 11 + mknod -m 0660 /dev/snapshot c 10 231 + mknod -m 0666 /dev/random c 1 8 + mknod -m 0644 /dev/urandom c 1 9 +fi mkdir -m 1777 /dev/shm +mount -t tmpfs -o mode=1777 tmpfs /dev/shm +mkdir -m 0755 /dev/pts +mount -t devpts -o mode=0620,gid=5 devpts /dev/pts ln -s /proc/self/fd /dev/fd ln -s fd/0 /dev/stdin ln -s fd/1 /dev/stdout ln -s fd/2 /dev/stderr +exec < /dev/console > /dev/console 2>&1 + # export variables automatically so we see them in the rescue shell [ "$debug" ] && set -a -tty_driver= - # kernel commandline parsing for o in $(cat /proc/cmdline); do key="${o%%=*}" @@ -74,35 +78,36 @@ fi done -if [ "$console" ]; then - tty_driver="${tty_driver:+$tty_driver }${console%%,*}" -fi - -for o in $tty_driver; do - case "$o" in - ttyS*) test -e /dev/$o || mknod -m 0660 /dev/$o c 4 64 ;; - tty*) test -e /dev/$o || mknod -m 0660 /dev/$o c 4 1 ;; - esac -done - -# create the tty device nodes -tty_driver=$(showconsole -n 2>/dev/null) -if test -n "$tty_driver" ; then - major=${tty_driver%% *} - minor=${tty_driver##* } - if test $major -eq 4 -a $minor -lt 64 ; then - tty=/dev/tty$minor - test -e $tty || mknod -m 0660 $tty c 4 $minor +if ! $have_devtmpfs; then + tty_driver= + if [ "$console" ]; then + tty_driver="${tty_driver:+$tty_driver }${console%%,*}" fi - if test $major -eq 4 -a $minor -ge 64 ; then - tty=/dev/ttyS$((64-$minor)) - test -e $tty || mknod -m 0660 $tty c 4 $minor + + for o in $tty_driver; do + case "$o" in + ttyS*) test -e /dev/$o || mknod -m 0660 /dev/$o c 4 64 ;; + tty*) test -e /dev/$o || mknod -m 0660 /dev/$o c 4 1 ;; + esac + done + + # create the tty device nodes + tty_driver=$(showconsole -n 2>/dev/null) + if test -n "$tty_driver" ; then + major=${tty_driver%% *} + minor=${tty_driver##* } + if test $major -eq 4 -a $minor -lt 64 ; then + tty=/dev/tty$minor + test -e $tty || mknod -m 0660 $tty c 4 $minor + fi + if test $major -eq 4 -a $minor -ge 64 ; then + tty=/dev/ttyS$((64-$minor)) + test -e $tty || mknod -m 0660 $tty c 4 $minor + fi + unset major minor tty fi - unset major minor tty + unset tty_driver fi -unset tty_driver - -echo "" > /proc/sys/kernel/hotplug kernel_cmdline=($@) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/setup-done.sh new/mkinitrd-2.5.10/scripts/setup-done.sh --- old/mkinitrd-2.5.10/scripts/setup-done.sh 2010-01-27 15:19:31.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/setup-done.sh 2010-02-05 16:23:21.000000000 +0100 @@ -7,7 +7,10 @@ pushd . > /dev/null 2>&1 cd $tmp_mnt find bin sbin -type f -print0 | xargs -0 chmod 0755 -find . ! -name "*~" | cpio -H newc --create | gzip -9 > $tmp_initrd.gz +if ! find . ! -name "*~" | cpio -H newc --create | gzip -9 > $tmp_initrd.gz +then + oops 8 "Failed to build initrd" +fi popd > /dev/null 2>&1 if ! cp -f $tmp_initrd.gz $initrd_image ; then oops 8 "Failed to install initrd" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/setup-kms.sh new/mkinitrd-2.5.10/scripts/setup-kms.sh --- old/mkinitrd-2.5.10/scripts/setup-kms.sh 2010-01-27 15:19:31.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/setup-kms.sh 2010-02-05 16:23:21.000000000 +0100 @@ -33,7 +33,7 @@ local line local num=0 OFS=$IFS - IFS=" + local IFS=" " for i in $pcilist do @@ -74,7 +74,7 @@ local ret=1 declare -a entries OFS=$IFS - IFS=" + local IFS=" " [ -d /sys/bus/pci ] && [ -x /sbin/lspci ] || return 1 @@ -99,12 +99,12 @@ entries[$n]=$i n=$(( $n + 1 )) done - tmp=${entries[0]//\"/}; m_slot[$ct]=${tmp^^*} - tmp=${entries[1]//\"/}; m_class[$ct]=${tmp^^*} - tmp=${entries[2]//\"/}; m_vendor[$ct]=${tmp^^*} - tmp=${entries[3]//\"/}; m_device[$ct]=${tmp^^*} - tmp=${entries[4]//\"/}; m_subvendor[$ct]=${tmp^^*} - tmp=${entries[5]//\"/}; m_subdevice[$ct]=${tmp^^*} + m_slot[$ct]=${entries[0]//\"/} + m_class[$ct]=${entries[1]//\"/} + m_vendor[$ct]=${entries[2]//\"/} + m_device[$ct]=${entries[3]//\"/} + m_subvendor[$ct]=${entries[4]//\"/} + m_subdevice[$ct]=${entries[5]//\"/} ct=$(( $ct + 1 )) done IFS=$OFS @@ -134,6 +134,7 @@ local pcilist=$(/sbin/modinfo -F alias -k $kernel_version $driver \ | sed -n "s/pci:v\([0-9A-F\*]\+\)d\([0-9A-F\*]\+\)sv\([0-9A-F\*]\+\)sd\([0-9A-F\*]\+\)bc\([0-9A-F\*]\+\)sc\([0-9A-F\*]\+\)i\([0-9A-F\*]\+\).*/v=\1 d=\2 sv=\3 sd=\4 bc=\5 sc=\6 ii=\7/p") parse_pciids_from_driver "$pcilist" + shopt -s nocasematch for i in ${!m_slot[@]} do for j in ${!device[@]} @@ -167,6 +168,7 @@ done done echo $level + shopt -u nocasematch return 0 } @@ -223,6 +225,7 @@ [ -z "$kver" ] && return 1 + shopt -s nocasematch for i in ${!m_class[@]} do for j in $classlist @@ -238,6 +241,8 @@ fi done done + shopt -u nocasematch + echo $gfxs } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/setup-modules.sh new/mkinitrd-2.5.10/scripts/setup-modules.sh --- old/mkinitrd-2.5.10/scripts/setup-modules.sh 2010-01-27 15:19:31.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/setup-modules.sh 2010-02-05 16:23:21.000000000 +0100 @@ -126,6 +126,7 @@ continue fi + grep '^# SUSE INITRD: ' $file >"$work_dir/pipe" while read line ; do local string module requirement dependencies dependency @@ -167,7 +168,7 @@ "$module:$requirement" ) fi fi - done < <(grep '^# SUSE INITRD: ' $file) + done < "$work_dir/pipe" done } @@ -250,8 +251,9 @@ -C /dev/null \ --set-version $kernel_version --ignore-install \ --show-depends $module \ - $additional_args 2> >(sed 's/^FATAL:/modprobe:/' >&2) \ + $additional_args 2> "$work_dir/pipe" \ | grep -E '^(insmod|builtin) ') + sed 's/^FATAL:/modprobe:/' "$work_dir/pipe" >&2 if [ -z "$module_list" ]; then echo \ "WARNING: no dependencies for kernel module '$module' found." >&2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/setup-storage.sh new/mkinitrd-2.5.10/scripts/setup-storage.sh --- old/mkinitrd-2.5.10/scripts/setup-storage.sh 2010-01-27 15:19:31.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/setup-storage.sh 2010-02-05 16:23:21.000000000 +0100 @@ -242,6 +242,7 @@ rootminor="$(echo $(( 0x${rootcpio:70:8} )) )" # get opts from fstab and device too if stat failed + sed -e '/^[ \t]*#/d' < $root_dir/etc/fstab >"$work_dir/pipe" while read fstab_device fstab_mountpoint fstab_type fstab_options dummy ; do if [ "$fstab_mountpoint" = "/" ]; then update_blockdev "$fstab_device" # get major and minor @@ -254,7 +255,7 @@ rootfsopts="$fstab_options" break fi - done < <(sed -e '/^[ \t]*#/d' < $root_dir/etc/fstab) + done < "$work_dir/pipe" if [ $((rootmajor)) -gt 0 -a -z "$rootdev" ] ; then # don't check for non-device mounts ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org