Hello community, here is the log from the commit of package dracut for openSUSE:Factory checked in at 2014-08-25 11:02:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dracut (Old) and /work/SRC/openSUSE:Factory/.dracut.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dracut" Changes: -------- --- /work/SRC/openSUSE:Factory/dracut/dracut.changes 2014-08-20 17:54:10.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.dracut.new/dracut.changes 2014-08-25 11:03:10.000000000 +0200 @@ -1,0 +2,18 @@ +Thu Aug 21 12:38:02 UTC 2014 - [email protected] + +- dracut.sh: check for logfile (--logfile option) and create it if necessary + Add 0139-dracut.sh-check-for-logfile-logfile-option-and-creat.patch +- Avoid duplicate names in host_devs + Add 0140-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch +- iscsi: Avoid bad ip route call on empty address + Add 0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch +- 40network: Don't report error for .../ifroute-* during module setup + Add 0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch +- iscsi: Fix up ipv6 in brackets , iterate over all needed iscsi mounts + Add 0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch +- 90crypt: Fixed crypttab_contains() to also work with device in /etc/crypttab + Add 0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch +- 40network: handle 'ip=ifname:static' correctly (bnc#892801) + Add 0145-40network-handle-ip-ifname-static-correctly.patch + +------------------------------------------------------------------- New: ---- 0139-dracut.sh-check-for-logfile-logfile-option-and-creat.patch 0140-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch 0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch 0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch 0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch 0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch 0145-40network-handle-ip-ifname-static-correctly.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dracut.spec ++++++ --- /var/tmp/diff_new_pack.f4NuoP/_old 2014-08-25 11:03:12.000000000 +0200 +++ /var/tmp/diff_new_pack.f4NuoP/_new 2014-08-25 11:03:12.000000000 +0200 @@ -159,6 +159,13 @@ Patch136: 0136-Revert-95udev-rules-add-persistent-network-rule.patch Patch137: 0137-Switch-from-Mozilla-NSS-sha256hmac-checking-to-fipsc.patch Patch138: 0138-warpclock-Do-not-use-warpclock-module-on-S390-x-hwcl.patch +Patch139: 0139-dracut.sh-check-for-logfile-logfile-option-and-creat.patch +Patch140: 0140-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch +Patch141: 0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch +Patch142: 0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch +Patch143: 0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch +Patch144: 0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch +Patch145: 0145-40network-handle-ip-ifname-static-correctly.patch BuildRequires: asciidoc BuildRequires: bash @@ -340,6 +347,13 @@ %patch136 -p1 %patch137 -p1 %patch138 -p1 +%patch139 -p1 +%patch140 -p1 +%patch141 -p1 +%patch142 -p1 +%patch143 -p1 +%patch144 -p1 +%patch145 -p1 %build %configure\ ++++++ 0139-dracut.sh-check-for-logfile-logfile-option-and-creat.patch ++++++ >From 449f9a748229f78844861194187ee36a4cccd7f2 Mon Sep 17 00:00:00 2001 From: jloeser <[email protected]> Date: Mon, 18 Aug 2014 16:19:54 +0200 Subject: dracut.sh: check for logfile (--logfile option) and create it if necessary If a logfile is passed to dracut via --logfile option and doesn't exist, dracut doesn't create it and logs nothing. Instead, dracut should try to touch the file and print a warning if creating fails. References: bnc#892191 --- dracut.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dracut.sh b/dracut.sh index 92b30bb..ffe4989 100755 --- a/dracut.sh +++ b/dracut.sh @@ -803,6 +803,12 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) # eliminate IFS hackery when messing with fw_dir fw_dir=${fw_dir//:/ } +if [[ ! -f $logfile ]];then + if [[ ! `touch $logfile > /dev/null 2>&1` ]];then + printf "%s\n" "dracut: touch $logfile failed. Couldn't create logfile." + fi +fi + # handle compression options. [[ $compress ]] || compress="gzip" case $compress in -- 1.8.4.5 ++++++ 0140-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch ++++++ >From 0151fb96092de63406f78ccfe0c2aa2c5bd04123 Mon Sep 17 00:00:00 2001 From: Thomas Renninger <[email protected]> Date: Mon, 18 Aug 2014 18:30:13 +0200 Subject: dracut.sh: Avoid duplicate devices in host_devs Signed-off-by: Thomas Renninger <[email protected]> --- dracut.sh | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/dracut.sh b/dracut.sh index ffe4989..5d3536f 100755 --- a/dracut.sh +++ b/dracut.sh @@ -221,6 +221,16 @@ push() { done } +# Fills up host_devs stack variable and makes sure there are no duplicates +push_host_devs() { + local _dev + for _dev in ${host_devs[@]}; do + [ "$_dev" = "$1" ] && return + done + push host_devs "$1" +} + + # function pop() # pops the last value from a stack # assigns value to second argument variable @@ -1007,25 +1017,25 @@ declare -A host_fs_types for line in "${fstab_lines[@]}"; do set -- $line #dev mp fs fsopts - push host_devs "$1" + push_host_devs "$1" host_fs_types["$1"]="$3" done for f in $add_fstab; do [[ -e $f ]] || continue while read dev rest; do - push host_devs "$dev" + push_host_devs "$dev" done < "$f" done for dev in $add_device; do - push host_devs "$dev" + push_host_devs "$dev" done if (( ${#add_device_l[@]} )); then while pop add_device_l val; do add_device+=" $val " - push host_devs "$val" + push_host_devs "$val" done fi @@ -1054,9 +1064,9 @@ if [[ $hostonly ]]; then _dev=$(find_block_device "$mp") _bdev=$(readlink -f "/dev/block/$_dev") [[ -b $_bdev ]] && _dev=$_bdev - push host_devs $_dev + push_host_devs $_dev [[ "$mp" == "/" ]] && root_dev="$_dev" - push host_devs "$_dev" + push_host_devs "$_dev" done if [[ $nowaitforswap != yes ]] && [[ -f /proc/swaps ]] && [[ -f /etc/fstab ]]; then @@ -1085,7 +1095,7 @@ if [[ $hostonly ]]; then done < /etc/crypttab fi - push host_devs "$(readlink -f "$dev")" + push_host_devs "$(readlink -f "$dev")" break done < /etc/fstab done < /proc/swaps @@ -1150,7 +1160,7 @@ for dev in "${!host_fs_types[@]}"; do fi if [[ $journaldev ]]; then dev="$(readlink -f "$dev")" - push host_devs "$dev" + push_host_devs "$dev" _get_fs_type "$dev" check_block_and_slaves_all _get_fs_type "$(get_maj_min "$dev")" fi -- 1.8.4.5 ++++++ 0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch ++++++ >From 0314d2a2e1483a6535db88f3038ff5a43259bafd Mon Sep 17 00:00:00 2001 From: Thomas Renninger <[email protected]> Date: Mon, 18 Aug 2014 19:06:13 +0200 Subject: iscsi: Avoid bad ip route call on empty address Without this patch it will lead to: Command line is not complete. Try option "help" error messages on specific host devs. Signed-off-by: Thomas Renninger <[email protected]> --- modules.d/95iscsi/module-setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh index f63634a..94eb023 100755 --- a/modules.d/95iscsi/module-setup.sh +++ b/modules.d/95iscsi/module-setup.sh @@ -76,6 +76,7 @@ install_iscsiroot() { esac done + [ -z "$iscsi_address" ] && return local_address=$(ip -o route get to $iscsi_address | sed -n 's/.*src \([0-9a-f.:]*\).*/\1/p') ifname=$(ip -o route get to $iscsi_address | sed -n 's/.*dev \([^ ]*\).*/\1/p') printf 'ip=%s:static ' ${ifname} -- 1.8.4.5 ++++++ 0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch ++++++ >From fac3fb787b0a74cf8d9d32939dd6d6831342a25d Mon Sep 17 00:00:00 2001 From: Julian Wolf <[email protected]> Date: Tue, 19 Aug 2014 12:39:18 +0200 Subject: 40network: Don't report error for /etc/sysconfig/network/ifroute-* during module setup Signed-off-by: Julian Wolf <[email protected]> --- modules.d/40network/module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh index 9194b1a..8d74450 100755 --- a/modules.d/40network/module-setup.sh +++ b/modules.d/40network/module-setup.sh @@ -103,7 +103,7 @@ install() { [[ $hostonly ]] && { inst_multiple /etc/sysconfig/network/ifcfg-* - inst_multiple /etc/sysconfig/network/ifroute-* + inst_multiple -o /etc/sysconfig/network/ifroute-* inst_simple /etc/sysconfig/network/routes } -- 1.8.4.5 ++++++ 0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch ++++++ >From 59ca38d9c6f8e01600c167827df8dc5dd3e140d8 Mon Sep 17 00:00:00 2001 From: Thomas Renninger <[email protected]> Date: Tue, 19 Aug 2014 15:59:21 +0200 Subject: iscsi: Fix up ipv6 in brackets, iterate over all possible needed iscsi mounts for_each_host_dev_and_slaves only iterates over the rootfs, this one is successful and then it exits. This does not work if the --mount option is passed on a iscsi target. Now really iterate over all host_devs via: for_each_host_dev_and_slaves_all and set needed iscsi kernel commandline accordingly. Now also the parent block device, e.g. /dev/sda and /dev/sda4 are iterated which results in duplicated iscsi parameters. Avoid this by piping the final iscsi cmdline function through | sort |uniq Signed-off-by: Thomas Renninger <[email protected]> --- modules.d/95iscsi/module-setup.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh index 94eb023..9772210 100755 --- a/modules.d/95iscsi/module-setup.sh +++ b/modules.d/95iscsi/module-setup.sh @@ -93,6 +93,12 @@ install_iscsiroot() { if [ -n "$iscsi_lun" -a "$iscsi_lun" -eq 0 ] ; then iscsi_lun= fi + # In IPv6 case rd.iscsi.initatior= must pass address in [] brackets + case "$iscsi_address" in + *:*) + iscsi_address="[$iscsi_address]" + ;; + esac echo "rd.iscsi.initiator=${iscsi_initiator} netroot=iscsi:${iscsi_address}::${iscsi_port}:${iscsi_lun}:${iscsi_targetname}" fi return 0 @@ -111,7 +117,7 @@ install_softiscsi() { install_iscsiroot $iscsi_dev } - for_each_host_dev_and_slaves is_softiscsi || return 255 + for_each_host_dev_and_slaves_all is_softiscsi || return 255 return 0 } @@ -194,11 +200,13 @@ installkernel() { # called by dracut cmdline() { local _iscsiconf=$(install_ibft) - if [ "$_iscsiconf" ] ; then - echo ${_iscsiconf} - else - install_softiscsi - fi + { + if [ "$_iscsiconf" ] ; then + echo ${_iscsiconf} + else + install_softiscsi + fi + } | sort | uniq } # called by dracut -- 1.8.4.5 ++++++ 0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch ++++++ >From 7f4dea242398cc369ff3fecd599faa00d81a522c Mon Sep 17 00:00:00 2001 From: Julian Wolf <[email protected]> Date: Tue, 19 Aug 2014 16:23:59 +0200 Subject: 90crypt: Fixed crypttab_contains() to also work with device path in /etc/crypttab blkid is not available when this function is called, so block_uuid.map is put into the initrd, mapping block devices from /etc/crypttab to UUIDs. This fixes a bug where udev rules were created by mistake as crypttab_contains() returned false for devices specified by path in /etc/crypttab which resulted in error messages during boot. Signed-off-by: Julian Wolf <[email protected]> --- modules.d/90crypt/crypt-lib.sh | 9 +++++++++ modules.d/90crypt/module-setup.sh | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/modules.d/90crypt/crypt-lib.sh b/modules.d/90crypt/crypt-lib.sh index f48397d..fe72914 100755 --- a/modules.d/90crypt/crypt-lib.sh +++ b/modules.d/90crypt/crypt-lib.sh @@ -7,11 +7,20 @@ command -v getarg >/dev/null || . /lib/dracut-lib.sh # check if the crypttab contains an entry for a LUKS UUID crypttab_contains() { local luks="$1" + local _uuid _line local l d rest if [ -f /etc/crypttab ]; then while read l d rest; do strstr "${l##luks-}" "${luks##luks-}" && return 0 strstr "$d" "${luks##luks-}" && return 0 + if [ -e /usr/lib/dracut/modules.d/90crypt/block_uuid.map ]; then + # search for line starting with $d + _line=$(sed -n "\,^$d .*$,{p}" /usr/lib/dracut/modules.d/90crypt/block_uuid.map) + [ -z "$_line" ] && continue + # get second column with uuid + _uuid="$(echo $_line | sed 's,^.* \(.*$\),\1,')" + strstr "$_uuid" "${luks##luks-}" && return 0 + fi done < /etc/crypttab fi return 1 diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh index e423a95..c79dbb8 100755 --- a/modules.d/90crypt/module-setup.sh +++ b/modules.d/90crypt/module-setup.sh @@ -65,6 +65,7 @@ install() { inst_hook cleanup 30 "$moddir/crypt-cleanup.sh" fi + > /tmp/dracut_block_uuid.map if [[ $hostonly ]] && [[ -f /etc/crypttab ]]; then # filter /etc/crypttab for the devices we need while read _mapper _dev _rest; do @@ -74,6 +75,8 @@ install() { [[ $_dev == UUID=* ]] && \ _dev="/dev/disk/by-uuid/${_dev#UUID=}" + echo "$_dev $(blkid $_dev -s UUID -o value)" >> /tmp/dracut_block_uuid.map + for _hdev in "${!host_fs_types[@]}"; do [[ ${host_fs_types[$_hdev]} == "crypto_LUKS" ]] || continue if [[ $_hdev -ef $_dev ]] || [[ /dev/block/$_hdev -ef $_dev ]]; then @@ -85,6 +88,7 @@ install() { fi inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh" + inst_simple "/tmp/dracut_block_uuid.map" "/usr/lib/dracut/modules.d/90crypt/block_uuid.map" inst_multiple -o \ $systemdutildir/system-generators/systemd-cryptsetup-generator \ -- 1.8.4.5 ++++++ 0145-40network-handle-ip-ifname-static-correctly.patch ++++++ >From 4b0e5841ce7dbeca5186e0d47f8835b00007cd6e Mon Sep 17 00:00:00 2001 From: Hannes Reinecke <[email protected]> Date: Thu, 21 Aug 2014 12:46:45 +0200 Subject: 40network: handle 'ip=ifname:static' correctly 'static' configuration means 'apply the settings from the ifcfg file'. Which might be either static or dhcp. And for multiple configurations the first configuration can be either dhcp or static; only the following configurations must be static. References: bnc#892801 Signed-off-by: Hannes Reinecke <[email protected]> --- modules.d/40network/ifup.sh | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh index 0362287..5cd4f68 100755 --- a/modules.d/40network/ifup.sh +++ b/modules.d/40network/ifup.sh @@ -178,11 +178,13 @@ do_dhcp() { info "Preparation for DHCP transaction" + [ -d /var/lib/wicked ] || mkdir -p /var/lib/wicked + local dhclient='' - if [ "$1" = "-4" ] ; then - dhclient="wickedd-dhcp4" - elif [ "$1" = "-6" ] ; then + if [ "$1" = "-6" ] ; then dhclient="wickedd-dhcp6" + else + dhclient="wickedd-dhcp4" fi if ! iface_has_link $netif; then @@ -226,33 +228,49 @@ do_ipv6auto() { return 0 } -# Handle static ip configuration -do_static() { +# Handle ip configuration via ifcfg files +do_ifcfg() { if [ "$autoconf" = "static" ] && [ -e /etc/sysconfig/network/ifcfg-${netif} ] ; then # Pull in existing static configuration . /etc/sysconfig/network/ifcfg-${netif} + # The first configuration can be anything + [ -n "$PREFIXLEN" ] && prefix=${PREFIXLEN} + [ -n "$MTU" ] && mtu=${MTU} + [ -n "$REMOTE_IPADDR" ] && server=${REMOTE_IPADDR} + [ -n "$GATEWAY" ] && gw=${GATEWAY} + [ -n "$BOOTPROTO" ] && autoconf=${BOOTPROTO} + case "$autoconf" in + dhcp6) + load_ipv6 + do_dhcp -6 ;; + dhcp*) + do_dhcp -4 ;; + *) + do_static ;; + esac # loop over all configurations in ifcfg-$netif (IPADDR*) and apply for conf in ${!IPADDR@}; do ip=${!conf} [ -z "$ip" ] && continue ext=${conf#IPADDR} - concat="PREFIXLEN$ext" && [ -n "${!concat}" ] && mtu=${!concat} + concat="PREFIXLEN$ext" && [ -n "${!concat}" ] && prefix=${!concat} concat="MTU$ext" && [ -n "${!concat}" ] && mtu=${!concat} concat="REMOTE_IPADDR$ext" && [ -n "${!concat}" ] && server=${!concat} concat="GATEWAY$ext" && [ -n "${!concat}" ] && gw=${!concat} - concat="BOOTPROTO$ext" && [ -n "${!concat}" ] && autoconf=${!concat} - do_static_setup + # Additional configurations must be static + do_static done else - do_static_setup + do_static fi return 0 } -do_static_setup() { +# Handle static ip configuration +do_static() { strglobin $ip '*:*:*' && load_ipv6 linkup $netif @@ -475,6 +493,8 @@ for p in $(getargs ip=); do do_dhcp -6 ;; auto6) do_ipv6auto ;; + static) + do_ifcfg ;; *) do_static ;; esac -- 1.8.4.5 -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
