Hello community, here is the log from the commit of package mkinitrd for openSUSE:Factory checked in at Wed Mar 17 14:18:55 CET 2010. -------- --- mkinitrd/mkinitrd.changes 2010-03-03 21:49:40.000000000 +0100 +++ /mounts/work_src_done/STABLE/mkinitrd/mkinitrd.changes 2010-03-16 13:25:53.000000000 +0100 @@ -1,0 +2,30 @@ +Fri Mar 12 12:07:11 CET 2010 - coolo@suse.de + +- support upstart in providing a file with the initrd exports. + +------------------------------------------------------------------- +Thu Mar 11 16:08:55 CET 2010 - mmarek@suse.cz + +- setup-block: map /dev/mmc* to the mmc_block driver (bnc#480808). + +------------------------------------------------------------------- +Wed Mar 10 16:00:03 CET 2010 - mmarek@suse.cz + +- Parse iBFT settings correctly (bnc#541892). + +------------------------------------------------------------------- +Wed Mar 10 15:54:34 CET 2010 - mmarek@suse.cz + +- setup-block: Add warning for loop devices (bnc#523749). + +------------------------------------------------------------------- +Wed Mar 10 15:53:27 CET 2010 - mmarek@suse.cz + +- setup-storage: Ignore error messages from dmsetup. + +------------------------------------------------------------------- +Wed Mar 10 12:38:37 CET 2010 - mmarek@suse.cz + +- Use udevsettle before killing udevd (bnc#543612). + +------------------------------------------------------------------- @@ -120,0 +151,6 @@ + +------------------------------------------------------------------- +Wed Nov 11 14:11:27 CET 2009 - mvancura@suse.cz + +- fix the name of multipath feature in doc, add a check of fetures + list on input (sysconfig file or cmdline options) (bnc#551339) calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mkinitrd.spec ++++++ --- /var/tmp/diff_new_pack.mEVP3i/_old 2010-03-17 14:16:52.000000000 +0100 +++ /var/tmp/diff_new_pack.mEVP3i/_new 2010-03-17 14:16:52.000000000 +0100 @@ -31,7 +31,7 @@ %endif AutoReqProv: on Version: 2.5.10 -Release: 12 +Release: 13 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/man/mkinitrd.8.txt new/mkinitrd-2.5.10/man/mkinitrd.8.txt --- old/mkinitrd-2.5.10/man/mkinitrd.8.txt 2010-03-03 21:46:22.000000000 +0100 +++ new/mkinitrd-2.5.10/man/mkinitrd.8.txt 2010-03-16 13:24:46.000000000 +0100 @@ -232,12 +232,14 @@ *dm*:: Include support for device mapper in general -*evms*:: -Add support for EVMS - *firewire*:: Include firewire storage +*ifup*:: +Include all network devices configured via ifup. The user should +ensure to set the STARTMODE to 'onboot' in the corresponding ifcfg +files. + *iscsi*:: Include iSCSI support 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-03 21:46:22.000000000 +0100 +++ new/mkinitrd-2.5.10/mkinitrd.changes 2010-03-16 13:24:46.000000000 +0100 @@ -1,4 +1,34 @@ ------------------------------------------------------------------- +Fri Mar 12 12:07:11 CET 2010 - coolo@suse.de + +- support upstart in providing a file with the initrd exports. + +------------------------------------------------------------------- +Thu Mar 11 16:08:55 CET 2010 - mmarek@suse.cz + +- setup-block: map /dev/mmc* to the mmc_block driver (bnc#480808). + +------------------------------------------------------------------- +Wed Mar 10 16:00:03 CET 2010 - mmarek@suse.cz + +- Parse iBFT settings correctly (bnc#541892). + +------------------------------------------------------------------- +Wed Mar 10 15:54:34 CET 2010 - mmarek@suse.cz + +- setup-block: Add warning for loop devices (bnc#523749). + +------------------------------------------------------------------- +Wed Mar 10 15:53:27 CET 2010 - mmarek@suse.cz + +- setup-storage: Ignore error messages from dmsetup. + +------------------------------------------------------------------- +Wed Mar 10 12:38:37 CET 2010 - mmarek@suse.cz + +- Use udevsettle before killing udevd (bnc#543612). + +------------------------------------------------------------------- Wed Mar 3 21:45:06 CET 2010 - eich@novell.com - scripts/setup-kms.sh: Fix for shopt -s nocasematch (bnc#566624). @@ -120,6 +150,12 @@ - store the git repo URL in the package metadata ------------------------------------------------------------------- +Wed Nov 11 14:11:27 CET 2009 - mvancura@suse.cz + +- fix the name of multipath feature in doc, add a check of fetures + list on input (sysconfig file or cmdline options) (bnc#551339) + +------------------------------------------------------------------- Fri Oct 30 14:39:03 CET 2009 - mmarek@suse.cz - restart mdmon before switching to the new root (fate#306823). 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-03 21:46:22.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/boot-boot.sh 2010-03-16 13:24:46.000000000 +0100 @@ -29,6 +29,14 @@ ROOTFS_BLKDEV="$rootdev" export ROOTFS_BLKDEV +# upstart does not export the full environment to jobs by default +# and we want our boot.* scripts to know the initrd environment for +# quite a while +# technically we only need the variables exported by initrd scripts +# and the cmdline and we'll also get thinks like HOME and PWD, but +# those are overwritten anyway +export > /root/dev/shm/initrd_exports.sh + exec /bin/run-init -c ./dev/console /root $init ${kernel_cmdline[@]} echo could not exec run-init! die 0 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 1970-01-01 01:00:00.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/boot-ibft.sh 2010-03-16 13:24:46.000000000 +0100 @@ -0,0 +1,49 @@ +#!/bin/bash +#%stage: device +#%modules: iscsi_ibft +#%if: "$ibft_available" +#: ${ibft_nic:=/sys/firmware/ibft/ethernet0} +# +###### iBFT network configuration +## +## This script obtains network configuration parameters +## from the iBFT, if available + +load_modules + +ibft_get_att() { + if [ -f $ibft_nic/$1 ]; then + cat $ibft_nic/$1 + else + echo "" + fi +} + +ibft_get_ethdev() { + (cd $ibft_nic/device/net; ls -d eth* 2>/dev/null) +} + +ibft_get_initiatorname() { + cat /sys/firmware/ibft/initiator/initiator-name +} + +print_par() { + local val + while [ $# -gt 0 ]; do + eval "val=\$$1" + echo "[IBFT] $1='$val'" + shift + done +} + +if [ -d $ibft_nic ]; then + if [ -s $ibft_nic/dhcp ]; then + nettype='dhcp' + else + nettype='static' + fi + ip="$(ibft_get_att ip-addr)::$(ibft_get_att gateway):$(ibft_get_att subnet-mask):$ibft_hostname:$(ibft_get_ethdev):$nettype" + interface=$(ibft_get_ethdev) + macaddress=$(ibft_get_att mac) + InitiatorName=$(ibft_get_initiatorname) +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/boot-killudev.sh new/mkinitrd-2.5.10/scripts/boot-killudev.sh --- old/mkinitrd-2.5.10/scripts/boot-killudev.sh 2010-03-03 21:46:22.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/boot-killudev.sh 2010-03-16 13:24:46.000000000 +0100 @@ -14,5 +14,6 @@ ## # kill udevd, we will run the one from the real root +/sbin/udevsettle kill $(pidof udevd) 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-03-03 21:46:22.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/boot-network.sh 2010-03-16 13:24:46.000000000 +0100 @@ -1,10 +1,11 @@ #!/bin/bash #%stage: device +#%depends: ibft #%programs: /sbin/dhcpcd /sbin/ip # dhcpcd reqires the af_packet module #%modules: af_packet $bonding_module #%udevmodules: $drvlink -#%if: "$interface" -o "$dhcp" -o "$ip" -o "$nfsaddrs" +#%if: "$interface" -o "$dhcp" -o "$ip" -o "$nfsaddrs" -o "$drvlink" # ##### network initialization ## @@ -150,5 +151,12 @@ fi echo 'hosts: files dns' > /etc/nsswitch.conf +elif [ "$nettype" = "ifup" ] ; then + for i in /etc/sysconfig/network/ifcfg-* ; do + interface=${i##*/ifcfg-} + [ -d /sys/class/net/$interface/device ] || continue + [ "$interface" = "lo" ] && continue + ifup $interface + done fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/setup-block.sh new/mkinitrd-2.5.10/scripts/setup-block.sh --- old/mkinitrd-2.5.10/scripts/setup-block.sh 2010-03-03 21:46:22.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/setup-block.sh 2010-03-16 13:24:46.000000000 +0100 @@ -117,6 +117,12 @@ ida*) result=cpqarray ;; + loop*) + echo "[BLOCK] WARNING: Loop device detected. Include the required drivers manually." >&2 + ;; + mmc*) + result=mmc_block + ;; *) if [ ! -d /sys/block/$blkdev/device ] ; then echo "Device $blkdev not handled" >&2 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 1970-01-01 01:00:00.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/setup-ibft.sh 2010-03-16 13:24:46.000000000 +0100 @@ -0,0 +1,27 @@ +#!/bin/bash +# +#%stage: device +#%depends: network + +ibft_set_iface() { + local if=$(cd $ibft_nic/device/net; ls -d eth* 2>/dev/null) + [ "$if" ] && { + interface=$if + if [ ! "$nettype" -a -e $ibft_nic/dhcp ]; then + nettype=dhcp + else + nettype=static + fi + } +} + +ibft_nic=/sys/firmware/ibft/ethernet0 +ibft_hostname=$(hostname) + +if [ "$root_iscsi" = 1 -a -d $ibft_nic ]; then + ibft_available=1 + ibft_set_iface +fi +save_var ibft_available +save_var ibft_hostname +save_var ibft_nic diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/scripts/setup-network.sh new/mkinitrd-2.5.10/scripts/setup-network.sh --- old/mkinitrd-2.5.10/scripts/setup-network.sh 2010-03-03 21:46:22.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/setup-network.sh 2010-03-16 13:24:46.000000000 +0100 @@ -159,13 +159,17 @@ echo "$drvlink" } -if [ -z "$interface" ] ; then - for addfeature in $ADDITIONAL_FEATURES; do - if [ "$addfeature" = "network" ]; then +for addfeature in $ADDITIONAL_FEATURES; do + if [ "$addfeature" = "network" ]; then + if [ -z "$interface" ] ; then interface=default fi - done -fi + fi + if [ "$addfeature" = "ifup" ] ; then + nettype=ifup + interface= + fi +done ip= interface=${interface#/dev/} @@ -216,6 +220,21 @@ fi fi +# Copy ifcfg settings +if [ "$nettype" = "ifup" ] ; then + mkdir -p $tmp_mnt/etc/sysconfig + cp -rp /etc/sysconfig/network $tmp_mnt/etc/sysconfig + for i in /etc/sysconfig/network/ifcfg-*; do + interface=${i##*/ifcfg-} + if [ -d /sys/class/net/$interface/device ] ; then + mod=$(get_network_module $interface) + drvlink="$drvlink $mod" + verbose "[NETWORK]\t$interface ($nettype)" + fi + done + interface= +fi + # Copy the /etc/resolv.conf when the IP is static if [ "$interface" -a "$nettype" = "static" -a -f /etc/resolv.conf ] ; then verbose "[NETWORK]\tUsing /etc/resolv.conf from the system in the initrd" @@ -238,6 +257,14 @@ if [ -f /etc/udev/rules.d/70-persistent-net.rules ] ; then cp /etc/udev/rules.d/70-persistent-net.rules $tmp_mnt/etc/udev/rules.d fi +if [ -f /etc/udev/rules.d/77-network.rules ] ; then + cp /etc/udev/rules.d/77-network.rules $tmp_mnt/etc/udev/rules.d + cp_bin /sbin/ifup $tmp_mnt/sbin/ifup + cp_bin /bin/awk $tmp_mnt/bin/awk + cp_bin /bin/grep $tmp_mnt/bin/grep + cp_bin /bin/logger $tmp_mnt/bin/logger + cp_bin /bin/touch $tmp_mnt/bin/touch +fi [ "$interface" ] && verbose "[NETWORK]\t$interface ($nettype)" 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-03 21:46:22.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/setup-prepare.sh 2010-03-16 13:24:46.000000000 +0100 @@ -1,7 +1,7 @@ #!/bin/bash # #%stage: setup -#%param_f: "Features to be enabled when generating initrd.\nAvailable features are:\niscsi, md, mpath, lvm, lvm2, evms" "\"feature list\"" ADDITIONAL_FEATURES +#%param_f: "Features to be enabled when generating initrd.\nAvailable features are:\niscsi, md, multipath, lvm, lvm2, ifup" "\"feature list\"" ADDITIONAL_FEATURES #%param_k: "List of kernel images for which initrd files are created. Defaults to all kernels found in /boot." "\"kernel list\"" kernel_images #%param_i: "List of file names for the initrd; position have match to \"kernel list\". Defaults to all kernels found in /boot." "\"initrd list\"" initrd_images #%param_l: "mkinitrd directory. Defaults to /lib/mkinitrd." "\"lib_dir\"" INITRD_PATH @@ -44,10 +44,12 @@ # check if we should use script or feature $1 use_script() { - local condition feature script file + local condition feature script file check + + check="$2" # always use when creating monster initrd - [ "$create_monster_initrd" ] && return 0 + [ -z "$check" -a "$create_monster_initrd" ] && return 0 # Normalize to feature name feature="${1##*/}" @@ -56,7 +58,7 @@ # when using additional features defined in the sysconfig # script / command line, always use them - if [ "$ADDITIONAL_FEATURES" ]; then + if [ -z "$check" -a "$ADDITIONAL_FEATURES" ]; then for addfeature in $ADDITIONAL_FEATURES; do if [ "$addfeature" = "$feature" ]; then return 0 @@ -128,6 +130,12 @@ oops 9 "Could not find map $map, please specify a correct file with -M." fi +# check features + +for feature in $ADDITIONAL_FEATURES ; do + use_script "$feature" "check" || echo "[WARNING] Feature \"$feature\" not found. A typo?" +done + # create an empty initrd if ! mkdir $tmp_mnt ; then error 1 "could not create temporary directory" 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-03-03 21:46:22.000000000 +0100 +++ new/mkinitrd-2.5.10/scripts/setup-storage.sh 2010-03-16 13:24:46.000000000 +0100 @@ -108,7 +108,7 @@ update_blockdev $bd >&2 if [ "$blockdriver" = device-mapper ]; then root_dm=1 - dm_deps=$(dmsetup deps -j $blockmajor -m $blockminor) + dm_deps=$(dmsetup deps -j $blockmajor -m $blockminor 2> /dev/null) dm_deps=${dm_deps#*: } dm_deps=${dm_deps//, /:} dm_deps=${dm_deps//(/} @@ -132,7 +132,7 @@ update_blockdev $bd >&2 if [ "$blockdriver" = device-mapper ]; then root_dm=1 - dm_deps=$(dmsetup deps -j $blockmajor -m $blockminor) + dm_deps=$(dmsetup deps -j $blockmajor -m $blockminor 2> /dev/null) dm_deps=${dm_deps#*: } dm_deps=${dm_deps//, /:} dm_deps=${dm_deps//(/} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.5.10/src/run-init.c new/mkinitrd-2.5.10/src/run-init.c --- old/mkinitrd-2.5.10/src/run-init.c 2010-03-03 21:46:22.000000000 +0100 +++ new/mkinitrd-2.5.10/src/run-init.c 2010-03-16 13:24:46.000000000 +0100 @@ -72,6 +72,8 @@ static void __attribute__((noreturn)) die(const char *msg) { fprintf(stderr, "%s: %s: %s\n", program, msg, strerror(errno)); + /* make sure the fprintf can get to the console */ + sleep(10); exit(1); } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org