diff --git a/SOURCES/0361-iscsi-iscsiroot.sh-better-put-variables-in-quotes.patch b/SOURCES/0361-iscsi-iscsiroot.sh-better-put-variables-in-quotes.patch new file mode 100644 index 0000000..9622557 --- /dev/null +++ b/SOURCES/0361-iscsi-iscsiroot.sh-better-put-variables-in-quotes.patch @@ -0,0 +1,126 @@ +From 2f20797a40104bfa133e7e5bfcf2d916b34413e5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 12 Nov 2015 11:42:13 +0100 +Subject: [PATCH] iscsi/iscsiroot.sh: better put variables in quotes + +first rule for a bash programmer +--- + modules.d/95iscsi/iscsiroot.sh | 62 +++++++++++++++++++++--------------------- + 1 file changed, 31 insertions(+), 31 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index ea1bead..ce8f547 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -78,23 +78,23 @@ handle_netroot() + + # override conf settings by command line options + arg=$(getargs rd.iscsi.initiator -d iscsi_initiator=) +- [ -n "$arg" ] && iscsi_initiator=$arg ++ [ -n "$arg" ] && iscsi_initiator="$arg" + arg=$(getargs rd.iscsi.target.name -d iscsi_target_name=) +- [ -n "$arg" ] && iscsi_target_name=$arg ++ [ -n "$arg" ] && iscsi_target_name="$arg" + arg=$(getargs rd.iscsi.target.ip -d iscsi_target_ip) +- [ -n "$arg" ] && iscsi_target_ip=$arg ++ [ -n "$arg" ] && iscsi_target_ip="$arg" + arg=$(getargs rd.iscsi.target.port -d iscsi_target_port=) +- [ -n "$arg" ] && iscsi_target_port=$arg ++ [ -n "$arg" ] && iscsi_target_port="$arg" + arg=$(getargs rd.iscsi.target.group -d iscsi_target_group=) +- [ -n "$arg" ] && iscsi_target_group=$arg ++ [ -n "$arg" ] && iscsi_target_group="$arg" + arg=$(getargs rd.iscsi.username -d iscsi_username=) +- [ -n "$arg" ] && iscsi_username=$arg ++ [ -n "$arg" ] && iscsi_username="$arg" + arg=$(getargs rd.iscsi.password -d iscsi_password) +- [ -n "$arg" ] && iscsi_password=$arg ++ [ -n "$arg" ] && iscsi_password="$arg" + arg=$(getargs rd.iscsi.in.username -d iscsi_in_username=) +- [ -n "$arg" ] && iscsi_in_username=$arg ++ [ -n "$arg" ] && iscsi_in_username="$arg" + arg=$(getargs rd.iscsi.in.password -d iscsi_in_password=) +- [ -n "$arg" ] && iscsi_in_password=$arg ++ [ -n "$arg" ] && iscsi_in_password="$arg" + for p in $(getargs rd.iscsi.param -d iscsi_param); do + iscsi_param="$iscsi_param --param $p" + done +@@ -109,9 +109,9 @@ handle_netroot() + # XXX is this needed? + getarg ro && iscsirw=ro + getarg rw && iscsirw=rw +- fsopts=${fsopts:+$fsopts,}${iscsirw} ++ fsopts="${fsopts:+$fsopts,}${iscsirw}" + +- if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] && ! [ -f /tmp/iscsi_set_initiator ]; then ++ if [ -z "$iscsi_initiator" ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] && ! [ -f /tmp/iscsi_set_initiator ]; then + iscsi_initiator=$(while read line || [ -n "$line" ]; do echo $line;done < /sys/firmware/ibft/initiator/initiator-name) + echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi + rm -f /etc/iscsi/initiatorname.iscsi +@@ -122,14 +122,14 @@ handle_netroot() + > /tmp/iscsi_set_initiator + fi + +- if [ -z $iscsi_initiator ]; then ++ if [ -z "$iscsi_initiator" ]; then + [ -f /run/initiatorname.iscsi ] && . /run/initiatorname.iscsi + [ -f /etc/initiatorname.iscsi ] && . /etc/initiatorname.iscsi + [ -f /etc/iscsi/initiatorname.iscsi ] && . /etc/iscsi/initiatorname.iscsi + iscsi_initiator=$InitiatorName + fi + +- if [ -z $iscsi_initiator ]; then ++ if [ -z "$iscsi_initiator" ]; then + iscsi_initiator=$(iscsi-iname) + echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi + rm -f /etc/iscsi/initiatorname.iscsi +@@ -184,15 +184,15 @@ handle_netroot() + --description="Login iSCSI Target $iscsi_target_name" \ + --unit="$netroot_enc" -- \ + $(command -v iscsistart) \ +- -i $iscsi_initiator -t $iscsi_target_name \ +- -g $iscsi_target_group -a $iscsi_target_ip \ +- -p $iscsi_target_port \ +- ${iscsi_username:+-u $iscsi_username} \ +- ${iscsi_password:+-w $iscsi_password} \ +- ${iscsi_in_username:+-U $iscsi_in_username} \ +- ${iscsi_in_password:+-W $iscsi_in_password} \ +- ${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \ +- ${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \ ++ -i "$iscsi_initiator" -t "$iscsi_target_name" \ ++ -g "$iscsi_target_group" -a "$iscsi_target_ip" \ ++ -p "$iscsi_target_port" \ ++ ${iscsi_username:+-u "$iscsi_username"} \ ++ ${iscsi_password:+-w "$iscsi_password"} \ ++ ${iscsi_in_username:+-U "$iscsi_in_username"} \ ++ ${iscsi_in_password:+-W "$iscsi_in_password"} \ ++ ${iscsi_iface_name:+--param "iface.iscsi_ifacename=$iscsi_iface_name"} \ ++ ${iscsi_netdev_name:+--param "iface.net_ifacename=$iscsi_netdev_name"} \ + ${iscsi_param} >/dev/null 2>&1 \ + && { > $hookdir/initqueue/work ; } + else +@@ -201,15 +201,15 @@ handle_netroot() + fi + fi + else +- iscsistart -i $iscsi_initiator -t $iscsi_target_name \ +- -g $iscsi_target_group -a $iscsi_target_ip \ +- -p $iscsi_target_port \ +- ${iscsi_username:+-u $iscsi_username} \ +- ${iscsi_password:+-w $iscsi_password} \ +- ${iscsi_in_username:+-U $iscsi_in_username} \ +- ${iscsi_in_password:+-W $iscsi_in_password} \ +- ${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \ +- ${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \ ++ iscsistart -i "$iscsi_initiator" -t "$iscsi_target_name" \ ++ -g "$iscsi_target_group" -a "$iscsi_target_ip" \ ++ -p "$iscsi_target_port" \ ++ ${iscsi_username:+-u "$iscsi_username"} \ ++ ${iscsi_password:+-w "$iscsi_password"} \ ++ ${iscsi_in_username:+-U "$iscsi_in_username"} \ ++ ${iscsi_in_password:+-W "$iscsi_in_password"} \ ++ ${iscsi_iface_name:+--param "iface.iscsi_ifacename=$iscsi_iface_name"} \ ++ ${iscsi_netdev_name:+--param "iface.net_ifacename=$iscsi_netdev_name"} \ + ${iscsi_param} \ + && { > $hookdir/initqueue/work ; } + fi diff --git a/SOURCES/0362-network-fix-carrier-detection.patch b/SOURCES/0362-network-fix-carrier-detection.patch new file mode 100644 index 0000000..62e6b7f --- /dev/null +++ b/SOURCES/0362-network-fix-carrier-detection.patch @@ -0,0 +1,169 @@ +From 17985b2575c10b488e7af2aeef160b41a97b2358 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 14 Dec 2015 13:10:05 +0100 +Subject: [PATCH] network: fix carrier detection + +rename iface_has_link() to iface_has_carrier() to clarify usage + +Only assign static "wildcard interface" settings, if the interface has a +carrier. + +If the interface name was specified with a name, do not do carrier +checking for static configurations. + +(cherry picked from commit df95b1003c8e7564da73de92403013763eb028fe) +--- + modules.d/40network/ifup.sh | 42 ++++++++++++++++++++----------------- + modules.d/40network/net-lib.sh | 47 ++++++++++++++++++++++++++---------------- + 2 files changed, 52 insertions(+), 37 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 7c06cd8..3055198 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -105,7 +105,7 @@ do_dhcp() { + + [ -e /tmp/dhclient.$netif.pid ] && return 0 + +- if ! iface_has_link $netif; then ++ if ! iface_has_carrier $netif; then + warn "No carrier detected on interface $netif" + return 1 + fi +@@ -155,7 +155,10 @@ do_ipv6auto() { + do_static() { + strstr $ip '*:*:*' && load_ipv6 + +- if ! linkup $netif; then ++ if [ -z "$dev" ] && ! iface_has_carrier "$netif"; then ++ warn "No carrier detected on interface $netif" ++ return 1 ++ elif ! linkup "$netif"; then + warn "Could not bring interface $netif up!" + return 1 + fi +@@ -398,27 +401,28 @@ for p in $(getargs ip=); do + done + ret=$? + +- > /tmp/net.${netif}.up ++ if [ $ret -eq 0 ]; then ++ > /tmp/net.${netif}.up + +- if [ -e /sys/class/net/${netif}/address ]; then +- > /tmp/net.$(cat /sys/class/net/${netif}/address).up +- fi ++ if [ -e /sys/class/net/${netif}/address ]; then ++ > /tmp/net.$(cat /sys/class/net/${netif}/address).up ++ fi + +- case $autoconf in +- dhcp|on|any|dhcp6) ++ case $autoconf in ++ dhcp|on|any|dhcp6) + ;; +- *) +- if [ $ret -eq 0 ]; then +- setup_net $netif +- source_hook initqueue/online $netif +- if [ -z "$manualup" ]; then +- /sbin/netroot $netif ++ *) ++ if [ $ret -eq 0 ]; then ++ setup_net $netif ++ source_hook initqueue/online $netif ++ if [ -z "$manualup" ]; then ++ /sbin/netroot $netif ++ fi + fi +- fi +- ;; +- esac +- +- exit 0 ++ ;; ++ esac ++ exit $ret ++ fi + done + + # netif isn't the top stack? Then we should exit here. +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 995d32f..07ea570 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -531,22 +531,20 @@ wait_for_if_up() { + + while [ $cnt -lt $timeout ]; do + li=$(ip -o link show up dev $1) +- if ! strstr "$li" "NO-CARRIER"; then +- if [ -n "$li" ]; then +- case "$li" in +- *\*) +- return 0;; +- *\<*,UP,*\>*) +- return 0;; +- esac +- fi +- if strstr "$li" "LOWER_UP" \ +- && strstr "$li" "state UNKNOWN" \ +- && ! strstr "$li" "DORMANT"; then +- return 0 +- fi ++ if [ -n "$li" ]; then ++ case "$li" in ++ *\*) ++ return 0;; ++ *\<*,UP,*\>*) ++ return 0;; ++ esac ++ fi ++ if strstr "$li" "LOWER_UP" \ ++ && strstr "$li" "state UNKNOWN" \ ++ && ! strstr "$li" "DORMANT"; then ++ return 0 + fi + sleep 0.1 + cnt=$(($cnt+1)) +@@ -614,7 +612,7 @@ hostname() { + cat /proc/sys/kernel/hostname + } + +-iface_has_link() { ++iface_has_carrier() { + local cnt=0 + local interface="$1" flags="" + [ -n "$interface" ] || return 2 +@@ -625,14 +623,27 @@ iface_has_link() { + timeout=$(($timeout*10)) + + linkup "$1" ++ ++ li=$(ip -o link show up dev $1) ++ strstr "$li" "NO-CARRIER" && _no_carrier_flag=1 ++ + while [ $cnt -lt $timeout ]; do +- [ "$(cat $interface/carrier)" = 1 ] && return 0 ++ if [ -n "$_no_carrier_flag" ]; then ++ # NO-CARRIER flag was cleared ++ strstr "$li" "NO-CARRIER" || return 0 ++ fi ++ # double check the syscfs carrier flag ++ [ -e "$interface/carrier" ] && [ "$(cat $interface/carrier)" = 1 ] && return 0 + sleep 0.1 + cnt=$(($cnt+1)) + done + return 1 + } + ++iface_has_link() { ++ iface_has_carrier "$@" ++} ++ + find_iface_with_link() { + local iface_path="" iface="" + for iface_path in /sys/class/net/*; do diff --git a/SOURCES/0363-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch b/SOURCES/0363-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch new file mode 100644 index 0000000..a495877 --- /dev/null +++ b/SOURCES/0363-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch @@ -0,0 +1,27 @@ +From 28665b4fa55f18760ade77602d69f892d86b0bbd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Jan 2016 16:59:42 +0100 +Subject: [PATCH] dracut-functions.sh:fix check_vol_slaves() volume group name + stripping + +commit 466a59984a095f33993cffd5a3bea40826469b03 removed whitespace +stripping from lvm volume group names. + +(cherry picked from commit 2fd8588da51a0e43684852dcdabe327aca684a9f) +--- + dracut-functions.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 9218779..d71ff67 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -687,7 +687,7 @@ check_vol_slaves() { + if [[ $_lv = $2 ]]; then + _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null) + # strip space +- _vg=$(printf "%s\n" "$_vg") ++ _vg="${_vg//[[:space:]]/}" + if [[ $_vg ]]; then + for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null) + do diff --git a/SOURCES/0364-multipath-fix-majmin_to_mpath_dev.patch b/SOURCES/0364-multipath-fix-majmin_to_mpath_dev.patch new file mode 100644 index 0000000..f6367e7 --- /dev/null +++ b/SOURCES/0364-multipath-fix-majmin_to_mpath_dev.patch @@ -0,0 +1,40 @@ +From 851946468adf0bc80b9c66b10ae586449b51275f Mon Sep 17 00:00:00 2001 +From: Pekka Wallendahl +Date: Mon, 18 Jan 2016 20:28:22 +0200 +Subject: [PATCH] multipath: fix majmin_to_mpath_dev() + +* Multipath device names only start with the mpath-prefix if the option + use_userfriendly_names is set true in /etc/multipath.conf and if user + has not set any aliases in the said file. Thus the for-loop should go + through all files in /dev/mapper/, not just ones starting with 'mpath' + +* Bash is perfectly capable to extend `/dev/mapper/*` notation without a + need to pass it to an external ls + +* Changed the function to use a local variable $_dev instead of the + global $dev, which seemed to be the original intention as the local + _dev was defined but not used + +(cherry picked from commit 28058a2e373eb268d9b1cd5b65c2ad607961dad1) +--- + modules.d/90multipath/module-setup.sh | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index 4971d18..3983b7b 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -11,9 +11,10 @@ is_mpath() { + + majmin_to_mpath_dev() { + local _dev +- for i in `ls -1 /dev/mapper/mpath*`; do +- dev=$(get_maj_min $i) +- if [ "$dev" = "$1" ]; then ++ for i in /dev/mapper/*; do ++ [[ $i == /dev/mapper/control ]] && continue ++ _dev=$(get_maj_min $i) ++ if [ "$_dev" = "$1" ]; then + echo $i + return + fi diff --git a/SOURCES/0365-90lvm-Install-dm-snapshot-module.patch b/SOURCES/0365-90lvm-Install-dm-snapshot-module.patch new file mode 100644 index 0000000..44f7667 --- /dev/null +++ b/SOURCES/0365-90lvm-Install-dm-snapshot-module.patch @@ -0,0 +1,28 @@ +From 69762959aeed366368d50443d0d23c78ddfded8e Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Thu, 11 Dec 2014 15:46:13 +0100 +Subject: [PATCH] 90lvm: Install dm-snapshot module + +bnc#888530 + +Signed-off-by: Thomas Renninger +(cherry picked from commit 5c84d51b3f258af9035a4031c6b482103adea4d9) +--- + modules.d/90lvm/module-setup.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 90bc39f..5e374fb 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -42,6 +42,10 @@ cmdline() { + done + } + ++installkernel() { ++ instmods dm-snapshot ++} ++ + # called by dracut + install() { + local _i diff --git a/SOURCES/0366-systemd-add-wheel-and-adm-to-passwd-and-group.patch b/SOURCES/0366-systemd-add-wheel-and-adm-to-passwd-and-group.patch new file mode 100644 index 0000000..1e72c31 --- /dev/null +++ b/SOURCES/0366-systemd-add-wheel-and-adm-to-passwd-and-group.patch @@ -0,0 +1,64 @@ +From ba977abe6305b23fb2bec41798259a78185abaaa Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 29 Feb 2016 11:52:37 +0100 +Subject: [PATCH] systemd: add "wheel" and "adm" to passwd and group + + # LANG=C journalctl -b -u systemd-tmpfiles-setup-dev.service | grep + # ACL + Dec 01 13:56:59 localhost.localdomain systemd-tmpfiles[112]: Failed +to parse ACL "d:group:adm:r-x,d:group:wheel:r-x": Invalid argument. +Ignoring + Dec 01 13:56:59 localhost.localdomain systemd-tmpfiles[112]: Failed +to parse ACL "group:adm:r-x,group:wheel:r-x": Invalid argument. Ignoring + Dec 01 13:56:59 localhost.localdomain systemd-tmpfiles[112]: Failed +to parse ACL "d:group:adm:r-x,d:group:wheel:r-x": Invalid argument. +Ignoring + Dec 01 13:56:59 localhost.localdomain systemd-tmpfiles[112]: Failed +to parse ACL "group:adm:r-x,group:wheel:r-x": Invalid argument. Ignoring + + # grep ^[aA] /usr/lib/tmpfiles.d/systemd.conf + a+ /run/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x + A+ /run/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x + a+ /var/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x + A+ /var/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x + +https://bugzilla.redhat.com/show_bug.cgi?id=1287537 +--- + modules.d/98systemd/module-setup.sh | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index a656fe0..647315f 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -22,6 +22,17 @@ installkernel() { + instmods -s efivarfs + } + ++ ++ug_check_and_add() { ++ local name="$1" ++ local file="$2" ++ ++ if egrep -q "^$name:" "$file" 2>/dev/null \ ++ && ! egrep -q "^$name:" "$initdir$file" 2>/dev/null; then ++ egrep "^$name:" "$file" 2>/dev/null >> "$initdir$file" ++ fi ++} ++ + install() { + local _mods + +@@ -30,6 +41,12 @@ install() { + exit 1 + fi + ++ ug_check_and_add "wheel" "/etc/passwd" ++ ug_check_and_add "wheel" "/etc/group" ++ ++ ug_check_and_add "adm" "/etc/passwd" ++ ug_check_and_add "adm" "/etc/group" ++ + inst_multiple -o \ + $systemdutildir/systemd \ + $systemdutildir/systemd-cgroups-agent \ diff --git a/SOURCES/0367-dracut-add-tar-and-dd-requirement.patch b/SOURCES/0367-dracut-add-tar-and-dd-requirement.patch new file mode 100644 index 0000000..53c54dd --- /dev/null +++ b/SOURCES/0367-dracut-add-tar-and-dd-requirement.patch @@ -0,0 +1,22 @@ +From de8cc25d70385725b5652dff9f308896084c00b8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 29 Feb 2016 11:55:25 +0100 +Subject: [PATCH] dracut: add "tar" and "dd" requirement + +https://bugzilla.redhat.com/show_bug.cgi?id=1285810 +--- + dracut.spec | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.spec b/dracut.spec +index ad737c2..c937909 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -91,6 +91,7 @@ Requires: gzip xz + Requires: kmod + Requires: sed + Requires: kpartx ++Requires: tar dd + + %if 0%{?fedora} || 0%{?rhel} > 6 + Requires: util-linux >= 2.21 diff --git a/SOURCES/0368-dracut.sh-for-microcode-generation-skip-gpg-files.patch b/SOURCES/0368-dracut.sh-for-microcode-generation-skip-gpg-files.patch new file mode 100644 index 0000000..124e414 --- /dev/null +++ b/SOURCES/0368-dracut.sh-for-microcode-generation-skip-gpg-files.patch @@ -0,0 +1,30 @@ +From 3a39dd027f1574bdddb664d14dd592d23ce7eef1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 18 Nov 2015 10:58:54 +0100 +Subject: [PATCH] dracut.sh: for microcode generation, skip gpg files + +skip all ".asc" files for the AMD microcode generation + +(cherry picked from commit c44d2252bb4b9e72f2b058f8c185698e88dc8374) +--- + dracut.sh | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 5b72221..6bbde70 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1497,7 +1497,12 @@ if [[ $early_microcode = yes ]]; then + [ -e "$i" ] && break + break 2 + done +- cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]} ++ for i in $_fwdir/$_fw/$_src; do ++ [[ -e "$i" ]] || continue ++ # skip gpg files ++ str_ends "$i" ".asc" && continue ++ cat "$i" >> $_dest_dir/${ucode_dest[$idx]} ++ done + create_early_cpio="yes" + fi + done diff --git a/SOURCES/0369-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch b/SOURCES/0369-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch new file mode 100644 index 0000000..cd4f00f --- /dev/null +++ b/SOURCES/0369-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch @@ -0,0 +1,43 @@ +From 9d030e4ef1037b0f3a75833f96803a341b084983 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 29 Feb 2016 13:12:02 +0100 +Subject: [PATCH] documentation: "--hostonly-i18n" "--no-hostonly-i18n" + "i18n_install_all" + +(cherry picked from commit fe6455a6e8f4b070ffa8116ef26d423a25d56049) +--- + dracut.8.asc | 6 ++++++ + dracut.conf.5.asc | 3 +++ + 2 files changed, 9 insertions(+) + +diff --git a/dracut.8.asc b/dracut.8.asc +index 14ce26b..5f68d16 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -306,6 +306,12 @@ provide a valid _/etc/fstab_. + **--no-hostonly-cmdline**: + Do not store kernel command line arguments needed in the initramfs + ++**--hostonly-i18n**: ++ Install only needed keyboard and font files according to the host configuration (default). ++ ++**--no-hostonly-i18n**: ++ Install all keyboard and font files available. ++ + **--persistent-policy** __:: + Use __ to address disks and partitions. + __ can be any directory name found in /dev/disk. +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index be62da9..99f70ff 100644 +--- a/dracut.conf.5.asc ++++ b/dracut.conf.5.asc +@@ -79,6 +79,9 @@ Configuration files must have the extension .conf; other extensions are ignored. + *hostonly_cmdline*"__{yes|no}__":: + If set, store the kernel command line arguments needed in the initramfs + ++*i18n_install_all=*"__{yes|no}__":: ++ If set to yes, install all available fonts and keyboard files. ++ + *persistent_policy=*"____":: + Use __ to address disks and partitions. + __ can be any directory name found in /dev/disk. diff --git a/SOURCES/0370-network-dhclient-script.sh-add-classless-static-rout.patch b/SOURCES/0370-network-dhclient-script.sh-add-classless-static-rout.patch new file mode 100644 index 0000000..37ace1a --- /dev/null +++ b/SOURCES/0370-network-dhclient-script.sh-add-classless-static-rout.patch @@ -0,0 +1,90 @@ +From a48ea27debb926a30810c9f1a42f096494c727e2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 29 Feb 2016 14:52:16 +0100 +Subject: [PATCH] network/dhclient-script.sh: add classless-static-routes + support + +https://bugzilla.redhat.com/show_bug.cgi?id=1260955 +--- + modules.d/40network/dhclient-script.sh | 48 ++++++++++++++++++++++++++++++++++ + modules.d/40network/dhclient.conf | 5 +++- + 2 files changed, 52 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 6d4b9dd..9553858 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -95,6 +95,51 @@ setup_interface6() { + [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname + } + ++function parse_option_121() { ++ while [ $# -ne 0 ]; do ++ mask="$1" ++ shift ++ ++ # Is the destination a multicast group? ++ if [ $1 -ge 224 -a $1 -lt 240 ]; then ++ multicast=1 ++ else ++ multicast=0 ++ fi ++ ++ # Parse the arguments into a CIDR net/mask string ++ if [ $mask -gt 24 ]; then ++ destination="$1.$2.$3.$4/$mask" ++ shift; shift; shift; shift ++ elif [ $mask -gt 16 ]; then ++ destination="$1.$2.$3.0/$mask" ++ shift; shift; shift ++ elif [ $mask -gt 8 ]; then ++ destination="$1.$2.0.0/$mask" ++ shift; shift ++ else ++ destination="$1.0.0.0/$mask" ++ shift ++ fi ++ ++ # Read the gateway ++ gateway="$1.$2.$3.$4" ++ shift; shift; shift; shift ++ ++ # Multicast routing on Linux ++ # - If you set a next-hop address for a multicast group, this breaks with Cisco switches ++ # - If you simply leave it link-local and attach it to an interface, it works fine. ++ if [ $multicast -eq 1 ]; then ++ temp_result="$destination dev $interface" ++ else ++ temp_result="$destination via $gateway dev $interface" ++ fi ++ ++ echo "/sbin/ip route add $temp_result" ++ done ++} ++ ++ + case $reason in + PREINIT) + echo "dhcp: PREINIT $netif up" +@@ -129,6 +174,9 @@ case $reason in + { + echo '. /lib/net-lib.sh' + echo "setup_net $netif" ++ if [ -n "$new_classless_static_routes" ]; then ++ modify_routes add "$(parse_option_121 $new_classless_static_routes)" ++ fi + echo "source_hook initqueue/online $netif" + [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif" + echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh" +diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf +index dbf5882..7b06763 100644 +--- a/modules.d/40network/dhclient.conf ++++ b/modules.d/40network/dhclient.conf +@@ -1,3 +1,6 @@ ++ ++option classless-routes code 121 = array of unsigned integer 8; ++ + request subnet-mask, broadcast-address, time-offset, routers, + domain-name, domain-name-servers, domain-search, host-name, +- root-path, interface-mtu; ++ root-path, interface-mtu classless-routes; diff --git a/SOURCES/0371-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch b/SOURCES/0371-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch new file mode 100644 index 0000000..263420e --- /dev/null +++ b/SOURCES/0371-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch @@ -0,0 +1,46 @@ +From 0d7b00a230a48cad8708893ee1bcc866425d573a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 26 Jan 2016 12:26:03 +0100 +Subject: [PATCH] network: if rd.neednet=0 we don't need a bootdev + +otherwise dracut would wait for the bootdev interface to appear and be +setup + +(cherry picked from commit f4f8fb5c10cc8d0047123324197aff25f0a63e04) +--- + modules.d/40network/parse-ip-opts.sh | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index 7c403f7..3c96204 100755 +--- a/modules.d/40network/parse-ip-opts.sh ++++ b/modules.d/40network/parse-ip-opts.sh +@@ -42,6 +42,8 @@ if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then + #[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines" + echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf + info "Multiple ip= arguments: assuming rd.neednet=1" ++else ++ unset NEEDBOOTDEV + fi + + # Check ip= lines +@@ -50,17 +52,14 @@ for p in $(getargs ip=); do + ip_to_var $p + + # make first device specified the BOOTDEV +- if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then ++ if [ -n "$NEEDBOOTDEV" ] && [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then + BOOTDEV="$dev" +- [ -n "$NEEDBOOTDEV" ] && info "Setting bootdev to '$BOOTDEV'" ++ info "Setting bootdev to '$BOOTDEV'" + fi + + # skip ibft since we did it above + [ "$autoconf" = "ibft" ] && continue + +- # We need to have an ip= line for the specified bootdev +- [ -n "$NEEDBOOTDEV" ] && [ "$dev" = "$BOOTDEV" ] && BOOTDEVOK=1 +- + # Empty autoconf defaults to 'dhcp' + if [ -z "$autoconf" ] ; then + warn "Empty autoconf values default to dhcp" diff --git a/SOURCES/0372-url-lib-url-lib.sh-nfs_fetch_url-pass-file-directory.patch b/SOURCES/0372-url-lib-url-lib.sh-nfs_fetch_url-pass-file-directory.patch new file mode 100644 index 0000000..8740a9e --- /dev/null +++ b/SOURCES/0372-url-lib-url-lib.sh-nfs_fetch_url-pass-file-directory.patch @@ -0,0 +1,26 @@ +From 043d61b54223ed6f9ef7faa2b9c01750272948c3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 14 Mar 2016 15:55:03 +0100 +Subject: [PATCH] url-lib/url-lib.sh:nfs_fetch_url(): pass file directory to + query if nfs is already mounted + +Otherwise the returned mount path includes the file with the directory + +https://bugzilla.redhat.com/show_bug.cgi?id=1302764 +--- + modules.d/45url-lib/url-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh +index 12df9b4..f3d152d 100755 +--- a/modules.d/45url-lib/url-lib.sh ++++ b/modules.d/45url-lib/url-lib.sh +@@ -106,7 +106,7 @@ nfs_fetch_url() { + local filepath="${path%/*}" filename="${path##*/}" mntdir="" + + # skip mount if server:/filepath is already mounted +- mntdir=$(nfs_already_mounted "$server" "$path") ++ mntdir=$(nfs_already_mounted "$server" "$filepath") + if [ -z "$mntdir" ]; then + local mntdir="$(mkuniqdir /run nfs_mnt)" + mount_nfs "$nfs:$server:$filepath${options:+:$options}" "$mntdir" diff --git a/SOURCES/0373-95iscsi-Autodetect-iSCSI-firmware.patch b/SOURCES/0373-95iscsi-Autodetect-iSCSI-firmware.patch new file mode 100644 index 0000000..96df389 --- /dev/null +++ b/SOURCES/0373-95iscsi-Autodetect-iSCSI-firmware.patch @@ -0,0 +1,85 @@ +From f31220ec883956f459bc227d6fe35d3a581eb369 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 25 Feb 2016 20:58:09 +0800 +Subject: [PATCH] 95iscsi: Autodetect iSCSI firmware + +Some iSCSI initiator present firmware information in +/sys/firmware/ibft or /sys/firmware/iscsi_bootX + +Whenever we detect one of those directories we should assume +that the iSCSI devices should be activated. + +Also incorporates SUSE patches: +0049: +95iscsi: Use 'ip=ibft' for ibft autoconfiguration + +For iBFT autoconfiguration we should be setting 'ip=ibft' +instead of rd.neednet. This should instruct dracut to only +enable the iBFT interfaces and leave the rest alone. + +References: bnc#879038 + +0054: +95iscsi: update commandline printing + +dracut has a separate callout 'cmdline' which should be used +for printing out the generated commandline. + +Signed-off-by: Pavel Wieczorkiewicz +Signed-off-by: Hannes Reinecke +Signed-off-by: Thomas Renninger +--- + modules.d/95iscsi/module-setup.sh | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 4ecba05..7ef0caa 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -29,6 +29,21 @@ check() { + return 0 + } + ++install_ibft() { ++ # When iBFT / iscsi_boot is detected: ++ # - Use 'ip=ibft' to set up iBFT network interface ++ # - specify firmware booting cmdline parameter ++ ++ for d in /sys/firmware/* ; do ++ if [ -d ${d}/initiator ] ; then ++ if [ ${d##*/} = "ibft" ] ; then ++ echo -n "ip=ibft " ++ fi ++ echo -n "rd.iscsi.firmware=1" ++ fi ++ done ++} ++ + depends() { + echo network rootfs-block + } +@@ -36,6 +51,12 @@ depends() { + installkernel() { + local _arch=$(uname -m) + ++ # Detect iBFT and perform mandatory steps ++ if [[ $hostonly_cmdline == "yes" ]] ; then ++ install_ibft > "${initdir}/etc/cmdline.d/95iscsi.conf" ++ echo >> "${initdir}/etc/cmdline.d/95iscsi.conf" ++ fi ++ + instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi + hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs + iscsi_module_filter() { +@@ -75,6 +96,11 @@ installkernel() { + | iscsi_module_filter | instmods + } + ++cmdline() { ++ install_ibft ++} ++ ++# called by dracut + install() { + inst_multiple umount iscsistart hostname iscsi-iname + inst_multiple -o iscsiuio diff --git a/SOURCES/0374-95iscsi-Install-libgcc_s-library.patch b/SOURCES/0374-95iscsi-Install-libgcc_s-library.patch new file mode 100644 index 0000000..ccb5601 --- /dev/null +++ b/SOURCES/0374-95iscsi-Install-libgcc_s-library.patch @@ -0,0 +1,29 @@ +From 9eab750787d7e94e53df282119640a5d2beb04e4 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 25 Feb 2016 20:58:10 +0800 +Subject: [PATCH] 95iscsi: Install libgcc_s library + +iscsiuio is using pthread, which requires libgcc_s for +pthread_cancel to work. +Without this library iscsiuio will crash with SIGABRT. + +References: bnc#881692 + +Signed-off-by: Hannes Reinecke +Signed-off-by: Thomas Renninger +--- + 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 7ef0caa..422bea7 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -104,6 +104,7 @@ cmdline() { + install() { + inst_multiple umount iscsistart hostname iscsi-iname + inst_multiple -o iscsiuio ++ inst_libdir_file 'libgcc_s.so*' + inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" + inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh" + inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" diff --git a/SOURCES/0375-95iscsi-Fixup-bnx2i-offload-booting.patch b/SOURCES/0375-95iscsi-Fixup-bnx2i-offload-booting.patch new file mode 100644 index 0000000..6ee43d0 --- /dev/null +++ b/SOURCES/0375-95iscsi-Fixup-bnx2i-offload-booting.patch @@ -0,0 +1,67 @@ +From bff5416520f950942b4040ed10281d2ccaf9f09a Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 25 Feb 2016 20:58:11 +0800 +Subject: [PATCH] 95iscsi: Fixup bnx2i offload booting + +bnx2i is using a separate iSCSI offload engine with a separate +MAC address. As a result, the iBFT information is displaying +a MAC address which does not relate to any MAC address from +the network interfaces. +In addition, the iSCSI offload engine works independently on +the NIC, so we do not need to enable the NIC for iSCSI offload +to work. +This patch modifies the automatic iBFT detection to not set +the 'ip=ibft' flag when bnx2i offload is detected. + +References: bnc#855747 + +Signed-off-by: Hannes Reinecke +Signed-off-by: Thomas Renninger +--- + modules.d/95iscsi/module-setup.sh | 26 +++++++++++++++++++++++++- + 1 file changed, 25 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 422bea7..181da3c 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -29,14 +29,38 @@ check() { + return 0 + } + ++get_ibft_mod() { ++ local ibft_mac=$1 ++ # Return the iSCSI offload module for a given MAC address ++ iscsiadm -m iface | while read iface_name iface_desc ; do ++ IFS=$',' ++ set -- $iface_desc ++ if [ "$ibft_mac" = "$2" ] ; then ++ echo $1 ++ return 0 ++ fi ++ unset IFS ++ done ++} ++ + install_ibft() { + # When iBFT / iscsi_boot is detected: + # - Use 'ip=ibft' to set up iBFT network interface ++ # Note: bnx2i is using a different MAC address of iSCSI offloading ++ # so the 'ip=ibft' parameter must not be set + # - specify firmware booting cmdline parameter + + for d in /sys/firmware/* ; do ++ if [ -d ${d}/ethernet0 ] ; then ++ read ibft_mac < ${d}/ethernet0/mac ++ ibft_mod=$(get_ibft_mod $ibft_mac) ++ fi ++ if [ -z "$ibft_mod" ] && [ -d ${d}/ethernet1 ] ; then ++ read ibft_mac < ${d}/ethernet1/mac ++ ibft_mod=$(get_ibft_mod $ibft_mac) ++ fi + if [ -d ${d}/initiator ] ; then +- if [ ${d##*/} = "ibft" ] ; then ++ if [ ${d##*/} = "ibft" ] && [ "$ibft_mod" != "bnx2i" ] ; then + echo -n "ip=ibft " + fi + echo -n "rd.iscsi.firmware=1" diff --git a/SOURCES/0376-95iscsi-More-empty-cmdline-fixes.patch b/SOURCES/0376-95iscsi-More-empty-cmdline-fixes.patch new file mode 100644 index 0000000..b80f14b --- /dev/null +++ b/SOURCES/0376-95iscsi-More-empty-cmdline-fixes.patch @@ -0,0 +1,45 @@ +From 12aa314819f2b1067442e8a7aa5d3f36301b7f47 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 25 Feb 2016 20:58:12 +0800 +Subject: [PATCH] 95iscsi: More empty cmdline fixes + +This fixes up some 95iscsi/module-setup.sh which might print out empty +commandline files. + +Signed-off-by: Hannes Reinecke +Signed-off-by: Thomas Renninger +--- + modules.d/95iscsi/module-setup.sh | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 181da3c..64c9c1d 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -75,12 +75,6 @@ depends() { + installkernel() { + local _arch=$(uname -m) + +- # Detect iBFT and perform mandatory steps +- if [[ $hostonly_cmdline == "yes" ]] ; then +- install_ibft > "${initdir}/etc/cmdline.d/95iscsi.conf" +- echo >> "${initdir}/etc/cmdline.d/95iscsi.conf" +- fi +- + instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi + hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs + iscsi_module_filter() { +@@ -129,6 +123,13 @@ install() { + inst_multiple umount iscsistart hostname iscsi-iname + inst_multiple -o iscsiuio + inst_libdir_file 'libgcc_s.so*' ++ ++ # Detect iBFT and perform mandatory steps ++ if [[ $hostonly_cmdline == "yes" ]] ; then ++ local _ibftconf=$(install_ibft) ++ [[ $_ibftconf ]] && printf "%s\n" "$_ibftconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf" ++ fi ++ + inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" + inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh" + inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" diff --git a/SOURCES/0377-95iscsi-parse-output-from-iscsiadm-correctly.patch b/SOURCES/0377-95iscsi-parse-output-from-iscsiadm-correctly.patch new file mode 100644 index 0000000..d4720da --- /dev/null +++ b/SOURCES/0377-95iscsi-parse-output-from-iscsiadm-correctly.patch @@ -0,0 +1,44 @@ +From 68021e85c982e62dd4082accf024b84da040f450 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 25 Feb 2016 20:58:13 +0800 +Subject: [PATCH] 95iscsi: parse output from iscsiadm correctly + +Due to some obsure reason the IFS parameter is not set correctly +when evaluating get_ibft_mod(). So change the parsing to not rely +on IFS altogether. + +References: bnc#886199 + +Signed-off-by: Hannes Reinecke +Signed-off-by: Thomas Renninger +--- + modules.d/95iscsi/module-setup.sh | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 64c9c1d..b1f5c6c 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -31,15 +31,16 @@ check() { + + get_ibft_mod() { + local ibft_mac=$1 ++ local iface_mac iface_mod + # Return the iSCSI offload module for a given MAC address +- iscsiadm -m iface | while read iface_name iface_desc ; do +- IFS=$',' +- set -- $iface_desc +- if [ "$ibft_mac" = "$2" ] ; then +- echo $1 ++ for iface_desc in $(iscsiadm -m iface | cut -f 2 -d ' '); do ++ iface_mod=${iface_desc%%,*} ++ iface_mac=${iface_desc#*,} ++ iface_mac=${iface_mac%%,*} ++ if [ "$ibft_mac" = "$iface_mac" ] ; then ++ echo $iface_mod + return 0 + fi +- unset IFS + done + } + diff --git a/SOURCES/0379-kernel-modules-increase-SDHCI-driver-inclusion.patch b/SOURCES/0379-kernel-modules-increase-SDHCI-driver-inclusion.patch new file mode 100644 index 0000000..13009d6 --- /dev/null +++ b/SOURCES/0379-kernel-modules-increase-SDHCI-driver-inclusion.patch @@ -0,0 +1,33 @@ +From 688afe0fc3e705a5a65e9e74f6a77e56fb364c3f Mon Sep 17 00:00:00 2001 +From: Daniel Drake +Date: Thu, 15 Jan 2015 11:27:47 -0600 +Subject: [PATCH] kernel-modules: increase SDHCI driver inclusion + +The sdhci-pci module is currently not being included in the initramfs, +even though other sdhci modules are. This breaks boot on systems that +rely on this driver to access the root filesystem. + +Instead of looking for modules that use sdhci_pltfm_init, look for +sdhci_add_host. I checked 3.18 kernel sources, and this change +does not remove any of the previously-matched SDHCI drivers. +It should result in the addition of sdhci-pci, sdhci-s3c, sdhci-spear +and sdhci-acpi. + +(cherry picked from commit 6dcc5e1158bf502b431491a381a16ca894f99ae2) +--- + modules.d/90kernel-modules/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 34d85b1..7d9d369 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -5,7 +5,7 @@ + installkernel() { + if [[ -z $drivers ]]; then + block_module_filter() { +- local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_pltfm_init' ++ local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host' + # subfunctions inherit following FDs + local _merge=8 _side2=9 + function bmf1() { diff --git a/SOURCES/0380-dracut-functions.sh-add-str_starts-and-str_ends.patch b/SOURCES/0380-dracut-functions.sh-add-str_starts-and-str_ends.patch new file mode 100644 index 0000000..5ff43b5 --- /dev/null +++ b/SOURCES/0380-dracut-functions.sh-add-str_starts-and-str_ends.patch @@ -0,0 +1,24 @@ +From 6656e1547f875253d1499bcd06ae0f6440a087c6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 25 May 2016 14:49:34 +0200 +Subject: [PATCH] dracut-functions.sh: add str_starts() and str_ends() + +--- + dracut-functions.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index d71ff67..4a9729c 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -29,6 +29,10 @@ fi + + # Generic substring function. If $2 is in $1, return 0. + strstr() { [[ $1 = *$2* ]]; } ++# returns OK if $1 contains literal string $2 at the beginning, and isn't empty ++str_starts() { [ "${1#"$2"*}" != "$1" ]; } ++# returns OK if $1 contains literal string $2 at the end, and isn't empty ++str_ends() { [ "${1%*"$2"}" != "$1" ]; } + + # helper function for check() in module-setup.sh + # to check for required installed binaries diff --git a/SOURCES/0381-test-remove-dash-module-as-it-is-not-available-in-RH.patch b/SOURCES/0381-test-remove-dash-module-as-it-is-not-available-in-RH.patch new file mode 100644 index 0000000..6ccacba --- /dev/null +++ b/SOURCES/0381-test-remove-dash-module-as-it-is-not-available-in-RH.patch @@ -0,0 +1,143 @@ +From 249a94ab048586adf4fc80bed05c4bf5cc773fd2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 1 Mar 2016 12:32:02 +0100 +Subject: [PATCH] test: remove dash module, as it is not available in RHEL + +--- + test/TEST-01-BASIC/test.sh | 2 +- + test/TEST-03-USR-MOUNT/test.sh | 2 +- + test/TEST-10-RAID/test.sh | 2 +- + test/TEST-12-RAID-DEG/test.sh | 2 +- + test/TEST-14-IMSM/test.sh | 2 +- + test/TEST-17-LVM-THIN/test.sh | 2 +- + test/TEST-30-ISCSI/test.sh | 2 +- + test/TEST-40-NBD/test.sh | 4 ++-- + test/TEST-50-MULTINIC/test.sh | 2 +- + 9 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index 642b250..aef0737 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -62,7 +62,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules base rootfs-block fs-lib kernel-modules fs-lib" \ ++ -m "udev-rules base rootfs-block fs-lib kernel-modules fs-lib" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ + --nomdadmconf \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh +index e772352..363f8b0 100755 +--- a/test/TEST-03-USR-MOUNT/test.sh ++++ b/test/TEST-03-USR-MOUNT/test.sh +@@ -89,7 +89,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules btrfs base rootfs-block fs-lib kernel-modules" \ ++ -m "udev-rules btrfs base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod" \ + --nomdadmconf \ + --nohardlink \ +diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh +index cf474df..45edda2 100755 +--- a/test/TEST-10-RAID/test.sh ++++ b/test/TEST-10-RAID/test.sh +@@ -60,7 +60,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + --nomdadmconf \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh +index 11f66b2..e749ba0 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -98,7 +98,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh +index 9465965..a600e1c 100755 +--- a/test/TEST-14-IMSM/test.sh ++++ b/test/TEST-14-IMSM/test.sh +@@ -86,7 +86,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash lvm mdraid dmraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "lvm mdraid dmraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod dm-multipath dm-crypt dm-round-robin faulty linear multipath raid0 raid10 raid1 raid456" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh +index 79e224e..dc6e588 100755 +--- a/test/TEST-17-LVM-THIN/test.sh ++++ b/test/TEST-17-LVM-THIN/test.sh +@@ -57,7 +57,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index fc4bdce..65457a5 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -186,7 +186,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ + --no-hostonly-cmdline -N \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index abf1a4f..1a6524d 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -226,7 +226,7 @@ make_encrypted_root() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 ext3 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +@@ -352,7 +352,7 @@ test_setup() { + ) + + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules rootfs-block fs-lib base debug kernel-modules" \ ++ -m "udev-rules rootfs-block fs-lib base debug kernel-modules" \ + -d "af_packet piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000" \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 4f73203..1c46d7a 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -264,7 +264,7 @@ test_setup() { + + # Make server's dracut image + $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ +- -m "dash udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ ++ -m "udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ + -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1 + diff --git a/SOURCES/0382-test-NBD-add-checks-for-needed-binaries.patch b/SOURCES/0382-test-NBD-add-checks-for-needed-binaries.patch new file mode 100644 index 0000000..7d2b10b --- /dev/null +++ b/SOURCES/0382-test-NBD-add-checks-for-needed-binaries.patch @@ -0,0 +1,44 @@ +From 15ec719501af349a3b02495d6151e3b92854572b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 1 Mar 2016 12:32:23 +0100 +Subject: [PATCH] test/NBD: add checks for needed binaries + +--- + test/TEST-40-NBD/test.sh | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index 1a6524d..848a103 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -95,7 +95,6 @@ client_test() { + } + + test_run() { +- modinfo nbd &>/dev/null || { echo "Kernel does not support nbd"; exit 1; } + if ! run_server; then + echo "Failed to start server" 1>&2 + return 1 +@@ -325,9 +324,6 @@ make_server_root() { + } + + test_setup() { +- +- modinfo nbd &>/dev/null || { echo "Kernel does not support nbd"; exit 1; } +- + make_encrypted_root || return 1 + make_client_root || return 1 + make_server_root || return 1 +@@ -370,6 +366,12 @@ kill_server() { + fi + } + ++test_check() { ++ modinfo nbd &>/dev/null || { echo "Kernel does not support nbd"; return 1; } ++ command -v nbd-client &>/dev/null || { echo "No nbd-client available"; return 1; } ++ command -v nbd-server &>/dev/null || { echo "No nbd-server available"; return 1; } ++} ++ + test_cleanup() { + kill_server + } diff --git a/SOURCES/0383-dracut.spec-add-a-tag-with-the-current-version.patch b/SOURCES/0383-dracut.spec-add-a-tag-with-the-current-version.patch new file mode 100644 index 0000000..ddaa2d5 --- /dev/null +++ b/SOURCES/0383-dracut.spec-add-a-tag-with-the-current-version.patch @@ -0,0 +1,21 @@ +From 863105bce149bf41b6c41483042d3e32ed713dfe Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 1 Mar 2016 12:33:28 +0100 +Subject: [PATCH] dracut.spec: add a tag with the current version + +--- + dracut.spec | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.spec b/dracut.spec +index c937909..5c4b047 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -203,6 +203,7 @@ git commit -a -q -m "%{version} baseline." + + # Apply all the patches. + git am -p1 %{patches} ++git tag %{version} + %endif + + %build diff --git a/SOURCES/0384-more-dash-removal.patch b/SOURCES/0384-more-dash-removal.patch new file mode 100644 index 0000000..bc60c99 --- /dev/null +++ b/SOURCES/0384-more-dash-removal.patch @@ -0,0 +1,131 @@ +From b14e0fb8267de59618dbfe4db79b12dcced6b1ec Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 1 Mar 2016 13:38:05 +0100 +Subject: [PATCH] more dash removal + +--- + test/TEST-02-SYSTEMD/test.sh | 2 +- + test/TEST-04-FULL-SYSTEMD/test.sh | 4 ++-- + test/TEST-11-LVM/test.sh | 2 +- + test/TEST-13-ENC-RAID-LVM/test.sh | 2 +- + test/TEST-15-BTRFSRAID/test.sh | 2 +- + test/TEST-20-NFS/test.sh | 4 ++-- + test/TEST-30-ISCSI/test.sh | 4 ++-- + 7 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh +index 4ebff83..47268b0 100755 +--- a/test/TEST-02-SYSTEMD/test.sh ++++ b/test/TEST-02-SYSTEMD/test.sh +@@ -58,7 +58,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ + --nomdadmconf \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh +index 3834238..01b406d 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test.sh +@@ -232,7 +232,7 @@ EOF + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules btrfs base rootfs-block fs-lib kernel-modules" \ ++ -m "udev-rules btrfs base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod" \ + --nomdadmconf \ + --nohardlink \ +@@ -264,7 +264,7 @@ EOF + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ + -a "debug systemd" \ + -I "/etc/machine-id /etc/hostname" \ +- -o "dash network plymouth lvm mdraid resume crypt i18n caps dm terminfo usrmount" \ ++ -o "network plymouth lvm mdraid resume crypt i18n caps dm terminfo usrmount" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod i6300esb ib700wdt" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 + +diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh +index c3c27bc..dd1f8ea 100755 +--- a/test/TEST-11-LVM/test.sh ++++ b/test/TEST-11-LVM/test.sh +@@ -57,7 +57,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh +index 993f71d..7f75b32 100755 +--- a/test/TEST-13-ENC-RAID-LVM/test.sh ++++ b/test/TEST-13-ENC-RAID-LVM/test.sh +@@ -94,7 +94,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "crypt lvm mdraid udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix ext2 sd_mod" \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay +diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh +index 9b97136..c086677 100755 +--- a/test/TEST-15-BTRFSRAID/test.sh ++++ b/test/TEST-15-BTRFSRAID/test.sh +@@ -58,7 +58,7 @@ test_setup() { + # We do it this way so that we do not risk trashing the host mdraid + # devices, volume groups, encrypted partitions, etc. + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash btrfs udev-rules base rootfs-block fs-lib kernel-modules" \ ++ -m "btrfs udev-rules base rootfs-block fs-lib kernel-modules" \ + -d "piix ide-gd_mod ata_piix btrfs sd_mod" \ + --nomdadmconf \ + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 +diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh +index 14350e9..49dbc10 100755 +--- a/test/TEST-20-NFS/test.sh ++++ b/test/TEST-20-NFS/test.sh +@@ -340,13 +340,13 @@ test_setup() { + + # Make server's dracut image + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -m "dash udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ ++ -m "udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000 i6300esb" \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 + + # Make client's dracut image + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -o "plymouth dash" \ ++ -o "plymouth" \ + -a "debug watchdog" \ + -d "af_packet piix ide-gd_mod ata_piix sd_mod e1000 nfs sunrpc i6300esb" \ + -f $TESTDIR/initramfs.testing $KVERSION || return 1 +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index 65457a5..5e59f0a 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -217,7 +217,7 @@ test_setup() { + inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules + ) + sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -o "dash plymouth dmraid nfs" \ ++ -o "plymouth dmraid nfs" \ + -a "debug" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod" \ + --no-hostonly-cmdline -N \ +@@ -268,7 +268,7 @@ test_setup() { + + # Make server's dracut image + $basedir/dracut.sh -l -i $TESTDIR/overlay / \ +- -a "dash udev-rules base rootfs-block fs-lib debug kernel-modules" \ ++ -a "udev-rules base rootfs-block fs-lib debug kernel-modules" \ + -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000 drbg" \ + --no-hostonly-cmdline -N \ + -f $TESTDIR/initramfs.server $KVERSION || return 1 diff --git a/SOURCES/0385-network-add-73-idrac.rules-udev-rules.patch b/SOURCES/0385-network-add-73-idrac.rules-udev-rules.patch new file mode 100644 index 0000000..ee076e1 --- /dev/null +++ b/SOURCES/0385-network-add-73-idrac.rules-udev-rules.patch @@ -0,0 +1,24 @@ +From 484aba429854bce6a601da81a8d94deebb9268ac Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 8 Jun 2016 16:19:12 +0200 +Subject: [PATCH] network: add 73-idrac.rules udev rules + +idrac USB devices want a special network name +--- + modules.d/40network/module-setup.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 6cbbe8f..75ce622 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -91,6 +91,9 @@ install() { + inst_hook cmdline 99 "$moddir/parse-ifname.sh" + inst_hook cleanup 10 "$moddir/kill-dhclient.sh" + ++ # Special network nameing for idrac USB devs ++ inst_rules 73-idrac.rules ++ + # install all config files for teaming + unset TEAM_MASTER + unset TEAM_CONFIG diff --git a/SOURCES/0386-base-dracut-lib.sh-add-trim.patch b/SOURCES/0386-base-dracut-lib.sh-add-trim.patch new file mode 100644 index 0000000..393431e --- /dev/null +++ b/SOURCES/0386-base-dracut-lib.sh-add-trim.patch @@ -0,0 +1,28 @@ +From ac422d577c1de1e94620787380932b9ccbd7b10a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 10 Jun 2016 14:31:52 +0200 +Subject: [PATCH] base/dracut-lib.sh: add trim() + +trim() to remove leading and trailing whitespace +--- + modules.d/99base/dracut-lib.sh | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index cb1ddd7..71dcedc 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -39,6 +39,13 @@ str_ends() { + [ "${1%*$2}" != "$1" ] + } + ++trim() { ++ local var="$*" ++ var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters ++ var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters ++ echo -n "$var" ++} ++ + if [ -z "$DRACUT_SYSTEMD" ]; then + + warn() { diff --git a/SOURCES/0387-network-net-genrules.sh-generate-rules-for-all-inter.patch b/SOURCES/0387-network-net-genrules.sh-generate-rules-for-all-inter.patch new file mode 100644 index 0000000..c370392 --- /dev/null +++ b/SOURCES/0387-network-net-genrules.sh-generate-rules-for-all-inter.patch @@ -0,0 +1,83 @@ +From e6ae0c61285a7ff2a5be88b276b8d0b309e0ba2e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 10 Jun 2016 14:32:48 +0200 +Subject: [PATCH] network/net-genrules.sh: generate rules for all interfaces + +previously, if "rd.neednet" and bond was specified, only the bond +interface was configured. + +https://bugzilla.redhat.com/show_bug.cgi?id=1282680 +--- + modules.d/40network/net-genrules.sh | 22 +++++++++------------- + 1 file changed, 9 insertions(+), 13 deletions(-) + +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index 750a4d7..526dd5c 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -16,7 +16,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + # bridge: attempt only the defined interface + if [ -e /tmp/bridge.info ]; then + . /tmp/bridge.info +- IFACES="$IFACES ${bridgeslaves%% *}" ++ RAW_IFACES="$RAW_IFACES $bridgeslaves" + MASTER_IFACES="$MASTER_IFACES $bridgename" + fi + +@@ -27,7 +27,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + unset bondname + . "$i" + # It is enough to fire up only one +- IFACES="$IFACES ${bondslaves%% *}" ++ RAW_IFACES="$RAW_IFACES $bondslaves" + MASTER_IFACES="$MASTER_IFACES ${bondname}" + done + +@@ -36,15 +36,17 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + unset teamslaves + unset teammaster + . "$i" +- IFACES="$IFACES ${teamslaves}" ++ RAW_IFACES="$RAW_IFACES ${teamslaves}" + MASTER_IFACES="$MASTER_IFACES ${teammaster}" + done + + if [ -e /tmp/vlan.info ]; then + . /tmp/vlan.info +- IFACES="$IFACES $phydevice" ++ RAW_IFACES="$RAW_IFACES $phydevice" + MASTER_IFACES="$MASTER_IFACES ${vlanname}" + fi ++ MASTER_IFACES="$(trim "$MASTER_IFACES")" ++ RAW_IFACES="$(trim "$RAW_IFACES")" + + if [ -z "$IFACES" ]; then + [ -e /tmp/net.ifaces ] && read IFACES < /tmp/net.ifaces +@@ -59,10 +61,10 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + runcmd="RUN+=\"/sbin/initqueue --name ifup-\$env{INTERFACE} --unique --onetime $ifup\"" + + # We have some specific interfaces to handle +- if [ -n "$IFACES" ]; then ++ if [ -n "${RAW_IFACES}${IFACES}" ]; then + echo 'SUBSYSTEM!="net", GOTO="net_end"' + echo 'ACTION!="add|change|move", GOTO="net_end"' +- for iface in $IFACES; do ++ for iface in $IFACES $RAW_IFACES; do + case "$iface" in + ??:??:??:??:??:??) # MAC address + cond="ATTR{address}==\"$iface\"" +@@ -83,13 +85,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + done + echo 'LABEL="net_end"' + +- if [ -n "$MASTER_IFACES" ]; then +- wait_ifaces=$MASTER_IFACES +- else +- wait_ifaces=$IFACES +- fi +- +- for iface in $wait_ifaces; do ++ for iface in $IFACES; do + if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then + echo "[ -f /tmp/net.${iface}.did-setup ]" >$hookdir/initqueue/finished/wait-$iface.sh + fi diff --git a/SOURCES/0388-ifup-setup-bridge-bonding-and-teaming-only-once.patch b/SOURCES/0388-ifup-setup-bridge-bonding-and-teaming-only-once.patch new file mode 100644 index 0000000..11d08f1 --- /dev/null +++ b/SOURCES/0388-ifup-setup-bridge-bonding-and-teaming-only-once.patch @@ -0,0 +1,69 @@ +From 1472b5486b8f64a023ea33f9c1821279b153d04a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 10 Jun 2016 14:34:13 +0200 +Subject: [PATCH] ifup: setup bridge, bonding and teaming only once + +if those assembled interfaces use dhcp "$iface.up" is created too late +--- + modules.d/40network/ifup.sh | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 3055198..f681336 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -204,9 +204,12 @@ fi + if [ -e /tmp/bond.${netif}.info ]; then + . /tmp/bond.${netif}.info + +- if [ "$netif" = "$bondname" ] && [ ! -e /tmp/net.$bondname.up ] ; then # We are master bond device ++ if [ "$netif" = "$bondname" ] && [ ! -e /tmp/net.$bondname.setup ] ; then # We are master bond device + modprobe bonding +- echo "+$netif" > /sys/class/net/bonding_masters ++ udevadm settle ++ if ! [ -e /sys/class/net/${netif} ]; then ++ echo "+$netif" > /sys/class/net/bonding_masters ++ fi + ip link set $netif down + + # Stolen from ifup-eth +@@ -244,12 +247,13 @@ if [ -e /tmp/bond.${netif}.info ]; then + echo $value > /sys/class/net/${netif}/bonding/$key + fi + done ++ > /tmp/net.$bondname.setup + fi + fi + + if [ -e /tmp/team.${netif}.info ]; then + . /tmp/team.${netif}.info +- if [ "$netif" = "$teammaster" ] && [ ! -e /tmp/net.$teammaster.up ] ; then ++ if [ "$netif" = "$teammaster" ] && [ ! -e /tmp/net.$teammaster.setup ] ; then + # We shall only bring up those _can_ come up + # in case of some slave is gone in active-backup mode + working_slaves="" +@@ -285,6 +289,7 @@ if [ -e /tmp/team.${netif}.info ]; then + teamdctl $teammaster port add $slave + done + ip link set dev $teammaster up ++ > /tmp/net.$teammaster.setup + fi + fi + +@@ -293,7 +298,7 @@ fi + if [ -e /tmp/bridge.info ]; then + . /tmp/bridge.info + # start bridge if necessary +- if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then ++ if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.setup ]; then + brctl addbr $bridgename + brctl setfd $bridgename 0 + for ethname in $bridgeslaves ; do +@@ -308,6 +313,7 @@ if [ -e /tmp/bridge.info ]; then + fi + brctl addif $bridgename $ethname + done ++ > /tmp/net.$bridgename.setup + fi + fi + diff --git a/SOURCES/0389-network-parse-bond.sh-handle-multiple-bond-interface.patch b/SOURCES/0389-network-parse-bond.sh-handle-multiple-bond-interface.patch new file mode 100644 index 0000000..c68adcf --- /dev/null +++ b/SOURCES/0389-network-parse-bond.sh-handle-multiple-bond-interface.patch @@ -0,0 +1,64 @@ +From fefb96f43fd6b6b76e79fda995b31e2c10884395 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 22 Jun 2016 13:21:56 +0200 +Subject: [PATCH] network/parse-bond.sh: handle multiple bond interfaces + +--- + modules.d/40network/parse-bond.sh | 25 +++++++------------------ + 1 file changed, 7 insertions(+), 18 deletions(-) + +diff --git a/modules.d/40network/parse-bond.sh b/modules.d/40network/parse-bond.sh +index 25c51b8..80b3b07 100755 +--- a/modules.d/40network/parse-bond.sh ++++ b/modules.d/40network/parse-bond.sh +@@ -10,14 +10,6 @@ + # bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr + # + +-# return if bond already parsed +-[ -n "$bondname" ] && return +- +-# Check if bond parameter is valid +-if getarg bond= >/dev/null ; then +- : +-fi +- + # We translate list of slaves to space-separated here to mwke it easier to loop over them in ifup + # Ditto for bonding options + parsebond() { +@@ -28,7 +20,6 @@ parsebond() { + v=${v#*:} + done + +- unset bondname bondslaves bondoptions + case $# in + 0) bondname=bond0; bondslaves="eth0 eth1" ;; + 1) bondname=$1; bondslaves="eth0 eth1" ;; +@@ -38,14 +29,13 @@ parsebond() { + esac + } + +-unset bondname bondslaves bondoptions +- + # Parse bond for bondname, bondslaves, bondmode and bondoptions +-if getarg bond >/dev/null; then +- # Read bond= parameters if they exist +- bond="$(getarg bond=)" +- if [ ! "$bond" = "bond" ]; then +- parsebond "$(getarg bond=)" ++for bond in $(getargs bond=); do ++ unset bondname ++ unset bondslaves ++ unset bondoptions ++ if [ "$bond" != "bond" ]; then ++ parsebond "$bond" + fi + # Simple default bond + if [ -z "$bondname" ]; then +@@ -57,5 +47,4 @@ if getarg bond >/dev/null; then + echo "bondname=$bondname" > /tmp/bond.${bondname}.info + echo "bondslaves=\"$bondslaves\"" >> /tmp/bond.${bondname}.info + echo "bondoptions=\"$bondoptions\"" >> /tmp/bond.${bondname}.info +- return +-fi ++done diff --git a/SOURCES/0390-TEST-50-MULTINIC-add-multiple-bond-tests.patch b/SOURCES/0390-TEST-50-MULTINIC-add-multiple-bond-tests.patch new file mode 100644 index 0000000..3124b1e --- /dev/null +++ b/SOURCES/0390-TEST-50-MULTINIC-add-multiple-bond-tests.patch @@ -0,0 +1,49 @@ +From 0b7c2400c328f9b437061f885853fb83d3f44155 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 22 Jun 2016 14:03:12 +0200 +Subject: [PATCH] TEST-50-MULTINIC: add multiple bond tests + +--- + test/TEST-50-MULTINIC/test.sh | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 1c46d7a..c0c3615 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -58,7 +58,7 @@ client_test() { + -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \ + -watchdog i6300esb -watchdog-action poweroff \ + -kernel /boot/vmlinuz-"$KVERSION" \ +- -append "$cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ ++ -append "$cmdline $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ + -initrd "$TESTDIR"/initramfs.testing + + { read OK; read IFACES; } < "$TESTDIR"/client.img +@@ -102,6 +102,7 @@ test_client() { + # ...:00-02 receive IP adresses all others don't + # ...:02 receives a dhcp root-path + ++ # Require three interfaces with dhcp root-path + # PXE Style BOOTIF= + client_test "MULTINIC root=nfs BOOTIF=" \ + 00 01 02 \ +@@ -137,6 +138,18 @@ test_client() { + "root=dhcp ip=ens3:dhcp ip=ens4:dhcp ip=ens5:dhcp bootdev=ens5" \ + "ens3 ens4 ens5" || return 1 + ++ # bonding test ++ client_test "MULTINIC root=dhcp rd.neednet=1 bond=bond0:ens3,ens4 ip=bond0:dhcp ip=ens5:dhcp bootdev=ens5" \ ++ 00 01 02 \ ++ "root=dhcp rd.neednet=1 bond=bond0:ens3,ens4 ip=bond0:dhcp ip=ens5:dhcp bootdev=ens5" \ ++ "bond0 ens5" || return 1 ++ ++ # multiple bonding test ++ client_test "MULTINIC root=dhcp rd.neednet=1 bond=bond0:ens3 bond=bond1:ens4 ip=bond0:dhcp ip=ens5:dhcp bootdev=ens5" \ ++ 00 01 02 \ ++ "root=dhcp rd.neednet=1 bond=bond0:ens3 bond=bond1:ens4 ip=bond0:dhcp ip=bond1:dhcp ip=ens5:dhcp bootdev=ens5" \ ++ "bond0 bond1 ens5" || return 1 ++ + kill_server + return 0 + } diff --git a/SOURCES/0391-network-dhclient.conf-add-missing-commata.patch b/SOURCES/0391-network-dhclient.conf-add-missing-commata.patch new file mode 100644 index 0000000..aa7d53a --- /dev/null +++ b/SOURCES/0391-network-dhclient.conf-add-missing-commata.patch @@ -0,0 +1,22 @@ +From 320b8d5c0c858111e688abe400a899dcac315e43 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 23 Jun 2016 14:24:40 +0200 +Subject: [PATCH] network/dhclient.conf: add missing commata + +options need to be seperated by , + +(cherry picked from commit 7e51abc81f53c08e464decd4103e8c4ec25fef87) +--- + modules.d/40network/dhclient.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf +index 7b06763..a1739ce 100644 +--- a/modules.d/40network/dhclient.conf ++++ b/modules.d/40network/dhclient.conf +@@ -3,4 +3,4 @@ option classless-routes code 121 = array of unsigned integer 8; + + request subnet-mask, broadcast-address, time-offset, routers, + domain-name, domain-name-servers, domain-search, host-name, +- root-path, interface-mtu classless-routes; ++ root-path, interface-mtu, classless-routes; diff --git a/SOURCES/0392-systemd-add-.slice-and-make-reboot-work.patch b/SOURCES/0392-systemd-add-.slice-and-make-reboot-work.patch new file mode 100644 index 0000000..578c874 --- /dev/null +++ b/SOURCES/0392-systemd-add-.slice-and-make-reboot-work.patch @@ -0,0 +1,163 @@ +From 017c16b97a384915467583cc07c3afb9a98fc259 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 27 Jun 2016 10:27:05 +0200 +Subject: [PATCH] systemd: add -.slice and make reboot work + +-.slice and conflicting with emergency.target and shutdown.target +makes reboot work +--- + modules.d/98systemd/dracut-cmdline-ask.service | 2 ++ + modules.d/98systemd/dracut-cmdline.service | 2 ++ + modules.d/98systemd/dracut-emergency.service | 2 ++ + modules.d/98systemd/dracut-initqueue.service | 2 ++ + modules.d/98systemd/dracut-mount.service | 2 ++ + modules.d/98systemd/dracut-pre-mount.service | 2 ++ + modules.d/98systemd/dracut-pre-pivot.service | 2 ++ + modules.d/98systemd/dracut-pre-trigger.service | 2 ++ + modules.d/98systemd/dracut-pre-udev.service | 2 ++ + modules.d/98systemd/emergency.service | 2 ++ + modules.d/98systemd/module-setup.sh | 1 + + 11 files changed, 21 insertions(+) + +diff --git a/modules.d/98systemd/dracut-cmdline-ask.service b/modules.d/98systemd/dracut-cmdline-ask.service +index 9993671..3d489a4 100644 +--- a/modules.d/98systemd/dracut-cmdline-ask.service ++++ b/modules.d/98systemd/dracut-cmdline-ask.service +@@ -15,6 +15,8 @@ After=systemd-journald.socket + Wants=systemd-journald.socket + ConditionPathExists=/etc/initrd-release + ConditionKernelCommandLine=rd.cmdline=ask ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-cmdline.service b/modules.d/98systemd/dracut-cmdline.service +index f888bf4..7f0835b 100644 +--- a/modules.d/98systemd/dracut-cmdline.service ++++ b/modules.d/98systemd/dracut-cmdline.service +@@ -20,6 +20,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline + ConditionKernelCommandLine=|rd.break=cmdline + ConditionKernelCommandLine=|resume + ConditionKernelCommandLine=|noresume ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-emergency.service b/modules.d/98systemd/dracut-emergency.service +index 5a6d525..5c01411 100644 +--- a/modules.d/98systemd/dracut-emergency.service ++++ b/modules.d/98systemd/dracut-emergency.service +@@ -14,6 +14,8 @@ After=systemd-vconsole-setup.service + Wants=systemd-vconsole-setup.service + Conflicts=emergency.service emergency.target + ConditionPathExists=!/lib/dracut/no-emergency-shell ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=HOME=/ +diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service +index 1b9e701..6340dd4 100644 +--- a/modules.d/98systemd/dracut-initqueue.service ++++ b/modules.d/98systemd/dracut-initqueue.service +@@ -23,6 +23,8 @@ ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/finished/*.sh + ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/online/*.sh + ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/timeout/*.sh + ConditionKernelCommandLine=|rd.break=initqueue ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service +index 20c633d..2e1e47b 100644 +--- a/modules.d/98systemd/dracut-mount.service ++++ b/modules.d/98systemd/dracut-mount.service +@@ -15,6 +15,8 @@ After=dracut-initqueue.service dracut-pre-mount.service + ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount + ConditionKernelCommandLine=|rd.break=mount ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service +index d7be48d..ed67f9d 100644 +--- a/modules.d/98systemd/dracut-pre-mount.service ++++ b/modules.d/98systemd/dracut-pre-mount.service +@@ -17,6 +17,8 @@ After=cryptsetup.target + ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount + ConditionKernelCommandLine=|rd.break=pre-mount ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service +index f453900..1faeb78 100644 +--- a/modules.d/98systemd/dracut-pre-pivot.service ++++ b/modules.d/98systemd/dracut-pre-pivot.service +@@ -16,6 +16,8 @@ Before=initrd-cleanup.service + Wants=remote-fs.target + After=remote-fs.target + ConditionPathExists=/etc/initrd-release ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service +index 69b4cce..f198036 100644 +--- a/modules.d/98systemd/dracut-pre-trigger.service ++++ b/modules.d/98systemd/dracut-pre-trigger.service +@@ -17,6 +17,8 @@ Wants=dracut-pre-udev.service systemd-udevd.service + ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger + ConditionKernelCommandLine=|rd.break=pre-trigger ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service +index d125b37..7fb3304 100644 +--- a/modules.d/98systemd/dracut-pre-udev.service ++++ b/modules.d/98systemd/dracut-pre-udev.service +@@ -20,6 +20,8 @@ ConditionKernelCommandLine=|rd.break=pre-udev + ConditionKernelCommandLine=|rd.driver.blacklist + ConditionKernelCommandLine=|rd.driver.pre + ConditionKernelCommandLine=|rd.driver.post ++Conflicts=shutdown.target emergency.target ++Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service +index 5f1eaa2..5c2c1c7 100644 +--- a/modules.d/98systemd/emergency.service ++++ b/modules.d/98systemd/emergency.service +@@ -13,6 +13,8 @@ DefaultDependencies=no + After=systemd-vconsole-setup.service + Wants=systemd-vconsole-setup.service + ConditionPathExists=!/lib/dracut/no-emergency-shell ++Conflicts=shutdown.target ++Before=shutdown.target + + [Service] + Environment=HOME=/ +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 647315f..64b83a0 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -137,6 +137,7 @@ install() { + \ + $systemdsystemunitdir/slices.target \ + $systemdsystemunitdir/system.slice \ ++ $systemdsystemunitdir/-.slice \ + \ + $tmpfilesdir/systemd.conf \ + \ diff --git a/SOURCES/0393-test-TEST-02-systemd-use-marker-disk-for-successfull.patch b/SOURCES/0393-test-TEST-02-systemd-use-marker-disk-for-successfull.patch new file mode 100644 index 0000000..391984f --- /dev/null +++ b/SOURCES/0393-test-TEST-02-systemd-use-marker-disk-for-successfull.patch @@ -0,0 +1,55 @@ +From 8175f5eb82d5efd8f873c091793a4c6500b50956 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 27 Jun 2016 10:28:09 +0200 +Subject: [PATCH] test/TEST-02-systemd: use marker disk for successfull boot + marker + +--- + test/TEST-02-SYSTEMD/test-init.sh | 2 +- + test/TEST-02-SYSTEMD/test.sh | 10 +++++++--- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/test/TEST-02-SYSTEMD/test-init.sh b/test/TEST-02-SYSTEMD/test-init.sh +index ff17b6b..1c65e84 100755 +--- a/test/TEST-02-SYSTEMD/test-init.sh ++++ b/test/TEST-02-SYSTEMD/test-init.sh +@@ -4,7 +4,7 @@ strstr() { [ "${1#*$2*}" != "$1" ]; } + CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) + plymouth --quit + exec /dev/console 2>&1 +-echo "dracut-root-block-success" >/dev/sda1 ++echo "dracut-root-block-success" >/dev/sdb + export TERM=linux + export PS1='initramfs-test:\w\$ ' + [ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab +diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh +index 47268b0..6f33181 100755 +--- a/test/TEST-02-SYSTEMD/test.sh ++++ b/test/TEST-02-SYSTEMD/test.sh +@@ -4,19 +4,23 @@ TEST_DESCRIPTION="root filesystem on a ext3 filesystem" + KVERSION="${KVERSION-$(uname -r)}" + + # Uncomment this to debug failures +-#DEBUGFAIL="rd.shell" ++#DEBUGFAIL="rd.shell loglevel=77 systemd.log_level=debug systemd.log_target=console" ++#DEBUGFAIL="rd.shell rd.break=initqueue" + test_run() { ++ dd if=/dev/zero of=$TESTDIR/marker.disk bs=1M count=80 + $testdir/run-qemu \ + -hda $TESTDIR/root.ext3 \ ++ -hdb $TESTDIR/marker.disk \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug init=/sbin/init $DEBUGFAIL" \ ++ -append "root=LABEL=dracut rw loglevel=77 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing +- grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1 ++ grep -F -m 1 -q dracut-root-block-success $TESTDIR/marker.disk || return 1 + } + + test_setup() { + rm -f -- $TESTDIR/root.ext3 ++ rm -f -- $TESTDIR/marker.disk + # Create the blank file to use as a root filesystem + dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=80 + diff --git a/SOURCES/0394-Disable-early-microcode-for-non-x86-architecures.patch b/SOURCES/0394-Disable-early-microcode-for-non-x86-architecures.patch new file mode 100644 index 0000000..85258c2 --- /dev/null +++ b/SOURCES/0394-Disable-early-microcode-for-non-x86-architecures.patch @@ -0,0 +1,62 @@ +From ced0638e2c0d8805551b1153b9e153241c646262 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 29 Jun 2016 10:45:22 +0200 +Subject: [PATCH] Disable early microcode for non-x86 architecures + +--- + dracut.sh | 28 +++++++++++++++++++++------- + 1 file changed, 21 insertions(+), 7 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 6bbde70..b85d42d 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -819,13 +819,6 @@ readonly initdir="$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX)" + exit 1 + } + +-if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then +- readonly early_cpio_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_cpio.XXXXXX)" +- [ -d "$early_cpio_dir" ] || { +- printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t early_cpio.XXXXXX failed." >&2 +- exit 1 +- } +-fi + # clean up after ourselves no matter how we die. + trap ' + ret=$?; +@@ -879,6 +872,26 @@ fi + dracutfunctions=$dracutbasedir/dracut-functions.sh + export dracutfunctions + ++ ++ ++case "$(arch)" in ++ i686|x86_64) ++ ;; ++ *) ++ early_microcode=no ++ dinfo "Disabling early microcode for $(arch)" ++ ;; ++esac ++ ++if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then ++ readonly early_cpio_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_cpio.XXXXXX)" ++ [ -d "$early_cpio_dir" ] || { ++ printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t early_cpio.XXXXXX failed." >&2 ++ exit 1 ++ } ++fi ++ ++ + if (( ${#drivers_l[@]} )); then + drivers='' + while pop drivers_l val; do +@@ -1470,6 +1483,7 @@ if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then + + dinfo "*** Stripping files done ***" + fi ++ + if [[ $early_microcode = yes ]]; then + dinfo "*** Generating early-microcode cpio image ***" + ucode_dir=(amd-ucode intel-ucode) diff --git a/SOURCES/0395-fcoe-check-if-needed-for-hostonly.patch b/SOURCES/0395-fcoe-check-if-needed-for-hostonly.patch new file mode 100644 index 0000000..e22dd81 --- /dev/null +++ b/SOURCES/0395-fcoe-check-if-needed-for-hostonly.patch @@ -0,0 +1,49 @@ +From f45726652fd8c6fd6b5560e1142753bac62dc426 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 29 Jun 2016 10:49:00 +0200 +Subject: [PATCH] fcoe: check if needed for hostonly + +--- + modules.d/95fcoe-uefi/module-setup.sh | 8 ++++++++ + modules.d/95fcoe/module-setup.sh | 9 +++++++++ + 2 files changed, 17 insertions(+) + +diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh +index f5277f4..242363e 100755 +--- a/modules.d/95fcoe-uefi/module-setup.sh ++++ b/modules.d/95fcoe-uefi/module-setup.sh +@@ -4,6 +4,14 @@ + + # called by dracut + check() { ++ local _fcoe_ctlr ++ [[ $hostonly ]] || [[ $mount_needs ]] && { ++ for c in /sys/bus/fcoe/devices/ctlr_* ; do ++ [ -L $c ] || continue ++ _fcoe_ctlr=$c ++ done ++ [ -z "$_fcoe_ctlr" ] && return 255 ++ } + [[ $hostonly ]] || [[ $mount_needs ]] && { + [ -d /sys/firmware/efi ] || return 255 + } +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index 646cfa8..ba10b0a 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -3,6 +3,15 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + check() { ++ local _fcoe_ctlr ++ [[ $hostonly ]] || [[ $mount_needs ]] && { ++ for c in /sys/bus/fcoe/devices/ctlr_* ; do ++ [ -L $c ] || continue ++ _fcoe_ctlr=$c ++ done ++ [ -z "$_fcoe_ctlr" ] && return 255 ++ } ++ + require_binaries dcbtool fipvlan lldpad ip readlink fcoemon fcoeadm || return 1 + return 0 + } diff --git a/SOURCES/0396-dracut-only-use-one-tmpdir.patch b/SOURCES/0396-dracut-only-use-one-tmpdir.patch new file mode 100644 index 0000000..7962cf7 --- /dev/null +++ b/SOURCES/0396-dracut-only-use-one-tmpdir.patch @@ -0,0 +1,160 @@ +From b4ad021d34975f25f50024e3601354f75593837f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 29 Jun 2016 11:25:12 +0200 +Subject: [PATCH] dracut: only use one tmpdir + +also remove any partial written initramfs images +--- + dracut-logger.sh | 3 +-- + dracut.sh | 66 +++++++++++++++++++++++++++++++++++++++----------------- + 2 files changed, 47 insertions(+), 22 deletions(-) + +diff --git a/dracut-logger.sh b/dracut-logger.sh +index ffa5616..53f7462 100755 +--- a/dracut-logger.sh ++++ b/dracut-logger.sh +@@ -150,8 +150,7 @@ dlog_init() { + && type -P systemd-cat &>/dev/null \ + && systemctl --quiet is-active systemd-journald.socket &>/dev/null \ + && { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &>/dev/null; } ; then +- readonly _dlogdir="$(mktemp --tmpdir="$TMPDIR/" -d -t dracut-log.XXXXXX)" +- readonly _systemdcatfile="$_dlogdir/systemd-cat" ++ readonly _systemdcatfile="$DRACUT_TMPDIR/systemd-cat" + mkfifo "$_systemdcatfile" + readonly _dlogfd=15 + systemd-cat -t 'dracut' --level-prefix=true <"$_systemdcatfile" & +diff --git a/dracut.sh b/dracut.sh +index b85d42d..7897679 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -813,24 +813,25 @@ fi + [[ $hostonly != "-h" ]] && unset hostonly + + readonly TMPDIR="$tmpdir" +-readonly initdir="$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX)" +-[ -d "$initdir" ] || { +- printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t initramfs.XXXXXX failed." >&2 ++readonly DRACUT_TMPDIR="$(mktemp -p "$TMPDIR/" -d -t dracut.XXXXXX)" ++[ -d "$DRACUT_TMPDIR" ] || { ++ printf "%s\n" "dracut: mktemp -p '$TMPDIR/' -d -t dracut.XXXXXX failed." >&2 + exit 1 + } + + # clean up after ourselves no matter how we die. + trap ' + ret=$?; +- [[ $keep ]] && echo "Not removing $initdir." >&2 || { [[ $initdir ]] && rm -rf -- "$initdir"; }; +- [[ $keep ]] && echo "Not removing $early_cpio_dir." >&2 || { [[ $early_cpio_dir ]] && rm -Rf -- "$early_cpio_dir"; }; +- [[ $_dlogdir ]] && rm -Rf -- "$_dlogdir"; ++ [[ $keep ]] && echo "Not removing $DRACUT_TMPDIR." >&2 || { [[ $DRACUT_TMPDIR ]] && rm -rf -- "$DRACUT_TMPDIR"; }; + exit $ret; + ' EXIT + + # clean up after ourselves no matter how we die. + trap 'exit 1;' SIGINT + ++readonly initdir="${DRACUT_TMPDIR}/initramfs" ++mkdir "$initdir" ++ + export DRACUT_KERNEL_LAZY="1" + export DRACUT_RESOLVE_LAZY="1" + +@@ -878,20 +879,18 @@ case "$(arch)" in + i686|x86_64) + ;; + *) +- early_microcode=no +- dinfo "Disabling early microcode for $(arch)" ++ if [[ $early_microcode = yes ]]; then ++ early_microcode=no ++ dinfo "Disabling early microcode for $(arch)" ++ fi + ;; + esac + + if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then +- readonly early_cpio_dir="$(mktemp --tmpdir="$TMPDIR/" -d -t early_cpio.XXXXXX)" +- [ -d "$early_cpio_dir" ] || { +- printf "%s\n" "dracut: mktemp --tmpdir=\"$TMPDIR/\" -d -t early_cpio.XXXXXX failed." >&2 +- exit 1 +- } ++ readonly early_cpio_dir="${DRACUT_TMPDIR}/earlycpio" ++ mkdir "$early_cpio_dir" + fi + +- + if (( ${#drivers_l[@]} )); then + drivers='' + while pop drivers_l val; do +@@ -1485,7 +1484,7 @@ if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then + fi + + if [[ $early_microcode = yes ]]; then +- dinfo "*** Generating early-microcode cpio image ***" ++ dinfo "*** Generating early-microcode cpio image contents ***" + ucode_dir=(amd-ucode intel-ucode) + ucode_dest=(AuthenticAMD.bin GenuineIntel.bin) + _dest_dir="$early_cpio_dir/d/kernel/x86/microcode" +@@ -1521,6 +1520,9 @@ if [[ $early_microcode = yes ]]; then + fi + done + done ++ if ! [[ $create_early_cpio = yes ]]; then ++ dinfo "*** No early-microcode cpio image needed ***" ++ fi + fi + + if [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]]; then +@@ -1546,23 +1548,47 @@ dinfo "*** Creating image file ***" + [[ "$UID" != 0 ]] && cpio_owner_root="-R 0:0" + + if [[ $create_early_cpio = yes ]]; then ++ dinfo "*** Creating microcode section ***" + echo 1 > "$early_cpio_dir/d/early_cpio" + # The microcode blob is _before_ the initramfs blob, not after +- (cd "$early_cpio_dir/d"; find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet > $outfile) ++ if ! ( ++ umask 077 ++ cd "$early_cpio_dir/d" ++ find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet > "${DRACUT_TMPDIR}/initramfs.img" ++ ); then ++ dfatal "dracut: creation of $outfile failed" ++ exit 1 ++ else ++ dinfo "*** Created microcode section ***" ++ fi + fi +-if ! ( umask 077; cd "$initdir"; find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet | \ +- $compress >> "$outfile"; ); then ++ ++if ! ( ++ umask 077 ++ cd "$initdir" ++ find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet | \ ++ $compress >> "${DRACUT_TMPDIR}/initramfs.img"; ++ ); then + dfatal "dracut: creation of $outfile failed" + exit 1 + fi ++ + dinfo "*** Creating image file done ***" + + if (( maxloglvl >= 5 )); then + if [[ $allowlocal ]]; then +- "$dracutbasedir/lsinitrd.sh" "$outfile"| ddebug ++ "$dracutbasedir/lsinitrd.sh" "${DRACUT_TMPDIR}/initramfs.img" | ddebug + else +- lsinitrd "$outfile"| ddebug ++ lsinitrd "${DRACUT_TMPDIR}/initramfs.img" | ddebug + fi + fi + ++if cp --reflink=auto "${DRACUT_TMPDIR}/initramfs.img" "$outfile" |& derror ; then ++ dinfo "*** Creating initramfs image file '$outfile' done ***" ++else ++ rm -f -- "$outfile" ++ dfatal "dracut: creation of $outfile failed" ++ exit 1 ++fi ++ + exit 0 diff --git a/SOURCES/0397-add-install-optional-and-install_optional_items.patch b/SOURCES/0397-add-install-optional-and-install_optional_items.patch new file mode 100644 index 0000000..daa70ab --- /dev/null +++ b/SOURCES/0397-add-install-optional-and-install_optional_items.patch @@ -0,0 +1,130 @@ +From cc7d2eeb36a0472ec76b44caa41ebd68fb40b11c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 22 Jul 2014 14:09:06 +0200 +Subject: [PATCH] add "--install-optional" and install_optional_items + +(cherry picked from commit 54b68829b60bc3f4c28cfca1ab0336584fe1e74c) +--- + dracut-bash-completion.sh | 4 ++-- + dracut.8.asc | 3 +++ + dracut.conf.5.asc | 4 ++++ + dracut.conf.d/fedora.conf.example | 2 +- + dracut.sh | 13 +++++++++++++ + 5 files changed, 23 insertions(+), 3 deletions(-) + +diff --git a/dracut-bash-completion.sh b/dracut-bash-completion.sh +index 9f359c6..feced60 100644 +--- a/dracut-bash-completion.sh ++++ b/dracut-bash-completion.sh +@@ -40,7 +40,7 @@ _dracut() { + --omit-drivers --modules --omit --drivers --filesystems --install + --fwdir --libdirs --fscks --add-fstab --mount --device --nofscks + --kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix +- --kernel-cmdline --sshkey --persistent-policy' ++ --kernel-cmdline --sshkey --persistent-policy --install-optional' + ) + + if __contains_word "$prev" ${OPTS[ARG]}; then +@@ -49,7 +49,7 @@ _dracut() { + comps=$(compgen -d -- "$cur") + compopt -o filenames + ;; +- -c|--conf|--sshkey|--add-fstab|--add-device|-I|--install) ++ -c|--conf|--sshkey|--add-fstab|--add-device|-I|--install|--install-optional) + comps=$(compgen -f -- "$cur") + compopt -o filenames + ;; +diff --git a/dracut.8.asc b/dracut.8.asc +index 5f68d16..8fd863b 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -355,6 +355,9 @@ example: + ---- + =============================== + ++**--install-optional** __:: ++ install the space separated list of files into the initramfs, if they exist. ++ + **--gzip**:: + Compress the generated initramfs using gzip. This will be done by default, + unless another compression option or --no-compress is passed. Equivalent to +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index 99f70ff..c20a341 100644 +--- a/dracut.conf.5.asc ++++ b/dracut.conf.5.asc +@@ -66,6 +66,10 @@ Configuration files must have the extension .conf; other extensions are ignored. + *install_items+=*" ____[ ____ ...] ":: + Specify additional files to include in the initramfs, separated by spaces. + ++*install_optional_items+=*" ____[ ____ ...] ":: ++ Specify additional files to include in the initramfs, separated by spaces, ++ if they exist. ++ + *do_strip=*"__{yes|no}__":: + Strip binaries in the initramfs (default=yes) + +diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example +index ff4e3b2..d69c943 100644 +--- a/dracut.conf.d/fedora.conf.example ++++ b/dracut.conf.d/fedora.conf.example +@@ -6,7 +6,7 @@ i18n_default_font="latarcyrheb-sun16" + i18n_install_all="yes" + stdloglvl=3 + sysloglvl=5 +-install_items+=" vi /etc/virc ps grep cat rm " ++install_optional_items+=" vi /etc/virc ps grep cat rm " + prefix="/" + systemdutildir=/usr/lib/systemd + systemdsystemunitdir=/usr/lib/systemd/system +diff --git a/dracut.sh b/dracut.sh +index 7897679..fefdefd 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -158,6 +158,8 @@ Creates initial ramdisk images for preloading modules + in the final initramfs. + -I, --install [LIST] Install the space separated list of files into the + initramfs. ++ --install-optional [LIST] Install the space separated list of files into the ++ initramfs, if they exist. + --gzip Compress the generated initramfs using gzip. + This will be done by default, unless another + compression option or --no-compress is passed. +@@ -305,6 +307,7 @@ rearrange_params() + --long drivers: \ + --long filesystems: \ + --long install: \ ++ --long install-optional: \ + --long fwdir: \ + --long libdirs: \ + --long fscks: \ +@@ -471,6 +474,9 @@ while :; do + -d|--drivers) push drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --filesystems) push filesystems_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + -I|--install) push install_items_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --install-optional) ++ push install_optional_items_l \ ++ "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --fwdir) push fw_dir_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --libdirs) push libdirs_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --fscks) push fscks_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;; +@@ -722,6 +728,12 @@ if (( ${#install_items_l[@]} )); then + done + fi + ++if (( ${#install_optional_items_l[@]} )); then ++ while pop install_optional_items_l val; do ++ install_optional_items+=" $val " ++ done ++fi ++ + # these options override the stuff in the config file + if (( ${#dracutmodules_l[@]} )); then + dracutmodules='' +@@ -1361,6 +1373,7 @@ fi + + if [[ $kernel_only != yes ]]; then + (( ${#install_items[@]} > 0 )) && inst_multiple ${install_items[@]} ++ (( ${#install_optional_items[@]} > 0 )) && inst_multiple -o ${install_optional_items[@]} + + [[ $kernel_cmdline ]] && printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf" + diff --git a/SOURCES/0398-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch b/SOURCES/0398-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch new file mode 100644 index 0000000..3fab13f --- /dev/null +++ b/SOURCES/0398-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch @@ -0,0 +1,40 @@ +From 3186a0aa15822d69c8eb073bfc76665a1315957c Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Thu, 11 Dec 2014 15:46:33 +0100 +Subject: [PATCH] dracut: nbd: Only complain of missing binary in hostonly mode + if + + rootfs is on nbd + +In not hostonly mode, require_binaries will still complain. +If in hostonly mode and the module is explicitly added via -a nbd, then +install() section will still complain later: +dracut-install: ERROR: installing 'nbd-client' + +Signed-off-by: Thomas Renninger +(cherry picked from commit e683985d103f1b0f15a9ccd9678169f4fb7aeb5f) +--- + modules.d/95nbd/module-setup.sh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh +index 7e8a416..270a9d3 100755 +--- a/modules.d/95nbd/module-setup.sh ++++ b/modules.d/95nbd/module-setup.sh +@@ -4,8 +4,6 @@ + + check() { + local _rootdev +- # If our prerequisites are not met, fail. +- require_binaries nbd-client || return 1 + + # if an nbd device is not somewhere in the chain of devices root is + # mounted on, fail the hostonly check. +@@ -16,6 +14,7 @@ check() { + [[ -b /dev/block/$_rootdev ]] || return 1 + check_block_and_slaves is_nbd "$_rootdev" || return 255 + } ++ require_binaries nbd-client || return 1 + + return 0 + } diff --git a/SOURCES/0399-Replace-echo-n-with-printf-in-code-with-a-bin-sh-she.patch b/SOURCES/0399-Replace-echo-n-with-printf-in-code-with-a-bin-sh-she.patch new file mode 100644 index 0000000..a7c981b --- /dev/null +++ b/SOURCES/0399-Replace-echo-n-with-printf-in-code-with-a-bin-sh-she.patch @@ -0,0 +1,246 @@ +From d6b9aac6d0f8d007fa9ebf073a665857d8b0b0b4 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Tue, 14 Jul 2015 22:22:14 -0400 +Subject: [PATCH] Replace echo -n with printf in code with a /bin/sh shebang + +POSIX does not mandate that echo support the -n parameter. +printf has more well-defined behavior. + +(cherry picked from commit 5899f2f5163de4d68fbb35831e1f2230c22c71b3) +--- + modules.d/04watchdog/watchdog-stop.sh | 2 +- + modules.d/40network/net-lib.sh | 2 +- + modules.d/45ifcfg/write-ifcfg.sh | 2 +- + modules.d/90lvm/lvm_scan.sh | 4 ++-- + modules.d/98usrmount/mount-usr.sh | 2 +- + modules.d/99base/dracut-lib.sh | 6 ++++-- + modules.d/99base/init.sh | 4 ++-- + test/TEST-10-RAID/create-root.sh | 2 +- + test/TEST-10-RAID/cryptroot-ask.sh | 2 +- + test/TEST-12-RAID-DEG/create-root.sh | 2 +- + test/TEST-12-RAID-DEG/cryptroot-ask.sh | 2 +- + test/TEST-13-ENC-RAID-LVM/create-root.sh | 2 +- + test/TEST-13-ENC-RAID-LVM/cryptroot-ask.sh | 2 +- + test/TEST-14-IMSM/cryptroot-ask.sh | 2 +- + test/TEST-40-NBD/create-root.sh | 2 +- + test/TEST-40-NBD/cryptroot-ask.sh | 2 +- + 16 files changed, 21 insertions(+), 19 deletions(-) + +diff --git a/modules.d/04watchdog/watchdog-stop.sh b/modules.d/04watchdog/watchdog-stop.sh +index 91d45d6..921f969 100755 +--- a/modules.d/04watchdog/watchdog-stop.sh ++++ b/modules.d/04watchdog/watchdog-stop.sh +@@ -1,2 +1,2 @@ + #!/bin/sh +-[ -c /dev/watchdog ] && echo -n 'V' > /dev/watchdog ++[ -c /dev/watchdog ] && printf 'V' > /dev/watchdog +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 07ea570..f91d169 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -211,7 +211,7 @@ set_ifname() { + fix_bootif() { + local macaddr=${1} + local IFS='-' +- macaddr=$(for i in ${macaddr} ; do echo -n $i:; done) ++ macaddr=$(printf '%s:' ${macaddr}) + macaddr=${macaddr%:} + # strip hardware type field from pxelinux + [ -n "${macaddr%??:??:??:??:??:??}" ] && macaddr=${macaddr#??:} +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index f3a1c10..a5114be 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -50,7 +50,7 @@ print_s390() { + for i in /sys/class/net/$_netif/device/cdev[0-9]*; do + [ -e $i ] || continue + channel=$(readlink -f $i) +- echo -n "${channel##*/}," ++ printf '%s' "${channel##*/}," + done + }) + [ -n "$SUBCHANNELS" ] || return 1 +diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh +index f87831c..ae6f177 100755 +--- a/modules.d/90lvm/lvm_scan.sh ++++ b/modules.d/90lvm/lvm_scan.sh +@@ -17,14 +17,14 @@ SNAPSIZE=$(getargs rd.lvm.snapsize -d rd_LVM_SNAPSIZE=) + lvmdevs=$( + for f in /tmp/.lvm_scan-*; do + [ -e "$f" ] || continue +- echo -n "${f##/tmp/.lvm_scan-} " ++ printf '%s' "${f##/tmp/.lvm_scan-} " + done + ) + + if [ ! -e /etc/lvm/lvm.conf ]; then + { + echo 'devices {'; +- echo -n ' filter = [ ' ++ printf ' filter = [ ' + for dev in $lvmdevs; do + printf '"a|^/dev/%s$|", ' $dev; + done; +diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh +index de7dcc2..8026db3 100755 +--- a/modules.d/98usrmount/mount-usr.sh ++++ b/modules.d/98usrmount/mount-usr.sh +@@ -14,7 +14,7 @@ filtersubvol() { + while [ $# -gt 0 ]; do + case $1 in + subvol\=*) :;; +- *) echo -n "${1}," ;; ++ *) printf '%s' "${1}," ;; + esac + shift + done +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 71dcedc..c2b6108 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -295,7 +295,7 @@ _dogetargs() { + fi + done + if [ -n "$_found" ]; then +- [ $# -gt 0 ] && echo -n "$@" ++ [ $# -gt 0 ] && printf '%s' "$*" + return 0 + fi + return 1; +@@ -326,7 +326,9 @@ getargs() { + done + if [ -n "$_gfound" ]; then + if [ $# -gt 0 ]; then +- echo -n "$@" ++ printf '%s' "$*" ++ else ++ printf 1 + fi + debug_on + return 0 +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index dcc62d2..a07d0f9 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -253,8 +253,8 @@ while :; do + done + + { +- echo -n "Mounted root filesystem " +- while read dev mp rest; do [ "$mp" = "$NEWROOT" ] && echo $dev; done < /proc/mounts ++ printf "Mounted root filesystem " ++ while read dev mp rest || [ -n "$dev" ]; do [ "$mp" = "$NEWROOT" ] && echo $dev; done < /proc/mounts + } | vinfo + + # pre pivot scripts are sourced just before we doing cleanup and switch over +diff --git a/test/TEST-10-RAID/create-root.sh b/test/TEST-10-RAID/create-root.sh +index 5055413..be7a3a0 100755 +--- a/test/TEST-10-RAID/create-root.sh ++++ b/test/TEST-10-RAID/create-root.sh +@@ -18,7 +18,7 @@ mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/sda2 /d + # randomly. + mdadm -W /dev/md0 + set -e +-echo -n test >keyfile ++printf test >keyfile + cryptsetup -q luksFormat /dev/md0 /keyfile + echo "The passphrase is test" + cryptsetup luksOpen /dev/md0 dracut_crypt_test /keyfile ++printf test >/keyfile + /sbin/cryptsetup luksOpen "$1" "$2" keyfile ++printf test >keyfile + cryptsetup -q luksFormat /dev/md0 /keyfile + echo "The passphrase is test" + set -e +diff --git a/test/TEST-12-RAID-DEG/cryptroot-ask.sh b/test/TEST-12-RAID-DEG/cryptroot-ask.sh +index db27c5b..78ed7f5 100755 +--- a/test/TEST-12-RAID-DEG/cryptroot-ask.sh ++++ b/test/TEST-12-RAID-DEG/cryptroot-ask.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + + [ -b /dev/mapper/$2 ] && exit 0 +-echo -n test >/keyfile ++printf test >/keyfile + /sbin/cryptsetup luksOpen $1 $2 keyfile ++printf test >keyfile + cryptsetup -q luksFormat /dev/sda2 /keyfile + cryptsetup -q luksFormat /dev/sda3 /keyfile + cryptsetup -q luksFormat /dev/sda4 /keyfile +diff --git a/test/TEST-13-ENC-RAID-LVM/cryptroot-ask.sh b/test/TEST-13-ENC-RAID-LVM/cryptroot-ask.sh +index db27c5b..78ed7f5 100755 +--- a/test/TEST-13-ENC-RAID-LVM/cryptroot-ask.sh ++++ b/test/TEST-13-ENC-RAID-LVM/cryptroot-ask.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + + [ -b /dev/mapper/$2 ] && exit 0 +-echo -n test >/keyfile ++printf test >/keyfile + /sbin/cryptsetup luksOpen $1 $2 /keyfile ++printf test >/keyfile + /sbin/cryptsetup luksOpen $1 $2 keyfile ++printf test >keyfile + cryptsetup -q luksFormat /dev/sdb /keyfile + echo "The passphrase is test" + cryptsetup luksOpen /dev/sdb dracut_crypt_test /keyfile ++printf test >/keyfile + /sbin/cryptsetup luksOpen $1 $2 +Date: Fri, 26 Jun 2015 16:55:52 +0200 +Subject: [PATCH] Reset IFS variable + +Setting and unsetting the IFS variable is tricky. To be on the +safe side we should always reset the IFS variable to its original +value after parsing. + +Signed-off-by: Hannes Reinecke +Signed-off-by: Thomas Renninger +(cherry picked from commit b8efaa00171135db1e1f09a73a2e0d8098f03867) +--- + modules.d/95fcoe/parse-fcoe.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh +index 7eca0b6..745a78c 100755 +--- a/modules.d/95fcoe/parse-fcoe.sh ++++ b/modules.d/95fcoe/parse-fcoe.sh +@@ -31,8 +31,10 @@ udevadm settle --timeout=30 + [ -e /sys/bus/fcoe/ctlr_create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE" + + parse_fcoe_opts() { ++ local OLDIFS="$IFS" + local IFS=: + set $fcoe ++ IFS="$OLDIFS" + + case $# in + 2) diff --git a/SOURCES/0401-Defer-modprobe-of-HW-modules-until-udev-is-running.patch b/SOURCES/0401-Defer-modprobe-of-HW-modules-until-udev-is-running.patch new file mode 100644 index 0000000..61b5e7f --- /dev/null +++ b/SOURCES/0401-Defer-modprobe-of-HW-modules-until-udev-is-running.patch @@ -0,0 +1,53 @@ +From 7335bd1e2358560ac461ef23715a0098f78330fb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 24 Apr 2015 11:54:07 +0200 +Subject: [PATCH] Defer modprobe of HW modules, until udev is running + +Also honor blacklisting + +(cherry picked from commit 437dad70e9525a21da873652080bbd62a9d8b96a) +--- + modules.d/95fcoe/parse-fcoe.sh | 5 ++--- + modules.d/95iscsi/parse-iscsiroot.sh | 9 ++------- + 2 files changed, 4 insertions(+), 10 deletions(-) + +diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh +index 745a78c..e8a77e0 100755 +--- a/modules.d/95fcoe/parse-fcoe.sh ++++ b/modules.d/95fcoe/parse-fcoe.sh +@@ -22,10 +22,9 @@ + + + # BRCM: Later, should check whether bnx2x is loaded first before loading bnx2fc so do not load bnx2fc when there are no Broadcom adapters +-[ -e /sys/bus/fcoe/ctlr_create ] || modprobe -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE" ++[ -e /sys/bus/fcoe/ctlr_create ] || modprobe -b -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE" + +-modprobe bnx2fc >/dev/null 2>&1 +-udevadm settle --timeout=30 ++initqueue --onetime modprobe -b -q bnx2fc + + # FCoE actually supported? + [ -e /sys/bus/fcoe/ctlr_create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE" +diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh +index 3d74ff2..80201d4 100755 +--- a/modules.d/95iscsi/parse-iscsiroot.sh ++++ b/modules.d/95iscsi/parse-iscsiroot.sh +@@ -89,16 +89,11 @@ if [ -z "$netroot" ] || ! [ "${netroot%%:*}" = "iscsi" ]; then + fi + + initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT" +- +-modprobe -b -q qla4xxx +-modprobe -b -q cxgb3i +-modprobe -b -q cxgb4i +-modprobe -b -q bnx2i +-modprobe -b -q be2iscsi ++initqueue --onetime modprobe --all -b -q qla4xxx cxgb3i cxgb4i bnx2i be2iscsi + + # ISCSI actually supported? + if ! [ -e /sys/module/iscsi_tcp ]; then +- modprobe -q iscsi_tcp || die "iscsiroot requested but kernel/initrd does not support iscsi" ++ modprobe -b -q iscsi_tcp || die "iscsiroot requested but kernel/initrd does not support iscsi" + fi + + if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; then diff --git a/SOURCES/0402-95fcoe-start-lldpad-separately.patch b/SOURCES/0402-95fcoe-start-lldpad-separately.patch new file mode 100644 index 0000000..98bbf0b --- /dev/null +++ b/SOURCES/0402-95fcoe-start-lldpad-separately.patch @@ -0,0 +1,77 @@ +From a4cbfd719bde7339ffefd641839fdbfb6305c012 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 11 Dec 2014 15:46:24 +0100 +Subject: [PATCH] 95fcoe: start lldpad separately + +lldpad is a system-wide process, which must be started only once. +So we should be separate it from fcoe-up, as it might be called +several times. + +Signed-off-by: Hannes Reinecke +Signed-off-by: Thomas Renninger +(cherry picked from commit 22e837b6458d5d17d1cb6a9b09b7515746d4e098) +--- + modules.d/95fcoe/fcoe-up.sh | 8 -------- + modules.d/95fcoe/lldpad.sh | 14 ++++++++++++++ + modules.d/95fcoe/module-setup.sh | 1 + + 3 files changed, 15 insertions(+), 8 deletions(-) + create mode 100644 modules.d/95fcoe/lldpad.sh + +diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh +index 823d7ac..1d62570 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -43,10 +43,6 @@ write_fcoemon_cfg() { + } + + if [ "$dcb" = "dcb" ]; then +- # Note lldpad will stay running after switchroot, the system initscripts +- # are to kill it and start a new lldpad to take over. Data is transfered +- # between the 2 using a shm segment +- lldpad -d + # wait for lldpad to be ready + i=0 + while [ $i -lt 60 ]; do +@@ -56,10 +52,6 @@ if [ "$dcb" = "dcb" ]; then + i=$(($i+1)) + done + +- # on some systems lldpad needs some time +- # sleep until we find a better solution +- sleep 30 +- + while [ $i -lt 60 ]; do + dcbtool sc "$netif" dcb on && break + info "Retrying to turn dcb on" +diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh +new file mode 100644 +index 0000000..d06a3bd +--- /dev/null ++++ b/modules.d/95fcoe/lldpad.sh +@@ -0,0 +1,14 @@ ++#!/bin/bash ++ ++# Note lldpad will stay running after switchroot, the system initscripts ++# are to kill it and start a new lldpad to take over. Data is transfered ++# between the 2 using a shm segment ++lldpad -d ++# wait for lldpad to be ready ++i=0 ++while [ $i -lt 60 ]; do ++ lldptool -p && break ++ info "Waiting for lldpad to be ready" ++ sleep 1 ++ i=$(($i+1)) ++done +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index ba10b0a..c000b3b 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -36,6 +36,7 @@ install() { + inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up" + inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" + inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh" ++ inst_hook pre-trigger 03 "$moddir/lldpad.sh" + inst_hook cmdline 99 "$moddir/parse-fcoe.sh" + inst_hook cleanup 90 "$moddir/cleanup-fcoe.sh" + dracut_need_initqueue diff --git a/SOURCES/0403-95fcoe-skip-VLAN-devices-in-fcoe-up.patch b/SOURCES/0403-95fcoe-skip-VLAN-devices-in-fcoe-up.patch new file mode 100644 index 0000000..25a4d96 --- /dev/null +++ b/SOURCES/0403-95fcoe-skip-VLAN-devices-in-fcoe-up.patch @@ -0,0 +1,37 @@ +From b9668f8f000dc5d072ad4d12f7019776a0c18598 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 11 Dec 2014 15:46:23 +0100 +Subject: [PATCH] 95fcoe: skip VLAN devices in fcoe-up + +DCB & fipvlan can only be called on real devices, not VLAN +ones. So skip any VLAN devices which might been added to the +list of network interfaces. + +References: bnc#878583 + +Signed-off-by: Hannes Reinecke +Signed-off-by: Thomas Renninger +(cherry picked from commit 0a68a26cffad7fc75e454b06206c0bbf297361b7) +--- + modules.d/95fcoe/fcoe-up.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh +index 1d62570..0399aff 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -22,6 +22,14 @@ netif=$1 + dcb=$2 + vlan="yes" + ++iflink=$(cat /sys/class/net/$netif/iflink) ++ifindex=$(cat /sys/class/net/$netif/ifindex) ++if [ "$iflink" != "$ifindex" ] ; then ++ # Skip VLAN devices ++ exit 0 ++fi ++ ++ip link set dev $netif up + linkup "$netif" + + netdriver=$(readlink -f /sys/class/net/$netif/device/driver) diff --git a/SOURCES/0404-95fcoe-Store-current-configuration-in-dracut-cmdline.patch b/SOURCES/0404-95fcoe-Store-current-configuration-in-dracut-cmdline.patch new file mode 100644 index 0000000..35b170b --- /dev/null +++ b/SOURCES/0404-95fcoe-Store-current-configuration-in-dracut-cmdline.patch @@ -0,0 +1,88 @@ +From f501c955e86eb3043ab5e3c5f2648ed4c8bb58a3 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 11 Dec 2014 15:46:22 +0100 +Subject: [PATCH] 95fcoe: Store current configuration in dracut cmdline + +When running with --hostonly-cmdline we should be storing +the current configuration in /etc/cmdline.d so that dracut +will be configure the system automatically. + +References: bnc#877288 + +Signed-off-by: Hannes Reinecke +Signed-off-by: Thomas Renninger +(cherry picked from commit 8b257fcc86f9a470613c1a5719641144a688acf7) +--- + modules.d/95fcoe/module-setup.sh | 45 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 45 insertions(+) + +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index c000b3b..af2798d 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -13,6 +13,7 @@ check() { + } + + require_binaries dcbtool fipvlan lldpad ip readlink fcoemon fcoeadm || return 1 ++ + return 0 + } + +@@ -25,6 +26,46 @@ installkernel() { + instmods fcoe 8021q edd + } + ++get_vlan_parent() { ++ local link=$1 ++ ++ [ -d $link ] || return ++ read iflink < $link/iflink ++ for if in /sys/class/net/* ; do ++ read idx < $if/ifindex ++ if [ $idx -eq $iflink ] ; then ++ echo ${if##*/} ++ fi ++ done ++} ++ ++# called by dracut ++cmdline() { ++ ++ for c in /sys/bus/fcoe/devices/ctlr_* ; do ++ [ -L $c ] || continue ++ read enabled < $c/enabled ++ [ $enabled -eq 0 ] && continue ++ d=$(cd -P $c; echo $PWD) ++ i=${d%/*} ++ read mac < ${i}/address ++ s=$(dcbtool gc ${i##*/} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p') ++ if [ -z "$s" ] ; then ++ p=$(get_vlan_parent ${i}) ++ if [ "$p" ] ; then ++ s=$(dcbtool gc ${p} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p') ++ fi ++ fi ++ if [ "$s" = "on" ] ; then ++ dcb="dcb" ++ else ++ dcb="nodcb" ++ fi ++ echo "fcoe=${mac}:${dcb}" ++ done ++} ++ ++# called by dracut + install() { + inst_multiple ip dcbtool fipvlan lldpad readlink lldptool fcoemon fcoeadm + inst_libdir_file 'libhbalinux.so*' +@@ -33,6 +74,10 @@ install() { + mkdir -m 0755 -p "$initdir/var/lib/lldpad" + mkdir -m 0755 -p "$initdir/etc/fcoe" + ++ if [[ $hostonly_cmdline == "yes" ]] ; then ++ local _fcoeconf=$(cmdline) ++ [[ $_fcoeconf ]] && printf "%s\n" "$_fcoeconf" >> "${initdir}/etc/cmdline.d/95fcoe.conf" ++ fi + inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up" + inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" + inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh" diff --git a/SOURCES/0405-95fcoe-update-fcoe-interface-check.patch b/SOURCES/0405-95fcoe-update-fcoe-interface-check.patch new file mode 100644 index 0000000..706dca1 --- /dev/null +++ b/SOURCES/0405-95fcoe-update-fcoe-interface-check.patch @@ -0,0 +1,23 @@ +From f105eaebb8ede98c44cc33705384c05a5b12adb1 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 11 Dec 2014 15:46:21 +0100 +Subject: [PATCH] 95fcoe: update fcoe interface check + +--- + modules.d/95fcoe/parse-fcoe.sh | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh +index e8a77e0..3d82912 100755 +--- a/modules.d/95fcoe/parse-fcoe.sh ++++ b/modules.d/95fcoe/parse-fcoe.sh +@@ -26,9 +26,6 @@ + + initqueue --onetime modprobe -b -q bnx2fc + +-# FCoE actually supported? +-[ -e /sys/bus/fcoe/ctlr_create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE" +- + parse_fcoe_opts() { + local OLDIFS="$IFS" + local IFS=: diff --git a/SOURCES/0406-fcoe-up-remove-initlog-logic.patch b/SOURCES/0406-fcoe-up-remove-initlog-logic.patch new file mode 100644 index 0000000..dd01474 --- /dev/null +++ b/SOURCES/0406-fcoe-up-remove-initlog-logic.patch @@ -0,0 +1,23 @@ +From 603a0fe0a35a85f5d223922be41342f59906d9fe Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 5 Mar 2014 13:20:35 +0100 +Subject: [PATCH] fcoe-up: remove initlog logic + +(cherry picked from commit f60b7d8655bd90637a52b11e9e16ed144d5040d3) +--- + modules.d/95fcoe/fcoe-up.sh | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh +index 0399aff..cdff6ef 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -13,8 +13,6 @@ PATH=/usr/sbin:/usr/bin:/sbin:/bin + # Huh? Missing arguments ?? + [ -z "$1" -o -z "$2" ] && exit 1 + +-export PS4="fcoe-up.$1.$$ + " +-exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe + type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh + diff --git a/SOURCES/0407-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch b/SOURCES/0407-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch new file mode 100644 index 0000000..cad46c3 --- /dev/null +++ b/SOURCES/0407-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch @@ -0,0 +1,27 @@ +From b7f5e42c578295bb725eeb9767a58b02ce3c9ce7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 13 Jan 2016 13:43:38 +0100 +Subject: [PATCH] network/net-lib.sh: correctly set mac address for + ip=...:: + +if ip=...:: was specified, macadress was not set + +(cherry picked from commit efbc47b8e43ad173d3319f3f6e87b0a60aad9f37) +--- + modules.d/40network/net-lib.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index f91d169..5a07b4e 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -421,6 +421,9 @@ ip_to_var() { + ;; + [0-9]*) + mtu="$8" ++ if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then ++ macaddr="${9}:${10}:${11}:${12}:${13}:${14}" ++ fi + ;; + *) + if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then diff --git a/SOURCES/0408-network-support-macaddr-in-brackets.patch b/SOURCES/0408-network-support-macaddr-in-brackets.patch new file mode 100644 index 0000000..d431182 --- /dev/null +++ b/SOURCES/0408-network-support-macaddr-in-brackets.patch @@ -0,0 +1,159 @@ +From 53e4ab71742fc1e5d8112c719c0d154d08815fa1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 29 Jun 2016 12:27:37 +0200 +Subject: [PATCH] network: support macaddr in brackets [] + +ip=ens3:dhcp:1000 +ip=ens3:dhcp::54:52:00:ab:cd:ef +ip=ens3:dhcp::[54:52:00:ab:cd:ef] +ip=ens3:dhcp:1000:54:52:00:ab:cd:ef +ip=ens3:dhcp:1000:[54:52:00:ab:cd:ef] + +ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000 +ip=192.168.122.20::192.168.122.1:24:test:ens3:none::54:52:00:ab:cd:ef +ip=192.168.122.20::192.168.122.1:24:test:ens3:none::[54:52:00:ab:cd:ef] +ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000:54:52:00:ab:cd:ef +ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000:[54:52:00:ab:cd:ef] + +ip=::::test:ens3:dhcp:1000 +ip=::::test:ens3:dhcp::54:52:00:ab:cd:ef +ip=::::test:ens3:dhcp::[54:52:00:ab:cd:ef] +ip=::::test:ens3:dhcp:1000:54:52:00:ab:cd:ef +ip=::::test:ens3:dhcp:1000:[54:52:00:ab:cd:ef] +--- + modules.d/40network/net-lib.sh | 119 ++++++++++++++++++++++++++--------------- + 1 file changed, 75 insertions(+), 44 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 5a07b4e..0c00f92 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -406,53 +406,84 @@ ip_to_var() { + done + + unset ip srv gw mask hostname dev autoconf macaddr mtu dns1 dns2 +- case $# in +- 0) autoconf="error" ;; +- 1) autoconf=$1 ;; +- 2) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2 ;; +- 3) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2; [ -n "$3" ] && mtu=$3 ;; +- 4) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2; [ -n "$3" ] && mtu=$3; [ -n "$4" ] && macaddr=$4 ;; +- *) [ -n "$1" ] && ip=$1; [ -n "$2" ] && srv=$2; [ -n "$3" ] && gw=$3; [ -n "$4" ] && mask=$4; +- [ -n "$5" ] && hostname=$5; [ -n "$6" ] && dev=$6; [ -n "$7" ] && autoconf=$7; +- case "$8" in +- [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*) +- dns1="$8" +- [ -n "$9" ] && dns2="$9" +- ;; +- [0-9]*) +- mtu="$8" +- if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then +- macaddr="${9}:${10}:${11}:${12}:${13}:${14}" +- fi +- ;; +- *) +- if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then +- macaddr="${9}:${10}:${11}:${12}:${13}:${14}" +- fi +- ;; ++ ++ if [ $# -eq 0 ]; then ++ autoconf="error" ++ return 0 ++ fi ++ ++ if [ $# -eq 1 ]; then ++ # format: ip={dhcp|on|any|dhcp6|auto6} ++ # or ++ # ip= means anaconda-style static config argument cluster ++ autoconf="$1" ++ ++ if strstr "$autoconf" "*.*.*.*"; then ++ # ip= means anaconda-style static config argument cluster: ++ # ip= gateway= netmask= hostname= mtu= ++ # ksdevice={link|bootif|ibft||} ++ ip="$autoconf" ++ gw=$(getarg gateway=) ++ mask=$(getarg netmask=) ++ hostname=$(getarg hostname=) ++ dev=$(getarg ksdevice=) ++ autoconf="none" ++ mtu=$(getarg mtu=) ++ ++ # handle special values for ksdevice ++ case "$dev" in ++ bootif|BOOTIF) dev=$(fix_bootif $(getarg BOOTIF=)) ;; ++ link) dev="" ;; # FIXME: do something useful with this ++ ibft) dev="" ;; # ignore - ibft is handled elsewhere + esac +- ;; +- esac ++ fi ++ return 0 ++ fi + +- # ip= means anaconda-style static config argument cluster: +- # ip= gateway= netmask= hostname= mtu= +- # ksdevice={link|bootif|ibft||} +- if strstr "$autoconf" "*.*.*.*"; then +- ip="$autoconf" +- gw=$(getarg gateway=) +- mask=$(getarg netmask=) +- hostname=$(getarg hostname=) +- dev=$(getarg ksdevice=) +- autoconf="none" +- mtu=$(getarg mtu=) +- +- # handle special values for ksdevice +- case "$dev" in +- bootif|BOOTIF) dev=$(fix_bootif $(getarg BOOTIF=)) ;; +- link) dev="" ;; # FIXME: do something useful with this +- ibft) dev="" ;; # ignore - ibft is handled elsewhere +- esac ++ if [ "$2" = "dhcp" -o "$2" = "on" -o "$2" = "any" -o "$2" = "dhcp6" -o "$2" = "auto6" ]; then ++ # format: ip=:{dhcp|on|any|dhcp6|auto6}[:[][:]] ++ [ -n "$1" ] && dev="$1" ++ [ -n "$2" ] && autoconf="$2" ++ [ -n "$3" ] && mtu=$3 ++ if [ -z "$5" ]; then ++ macaddr="$4" ++ else ++ macaddr="${4}:${5}:${6}:${7}:${8}:${9}" ++ fi ++ return 0 + fi ++ ++ # format: ip=:[]:::::{none|off|dhcp|on|any|dhcp6|auto6|ibft}:[:[][:]] ++ ++ [ -n "$1" ] && ip=$1 ++ [ -n "$2" ] && srv=$2 ++ [ -n "$3" ] && gw=$3 ++ [ -n "$4" ] && mask=$4 ++ [ -n "$5" ] && hostname=$5 ++ [ -n "$6" ] && dev=$6 ++ [ -n "$7" ] && autoconf=$7 ++ case "$8" in ++ [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*) ++ dns1="$8" ++ [ -n "$9" ] && dns2="$9" ++ ;; ++ [0-9]*) ++ mtu="$8" ++ if [ -n "${9}" -a -z "${10}" ]; then ++ macaddr="${9}" ++ elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then ++ macaddr="${9}:${10}:${11}:${12}:${13}:${14}" ++ fi ++ ;; ++ *) ++ if [ -n "${9}" -a -z "${10}" ]; then ++ macaddr="${9}" ++ elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then ++ macaddr="${9}:${10}:${11}:${12}:${13}:${14}" ++ fi ++ ;; ++ esac ++ return 0 + } + + route_to_var() { diff --git a/SOURCES/0409-test-don-t-call-ldconfig-with-path-separator.patch b/SOURCES/0409-test-don-t-call-ldconfig-with-path-separator.patch new file mode 100644 index 0000000..9d19376 --- /dev/null +++ b/SOURCES/0409-test-don-t-call-ldconfig-with-path-separator.patch @@ -0,0 +1,36 @@ +From 55712f46c06d782be7829b860e5009701fcb9da9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 29 Jun 2016 15:11:39 +0200 +Subject: [PATCH] test: don't call ldconfig with -- path separator + +--- + test/TEST-16-DMSQUASH/test.sh | 2 +- + test/TEST-50-MULTINIC/test.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh +index c08a2a4..9d584e3 100755 +--- a/test/TEST-16-DMSQUASH/test.sh ++++ b/test/TEST-16-DMSQUASH/test.sh +@@ -69,7 +69,7 @@ test_setup() { + find_binary plymouth >/dev/null && inst_multiple plymouth + (cd "$initdir"; mkdir -p -- dev sys proc etc var/run tmp ) + cp -a -- /etc/ld.so.conf* "$initdir"/etc +- sudo ldconfig -r -- "$initdir" ++ sudo ldconfig -r "$initdir" + ) + python create.py -d -c livecd-fedora-minimal.ks + return 0 +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index c0c3615..05273be 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -222,7 +222,7 @@ test_setup() { + inst /etc/group /etc/group + + cp -a -- /etc/ld.so.conf* "$initdir"/etc +- sudo ldconfig -r -- "$initdir" ++ sudo ldconfig -r "$initdir" + dracut_kernel_post + ) + diff --git a/SOURCES/0410-network-set-MTU-and-MACADDR-for-dhcp-and-auto6.patch b/SOURCES/0410-network-set-MTU-and-MACADDR-for-dhcp-and-auto6.patch new file mode 100644 index 0000000..4161d5e --- /dev/null +++ b/SOURCES/0410-network-set-MTU-and-MACADDR-for-dhcp-and-auto6.patch @@ -0,0 +1,81 @@ +From 61b5ee6d1d5708c0b41497facd8b97681f9729fb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 29 Jun 2016 15:12:24 +0200 +Subject: [PATCH] network: set MTU and MACADDR for dhcp and auto6 + +--- + modules.d/40network/ifup.sh | 7 ++++++- + modules.d/45ifcfg/write-ifcfg.sh | 7 +++---- + 2 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index f681336..37f51b9 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -110,6 +110,9 @@ do_dhcp() { + return 1 + fi + ++ [ -n "$macaddr" ] && ip link set address $macaddr dev $netif ++ [ -n "$mtu" ] && ip link set mtu $mtu dev $netif ++ + while [ $_COUNT -lt $_DHCPRETRY ]; do + info "Starting dhcp for interface $netif" + dhclient "$@" \ +@@ -144,6 +147,8 @@ do_ipv6auto() { + echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_ra + echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_redirects + linkup $netif ++ [ -n "$macaddr" ] && ip link set address $macaddr dev $netif ++ [ -n "$mtu" ] && ip link set mtu $mtu dev $netif + wait_for_ipv6_auto $netif + + [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname +@@ -388,7 +393,7 @@ for p in $(getargs ip=); do + done + + # Store config for later use +- for i in ip srv gw mask hostname macaddr dns1 dns2; do ++ for i in ip srv gw mask hostname macaddr dns1 dns2 mtu; do + eval '[ "$'$i'" ] && echo '$i'="$'$i'"' + done > /tmp/net.$netif.override + +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index a5114be..cab7477 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -144,6 +144,7 @@ for netup in /tmp/net.*.did-setup ; do + + [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info + [ -e /tmp/team.${netif}.info ] && . /tmp/team.${netif}.info ++ [ -e /tmp/net.${netif}.override ] && . /tmp/net.${netif}.override + + uuid=$(cat /proc/sys/kernel/random/uuid) + if [ "$netif" = "$bridgename" ]; then +@@ -178,8 +179,6 @@ for netup in /tmp/net.*.did-setup ; do + fi + cp /tmp/dhclient.$netif.lease /tmp/ifcfg-leases/dhclient-$uuid-$netif.lease + else +- # If we've booted with static ip= lines, the override file is there +- [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override + if strstr "$ip" '*:*:*'; then + echo "IPV6INIT=yes" + echo "IPV6_AUTOCONF=no" +@@ -245,7 +244,7 @@ for netup in /tmp/net.*.did-setup ; do + echo "MASTER=\"$netif\"" + echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" + unset macaddr +- [ -e /tmp/net.$slave.override ] && . /tmp/net.$slave.override ++ [ -e /tmp/net.${slave}.override ] && . /tmp/net.${slave}.override + interface_bind "$slave" "$macaddr" + ) >> /tmp/ifcfg/ifcfg-$slave + done +@@ -268,7 +267,7 @@ for netup in /tmp/net.*.did-setup ; do + echo "BRIDGE=\"$bridgename\"" + echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\"" + unset macaddr +- [ -e /tmp/net.$slave.override ] && . /tmp/net.$slave.override ++ [ -e /tmp/net.${slave}.override ] && . /tmp/net.${slave}.override + interface_bind "$slave" "$macaddr" + ) >> /tmp/ifcfg/ifcfg-$slave + done diff --git a/SOURCES/0411-test-add-TEST-60-MTUMAC.patch b/SOURCES/0411-test-add-TEST-60-MTUMAC.patch new file mode 100644 index 0000000..bddd2a3 --- /dev/null +++ b/SOURCES/0411-test-add-TEST-60-MTUMAC.patch @@ -0,0 +1,535 @@ +From 323093b621c415cf0d04c48716d77cf9569850d6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 29 Jun 2016 15:51:42 +0200 +Subject: [PATCH] test: add TEST-60-MTUMAC + +test MTU and MACADDR setting +--- + test/TEST-60-MTUMAC/99-idesymlinks.rules | 8 + + test/TEST-60-MTUMAC/Makefile | 10 ++ + test/TEST-60-MTUMAC/client-init.sh | 22 +++ + test/TEST-60-MTUMAC/dhcpd.conf | 15 ++ + test/TEST-60-MTUMAC/exports | 1 + + test/TEST-60-MTUMAC/finished-false.sh | 2 + + test/TEST-60-MTUMAC/hard-off.sh | 3 + + test/TEST-60-MTUMAC/hosts | 5 + + test/TEST-60-MTUMAC/server-init.sh | 98 +++++++++++ + test/TEST-60-MTUMAC/test.sh | 282 +++++++++++++++++++++++++++++++ + 10 files changed, 446 insertions(+) + create mode 100644 test/TEST-60-MTUMAC/99-idesymlinks.rules + create mode 100644 test/TEST-60-MTUMAC/Makefile + create mode 100755 test/TEST-60-MTUMAC/client-init.sh + create mode 100644 test/TEST-60-MTUMAC/dhcpd.conf + create mode 100644 test/TEST-60-MTUMAC/exports + create mode 100755 test/TEST-60-MTUMAC/finished-false.sh + create mode 100755 test/TEST-60-MTUMAC/hard-off.sh + create mode 100644 test/TEST-60-MTUMAC/hosts + create mode 100755 test/TEST-60-MTUMAC/server-init.sh + create mode 100755 test/TEST-60-MTUMAC/test.sh + +diff --git a/test/TEST-60-MTUMAC/99-idesymlinks.rules b/test/TEST-60-MTUMAC/99-idesymlinks.rules +new file mode 100644 +index 0000000..d557790 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/99-idesymlinks.rules +@@ -0,0 +1,8 @@ ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hda", SYMLINK+="sda" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hda*", SYMLINK+="sda$env{MINOR}" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdb", SYMLINK+="sdb" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdb*", SYMLINK+="sdb$env{MINOR}" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdc", SYMLINK+="sdc" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdc*", SYMLINK+="sdc$env{MINOR}" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdd", SYMLINK+="sdd" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdd*", SYMLINK+="sdd$env{MINOR}" +diff --git a/test/TEST-60-MTUMAC/Makefile b/test/TEST-60-MTUMAC/Makefile +new file mode 100644 +index 0000000..aad2705 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/Makefile +@@ -0,0 +1,10 @@ ++all: ++ @$(MAKE) -s --no-print-directory -C ../.. all ++ @V=$(V) basedir=../.. testdir=../ ./test.sh --all ++setup: ++ @$(MAKE) --no-print-directory -C ../.. all ++ @basedir=../.. testdir=../ ./test.sh --setup ++clean: ++ @basedir=../.. testdir=../ ./test.sh --clean ++run: ++ @basedir=../.. testdir=../ ./test.sh --run +diff --git a/test/TEST-60-MTUMAC/client-init.sh b/test/TEST-60-MTUMAC/client-init.sh +new file mode 100755 +index 0000000..a45c312 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/client-init.sh +@@ -0,0 +1,22 @@ ++#!/bin/sh ++exec >/dev/console 2>&1 ++set -x ++export PATH=/sbin:/bin:/usr/sbin:/usr/bin ++strstr() { [ "${1#*$2*}" != "$1" ]; } ++CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) ++export TERM=linux ++export PS1='initramfs-test:\w\$ ' ++stty sane ++echo "made it to the rootfs! Powering down." ++ ++( ++ echo OK ++ cd /sys/class/net ++ for i in ens*; do ++ echo "$i" "$(cat $i/mtu)" "$(cat $i/address)" ++ done ++ echo END ++) > /dev/sda ++ ++strstr "$CMDLINE" "rd.shell" && sh -i ++poweroff -f +diff --git a/test/TEST-60-MTUMAC/dhcpd.conf b/test/TEST-60-MTUMAC/dhcpd.conf +new file mode 100644 +index 0000000..cba2823 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/dhcpd.conf +@@ -0,0 +1,15 @@ ++ddns-update-style none; ++ ++use-host-decl-names true; ++ ++subnet 192.168.50.0 netmask 255.255.255.0 { ++ option subnet-mask 255.255.255.0; ++ option routers 192.168.50.1; ++ next-server 192.168.50.1; ++ server-identifier 192.168.50.1; ++ option domain-name-servers 192.168.50.1; ++ option domain-search "example.com"; ++ option domain-name "other.com"; ++ option root-path "nfs:192.168.50.1:/nfs/client"; ++ range 192.168.50.10 192.168.50.100; ++} +diff --git a/test/TEST-60-MTUMAC/exports b/test/TEST-60-MTUMAC/exports +new file mode 100644 +index 0000000..ff5f29b +--- /dev/null ++++ b/test/TEST-60-MTUMAC/exports +@@ -0,0 +1 @@ ++/nfs/client 192.168.50.0/24(rw,insecure,no_subtree_check,no_root_squash) +diff --git a/test/TEST-60-MTUMAC/finished-false.sh b/test/TEST-60-MTUMAC/finished-false.sh +new file mode 100755 +index 0000000..ecdbef9 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/finished-false.sh +@@ -0,0 +1,2 @@ ++#!/bin/sh ++exit 1 +diff --git a/test/TEST-60-MTUMAC/hard-off.sh b/test/TEST-60-MTUMAC/hard-off.sh +new file mode 100755 +index 0000000..12c3d5a +--- /dev/null ++++ b/test/TEST-60-MTUMAC/hard-off.sh +@@ -0,0 +1,3 @@ ++#!/bin/sh ++getarg rd.shell || poweroff -f ++getarg failme && poweroff -f +diff --git a/test/TEST-60-MTUMAC/hosts b/test/TEST-60-MTUMAC/hosts +new file mode 100644 +index 0000000..d02a4e9 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/hosts +@@ -0,0 +1,5 @@ ++127.0.0.1 localhost ++192.168.50.1 server ++192.168.50.100 client-if1 ++192.168.50.101 client-if2 ++192.168.50.102 client-if3 +diff --git a/test/TEST-60-MTUMAC/server-init.sh b/test/TEST-60-MTUMAC/server-init.sh +new file mode 100755 +index 0000000..88ef212 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/server-init.sh +@@ -0,0 +1,98 @@ ++#!/bin/sh ++exec /dev/console 2>&1 ++set -x ++export PATH=/sbin:/bin:/usr/sbin:/usr/bin ++export TERM=linux ++export PS1='nfstest-server:\w\$ ' ++stty sane ++echo "made it to the rootfs!" ++echo server > /proc/sys/kernel/hostname ++ ++wait_for_if_link() { ++ local cnt=0 ++ local li ++ while [ $cnt -lt 600 ]; do ++ li=$(ip -o link show dev $1 2>/dev/null) ++ [ -n "$li" ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ ++wait_for_if_up() { ++ local cnt=0 ++ local li ++ while [ $cnt -lt 200 ]; do ++ li=$(ip -o link show up dev $1) ++ [ -n "$li" ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ ++wait_for_route_ok() { ++ local cnt=0 ++ while [ $cnt -lt 200 ]; do ++ li=$(ip route show) ++ [ -n "$li" ] && [ -z "${li##*$1*}" ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ ++linkup() { ++ wait_for_if_link $1 2>/dev/null\ ++ && ip link set $1 up 2>/dev/null\ ++ && wait_for_if_up $1 2>/dev/null ++} ++ ++>/dev/watchdog ++ip addr add 127.0.0.1/8 dev lo ++linkup lo ++ip link set dev eth0 name ens3 ++ip addr add 192.168.50.1/24 dev ens3 ++linkup ens3 ++>/dev/watchdog ++modprobe af_packet ++> /dev/watchdog ++modprobe sunrpc ++>/dev/watchdog ++mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs ++>/dev/watchdog ++[ -x /sbin/portmap ] && portmap ++>/dev/watchdog ++[ -x /sbin/rpcbind ] && rpcbind ++>/dev/watchdog ++modprobe nfsd ++>/dev/watchdog ++mount -t nfsd nfsd /proc/fs/nfsd ++>/dev/watchdog ++exportfs -r ++>/dev/watchdog ++rpc.nfsd ++>/dev/watchdog ++rpc.mountd ++>/dev/watchdog ++rpc.idmapd ++>/dev/watchdog ++exportfs -r ++>/dev/watchdog ++>/var/lib/dhcpd/dhcpd.leases ++>/dev/watchdog ++chmod 777 /var/lib/dhcpd/dhcpd.leases ++>/dev/watchdog ++dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases ++#echo -n 'V' > /dev/watchdog ++#sh -i ++#tcpdump -i ens3 ++# Wait forever for the VM to die ++echo "Serving NFS mounts" ++while :; do ++ sleep 10 ++ >/dev/watchdog ++done ++mount -n -o remount,ro / ++poweroff -f +diff --git a/test/TEST-60-MTUMAC/test.sh b/test/TEST-60-MTUMAC/test.sh +new file mode 100755 +index 0000000..7633ac1 +--- /dev/null ++++ b/test/TEST-60-MTUMAC/test.sh +@@ -0,0 +1,282 @@ ++#!/bin/bash ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++TEST_DESCRIPTION="root filesystem on NFS with multiple nics" ++KVERSION=${KVERSION-$(uname -r)} ++ ++# Uncomment this to debug failures ++#DEBUGFAIL="rd.shell rd.break" ++#SERIAL="tcp:127.0.0.1:9999" ++ ++run_server() { ++ # Start server first ++ echo "MULTINIC TEST SETUP: Starting DHCP/NFS server" ++ ++ fsck -a "$TESTDIR"/server.ext3 || return 1 ++ $testdir/run-qemu \ ++ -hda "$TESTDIR"/server.ext3 \ ++ -m 512M -smp 2 \ ++ -display none \ ++ -net socket,listen=127.0.0.1:12350 \ ++ -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ ++ ${SERIAL:+-serial "$SERIAL"} \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -kernel /boot/vmlinuz-"$KVERSION" \ ++ -append "loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ ++ -initrd "$TESTDIR"/initramfs.server \ ++ -pidfile "$TESTDIR"/server.pid -daemonize || return 1 ++ sudo chmod 644 -- "$TESTDIR"/server.pid || return 1 ++ ++ # Cleanup the terminal if we have one ++ tty -s && stty sane ++ ++ echo Sleeping 10 seconds to give the server a head start ++ sleep 10 ++} ++ ++client_test() { ++ local test_name="$1" ++ local cmdline="$2" ++ local check="$3" ++ ++ echo "CLIENT TEST START: $test_name" ++ ++ # Need this so kvm-qemu will boot (needs non-/dev/zero local disk) ++ if ! dd if=/dev/zero of="$TESTDIR"/client.img bs=1M count=1; then ++ echo "Unable to make client sda image" 1>&2 ++ return 1 ++ fi ++ ++ $testdir/run-qemu -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \ ++ -net socket,connect=127.0.0.1:12350 \ ++ -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:02,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:03,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:04,model=e1000 \ ++ -net nic,macaddr=52:54:00:12:34:05,model=e1000 \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -kernel /boot/vmlinuz-"$KVERSION" \ ++ -append "$cmdline $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ ++ -initrd "$TESTDIR"/initramfs.testing ++ ++ { ++ read OK ++ if [[ "$OK" != "OK" ]]; then ++ echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]" ++ return 1 ++ fi ++ ++ while read IFACE MTU MAC; do ++ [[ $IFACE == END ]] && break ++ IFACES+="${IFACE}-${MTU}-${MAC} " ++ done ++ } < "$TESTDIR"/client.img || return 1 ++ ++ echo "$IFACES" ++ ++ for i in $check; do ++ if [[ " $IFACES " != *\ $i\ * ]]; then ++ echo "$i not in '$IFACES'" ++ echo "CLIENT TEST END: $test_name [FAILED - BAD IF]" ++ return 1 ++ fi ++ done ++ ++ for i in $IFACES; do ++ if [[ " $check " != *\ $i\ * ]]; then ++ echo "$i in '$IFACES', but should not be" ++ echo "CLIENT TEST END: $test_name [FAILED - BAD IF]" ++ return 1 ++ fi ++ done ++ ++ echo "CLIENT TEST END: $test_name [OK]" ++ return 0 ++} ++ ++ ++test_run() { ++ if ! run_server; then ++ echo "Failed to start server" 1>&2 ++ return 1 ++ fi ++ test_client || { kill_server; return 1; } ++} ++ ++test_client() { ++ client_test "MTUMAC format: ip=:{dhcp|on|any|dhcp6|auto6}[:[][:]]" \ ++ " ++ip=ens3:dhcp:1000 ++ip=ens4:dhcp::54:52:00:ab:cd:01 ++ip=ens5:dhcp::[54:52:00:ab:cd:02] ++ip=ens6:dhcp:1000:54:52:00:ab:cd:03 ++ip=ens7:dhcp:1000:[54:52:00:ab:cd:04] ++rd.neednet=1 ++root=nfs:192.168.50.1:/nfs/client bootdev=ens3 ++" \ ++ "ens3-1000-52:54:00:12:34:01 ens4-1500-54:52:00:ab:cd:01 ens5-1500-54:52:00:ab:cd:02 ens6-1000-54:52:00:ab:cd:03 ens7-1000-54:52:00:ab:cd:04" || return 1 ++ client_test "MTUMAC format: format: ip=:[]:::::{none|off|dhcp|on|any|dhcp6|auto6|ibft}:[:[][:]]" \ ++ " ++ip=192.168.50.2::192.168.50.1:24:test:ens3:none:1000 ++ip=192.168.50.3::192.168.50.1:24:test:ens4:none::54:52:00:ab:cd:01 ++ip=192.168.50.4::192.168.50.1:24:test:ens5:none::[54:52:00:ab:cd:02] ++ip=192.168.50.5::192.168.50.1:24:test:ens6:none:1000:54:52:00:ab:cd:03 ++ip=192.168.50.6::192.168.50.1:24:test:ens7:none:1000:[54:52:00:ab:cd:04] ++rd.neednet=1 ++root=nfs:192.168.50.1:/nfs/client bootdev=ens3 ++" \ ++ "ens3-1000-52:54:00:12:34:01 ens4-1500-54:52:00:ab:cd:01 ens5-1500-54:52:00:ab:cd:02 ens6-1000-54:52:00:ab:cd:03 ens7-1000-54:52:00:ab:cd:04" || return 1 ++ ++ kill_server ++ return 0 ++} ++ ++test_setup() { ++ # Make server root ++ dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=60 ++ mke2fs -j -F -- "$TESTDIR"/server.ext3 ++ mkdir -- "$TESTDIR"/mnt ++ sudo mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt ++ ++ ( ++ export initdir="$TESTDIR"/mnt ++ . "$basedir"/dracut-init.sh ++ ++ ( ++ cd "$initdir"; ++ mkdir -p -- dev sys proc run etc var/run tmp var/lib/{dhcpd,rpcbind} ++ mkdir -p -- var/lib/nfs/{v4recovery,rpc_pipefs} ++ chmod 777 -- var/lib/rpcbind var/lib/nfs ++ ) ++ ++ for _f in modules.builtin.bin modules.builtin; do ++ [[ $srcmods/$_f ]] && break ++ done || { ++ dfatal "No modules.builtin.bin and modules.builtin found!" ++ return 1 ++ } ++ ++ for _f in modules.builtin.bin modules.builtin modules.order; do ++ [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f" ++ done ++ ++ inst_multiple sh ls shutdown poweroff stty cat ps ln ip \ ++ dmesg mkdir cp ping exportfs \ ++ modprobe rpc.nfsd rpc.mountd showmount tcpdump \ ++ /etc/services sleep mount chmod ++ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do ++ [ -f "${_terminfodir}"/l/linux ] && break ++ done ++ inst_multiple -o "${_terminfodir}"/l/linux ++ type -P portmap >/dev/null && inst_multiple portmap ++ type -P rpcbind >/dev/null && inst_multiple rpcbind ++ [ -f /etc/netconfig ] && inst_multiple /etc/netconfig ++ type -P dhcpd >/dev/null && inst_multiple dhcpd ++ [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd ++ instmods nfsd sunrpc ipv6 lockd af_packet ++ inst_simple /etc/os-release ++ inst ./server-init.sh /sbin/init ++ inst ./hosts /etc/hosts ++ inst ./exports /etc/exports ++ inst ./dhcpd.conf /etc/dhcpd.conf ++ inst_multiple /etc/nsswitch.conf /etc/rpc /etc/protocols ++ ++ inst_multiple rpc.idmapd /etc/idmapd.conf ++ ++ inst_libdir_file 'libnfsidmap_nsswitch.so*' ++ inst_libdir_file 'libnfsidmap/*.so*' ++ inst_libdir_file 'libnfsidmap*.so*' ++ ++ _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \ ++ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|') ++ _nsslibs=${_nsslibs#|} ++ _nsslibs=${_nsslibs%|} ++ ++ inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' ++ ++ inst /etc/nsswitch.conf /etc/nsswitch.conf ++ inst /etc/passwd /etc/passwd ++ inst /etc/group /etc/group ++ ++ cp -a -- /etc/ld.so.conf* "$initdir"/etc ++ ldconfig -r "$initdir" ++ dracut_kernel_post ++ ) ++ ++ # Make client root inside server root ++ ( ++ export initdir="$TESTDIR"/mnt/nfs/client ++ . "$basedir"/dracut-init.sh ++ inst_multiple sh shutdown poweroff stty cat ps ln ip \ ++ mount dmesg mkdir cp ping grep ls ++ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do ++ [[ -f ${_terminfodir}/l/linux ]] && break ++ done ++ inst_multiple -o "${_terminfodir}"/l/linux ++ inst_simple /etc/os-release ++ inst ./client-init.sh /sbin/init ++ ( ++ cd "$initdir" ++ mkdir -p -- dev sys proc etc run ++ mkdir -p -- var/lib/nfs/rpc_pipefs ++ ) ++ inst /etc/nsswitch.conf /etc/nsswitch.conf ++ inst /etc/passwd /etc/passwd ++ inst /etc/group /etc/group ++ ++ inst_multiple rpc.idmapd /etc/idmapd.conf ++ inst_libdir_file 'libnfsidmap_nsswitch.so*' ++ inst_libdir_file 'libnfsidmap/*.so*' ++ inst_libdir_file 'libnfsidmap*.so*' ++ ++ _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' -- /etc/nsswitch.conf \ ++ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|') ++ _nsslibs=${_nsslibs#|} ++ _nsslibs=${_nsslibs%|} ++ ++ inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' ++ ++ cp -a -- /etc/ld.so.conf* "$initdir"/etc ++ sudo ldconfig -r "$initdir" ++ ) ++ ++ sudo umount "$TESTDIR"/mnt ++ rm -fr -- "$TESTDIR"/mnt ++ ++ # Make an overlay with needed tools for the test harness ++ ( ++ export initdir="$TESTDIR"/overlay ++ . "$basedir"/dracut-init.sh ++ inst_multiple poweroff shutdown ++ inst_hook emergency 000 ./hard-off.sh ++ inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ++ ) ++ ++ # Make server's dracut image ++ $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ ++ --no-early-microcode \ ++ -m "udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ ++ -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ ++ -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1 ++ ++ # Make client's dracut image ++ $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ ++ --no-early-microcode \ ++ -o "plymouth" \ ++ -a "debug" \ ++ -d "af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \ ++ -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 ++} ++ ++kill_server() { ++ if [[ -s "$TESTDIR"/server.pid ]]; then ++ sudo kill -TERM -- $(cat "$TESTDIR"/server.pid) ++ rm -f -- "$TESTDIR"/server.pid ++ fi ++} ++ ++test_cleanup() { ++ kill_server ++} ++ ++. "$testdir"/test-functions diff --git a/SOURCES/0412-network-net-lib.sh-parse_ifname_opts-support-21-byte.patch b/SOURCES/0412-network-net-lib.sh-parse_ifname_opts-support-21-byte.patch new file mode 100644 index 0000000..f0d2dcc --- /dev/null +++ b/SOURCES/0412-network-net-lib.sh-parse_ifname_opts-support-21-byte.patch @@ -0,0 +1,41 @@ +From 435af39a0054c2e06ae98a5271c03259e15ba7e6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 29 Jun 2016 16:37:40 +0200 +Subject: [PATCH] network/net-lib.sh(parse_ifname_opts): support 21 byte MAC + addrs + +infiniband MAC addrs are 20 bytes long not 6 + +https://bugzilla.redhat.com/show_bug.cgi?id=1319270 +--- + modules.d/40network/net-lib.sh | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 0c00f92..9f76714 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -523,8 +523,13 @@ parse_ifname_opts() { + # udev requires MAC addresses to be lower case + ifname_mac=$(echo $2:$3:$4:$5:$6:$7 | sed 'y/ABCDEF/abcdef/') + ;; ++ 21) ++ # infiniband MAC addrs are 20 bytes long not 6 ++ ifname_if=$1 ++ ifname_mac=$(echo $2:$3:$4:$5:$6:$7:$8:$9:$10:$11:$12:13:$14:$15$16:$17:$18:$19:$20:$21 | sed 'y/ABCDEF/abcdef/') ++ ;; + *) +- die "Invalid arguments for ifname=" ++ die "Invalid arguments for ifname=$1" + ;; + esac + +@@ -533,7 +538,7 @@ parse_ifname_opts() { + warn "ifname=$ifname_if uses the kernel name space for interfaces" + warn "This can fail for multiple network interfaces and is discouraged!" + warn "Please use a custom name like \"netboot\" or \"bluesocket\"" +- warn "or use biosdevname and no ifname= at all." ++ warn "or use the persistent interface names from udev or biosdevname and no ifname= at all." + ;; + esac + diff --git a/SOURCES/0413-network-net-lib.sh-wait_for_ipv6_dad-simplify-ip-cal.patch b/SOURCES/0413-network-net-lib.sh-wait_for_ipv6_dad-simplify-ip-cal.patch new file mode 100644 index 0000000..beec079 --- /dev/null +++ b/SOURCES/0413-network-net-lib.sh-wait_for_ipv6_dad-simplify-ip-cal.patch @@ -0,0 +1,32 @@ +From a7805d1297645722b1522a48a5588e949e2f3c7c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 29 Jun 2016 17:18:46 +0200 +Subject: [PATCH] network/net-lib.sh(wait_for_ipv6_dad): simplify ip call + +taken from initscripts +--- + modules.d/40network/net-lib.sh | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 9f76714..92154cc 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -624,16 +624,12 @@ wait_for_ipv6_dad() { + + wait_for_ipv6_auto() { + local cnt=0 +- local li + local timeout="$(getargs rd.net.timeout.ipv6auto=)" + timeout=${timeout:-40} + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- li=$(ip -6 addr show dev $1) +- if ! strstr "$li" "tentative"; then +- strstr "$li" "dynamic" && return 0 +- fi ++ [ -z "$(ip -6 addr show dev $1 scope global tentative)" ] && return 0 + sleep 0.1 + cnt=$(($cnt+1)) + done diff --git a/SOURCES/0414-systemd-ensure-journal-is-volatile.patch b/SOURCES/0414-systemd-ensure-journal-is-volatile.patch new file mode 100644 index 0000000..37df7fe --- /dev/null +++ b/SOURCES/0414-systemd-ensure-journal-is-volatile.patch @@ -0,0 +1,32 @@ +From 53310e44c9b785641d4889b1dab350b562df5ed9 Mon Sep 17 00:00:00 2001 +From: Michael Chapman +Date: Wed, 4 May 2016 10:49:56 +1000 +Subject: [PATCH] systemd: ensure journal is volatile + +If journald.conf already contains Storage=persistent, journald will +write to /var/log/journal/, which ends up at /run/initramfs/log/journal/ +after switching root. We want to make sure early boot logs are written +to /run/log/journal/ so they can be flushed to /var/log/journal/ after +switching root. + +(cherry picked from commit 5dea430e087ec7749080547a6a6fe5b152f665ef) +--- + modules.d/98systemd/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh +index 64b83a0..10beadd 100755 +--- a/modules.d/98systemd/module-setup.sh ++++ b/modules.d/98systemd/module-setup.sh +@@ -255,9 +255,10 @@ install() { + + + mkdir -p "$initdir/etc/systemd" +- # turn off RateLimit for journal ++ # We must use a volatile journal, and we don't want rate-limiting + { + echo "[Journal]" ++ echo "Storage=volatile" + echo "RateLimitInterval=0" + echo "RateLimitBurst=0" + } >> "$initdir/etc/systemd/journald.conf" diff --git a/SOURCES/0415-network-dhcp-before-parsing-specified-dns-through-cm.patch b/SOURCES/0415-network-dhcp-before-parsing-specified-dns-through-cm.patch new file mode 100644 index 0000000..628c9f0 --- /dev/null +++ b/SOURCES/0415-network-dhcp-before-parsing-specified-dns-through-cm.patch @@ -0,0 +1,87 @@ +From 5bc318633fdf2c5bfea88bf2cf03e5aac2e78a1d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 29 Jun 2016 17:26:17 +0200 +Subject: [PATCH] network: dhcp before parsing specified dns through cmdline + +I met a problem when passing kdump dns to dracut via "nameserver=x.x.x.x", +the dns I provided didn't appear in the "/etc/resolv.conf". + +After some debugging, found that when setup dhcp DNS, in setup_interface() +and setup_interface6(), it has: + echo "search $search $domain" > /tmp/net.$netif.resolv.conf + +So if "$search $domain" isn't NULL(this is ture in my kdump environment), +the dns contents(that is, dns1, dns2, nameserver) in "ifup" before dhcp +will be discarded. + +This patch addresses it by handling dhcp first. In fact this is also the +way the NetworkManager in 1st kernel works. + +Signed-off-by: Xunlei Pang + +cherry-pick of commit cf376023e6d0d4abd9816fa954bb917fc2557713 +--- + modules.d/40network/ifup.sh | 31 +++++++++++++++---------------- + 1 file changed, 15 insertions(+), 16 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 37f51b9..19b7bbd 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -350,16 +350,15 @@ fi + ip=$(getarg ip) + + if [ -z "$ip" ]; then +- for s in $(getargs nameserver); do +- [ -n "$s" ] || continue +- echo nameserver $s >> /tmp/net.$netif.resolv.conf +- done +- + if [ "$netroot" = "dhcp6" ]; then + do_dhcp -6 + else + do_dhcp -4 + fi ++ for s in $(getargs nameserver); do ++ [ -n "$s" ] || continue ++ echo nameserver $s >> /tmp/net.$netif.resolv.conf ++ done + fi + + +@@ -386,17 +385,6 @@ for p in $(getargs ip=); do + [ "$use_bridge" != 'true' ] && \ + [ "$use_vlan" != 'true' ] && continue + +- # setup nameserver +- for s in "$dns1" "$dns2" $(getargs nameserver); do +- [ -n "$s" ] || continue +- echo nameserver $s >> /tmp/net.$netif.resolv.conf +- done +- +- # Store config for later use +- for i in ip srv gw mask hostname macaddr dns1 dns2 mtu; do +- eval '[ "$'$i'" ] && echo '$i'="$'$i'"' +- done > /tmp/net.$netif.override +- + for autoopt in $(str_replace "$autoconf" "," " "); do + case $autoopt in + dhcp|on|any) +@@ -412,6 +400,17 @@ for p in $(getargs ip=); do + done + ret=$? + ++ # setup nameserver ++ for s in "$dns1" "$dns2" $(getargs nameserver); do ++ [ -n "$s" ] || continue ++ echo nameserver $s >> /tmp/net.$netif.resolv.conf ++ done ++ ++ # Store config for later use ++ for i in ip srv gw mask hostname macaddr dns1 dns2 mtu; do ++ eval '[ "$'$i'" ] && echo '$i'="$'$i'"' ++ done > /tmp/net.$netif.override ++ + if [ $ret -eq 0 ]; then + > /tmp/net.${netif}.up + diff --git a/SOURCES/0416-network-net-lib.sh-delete-duplicated-DNS-items-from-.patch b/SOURCES/0416-network-net-lib.sh-delete-duplicated-DNS-items-from-.patch new file mode 100644 index 0000000..01f469a --- /dev/null +++ b/SOURCES/0416-network-net-lib.sh-delete-duplicated-DNS-items-from-.patch @@ -0,0 +1,47 @@ +From a3204225884ba63aee94db345d5c38f1c872d6b7 Mon Sep 17 00:00:00 2001 +From: Xunlei Pang +Date: Tue, 26 Apr 2016 18:05:11 +0800 +Subject: [PATCH] network/net-lib.sh: delete duplicated DNS items from + "/etc/resolv.conf" + +Users can pass the DNS information throught "nameserver=" cmdline, +there maybe duplicated inputs. + +"/etc/resolv.conf" have some restrictions on the number of DNS items +effective, so make sure that this file contains no duplicated items. + +We achieve this by simply making the file have no duplicated lines. + +Signed-off-by: Xunlei Pang +(cherry picked from commit 4fa5c235a76c085f5958002826436ed9c40e5034) +--- + modules.d/40network/module-setup.sh | 2 +- + modules.d/40network/net-lib.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 75ce622..de35367 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -69,7 +69,7 @@ installkernel() { + + install() { + local _arch _i _dir +- inst_multiple ip arping dhclient sed ++ inst_multiple ip arping dhclient sed awk + inst_multiple -o ping ping6 + inst_multiple -o brctl + inst_multiple -o teamd teamdctl teamnl +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 92154cc..e6942a5 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -121,7 +121,7 @@ setup_net() { + [ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts + # set up resolv.conf + [ -e /tmp/net.$netif.resolv.conf ] && \ +- cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf ++ awk '!array[$0]++' /tmp/net.$netif.resolv.conf > /etc/resolv.conf + [ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw + + # add static route diff --git a/SOURCES/0417-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch b/SOURCES/0417-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch new file mode 100644 index 0000000..b06aa41 --- /dev/null +++ b/SOURCES/0417-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch @@ -0,0 +1,78 @@ +From bac74f05e37b5a4e9a0f2fd5e26c4a8b3546e574 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 12 May 2016 20:03:28 +0200 +Subject: [PATCH] 40network: Update iBFT scanning code to handle IPv6 + +IPv6 addresses should be specified in brackets so that the +ip= scanning code doesn't get confused. + +References: bnc#887542 + +Signed-off-by: Hannes Reinecke +Signed-off-by: Thomas Renninger +(cherry picked from commit c98d1756f766e49f7b457e217b0e0156d577d8b8) +--- + modules.d/40network/net-lib.sh | 38 ++++++++++++++++++++++++++++++++++---- + 1 file changed, 34 insertions(+), 4 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index e6942a5..98dbbb6 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -235,22 +235,52 @@ ibft_to_cmdline() { + + [ -e /tmp/net.${dev}.has_ibft_config ] && continue + ++ [ -e ${iface}/flags ] && flags=$(read a < ${iface}/flags; echo $a) ++ # Skip invalid interfaces ++ (( $flags & 1 )) || continue ++ # Skip interfaces not used for booting ++ (( $flags & 2 )) || continue + [ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a) +- +- if [ -n "$dhcp" ]; then +- echo "ip=$dev:dhcp" ++ [ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a) ++ [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a) ++ ++ if [ -n "$ip" ] ; then ++ case "$ip" in ++ *.*.*.*) ++ family=ipv4 ++ ;; ++ *:*) ++ family=ipv6 ++ ;; ++ esac ++ fi ++ if [ -n "$dhcp" ] || [ "$origin" -eq 3 ]; then ++ if [ "$family" = "ipv6" ] ; then ++ echo "ip=$dev:dhcp6" ++ else ++ echo "ip=$dev:dhcp" ++ fi + elif [ -e ${iface}/ip-addr ]; then +- [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a) + # skip not assigned ip adresses + [ "$ip" = "0.0.0.0" ] && continue + [ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a) + [ "$gateway" = "0.0.0.0" ] && unset $gateway + [ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a) ++ [ -e ${iface}/prefix-len ] && prefix=$(read a < ${iface}/prefix-len; echo $a) + [ -e ${iface}/primary-dns ] && dns1=$(read a < ${iface}/primary-dns; echo $a) + [ "$dns1" = "0.0.0.0" ] && unset $dns1 + [ -e ${iface}/secondary-dns ] && dns2=$(read a < ${iface}/secondary-dns; echo $a) + [ "$dns2" = "0.0.0.0" ] && unset $dns2 + [ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a) ++ if [ "$family" = "ipv6" ] ; then ++ if [ -n "$ip" ] ; then ++ [ -n "$prefix" ] || prefix=64 ++ mask="$prefix" ++ fi ++ if [ -n "$gw" ] ; then ++ gw="[${gw}]" ++ fi ++ fi + if [ -n "$ip" ] && [ -n "$mask" ]; then + echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}" + else diff --git a/SOURCES/0418-network-net-lib.sh-auto6-wait-for-route-ra.patch b/SOURCES/0418-network-net-lib.sh-auto6-wait-for-route-ra.patch new file mode 100644 index 0000000..4aafe6c --- /dev/null +++ b/SOURCES/0418-network-net-lib.sh-auto6-wait-for-route-ra.patch @@ -0,0 +1,25 @@ +From 6d22a6860ea22d4b5a78d0328be4524579cece98 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jun 2016 08:52:09 +0200 +Subject: [PATCH] network/net-lib.sh: auto6 wait for route ra + +Wait for a router advertised route +--- + modules.d/40network/net-lib.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 98dbbb6..b248133 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -659,7 +659,9 @@ wait_for_ipv6_auto() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- [ -z "$(ip -6 addr show dev $1 scope global tentative)" ] && return 0 ++ [ -z "$(ip -6 addr show dev "$1" scope global tentative)" ] \ ++ && [ -n "$(ip -6 route list proto ra dev "$1")" ] \ ++ && return 0 + sleep 0.1 + cnt=$(($cnt+1)) + done diff --git a/SOURCES/0419-network-differ-between-ipv6-local-and-global-tentati.patch b/SOURCES/0419-network-differ-between-ipv6-local-and-global-tentati.patch new file mode 100644 index 0000000..77c9d1f --- /dev/null +++ b/SOURCES/0419-network-differ-between-ipv6-local-and-global-tentati.patch @@ -0,0 +1,66 @@ +From 42dd8928a81ba5ec244a5634813285ab6f342480 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jun 2016 11:10:35 +0200 +Subject: [PATCH] network: differ between ipv6 local and global tentative + +For dhcpv6, only a non-tentative scope local address is needed. +--- + modules.d/40network/dhclient-script.sh | 2 +- + modules.d/40network/net-lib.sh | 24 +++++++++++++++++++++--- + 2 files changed, 22 insertions(+), 4 deletions(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 9553858..f6c77f2 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -149,7 +149,7 @@ case $reason in + PREINIT6) + echo "dhcp: PREINIT6 $netif up" + linkup $netif +- wait_for_ipv6_dad $netif ++ wait_for_ipv6_dad_link $netif + ;; + + BOUND) +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index b248133..986c673 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -636,16 +636,34 @@ wait_for_route_ok() { + return 1 + } + ++wait_for_ipv6_dad_link() { ++ local cnt=0 ++ local timeout="$(getargs rd.net.timeout.ipv6dad=)" ++ timeout=${timeout:-50} ++ timeout=$(($timeout*10)) ++ ++ while [ $cnt -lt $timeout ]; do ++ [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ ++ && return 0 ++ [ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \ ++ && return 1 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ + wait_for_ipv6_dad() { + local cnt=0 +- local li + local timeout="$(getargs rd.net.timeout.ipv6dad=)" + timeout=${timeout:-50} + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- li=$(ip -6 addr show dev $1 scope link) +- strstr "$li" "tentative" || return 0 ++ [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ ++ && return 0 ++ [ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \ ++ && return 1 + sleep 0.1 + cnt=$(($cnt+1)) + done diff --git a/SOURCES/0420-network-flush-only-IPv4-addresses-on-configuration.patch b/SOURCES/0420-network-flush-only-IPv4-addresses-on-configuration.patch new file mode 100644 index 0000000..da2f01a --- /dev/null +++ b/SOURCES/0420-network-flush-only-IPv4-addresses-on-configuration.patch @@ -0,0 +1,31 @@ +From cc3f588071c35821b55e1db2201b0650df688dcc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jun 2016 11:11:37 +0200 +Subject: [PATCH] network: flush only IPv4 addresses on configuration + +also flush on dhcp +--- + modules.d/40network/ifup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 19b7bbd..cedf9a7 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -112,6 +112,7 @@ do_dhcp() { + + [ -n "$macaddr" ] && ip link set address $macaddr dev $netif + [ -n "$mtu" ] && ip link set mtu $mtu dev $netif ++ ip -4 addr flush dev $netif + + while [ $_COUNT -lt $_DHCPRETRY ]; do + info "Starting dhcp for interface $netif" +@@ -188,7 +189,7 @@ do_static() { + warn "Duplicate address detected for $ip for interface $netif." + return 1 + fi +- ip addr flush dev $netif ++ ip -4 addr flush dev $netif + ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif + fi + diff --git a/SOURCES/0421-network-wait_for_ipv6_auto-wait-for-all-tentative-ad.patch b/SOURCES/0421-network-wait_for_ipv6_auto-wait-for-all-tentative-ad.patch new file mode 100644 index 0000000..a227fb6 --- /dev/null +++ b/SOURCES/0421-network-wait_for_ipv6_auto-wait-for-all-tentative-ad.patch @@ -0,0 +1,22 @@ +From 13264563a9471844102113b7062534466d20ce38 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jun 2016 12:15:56 +0200 +Subject: [PATCH] network:wait_for_ipv6_auto() wait for all tentative addresses + +--- + modules.d/40network/net-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 986c673..7120193 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -677,7 +677,7 @@ wait_for_ipv6_auto() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- [ -z "$(ip -6 addr show dev "$1" scope global tentative)" ] \ ++ [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ + && [ -n "$(ip -6 route list proto ra dev "$1")" ] \ + && return 0 + sleep 0.1 diff --git a/SOURCES/0422-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch b/SOURCES/0422-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch new file mode 100644 index 0000000..fcb3926 --- /dev/null +++ b/SOURCES/0422-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch @@ -0,0 +1,56 @@ +From 9aa224cc19989807b6e34b72af01e0a12072940c Mon Sep 17 00:00:00 2001 +From: Alexander Kurtz +Date: Fri, 6 May 2016 17:25:37 +0200 +Subject: [PATCH] dracut-systemd/dracut-cmdline.sh: Don't error out if there is + no root= argument. + +Thanks to systemd's gpt-auto-generator [0] (which implements the Discoverable +Partitions Specification [1]), it is no longer necessary to always specify the +root= argument. + +However, dracut would still refuse to boot if there was no root= argument (or +if it was set to the special value "gpt-auto" [2]). This commit stops dracut +from aborting the boot process in these cases and simply lets systemd do its +magic. + +[0] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator +[1] https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/ +[2] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator/gpt-auto-generator.c#L928 + +(cherry picked from commit 016613c774baf3d30c6425a65ead05d8b55d6279) +--- + modules.d/98systemd/dracut-cmdline.sh | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh +index 9d15663..d22e4d6 100755 +--- a/modules.d/98systemd/dracut-cmdline.sh ++++ b/modules.d/98systemd/dracut-cmdline.sh +@@ -22,7 +22,12 @@ getargbool 0 rd.udev.log-priority=debug -d rd.udev.debug -d -n -y rdudevdebug && + + source_conf /etc/conf.d + +-root=$(getarg root=) ++# Get the "root=" parameter from the kernel command line, but differentiate ++# between the case where it was set to the empty string and the case where it ++# wasn't specified at all. ++if ! root="$(getarg root=)"; then ++ root='UNSET' ++fi + + rflags="$(getarg rootflags=)" + getargbool 0 ro && rflags="${rflags},ro" +@@ -66,9 +71,12 @@ case "$root" in + /dev/*) + root="block:${root}" + rootok=1 ;; ++ UNSET|gpt-auto) ++ # systemd's gpt-auto-generator handles this case. ++ rootok=1 ;; + esac + +-[ -z "$root" ] && die "No or empty root= argument" ++[ -z "$root" ] && die "Empty root= argument" + [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" + + export root rflags fstype netroot NEWROOT diff --git a/SOURCES/0423-virtfs-use-systemd-generator.patch b/SOURCES/0423-virtfs-use-systemd-generator.patch new file mode 100644 index 0000000..d161240 --- /dev/null +++ b/SOURCES/0423-virtfs-use-systemd-generator.patch @@ -0,0 +1,87 @@ +From ca64eeec79c93b89aea51b3f26d9539db5cf2a65 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jun 2016 15:22:47 +0200 +Subject: [PATCH] virtfs: use systemd generator + +use a systemd generator, instead of a dracut hook to mount +--- + modules.d/95virtfs/module-setup.sh | 7 +++++- + modules.d/95virtfs/parse-virtfs.sh | 2 +- + modules.d/95virtfs/virtfs-generator.sh | 39 ++++++++++++++++++++++++++++++++++ + 3 files changed, 46 insertions(+), 2 deletions(-) + create mode 100755 modules.d/95virtfs/virtfs-generator.sh + +diff --git a/modules.d/95virtfs/module-setup.sh b/modules.d/95virtfs/module-setup.sh +index 12bd354..3d80b75 100755 +--- a/modules.d/95virtfs/module-setup.sh ++++ b/modules.d/95virtfs/module-setup.sh +@@ -37,5 +37,10 @@ installkernel() { + + install() { + inst_hook cmdline 95 "$moddir/parse-virtfs.sh" +- inst_hook mount 99 "$moddir/mount-virtfs.sh" ++ ++ if ! dracut_module_included "systemd"; then ++ inst_hook mount 99 "$moddir/mount-virtfs.sh" ++ else ++ inst_script "$moddir/virtfs-generator.sh" $systemdutildir/system-generators/dracut-virtfs-generator ++ fi + } +diff --git a/modules.d/95virtfs/parse-virtfs.sh b/modules.d/95virtfs/parse-virtfs.sh +index ce6de6d..a9ad48a 100755 +--- a/modules.d/95virtfs/parse-virtfs.sh ++++ b/modules.d/95virtfs/parse-virtfs.sh +@@ -3,7 +3,7 @@ + # ex: ts=8 sw=4 sts=4 et filetype=sh + + if [ "${root%%:*}" = "virtfs" ] ; then +- modprobe 9pnet_virtio ++ initqueue --onetime modprobe -b -q 9pnet_virtio + + rootok=1 + fi +diff --git a/modules.d/95virtfs/virtfs-generator.sh b/modules.d/95virtfs/virtfs-generator.sh +new file mode 100755 +index 0000000..3bdddf1 +--- /dev/null ++++ b/modules.d/95virtfs/virtfs-generator.sh +@@ -0,0 +1,39 @@ ++#!/bin/sh ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh ++ ++[ -z "$root" ] && root=$(getarg root=) ++ ++[ "${root%%:*}" = "virtfs" ] || exit 0 ++ ++GENERATOR_DIR="$2" ++[ -z "$GENERATOR_DIR" ] && exit 1 ++ ++[ -d "$GENERATOR_DIR" ] || mkdir "$GENERATOR_DIR" ++ ++ROOTFLAGS=$(getarg rootflags=) || ROOTFLAGS="trans=virtio,version=9p2000.L" ++ROOTFSTYPE=$(getarg rootfstype=) || ROOTFSTYPE="9p" ++ ++root=${root#virtfs:} ++ ++if getarg "ro"; then ++ if [ -n "$ROOTFLAGS" ]; then ++ ROOTFLAGS="$ROOTFLAGS,ro" ++ else ++ ROOTFLAGS="ro" ++ fi ++fi ++ ++{ ++ echo "[Unit]" ++ echo "Before=initrd-root-fs.target" ++ echo "[Mount]" ++ echo "Where=/sysroot" ++ echo "What=${root}" ++ [ -n "$ROOTFSTYPE" ] && echo "Type=${ROOTFSTYPE}" ++ [ -n "$ROOTFLAGS" ] && echo "Options=${ROOTFLAGS}" ++} > "$GENERATOR_DIR"/sysroot.mount ++ ++exit 0 diff --git a/SOURCES/0424-add-rd.device.timeout-seconds-parameter.patch b/SOURCES/0424-add-rd.device.timeout-seconds-parameter.patch new file mode 100644 index 0000000..9d22d06 --- /dev/null +++ b/SOURCES/0424-add-rd.device.timeout-seconds-parameter.patch @@ -0,0 +1,60 @@ +From ca46c751d1becbbff68c561bfbc9ee36182fcc38 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jun 2016 15:24:54 +0200 +Subject: [PATCH] add rd.device.timeout= parameter + +--- + modules.d/98systemd/rootfs-generator.sh | 4 +++- + modules.d/99base/dracut-lib.sh | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh +index 2c09895..a7bffdf 100755 +--- a/modules.d/98systemd/rootfs-generator.sh ++++ b/modules.d/98systemd/rootfs-generator.sh +@@ -7,6 +7,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + generator_wait_for_dev() + { + local _name ++ local _timeout + + _name="$(str_replace "$1" '/' '\x2f')" + +@@ -26,10 +27,11 @@ generator_wait_for_dev() + fi + + if ! [ -f /run/systemd/generator/${_name}.device.d/timeout.conf ]; then ++ _timeout=$(getarg rd.device.timeout || printf "0") + mkdir -p /run/systemd/generator/${_name}.device.d + { + echo "[Unit]" +- echo "JobTimeoutSec=0" ++ echo "JobTimeoutSec=$_timeout" + } > /run/systemd/generator/${_name}.device.d/timeout.conf + fi + } +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index c2b6108..16bc74d 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -887,6 +887,7 @@ wait_for_dev() + local _name + local _needreload + local _noreload ++ local _timeout + + if [ "$1" = "-n" ]; then + _noreload=1 +@@ -913,10 +914,11 @@ wait_for_dev() + fi + + if ! [ -f ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf ]; then ++ _timeout=$(getarg rd.device.timeout || printf "0") + mkdir -p ${PREFIX}/etc/systemd/system/${_name}.device.d + { + echo "[Unit]" +- echo "JobTimeoutSec=0" ++ echo "JobTimeoutSec=$_timeout" + } > ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf + _needreload=1 + fi diff --git a/SOURCES/0425-test-TEST-04-systemd-fixup-test.patch b/SOURCES/0425-test-TEST-04-systemd-fixup-test.patch new file mode 100644 index 0000000..8190034 --- /dev/null +++ b/SOURCES/0425-test-TEST-04-systemd-fixup-test.patch @@ -0,0 +1,81 @@ +From 22a907b38342fc5380236b2483424bcc38de1bd0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jun 2016 15:25:54 +0200 +Subject: [PATCH] test/TEST-04-systemd: fixup test + +- fix find -perm +- add failme test cases +- remove journal output +--- + test/TEST-04-FULL-SYSTEMD/test-init.sh | 2 +- + test/TEST-04-FULL-SYSTEMD/test.sh | 16 +++++++++------- + 2 files changed, 10 insertions(+), 8 deletions(-) + +diff --git a/test/TEST-04-FULL-SYSTEMD/test-init.sh b/test/TEST-04-FULL-SYSTEMD/test-init.sh +index dcda926..288ae48 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test-init.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test-init.sh +@@ -19,7 +19,7 @@ if ismounted /usr && [ ! -s /failed ]; then + echo "dracut-root-block-success" >/dev/sdc + fi + +-journalctl --full --no-pager -o short-monotonic ++#journalctl --full --no-pager -o short-monotonic + + if [ -s /failed ]; then + echo "**************************FAILED**************************" +diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh +index 01b406d..93c3389 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test.sh +@@ -22,7 +22,7 @@ client_run() { + -hdc $TESTDIR/result \ + -m 256M -smp 2 -nographic \ + -net none \ +- -append "root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT $DEBUGFAIL" \ ++ -append "$client_opts rd.device.timeout=20 rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + + if (($? != 0)); then +@@ -39,9 +39,11 @@ client_run() { + } + + test_run() { +- client_run "no option specified" || return 1 +- client_run "readonly root" "ro" || return 1 +- client_run "writeable root" "rw" || return 1 ++ client_run "no root specified (failme)" "failme" && return 1 ++ client_run "wrong root specified (failme)" "root=LABEL=dracut1" "failme" && return 1 ++ client_run "no option specified" "root=LABEL=dracut" || return 1 ++ client_run "readonly root" "root=LABEL=dracut" "ro" || return 1 ++ client_run "writeable root" "root=LABEL=dracut" "rw" || return 1 + return 0 + } + +@@ -70,7 +72,7 @@ test_setup() { + ln -sfn /run "$initdir/var/run" + ln -sfn /run/lock "$initdir/var/lock" + +- inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \ ++ inst_multiple -o sh df free ls shutdown poweroff stty cat ps ln ip route \ + mount dmesg ifconfig dhclient mkdir cp ping dhclient \ + umount strace less setsid tree systemctl reset + +@@ -163,7 +165,7 @@ EOF + /etc/security \ + /lib64/security \ + /lib/security -xtype f \ +- | while read file; do ++ 2>/dev/null | while read file; do + inst_multiple -o $file + done + +@@ -204,7 +206,7 @@ EOF + cp -a /etc/ld.so.conf* $initdir/etc + ldconfig -r "$initdir" + ddebug "Strip binaeries" +- find "$initdir" -perm +111 -type f | xargs -r strip --strip-unneeded | ddebug ++ find "$initdir" -perm /111 -type f | xargs -r strip --strip-unneeded | ddebug + + # copy depmod files + inst /lib/modules/$kernel/modules.order diff --git a/SOURCES/0426-test-TEST-12-RAID-DEG-add-rd.device.timeout.patch b/SOURCES/0426-test-TEST-12-RAID-DEG-add-rd.device.timeout.patch new file mode 100644 index 0000000..96da81a --- /dev/null +++ b/SOURCES/0426-test-TEST-12-RAID-DEG-add-rd.device.timeout.patch @@ -0,0 +1,41 @@ +From 6efee60f93ed8456ba93f72dd5d0443380a317f0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jun 2016 15:27:04 +0200 +Subject: [PATCH] test/TEST-12-RAID-DEG: add rd.device.timeout + +--- + test/TEST-12-RAID-DEG/test.sh | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh +index e749ba0..5f9cfc5 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -36,19 +36,19 @@ test_run() { + echo "MD_UUID=$MD_UUID" + read LUKS_UUID < $TESTDIR/luksuuid + +- client_run failme && return 1 +- client_run rd.auto || return 1 ++ client_run rd.device.timeout=60 failme && return 1 ++ client_run rd.device.timeout=60 rd.auto || return 1 + + +- client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.md.conf=0 rd.lvm.vg=dracut || return 1 ++ client_run rd.device.timeout=60 rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.md.conf=0 rd.lvm.vg=dracut || return 1 + +- client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=failme rd.md.conf=0 rd.lvm.vg=dracut failme && return 1 ++ client_run rd.device.timeout=60 rd.luks.uuid=$LUKS_UUID rd.md.uuid=failme rd.md.conf=0 rd.lvm.vg=dracut failme && return 1 + +- client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm=0 failme && return 1 +- client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm=0 rd.auto=1 failme && return 1 +- client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm.vg=failme failme && return 1 ++ client_run rd.device.timeout=60 rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm=0 failme && return 1 ++ client_run rd.device.timeout=60 rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm=0 rd.auto=1 failme && return 1 ++ client_run rd.device.timeout=60 rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm.vg=failme failme && return 1 + client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm.vg=dracut || return 1 +- client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm.lv=dracut/failme failme && return 1 ++ client_run rd.device.timeout=60 rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm.lv=dracut/failme failme && return 1 + client_run rd.luks.uuid=$LUKS_UUID rd.md.uuid=$MD_UUID rd.lvm.lv=dracut/root || return 1 + + return 0 diff --git a/SOURCES/0427-99base-init.sh-break-the-initqueue-if-emergency-shel.patch b/SOURCES/0427-99base-init.sh-break-the-initqueue-if-emergency-shel.patch new file mode 100644 index 0000000..7db8106 --- /dev/null +++ b/SOURCES/0427-99base-init.sh-break-the-initqueue-if-emergency-shel.patch @@ -0,0 +1,24 @@ +From a95fe14581ff39fb4354dac5782a25d578dcc972 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jun 2016 16:32:44 +0200 +Subject: [PATCH] 99base/init.sh: break the initqueue, if emergency shell was + successful + +--- + modules.d/99base/init.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh +index a07d0f9..7bbe670 100755 +--- a/modules.d/99base/init.sh ++++ b/modules.d/99base/init.sh +@@ -214,7 +214,8 @@ while :; do + + main_loop=$(($main_loop+1)) + [ $main_loop -gt $RDRETRY ] \ +- && { flock -s 9 ; action_on_fail "Could not boot." && break; } 9>/.console_lock ++ && { flock -s 9 ; action_on_fail "Could not boot."; } 9>/.console_lock \ ++ && break + done + unset job + unset queuetriggered diff --git a/SOURCES/0428-systemd-dracut-initqueue.sh-don-t-go-into-emergency.patch b/SOURCES/0428-systemd-dracut-initqueue.sh-don-t-go-into-emergency.patch new file mode 100644 index 0000000..c7abc92 --- /dev/null +++ b/SOURCES/0428-systemd-dracut-initqueue.sh-don-t-go-into-emergency.patch @@ -0,0 +1,27 @@ +From 4c5f1b3b4a3b303b3eb19b0a16122b4fc552e089 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jun 2016 16:33:18 +0200 +Subject: [PATCH] systemd/dracut-initqueue.sh: don't go into emergency + +let systemd go into emergency.target later on +--- + modules.d/98systemd/dracut-initqueue.sh | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh +index 5822556..c12531e 100755 +--- a/modules.d/98systemd/dracut-initqueue.sh ++++ b/modules.d/98systemd/dracut-initqueue.sh +@@ -68,11 +68,7 @@ while :; do + + main_loop=$(($main_loop+1)) + if [ $main_loop -gt $RDRETRY ]; then +- if ! [ -f /sysroot/etc/fstab ] || ! [ -e /sysroot/sbin/init ] ; then +- action_on_fail "Could not boot." && break +- fi +- warn "Not all disks have been found." +- warn "You might want to regenerate your initramfs." ++ # let systemd go into emergency mode, if it cannot boot + break + fi + done diff --git a/SOURCES/0429-systemd-let-booting-work-after-exiting-emergency.patch b/SOURCES/0429-systemd-let-booting-work-after-exiting-emergency.patch new file mode 100644 index 0000000..bd5ed40 --- /dev/null +++ b/SOURCES/0429-systemd-let-booting-work-after-exiting-emergency.patch @@ -0,0 +1,159 @@ +From fd8506b5da5e81736f408bc3c4c801544a38899e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jun 2016 16:34:06 +0200 +Subject: [PATCH] systemd: let booting work after exiting emergency + +If the user managed to mount /sysroot, let it work +--- + modules.d/98systemd/dracut-cmdline-ask.service | 1 - + modules.d/98systemd/dracut-cmdline.service | 1 - + modules.d/98systemd/dracut-emergency.service | 2 -- + modules.d/98systemd/dracut-initqueue.service | 1 - + modules.d/98systemd/dracut-mount.service | 1 - + modules.d/98systemd/dracut-pre-mount.service | 1 - + modules.d/98systemd/dracut-pre-pivot.service | 1 - + modules.d/98systemd/dracut-pre-trigger.service | 1 - + modules.d/98systemd/dracut-pre-udev.service | 1 - + modules.d/98systemd/emergency.service | 7 +++---- + 10 files changed, 3 insertions(+), 14 deletions(-) + +diff --git a/modules.d/98systemd/dracut-cmdline-ask.service b/modules.d/98systemd/dracut-cmdline-ask.service +index 3d489a4..f9dd379 100644 +--- a/modules.d/98systemd/dracut-cmdline-ask.service ++++ b/modules.d/98systemd/dracut-cmdline-ask.service +@@ -16,7 +16,6 @@ Wants=systemd-journald.socket + ConditionPathExists=/etc/initrd-release + ConditionKernelCommandLine=rd.cmdline=ask + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-cmdline.service b/modules.d/98systemd/dracut-cmdline.service +index 7f0835b..e4797ca 100644 +--- a/modules.d/98systemd/dracut-cmdline.service ++++ b/modules.d/98systemd/dracut-cmdline.service +@@ -21,7 +21,6 @@ ConditionKernelCommandLine=|rd.break=cmdline + ConditionKernelCommandLine=|resume + ConditionKernelCommandLine=|noresume + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-emergency.service b/modules.d/98systemd/dracut-emergency.service +index 5c01411..183f3af 100644 +--- a/modules.d/98systemd/dracut-emergency.service ++++ b/modules.d/98systemd/dracut-emergency.service +@@ -12,10 +12,8 @@ Description=Dracut Emergency Shell + DefaultDependencies=no + After=systemd-vconsole-setup.service + Wants=systemd-vconsole-setup.service +-Conflicts=emergency.service emergency.target + ConditionPathExists=!/lib/dracut/no-emergency-shell + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=HOME=/ +diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service +index 6340dd4..46d041e 100644 +--- a/modules.d/98systemd/dracut-initqueue.service ++++ b/modules.d/98systemd/dracut-initqueue.service +@@ -24,7 +24,6 @@ ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/online/*.sh + ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/timeout/*.sh + ConditionKernelCommandLine=|rd.break=initqueue + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-mount.service b/modules.d/98systemd/dracut-mount.service +index 2e1e47b..e8e33fb 100644 +--- a/modules.d/98systemd/dracut-mount.service ++++ b/modules.d/98systemd/dracut-mount.service +@@ -16,7 +16,6 @@ ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount + ConditionKernelCommandLine=|rd.break=mount + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-mount.service b/modules.d/98systemd/dracut-pre-mount.service +index ed67f9d..48c9b40 100644 +--- a/modules.d/98systemd/dracut-pre-mount.service ++++ b/modules.d/98systemd/dracut-pre-mount.service +@@ -18,7 +18,6 @@ ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount + ConditionKernelCommandLine=|rd.break=pre-mount + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service +index 1faeb78..ae1f155 100644 +--- a/modules.d/98systemd/dracut-pre-pivot.service ++++ b/modules.d/98systemd/dracut-pre-pivot.service +@@ -17,7 +17,6 @@ Wants=remote-fs.target + After=remote-fs.target + ConditionPathExists=/etc/initrd-release + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service +index f198036..5657450 100644 +--- a/modules.d/98systemd/dracut-pre-trigger.service ++++ b/modules.d/98systemd/dracut-pre-trigger.service +@@ -18,7 +18,6 @@ ConditionPathExists=/etc/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger + ConditionKernelCommandLine=|rd.break=pre-trigger + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service +index 7fb3304..a554eb7 100644 +--- a/modules.d/98systemd/dracut-pre-udev.service ++++ b/modules.d/98systemd/dracut-pre-udev.service +@@ -21,7 +21,6 @@ ConditionKernelCommandLine=|rd.driver.blacklist + ConditionKernelCommandLine=|rd.driver.pre + ConditionKernelCommandLine=|rd.driver.post + Conflicts=shutdown.target emergency.target +-Before=shutdown.target emergency.target + + [Service] + Environment=DRACUT_SYSTEMD=1 +diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service +index 5c2c1c7..5da3aa3 100644 +--- a/modules.d/98systemd/emergency.service ++++ b/modules.d/98systemd/emergency.service +@@ -14,21 +14,20 @@ After=systemd-vconsole-setup.service + Wants=systemd-vconsole-setup.service + ConditionPathExists=!/lib/dracut/no-emergency-shell + Conflicts=shutdown.target +-Before=shutdown.target + + [Service] + Environment=HOME=/ + Environment=DRACUT_SYSTEMD=1 + Environment=NEWROOT=/sysroot + WorkingDirectory=/ +-ExecStart=/bin/dracut-emergency +-ExecStopPost=-/usr/bin/systemctl --fail --no-block default +-Type=oneshot ++ExecStart=-/bin/dracut-emergency ++ExecStopPost=-/usr/bin/systemctl --no-block isolate default.target + StandardInput=tty-force + StandardOutput=inherit + StandardError=inherit + KillMode=process + IgnoreSIGPIPE=no ++TimeoutStartSec=0 + + # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash + # terminates cleanly. diff --git a/SOURCES/0430-TEST-13-ENC-RAID-LVM-add-rd.device.timeout-40.patch b/SOURCES/0430-TEST-13-ENC-RAID-LVM-add-rd.device.timeout-40.patch new file mode 100644 index 0000000..9219bdf --- /dev/null +++ b/SOURCES/0430-TEST-13-ENC-RAID-LVM-add-rd.device.timeout-40.patch @@ -0,0 +1,40 @@ +From 271a64bfd115897f5c89d18b9a58ed0ecf401866 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 30 Jun 2016 16:36:29 +0200 +Subject: [PATCH] TEST-13-ENC-RAID-LVM: add rd.device.timeout=40 + +--- + test/TEST-13-ENC-RAID-LVM/test.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh +index 7f75b32..94801e4 100755 +--- a/test/TEST-13-ENC-RAID-LVM/test.sh ++++ b/test/TEST-13-ENC-RAID-LVM/test.sh +@@ -19,7 +19,7 @@ test_run() { + -hdb $TESTDIR/check-success.img \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS $DEBUGFAIL" \ ++ -append "root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 $LUKSARGS rd.device.timeout=40 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 + echo "CLIENT TEST END: [OK]" +@@ -32,7 +32,7 @@ test_run() { + -hdb $TESTDIR/check-success.img \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ ++ -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.device.timeout=40 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 + echo "CLIENT TEST END: [OK]" +@@ -45,7 +45,7 @@ test_run() { + -hdb $TESTDIR/check-success.img \ + -m 256M -smp 2 -nographic \ + -net none -kernel /boot/vmlinuz-$KVERSION \ +- -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \ ++ -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.luks.uuid=failme rd.device.timeout=40 $DEBUGFAIL" \ + -initrd $TESTDIR/initramfs.testing + grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img && return 1 + echo "CLIENT TEST END: [OK]" diff --git a/SOURCES/0431-TEST-14-IMSM-add-rd.device.timeout.patch b/SOURCES/0431-TEST-14-IMSM-add-rd.device.timeout.patch new file mode 100644 index 0000000..5dfb0fc --- /dev/null +++ b/SOURCES/0431-TEST-14-IMSM-add-rd.device.timeout.patch @@ -0,0 +1,24 @@ +From aea64fe178baa0035783e3e13b84dfc029958a89 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 1 Jul 2016 12:28:38 +0200 +Subject: [PATCH] TEST-14-IMSM: add rd.device.timeout + +--- + test/TEST-14-IMSM/test.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh +index a600e1c..8e99b1f 100755 +--- a/test/TEST-14-IMSM/test.sh ++++ b/test/TEST-14-IMSM/test.sh +@@ -33,8 +33,8 @@ test_run() { + client_run rd.auto rd.md.uuid=$MD_UUID rd.dm=0 || return 1 + # This test succeeds, because the mirror parts are found without + # assembling the mirror itsself, which is what we want +- client_run rd.auto rd.md.uuid=$MD_UUID rd.md=0 rd.md.imsm failme && return 1 +- client_run rd.auto rd.md.uuid=$MD_UUID rd.md=0 failme && return 1 ++ client_run rd.auto rd.md.uuid=$MD_UUID rd.md=0 rd.md.imsm failme rd.device.timeout=40 && return 1 ++ client_run rd.auto rd.md.uuid=$MD_UUID rd.md=0 failme rd.device.timeout=40 && return 1 + # the following test hangs on newer md + client_run rd.auto rd.md.uuid=$MD_UUID rd.dm=0 rd.md.imsm rd.md.conf=0 || return 1 + return 0 diff --git a/SOURCES/0432-lsinitrd-Suppress-cat-write-error-Broken-pipe.patch b/SOURCES/0432-lsinitrd-Suppress-cat-write-error-Broken-pipe.patch new file mode 100644 index 0000000..5d48816 --- /dev/null +++ b/SOURCES/0432-lsinitrd-Suppress-cat-write-error-Broken-pipe.patch @@ -0,0 +1,127 @@ +From 84d845fc7d58946eadc4bf284c941ec52e26632d Mon Sep 17 00:00:00 2001 +From: HATAYAMA Daisuke +Date: Wed, 4 Nov 2015 11:31:10 +0900 +Subject: [PATCH] lsinitrd: Suppress "cat: write error: Broken pipe" + +On systemd, SIGPIPE is ignored by default; see man 5 systemd.exec for +IgnoreSIGPIPE=. As a result, lsinitrd.sh under a systemd service +outputs "cat: write error: Broken pipe" in the processing of +determining a compression format of a given initramfs file using cat +command in the write part of a pipeline processing. + +For example, this is a log message of kdump.service in RHEL7.1, + + -- Logs begin at Wed 2015-11-04 09:57:33 JST, end at Wed 2015-11-04 09:58:28 JST. -- + Nov 04 09:57:33 localhost systemd[1]: Stopping Crash recovery kernel arming... + Nov 04 09:57:33 localhost kdumpctl[22545]: kexec: unloaded kdump kernel + Nov 04 09:57:33 localhost kdumpctl[22545]: Stopping kdump: [OK] + Nov 04 09:57:33 localhost systemd[1]: Starting Crash recovery kernel arming... + Nov 04 09:57:36 localhost kdumpctl[22553]: Detected change(s) in the following file(s): + Nov 04 09:57:36 localhost kdumpctl[22553]: /etc/kdump.conf + Nov 04 09:57:36 localhost kdumpctl[22553]: Rebuilding /boot/initramfs-3.10.0-229.el7.x86_64kdump.img + Nov 04 09:57:40 localhost dracut[24914]: Executing: /usr/sbin/dracut --hostonly --hostonly-cmdline -o "plymouth dash resume" -f /boot/initramfs-3.10.0-229.el7.x86_64kdump.img 3.10.0-229.el7.x86_64 + ...... + Nov 04 09:58:12 localhost dracut[24914]: *** Creating image file done *** + Nov 04 09:58:12 localhost dracut[24914]: Image: /boot/initramfs-3.10.0-229.el7.x86_64kdump.img: 18M + Nov 04 09:58:12 localhost kdumpctl[22553]: cat: write error: Broken pipe + Nov 04 09:58:12 localhost dracut[24914]: ======================================================================== + Nov 04 09:58:12 localhost dracut[24914]: Version: dracut-033-240.el7 + Nov 04 09:58:12 localhost dracut[24914]: + Nov 04 09:58:12 localhost dracut[24914]: Arguments: --hostonly --hostonly-cmdline -o 'plymouth dash resume' -f + Nov 04 09:58:13 localhost dracut[24914]: + Nov 04 09:58:13 localhost dracut[24914]: dracut modules: + Nov 04 09:58:13 localhost dracut[24914]: bash + +kdump.service builds and loads an initramfs for kdump kernel using +kdumpctl command which uses dracut command and so lsinitrd command, +too. + +Although there's no actual harm except for the error message, there +has been several inquiries from customers about this message so +far. We should suppress this message to reduce needless +communications. + +To suppress the message, this commit cleans up the processing of +reading the first 6 bytes of a given initramfs file without cat +command. + +(cherry picked from commit 3ce142861d88c357864d3a3bef7ec453826d737d) + +Conflicts: + lsinitrd.sh +--- + lsinitrd.sh | 60 ++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 28 insertions(+), 32 deletions(-) + +diff --git a/lsinitrd.sh b/lsinitrd.sh +index 88fe983..4103ee2 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -171,39 +171,35 @@ case $bin in + ;; + esac + +- +-CAT=$({ +- if [[ $SKIP ]]; then +- $SKIP "$image" ++if [[ $SKIP ]] ; then ++ bin="$($SKIP "$image" | { read -N 6 bin && echo "$bin" ; })" ++else ++ read -N 6 bin < "$image" ++fi ++case $bin in ++ $'\x1f\x8b'*) ++ CAT="zcat --" ++ ;; ++ BZh*) ++ CAT="bzcat --" ++ ;; ++ $'\x71\xc7'*|070701) ++ CAT="cat --" ++ ;; ++ $'\x02\x21'*) ++ CAT="lz4 -d -c" ++ ;; ++ $'\x89'LZO$'\0'*) ++ CAT="lzop -d -c" ++ ;; ++ *) ++ if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then ++ CAT="xzcat --single-stream --" + else +- cat "$image" +- fi } | { +- read -N 6 bin +- case $bin in +- $'\x1f\x8b'*) +- echo "zcat --" +- ;; +- BZh*) +- echo "bzcat --" +- ;; +- $'\x71\xc7'*|070701) +- echo "cat --" +- ;; +- $'\x02\x21'*) +- echo "lz4 -d -c" +- ;; +- $'\x89'LZO$'\0'*) +- echo "lzop -d -c" +- ;; +- *) +- if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then +- echo "xzcat --single-stream --" +- else +- echo "xzcat --" +- fi +- ;; +- esac +- }) ++ CAT="xzcat --" ++ fi ++ ;; ++esac + + skipcpio() + { diff --git a/SOURCES/0433-network-support-multiple-vlan-team-bridge-and-bond.patch b/SOURCES/0433-network-support-multiple-vlan-team-bridge-and-bond.patch new file mode 100644 index 0000000..c129a1b --- /dev/null +++ b/SOURCES/0433-network-support-multiple-vlan-team-bridge-and-bond.patch @@ -0,0 +1,793 @@ +From 7a90c8b3434a27a347f6a963d0e673e04feb485a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 4 Jul 2016 11:31:49 +0200 +Subject: [PATCH] network: support multiple vlan, team, bridge and bond + +--- + modules.d/40network/ifup.sh | 386 +++++++++++++++++------------------- + modules.d/40network/net-genrules.sh | 27 ++- + modules.d/40network/net-lib.sh | 9 +- + modules.d/40network/parse-bridge.sh | 30 +-- + modules.d/40network/parse-team.sh | 47 ++--- + modules.d/40network/parse-vlan.sh | 27 +-- + modules.d/45ifcfg/write-ifcfg.sh | 26 +-- + 7 files changed, 254 insertions(+), 298 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index cedf9a7..d7503c7 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -17,79 +17,12 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh + + # $netif reads easier than $1 + netif=$1 +-use_bridge='false' +-use_vlan='false' + +-# enslave this interface to bond? +-for i in /tmp/bond.*.info; do +- [ -e "$i" ] || continue +- unset bondslaves +- unset bondname +- . "$i" +- for slave in $bondslaves ; do +- if [ "$netif" = "$slave" ] ; then +- netif=$bondname +- break 2 +- fi +- done +-done +- +-for i in /tmp/team.*.info; do +- [ -e "$i" ] || continue +- unset teamslaves +- unset teammaster +- . "$i" +- for slave in $teamslaves ; do +- if [ "$netif" = "$slave" ] ; then +- netif=$teammaster +- fi +- done +-done +- +-if [ -e /tmp/vlan.info ]; then +- . /tmp/vlan.info +- if [ "$netif" = "$phydevice" ]; then +- if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then +- : # We need to really setup bond (recursive call) +- elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then +- : # We need to really setup team (recursive call) +- else +- netif="$vlanname" +- use_vlan='true' +- fi +- fi +-fi +- +-# bridge this interface? +-if [ -e /tmp/bridge.info ]; then +- . /tmp/bridge.info +- for ethname in $bridgeslaves ; do +- if [ "$netif" = "$ethname" ]; then +- if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then +- : # We need to really setup bond (recursive call) +- elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then +- : # We need to really setup team (recursive call) +- elif [ "$netif" = "$vlanname" ] && [ -n "$DO_VLAN_SETUP" ]; then +- : # We need to really setup vlan (recursive call) +- else +- netif="$bridgename" +- use_bridge='true' +- fi +- fi +- done +-fi +- +-# disable manual ifup while netroot is set for simplifying our logic +-# in netroot case we prefer netroot to bringup $netif automaticlly +-[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2" +- +-if [ -n "$manualup" ]; then +- >/tmp/net.$netif.manualup +- rm -f /tmp/net.${netif}.did-setup +-else +- [ -e /tmp/net.${netif}.did-setup ] && exit 0 +- [ -e /sys/class/net/$netif/address ] && \ +- [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0 ++# loopback is always handled the same way ++if [ "$netif" = "lo" ] ; then ++ ip link set lo up ++ ip addr add 127.0.0.1/8 dev lo ++ exit 0 + fi + + # Run dhclient +@@ -199,158 +132,213 @@ do_static() { + return 0 + } + +-# loopback is always handled the same way +-if [ "$netif" = "lo" ] ; then +- ip link set lo up +- ip addr add 127.0.0.1/8 dev lo ++get_vid() { ++ case "$1" in ++ vlan*) ++ echo ${1#vlan} ++ ;; ++ *.*) ++ echo ${1##*.} ++ ;; ++ esac ++} ++ ++# check, if we need VLAN's for this interface ++if [ -z "$DO_VLAN_PHY" ] && [ -e /tmp/vlan.${netif}.phy ]; then ++ unset DO_VLAN ++ NO_AUTO_DHCP=yes DO_VLAN_PHY=yes ifup "$netif" ++ modprobe -b -q 8021q ++ ++ for i in /tmp/vlan.*.${netif}; do ++ [ -e "$i" ] || continue ++ read vlanname < "$i" ++ if [ -n "$vlanname" ]; then ++ linkup "$netif" ++ ip link add dev "$vlanname" link "$netif" type vlan id "$(get_vid $vlanname)" ++ ifup "$vlanname" ++ fi ++ done + exit 0 + fi + +-# start bond if needed +-if [ -e /tmp/bond.${netif}.info ]; then +- . /tmp/bond.${netif}.info ++# Check, if interface is VLAN interface ++if ! [ -e /tmp/vlan.${netif}.phy ]; then ++ for i in /tmp/vlan.${netif}.*; do ++ [ -e "$i" ] || continue ++ export DO_VLAN=yes ++ break ++ done ++fi + +- if [ "$netif" = "$bondname" ] && [ ! -e /tmp/net.$bondname.setup ] ; then # We are master bond device +- modprobe bonding +- udevadm settle +- if ! [ -e /sys/class/net/${netif} ]; then +- echo "+$netif" > /sys/class/net/bonding_masters +- fi +- ip link set $netif down +- +- # Stolen from ifup-eth +- # add the bits to setup driver parameters here +- for arg in $bondoptions ; do +- key=${arg%%=*}; +- value=${arg##*=}; +- # %{value:0:1} is replaced with non-bash specific construct +- if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then +- OLDIFS=$IFS; +- IFS=','; +- for arp_ip in $value; do +- echo +$arp_ip > /sys/class/net/${netif}/bonding/$key +- done +- IFS=$OLDIFS; +- else +- echo $value > /sys/class/net/${netif}/bonding/$key ++# bridge this interface? ++if [ -z "$NO_BRIDGE_MASTER" ]; then ++ for i in /tmp/bridge.*.info; do ++ [ -e "$i" ] || continue ++ unset bridgeslaves ++ unset bridgename ++ . "$i" ++ for ethname in $bridgeslaves ; do ++ [ "$netif" != "$ethname" ] && continue ++ ++ NO_BRIDGE_MASTER=yes NO_AUTO_DHCP=yes ifup $ethname ++ linkup $ethname ++ if [ ! -e /tmp/bridge.$bridgename.up ]; then ++ brctl addbr $bridgename ++ brctl setfd $bridgename 0 ++ > /tmp/bridge.$bridgename.up + fi ++ brctl addif $bridgename $ethname ++ ifup $bridgename ++ exit 0 + done ++ done ++fi + +- linkup $netif +- ++# enslave this interface to bond? ++if [ -z "$NO_BOND_MASTER" ]; then ++ for i in /tmp/bond.*.info; do ++ [ -e "$i" ] || continue ++ unset bondslaves ++ unset bondname ++ . "$i" + for slave in $bondslaves ; do +- ip link set $slave down +- cat /sys/class/net/$slave/address > /tmp/net.${netif}.${slave}.hwaddr +- echo "+$slave" > /sys/class/net/$bondname/bonding/slaves +- linkup $slave +- done ++ [ "$netif" != "$slave" ] && continue + +- # add the bits to setup the needed post enslavement parameters +- for arg in $BONDING_OPTS ; do +- key=${arg%%=*}; +- value=${arg##*=}; +- if [ "${key}" = "primary" ]; then +- echo $value > /sys/class/net/${netif}/bonding/$key +- fi ++ # already setup ++ [ -e /tmp/bond.$bondname.up ] && exit 0 ++ ++ # wait for all slaves to show up ++ for slave in $bondslaves ; do ++ # try to create the slave (maybe vlan or bridge) ++ NO_BOND_MASTER=yes NO_AUTO_DHCP=yes ifup $slave ++ ++ if ! ip link show dev $slave >/dev/null 2>&1; then ++ # wait for the last slave to show up ++ exit 0 ++ fi ++ done ++ ++ modprobe -q -b bonding ++ echo "+$bondname" > /sys/class/net/bonding_masters 2>/dev/null ++ ip link set $bondname down ++ ++ # Stolen from ifup-eth ++ # add the bits to setup driver parameters here ++ for arg in $bondoptions ; do ++ key=${arg%%=*}; ++ value=${arg##*=}; ++ # %{value:0:1} is replaced with non-bash specific construct ++ if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then ++ OLDIFS=$IFS; ++ IFS=','; ++ for arp_ip in $value; do ++ echo +$arp_ip > /sys/class/net/${bondname}/bonding/$key ++ done ++ IFS=$OLDIFS; ++ else ++ echo $value > /sys/class/net/${bondname}/bonding/$key ++ fi ++ done ++ ++ linkup $bondname ++ ++ for slave in $bondslaves ; do ++ cat /sys/class/net/$slave/address > /tmp/net.${bondname}.${slave}.hwaddr ++ ip link set $slave down ++ echo "+$slave" > /sys/class/net/$bondname/bonding/slaves ++ linkup $slave ++ done ++ ++ # add the bits to setup the needed post enslavement parameters ++ for arg in $bondoptions ; do ++ key=${arg%%=*}; ++ value=${arg##*=}; ++ if [ "${key}" = "primary" ]; then ++ echo $value > /sys/class/net/${bondname}/bonding/$key ++ fi ++ done ++ ++ > /tmp/bond.$bondname.up ++ ++ NO_BOND_MASTER=yes ifup $bondname ++ exit $? + done +- > /tmp/net.$bondname.setup +- fi ++ done + fi + +-if [ -e /tmp/team.${netif}.info ]; then +- . /tmp/team.${netif}.info +- if [ "$netif" = "$teammaster" ] && [ ! -e /tmp/net.$teammaster.setup ] ; then +- # We shall only bring up those _can_ come up +- # in case of some slave is gone in active-backup mode +- working_slaves="" ++if [ -z "$NO_TEAM_MASTER" ]; then ++ for i in /tmp/team.*.info; do ++ [ -e "$i" ] || continue ++ unset teammaster ++ unset teamslaves ++ . "$i" + for slave in $teamslaves ; do +- teamdctl ${teammaster} port present ${slave} 2>/dev/null \ +- && continue +- ip link set dev $slave up 2>/dev/null +- if wait_for_if_up $slave; then +- working_slaves+="$slave " +- fi +- done +- # Do not add slaves now +- teamd -d -U -n -N -t $teammaster -f /etc/teamd/$teammaster.conf +- for slave in $working_slaves; do +- # team requires the slaves to be down before joining team +- ip link set dev $slave down +- ( +- unset TEAM_PORT_CONFIG +- _hwaddr=$(cat /sys/class/net/$slave/address) +- _subchannels=$(iface_get_subchannels "$slave") +- if [ -n "$_hwaddr" ] && [ -e "/etc/sysconfig/network-scripts/mac-${_hwaddr}.conf" ]; then +- . "/etc/sysconfig/network-scripts/mac-${_hwaddr}.conf" +- elif [ -n "$_subchannels" ] && [ -e "/etc/sysconfig/network-scripts/ccw-${_subchannels}.conf" ]; then +- . "/etc/sysconfig/network-scripts/ccw-${_subchannels}.conf" +- elif [ -e "/etc/sysconfig/network-scripts/ifcfg-${slave}" ]; then +- . "/etc/sysconfig/network-scripts/ifcfg-${slave}" +- fi ++ [ "$netif" != "$slave" ] && continue ++ ++ [ -e /tmp/team.$teammaster.up ] && exit 0 + +- if [ -n "${TEAM_PORT_CONFIG}" ]; then +- /usr/bin/teamdctl ${teammaster} port config update ${slave} "${TEAM_PORT_CONFIG}" ++ # wait for all slaves to show up ++ for slave in $teamslaves ; do ++ # try to create the slave (maybe vlan or bridge) ++ NO_BOND_MASTER=yes NO_AUTO_DHCP=yes ifup $slave ++ ++ if ! ip link show dev $slave >/dev/null 2>&1; then ++ # wait for the last slave to show up ++ exit 0 + fi +- ) +- teamdctl $teammaster port add $slave +- done +- ip link set dev $teammaster up +- > /tmp/net.$teammaster.setup +- fi +-fi ++ done ++ ++ if [ ! -e /tmp/team.$teammaster.up ] ; then ++ # We shall only bring up those _can_ come up ++ # in case of some slave is gone in active-backup mode ++ working_slaves="" ++ for slave in $teamslaves ; do ++ ip link set $slave up 2>/dev/null ++ if wait_for_if_up $slave; then ++ working_slaves="$working_slaves$slave " ++ fi ++ done ++ # Do not add slaves now ++ teamd -d -U -n -N -t $teammaster -f /etc/teamd/$teammaster.conf ++ for slave in $working_slaves; do ++ # team requires the slaves to be down before joining team ++ ip link set $slave down ++ teamdctl $teammaster port add $slave ++ done + +-# XXX need error handling like dhclient-script ++ ip link set $teammaster up + +-if [ -e /tmp/bridge.info ]; then +- . /tmp/bridge.info +-# start bridge if necessary +- if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.setup ]; then +- brctl addbr $bridgename +- brctl setfd $bridgename 0 +- for ethname in $bridgeslaves ; do +- if [ "$ethname" = "$bondname" ] ; then +- DO_BOND_SETUP=yes ifup $bondname -m +- elif [ "$ethname" = "$teammaster" ] ; then +- DO_TEAM_SETUP=yes ifup $teammaster -m +- elif [ "$ethname" = "$vlanname" ]; then +- DO_VLAN_SETUP=yes ifup $vlanname -m +- else +- linkup $ethname ++ > /tmp/team.$teammaster.up ++ NO_TEAM_MASTER=yes ifup $teammaster ++ exit $? + fi +- brctl addif $bridgename $ethname + done +- > /tmp/net.$bridgename.setup +- fi ++ done + fi + +-get_vid() { +- case "$1" in +- vlan*) +- echo ${1#vlan} +- ;; +- *.*) +- echo ${1##*.} +- ;; +- esac +-} ++# all synthetic interfaces done.. now check if the interface is available ++if ! ip link show dev $netif >/dev/null 2>&1; then ++ exit 1 ++fi + +-if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then +- modprobe 8021q +- if [ "$phydevice" = "$bondname" ] ; then +- DO_BOND_SETUP=yes ifup $phydevice -m +- elif [ "$phydevice" = "$teammaster" ] ; then +- DO_TEAM_SETUP=yes ifup $phydevice -m +- else +- linkup "$phydevice" +- fi +- ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname)" +- ip link set "$vlanname" up ++# disable manual ifup while netroot is set for simplifying our logic ++# in netroot case we prefer netroot to bringup $netif automaticlly ++[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2" ++ ++if [ -n "$manualup" ]; then ++ >/tmp/net.$netif.manualup ++ rm -f /tmp/net.${netif}.did-setup ++else ++ [ -e /tmp/net.${netif}.did-setup ] && exit 0 ++ [ -z "$DO_VLAN" ] && \ ++ [ -e /sys/class/net/$netif/address ] && \ ++ [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0 + fi + + # No ip lines default to dhcp + ip=$(getarg ip) + +-if [ -z "$ip" ]; then ++if [ -z "$NO_AUTO_DHCP" ] && [ -z "$ip" ]; then + if [ "$netroot" = "dhcp6" ]; then + do_dhcp -6 + else +@@ -415,7 +403,7 @@ for p in $(getargs ip=); do + if [ $ret -eq 0 ]; then + > /tmp/net.${netif}.up + +- if [ -e /sys/class/net/${netif}/address ]; then ++ if [ -z "$DO_VLAN" ] && [ -e /sys/class/net/${netif}/address ]; then + > /tmp/net.$(cat /sys/class/net/${netif}/address).up + fi + +@@ -444,7 +432,7 @@ if [ -n "$DO_BOND_SETUP" -o -n "$DO_TEAM_SETUP" -o -n "$DO_VLAN_SETUP" ]; then + fi + + # no ip option directed at our interface? +-if [ ! -e /tmp/net.${netif}.up ]; then ++if [ -z "$NO_AUTO_DHCP" ] && [ ! -e /tmp/net.${netif}.up ]; then + if [ -e /tmp/net.bootdev ]; then + BOOTDEV=$(cat /tmp/net.bootdev) + if [ "$netif" = "$BOOTDEV" ] || [ "$BOOTDEV" = "$(cat /sys/class/net/${netif}/address)" ]; then +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index 526dd5c..08072fb 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -1,6 +1,4 @@ + #!/bin/sh +-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +-# ex: ts=8 sw=4 sts=4 et filetype=sh + + getargbool 0 rd.neednet && NEEDNET=1 + +@@ -14,11 +12,14 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + # Write udev rules + { + # bridge: attempt only the defined interface +- if [ -e /tmp/bridge.info ]; then +- . /tmp/bridge.info ++ for i in /tmp/bridge.*.info; do ++ [ -e "$i" ] || continue ++ unset bridgeslaves ++ unset bridgename ++ . "$i" + RAW_IFACES="$RAW_IFACES $bridgeslaves" + MASTER_IFACES="$MASTER_IFACES $bridgename" +- fi ++ done + + # bond: attempt only the defined interface (override bridge defines) + for i in /tmp/bond.*.info; do +@@ -40,11 +41,19 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh + MASTER_IFACES="$MASTER_IFACES ${teammaster}" + done + +- if [ -e /tmp/vlan.info ]; then +- . /tmp/vlan.info ++ for j in /tmp/vlan.*.phy; do ++ [ -e "$j" ] || continue ++ unset phydevice ++ read phydevice < "$j" + RAW_IFACES="$RAW_IFACES $phydevice" +- MASTER_IFACES="$MASTER_IFACES ${vlanname}" +- fi ++ for i in /tmp/vlan.*.${phydevice}; do ++ [ -e "$i" ] || continue ++ unset vlanname ++ read vlanname < "$i" ++ MASTER_IFACES="$MASTER_IFACES ${vlanname}" ++ done ++ done ++ + MASTER_IFACES="$(trim "$MASTER_IFACES")" + RAW_IFACES="$(trim "$RAW_IFACES")" + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 7120193..de334d9 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -102,7 +102,8 @@ ifdown() { + ip addr flush dev $netif + echo "#empty" > /etc/resolv.conf + rm -f -- /tmp/net.$netif.did-setup +- [ -e /sys/class/net/$netif/address ] && \ ++ [ -z "$DO_VLAN" ] && \ ++ [ -e /sys/class/net/$netif/address ] && \ + rm -f -- /tmp/net.$(cat /sys/class/net/$netif/address).did-setup + # TODO: send "offline" uevent? + } +@@ -111,7 +112,8 @@ setup_net() { + local netif="$1" f="" gw_ip="" netroot_ip="" iface="" IFACES="" + local _p + [ -e /tmp/net.$netif.did-setup ] && return +- [ -e /sys/class/net/$netif/address ] && \ ++ [ -z "$DO_VLAN" ] && \ ++ [ -e /sys/class/net/$netif/address ] && \ + [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && return + [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces + [ -z "$IFACES" ] && IFACES="$netif" +@@ -168,7 +170,8 @@ setup_net() { + unset layer2 + + > /tmp/net.$netif.did-setup +- [ -e /sys/class/net/$netif/address ] && \ ++ [ -z "$DO_VLAN" ] && \ ++ [ -e /sys/class/net/$netif/address ] && \ + > /tmp/net.$(cat /sys/class/net/$netif/address).did-setup + } + +diff --git a/modules.d/40network/parse-bridge.sh b/modules.d/40network/parse-bridge.sh +index a910109..5c3af29 100755 +--- a/modules.d/40network/parse-bridge.sh ++++ b/modules.d/40network/parse-bridge.sh +@@ -1,6 +1,4 @@ + #!/bin/sh +-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +-# ex: ts=8 sw=4 sts=4 et filetype=sh + # + # Format: + # bridge=: +@@ -9,14 +7,6 @@ + # bridge without parameters assumes bridge=br0:eth0 + # + +-# return if bridge already parsed +-[ -n "$bridgename" ] && return +- +-# Check if bridge parameter is valid +-if getarg bridge= >/dev/null ; then +- command -v brctl >/dev/null 2>&1 || die "No 'brctl' installed" +-fi +- + parsebridge() { + local v=${1}: + set -- +@@ -24,8 +14,6 @@ parsebridge() { + set -- "$@" "${v%%:*}" + v=${v#*:} + done +- +- unset bridgename bridgeslaves + case $# in + 0) bridgename=br0; bridgeslaves=$iface ;; + 1) die "bridge= requires two parameters" ;; +@@ -34,14 +22,13 @@ parsebridge() { + esac + } + +-unset bridgename bridgeslaves +- +-iface=eth0 +- + # Parse bridge for bridgename and bridgeslaves +-if bridge="$(getarg bridge)"; then ++for bridge in $(getargs bridge=); do ++ unset bridgename ++ unset bridgeslaves ++ iface=eth0 + # Read bridge= parameters if they exist +- if [ -n "$bridge" ]; then ++ if [ "$bridge" != "bridge" ]; then + parsebridge $bridge + fi + # Simple default bridge +@@ -49,7 +36,6 @@ if bridge="$(getarg bridge)"; then + bridgename=br0 + bridgeslaves=$iface + fi +- echo "bridgename=$bridgename" > /tmp/bridge.info +- echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.info +- return +-fi ++ echo "bridgename=$bridgename" > /tmp/bridge.${bridgename}.info ++ echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.${bridgename}.info ++done +diff --git a/modules.d/40network/parse-team.sh b/modules.d/40network/parse-team.sh +index a836d68..136c370 100755 +--- a/modules.d/40network/parse-team.sh ++++ b/modules.d/40network/parse-team.sh +@@ -6,14 +6,6 @@ + # teamslaves is a comma-separated list of physical (ethernet) interfaces + # + +-# return if team already parsed +-[ -n "$teammaster" ] && return +- +-# Check if team parameter is valid +-if getarg team= >/dev/null ; then +- : +-fi +- + parseteam() { + local v=${1}: + set -- +@@ -22,33 +14,22 @@ parseteam() { + v=${v#*:} + done + +- unset teammaster teamslaves + case $# in +- 2) teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;; +- *) warn "team= requires two parameters"; return 1;; ++ 2) teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;; ++ *) die "team= requires two parameters" ;; + esac +- return 0 + } + +-unset teammaster teamslaves +- +-if getarg team>/dev/null; then +- # Read team= parameters if they exist +- for team in $(getargs team); do +- [ "$team" = "team" ] && continue +- +- unset teammaster +- unset teamslaves + +- parseteam "$team" || continue +- +- echo "teammaster=$teammaster" > /tmp/team.${teammaster}.info +- echo "teamslaves=\"$teamslaves\"" >> /tmp/team.${teammaster}.info +- +- if ! [ -e /etc/teamd/${teammaster}.conf ]; then +- warn "Team master $teammaster specified, but no /etc/teamd/$teammaster.conf present. Using activebackup." +- mkdir -p /etc/teamd +- printf -- "%s" '{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}' > "/etc/teamd/${teammaster}.conf" +- fi +- done +-fi ++for team in $(getargs team=); do ++ unset teammaster teamslaves ++ parseteam "$(getarg team=)" ++ ++ echo "teammaster=$teammaster" > /tmp/team.${teammaster}.info ++ echo "teamslaves=\"$teamslaves\"" >> /tmp/team.${teammaster}.info ++ if ! [ -e /etc/teamd/${teammaster}.conf ]; then ++ warn "Team master $teammaster specified, but no /etc/teamd/$teammaster.conf present. Using activebackup." ++ mkdir -p /etc/teamd ++ printf -- "%s" '{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}' > "/etc/teamd/${teammaster}.conf" ++ fi ++done +diff --git a/modules.d/40network/parse-vlan.sh b/modules.d/40network/parse-vlan.sh +index 3ba2289..5a747f0 100755 +--- a/modules.d/40network/parse-vlan.sh ++++ b/modules.d/40network/parse-vlan.sh +@@ -4,14 +4,6 @@ + # vlan=: + # + +-# return if vlan already parsed +-[ -n "$vlanname" ] && return +- +-# Check if vlan parameter is valid +-if getarg vlan= >/dev/null ; then +- : +-fi +- + parsevlan() { + local v=${1}: + set -- +@@ -27,16 +19,11 @@ parsevlan() { + esac + } + +-unset vlanname phydevice +- +-if getarg vlan >/dev/null; then +- # Read vlan= parameters if they exist +- vlan="$(getarg vlan=)" +- if [ ! "$vlan" = "vlan" ]; then +- parsevlan "$(getarg vlan=)" +- fi ++for vlan in $(getargs vlan=); do ++ unset vlanname ++ unset phydevice ++ parsevlan "$vlan" + +- echo "vlanname=\"$vlanname\"" > /tmp/vlan.info +- echo "phydevice=\"$phydevice\"" >> /tmp/vlan.info +- return +-fi ++ echo "$phydevice" > /tmp/vlan.${phydevice}.phy ++ echo "$vlanname" > /tmp/vlan.${vlanname}.${phydevice} ++done +diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh +index cab7477..a077da1 100755 +--- a/modules.d/45ifcfg/write-ifcfg.sh ++++ b/modules.d/45ifcfg/write-ifcfg.sh +@@ -7,14 +7,6 @@ type is_persistent_ethernet_name >/dev/null 2>&1 || . /lib/net-lib.sh + + udevadm settle --timeout=30 + +-if [ -e /tmp/bridge.info ]; then +- . /tmp/bridge.info +-fi +- +-if [ -e /tmp/vlan.info ]; then +- . /tmp/vlan.info +-fi +- + mkdir -m 0755 -p /tmp/ifcfg/ + mkdir -m 0755 -p /tmp/ifcfg-leases/ + +@@ -24,7 +16,7 @@ get_config_line_by_subchannel() + local line + + CHANNELS="$1" +- while read line; do ++ while read line || [ -n "$line" ]; do + if strstr "$line" "$CHANNELS"; then + echo $line + return 0 +@@ -132,6 +124,8 @@ for netup in /tmp/net.*.did-setup ; do + unset bondslaves + unset bondname + unset bondoptions ++ unset bridgename ++ unset bridgeslaves + unset uuid + unset ip + unset gw +@@ -141,8 +135,10 @@ for netup in /tmp/net.*.did-setup ; do + unset slave + unset ethname + unset vlan ++ unset phydevice + + [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info ++ [ -e /tmp/bridge.${netif}.info ] && . /tmp/bridge.${netif}.info + [ -e /tmp/team.${netif}.info ] && . /tmp/team.${netif}.info + [ -e /tmp/net.${netif}.override ] && . /tmp/net.${netif}.override + +@@ -152,11 +148,17 @@ for netup in /tmp/net.*.did-setup ; do + elif [ "$netif" = "$teammaster" ]; then + team=yes + elif [ "$netif" = "$bondname" ]; then +- # $netif can't be bridge and bond at the same time ++ # $netif can't be bridge and bond at the same time + bond=yes + fi +- if [ "$netif" = "$vlanname" ]; then +- vlan=yes ++ ++ if ! [ -e /tmp/vlan.${netif}.phy ]; then ++ for i in /tmp/vlan.${netif}.*; do ++ [ ! -e "$i" ] && continue ++ phydevice=${i##/tmp/vlan.${netif}.} ++ vlan=yes ++ break ++ done + fi + + # skip team interfaces for now, the host config must be in sync diff --git a/SOURCES/0434-TEST-70-BONDBRIDGETEAMVLAN-add-testcase-for-testsuit.patch b/SOURCES/0434-TEST-70-BONDBRIDGETEAMVLAN-add-testcase-for-testsuit.patch new file mode 100644 index 0000000..935c71b --- /dev/null +++ b/SOURCES/0434-TEST-70-BONDBRIDGETEAMVLAN-add-testcase-for-testsuit.patch @@ -0,0 +1,617 @@ +From 7b0ce59233f9e56e2115c921a51fac97e9e52a2a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 4 Jul 2016 15:44:36 +0200 +Subject: [PATCH] TEST-70-BONDBRIDGETEAMVLAN: add testcase for testsuite + +multiple bonds +multiple bridges +multiple vlans +--- + .../99-idesymlinks.rules | 8 + + test/TEST-70-BONDBRIDGETEAMVLAN/Makefile | 10 + + test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh | 22 ++ + test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf | 27 ++ + test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd2.conf | 15 + + test/TEST-70-BONDBRIDGETEAMVLAN/exports | 1 + + test/TEST-70-BONDBRIDGETEAMVLAN/finished-false.sh | 2 + + test/TEST-70-BONDBRIDGETEAMVLAN/hard-off.sh | 3 + + test/TEST-70-BONDBRIDGETEAMVLAN/hosts | 5 + + test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh | 117 ++++++++ + test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 308 +++++++++++++++++++++ + 11 files changed, 518 insertions(+) + create mode 100644 test/TEST-70-BONDBRIDGETEAMVLAN/99-idesymlinks.rules + create mode 100644 test/TEST-70-BONDBRIDGETEAMVLAN/Makefile + create mode 100755 test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh + create mode 100644 test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf + create mode 100644 test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd2.conf + create mode 100644 test/TEST-70-BONDBRIDGETEAMVLAN/exports + create mode 100755 test/TEST-70-BONDBRIDGETEAMVLAN/finished-false.sh + create mode 100755 test/TEST-70-BONDBRIDGETEAMVLAN/hard-off.sh + create mode 100644 test/TEST-70-BONDBRIDGETEAMVLAN/hosts + create mode 100755 test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh + create mode 100755 test/TEST-70-BONDBRIDGETEAMVLAN/test.sh + +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/99-idesymlinks.rules b/test/TEST-70-BONDBRIDGETEAMVLAN/99-idesymlinks.rules +new file mode 100644 +index 0000000..d557790 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/99-idesymlinks.rules +@@ -0,0 +1,8 @@ ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hda", SYMLINK+="sda" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hda*", SYMLINK+="sda$env{MINOR}" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdb", SYMLINK+="sdb" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdb*", SYMLINK+="sdb$env{MINOR}" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdc", SYMLINK+="sdc" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdc*", SYMLINK+="sdc$env{MINOR}" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdd", SYMLINK+="sdd" ++ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdd*", SYMLINK+="sdd$env{MINOR}" +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/Makefile b/test/TEST-70-BONDBRIDGETEAMVLAN/Makefile +new file mode 100644 +index 0000000..aad2705 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/Makefile +@@ -0,0 +1,10 @@ ++all: ++ @$(MAKE) -s --no-print-directory -C ../.. all ++ @V=$(V) basedir=../.. testdir=../ ./test.sh --all ++setup: ++ @$(MAKE) --no-print-directory -C ../.. all ++ @basedir=../.. testdir=../ ./test.sh --setup ++clean: ++ @basedir=../.. testdir=../ ./test.sh --clean ++run: ++ @basedir=../.. testdir=../ ./test.sh --run +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh +new file mode 100755 +index 0000000..2018393 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh +@@ -0,0 +1,22 @@ ++#!/bin/sh ++exec >/dev/console 2>&1 ++export PATH=/sbin:/bin:/usr/sbin:/usr/bin ++strstr() { [ "${1#*$2*}" != "$1" ]; } ++CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) ++export TERM=linux ++export PS1='initramfs-test:\w\$ ' ++stty sane ++echo "made it to the rootfs! Powering down." ++ ++( ++ echo OK ++ ip -o -4 address show scope global | while read n if rest; do echo $if;done ++ for i in /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-*; do ++ echo $i ++ grep -v 'UUID=' $i ++ done ++ echo EOF ++) > /dev/sda ++ ++strstr "$CMDLINE" "rd.shell" && sh -i ++poweroff -f +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf b/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf +new file mode 100644 +index 0000000..ec810c2 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd.conf +@@ -0,0 +1,27 @@ ++ddns-update-style none; ++ ++use-host-decl-names true; ++ ++subnet 192.168.50.0 netmask 255.255.255.0 { ++ option subnet-mask 255.255.255.0; ++ option routers 192.168.50.1; ++ next-server 192.168.50.1; ++ server-identifier 192.168.50.1; ++ option domain-name-servers 192.168.50.1; ++ option domain-search "example.com"; ++ option domain-name "other.com"; ++ option root-path "nfs:192.168.50.1:/nfs/client"; ++ range 192.168.50.10 192.168.50.100; ++} ++ ++subnet 192.168.51.0 netmask 255.255.255.0 { ++ option subnet-mask 255.255.255.0; ++ option routers 192.168.51.1; ++ next-server 192.168.51.1; ++ server-identifier 192.168.51.1; ++ option domain-name-servers 192.168.51.1; ++ option domain-search "example.com"; ++ option domain-name "other.com"; ++ option root-path "nfs:192.168.50.1:/nfs/client"; ++ range 192.168.51.10 192.168.51.100; ++} +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd2.conf b/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd2.conf +new file mode 100644 +index 0000000..90f0c30 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/dhcpd2.conf +@@ -0,0 +1,15 @@ ++ddns-update-style none; ++ ++use-host-decl-names true; ++ ++subnet 192.168.51.0 netmask 255.255.255.0 { ++ option subnet-mask 255.255.255.0; ++ option routers 192.168.51.1; ++ next-server 192.168.51.1; ++ server-identifier 192.168.51.1; ++ option domain-name-servers 192.168.51.1; ++ option domain-search "example.com"; ++ option domain-name "other.com"; ++ option root-path "nfs:192.168.50.1:/nfs/client"; ++ range 192.168.51.10 192.168.51.100; ++} +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/exports b/test/TEST-70-BONDBRIDGETEAMVLAN/exports +new file mode 100644 +index 0000000..ff5f29b +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/exports +@@ -0,0 +1 @@ ++/nfs/client 192.168.50.0/24(rw,insecure,no_subtree_check,no_root_squash) +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/finished-false.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/finished-false.sh +new file mode 100755 +index 0000000..ecdbef9 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/finished-false.sh +@@ -0,0 +1,2 @@ ++#!/bin/sh ++exit 1 +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/hard-off.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/hard-off.sh +new file mode 100755 +index 0000000..12c3d5a +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/hard-off.sh +@@ -0,0 +1,3 @@ ++#!/bin/sh ++getarg rd.shell || poweroff -f ++getarg failme && poweroff -f +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/hosts b/test/TEST-70-BONDBRIDGETEAMVLAN/hosts +new file mode 100644 +index 0000000..d02a4e9 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/hosts +@@ -0,0 +1,5 @@ ++127.0.0.1 localhost ++192.168.50.1 server ++192.168.50.100 client-if1 ++192.168.50.101 client-if2 ++192.168.50.102 client-if3 +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh +new file mode 100755 +index 0000000..9585a47 +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/server-init.sh +@@ -0,0 +1,117 @@ ++#!/bin/sh ++exec /dev/console 2>&1 ++set -x ++export PATH=/sbin:/bin:/usr/sbin:/usr/bin ++export TERM=linux ++export PS1='nfstest-server:\w\$ ' ++stty sane ++echo "made it to the rootfs!" ++echo server > /proc/sys/kernel/hostname ++ ++wait_for_if_link() { ++ local cnt=0 ++ local li ++ while [ $cnt -lt 600 ]; do ++ li=$(ip -o link show dev $1 2>/dev/null) ++ [ -n "$li" ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ ++wait_for_if_up() { ++ local cnt=0 ++ local li ++ while [ $cnt -lt 200 ]; do ++ li=$(ip -o link show up dev $1) ++ [ -n "$li" ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ ++wait_for_route_ok() { ++ local cnt=0 ++ while [ $cnt -lt 200 ]; do ++ li=$(ip route show) ++ [ -n "$li" ] && [ -z "${li##*$1*}" ] && return 0 ++ sleep 0.1 ++ cnt=$(($cnt+1)) ++ done ++ return 1 ++} ++ ++linkup() { ++ wait_for_if_link $1 2>/dev/null\ ++ && ip link set $1 up 2>/dev/null\ ++ && wait_for_if_up $1 2>/dev/null ++} ++ ++modprobe -b -q 8021q ++>/dev/watchdog ++ip addr add 127.0.0.1/8 dev lo ++linkup lo ++ip link set dev eth0 name ens3 ++ip addr add 192.168.50.1/24 dev ens3 ++linkup ens3 ++>/dev/watchdog ++ip link set dev eth1 name ens4 ++linkup ens4 ++ip link add dev ens4.1 link ens4 type vlan id 1 ++ip link add dev ens4.2 link ens4 type vlan id 2 ++ip link add dev ens4.3 link ens4 type vlan id 3 ++ip link add dev ens4.4 link ens4 type vlan id 4 ++ip addr add 192.168.54.1/24 dev ens4.1 ++ip addr add 192.168.55.1/24 dev ens4.2 ++ip addr add 192.168.56.1/24 dev ens4.3 ++ip addr add 192.168.57.1/24 dev ens4.4 ++ip link set dev eth2 name ens5 ++ip link set dev eth3 name ens6 ++linkup ens4 ++linkup ens5 ++linkup ens6 ++ip addr add 192.168.51.1/24 dev ens5 ++linkup ens4 ++>/dev/watchdog ++modprobe af_packet ++> /dev/watchdog ++modprobe sunrpc ++>/dev/watchdog ++mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs ++>/dev/watchdog ++[ -x /sbin/portmap ] && portmap ++>/dev/watchdog ++[ -x /sbin/rpcbind ] && rpcbind ++>/dev/watchdog ++modprobe nfsd ++>/dev/watchdog ++mount -t nfsd nfsd /proc/fs/nfsd ++>/dev/watchdog ++exportfs -r ++>/dev/watchdog ++rpc.nfsd ++>/dev/watchdog ++rpc.mountd ++>/dev/watchdog ++rpc.idmapd ++>/dev/watchdog ++exportfs -r ++>/dev/watchdog ++>/var/lib/dhcpd/dhcpd.leases ++>/dev/watchdog ++chmod 777 /var/lib/dhcpd/dhcpd.leases ++>/dev/watchdog ++dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases ens3 ens5 ++#echo -n 'V' > /dev/watchdog ++#sh -i ++#tcpdump -i ens3 ++# Wait forever for the VM to die ++echo "Serving NFS mounts" ++while :; do ++ sleep 10 ++ >/dev/watchdog ++done ++mount -n -o remount,ro / ++poweroff -f +diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +new file mode 100755 +index 0000000..54ceb9e +--- /dev/null ++++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh +@@ -0,0 +1,308 @@ ++#!/bin/bash ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++TEST_DESCRIPTION="root filesystem on NFS with bridging/bonding/vlan" ++KVERSION=${KVERSION-$(uname -r)} ++ ++# Uncomment this to debug failures ++#DEBUGFAIL="rd.shell rd.break" ++#DEBUGFAIL="rd.shell rd.break rd.debug" ++#SERIAL="tcp:127.0.0.1:9999" ++ ++run_server() { ++ # Start server first ++ echo "MULTINIC TEST SETUP: Starting DHCP/NFS server" ++ ++ fsck -a "$TESTDIR"/server.ext3 || return 1 ++ $testdir/run-qemu \ ++ -hda "$TESTDIR"/server.ext3 \ ++ -m 512M -smp 2 \ ++ -display none \ ++ -net socket,vlan=0,listen=127.0.0.1:12350 \ ++ -net socket,vlan=1,listen=127.0.0.1:12351 \ ++ -net socket,vlan=2,listen=127.0.0.1:12352 \ ++ -net socket,vlan=3,listen=127.0.0.1:12353 \ ++ -net nic,vlan=0,macaddr=52:54:01:12:34:56,model=e1000 \ ++ -net nic,vlan=1,macaddr=52:54:01:12:34:57,model=e1000 \ ++ -net nic,vlan=2,macaddr=52:54:01:12:34:58,model=e1000 \ ++ -net nic,vlan=3,macaddr=52:54:01:12:34:59,model=e1000 \ ++ ${SERIAL:+-serial "$SERIAL"} \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -kernel /boot/vmlinuz-"$KVERSION" \ ++ -append "loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ ++ -initrd "$TESTDIR"/initramfs.server \ ++ -pidfile "$TESTDIR"/server.pid -daemonize || return 1 ++ sudo chmod 644 -- "$TESTDIR"/server.pid || return 1 ++ ++ # Cleanup the terminal if we have one ++ tty -s && stty sane ++ ++ echo Sleeping 10 seconds to give the server a head start ++ sleep 10 ++} ++ ++client_test() { ++ local test_name="$1" ++ local do_vlan13="$2" ++ local cmdline="$3" ++ local check="$4" ++ local CONF ++ ++ echo "CLIENT TEST START: $test_name" ++ ++ [ "$do_vlan13" != "yes" ] && unset do_vlan13 ++ ++ # Need this so kvm-qemu will boot (needs non-/dev/zero local disk) ++ if ! dd if=/dev/zero of="$TESTDIR"/client.img bs=1M count=1; then ++ echo "Unable to make client sda image" 1>&2 ++ return 1 ++ fi ++ ++ $testdir/run-qemu -hda "$TESTDIR"/client.img -m 256M -smp 2 -nographic \ ++ -net socket,vlan=0,connect=127.0.0.1:12350 \ ++ ${do_vlan13:+-net socket,vlan=1,connect=127.0.0.1:12351} \ ++ -net socket,vlan=2,connect=127.0.0.1:12352 \ ++ ${do_vlan13:+-net socket,vlan=3,connect=127.0.0.1:12353} \ ++ -net nic,vlan=0,macaddr=52:54:00:12:34:01,model=e1000 \ ++ -net nic,vlan=0,macaddr=52:54:00:12:34:02,model=e1000 \ ++ -net nic,vlan=1,macaddr=52:54:00:12:34:03,model=e1000 \ ++ -net nic,vlan=2,macaddr=52:54:00:12:34:04,model=e1000 \ ++ -net nic,vlan=3,macaddr=52:54:00:12:34:05,model=e1000 \ ++ -watchdog i6300esb -watchdog-action poweroff \ ++ -kernel /boot/vmlinuz-"$KVERSION" \ ++ -append "$cmdline rd.info $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \ ++ -initrd "$TESTDIR"/initramfs.testing ++ ++ { ++ read OK ++ if [[ "$OK" != "OK" ]]; then ++ echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]" ++ return 1 ++ fi ++ ++ while read line; do ++ [[ $line == END ]] && break ++ CONF+="$line " ++ done ++ } < "$TESTDIR"/client.img || return 1 ++ ++ if [[ "$check" != "$CONF" ]]; then ++ echo "Expected: '$check'" ++ echo ++ echo ++ echo "Got: '$CONF'" ++ echo "CLIENT TEST END: $test_name [FAILED - BAD CONF]" ++ return 1 ++ fi ++ ++ echo "CLIENT TEST END: $test_name [OK]" ++ return 0 ++} ++ ++ ++test_run() { ++ if ! run_server; then ++ echo "Failed to start server" 1>&2 ++ return 1 ++ fi ++ test_client || { kill_server; return 1; } ++} ++ ++test_client() { ++ client_test "Multiple VLAN" \ ++ "yes" \ ++ " ++vlan=vlan0001:ens4 ++vlan=vlan2:ens4 ++vlan=ens4.3:ens4 ++vlan=ens4.0004:ens4 ++ip=ens3:dhcp ++ip=192.168.54.101::192.168.54.1:24:test:vlan0001:none ++ip=192.168.55.102::192.168.55.1:24:test:vlan2:none ++ip=192.168.56.103::192.168.56.1:24:test:ens4.3:none ++ip=192.168.57.104::192.168.57.1:24:test:ens4.0004:none ++rd.neednet=1 ++root=nfs:192.168.50.1:/nfs/client bootdev=ens3 ++" \ ++ 'ens3 ens4.0004 ens4.3 vlan0001 vlan2 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens3 # Generated by dracut initrd NAME="ens3" DEVICE="ens3" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Ethernet /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4.0004 # Generated by dracut initrd NAME="ens4.0004" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=none IPADDR="192.168.57.104" PREFIX="24" GATEWAY="192.168.57.1" TYPE=Vlan DEVICE="ens4.0004" VLAN=yes PHYSDEV="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4.3 # Generated by dracut initrd NAME="ens4.3" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=none IPADDR="192.168.56.103" PREFIX="24" GATEWAY="192.168.56.1" TYPE=Vlan DEVICE="ens4.3" VLAN=yes PHYSDEV="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan0001 # Generated by dracut initrd NAME="vlan0001" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=none IPADDR="192.168.54.101" PREFIX="24" GATEWAY="192.168.54.1" TYPE=Vlan DEVICE="vlan0001" VLAN=yes PHYSDEV="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan2 # Generated by dracut initrd NAME="vlan2" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=none IPADDR="192.168.55.102" PREFIX="24" GATEWAY="192.168.55.1" TYPE=Vlan DEVICE="vlan2" VLAN=yes PHYSDEV="ens4" EOF ' \ ++ || return 1 ++ ++ client_test "Multiple Bonds" \ ++ "yes" \ ++ " ++bond=bond0:ens4,ens5 ++bond=bond1:ens6,ens7 ++ip=bond0:dhcp ++ip=bond1:dhcp ++rd.neednet=1 ++root=nfs:192.168.50.1:/nfs/client bootdev=bond0 ++" \ ++ 'bond0 bond1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond0 # Generated by dracut initrd NAME="bond0" DEVICE="bond0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond0" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond1 # Generated by dracut initrd NAME="bond1" DEVICE="bond1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond1" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens7" EOF ' \ ++ || return 1 ++ ++ client_test "Multiple Bridges" \ ++ "no" \ ++ " ++bridge=br0:ens4,ens5 ++bridge=br1:ens6,ens7 ++ip=br0:dhcp ++ip=br1:dhcp ++rd.neednet=1 ++root=nfs:192.168.50.1:/nfs/client bootdev=br0 ++" \ ++ 'br0 br1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br0 # Generated by dracut initrd NAME="br0" DEVICE="br0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br0" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br1 # Generated by dracut initrd NAME="br1" DEVICE="br1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br1" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens7" EOF ' \ ++ || return 1 ++ ++ kill_server ++ return 0 ++} ++ ++test_setup() { ++ # Make server root ++ dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=60 ++ mke2fs -j -F -- "$TESTDIR"/server.ext3 ++ mkdir -- "$TESTDIR"/mnt ++ sudo mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt ++ ++ ( ++ export initdir="$TESTDIR"/mnt ++ . "$basedir"/dracut-init.sh ++ ++ ( ++ cd "$initdir"; ++ mkdir -p -- dev sys proc run etc var/run tmp var/lib/{dhcpd,rpcbind} ++ mkdir -p -- var/lib/nfs/{v4recovery,rpc_pipefs} ++ chmod 777 -- var/lib/rpcbind var/lib/nfs ++ ) ++ ++ for _f in modules.builtin.bin modules.builtin; do ++ [[ $srcmods/$_f ]] && break ++ done || { ++ dfatal "No modules.builtin.bin and modules.builtin found!" ++ return 1 ++ } ++ ++ for _f in modules.builtin.bin modules.builtin modules.order; do ++ [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f" ++ done ++ ++ inst_multiple sh ls shutdown poweroff stty cat ps ln ip \ ++ dmesg mkdir cp ping exportfs \ ++ modprobe rpc.nfsd rpc.mountd showmount tcpdump \ ++ /etc/services sleep mount chmod ++ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do ++ [ -f "${_terminfodir}"/l/linux ] && break ++ done ++ inst_multiple -o "${_terminfodir}"/l/linux ++ type -P portmap >/dev/null && inst_multiple portmap ++ type -P rpcbind >/dev/null && inst_multiple rpcbind ++ [ -f /etc/netconfig ] && inst_multiple /etc/netconfig ++ type -P dhcpd >/dev/null && inst_multiple dhcpd ++ [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd ++ instmods nfsd sunrpc ipv6 lockd af_packet 8021q ++ inst_simple /etc/os-release ++ inst ./server-init.sh /sbin/init ++ inst ./hosts /etc/hosts ++ inst ./exports /etc/exports ++ inst ./dhcpd.conf /etc/dhcpd.conf ++ inst_multiple /etc/nsswitch.conf /etc/rpc /etc/protocols ++ ++ inst_multiple rpc.idmapd /etc/idmapd.conf ++ ++ inst_libdir_file 'libnfsidmap_nsswitch.so*' ++ inst_libdir_file 'libnfsidmap/*.so*' ++ inst_libdir_file 'libnfsidmap*.so*' ++ ++ _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \ ++ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|') ++ _nsslibs=${_nsslibs#|} ++ _nsslibs=${_nsslibs%|} ++ ++ inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' ++ ++ inst /etc/nsswitch.conf /etc/nsswitch.conf ++ inst /etc/passwd /etc/passwd ++ inst /etc/group /etc/group ++ ++ cp -a -- /etc/ld.so.conf* "$initdir"/etc ++ ldconfig -r "$initdir" ++ dracut_kernel_post ++ ) ++ ++ # Make client root inside server root ++ ( ++ export initdir="$TESTDIR"/mnt/nfs/client ++ . "$basedir"/dracut-init.sh ++ inst_multiple sh shutdown poweroff stty cat ps ln ip \ ++ mount dmesg mkdir cp ping grep ls ++ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do ++ [[ -f ${_terminfodir}/l/linux ]] && break ++ done ++ inst_multiple -o "${_terminfodir}"/l/linux ++ inst_simple /etc/os-release ++ inst ./client-init.sh /sbin/init ++ ( ++ cd "$initdir" ++ mkdir -p -- dev sys proc etc run ++ mkdir -p -- var/lib/nfs/rpc_pipefs ++ ) ++ inst /etc/nsswitch.conf /etc/nsswitch.conf ++ inst /etc/passwd /etc/passwd ++ inst /etc/group /etc/group ++ ++ inst_multiple rpc.idmapd /etc/idmapd.conf ++ inst_libdir_file 'libnfsidmap_nsswitch.so*' ++ inst_libdir_file 'libnfsidmap/*.so*' ++ inst_libdir_file 'libnfsidmap*.so*' ++ ++ _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' -- /etc/nsswitch.conf \ ++ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|') ++ _nsslibs=${_nsslibs#|} ++ _nsslibs=${_nsslibs%|} ++ ++ inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' ++ ++ cp -a -- /etc/ld.so.conf* "$initdir"/etc ++ sudo ldconfig -r "$initdir" ++ ) ++ ++ sudo umount "$TESTDIR"/mnt ++ rm -fr -- "$TESTDIR"/mnt ++ ++ # Make an overlay with needed tools for the test harness ++ ( ++ export initdir="$TESTDIR"/overlay ++ . "$basedir"/dracut-init.sh ++ inst_multiple poweroff shutdown ++ inst_hook emergency 000 ./hard-off.sh ++ inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules ++ ) ++ ++ # Make server's dracut image ++ $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ ++ --no-early-microcode \ ++ -m "udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \ ++ -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \ ++ -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1 ++ ++ # Make client's dracut image ++ $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ ++ --no-early-microcode \ ++ -o "plymouth" \ ++ -a "debug" \ ++ -d "af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \ ++ -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 ++} ++ ++kill_server() { ++ if [[ -s "$TESTDIR"/server.pid ]]; then ++ sudo kill -TERM -- $(cat "$TESTDIR"/server.pid) ++ rm -f -- "$TESTDIR"/server.pid ++ fi ++} ++ ++test_cleanup() { ++ kill_server ++} ++ ++. "$testdir"/test-functions diff --git a/SOURCES/0435-dracut.spec-remove-dd.patch b/SOURCES/0435-dracut.spec-remove-dd.patch new file mode 100644 index 0000000..ca9b47a --- /dev/null +++ b/SOURCES/0435-dracut.spec-remove-dd.patch @@ -0,0 +1,23 @@ +From 573e508554e219dc57c3fb6462db181beb584e94 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 4 Jul 2016 16:30:31 +0200 +Subject: [PATCH] dracut.spec: remove dd + +dd is part of coreutils +--- + dracut.spec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.spec b/dracut.spec +index 5c4b047..780ed70 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -91,7 +91,7 @@ Requires: gzip xz + Requires: kmod + Requires: sed + Requires: kpartx +-Requires: tar dd ++Requires: tar + + %if 0%{?fedora} || 0%{?rhel} > 6 + Requires: util-linux >= 2.21 diff --git a/SOURCES/0436-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch b/SOURCES/0436-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch new file mode 100644 index 0000000..a200b3e --- /dev/null +++ b/SOURCES/0436-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch @@ -0,0 +1,31 @@ +From e5439c9b3751dca1570c67d32a4ccc873c3c77a5 Mon Sep 17 00:00:00 2001 +From: Pratyush Anand +Date: Wed, 16 Mar 2016 09:09:09 +0530 +Subject: [PATCH] watchdog: Do not add hooks if systemd module is included + +When systemd is present, let it manage watchdog feed. + +Signed-off-by: Pratyush Anand +Cc: Dave Young +Cc: Don Zickus +Cc: Harald Hoyer +--- + modules.d/04watchdog/module-setup.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh +index b7725ef..7e32210 100755 +--- a/modules.d/04watchdog/module-setup.sh ++++ b/modules.d/04watchdog/module-setup.sh +@@ -11,6 +11,11 @@ depends() { + } + + install() { ++ # Do not add watchdog hooks if systemd module is included ++ # In that case, systemd will manage watchdog kick ++ if dracut_module_included "systemd"; then ++ return ++ fi + inst_hook cmdline 00 "$moddir/watchdog.sh" + inst_hook cmdline 50 "$moddir/watchdog.sh" + inst_hook pre-trigger 00 "$moddir/watchdog.sh" diff --git a/SOURCES/0437-watchdog-install-module-for-active-watchdog.patch b/SOURCES/0437-watchdog-install-module-for-active-watchdog.patch new file mode 100644 index 0000000..2477655 --- /dev/null +++ b/SOURCES/0437-watchdog-install-module-for-active-watchdog.patch @@ -0,0 +1,94 @@ +From 0be17528e527c3e5081fc7e03ec51bb17d9b08cc Mon Sep 17 00:00:00 2001 +From: Pratyush Anand +Date: Wed, 16 Mar 2016 09:09:10 +0530 +Subject: [PATCH] watchdog: install module for active watchdog + +Recently following patches have been added in upstream Linux kernel, which +(1) fixes parent of watchdog_device so that +/sys/class/watchdog/watchdogn/device is populated. (2) adds some sysfs +device attributes so that different watchdog status can be read. + +http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6551881c86c791237a3bebf11eb3bd70b60ea782 +http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=906d7a5cfeda508e7361f021605579a00cd82815 +http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=33b711269ade3f6bc9d9d15e4343e6fa922d999b + +With the above support, now we can find out whether a watchdog is active or +not. We can also find out the driver/module responsible for that watchdog +device. + +Proposed patch uses above support and then adds module of active watchdog +in initramfs generated by dracut for hostonly mode. Kernel module for +inactive watchdog will be added as well for none hostonly mode. + +When an user does not want to add kernel module, then one should exclude +complete dracut watchdog module with --omit. + +Testing: +-- When watchdog is active watchdog modules were added + # cat /sys/class/watchdog/watchdog0/identity + iTCO_wdt + # cat /sys/class/watchdog/watchdog0/state + active + # dracut --hostonly initramfs-test.img -a watchdog + # lsinitrd initramfs-test.img | grep iTCO + -rw-r--r-- 1 root root 9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko + -rw-r--r-- 1 root root 19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko + +-- When watchdog is inactive then watchdog modules were not added + # cat /sys/class/watchdog/watchdog0/state + inactive + # dracut --hostonly initramfs-test.img -a watchdog + # lsinitrd initramfs-test.img | grep iTCO + +-- When watchdog is inactive, but no hostonly mode, watchdog modules were added + # cat /sys/class/watchdog/watchdog0/state + inactive + # dracut --no-hostonly initramfs-test.img -a watchdog + # lsinitrd initramfs-test.img | grep iTCO + -rw-r--r-- 1 root root 9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko + -rw-r--r-- 1 root root 19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko + +Signed-off-by: Pratyush Anand +Cc: Dave Young +Cc: Don Zickus +Cc: Harald Hoyer +--- + modules.d/04watchdog/module-setup.sh | 28 ++++++++++++++++++++++++++++ + 1 file changed, 28 insertions(+) + +diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh +index 7e32210..4680936 100755 +--- a/modules.d/04watchdog/module-setup.sh ++++ b/modules.d/04watchdog/module-setup.sh +@@ -31,3 +31,31 @@ install() { + inst_multiple -o wdctl + } + ++installkernel() { ++ [[ -d /sys/class/watchdog/ ]] || return ++ for dir in /sys/class/watchdog/*; do ++ [[ -d "$dir" ]] || continue ++ [[ -f "$dir/state" ]] || continue ++ active=$(< "$dir/state") ++ ! [[ $hostonly ]] || [[ "$active" = "active" ]] || continue ++ # device/modalias will return driver of this device ++ wdtdrv=$(< "$dir/device/modalias") ++ # There can be more than one module represented by same ++ # modalias. Currently load all of them. ++ # TODO: Need to find a way to avoid any unwanted module ++ # represented by modalias ++ wdtdrv=$(modprobe -R $wdtdrv) ++ instmods $wdtdrv ++ # however in some cases, we also need to check that if there is ++ # a specific driver for the parent bus/device. In such cases ++ # we also need to enable driver for parent bus/device. ++ wdtppath=$(readlink -f "$dir/device/..") ++ while [ -f "$wdtppath/modalias" ] ++ do ++ wdtpdrv=$(< "$wdtppath/modalias") ++ wdtpdrv=$(modprobe -R $wdtpdrv) ++ instmods $wdtpdrv ++ wdtppath=$(readlink -f "$wdtppath/..") ++ done ++ done ++} diff --git a/SOURCES/0438-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch b/SOURCES/0438-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch new file mode 100644 index 0000000..b9c1401 --- /dev/null +++ b/SOURCES/0438-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch @@ -0,0 +1,56 @@ +From f69cd051ab85fb01ddf00aadd3c559e85d8980f0 Mon Sep 17 00:00:00 2001 +From: Pratyush Anand +Date: Wed, 16 Mar 2016 09:16:24 +0530 +Subject: [PATCH] watchdog: ensure that module is loaded as early as possible + +It is expected that a watchdog module will disable an active watchdog when +its probe is called ie, when it is loaded. So an early load of the module +will help to disable it earlier. +This can be helpful in some corner cases where kdump and watchdog daemon +both are active. + +Testing: + -- When watchdog kernel modules were added + # dracut --no-hostonly initramfs-test.img -a watchdog + # lsinitrd initramfs-test.img -f etc/cmdline.d/00-watchdog.conf + rd.driver.pre=iTCO_wdt,lpc_ich, + +Signed-off-by: Pratyush Anand +Cc: Dave Young +Cc: Don Zickus +Cc: Harald Hoyer +--- + modules.d/04watchdog/module-setup.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh +index 4680936..6b35f9f 100755 +--- a/modules.d/04watchdog/module-setup.sh ++++ b/modules.d/04watchdog/module-setup.sh +@@ -33,6 +33,7 @@ install() { + + installkernel() { + [[ -d /sys/class/watchdog/ ]] || return ++ wdtcmdline="" + for dir in /sys/class/watchdog/*; do + [[ -d "$dir" ]] || continue + [[ -f "$dir/state" ]] || continue +@@ -46,6 +47,7 @@ installkernel() { + # represented by modalias + wdtdrv=$(modprobe -R $wdtdrv) + instmods $wdtdrv ++ wdtcmdline="$wdtcmdline$(echo $wdtdrv | tr " " ",")," + # however in some cases, we also need to check that if there is + # a specific driver for the parent bus/device. In such cases + # we also need to enable driver for parent bus/device. +@@ -55,7 +57,10 @@ installkernel() { + wdtpdrv=$(< "$wdtppath/modalias") + wdtpdrv=$(modprobe -R $wdtpdrv) + instmods $wdtpdrv ++ wdtcmdline="$wdtcmdline$(echo $wdtpdrv | tr " " ",")," + wdtppath=$(readlink -f "$wdtppath/..") + done + done ++ # ensure that watchdog module is loaded as early as possible ++ [[ $wdtcmdline = "" ]] || echo "rd.driver.pre=$wdtcmdline" > ${initdir}/etc/cmdline.d/00-watchdog.conf + } diff --git a/SOURCES/0439-watchdog-module-setup.sh-rewrite.patch b/SOURCES/0439-watchdog-module-setup.sh-rewrite.patch new file mode 100644 index 0000000..2e6eaf8 --- /dev/null +++ b/SOURCES/0439-watchdog-module-setup.sh-rewrite.patch @@ -0,0 +1,124 @@ +From 4c83fd10ab2a43272eab59719486064085beb2df Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 15 Apr 2016 11:27:20 +0200 +Subject: [PATCH] watchdog/module-setup.sh: rewrite + +- use local variables with _ +- use associative array for the kernel modules +- install emergency hook even in the systemd case +- follow device path until /sys is reached +- set kernel version for modprobe checking +--- + modules.d/04watchdog/module-setup.sh | 92 ++++++++++++++++++++---------------- + 1 file changed, 51 insertions(+), 41 deletions(-) + +diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh +index 6b35f9f..31102f4 100755 +--- a/modules.d/04watchdog/module-setup.sh ++++ b/modules.d/04watchdog/module-setup.sh +@@ -13,54 +13,64 @@ depends() { + install() { + # Do not add watchdog hooks if systemd module is included + # In that case, systemd will manage watchdog kick +- if dracut_module_included "systemd"; then +- return ++ if ! dracut_module_included "systemd"; then ++ inst_hook cmdline 00 "$moddir/watchdog.sh" ++ inst_hook cmdline 50 "$moddir/watchdog.sh" ++ inst_hook pre-trigger 00 "$moddir/watchdog.sh" ++ inst_hook initqueue 00 "$moddir/watchdog.sh" ++ inst_hook mount 00 "$moddir/watchdog.sh" ++ inst_hook mount 50 "$moddir/watchdog.sh" ++ inst_hook mount 99 "$moddir/watchdog.sh" ++ inst_hook pre-pivot 00 "$moddir/watchdog.sh" ++ inst_hook pre-pivot 99 "$moddir/watchdog.sh" ++ inst_hook cleanup 00 "$moddir/watchdog.sh" ++ inst_hook cleanup 99 "$moddir/watchdog.sh" + fi +- inst_hook cmdline 00 "$moddir/watchdog.sh" +- inst_hook cmdline 50 "$moddir/watchdog.sh" +- inst_hook pre-trigger 00 "$moddir/watchdog.sh" +- inst_hook initqueue 00 "$moddir/watchdog.sh" +- inst_hook mount 00 "$moddir/watchdog.sh" +- inst_hook mount 50 "$moddir/watchdog.sh" +- inst_hook mount 99 "$moddir/watchdog.sh" +- inst_hook pre-pivot 00 "$moddir/watchdog.sh" +- inst_hook pre-pivot 99 "$moddir/watchdog.sh" +- inst_hook cleanup 00 "$moddir/watchdog.sh" +- inst_hook cleanup 99 "$moddir/watchdog.sh" + inst_hook emergency 02 "$moddir/watchdog-stop.sh" + inst_multiple -o wdctl + } + + installkernel() { ++ local -A _drivers ++ local _alldrivers _active _wdtdrv _wdtppath _dir + [[ -d /sys/class/watchdog/ ]] || return +- wdtcmdline="" +- for dir in /sys/class/watchdog/*; do +- [[ -d "$dir" ]] || continue +- [[ -f "$dir/state" ]] || continue +- active=$(< "$dir/state") +- ! [[ $hostonly ]] || [[ "$active" = "active" ]] || continue +- # device/modalias will return driver of this device +- wdtdrv=$(< "$dir/device/modalias") +- # There can be more than one module represented by same +- # modalias. Currently load all of them. +- # TODO: Need to find a way to avoid any unwanted module +- # represented by modalias +- wdtdrv=$(modprobe -R $wdtdrv) +- instmods $wdtdrv +- wdtcmdline="$wdtcmdline$(echo $wdtdrv | tr " " ",")," +- # however in some cases, we also need to check that if there is +- # a specific driver for the parent bus/device. In such cases +- # we also need to enable driver for parent bus/device. +- wdtppath=$(readlink -f "$dir/device/..") +- while [ -f "$wdtppath/modalias" ] +- do +- wdtpdrv=$(< "$wdtppath/modalias") +- wdtpdrv=$(modprobe -R $wdtpdrv) +- instmods $wdtpdrv +- wdtcmdline="$wdtcmdline$(echo $wdtpdrv | tr " " ",")," +- wdtppath=$(readlink -f "$wdtppath/..") +- done ++ for _dir in /sys/class/watchdog/*; do ++ [[ -d "$_dir" ]] || continue ++ [[ -f "$_dir/state" ]] || continue ++ _active=$(< "$_dir/state") ++ ! [[ $hostonly ]] || [[ "$_active" = "active" ]] || continue ++ # device/modalias will return driver of this device ++ _wdtdrv=$(< "$_dir/device/modalias") ++ # There can be more than one module represented by same ++ # modalias. Currently load all of them. ++ # TODO: Need to find a way to avoid any unwanted module ++ # represented by modalias ++ _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null) ++ if [[ $_wdtdrv ]]; then ++ instmods $_wdtdrv ++ for i in $_wdtdrv; do ++ _drivers[$i]=1 ++ done ++ fi ++ # however in some cases, we also need to check that if there is ++ # a specific driver for the parent bus/device. In such cases ++ # we also need to enable driver for parent bus/device. ++ _wdtppath=$(readlink -f "$_dir/device/..") ++ while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do ++ _wdtppath=$(readlink -f "$_wdtppath/..") ++ [[ -f "$_wdtppath/modalias" ]] || continue ++ ++ _wdtdrv=$(< "$_wdtppath/modalias") ++ _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null) ++ if [[ $_wdtdrv ]]; then ++ instmods $_wdtdrv ++ for i in $_wdtdrv; do ++ _drivers[$i]=1 ++ done ++ fi ++ done + done + # ensure that watchdog module is loaded as early as possible +- [[ $wdtcmdline = "" ]] || echo "rd.driver.pre=$wdtcmdline" > ${initdir}/etc/cmdline.d/00-watchdog.conf ++ _alldrivers="${!_drivers[*]}" ++ [[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf + } diff --git a/SOURCES/0440-watchdog-clean-return-of-installkernel.patch b/SOURCES/0440-watchdog-clean-return-of-installkernel.patch new file mode 100644 index 0000000..30e353a --- /dev/null +++ b/SOURCES/0440-watchdog-clean-return-of-installkernel.patch @@ -0,0 +1,21 @@ +From 0eb1ee3db2f905c17757a06f77a5d79a351b3d33 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Apr 2016 15:49:06 +0200 +Subject: [PATCH] watchdog: clean return of installkernel() + +return 0, otherwise if _alldrivers is empty, the return code is fail +--- + modules.d/04watchdog/module-setup.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh +index 31102f4..fbf6d6d 100755 +--- a/modules.d/04watchdog/module-setup.sh ++++ b/modules.d/04watchdog/module-setup.sh +@@ -73,4 +73,6 @@ installkernel() { + # ensure that watchdog module is loaded as early as possible + _alldrivers="${!_drivers[*]}" + [[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf ++ ++ return 0 + } diff --git a/SOURCES/0441-watchdog-start-traversing-the-device-tree-from-the-r.patch b/SOURCES/0441-watchdog-start-traversing-the-device-tree-from-the-r.patch new file mode 100644 index 0000000..61846b4 --- /dev/null +++ b/SOURCES/0441-watchdog-start-traversing-the-device-tree-from-the-r.patch @@ -0,0 +1,24 @@ +From 149249007068cfe428beeb523e14d5af72e47f15 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Apr 2016 15:50:42 +0200 +Subject: [PATCH] watchdog: start traversing the device tree from the right + directory + +start with the device subtree, not with the parent of it +--- + modules.d/04watchdog/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh +index fbf6d6d..86b0aee 100755 +--- a/modules.d/04watchdog/module-setup.sh ++++ b/modules.d/04watchdog/module-setup.sh +@@ -55,7 +55,7 @@ installkernel() { + # however in some cases, we also need to check that if there is + # a specific driver for the parent bus/device. In such cases + # we also need to enable driver for parent bus/device. +- _wdtppath=$(readlink -f "$_dir/device/..") ++ _wdtppath=$(readlink -f "$_dir/device") + while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do + _wdtppath=$(readlink -f "$_wdtppath/..") + [[ -f "$_wdtppath/modalias" ]] || continue diff --git a/SOURCES/0442-dracut.spec-remove-trailing-space.patch b/SOURCES/0442-dracut.spec-remove-trailing-space.patch new file mode 100644 index 0000000..87a75a4 --- /dev/null +++ b/SOURCES/0442-dracut.spec-remove-trailing-space.patch @@ -0,0 +1,22 @@ +From 038f142ef9fce4cf896ef0bb4860bcfd6e407ecd Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 6 Jul 2016 09:17:36 +0200 +Subject: [PATCH] dracut.spec: remove trailing space + +--- + dracut.spec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.spec b/dracut.spec +index 780ed70..efb50b7 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -91,7 +91,7 @@ Requires: gzip xz + Requires: kmod + Requires: sed + Requires: kpartx +-Requires: tar ++Requires: tar + + %if 0%{?fedora} || 0%{?rhel} > 6 + Requires: util-linux >= 2.21 diff --git a/SOURCES/0443-fips-use-lib-modules-uname-r-modules.fips.patch b/SOURCES/0443-fips-use-lib-modules-uname-r-modules.fips.patch new file mode 100644 index 0000000..27cbd21 --- /dev/null +++ b/SOURCES/0443-fips-use-lib-modules-uname-r-modules.fips.patch @@ -0,0 +1,39 @@ +From 0eb1afa9ea7e7807ef032f03563885996d26a961 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 21 Jul 2016 15:07:52 +0200 +Subject: [PATCH] fips: use /lib/modules/$(uname -r)/modules.fips + +if /lib/modules/$(uname -r)/modules.fips exists, use that list instead +of the dracut module list. +--- + modules.d/01fips/module-setup.sh | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 77ed24e..e1296d7 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -12,12 +12,17 @@ depends() { + + installkernel() { + local _fipsmodules _mod +- _fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 blowfish camellia cast6 cbc ccm " +- _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg " +- _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " +- _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " +- _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390" +- _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" ++ ++ if [[ -f "${srcmods}/modules.fips" ]]; then ++ _fipsmodules="$(cat "${srcmods}/modules.fips")" ++ else ++ _fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 blowfish camellia cast6 cbc ccm " ++ _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg " ++ _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " ++ _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " ++ _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390" ++ _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" ++ fi + + mkdir -m 0755 -p "${initdir}/etc/modprobe.d" + diff --git a/SOURCES/0444-fips-add-sha1-mb-to-fips-modules.patch b/SOURCES/0444-fips-add-sha1-mb-to-fips-modules.patch new file mode 100644 index 0000000..21a427a --- /dev/null +++ b/SOURCES/0444-fips-add-sha1-mb-to-fips-modules.patch @@ -0,0 +1,22 @@ +From 2f42cfcbebdde63a5e98241c04e14f138d142f1f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 21 Jul 2016 15:08:59 +0200 +Subject: [PATCH] fips: add "sha1-mb" to fips modules + +https://bugzilla.redhat.com/show_bug.cgi?id=1357080 +--- + modules.d/01fips/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index e1296d7..32d10d0 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -22,6 +22,7 @@ installkernel() { + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " + _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390" + _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" ++ _fipsmodules+="sha1-mb" + fi + + mkdir -m 0755 -p "${initdir}/etc/modprobe.d" diff --git a/SOURCES/0445-nfs-install-all-nfs-modules-non-hostonly.patch b/SOURCES/0445-nfs-install-all-nfs-modules-non-hostonly.patch new file mode 100644 index 0000000..2113cbe --- /dev/null +++ b/SOURCES/0445-nfs-install-all-nfs-modules-non-hostonly.patch @@ -0,0 +1,24 @@ +From b077d18963436f6771e7ce3c486bcb2ae80165db Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 22 Jul 2016 08:30:36 +0200 +Subject: [PATCH] nfs: install all nfs modules non-hostonly + +If nfs is used, we should include all nfs modules, in the case, where +$host_fs_types contains nfs. +--- + modules.d/95nfs/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index 02838a4..de5a754 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -25,7 +25,7 @@ depends() { + } + + installkernel() { +- instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files ++ hostonly='' instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files + } + + install() { diff --git a/SOURCES/0446-dracut.sh-extend-host_fs_types-with-filesystems.patch b/SOURCES/0446-dracut.sh-extend-host_fs_types-with-filesystems.patch new file mode 100644 index 0000000..0065cb6 --- /dev/null +++ b/SOURCES/0446-dracut.sh-extend-host_fs_types-with-filesystems.patch @@ -0,0 +1,30 @@ +From b7c7b16d4ec61e3924c1006bf13d641904825cda Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 22 Jul 2016 08:39:38 +0200 +Subject: [PATCH] dracut.sh: extend host_fs_types with $filesystems + +Additional filesystems specified on the kernel command line or in the +configuration files, should trigger the inclusion of the corresponding +dracut modules, therefore host_fs_types is extended with these +filesystems. +--- + dracut.sh | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index fefdefd..0a69973 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1174,6 +1174,12 @@ for dev in "${!host_fs_types[@]}"; do + fi + done + ++# also put the additional filesystems in host_fs_types ++# so that the according modules are installed. ++for fs in $filesystems; do ++ host_fs_types[$fs]="$fs" ++done ++ + [[ -d $udevdir ]] \ + || udevdir="$(pkg-config udev --variable=udevdir 2>/dev/null)" + if ! [[ -d "$udevdir" ]]; then diff --git a/SOURCES/0447-lvm-include-etc-lvm-lvm_-host_tag-.conf.patch b/SOURCES/0447-lvm-include-etc-lvm-lvm_-host_tag-.conf.patch new file mode 100644 index 0000000..9932873 --- /dev/null +++ b/SOURCES/0447-lvm-include-etc-lvm-lvm_-host_tag-.conf.patch @@ -0,0 +1,38 @@ +From 20171c75197c799d4710d04a0d6d1f73c510213b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 22 Jul 2016 13:26:10 +0200 +Subject: [PATCH] lvm: include /etc/lvm/lvm_.conf + +https://bugzilla.redhat.com/show_bug.cgi?id=1328778 +--- + modules.d/90lvm/module-setup.sh | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 5e374fb..23d63a0 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -60,13 +60,16 @@ install() { + inst_rules "$moddir/64-lvm.rules" + + if [[ $hostonly ]] || [[ $lvmconf = "yes" ]]; then +- if [ -f /etc/lvm/lvm.conf ]; then +- inst_simple /etc/lvm/lvm.conf +- # FIXME: near-term hack to establish read-only locking; +- # use command-line lvm.conf editor once it is available +- sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' ${initdir}/etc/lvm/lvm.conf +- sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' ${initdir}/etc/lvm/lvm.conf +- fi ++ for f in /etc/lvm/lvm.conf /etc/lvm/lvm_*.conf; do ++ [ -e "$f" ] || continue ++ inst_simple "$f" ++ if [ -f "${initdir}/$f" ]; then ++ # FIXME: near-term hack to establish read-only locking; ++ # use command-line lvm.conf editor once it is available ++ sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' "${initdir}/$f" ++ sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' "${initdir}/$f" ++ fi ++ done + fi + + if ! [[ -e ${initdir}/etc/lvm/lvm.conf ]]; then diff --git a/SOURCES/0448-add-rd.emergency-reboot-poweroff-halt.patch b/SOURCES/0448-add-rd.emergency-reboot-poweroff-halt.patch new file mode 100644 index 0000000..847da39 --- /dev/null +++ b/SOURCES/0448-add-rd.emergency-reboot-poweroff-halt.patch @@ -0,0 +1,110 @@ +From cd6679c71665a53e2a55a204e7ea64b4a6d14030 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 22 Jul 2016 13:32:47 +0200 +Subject: [PATCH] add rd.emergency=[reboot|poweroff|halt] + +specifies what action to execute in case of a critical failure + +(cherry picked from commit c45e856a659a37537c107f7ef3e680abf60a96a5) + +https://bugzilla.redhat.com/show_bug.cgi?id=1359144 +--- + dracut.cmdline.7.asc | 3 +++ + modules.d/98systemd/dracut-emergency.sh | 12 +++++++++++- + modules.d/99base/dracut-lib.sh | 24 ++++++++++++++++-------- + 3 files changed, 30 insertions(+), 9 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 1cf962e..1fb4f74 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -108,6 +108,9 @@ resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 + + Misc + ~~~~ ++**rd.emergency=**__[reboot|poweroff|halt]__:: ++ specify, what action to execute in case of a critical failure. ++ + **rd.driver.blacklist=**____[,____,...]:: + do not load kernel module . This parameter can be specified + multiple times. +diff --git a/modules.d/98systemd/dracut-emergency.sh b/modules.d/98systemd/dracut-emergency.sh +index 5771dc5..b3e8d08 100755 +--- a/modules.d/98systemd/dracut-emergency.sh ++++ b/modules.d/98systemd/dracut-emergency.sh +@@ -16,6 +16,7 @@ export _rdshell_name="dracut" action="Boot" hook="emergency" + + source_hook "$hook" + ++_emergency_action=$(getarg rd.emergency) + + if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then + echo +@@ -33,9 +34,18 @@ if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then + exec sh -i -l + else + warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line." +- exit 1 ++ [ -z "$_emergency_action" ] && _emergency_action=halt + fi + + /bin/rm -f -- /.console_lock + ++case "$_emergency_action" in ++ reboot) ++ reboot || exit 1;; ++ poweroff) ++ poweroff || exit 1;; ++ halt) ++ halt || exit 1;; ++esac ++ + exit 0 +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index 16bc74d..10d9cbc 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -1068,6 +1068,8 @@ emergency_shell() + local _ctty + set +e + local _rdshell_name="dracut" action="Boot" hook="emergency" ++ local _emergency_action ++ + if [ "$1" = "-n" ]; then + _rdshell_name=$2 + shift 2 +@@ -1086,20 +1088,26 @@ emergency_shell() + source_hook "$hook" + echo + ++ _emergency_action=$(getarg rd.emergency) ++ [ -z "$_emergency_action" ] \ ++ && [ -e /run/initramfs/.die ] \ ++ && _emergency_action=halt ++ + if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then + _emergency_shell $_rdshell_name + else + warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line." +- # cause a kernel panic +- exit 1 ++ [ -z "$_emergency_action" ] && _emergency_action=halt + fi + +- if [ -e /run/initramfs/.die ]; then +- if [ -n "$DRACUT_SYSTEMD" ]; then +- systemctl --no-block --force halt +- fi +- exit 1 +- fi ++ case "$_emergency_action" in ++ reboot) ++ reboot || exit 1;; ++ poweroff) ++ poweroff || exit 1;; ++ halt) ++ halt || exit 1;; ++ esac + } + + action_on_fail() diff --git a/SOURCES/0449-fips-module-add-missing-spaces.patch b/SOURCES/0449-fips-module-add-missing-spaces.patch new file mode 100644 index 0000000..e9bb912 --- /dev/null +++ b/SOURCES/0449-fips-module-add-missing-spaces.patch @@ -0,0 +1,25 @@ +From 10e6bf0e43c4ccde7850d5a8f6ff337af835dc38 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 28 Jul 2016 11:02:19 +0200 +Subject: [PATCH] fips-module: add missing spaces + +https://bugzilla.redhat.com/show_bug.cgi?id=1359677 +--- + modules.d/01fips/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 32d10d0..43d170f 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -20,8 +20,8 @@ installkernel() { + _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg " + _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " +- _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390" +- _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" ++ _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390 " ++ _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib " + _fipsmodules+="sha1-mb" + fi + diff --git a/SOURCES/0450-fips-remove-sha1-mb.patch b/SOURCES/0450-fips-remove-sha1-mb.patch new file mode 100644 index 0000000..ce3ffd3 --- /dev/null +++ b/SOURCES/0450-fips-remove-sha1-mb.patch @@ -0,0 +1,22 @@ +From 8dd6ff8d6a0a3173bded683ecf85834cce7cf297 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 9 Aug 2016 13:01:32 +0200 +Subject: [PATCH] fips: remove sha1-mb + +This module should be loaded automatically, if the HW supports it. +--- + modules.d/01fips/module-setup.sh | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 43d170f..dc47634 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -22,7 +22,6 @@ installkernel() { + _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " + _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390 " + _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib " +- _fipsmodules+="sha1-mb" + fi + + mkdir -m 0755 -p "${initdir}/etc/modprobe.d" diff --git a/SOURCES/0451-dracut-functions.sh-catch-all-lvm-slaves.patch b/SOURCES/0451-dracut-functions.sh-catch-all-lvm-slaves.patch new file mode 100644 index 0000000..b0adaaa --- /dev/null +++ b/SOURCES/0451-dracut-functions.sh-catch-all-lvm-slaves.patch @@ -0,0 +1,55 @@ +From 7a7b8c174023886b015bd484372839aecf63f324 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 9 Aug 2016 15:26:04 +0200 +Subject: [PATCH] dracut-functions.sh: catch all lvm slaves + +add check_vol_slaves_all to be used in check_block_and_slaves_all + +otherwise only the first lvm VG member would be processed +--- + dracut-functions.sh | 25 ++++++++++++++++++++++++- + 1 file changed, 24 insertions(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 4a9729c..61726e4 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -632,7 +632,7 @@ check_block_and_slaves_all() { + if ! lvm_internal_dev $2 && "$1" $2; then + _ret=0 + fi +- check_vol_slaves "$@" && return 0 ++ check_vol_slaves_all "$@" && return 0 + if [[ -f /sys/dev/block/$2/../dev ]]; then + check_block_and_slaves_all $1 $(<"/sys/dev/block/$2/../dev") && _ret=0 + fi +@@ -703,6 +703,29 @@ check_vol_slaves() { + return 1 + } + ++check_vol_slaves_all() { ++ local _lv _vg _pv ++ for i in /dev/mapper/*; do ++ [[ $i == /dev/mapper/control ]] && continue ++ _lv=$(get_maj_min $i) ++ if [[ $_lv = $2 ]]; then ++ _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null) ++ # strip space ++ _vg="${_vg//[[:space:]]/}" ++ if [[ $_vg ]]; then ++ for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null) ++ do ++ check_block_and_slaves_all $1 $(get_maj_min $_pv) ++ done ++ return 0 ++ fi ++ fi ++ done ++ return 1 ++} ++ ++ ++ + # fs_get_option + # search for a specific option in a bunch of filesystem options + # and return the value diff --git a/SOURCES/0452-systemd-dracut-cmdline.sh-unset-UNSET-root.patch b/SOURCES/0452-systemd-dracut-cmdline.sh-unset-UNSET-root.patch new file mode 100644 index 0000000..af6d777 --- /dev/null +++ b/SOURCES/0452-systemd-dracut-cmdline.sh-unset-UNSET-root.patch @@ -0,0 +1,42 @@ +From fc77aca7ddbd33328066a943a4de09de34d25c4c Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 12 Aug 2016 11:24:47 +0200 +Subject: [PATCH] systemd/dracut-cmdline.sh: unset "UNSET" $root + +https://bugzilla.redhat.com/show_bug.cgi?id=1365667 +caused by commit 9aa224cc +--- + modules.d/98systemd/dracut-cmdline.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh +index d22e4d6..17b30a3 100755 +--- a/modules.d/98systemd/dracut-cmdline.sh ++++ b/modules.d/98systemd/dracut-cmdline.sh +@@ -26,7 +26,7 @@ source_conf /etc/conf.d + # between the case where it was set to the empty string and the case where it + # wasn't specified at all. + if ! root="$(getarg root=)"; then +- root='UNSET' ++ root_unset='UNSET' + fi + + rflags="$(getarg rootflags=)" +@@ -50,7 +50,7 @@ source_hook cmdline + + [ -f /lib/dracut/parse-resume.sh ] && . /lib/dracut/parse-resume.sh + +-case "$root" in ++case "${root}${root_unset}" in + block:LABEL=*|LABEL=*) + root="${root#block:}" + root="$(echo $root | sed 's,/,\\x2f,g')" +@@ -76,7 +76,7 @@ case "$root" in + rootok=1 ;; + esac + +-[ -z "$root" ] && die "Empty root= argument" ++[ -z "${root}${root_unset}" ] && die "Empty root= argument" + [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" + + export root rflags fstype netroot NEWROOT diff --git a/SOURCES/0453-network-ibft-put-IPv6-IP-in-brackets.patch b/SOURCES/0453-network-ibft-put-IPv6-IP-in-brackets.patch new file mode 100644 index 0000000..872a812 --- /dev/null +++ b/SOURCES/0453-network-ibft-put-IPv6-IP-in-brackets.patch @@ -0,0 +1,28 @@ +From b8e6c051c6ad6ae3ae93db8e74f37dbc82c22514 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 17 Aug 2016 16:25:09 +0200 +Subject: [PATCH] network:ibft put IPv6 IP in brackets + +ip=2620:0052:0000:2220:0226:b9ff:fe81:cde4::[2620:0052:0000:2220:0000:0000:0000:03fe]:64::ibft0:none + +should be + +ip=[2620:0052:0000:2220:0226:b9ff:fe81:cde4]::[2620:0052:0000:2220:0000:0000:0000:03fe]:64::ibft0:none + +https://bugzilla.redhat.com/show_bug.cgi?id=1322592#c19 +--- + modules.d/40network/net-lib.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index de334d9..3459e89 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -277,6 +277,7 @@ ibft_to_cmdline() { + [ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a) + if [ "$family" = "ipv6" ] ; then + if [ -n "$ip" ] ; then ++ ip="[$ip]" + [ -n "$prefix" ] || prefix=64 + mask="$prefix" + fi diff --git a/SOURCES/0454-url-lib-ca-bundle.crt-changed-to-a-symlink.patch b/SOURCES/0454-url-lib-ca-bundle.crt-changed-to-a-symlink.patch new file mode 100644 index 0000000..b81948e --- /dev/null +++ b/SOURCES/0454-url-lib-ca-bundle.crt-changed-to-a-symlink.patch @@ -0,0 +1,30 @@ +From 1b23c6c65c39630cb62faa2503817759f83d880b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 17 Aug 2016 16:41:21 +0200 +Subject: [PATCH] url-lib: ca-bundle.crt changed to a symlink + +use inst() instead of inst_simple() + +/etc/pki/tls/certs/ca-bundle.crt is a symlink to +../../ca-trust/extracted/pem/tls-ca-bundle.pem + +with inst() we install the original file also. + +https://bugzilla.redhat.com/show_bug.cgi?id=1341280 +--- + modules.d/45url-lib/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/45url-lib/module-setup.sh b/modules.d/45url-lib/module-setup.sh +index f2d068b..6a2bb83 100755 +--- a/modules.d/45url-lib/module-setup.sh ++++ b/modules.d/45url-lib/module-setup.sh +@@ -28,7 +28,7 @@ install() { + _crt=$(grep -F --binary-files=text -z .crt $_lib) + [[ $_crt ]] || continue + [[ $_crt == /*/* ]] || continue +- if ! inst_simple "$_crt"; then ++ if ! inst "$_crt"; then + dwarn "Couldn't install '$_crt' SSL CA cert bundle; HTTPS might not work." + continue + fi diff --git a/SOURCES/0455-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch b/SOURCES/0455-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch new file mode 100644 index 0000000..33fef60 --- /dev/null +++ b/SOURCES/0455-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch @@ -0,0 +1,26 @@ +From 91896ab68e26b9f9191f4742dc8ad9c5025eac7f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 17 Aug 2016 16:48:07 +0200 +Subject: [PATCH] dracut.sh: document --hostonly-i18n and --no-hostonly-i18n + +show description in --help + +https://bugzilla.redhat.com/show_bug.cgi?id=1266448 +--- + dracut.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/dracut.sh b/dracut.sh +index 0a69973..90ea9c3 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -141,6 +141,9 @@ Creates initial ramdisk images for preloading modules + in the initramfs + --no-hostonly-cmdline Do not store kernel command line arguments needed + in the initramfs ++ --hostonly-i18n Install only needed keyboard and font files according ++ to the host configuration (default). ++ --no-hostonly-i18n Install all keyboard and font files available. + --persistent-policy [POLICY] + Use [POLICY] to address disks and partitions. + POLICY can be any directory name found in /dev/disk. diff --git a/SOURCES/0456-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch b/SOURCES/0456-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch new file mode 100644 index 0000000..c1c49f8 --- /dev/null +++ b/SOURCES/0456-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch @@ -0,0 +1,23 @@ +From 1d267fb82c1e12e06ef80de16f5232ef06c84240 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 17 Aug 2016 16:49:00 +0200 +Subject: [PATCH] dracut.cmdline.7.asc: document rd.shell=0 for rd.emergency + +--- + dracut.cmdline.7.asc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 1fb4f74..b479fa8 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -109,7 +109,8 @@ resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 + Misc + ~~~~ + **rd.emergency=**__[reboot|poweroff|halt]__:: +- specify, what action to execute in case of a critical failure. ++ specify, what action to execute in case of a critical failure. rd.shell=0 also ++ be specified. + + **rd.driver.blacklist=**____[,____,...]:: + do not load kernel module . This parameter can be specified diff --git a/SOURCES/0457-nfs-install-more-kernel-modules.patch b/SOURCES/0457-nfs-install-more-kernel-modules.patch new file mode 100644 index 0000000..1a0da15 --- /dev/null +++ b/SOURCES/0457-nfs-install-more-kernel-modules.patch @@ -0,0 +1,25 @@ +From 8c67fb91232d52d15effce75eb564d26b0a1e994 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 19 Aug 2016 15:56:47 +0200 +Subject: [PATCH] nfs: install more kernel modules + +adds support for rpcrdma to support NFSROOT over NFSoRDMA + +https://bugzilla.redhat.com/show_bug.cgi?id=1367374 +--- + modules.d/95nfs/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index de5a754..dc2e722 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -25,7 +25,7 @@ depends() { + } + + installkernel() { +- hostonly='' instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files ++ hostonly='' instmods =net/sunrpc =fs/nfs ipv6 nfs_acl nfs_layout_nfsv41_files + } + + install() { diff --git a/SOURCES/0458-TEST-16-DMSQUASH-add-sr_mod.patch b/SOURCES/0458-TEST-16-DMSQUASH-add-sr_mod.patch new file mode 100644 index 0000000..0412751 --- /dev/null +++ b/SOURCES/0458-TEST-16-DMSQUASH-add-sr_mod.patch @@ -0,0 +1,23 @@ +From 39c4892772a3afa8b1103c1b06db576976cbf066 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 26 Aug 2016 11:24:42 +0200 +Subject: [PATCH] TEST-16-DMSQUASH: add sr_mod + +otherwise no cdrom can be accessed on RHEL-7 +--- + test/TEST-16-DMSQUASH/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh +index 9d584e3..e80ec5c 100755 +--- a/test/TEST-16-DMSQUASH/test.sh ++++ b/test/TEST-16-DMSQUASH/test.sh +@@ -40,7 +40,7 @@ test_setup() { + + sudo $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \ + -a "debug dmsquash-live" \ +- -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ ++ -d "piix ide-gd_mod ata_piix ext3 sd_mod sr_mod" \ + -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1 + + mkdir -p -- "$TESTDIR"/root-source diff --git a/SOURCES/0459-fcoe-only-install-etc-hba.conf-it-it-exists.patch b/SOURCES/0459-fcoe-only-install-etc-hba.conf-it-it-exists.patch new file mode 100644 index 0000000..452b722 --- /dev/null +++ b/SOURCES/0459-fcoe-only-install-etc-hba.conf-it-it-exists.patch @@ -0,0 +1,23 @@ +From 99e72a4b1cb79a402c9c1338f7cfb8dc22bf16e3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 6 Sep 2016 15:17:49 +0200 +Subject: [PATCH] fcoe: only install /etc/hba.conf, it it exists + +https://bugzilla.redhat.com/show_bug.cgi?id=1369342 +--- + modules.d/95fcoe/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index af2798d..4bab0c7 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -69,7 +69,7 @@ cmdline() { + install() { + inst_multiple ip dcbtool fipvlan lldpad readlink lldptool fcoemon fcoeadm + inst_libdir_file 'libhbalinux.so*' +- inst "/etc/hba.conf" "/etc/hba.conf" ++ [[ -e /etc/hba.conf ]] && inst "/etc/hba.conf" "/etc/hba.conf" + + mkdir -m 0755 -p "$initdir/var/lib/lldpad" + mkdir -m 0755 -p "$initdir/etc/fcoe" diff --git a/SOURCES/0460-network-parse-ip-opts-be-more-liberal-to-multiple-ip.patch b/SOURCES/0460-network-parse-ip-opts-be-more-liberal-to-multiple-ip.patch new file mode 100644 index 0000000..cfd1f16 --- /dev/null +++ b/SOURCES/0460-network-parse-ip-opts-be-more-liberal-to-multiple-ip.patch @@ -0,0 +1,37 @@ +From c87d489ca619c719323da446076ab67dc091960d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 6 Sep 2016 15:18:24 +0200 +Subject: [PATCH] network/parse-ip-opts: be more liberal to multiple ip= + options + +Do not bail out early. + +https://bugzilla.redhat.com/show_bug.cgi?id=1304069 +--- + modules.d/40network/parse-ip-opts.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh +index 3c96204..68afe91 100755 +--- a/modules.d/40network/parse-ip-opts.sh ++++ b/modules.d/40network/parse-ip-opts.sh +@@ -38,7 +38,7 @@ unset count + # If needed, check if bootdev= contains anything usable + BOOTDEV=$(getarg bootdev=) + +-if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then ++if [ -n "$NEEDBOOTDEV" ] && ! getargbool 0 rd.neednet; then + #[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines" + echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf + info "Multiple ip= arguments: assuming rd.neednet=1" +@@ -79,8 +79,8 @@ for p in $(getargs ip=); do + ;; + auto6);; + dhcp|dhcp6|on|any) \ +- [ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \ +- die "Sorry, 'ip=$p' does not make sense for multiple interface configurations" ++ #[ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \ ++ # die "Sorry, 'ip=$p' does not make sense for multiple interface configurations" + [ -n "$ip" ] && \ + die "For argument 'ip=$p'\nSorry, setting client-ip does not make sense for '$autoopt'" + ;; diff --git a/SOURCES/0461-network-fix-dhcp-classless_static_routes.patch b/SOURCES/0461-network-fix-dhcp-classless_static_routes.patch new file mode 100644 index 0000000..2d3e875 --- /dev/null +++ b/SOURCES/0461-network-fix-dhcp-classless_static_routes.patch @@ -0,0 +1,26 @@ +From 33710dfbfcf43f4438ed58e45e2599d3fe47e2f3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 7 Sep 2016 09:33:31 +0200 +Subject: [PATCH] network: fix dhcp classless_static_routes + +removed copy&paste artifact "modify_routes add" + +there is no modify_routes() function, and we simply want the output +of the parse function. +--- + modules.d/40network/dhclient-script.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index f6c77f2..2a2e234 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -175,7 +175,7 @@ case $reason in + echo '. /lib/net-lib.sh' + echo "setup_net $netif" + if [ -n "$new_classless_static_routes" ]; then +- modify_routes add "$(parse_option_121 $new_classless_static_routes)" ++ parse_option_121 $new_classless_static_routes + fi + echo "source_hook initqueue/online $netif" + [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif" diff --git a/SOURCES/0462-network-do-not-check-firmware-boot-selected-flag.patch b/SOURCES/0462-network-do-not-check-firmware-boot-selected-flag.patch new file mode 100644 index 0000000..688797d --- /dev/null +++ b/SOURCES/0462-network-do-not-check-firmware-boot-selected-flag.patch @@ -0,0 +1,27 @@ +From 435324c68c93007fd7cdf710c8094051a79ad48f Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Wed, 5 Oct 2016 12:46:39 +0200 +Subject: [PATCH] network: do not check "firmware boot selected flag" + +Apparently it is not set correctly on some setups +https://bugzilla.redhat.com/show_bug.cgi?id=1380581 +--- + modules.d/40network/net-lib.sh | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 3459e89..9083aea 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -241,8 +241,6 @@ ibft_to_cmdline() { + [ -e ${iface}/flags ] && flags=$(read a < ${iface}/flags; echo $a) + # Skip invalid interfaces + (( $flags & 1 )) || continue +- # Skip interfaces not used for booting +- (( $flags & 2 )) || continue + [ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a) + [ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a) + [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a) +-- +2.7.4 + diff --git a/SPECS/dracut.spec b/SPECS/dracut.spec index e44c5c1..e3a1e05 100644 --- a/SPECS/dracut.spec +++ b/SPECS/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 033 -Release: 360%{?dist}.1 +Release: 463%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -389,7 +389,109 @@ Patch357: 0357-network-ifup.sh-skip-empty-nameserver-values.patch Patch358: 0358-write-ifcfg-fix-creating-configuration-for-VLAN.patch Patch359: 0359-90qemu-also-add-ibmvscsi-on-qemu.patch Patch360: 0360-Don-t-call-udevadm-control-exit-in-systemd-mode.patch +Patch361: 0361-iscsi-iscsiroot.sh-better-put-variables-in-quotes.patch +Patch362: 0362-network-fix-carrier-detection.patch +Patch363: 0363-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch +Patch364: 0364-multipath-fix-majmin_to_mpath_dev.patch +Patch365: 0365-90lvm-Install-dm-snapshot-module.patch +Patch366: 0366-systemd-add-wheel-and-adm-to-passwd-and-group.patch +Patch367: 0367-dracut-add-tar-and-dd-requirement.patch +Patch368: 0368-dracut.sh-for-microcode-generation-skip-gpg-files.patch +Patch369: 0369-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch +Patch370: 0370-network-dhclient-script.sh-add-classless-static-rout.patch +Patch371: 0371-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch +Patch372: 0372-url-lib-url-lib.sh-nfs_fetch_url-pass-file-directory.patch +Patch373: 0373-95iscsi-Autodetect-iSCSI-firmware.patch +Patch374: 0374-95iscsi-Install-libgcc_s-library.patch +Patch375: 0375-95iscsi-Fixup-bnx2i-offload-booting.patch +Patch376: 0376-95iscsi-More-empty-cmdline-fixes.patch +Patch377: 0377-95iscsi-parse-output-from-iscsiadm-correctly.patch Patch378: 0378-shutdown-guard-against-read-only-run.patch +Patch379: 0379-kernel-modules-increase-SDHCI-driver-inclusion.patch +Patch380: 0380-dracut-functions.sh-add-str_starts-and-str_ends.patch +Patch381: 0381-test-remove-dash-module-as-it-is-not-available-in-RH.patch +Patch382: 0382-test-NBD-add-checks-for-needed-binaries.patch +Patch383: 0383-dracut.spec-add-a-tag-with-the-current-version.patch +Patch384: 0384-more-dash-removal.patch +Patch385: 0385-network-add-73-idrac.rules-udev-rules.patch +Patch386: 0386-base-dracut-lib.sh-add-trim.patch +Patch387: 0387-network-net-genrules.sh-generate-rules-for-all-inter.patch +Patch388: 0388-ifup-setup-bridge-bonding-and-teaming-only-once.patch +Patch389: 0389-network-parse-bond.sh-handle-multiple-bond-interface.patch +Patch390: 0390-TEST-50-MULTINIC-add-multiple-bond-tests.patch +Patch391: 0391-network-dhclient.conf-add-missing-commata.patch +Patch392: 0392-systemd-add-.slice-and-make-reboot-work.patch +Patch393: 0393-test-TEST-02-systemd-use-marker-disk-for-successfull.patch +Patch394: 0394-Disable-early-microcode-for-non-x86-architecures.patch +Patch395: 0395-fcoe-check-if-needed-for-hostonly.patch +Patch396: 0396-dracut-only-use-one-tmpdir.patch +Patch397: 0397-add-install-optional-and-install_optional_items.patch +Patch398: 0398-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch +Patch399: 0399-Replace-echo-n-with-printf-in-code-with-a-bin-sh-she.patch +Patch400: 0400-Reset-IFS-variable.patch +Patch401: 0401-Defer-modprobe-of-HW-modules-until-udev-is-running.patch +Patch402: 0402-95fcoe-start-lldpad-separately.patch +Patch403: 0403-95fcoe-skip-VLAN-devices-in-fcoe-up.patch +Patch404: 0404-95fcoe-Store-current-configuration-in-dracut-cmdline.patch +Patch405: 0405-95fcoe-update-fcoe-interface-check.patch +Patch406: 0406-fcoe-up-remove-initlog-logic.patch +Patch407: 0407-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch +Patch408: 0408-network-support-macaddr-in-brackets.patch +Patch409: 0409-test-don-t-call-ldconfig-with-path-separator.patch +Patch410: 0410-network-set-MTU-and-MACADDR-for-dhcp-and-auto6.patch +Patch411: 0411-test-add-TEST-60-MTUMAC.patch +Patch412: 0412-network-net-lib.sh-parse_ifname_opts-support-21-byte.patch +Patch413: 0413-network-net-lib.sh-wait_for_ipv6_dad-simplify-ip-cal.patch +Patch414: 0414-systemd-ensure-journal-is-volatile.patch +Patch415: 0415-network-dhcp-before-parsing-specified-dns-through-cm.patch +Patch416: 0416-network-net-lib.sh-delete-duplicated-DNS-items-from-.patch +Patch417: 0417-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch +Patch418: 0418-network-net-lib.sh-auto6-wait-for-route-ra.patch +Patch419: 0419-network-differ-between-ipv6-local-and-global-tentati.patch +Patch420: 0420-network-flush-only-IPv4-addresses-on-configuration.patch +Patch421: 0421-network-wait_for_ipv6_auto-wait-for-all-tentative-ad.patch +Patch422: 0422-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch +Patch423: 0423-virtfs-use-systemd-generator.patch +Patch424: 0424-add-rd.device.timeout-seconds-parameter.patch +Patch425: 0425-test-TEST-04-systemd-fixup-test.patch +Patch426: 0426-test-TEST-12-RAID-DEG-add-rd.device.timeout.patch +Patch427: 0427-99base-init.sh-break-the-initqueue-if-emergency-shel.patch +Patch428: 0428-systemd-dracut-initqueue.sh-don-t-go-into-emergency.patch +Patch429: 0429-systemd-let-booting-work-after-exiting-emergency.patch +Patch430: 0430-TEST-13-ENC-RAID-LVM-add-rd.device.timeout-40.patch +Patch431: 0431-TEST-14-IMSM-add-rd.device.timeout.patch +Patch432: 0432-lsinitrd-Suppress-cat-write-error-Broken-pipe.patch +Patch433: 0433-network-support-multiple-vlan-team-bridge-and-bond.patch +Patch434: 0434-TEST-70-BONDBRIDGETEAMVLAN-add-testcase-for-testsuit.patch +Patch435: 0435-dracut.spec-remove-dd.patch +Patch436: 0436-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch +Patch437: 0437-watchdog-install-module-for-active-watchdog.patch +Patch438: 0438-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch +Patch439: 0439-watchdog-module-setup.sh-rewrite.patch +Patch440: 0440-watchdog-clean-return-of-installkernel.patch +Patch441: 0441-watchdog-start-traversing-the-device-tree-from-the-r.patch +Patch442: 0442-dracut.spec-remove-trailing-space.patch +Patch443: 0443-fips-use-lib-modules-uname-r-modules.fips.patch +Patch444: 0444-fips-add-sha1-mb-to-fips-modules.patch +Patch445: 0445-nfs-install-all-nfs-modules-non-hostonly.patch +Patch446: 0446-dracut.sh-extend-host_fs_types-with-filesystems.patch +Patch447: 0447-lvm-include-etc-lvm-lvm_-host_tag-.conf.patch +Patch448: 0448-add-rd.emergency-reboot-poweroff-halt.patch +Patch449: 0449-fips-module-add-missing-spaces.patch +Patch450: 0450-fips-remove-sha1-mb.patch +Patch451: 0451-dracut-functions.sh-catch-all-lvm-slaves.patch +Patch452: 0452-systemd-dracut-cmdline.sh-unset-UNSET-root.patch +Patch453: 0453-network-ibft-put-IPv6-IP-in-brackets.patch +Patch454: 0454-url-lib-ca-bundle.crt-changed-to-a-symlink.patch +Patch455: 0455-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch +Patch456: 0456-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch +Patch457: 0457-nfs-install-more-kernel-modules.patch +Patch458: 0458-TEST-16-DMSQUASH-add-sr_mod.patch +Patch459: 0459-fcoe-only-install-etc-hba.conf-it-it-exists.patch +Patch460: 0460-network-parse-ip-opts-be-more-liberal-to-multiple-ip.patch +Patch461: 0461-network-fix-dhcp-classless_static_routes.patch +Patch462: 0462-network-do-not-check-firmware-boot-selected-flag.patch + BuildRequires: bash git @@ -452,6 +554,7 @@ Requires: gzip xz Requires: kmod Requires: sed Requires: kpartx +Requires: tar %if 0%{?fedora} || 0%{?rhel} > 6 Requires: util-linux >= 2.21 @@ -563,6 +666,7 @@ git commit -a -q -m "%{version} baseline." # Apply all the patches. git am -p1 %{patches} +git tag %{version} %endif %build @@ -816,13 +920,150 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog -* Wed Jun 08 2016 Harald Hoyer - 033-360.1 -- handle read-only /run on shutdown -Resolves: rhbz#1338759 - -* Thu Nov 26 2015 Harald Hoyer - 033-360 +* Wed Oct 05 2016 Lukáš Nykrýn - 033-463 +- network: do not check "firmware boot selected flag" +Resolves: rhbz#1380581 + +* Wed Sep 07 2016 Harald Hoyer - 033-462 +- fix dhcp classless routes +Resolves: rhbz#1260955 + +* Tue Sep 06 2016 Harald Hoyer - 033-461 +- be more liberal to multiple ip= lines and ip=dhcp +Resolves: rhbz#1304069 +- don't display error for hba.conf +Resolves: rhbz#1369342 + +* Mon Sep 05 2016 Harald Hoyer - 033-459 +- fix TEST-16-DMSQUASH +Resolves: rhbz#1371165 + +* Fri Aug 19 2016 Harald Hoyer - 033-458 +- add rpcrdma to support NFSROOT over NFSoRDMA +Resolves: rhbz#1367374 + +* Wed Aug 17 2016 Harald Hoyer - 033-457 +- add --help documentation for --no-hostonly-i18n and --hostonly-i18n options +Resolves: rhbz#1266448 +- mention rd.shell=0 for rd.emergency +Resolves: rhbz#1359144 +- put IPv6 IP in brackets for IBFT +Resolves: rhbz#1322592 +- install symlinked ca-bundle.crt for curl and ssl +Resolves: rhbz#1341280 + +* Fri Aug 12 2016 Harald Hoyer - 033-453 +- fixed installation on ppc with missing root= +Resolves: rhbz#1365667 + +* Tue Aug 09 2016 Harald Hoyer - 033-452 +- fips: remove sha1-mb +Resolves: rhbz#1361441 +- check all lvm slaves +Resolves: rhbz#1361165 + +* Thu Jul 28 2016 Lukáš Nykrýn - 033-450 +- fips-module: add missing spaces +Resolves: rhbz#1359677 + +* Fri Jul 22 2016 Harald Hoyer - 033-449 +- include /etc/lvm/lvm_.conf +Resolves: rhbz#1328778 +- cleanup watchdog module +Resolves: rhbz#1319986 +- make reboot/halt/poweroff work +Resolves: rhbz#1324454 +- include nfs module, if host_fs_types contains nfs + copy filesystems to host_fs_types +Resolves: rhbz#1349253 +- add kernel command line argument rd.emergency to specify a + default action rd.emergency=[reboot|poweroff|halt] +Resolves: rhbz#1359144 +- deduplicate /etc/resolv.conf +Resolves: rhbz#1332418 + +* Mon Jul 04 2016 Harald Hoyer - 033-436 +- ip=auto6 waits now until some router advertisments have been done +Resolves: rhbz#1242058 rhbz#1292623 +- default iSCSI off-load start is now done in the background via systemd +- don't fail on missing swap devices +Resolves: rhbz#1165736 +- on shutdown re-mount the pivot-root writeable again +Resolves: rhbz#1178497 +- fixed waiting for interface to be up +Resolves: rhbz#1289341 +- for iSCSI, wait for all interfaces to be up +Resolves: rhbz#1247478 +- correctly set MAC address on interface for DHCP +Resolves: rhbz#1274230 +- fixed detection of virtual machines +Resolves: rhbz#1170122 +- suppress building of early microcode image for non-x86 HW +Resolves: rhbz#1260187 +- show more meaningfull messages for missing binaries +Resolves: rhbz#1201035 +- backport fcoe fixes +Resolves: rhbz#1169672 +- find device mapper devices with user_friendly_names turned on +Resolves: rhbz#1299800 +- add dm-snapshot kernel module for LVM +Resolves: rhbz#1287940 +- skip gpg files for microcode generation +Resolves: rhbz#1282870 +- add description for --no-hostonly-i18n and --hostonly-i18n options +Resolves: rhbz#1266448 +- copy all requires lines from crypttab +Resolves: rhbz#1254987 +- add "wheel" and "adm" to passwd and group +Resolves: rhbz#1275792 rhbz#1287537 +- strip whitespaces from volume group name in check_vol_slaves() +Resolves: rhbz#1299879 +- dhcp: support rfc3442-classless-static-routes +Resolves: rhbz#1260955 +- activate all bridges +Resolves: rhbz#1194604 +- don't call "udevadm control --exit" +Resolves: rhbz#1277026 +- support multiple bond interfaces +Resolves: rhbz#1282679 +- configure other interfaces, if team/bond is configured +Resolves: rhbz#1282680 +- error out, if initramfs.img could not be created + and remove a partial written image +Resolves: rhbz#1235895 +- optionally install items in 01-dist.conf +Resolves: rhbz#1222529 +- fixed MAC and MUT settings in ip= command line parameter +Resolves: rhbz#1271656 + +* Wed Jun 08 2016 Harald Hoyer - 033-385.1 +- remove dd requirement (dd is part of corutils) +Related: rhbz#1336503 + +* Fri May 27 2016 Harald Hoyer - 033-385 +- add more SDHCI driver +Resolves: rhbz#1336503 +- add str_ends() function +- optimize test suite for RHEL + +* Mon May 23 2016 Harald Hoyer - 033-379 +- Autodetect iSCSI firmware +- check, if NFS is already mounted +Resolves: rhbz#1302764 +- fix carrier detection +- fix majmin_to_mpath_dev() +- add "wheel" and "adm" to passwd and group +Resolves: rhbz#1287537 +- add "tar" and "dd" requirement +Resolves: rhbz#1285810 +- for microcode generation, skip gpg files +- add documentation: for "--hostonly-i18n" "--no-hostonly-i18n" "i18n_install_all" +- add classless-static-routes support +Resolves: rhbz#1260955 + +* Thu Nov 26 2015 Harald Hoyer - 033-361 - don't call udevadm control --exit in systemd mode -Resolves: rhbz#1285686 +Resolves: rhbz#1276983 * Tue Oct 20 2015 Lukáš Nykrýn - 033-359 - write-ifcfg: fix creating configuration for VLAN