diff --git a/0107-qemu-include-the-qemu_fw_cfg-kernel-module.patch b/0107-qemu-include-the-qemu_fw_cfg-kernel-module.patch new file mode 100644 index 0000000..81cb555 --- /dev/null +++ b/0107-qemu-include-the-qemu_fw_cfg-kernel-module.patch @@ -0,0 +1,23 @@ +From 73db316ef2c935f4a80c39664f0ebbf9e0035c40 Mon Sep 17 00:00:00 2001 +From: David Michael +Date: Tue, 16 Aug 2016 13:43:18 -0700 +Subject: [PATCH] qemu: include the qemu_fw_cfg kernel module + +This adds support for /sys/firmware/qemu_fw_cfg on QEMU guests +started with the -fw_cfg option. +--- + modules.d/90qemu/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90qemu/module-setup.sh b/modules.d/90qemu/module-setup.sh +index 8cae124..9f8495a 100755 +--- a/modules.d/90qemu/module-setup.sh ++++ b/modules.d/90qemu/module-setup.sh +@@ -27,5 +27,6 @@ installkernel() { + ata_piix ata_generic pata_acpi cdrom sr_mod ahci \ + virtio_blk virtio virtio_ring virtio_pci \ + virtio_scsi virtio_console virtio_rng \ +- spapr-vscsi ++ spapr-vscsi \ ++ qemu_fw_cfg + } diff --git a/0107-network-support-macaddr-in-brackets.patch b/0108-network-support-macaddr-in-brackets.patch similarity index 100% rename from 0107-network-support-macaddr-in-brackets.patch rename to 0108-network-support-macaddr-in-brackets.patch diff --git a/0108-nfs-install-all-nfs-modules-non-hostonly.patch b/0109-nfs-install-all-nfs-modules-non-hostonly.patch similarity index 100% rename from 0108-nfs-install-all-nfs-modules-non-hostonly.patch rename to 0109-nfs-install-all-nfs-modules-non-hostonly.patch diff --git a/0109-network-use-require_any_binary-instead-of-require_an.patch b/0110-network-use-require_any_binary-instead-of-require_an.patch similarity index 100% rename from 0109-network-use-require_any_binary-instead-of-require_an.patch rename to 0110-network-use-require_any_binary-instead-of-require_an.patch diff --git a/0110-TEST-20-NFS-remove-stale-pid-file.patch b/0111-TEST-20-NFS-remove-stale-pid-file.patch similarity index 100% rename from 0110-TEST-20-NFS-remove-stale-pid-file.patch rename to 0111-TEST-20-NFS-remove-stale-pid-file.patch diff --git a/0111-dracut-functions.sh-catch-all-lvm-slaves.patch b/0112-dracut-functions.sh-catch-all-lvm-slaves.patch similarity index 100% rename from 0111-dracut-functions.sh-catch-all-lvm-slaves.patch rename to 0112-dracut-functions.sh-catch-all-lvm-slaves.patch diff --git a/0112-systemd-dracut-cmdline.sh-unset-UNSET-root.patch b/0113-systemd-dracut-cmdline.sh-unset-UNSET-root.patch similarity index 100% rename from 0112-systemd-dracut-cmdline.sh-unset-UNSET-root.patch rename to 0113-systemd-dracut-cmdline.sh-unset-UNSET-root.patch diff --git a/0113-url-lib-ca-bundle.crt-changed-to-a-symlink.patch b/0114-url-lib-ca-bundle.crt-changed-to-a-symlink.patch similarity index 100% rename from 0113-url-lib-ca-bundle.crt-changed-to-a-symlink.patch rename to 0114-url-lib-ca-bundle.crt-changed-to-a-symlink.patch diff --git a/0114-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch b/0115-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch similarity index 100% rename from 0114-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch rename to 0115-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch diff --git a/0115-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch b/0116-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch similarity index 100% rename from 0115-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch rename to 0116-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch diff --git a/0116-network-ibft-put-IPv6-IP-in-brackets.patch b/0117-network-ibft-put-IPv6-IP-in-brackets.patch similarity index 100% rename from 0116-network-ibft-put-IPv6-IP-in-brackets.patch rename to 0117-network-ibft-put-IPv6-IP-in-brackets.patch diff --git a/0118-livenet-support-nfs-urls-in-livenet-generator.patch b/0118-livenet-support-nfs-urls-in-livenet-generator.patch new file mode 100644 index 0000000..713c512 --- /dev/null +++ b/0118-livenet-support-nfs-urls-in-livenet-generator.patch @@ -0,0 +1,24 @@ +From 1090a8826a8435196554ac16f3b8a01cbb03f4be Mon Sep 17 00:00:00 2001 +From: Dan Fuhry +Date: Thu, 25 Aug 2016 17:13:52 -0400 +Subject: [PATCH] livenet: support nfs:// urls in livenet-generator + +This is a further improvement on PR #105 which re-adds support for nfs:// urls to root=live:nfs://... Symptoms prior to applying this patch are that sysroot.mount times out when following the nfs:// syntax for the path to the live image. An additional case is added to livenet-generator to support the nfs protocol. +--- + modules.d/90livenet/livenet-generator.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/90livenet/livenet-generator.sh b/modules.d/90livenet/livenet-generator.sh +index 377d53b..969ef4f 100755 +--- a/modules.d/90livenet/livenet-generator.sh ++++ b/modules.d/90livenet/livenet-generator.sh +@@ -16,6 +16,9 @@ fi + [ "${liveroot%%:*}" = "live" ] || exit 0 + + case "$liveroot" in ++ live:nfs://*|nfs://*) \ ++ root="${root#live:}" ++ rootok=1 ;; + live:http://*|http://*) \ + root="${root#live:}" + rootok=1 ;; diff --git a/0119-Update-nfs-lib.sh.patch b/0119-Update-nfs-lib.sh.patch new file mode 100644 index 0000000..a338752 --- /dev/null +++ b/0119-Update-nfs-lib.sh.patch @@ -0,0 +1,23 @@ +From 69c6435acd7796547d24156691601fa35c400258 Mon Sep 17 00:00:00 2001 +From: honza801 +Date: Thu, 1 Sep 2016 15:37:58 +0200 +Subject: [PATCH] Update nfs-lib.sh + +anaconda_nfsv6_to_var(): fix options parsing. $1 contains : at the end, this is done by previous functions. +--- + modules.d/95nfs/nfs-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh +index 67608b1..1ba4f5f 100755 +--- a/modules.d/95nfs/nfs-lib.sh ++++ b/modules.d/95nfs/nfs-lib.sh +@@ -88,7 +88,7 @@ anaconda_nfs_to_var() { + # IPv6 nfs path will be treated separately + anaconda_nfsv6_to_var() { + nfs="nfs" +- path="$1:" ++ path="$1" + options="${path#*:/}" + path="/${options%%:*}" + server="${1#*nfs:}" diff --git a/0120-dracut-systemd-dracut-mount.service-add-DefaultDepen.patch b/0120-dracut-systemd-dracut-mount.service-add-DefaultDepen.patch new file mode 100644 index 0000000..b6c0637 --- /dev/null +++ b/0120-dracut-systemd-dracut-mount.service-add-DefaultDepen.patch @@ -0,0 +1,22 @@ +From 86eb0b1b83845185ee9ba00609e6169d9f24d4a1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 22 Aug 2016 11:03:01 +0200 +Subject: [PATCH] dracut-systemd/dracut-mount.service: add + DefaultDependencies=no + +--- + modules.d/98dracut-systemd/dracut-mount.service | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/98dracut-systemd/dracut-mount.service b/modules.d/98dracut-systemd/dracut-mount.service +index baa8edb..4c699dd 100644 +--- a/modules.d/98dracut-systemd/dracut-mount.service ++++ b/modules.d/98dracut-systemd/dracut-mount.service +@@ -15,6 +15,7 @@ After=dracut-initqueue.service dracut-pre-mount.service + ConditionPathExists=/usr/lib/initrd-release + ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount + ConditionKernelCommandLine=|rd.break=mount ++DefaultDependencies=no + Conflicts=shutdown.target emergency.target + Before=shutdown.target emergency.target + diff --git a/0121-kernel-modules-add-nvme-kernel-module.patch b/0121-kernel-modules-add-nvme-kernel-module.patch new file mode 100644 index 0000000..5e4ec99 --- /dev/null +++ b/0121-kernel-modules-add-nvme-kernel-module.patch @@ -0,0 +1,22 @@ +From a84c391b8771e0238a0edb8b382ecbf7f2d2bfd3 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 22 Aug 2016 11:04:23 +0200 +Subject: [PATCH] kernel-modules: add nvme kernel module + +--- + 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 7904c02..868341c 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -21,7 +21,7 @@ installkernel() { + yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ + atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \ + virtio virtio_blk virtio_ring virtio_pci virtio_scsi \ +- "=drivers/pcmcia" =ide ++ "=drivers/pcmcia" =ide nvme + + if [[ "$(uname -p)" == arm* ]]; then + # arm specific modules diff --git a/0122-test-TEST-30-ISCSI-depend-on-tgtd-and-tgtadm.patch b/0122-test-TEST-30-ISCSI-depend-on-tgtd-and-tgtadm.patch new file mode 100644 index 0000000..f7df511 --- /dev/null +++ b/0122-test-TEST-30-ISCSI-depend-on-tgtd-and-tgtadm.patch @@ -0,0 +1,25 @@ +From dba974844eaff2beb31a3c248965f5789d22bbb6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 22 Aug 2016 13:32:03 +0200 +Subject: [PATCH] test/TEST-30-ISCSI: depend on tgtd and tgtadm + +the testsuite now needs tgtd and tgtadm and not iscsi-target +--- + test/TEST-30-ISCSI/test.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index 63944b3..d4f0f8c 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -138,8 +138,8 @@ test_run() { + } + + test_setup() { +- if [ ! -x /usr/sbin/iscsi-target ]; then +- echo "Need iscsi-target from netbsd-iscsi" ++ if ! command -v tgtd &>/dev/null || ! command -v tgtadm &>/dev/null; then ++ echo "Need tgtd and tgtadm from scsi-target-utils" + return 1 + fi + diff --git a/0123-network-arping2-use-0.0.0.0-as-source-address.patch b/0123-network-arping2-use-0.0.0.0-as-source-address.patch new file mode 100644 index 0000000..267a75e --- /dev/null +++ b/0123-network-arping2-use-0.0.0.0-as-source-address.patch @@ -0,0 +1,36 @@ +From 00ca15abbf14f51d098867cc8b583089981ab0ae Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 22 Aug 2016 14:38:54 +0200 +Subject: [PATCH] network: arping2 use 0.0.0.0 as source address + +--- + modules.d/40network/dhclient-script.sh | 2 +- + modules.d/40network/ifup.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh +index 2eade35..f49cdb8 100755 +--- a/modules.d/40network/dhclient-script.sh ++++ b/modules.d/40network/dhclient-script.sh +@@ -160,7 +160,7 @@ case $reason in + fi + if [ "$layer2" != "0" ]; then + if command -v arping2 >/dev/null; then +- if arping2 -q -C 1 -c 2 -I $netif $new_ip_address ; then ++ if arping2 -q -C 1 -c 2 -I $netif -0 $new_ip_address ; then + warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying" + exit 1 + fi +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 1461b91..8051156 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -111,7 +111,7 @@ do_static() { + wait_for_ipv6_dad $netif + else + if command -v arping2 >/dev/null; then +- if arping2 -q -C 1 -c 2 -I $netif $ip ; then ++ if arping2 -q -C 1 -c 2 -I $netif -0 $ip ; then + warn "Duplicate address detected for $ip for interface $netif." + return 1 + fi diff --git a/0124-TEST-30-ISCSI-add-message-that-all-tests-passed.patch b/0124-TEST-30-ISCSI-add-message-that-all-tests-passed.patch new file mode 100644 index 0000000..b4fd458 --- /dev/null +++ b/0124-TEST-30-ISCSI-add-message-that-all-tests-passed.patch @@ -0,0 +1,33 @@ +From d7c9ad504e9d3926324e749831938d74919b3a31 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 22 Aug 2016 14:39:25 +0200 +Subject: [PATCH] TEST-30-ISCSI: add message, that all tests passed + +--- + test/TEST-30-ISCSI/test.sh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index d4f0f8c..c5315bb 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -110,16 +110,17 @@ do_test_run() { + || : + + run_client "FAILME: netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0 default GW" \ +- "root=LABEL=sysroot" \ ++ "root=LABEL=sysroot" \ + "ip=192.168.50.101::192.168.50.1:255.255.255.0::ens3:off" \ + "ip=192.168.51.101::192.168.51.1:255.255.255.0::ens4:off" \ +- "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ ++ "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ + "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ + "rd.iscsi.firmware" \ + "rd.iscsi.initiator=$initiator" \ + "rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ + || : + ++ echo "All tests passed [OK]" + return 0 + } + diff --git a/0125-caps-make-it-a-non-default-module.patch b/0125-caps-make-it-a-non-default-module.patch new file mode 100644 index 0000000..bc177a3 --- /dev/null +++ b/0125-caps-make-it-a-non-default-module.patch @@ -0,0 +1,21 @@ +From c85034c91f90529287c0e169ce64d7ed3b0c1a82 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 2 Sep 2016 07:50:24 +0200 +Subject: [PATCH] caps: make it a non default module + +--- + modules.d/02caps/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/02caps/module-setup.sh b/modules.d/02caps/module-setup.sh +index 01327c9..fb16526 100755 +--- a/modules.d/02caps/module-setup.sh ++++ b/modules.d/02caps/module-setup.sh +@@ -3,6 +3,7 @@ + # called by dracut + check() { + require_binaries capsh ++ return 255 + } + + # called by dracut diff --git a/0126-correctly-install-rsyslog.conf-template.patch b/0126-correctly-install-rsyslog.conf-template.patch new file mode 100644 index 0000000..d638589 --- /dev/null +++ b/0126-correctly-install-rsyslog.conf-template.patch @@ -0,0 +1,22 @@ +From ff6077789ee6f265014617186a67e5a6099ee8fb Mon Sep 17 00:00:00 2001 +From: Brendan Germain +Date: Tue, 24 May 2016 15:37:30 -0400 +Subject: [PATCH] correctly install rsyslog.conf template + +--- + modules.d/98syslog/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/98syslog/module-setup.sh b/modules.d/98syslog/module-setup.sh +index 22bc497..4458229 100755 +--- a/modules.d/98syslog/module-setup.sh ++++ b/modules.d/98syslog/module-setup.sh +@@ -34,7 +34,7 @@ install() { + inst_simple "$moddir/rsyslogd-start.sh" /sbin/rsyslogd-start + inst_simple "$moddir/rsyslogd-stop.sh" /sbin/rsyslogd-stop + mkdir -m 0755 -p ${initdir}/etc/templates +- inst_simple "${moddir}/rsyslog.conf" /etc/templates ++ inst_simple "${moddir}/rsyslog.conf" /etc/templates/rsyslog.conf + fi + dracut_need_initqueue + } diff --git a/0127-source-dracut-lib-for-warn.patch b/0127-source-dracut-lib-for-warn.patch new file mode 100644 index 0000000..55995d9 --- /dev/null +++ b/0127-source-dracut-lib-for-warn.patch @@ -0,0 +1,28 @@ +From 3568d947db73cbe0d8bf75e46b2dce8f7bb44f43 Mon Sep 17 00:00:00 2001 +From: Brendan Germain +Date: Wed, 25 May 2016 08:29:55 -0400 +Subject: [PATCH] source dracut-lib for warn() + +--- + modules.d/98syslog/rsyslogd-stop.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/98syslog/rsyslogd-stop.sh b/modules.d/98syslog/rsyslogd-stop.sh +index 010d56a..52c8edf 100755 +--- a/modules.d/98syslog/rsyslogd-stop.sh ++++ b/modules.d/98syslog/rsyslogd-stop.sh +@@ -1,5 +1,7 @@ + #!/bin/sh + ++type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh ++ + # Kills rsyslogd + + if [ -f /var/run/syslogd.pid ]; then +@@ -8,4 +10,4 @@ if [ -f /var/run/syslogd.pid ]; then + kill -0 $pid && kill -9 $pid + else + warn "rsyslogd-stop: Could not find a pid for rsyslogd. Won't kill it." +-fi +\ No newline at end of file ++fi diff --git a/0128-move-start-from-udev-to-initqueue-online.patch b/0128-move-start-from-udev-to-initqueue-online.patch new file mode 100644 index 0000000..367fa5d --- /dev/null +++ b/0128-move-start-from-udev-to-initqueue-online.patch @@ -0,0 +1,147 @@ +From 223547feab5eb85ee96e0e097b6172705803e260 Mon Sep 17 00:00:00 2001 +From: Brendan Germain +Date: Wed, 25 May 2016 13:25:09 -0400 +Subject: [PATCH] move start from udev to initqueue/online + +--- + modules.d/98syslog/module-setup.sh | 3 +-- + modules.d/98syslog/parse-syslog-opts.sh | 22 +++++++++++++++++++++- + modules.d/98syslog/rsyslogd-start.sh | 21 +++++++++++++++------ + modules.d/98syslog/syslog-genrules.sh | 30 ------------------------------ + 4 files changed, 37 insertions(+), 39 deletions(-) + delete mode 100755 modules.d/98syslog/syslog-genrules.sh + +diff --git a/modules.d/98syslog/module-setup.sh b/modules.d/98syslog/module-setup.sh +index 4458229..e18aecb 100755 +--- a/modules.d/98syslog/module-setup.sh ++++ b/modules.d/98syslog/module-setup.sh +@@ -29,9 +29,8 @@ install() { + if [ -n "$_installs" ]; then + inst_multiple cat $_installs + inst_hook cmdline 90 "$moddir/parse-syslog-opts.sh" +- inst_hook pre-udev 61 "$moddir/syslog-genrules.sh" + inst_hook cleanup 99 "$moddir/syslog-cleanup.sh" +- inst_simple "$moddir/rsyslogd-start.sh" /sbin/rsyslogd-start ++ inst_hook initqueue/online 70 "$moddir/rsyslogd-start.sh" + inst_simple "$moddir/rsyslogd-stop.sh" /sbin/rsyslogd-stop + mkdir -m 0755 -p ${initdir}/etc/templates + inst_simple "${moddir}/rsyslog.conf" /etc/templates/rsyslog.conf +diff --git a/modules.d/98syslog/parse-syslog-opts.sh b/modules.d/98syslog/parse-syslog-opts.sh +index 3943258..50ec275 100755 +--- a/modules.d/98syslog/parse-syslog-opts.sh ++++ b/modules.d/98syslog/parse-syslog-opts.sh +@@ -9,10 +9,30 @@ + # Don't auto detect syslog but set it + type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + ++detect_syslog() { ++ syslogtype="" ++ if [ -e /sbin/rsyslogd ]; then ++ syslogtype="rsyslogd" ++ elif [ -e /sbin/syslogd ]; then ++ syslogtype="syslogd" ++ elif [ /sbin/syslog-ng ]; then ++ syslogtype="syslog-ng" ++ else ++ warn "Could not find any syslog binary although the syslogmodule is selected to be installed. Please check." ++ fi ++ echo "$syslogtype" ++ [ -n "$syslogtype" ] ++} ++ + syslogserver=$(getarg syslog.server -d syslog) + syslogfilters=$(getargs syslog.filter -d filter) + syslogtype=$(getarg syslog.type -d syslogtype) + + [ -n "$syslogserver" ] && echo $syslogserver > /tmp/syslog.server + [ -n "$syslogfilters" ] && echo "$syslogfilters" > /tmp/syslog.filters +-[ -n "$syslogtype" ] && echo "$syslogtype" > /tmp/syslog.type ++if [ -n "$syslogtype" ]; then ++ echo "$syslogtype" > /tmp/syslog.type ++else ++ syslogtype=$(detect_syslog) ++ echo $syslogtype > /tmp/syslog.type ++fi +diff --git a/modules.d/98syslog/rsyslogd-start.sh b/modules.d/98syslog/rsyslogd-start.sh +index c08e667..25dfb16 100755 +--- a/modules.d/98syslog/rsyslogd-start.sh ++++ b/modules.d/98syslog/rsyslogd-start.sh +@@ -1,9 +1,15 @@ + #!/bin/sh + +-# Triggered by udev and starts rsyslogd with bootparameters ++# Triggered by initqueue/online and starts rsyslogd with bootparameters + + type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + ++# prevent starting again if already running ++if [ -f /var/run/syslogd.pid ]; then ++ read pid < /var/run/syslogd.pid ++ kill -0 $pid && exit 0 ++fi ++ + rsyslog_config() { + local server=$1 + shift +@@ -17,17 +23,20 @@ rsyslog_config() { + for filter in $filters; do + echo "${filter} @${server}" + done +-# echo "*.* /tmp/syslog" ++ #echo "*.* /tmp/syslog" + } + ++read type < /tmp/syslog.type + read server < /tmp/syslog.server + read filters < /tmp/syslog.filters + [ -z "$filters" ] && filters="kern.*" + read conf < /tmp/syslog.conf + [ -z "$conf" ] && conf="/etc/rsyslog.conf" && echo "$conf" > /tmp/syslog.conf + +-template=/etc/templates/rsyslog.conf +-if [ -n "$server" ]; then +- rsyslog_config "$server" "$template" "$filters" > $conf +- rsyslogd -c3 ++if [ $type == "rsyslogd" ]; then ++ template=/etc/templates/rsyslog.conf ++ if [ -n "$server" ]; then ++ rsyslog_config "$server" "$template" "$filters" > $conf ++ rsyslogd -c3 ++ fi + fi +diff --git a/modules.d/98syslog/syslog-genrules.sh b/modules.d/98syslog/syslog-genrules.sh +deleted file mode 100755 +index 072bdea..0000000 +--- a/modules.d/98syslog/syslog-genrules.sh ++++ /dev/null +@@ -1,30 +0,0 @@ +-#!/bin/sh +- +-# Creates the syslog udev rules to be triggered when interface becomes online. +-type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh +- +-detect_syslog() { +- syslogtype="" +- if [ -e /sbin/rsyslogd ]; then +- syslogtype="rsyslogd" +- elif [ -e /sbin/syslogd ]; then +- syslogtype="syslogd" +- elif [ /sbin/syslog-ng ]; then +- syslogtype="syslog-ng" +- else +- warn "Could not find any syslog binary although the syslogmodule is selected to be installed. Please check." +- fi +- echo "$syslogtype" +- [ -n "$syslogtype" ] +-} +- +-read syslogtype < /tmp/syslog.type +-if [ -z "$syslogtype" ]; then +- syslogtype=$(detect_syslog) +- echo $syslogtype > /tmp/syslog.type +-fi +-if [ -e "/sbin/${syslogtype}-start" ]; then +- printf 'ACTION=="online", SUBSYSTEM=="net", RUN+="/sbin/initqueue --onetime /sbin/'${syslogtype}'-start $env{INTERFACE}"\n' > /etc/udev/rules.d/70-syslog.rules +-else +- warn "syslog-genrules: Could not find binary to start syslog of type \"$syslogtype\". Syslog will not be started." +-fi diff --git a/0129-fixup-No-such-file-or-directory-errors-when-module-i.patch b/0129-fixup-No-such-file-or-directory-errors-when-module-i.patch new file mode 100644 index 0000000..2007d8e --- /dev/null +++ b/0129-fixup-No-such-file-or-directory-errors-when-module-i.patch @@ -0,0 +1,30 @@ +From b37b141ecc9588bc5b29a8474943ec603b1f3ba4 Mon Sep 17 00:00:00 2001 +From: Brendan Germain +Date: Wed, 25 May 2016 15:40:02 -0400 +Subject: [PATCH] fixup No such file or directory errors when module is not + configured + +--- + modules.d/98syslog/rsyslogd-start.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/modules.d/98syslog/rsyslogd-start.sh b/modules.d/98syslog/rsyslogd-start.sh +index 25dfb16..08b6fb2 100755 +--- a/modules.d/98syslog/rsyslogd-start.sh ++++ b/modules.d/98syslog/rsyslogd-start.sh +@@ -26,11 +26,11 @@ rsyslog_config() { + #echo "*.* /tmp/syslog" + } + +-read type < /tmp/syslog.type +-read server < /tmp/syslog.server +-read filters < /tmp/syslog.filters ++[ -f /tmp/syslog.type ] && read type < /tmp/syslog.type ++[ -f /tmp/syslog.server ] && read server < /tmp/syslog.server ++[ -f /tmp/syslog.filters ] && read filters < /tmp/syslog.filters + [ -z "$filters" ] && filters="kern.*" +-read conf < /tmp/syslog.conf ++[ -f /tmp/syslog.conf ] && read conf < /tmp/syslog.conf + [ -z "$conf" ] && conf="/etc/rsyslog.conf" && echo "$conf" > /tmp/syslog.conf + + if [ $type == "rsyslogd" ]; then diff --git a/0130-subshell-and-set-f-to-prevent-expansion.patch b/0130-subshell-and-set-f-to-prevent-expansion.patch new file mode 100644 index 0000000..af37327 --- /dev/null +++ b/0130-subshell-and-set-f-to-prevent-expansion.patch @@ -0,0 +1,31 @@ +From 1d9d43713db58f6aafab6c0692fc2ebb9a26b4c7 Mon Sep 17 00:00:00 2001 +From: Brendan Germain +Date: Wed, 25 May 2016 16:11:11 -0400 +Subject: [PATCH] subshell and set -f to prevent expansion + +--- + modules.d/98syslog/rsyslogd-start.sh | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/modules.d/98syslog/rsyslogd-start.sh b/modules.d/98syslog/rsyslogd-start.sh +index 08b6fb2..c64f212 100755 +--- a/modules.d/98syslog/rsyslogd-start.sh ++++ b/modules.d/98syslog/rsyslogd-start.sh +@@ -20,9 +20,14 @@ rsyslog_config() { + + cat $syslog_template + +- for filter in $filters; do +- echo "${filter} @${server}" +- done ++ ( ++ # disable shell expansion / globbing ++ # since filters contain such characters ++ set -f ++ for filter in $filters; do ++ echo "${filter} @${server}" ++ done ++ ) + #echo "*.* /tmp/syslog" + } + diff --git a/0131-add-imjournal.so-to-read-systemd-journal.patch b/0131-add-imjournal.so-to-read-systemd-journal.patch new file mode 100644 index 0000000..2c7e168 --- /dev/null +++ b/0131-add-imjournal.so-to-read-systemd-journal.patch @@ -0,0 +1,22 @@ +From a1ea214a874514401c318551b93c9ae06be1747d Mon Sep 17 00:00:00 2001 +From: Brendan Germain +Date: Mon, 19 Sep 2016 13:41:32 -0400 +Subject: [PATCH] add imjournal.so to read systemd journal + +--- + modules.d/98syslog/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/98syslog/module-setup.sh b/modules.d/98syslog/module-setup.sh +index e18aecb..aa0c8ea 100755 +--- a/modules.d/98syslog/module-setup.sh ++++ b/modules.d/98syslog/module-setup.sh +@@ -17,7 +17,7 @@ install() { + local _installs + if type -P rsyslogd >/dev/null; then + _installs="rsyslogd" +- inst_libdir_file rsyslog/lmnet.so rsyslog/imklog.so rsyslog/imuxsock.so ++ inst_libdir_file rsyslog/lmnet.so rsyslog/imklog.so rsyslog/imuxsock.so rsyslog/imjournal.so + elif type -P syslogd >/dev/null; then + _installs="syslogd" + elif type -P syslog-ng >/dev/null; then diff --git a/0132-dracut-install-fallback-to-non-hostonly-mode-if-lsmo.patch b/0132-dracut-install-fallback-to-non-hostonly-mode-if-lsmo.patch new file mode 100644 index 0000000..0fd33c5 --- /dev/null +++ b/0132-dracut-install-fallback-to-non-hostonly-mode-if-lsmo.patch @@ -0,0 +1,84 @@ +From bb47ec54994e9fbac2117b8133cd328a2bb3b28f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 8 Sep 2016 15:55:21 +0200 +Subject: [PATCH] dracut-install: fallback to non-hostonly mode if lsmod fails + +if libkmod fails to get the list of loaded modules, fallback +to non-hostonly mode, to at least try to assemble a working initrd. +--- + install/dracut-install.c | 58 +++++++++++++++++++++++++----------------------- + 1 file changed, 30 insertions(+), 28 deletions(-) + +diff --git a/install/dracut-install.c b/install/dracut-install.c +index 0cffa39..fe30bba 100644 +--- a/install/dracut-install.c ++++ b/install/dracut-install.c +@@ -1288,38 +1288,40 @@ static int install_modules(int argc, char **argv) + + ctx = kmod_new(kerneldir, NULL); + +- err = kmod_module_new_from_loaded(ctx, &loaded_list); +- if (err < 0) { +- errno = err; +- log_error("Could not get list of loaded modules: %m"); +- return err; +- } +- +- kmod_list_foreach(itr, loaded_list) { +- _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL; ++ if (arg_hostonly) { ++ err = kmod_module_new_from_loaded(ctx, &loaded_list); ++ if (err < 0) { ++ errno = err; ++ log_error("Could not get list of loaded modules: %m. Switching to non-hostonly mode."); ++ arg_hostonly = false; ++ } else { ++ kmod_list_foreach(itr, loaded_list) { ++ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL; + +- struct kmod_module *mod = kmod_module_get_module(itr); +- char *name = strdup(kmod_module_get_name(mod)); +- hashmap_put(modules_loaded, name, name); +- kmod_module_unref(mod); ++ struct kmod_module *mod = kmod_module_get_module(itr); ++ char *name = strdup(kmod_module_get_name(mod)); ++ hashmap_put(modules_loaded, name, name); ++ kmod_module_unref(mod); + +- /* also put the modules from the new kernel in the hashmap, +- * which resolve the name as an alias, in case a kernel module is +- * renamed. +- */ +- err = kmod_module_new_from_lookup(ctx, name, &modlist); +- if (err < 0) +- continue; +- if (!modlist) +- continue; +- kmod_list_foreach(l, modlist) { +- mod = kmod_module_get_module(l); +- char *name = strdup(kmod_module_get_name(mod)); +- hashmap_put(modules_loaded, name, name); +- kmod_module_unref(mod); ++ /* also put the modules from the new kernel in the hashmap, ++ * which resolve the name as an alias, in case a kernel module is ++ * renamed. ++ */ ++ err = kmod_module_new_from_lookup(ctx, name, &modlist); ++ if (err < 0) ++ continue; ++ if (!modlist) ++ continue; ++ kmod_list_foreach(l, modlist) { ++ mod = kmod_module_get_module(l); ++ char *name = strdup(kmod_module_get_name(mod)); ++ hashmap_put(modules_loaded, name, name); ++ kmod_module_unref(mod); ++ } ++ } ++ kmod_module_unref_list(loaded_list); + } + } +- kmod_module_unref_list(loaded_list); + + for (i = 0; i < argc; i++) { + int r = 0; diff --git a/0133-dmsquash-live-dmsquash-live-root-det_img_fs-redirect.patch b/0133-dmsquash-live-dmsquash-live-root-det_img_fs-redirect.patch new file mode 100644 index 0000000..ff67dc7 --- /dev/null +++ b/0133-dmsquash-live-dmsquash-live-root-det_img_fs-redirect.patch @@ -0,0 +1,24 @@ +From de7ab164dd0aa68100c290f355b858900193e004 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 13 Oct 2016 09:20:33 +0200 +Subject: [PATCH] dmsquash-live/dmsquash-live-root: det_img_fs() redirect + udevadm output to stderr + +Otherwise the output is taken as input for modprobe. +--- + modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index 68d076c..e58d7c2 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -57,7 +57,7 @@ ln -s $livedev /run/initramfs/livedev + + # determine filesystem type for a filesystem image + det_img_fs() { +- udevadm settle ++ udevadm settle >&2 + blkid -s TYPE -u noraid -o value "$1" + } + diff --git a/0134-98integrity-support-validating-the-IMA-policy-file-s.patch b/0134-98integrity-support-validating-the-IMA-policy-file-s.patch new file mode 100644 index 0000000..cb2c62b --- /dev/null +++ b/0134-98integrity-support-validating-the-IMA-policy-file-s.patch @@ -0,0 +1,33 @@ +From 479b5cd94f16052cf6ea28d0e8abba2b926fff83 Mon Sep 17 00:00:00 2001 +From: Stefan Berger +Date: Thu, 13 Oct 2016 16:49:43 -0400 +Subject: [PATCH] 98integrity: support validating the IMA policy file signature + +IMA validates file signatures based on the security.ima xattr. As of +Linux-4.7, instead of cat'ing the IMA policy into the securityfs policy, +the IMA policy pathname can be written, allowing the IMA policy file +signature to be validated. + +This patch first attempts to write the pathname, but on failure falls +back to cat'ing the IMA policy contents . + +Signed-off-by: Stefan Berger +Signed-off-by: Mimi Zohar +--- + modules.d/98integrity/ima-policy-load.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/98integrity/ima-policy-load.sh b/modules.d/98integrity/ima-policy-load.sh +index 0061cff..5460d02 100755 +--- a/modules.d/98integrity/ima-policy-load.sh ++++ b/modules.d/98integrity/ima-policy-load.sh +@@ -30,7 +30,8 @@ load_ima_policy() + # check the existence of the IMA policy file + [ -f "${IMAPOLICYPATH}" ] && { + info "Loading the provided IMA custom policy"; +- cat ${IMAPOLICYPATH} > ${IMASECDIR}/policy; ++ echo -n "${IMAPOLICYPATH}" > ${IMASECDIR}/policy || \ ++ cat "${IMAPOLICYPATH}" > ${IMASECDIR}/policy + } + + return 0 diff --git a/0135-rescue-use-proper-path-for-0-rescue.conf.patch b/0135-rescue-use-proper-path-for-0-rescue.conf.patch new file mode 100644 index 0000000..9d96461 --- /dev/null +++ b/0135-rescue-use-proper-path-for-0-rescue.conf.patch @@ -0,0 +1,33 @@ +From b29901c083ba22a0794849c1e93afc40c11588a2 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Wed, 19 Oct 2016 12:22:48 +0900 +Subject: [PATCH] rescue: use proper path for 0-rescue.conf + +--- + 51-dracut-rescue.install | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install +index 60d7372..0a5f14b 100755 +--- a/51-dracut-rescue.install ++++ b/51-dracut-rescue.install +@@ -59,16 +59,15 @@ if ! [[ ${BOOT_OPTIONS[*]} ]]; then + exit 1 + fi + +-LOADER_ENTRY="/boot/loader/entries/${MACHINE_ID}-0-rescue.conf" + BOOT_DIR="/${MACHINE_ID}/0-rescue" ++BOOT_ROOT=${BOOT_DIR_ABS%$BOOT_DIR} ++LOADER_ENTRY="$BOOT_ROOT/loader/entries/${MACHINE_ID}-0-rescue.conf" + + ret=0 + + case "$COMMAND" in + add) +- for i in "/boot/loader/entries/${MACHINE_ID}-0-rescue.conf"; do +- [[ -f $i ]] && exit 0 +- done ++ [[ -f "$LOADER_ENTRY" ]] && exit 0 + + # source our config dir + for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do diff --git a/0136-integrity-ima-policy-load.sh-s-echo-n-printf.patch b/0136-integrity-ima-policy-load.sh-s-echo-n-printf.patch new file mode 100644 index 0000000..5422925 --- /dev/null +++ b/0136-integrity-ima-policy-load.sh-s-echo-n-printf.patch @@ -0,0 +1,22 @@ +From fc44fdb5ac0bf73377439a9ea1458f235033f3ea Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 20 Oct 2016 13:58:25 +0200 +Subject: [PATCH] integrity/ima-policy-load.sh: s/echo -n/printf + +--- + modules.d/98integrity/ima-policy-load.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/98integrity/ima-policy-load.sh b/modules.d/98integrity/ima-policy-load.sh +index 5460d02..85cd3b9 100755 +--- a/modules.d/98integrity/ima-policy-load.sh ++++ b/modules.d/98integrity/ima-policy-load.sh +@@ -30,7 +30,7 @@ load_ima_policy() + # check the existence of the IMA policy file + [ -f "${IMAPOLICYPATH}" ] && { + info "Loading the provided IMA custom policy"; +- echo -n "${IMAPOLICYPATH}" > ${IMASECDIR}/policy || \ ++ printf '%s' "${IMAPOLICYPATH}" > ${IMASECDIR}/policy || \ + cat "${IMAPOLICYPATH}" > ${IMASECDIR}/policy + } + diff --git a/0137-test-test-rhel-7.2.rpms.patch b/0137-test-test-rhel-7.2.rpms.patch new file mode 100644 index 0000000..c1e6263 --- /dev/null +++ b/0137-test-test-rhel-7.2.rpms.patch @@ -0,0 +1,29 @@ +From ddfcfdf1992c22af8336950b44e594592b34d6c9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 20 Oct 2016 13:58:53 +0200 +Subject: [PATCH] test/test-rhel-7.2.rpms + +list of rpms to install to run the testsuite on rhel-7.2 +--- + test/test-rhel-7.2.rpms | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + create mode 100644 test/test-rhel-7.2.rpms + +diff --git a/test/test-rhel-7.2.rpms b/test/test-rhel-7.2.rpms +new file mode 100644 +index 0000000..edec0cc +--- /dev/null ++++ b/test/test-rhel-7.2.rpms +@@ -0,0 +1,12 @@ ++dash ++bridge-utils ++asciidoc ++mdadm ++lvm2 ++cryptsetup ++nfs-utils ++nbd ++dhcp-server ++scsi-target-utils ++iscsi-initiator-utils ++ diff --git a/0138-add-README.md.patch b/0138-add-README.md.patch new file mode 100644 index 0000000..0b9b37c --- /dev/null +++ b/0138-add-README.md.patch @@ -0,0 +1,21 @@ +From 4a7b55ee7e5c4e8ba650915fc81c48ae317a5dec Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 20 Oct 2016 14:46:40 +0200 +Subject: [PATCH] add README.md + +--- + README.md | 5 +++++ + 1 file changed, 5 insertions(+) + create mode 100644 README.md + +diff --git a/README.md b/README.md +new file mode 100644 +index 0000000..ebc15fe +--- /dev/null ++++ b/README.md +@@ -0,0 +1,5 @@ ++# dracut ++------ ++dracut is an initramfs infrastructure. ++ ++CentOS CI Status: [![Build Status](https://ci.centos.org/buildStatus/icon?job=dracut-pr-build)](https://ci.centos.org/job/dracut-pr-build/) diff --git a/0139-README.md-update.patch b/0139-README.md-update.patch new file mode 100644 index 0000000..2657f8c --- /dev/null +++ b/0139-README.md-update.patch @@ -0,0 +1,20 @@ +From 7e8f8ddbf872fc4283fce25260e6b99f7027cfe5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 20 Oct 2016 14:53:25 +0200 +Subject: [PATCH] README.md: update + +--- + README.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/README.md b/README.md +index ebc15fe..4c53f28 100644 +--- a/README.md ++++ b/README.md +@@ -1,5 +1,5 @@ + # dracut +------- ++ + dracut is an initramfs infrastructure. + + CentOS CI Status: [![Build Status](https://ci.centos.org/buildStatus/icon?job=dracut-pr-build)](https://ci.centos.org/job/dracut-pr-build/) diff --git a/0140-README.md-update.patch b/0140-README.md-update.patch new file mode 100644 index 0000000..1c4db34 --- /dev/null +++ b/0140-README.md-update.patch @@ -0,0 +1,19 @@ +From b8278a99abcefc0a02548e95ab7da2ed5355845b Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 20 Oct 2016 15:35:08 +0200 +Subject: [PATCH] README.md: update + +--- + README.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/README.md b/README.md +index 4c53f28..40b22de 100644 +--- a/README.md ++++ b/README.md +@@ -1,4 +1,4 @@ +-# dracut ++# dracut - master branch + + dracut is an initramfs infrastructure. + diff --git a/0141-dracut-install-preserve-extended-attributes-when-cop.patch b/0141-dracut-install-preserve-extended-attributes-when-cop.patch new file mode 100644 index 0000000..3146d84 --- /dev/null +++ b/0141-dracut-install-preserve-extended-attributes-when-cop.patch @@ -0,0 +1,51 @@ +From 61c761bc2c35fb244d46fbbde97161f5927071dc Mon Sep 17 00:00:00 2001 +From: Stefan Berger +Date: Tue, 25 Oct 2016 15:09:49 -0400 +Subject: [PATCH] dracut-install: preserve extended attributes when copying + files + +Preserve extended attributes when copying files using dracut-install. + +The copying of extended attributes avoids file execution denials when +the Linux Integrity Measurement's Appraisal mode is active. In that mode +executables need their file signatures copied. In particular, this patch +solves the problem that dependent libaries are not included in the +initramfs since the copied programs could not be executed due to missing +signatures. The following audit record shows the type of failure that +is now prevented: + +type=INTEGRITY_DATA msg=audit(1477409025.492:30065): pid=922 uid=0 + auid=4294967295 ses=4294967295 + subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 + op="appraise_data" cause="IMA-signature-required" + comm="ld-linux-x86-64" + name="/var/tmp/dracut.R6ySa4/initramfs/usr/bin/journalctl" + dev="dm-0" ino=37136 res=0 + +Signed-off-by: Stefan Berger +--- + install/dracut-install.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/install/dracut-install.c b/install/dracut-install.c +index fe30bba..c0f1c17 100644 +--- a/install/dracut-install.c ++++ b/install/dracut-install.c +@@ -294,7 +294,7 @@ static int cp(const char *src, const char *dst) + normal_copy: + pid = fork(); + if (pid == 0) { +- execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode,timestamps", "-fL", src, dst, ++ execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode,timestamps,xattr", "-fL", src, dst, + NULL); + _exit(EXIT_FAILURE); + } +@@ -302,7 +302,7 @@ static int cp(const char *src, const char *dst) + while (waitpid(pid, &ret, 0) < 0) { + if (errno != EINTR) { + ret = -1; +- log_error("Failed: cp --reflink=auto --sparse=auto --preserve=mode,timestamps -fL %s %s", src, ++ log_error("Failed: cp --reflink=auto --sparse=auto --preserve=mode,timestamps,xattr -fL %s %s", src, + dst); + break; + } diff --git a/0142-README-correct-github-URLs.patch b/0142-README-correct-github-URLs.patch new file mode 100644 index 0000000..bed2a7e --- /dev/null +++ b/0142-README-correct-github-URLs.patch @@ -0,0 +1,30 @@ +From ec44ed1d9d02d8be8d220074ecd68d32aa01047a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 26 Oct 2016 13:41:21 +0200 +Subject: [PATCH] README: correct github URLs + +--- + README | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/README b/README +index b07bbb7..c974c08 100644 +--- a/README ++++ b/README +@@ -62,14 +62,14 @@ Git: + http://git.kernel.org/pub/scm/boot/dracut/dracut.git + https://git.kernel.org/pub/scm/boot/dracut/dracut.git + +- git://github.com/haraldh/dracut.git ++ git@github.com:dracutdevs/dracut.git + + git://dracut.git.sourceforge.net/gitroot/dracut/dracut + + Git Web: + http://git.kernel.org/?p=boot/dracut/dracut.git + +- https://haraldh@github.com/haraldh/dracut.git ++ https://github.com/dracutdevs/dracut.git + + http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut + diff --git a/0143-dracut.8-document-INITRD_COMPRESS-environment-variab.patch b/0143-dracut.8-document-INITRD_COMPRESS-environment-variab.patch new file mode 100644 index 0000000..c1900b7 --- /dev/null +++ b/0143-dracut.8-document-INITRD_COMPRESS-environment-variab.patch @@ -0,0 +1,35 @@ +From bd98b884475e66a6a92a8efa0fed1b37576f4366 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 2 Nov 2016 13:49:17 +0100 +Subject: [PATCH] dracut.8: document INITRD_COMPRESS environment variable + +https://bugzilla.redhat.com/show_bug.cgi?id=1389775 +--- + dracut.8.asc | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/dracut.8.asc b/dracut.8.asc +index 3b80000..0e01707 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -434,6 +434,7 @@ will not be able to boot. + program with known-working arguments. If you pass a quoted string with + arguments, it will be called with exactly those arguments. Depending on what + you pass, this may result in an initramfs that the kernel cannot decompress. ++ The default value can also be set via the _INITRD_COMPRESS_ environment variable. + + **--no-compress**:: + Do not compress the generated initramfs. This will override any other +@@ -496,6 +497,12 @@ will not be able to boot. + Specifies the kernel image, which to include in the UEFI executable. The default is + _/lib/modules//vmlinuz_ or _/boot/vmlinuz-_ + ++ENVIRONMENT ++----------- ++ ++_INITRD_COMPRESS_:: ++ sets the default compression program. See **--compress**. ++ + FILES + ----- + _/var/log/dracut.log_:: diff --git a/0144-README.md-remove-CI-badge.patch b/0144-README.md-remove-CI-badge.patch new file mode 100644 index 0000000..7f8dee2 --- /dev/null +++ b/0144-README.md-remove-CI-badge.patch @@ -0,0 +1,18 @@ +From 2afd60baa6aa5e8d64d24e7e3dd4f9e316520b0d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 3 Nov 2016 14:48:31 +0100 +Subject: [PATCH] README.md: remove CI badge + +--- + README.md | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/README.md b/README.md +index 40b22de..27ad3ea 100644 +--- a/README.md ++++ b/README.md +@@ -2,4 +2,3 @@ + + dracut is an initramfs infrastructure. + +-CentOS CI Status: [![Build Status](https://ci.centos.org/buildStatus/icon?job=dracut-pr-build)](https://ci.centos.org/job/dracut-pr-build/) diff --git a/0145-README-update.patch b/0145-README-update.patch new file mode 100644 index 0000000..d6452ee --- /dev/null +++ b/0145-README-update.patch @@ -0,0 +1,61 @@ +From e7f52635d91df59574700f2b991b2032a6bec116 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 3 Nov 2016 14:54:45 +0100 +Subject: [PATCH] README: update + +remove "new" and reword the first paragraphs + +remove sourceforge repo links +--- + README | 20 +++++++------------- + 1 file changed, 7 insertions(+), 13 deletions(-) + +diff --git a/README b/README +index c974c08..ff374af 100644 +--- a/README ++++ b/README +@@ -1,9 +1,10 @@ + dracut + ------ +-dracut is a new initramfs infrastructure. ++dracut is an event driven initramfs infrastructure. + +-Information about the initial goals and aims can be found at +-https://fedoraproject.org/wiki/Initrdrewrite ++dracut (the tool) is used to create an initramfs image by copying tools ++and files from an installed system and combining it with the ++dracut framework, usually found in /usr/lib/dracut/modules.d. + + Unlike existing initramfs's, this is an attempt at having as little as + possible hard-coded into the initramfs as possible. The initramfs has +@@ -51,7 +52,7 @@ possible. Every distribution has their own tool here and it's not + something which is really interesting to have separate across them. + So contributions to help decrease the distro-dependencies are welcome. + +-Currently dracut lives on kernel.org. ++Currently dracut lives on github.com and kernel.org. + + The tarballs can be found here: + http://www.kernel.org/pub/linux/utils/boot/dracut/ +@@ -64,19 +65,12 @@ Git: + + git@github.com:dracutdevs/dracut.git + +- git://dracut.git.sourceforge.net/gitroot/dracut/dracut +- + Git Web: +- http://git.kernel.org/?p=boot/dracut/dracut.git +- + https://github.com/dracutdevs/dracut.git + +- http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut +- +-Git Web RSS Feed: +- http://git.kernel.org/?p=boot/dracut/dracut.git;a=rss ++ http://git.kernel.org/?p=boot/dracut/dracut.git + +-Project Page: ++Project Documentation: + http://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html + + Project Wiki: diff --git a/0146-TODO-remove-some-items.patch b/0146-TODO-remove-some-items.patch new file mode 100644 index 0000000..7187754 --- /dev/null +++ b/0146-TODO-remove-some-items.patch @@ -0,0 +1,25 @@ +From ca31a7e368f839bc96fc8170c5454d8dc63f74e8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 3 Nov 2016 15:05:36 +0100 +Subject: [PATCH] TODO: remove some items + +--- + TODO | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/TODO b/TODO +index 55fe13b..f4fc208 100644 +--- a/TODO ++++ b/TODO +@@ -18,11 +18,8 @@ INITRAMFS TODO + - put mount hook in main initqueue loop / careful about resume! + - the hard-coded list of udev rules that we care about is kind of lame. + - panic fallback +-- bridging/bonding without "netroot=" https://bugzilla.redhat.com/show_bug.cgi?id=822750 + - progress indication for fsck https://bugzilla.redhat.com/show_bug.cgi?id=827118 + - domain, searchdomain https://bugzilla.redhat.com/show_bug.cgi?id=840778 +-- disable write-ifcfg https://bugzilla.redhat.com/show_bug.cgi?id=840784 +-- check for /var to be mounted in convertfs https://bugzilla.redhat.com/show_bug.cgi?id=848172 + - probably fix "--include" https://bugzilla.redhat.com/show_bug.cgi?id=849338 + + GENERATOR TODO diff --git a/0147-50-dracut.install-use-bin-bash-shebang.patch b/0147-50-dracut.install-use-bin-bash-shebang.patch new file mode 100644 index 0000000..cf1ac10 --- /dev/null +++ b/0147-50-dracut.install-use-bin-bash-shebang.patch @@ -0,0 +1,20 @@ +From 69395a528aed99ec04b16c14ebacf4c2e10afd26 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Fri, 4 Nov 2016 13:09:28 -0400 +Subject: [PATCH] 50-dracut.install: use /bin/bash shebang + +This script utilizes several bash-specific constructs. +--- + 50-dracut.install | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/50-dracut.install b/50-dracut.install +index 7d081d5..54c71d4 100755 +--- a/50-dracut.install ++++ b/50-dracut.install +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + + COMMAND="$1" + KERNEL_VERSION="$2" diff --git a/0148-dracut.sh-create-the-initramfs-non-world-readable-al.patch b/0148-dracut.sh-create-the-initramfs-non-world-readable-al.patch new file mode 100644 index 0000000..7ae6553 --- /dev/null +++ b/0148-dracut.sh-create-the-initramfs-non-world-readable-al.patch @@ -0,0 +1,27 @@ +From 0db98910a11c12a454eac4c8e86dc7a7bbc764a4 Mon Sep 17 00:00:00 2001 +From: Andreas Stieger +Date: Mon, 7 Nov 2016 10:37:22 +0100 +Subject: [PATCH] dracut.sh: create the initramfs non-world readable also if + early cpio is used + +Fixes: 5f2c30d9bcd614d546d5c55c6897e33f88b9ab90 +Previously fixed CVE-2012-4453: e1b48995c26c4f06d1a718539cb1bd5b0179af91 + +Signed-off-by: Andreas Stieger +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 40ca08f..2d79bbc 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1700,7 +1700,7 @@ if [[ $create_early_cpio = yes ]]; then + + # The microcode blob is _before_ the initramfs blob, not after + if ! ( +- cd "$early_cpio_dir/d" ++ umask 077; cd "$early_cpio_dir/d" + find . -print0 | sort -z \ + | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null $cpio_owner_root -H newc -o --quiet > "${DRACUT_TMPDIR}/initramfs.img" + ); then diff --git a/0149-NEWS-update-for-045.patch b/0149-NEWS-update-for-045.patch new file mode 100644 index 0000000..97cce0e --- /dev/null +++ b/0149-NEWS-update-for-045.patch @@ -0,0 +1,54 @@ +From 597b1592485d1956b75cb39c285a35385c8a3fea Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 7 Nov 2016 11:01:36 +0100 +Subject: [PATCH] NEWS: update for 045 + +--- + NEWS | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/NEWS b/NEWS +index 1ec8881..6f68de8 100644 +--- a/NEWS ++++ b/NEWS +@@ -23,7 +23,7 @@ dracut-install: + --silent + --kerneldir + --firmwaredirs +- ++ + lsinitrd: + - new option "--unpack" + - new option "--unpackearly" +@@ -33,6 +33,8 @@ general initramfs fixes: + - don't remove 99-cmdline-ask on 'hostonly' cleanup + - call dracut-cmdline-ask.service, if /etc/cmdline.d/*.conf exists + - break at switch_root only for bare rd.break ++- add rd.emergency=[reboot|poweroff|halt] ++ specifies what action to execute in case of a critical failure + + dmsquash-live: + - fixed livenet-generator execution flag +@@ -55,9 +57,11 @@ kernel-modules: + systemd: + - add /etc/machine-info + - fixed systemd-escape call for names beginning with "-" ++- install missing drop-in configuration files for ++ /etc/systemd/{journal.conf,system.conf} + + filesystems: +-- add support to F2FS filesystem (fsck) ++- add support to F2FS filesystem (fsck and modules) + + network: + - fix carrier detection +@@ -67,6 +71,9 @@ network: + - add mtu to list of variables to store in override + - for rd.neednet=0 a bootdev is not needed anymore + - dhclient-script.sh: add classless-static-routes support ++- support for iBFT IPv6 ++- support macaddr in brackets [] (commit 740c46c0224a187d6b5a42b4aa56e173238884cc) ++- use arping2, if available + + nbd: + - add systemd generator diff --git a/0150-Use-versioned-Obsoletes.patch b/0150-Use-versioned-Obsoletes.patch new file mode 100644 index 0000000..a9682b6 --- /dev/null +++ b/0150-Use-versioned-Obsoletes.patch @@ -0,0 +1,74 @@ +From 4dbb4dc5bce6617824c38b2adc251b1add27d017 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 7 Nov 2016 11:10:12 +0100 +Subject: [PATCH] Use versioned Obsoletes + +Also change <= N to < N+1. For example, dracut-029-1 > dracut-029, so would not +get obsoleted properly. This all applies to old versions, so doesn't make much +difference in practice, so just fix it to avoid c&p duplication of the bad +pattern in the future. +--- + dracut.spec | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/dracut.spec b/dracut.spec +index 7b9d675..0515006 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -33,7 +33,7 @@ License: GPLv2+ and LGPLv2+ + URL: https://dracut.wiki.kernel.org/ + + # Source can be generated by +-# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz ++# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%%{version};sf=tgz + Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz + Source1: https://www.gnu.org/licenses/lgpl-2.1.txt + +@@ -68,10 +68,10 @@ BuildRequires: asciidoc + %if 0%{?fedora} > 12 || 0%{?rhel} + # no "provides", because dracut does not offer + # all functionality of the obsoleted packages +-Obsoletes: mkinitrd <= 6.0.93 +-Obsoletes: mkinitrd-devel <= 6.0.93 +-Obsoletes: nash <= 6.0.93 +-Obsoletes: libbdevid-python <= 6.0.93 ++Obsoletes: mkinitrd < 6.0.94 ++Obsoletes: mkinitrd-devel < 6.0.94 ++Obsoletes: nash < 6.0.94 ++Obsoletes: libbdevid-python < 6.0.94 + %endif + + %if 0%{?fedora} > 16 || 0%{?rhel} > 6 +@@ -86,9 +86,9 @@ Provides: mkinitrd = 2.6.1 + Obsoletes: dracut-kernel < 005 + Provides: dracut-kernel = %{version}-%{release} + +-Obsoletes: dracut <= 029 +-Obsoletes: dracut-norescue +-Provides: dracut-norescue ++Obsoletes: dracut < 030 ++Obsoletes: dracut-norescue < 030 ++Provides: dracut-norescue = %{version}-%{release} + + Requires: bash >= 4 + Requires: coreutils +@@ -195,8 +195,8 @@ initramfs with dracut, with live image capabilities, like Live CDs. + %package config-generic + Summary: dracut configuration to turn off hostonly image generation + Requires: %{name} = %{version}-%{release} +-Obsoletes: dracut-nohostonly +-Provides: dracut-nohostonly ++Obsoletes: dracut-nohostonly < 030 ++Provides: dracut-nohostonly = %{version}-%{release} + + %description config-generic + This package provides the configuration to turn off the host specific initramfs +@@ -205,7 +205,7 @@ generation with dracut and generates a generic image by default. + %package config-rescue + Summary: dracut configuration to turn on rescue image generation + Requires: %{name} = %{version}-%{release} +-Obsoletes: dracut <= 029 ++Obsoletes: dracut < 030 + + %description config-rescue + This package provides the configuration to turn on the rescue initramfs diff --git a/0151-Makefile-create-rpms-in-DESTDIR-for-target-rpm.patch b/0151-Makefile-create-rpms-in-DESTDIR-for-target-rpm.patch new file mode 100644 index 0000000..b02bff1 --- /dev/null +++ b/0151-Makefile-create-rpms-in-DESTDIR-for-target-rpm.patch @@ -0,0 +1,22 @@ +From 5d274f93654f85b9c52aae02e733f901ff69b97f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 7 Nov 2016 13:14:49 +0100 +Subject: [PATCH] Makefile: create rpms in DESTDIR for target rpm + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index d28e4cf..4cab7d5 100644 +--- a/Makefile ++++ b/Makefile +@@ -211,7 +211,7 @@ rpm: dracut-$(VERSION).tar.xz syncheck + rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \ + --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \ + --define "_rpmdir $$PWD" -ba dracut.spec; ) && \ +- ( mv "$$rpmbuild"/$$(arch)/*.rpm .; mv "$$rpmbuild"/*.src.rpm .;rm -fr -- "$$rpmbuild"; ls *.rpm ) ++ ( mv "$$rpmbuild"/$$(arch)/*.rpm $(DESTDIR)/.; mv "$$rpmbuild"/*.src.rpm $(DESTDIR)/.;rm -fr -- "$$rpmbuild"; ls $(DESTDIR)/*.rpm ) + + syncheck: + @ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \ diff --git a/0152-TEST-99-RPM-create-dracut-rpms-to-install-first.patch b/0152-TEST-99-RPM-create-dracut-rpms-to-install-first.patch new file mode 100644 index 0000000..5bf9955 --- /dev/null +++ b/0152-TEST-99-RPM-create-dracut-rpms-to-install-first.patch @@ -0,0 +1,27 @@ +From 2811e4ed22cb9117b7f6c221fcfe7ffb5f7e7fa2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 7 Nov 2016 13:15:56 +0100 +Subject: [PATCH] TEST-99-RPM: create dracut rpms to install first + +create rpms in TESTDIR first +--- + test/TEST-99-RPM/test.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index 31520f1..04bf0bc 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -83,10 +83,12 @@ EOF + } + + test_setup() { ++ make -C "$basedir" DESTDIR="$TESTDIR" rpm + return 0 + } + + test_cleanup() { ++ rm -fr -- "$TESTDIR"/*.rpm + return 0 + } + diff --git a/0153-TEST-99-RPM-add-test_check-for-rpm-dnf-yum.patch b/0153-TEST-99-RPM-add-test_check-for-rpm-dnf-yum.patch new file mode 100644 index 0000000..a32ab91 --- /dev/null +++ b/0153-TEST-99-RPM-add-test_check-for-rpm-dnf-yum.patch @@ -0,0 +1,25 @@ +From e22e04ae151c5aa806fc44de8294292c1df2429f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 7 Nov 2016 13:20:35 +0100 +Subject: [PATCH] TEST-99-RPM: add test_check() for rpm,dnf,yum + +--- + test/TEST-99-RPM/test.sh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index 04bf0bc..23fa72c 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -1,7 +1,10 @@ + #!/bin/bash + + TEST_DESCRIPTION="rpm integrity after dracut and kernel install" +-$TESTDIR ++ ++test_check() { ++ command -v rpm &>/dev/null && ( command -v yum || command -v dnf ) &>/dev/null ++} + + test_run() { + set -x diff --git a/0154-TEST-30-ISCSI-fixed-dhcpd.conf-and-disabled-nowait.patch b/0154-TEST-30-ISCSI-fixed-dhcpd.conf-and-disabled-nowait.patch new file mode 100644 index 0000000..c98ca57 --- /dev/null +++ b/0154-TEST-30-ISCSI-fixed-dhcpd.conf-and-disabled-nowait.patch @@ -0,0 +1,72 @@ +From 86f0904004540b63664b2707ad782d788b2112e4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 7 Nov 2016 13:23:39 +0100 +Subject: [PATCH] TEST-30-ISCSI: fixed dhcpd.conf and disabled nowait + +--- + test/TEST-30-ISCSI/dhcpd.conf | 23 +++++++++++++++++++++++ + test/TEST-30-ISCSI/test.sh | 20 ++++++++++---------- + 2 files changed, 33 insertions(+), 10 deletions(-) + +diff --git a/test/TEST-30-ISCSI/dhcpd.conf b/test/TEST-30-ISCSI/dhcpd.conf +index 22c1790..5fa1c15 100644 +--- a/test/TEST-30-ISCSI/dhcpd.conf ++++ b/test/TEST-30-ISCSI/dhcpd.conf +@@ -23,3 +23,26 @@ subnet 192.168.50.0 netmask 255.255.255.0 { + } + } + } ++ ++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"; ++ ++ # MAC numbering scheme: ++ # NFSv3: last octect starts at 0x00 and works up ++ ++ group { ++ option root-path "iscsi:192.168.51.1:::1:iqn.2009-06.dracut:target1"; ++ ++ host iscsi-2 { ++ hardware ethernet 52:54:00:12:34:01; ++ fixed-address 192.168.51.101; ++ } ++ ++ } ++} +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index c5315bb..85ce29e 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -87,16 +87,16 @@ do_test_run() { + "rd.iscsi.initiator=$initiator" \ + || return 1 + +- run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \ +- "root=LABEL=sysroot" \ +- "ip=192.168.50.101:::255.255.255.0::ens3:off" \ +- "ip=192.168.51.101:::255.255.255.0::ens4:off" \ +- "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ +- "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ +- "rd.iscsi.firmware" \ +- "rd.iscsi.initiator=$initiator" \ +- "rd.iscsi.waitnet=0" \ +- || return 1 ++# run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \ ++# "root=LABEL=sysroot" \ ++# "ip=192.168.50.101:::255.255.255.0::ens3:off" \ ++# "ip=192.168.51.101:::255.255.255.0::ens4:off" \ ++# "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ ++# "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ ++# "rd.iscsi.firmware" \ ++# "rd.iscsi.initiator=$initiator" \ ++# "rd.iscsi.waitnet=0" \ ++# || return 1 + + run_client "FAILME: netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ + "root=LABEL=sysroot" \ diff --git a/0155-TEST-99-RPM-actually-use-the-generated-rpms-with-dnf.patch b/0155-TEST-99-RPM-actually-use-the-generated-rpms-with-dnf.patch new file mode 100644 index 0000000..fb18b98 --- /dev/null +++ b/0155-TEST-99-RPM-actually-use-the-generated-rpms-with-dnf.patch @@ -0,0 +1,24 @@ +From 44766d1f1f1f2f1bbbd628b76254fa08c1abbf06 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 7 Nov 2016 17:05:28 +0100 +Subject: [PATCH] TEST-99-RPM: actually use the generated rpms with dnf + +--- + test/TEST-99-RPM/test.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index 23fa72c..6c71e13 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -38,8 +38,8 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou + mdadm \ + bash \ + iscsi-initiator-utils \ +- $basedir/dracut-[0-9]*.$(arch).rpm \ +- $basedir/dracut-network-[0-9]*.$(arch).rpm ++ "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ ++ "$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm + + cat >"$rootdir"/test.sh < +Date: Mon, 7 Nov 2016 17:20:18 +0100 +Subject: [PATCH] TEST-99-RPM: set release version and disable update-testing + repo + +--- + test/TEST-99-RPM/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index 6c71e13..9e52b72 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -26,7 +26,7 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou + + dnf_or_yum=yum + command -v dnf >/dev/null && dnf_or_yum=dnf +- $dnf_or_yum --nogpgcheck --installroot "$rootdir"/ install --allowerasing -y \ ++ $dnf_or_yum --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo=updates-testing install --allowerasing -y \ + $dnf_or_yum \ + passwd \ + rootfiles \ diff --git a/0157-README.testsuite-add-more-requirements.patch b/0157-README.testsuite-add-more-requirements.patch new file mode 100644 index 0000000..c957823 --- /dev/null +++ b/0157-README.testsuite-add-more-requirements.patch @@ -0,0 +1,39 @@ +From caa6d12fd7cce4704916c29c557bbb1bb592e024 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 7 Nov 2016 17:20:43 +0100 +Subject: [PATCH] README.testsuite: add more requirements + +--- + README.testsuite | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/README.testsuite b/README.testsuite +index f9f60d4..127e302 100644 +--- a/README.testsuite ++++ b/README.testsuite +@@ -9,8 +9,23 @@ nfs-utils \ + nbd \ + dhcp-server \ + scsi-target-utils \ +-iscsi-initiator-utils +- ++iscsi-initiator-utils \ ++net-tools \ ++strace \ ++syslinux \ ++python-imgcreate \ ++genisoimage \ ++btrfs-progs \ ++bridge-utils \ ++kmod-devel \ ++gcc \ ++bzip2 \ ++xz \ ++tar \ ++wget \ ++rpm-build \ ++dash \ ++${NULL} + + TEST-04-FULL-SYSTEMD: systemd >= 187 + diff --git a/0158-TEST-30-ISCSI-give-server-more-time-for-the-head-sta.patch b/0158-TEST-30-ISCSI-give-server-more-time-for-the-head-sta.patch new file mode 100644 index 0000000..90ba735 --- /dev/null +++ b/0158-TEST-30-ISCSI-give-server-more-time-for-the-head-sta.patch @@ -0,0 +1,24 @@ +From 93d7b95ad43696fb8988339765cedc88a0890746 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 7 Nov 2016 17:22:08 +0100 +Subject: [PATCH] TEST-30-ISCSI: give server more time for the head start + +--- + test/TEST-30-ISCSI/test.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index 85ce29e..53ac5c7 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -34,8 +34,8 @@ run_server() { + # Cleanup the terminal if we have one + tty -s && stty sane + +- echo Sleeping 10 seconds to give the server a head start +- sleep 10 ++ echo Sleeping 20 seconds to give the server a head start ++ sleep 20 + } + + run_client() { diff --git a/0159-Makefile-fixed-DESTDIR-in-rpm-target.patch b/0159-Makefile-fixed-DESTDIR-in-rpm-target.patch new file mode 100644 index 0000000..f99cae7 --- /dev/null +++ b/0159-Makefile-fixed-DESTDIR-in-rpm-target.patch @@ -0,0 +1,22 @@ +From 6ee83a0bd102dd38635140149bd20e72b1c3c4a7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 7 Nov 2016 17:52:09 +0100 +Subject: [PATCH] Makefile: fixed DESTDIR in rpm target + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 4cab7d5..c5afc1a 100644 +--- a/Makefile ++++ b/Makefile +@@ -211,7 +211,7 @@ rpm: dracut-$(VERSION).tar.xz syncheck + rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \ + --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \ + --define "_rpmdir $$PWD" -ba dracut.spec; ) && \ +- ( mv "$$rpmbuild"/$$(arch)/*.rpm $(DESTDIR)/.; mv "$$rpmbuild"/*.src.rpm $(DESTDIR)/.;rm -fr -- "$$rpmbuild"; ls $(DESTDIR)/*.rpm ) ++ ( mv "$$rpmbuild"/$$(arch)/*.rpm $(DESTDIR).; mv "$$rpmbuild"/*.src.rpm $(DESTDIR).;rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm ) + + syncheck: + @ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \ diff --git a/0160-TEST-99-RPM-append-to-DESTDIR.patch b/0160-TEST-99-RPM-append-to-DESTDIR.patch new file mode 100644 index 0000000..b198388 --- /dev/null +++ b/0160-TEST-99-RPM-append-to-DESTDIR.patch @@ -0,0 +1,22 @@ +From 924a669a1bcb46a9090231269270b9f2f0a6daa6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 7 Nov 2016 17:52:52 +0100 +Subject: [PATCH] TEST-99-RPM: append "/" to DESTDIR + +--- + test/TEST-99-RPM/test.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index 9e52b72..0e3a1a6 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -86,7 +86,7 @@ EOF + } + + test_setup() { +- make -C "$basedir" DESTDIR="$TESTDIR" rpm ++ make -C "$basedir" DESTDIR="$TESTDIR/" rpm + return 0 + } + diff --git a/0161-README.testsuite-add-dmraid.patch b/0161-README.testsuite-add-dmraid.patch new file mode 100644 index 0000000..cd4cfe2 --- /dev/null +++ b/0161-README.testsuite-add-dmraid.patch @@ -0,0 +1,29 @@ +From 0eb7a7c4798b34e42e82ba9ec6a2d0431a97d13a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 10 Nov 2016 10:56:06 +0100 +Subject: [PATCH] README.testsuite: add dmraid + +--- + README.testsuite | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/README.testsuite b/README.testsuite +index 127e302..dc08df3 100644 +--- a/README.testsuite ++++ b/README.testsuite +@@ -4,6 +4,7 @@ bridge-utils \ + asciidoc \ + mdadm \ + lvm2 \ ++dmraid \ + cryptsetup \ + nfs-utils \ + nbd \ +@@ -24,7 +25,6 @@ xz \ + tar \ + wget \ + rpm-build \ +-dash \ + ${NULL} + + TEST-04-FULL-SYSTEMD: systemd >= 187 diff --git a/0162-network-Try-to-load-xennet.patch b/0162-network-Try-to-load-xennet.patch new file mode 100644 index 0000000..8164503 --- /dev/null +++ b/0162-network-Try-to-load-xennet.patch @@ -0,0 +1,27 @@ +From b1a39dbcc28ce7673bd5c391c12680736910690a Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Fri, 19 Sep 2014 15:34:54 +0200 +Subject: [PATCH] network: Try to load xennet + +This makes dracut boot from NFS in a xen instance. + +bnc#896464, bnc#896259 + +Signed-off-by: Thomas Renninger +--- + modules.d/90kernel-network-modules/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-network-modules/module-setup.sh b/modules.d/90kernel-network-modules/module-setup.sh +index 11fbab9..16ed3a7 100755 +--- a/modules.d/90kernel-network-modules/module-setup.sh ++++ b/modules.d/90kernel-network-modules/module-setup.sh +@@ -28,7 +28,7 @@ installkernel() { + =drivers/net/phy \ + =drivers/net/team \ + =drivers/net/ethernet \ +- ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net ++ ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net xennet + hostonly="" instmods iscsi_ibft crc32c iscsi_boot_sysfs + } + diff --git a/0163-dracut.spec-add-systemd-udev-requirement.patch b/0163-dracut.spec-add-systemd-udev-requirement.patch new file mode 100644 index 0000000..99c0ca3 --- /dev/null +++ b/0163-dracut.spec-add-systemd-udev-requirement.patch @@ -0,0 +1,21 @@ +From e80ac43710440ef87829a2f6736acb421aad8493 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 11 Nov 2016 16:04:09 +0100 +Subject: [PATCH] dracut.spec: add systemd-udev requirement + +--- + dracut.spec | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.spec b/dracut.spec +index 0515006..d4566cf 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -115,6 +115,7 @@ Requires: kpartx + %if 0%{?fedora} || 0%{?rhel} > 6 + Requires: util-linux >= 2.21 + Requires: systemd >= 219 ++Requires: systemd-udev >= 219 + Requires: procps-ng + Conflicts: grubby < 8.23 + Conflicts: initscripts < 8.63-1 diff --git a/0164-test-TEST-99-RPM-speedup-test.patch b/0164-test-TEST-99-RPM-speedup-test.patch new file mode 100644 index 0000000..4627fd5 --- /dev/null +++ b/0164-test-TEST-99-RPM-speedup-test.patch @@ -0,0 +1,88 @@ +From eac751f1e0493b5736ff84ef0ca64017545f24bf Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 11 Nov 2016 16:04:31 +0100 +Subject: [PATCH] test/TEST-99-RPM: speedup test + +--- + test/TEST-99-RPM/finished-false.sh | 2 -- + test/TEST-99-RPM/test.sh | 32 +++++++++++++++++++++++--------- + 2 files changed, 23 insertions(+), 11 deletions(-) + delete mode 100755 test/TEST-99-RPM/finished-false.sh + +diff --git a/test/TEST-99-RPM/finished-false.sh b/test/TEST-99-RPM/finished-false.sh +deleted file mode 100755 +index ecdbef9..0000000 +--- a/test/TEST-99-RPM/finished-false.sh ++++ /dev/null +@@ -1,2 +0,0 @@ +-#!/bin/sh +-exit 1 +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index 0e3a1a6..1485278 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -16,6 +16,7 @@ test_run() { + mkdir -p "$rootdir/proc" + mkdir -p "$rootdir/sys" + mkdir -p "$rootdir/dev" ++ mkdir -p "$rootdir/boot" + + trap 'ret=$?; [[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit $ret;' EXIT + trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit 1;' SIGINT +@@ -24,26 +25,38 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou + mount --bind /sys "$rootdir/sys" + mount -t devtmpfs devtmpfs "$rootdir/dev" + ++ mkdir -p "$rootdir/$TESTDIR" ++ cp --reflink=auto -a \ ++ "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ ++ "$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ ++ "$rootdir/$TESTDIR/" ++ + dnf_or_yum=yum +- command -v dnf >/dev/null && dnf_or_yum=dnf +- $dnf_or_yum --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo=updates-testing install --allowerasing -y \ ++ dnf_or_yum_cmd=yum ++ command -v dnf >/dev/null && { dnf_or_yum="dnf"; dnf_or_yum_cmd="dnf --allowerasing"; } ++ $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo='*' \ ++ --enablerepo=fedora \ ++ install -y \ + $dnf_or_yum \ + passwd \ + rootfiles \ + systemd \ ++ systemd-udev \ + kernel \ +- fedora-release \ ++ kernel-core \ ++ redhat-release \ + device-mapper-multipath \ + lvm2 \ + mdadm \ +- bash \ +- iscsi-initiator-utils \ +- "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ +- "$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm ++ bash \ ++ iscsi-initiator-utils \ ++ "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ ++ "$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ ++ ${NULL} + + cat >"$rootdir"/test.sh < /test.output + find / -xdev -type f -not -path '/var/*' \ +@@ -61,7 +74,8 @@ find / -xdev -type f -not -path '/var/*' \ + -not -path '/dev/null' \ + -not -path "/boot/loader/entries/\$(cat /etc/machine-id)-*" \ + -not -path "/boot/\$(cat /etc/machine-id)/*" \ +- -exec rpm -qf '{}' ';' | \ ++ -not -path '/etc/openldap/certs/*' \ ++ -print0 | xargs -0 rpm -qf | \ + grep -F 'not owned' &>> /test.output || : + exit 0 + EOF diff --git a/0165-test-TEST-99-RPM-dnf-does-not-like-any-dracut-subpac.patch b/0165-test-TEST-99-RPM-dnf-does-not-like-any-dracut-subpac.patch new file mode 100644 index 0000000..71a7040 --- /dev/null +++ b/0165-test-TEST-99-RPM-dnf-does-not-like-any-dracut-subpac.patch @@ -0,0 +1,34 @@ +From e35d1451f59e35c8bb03172749c331426d65c22f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 11 Nov 2016 16:34:42 +0100 +Subject: [PATCH] test/TEST-99-RPM: dnf does not like any dracut subpackage + +--- + test/TEST-99-RPM/test.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index 1485278..345d524 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -35,7 +35,7 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou + dnf_or_yum_cmd=yum + command -v dnf >/dev/null && { dnf_or_yum="dnf"; dnf_or_yum_cmd="dnf --allowerasing"; } + $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo='*' \ +- --enablerepo=fedora \ ++ --enablerepo=fedora --enablerepo=updates \ + install -y \ + $dnf_or_yum \ + passwd \ +@@ -51,8 +51,10 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou + bash \ + iscsi-initiator-utils \ + "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ +- "$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ + ${NULL} ++ #"$TESTDIR"/dracut-config-rescue-[0-9]*.$(arch).rpm \ ++ #"$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ ++# ${NULL} + + cat >"$rootdir"/test.sh < +Date: Mon, 14 Nov 2016 12:27:11 +0100 +Subject: [PATCH] README.md: add CentOS badge + +--- + README.md | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/README.md b/README.md +index 27ad3ea..4040177 100644 +--- a/README.md ++++ b/README.md +@@ -2,3 +2,5 @@ + + dracut is an initramfs infrastructure. + ++CentOS CI: [![Build Status](https://ci.centos.org/job/dracut-matrix-master/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/) ++ diff --git a/0167-TEST-99-RPM-use-best-and-install-all-rpms.patch b/0167-TEST-99-RPM-use-best-and-install-all-rpms.patch new file mode 100644 index 0000000..8532a58 --- /dev/null +++ b/0167-TEST-99-RPM-use-best-and-install-all-rpms.patch @@ -0,0 +1,34 @@ +From f81806db208a55bc4a6b04eb89cabf062c79f3ef Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 14 Nov 2016 12:27:33 +0100 +Subject: [PATCH] TEST-99-RPM: use --best and install all rpms + +--- + test/TEST-99-RPM/test.sh | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index 345d524..f2efea0 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -36,6 +36,7 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou + command -v dnf >/dev/null && { dnf_or_yum="dnf"; dnf_or_yum_cmd="dnf --allowerasing"; } + $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo='*' \ + --enablerepo=fedora --enablerepo=updates \ ++ --best \ + install -y \ + $dnf_or_yum \ + passwd \ +@@ -50,11 +51,8 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou + mdadm \ + bash \ + iscsi-initiator-utils \ +- "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ ++ "$TESTDIR"/dracut-*.rpm \ + ${NULL} +- #"$TESTDIR"/dracut-config-rescue-[0-9]*.$(arch).rpm \ +- #"$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ +-# ${NULL} + + cat >"$rootdir"/test.sh < +Date: Mon, 14 Nov 2016 12:29:12 +0100 +Subject: [PATCH] Revert "TEST-99-RPM: use --best and install all rpms" + +This reverts commit f81806db208a55bc4a6b04eb89cabf062c79f3ef. +--- + test/TEST-99-RPM/test.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index f2efea0..345d524 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -36,7 +36,6 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou + command -v dnf >/dev/null && { dnf_or_yum="dnf"; dnf_or_yum_cmd="dnf --allowerasing"; } + $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo='*' \ + --enablerepo=fedora --enablerepo=updates \ +- --best \ + install -y \ + $dnf_or_yum \ + passwd \ +@@ -51,8 +50,11 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou + mdadm \ + bash \ + iscsi-initiator-utils \ +- "$TESTDIR"/dracut-*.rpm \ ++ "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ + ${NULL} ++ #"$TESTDIR"/dracut-config-rescue-[0-9]*.$(arch).rpm \ ++ #"$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ ++# ${NULL} + + cat >"$rootdir"/test.sh < +Date: Mon, 14 Nov 2016 12:30:52 +0100 +Subject: [PATCH] test/test-rhel-7.2.rpms: remove file + +--- + test/test-rhel-7.2.rpms | 12 ------------ + 1 file changed, 12 deletions(-) + delete mode 100644 test/test-rhel-7.2.rpms + +diff --git a/test/test-rhel-7.2.rpms b/test/test-rhel-7.2.rpms +deleted file mode 100644 +index edec0cc..0000000 +--- a/test/test-rhel-7.2.rpms ++++ /dev/null +@@ -1,12 +0,0 @@ +-dash +-bridge-utils +-asciidoc +-mdadm +-lvm2 +-cryptsetup +-nfs-utils +-nbd +-dhcp-server +-scsi-target-utils +-iscsi-initiator-utils +- diff --git a/0170-README.md-change-centosci-badge.patch b/0170-README.md-change-centosci-badge.patch new file mode 100644 index 0000000..e5c56c8 --- /dev/null +++ b/0170-README.md-change-centosci-badge.patch @@ -0,0 +1,20 @@ +From 43adba3a71353dd13b7dd2f62843e292b6113e74 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 14 Nov 2016 13:51:59 +0100 +Subject: [PATCH] README.md: change centosci badge + +--- + README.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/README.md b/README.md +index 4040177..781de62 100644 +--- a/README.md ++++ b/README.md +@@ -2,5 +2,5 @@ + + dracut is an initramfs infrastructure. + +-CentOS CI: [![Build Status](https://ci.centos.org/job/dracut-matrix-master/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/) ++CentOS CI: [![Build Status](https://ci.centos.org/job/dracut-push-master/badge/icon)](https://ci.centos.org/job/dracut-push-master/) + diff --git a/0171-testsuite-add-cpu-host-to-kvm-call.patch b/0171-testsuite-add-cpu-host-to-kvm-call.patch new file mode 100644 index 0000000..e788d05 --- /dev/null +++ b/0171-testsuite-add-cpu-host-to-kvm-call.patch @@ -0,0 +1,403 @@ +From dfb3db3dad1de3be8b1ff126af728d82b5a4087d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 14 Nov 2016 16:21:06 +0100 +Subject: [PATCH] testsuite: add "-cpu host" to kvm call + +--- + test/TEST-01-BASIC/test.sh | 4 ++-- + test/TEST-02-SYSTEMD/test.sh | 4 ++-- + test/TEST-03-USR-MOUNT/test.sh | 4 ++-- + test/TEST-04-FULL-SYSTEMD/test.sh | 4 ++-- + test/TEST-10-RAID/test.sh | 4 ++-- + test/TEST-11-LVM/test.sh | 4 ++-- + test/TEST-12-RAID-DEG/test.sh | 4 ++-- + test/TEST-13-ENC-RAID-LVM/test.sh | 8 ++++---- + test/TEST-14-IMSM/test.sh | 2 +- + test/TEST-15-BTRFSRAID/test.sh | 4 ++-- + test/TEST-16-DMSQUASH/test.sh | 4 ++-- + test/TEST-17-LVM-THIN/test.sh | 4 ++-- + test/TEST-20-NFS/test.sh | 4 ++-- + test/TEST-30-ISCSI/test.sh | 6 +++--- + test/TEST-40-NBD/test.sh | 6 +++--- + test/TEST-50-MULTINIC/test.sh | 4 ++-- + 16 files changed, 35 insertions(+), 35 deletions(-) + +diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh +index e74c673..fe0989d 100755 +--- a/test/TEST-01-BASIC/test.sh ++++ b/test/TEST-01-BASIC/test.sh +@@ -11,7 +11,7 @@ test_run() { + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ + -drive format=raw,index=1,media=disk,file=$TESTDIR/result \ +- -m 256M -smp 2 -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net none \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +@@ -80,7 +80,7 @@ test_setup() { + + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ +- -m 256M -smp 2 -nographic -net none \ ++ -m 256M -cpu host -smp 2 -nographic -net none \ + -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1 +diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh +index 9736278..0398509 100755 +--- a/test/TEST-02-SYSTEMD/test.sh ++++ b/test/TEST-02-SYSTEMD/test.sh +@@ -8,7 +8,7 @@ KVERSION="${KVERSION-$(uname -r)}" + test_run() { + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ +- -m 256M -smp 2 -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net none \ + -no-reboot \ + -append "panic=1 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 rd.shell=0 $DEBUGFAIL" \ +@@ -77,7 +77,7 @@ test_setup() { + + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ +- -m 256M -smp 2 -nographic -net none \ ++ -m 256M -cpu host -smp 2 -nographic -net none \ + -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1 +diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh +index c515613..68fe443 100755 +--- a/test/TEST-03-USR-MOUNT/test.sh ++++ b/test/TEST-03-USR-MOUNT/test.sh +@@ -18,7 +18,7 @@ client_run() { + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \ + -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ + -drive format=raw,index=2,media=disk,file=$TESTDIR/result \ +- -m 256M -smp 2 -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net none \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ +@@ -115,7 +115,7 @@ test_setup() { + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \ + -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ +- -m 256M -smp 2 -nographic -net none \ ++ -m 256M -cpu host -smp 2 -nographic -net none \ + -append "root=/dev/dracut/root rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs || return 1 +diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh +index 3baabb4..6ec4327 100755 +--- a/test/TEST-04-FULL-SYSTEMD/test.sh ++++ b/test/TEST-04-FULL-SYSTEMD/test.sh +@@ -20,7 +20,7 @@ client_run() { + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \ + -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ + -drive format=raw,index=2,media=disk,file=$TESTDIR/result \ +- -m 256M -smp 2 -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net none \ + -no-reboot \ + -append "panic=1 root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \ +@@ -252,7 +252,7 @@ EOF + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \ + -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ +- -m 256M -smp 2 -nographic -net none \ ++ -m 256M -cpu host -smp 2 -nographic -net none \ + -append "root=/dev/fakeroot rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs || return 1 +diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh +index 5324457..0338d18 100755 +--- a/test/TEST-10-RAID/test.sh ++++ b/test/TEST-10-RAID/test.sh +@@ -10,7 +10,7 @@ test_run() { + DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ +- -m 256M -smp 2 -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net none \ + -no-reboot \ + -append "panic=1 root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ +@@ -77,7 +77,7 @@ test_setup() { + # Invoke KVM and/or QEMU to actually create the target filesystem. + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ +- -m 256M -smp 2 -nographic -net none \ ++ -m 256M -cpu host -smp 2 -nographic -net none \ + -append "root=/dev/cannotreach rw rootfstype=ext2 console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + grep -F -m 1 -q dracut-root-block-created $DISKIMAGE || return 1 +diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh +index cf7d376..0091148 100755 +--- a/test/TEST-11-LVM/test.sh ++++ b/test/TEST-11-LVM/test.sh +@@ -9,7 +9,7 @@ KVERSION=${KVERSION-$(uname -r)} + test_run() { + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ +- -m 256M -smp 2 -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net none \ + -no-reboot \ + -append "panic=1 root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ +@@ -72,7 +72,7 @@ test_setup() { + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay + # Invoke KVM and/or QEMU to actually create the target filesystem. +- $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -smp 2 -nographic -net none \ ++ $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -cpu host -smp 2 -nographic -net none \ + -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 +diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh +index 4c313eb..269b3a2 100755 +--- a/test/TEST-12-RAID-DEG/test.sh ++++ b/test/TEST-12-RAID-DEG/test.sh +@@ -15,7 +15,7 @@ client_run() { + cp --sparse=always --reflink=auto $TESTDIR/disk3.img $TESTDIR/disk3.img.new + + $testdir/run-qemu \ +- -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -nographic -smp 2 \ ++ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -nographic -cpu host -smp 2 \ + -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2.img.new \ + -drive format=raw,index=3,media=disk,file=$TESTDIR/disk3.img.new \ + -net none \ +@@ -117,7 +117,7 @@ test_setup() { + -drive format=raw,index=1,media=disk,file=$TESTDIR/disk1.img \ + -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2.img \ + -drive format=raw,index=3,media=disk,file=$TESTDIR/disk3.img \ +- -m 256M -smp 2 -nographic -net none \ ++ -m 256M -cpu host -smp 2 -nographic -net none \ + -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + +diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh +index b8fd26e..1dd4179 100755 +--- a/test/TEST-13-ENC-RAID-LVM/test.sh ++++ b/test/TEST-13-ENC-RAID-LVM/test.sh +@@ -17,7 +17,7 @@ test_run() { + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ + -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ +- -m 256M -smp 2 -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net none \ + -no-reboot \ + -append "panic=1 root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \ +@@ -31,7 +31,7 @@ test_run() { + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ + -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ +- -m 256M -smp 2 -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net none \ + -no-reboot \ + -append "panic=1 root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ +@@ -45,7 +45,7 @@ test_run() { + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ + -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ +- -m 256M -smp 2 -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net none \ + -no-reboot \ + -append "panic=1 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" \ +@@ -111,7 +111,7 @@ test_setup() { + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay + # Invoke KVM and/or QEMU to actually create the target filesystem. +- $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -smp 2 -nographic -net none \ ++ $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -cpu host -smp 2 -nographic -net none \ + -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 +diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh +index f9f03b7..d5ce58e 100755 +--- a/test/TEST-14-IMSM/test.sh ++++ b/test/TEST-14-IMSM/test.sh +@@ -13,7 +13,7 @@ client_run() { + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ + -drive format=raw,index=1,media=disk,file=$TESTDIR/disk1 \ + -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2 \ +- -m 256M -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net none \ + -no-reboot \ + -append "panic=1 $* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \ +diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh +index adf31b1..d33f531 100755 +--- a/test/TEST-15-BTRFSRAID/test.sh ++++ b/test/TEST-15-BTRFSRAID/test.sh +@@ -9,7 +9,7 @@ test_run() { + DISKIMAGE=$TESTDIR/TEST-15-BTRFSRAID-root.img + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ +- -m 256M -smp 2 -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net none \ + -no-reboot \ + -append "panic=1 root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ +@@ -78,7 +78,7 @@ test_setup() { + # Invoke KVM and/or QEMU to actually create the target filesystem. + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ +- -m 256M -smp 2 -nographic -net none \ ++ -m 256M -cpu host -smp 2 -nographic -net none \ + -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + +diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh +index 876d910..71f3156 100755 +--- a/test/TEST-16-DMSQUASH/test.sh ++++ b/test/TEST-16-DMSQUASH/test.sh +@@ -19,7 +19,7 @@ test_run() { + -boot order=d \ + -drive format=raw,bps=1000000,index=0,media=disk,file="$TESTDIR"/livecd.iso \ + -drive format=raw,index=1,media=disk,file="$TESTDIR"/root.img \ +- -m 256M -smp 2 \ ++ -m 256M -cpu host -smp 2 \ + -nographic \ + -net none \ + -no-reboot \ +@@ -30,7 +30,7 @@ test_run() { + # "$testdir"/run-qemu \ + # -drive format=raw,bps=1000000,index=0,media=disk,file="$TESTDIR"/livecd.iso \ + # -drive format=raw,index=1,media=disk,file="$TESTDIR"/root.img \ +- # -m 256M -smp 2 \ ++ # -m 256M -cpu host -smp 2 \ + # -net none \ + # -append "root=live:CDLABEL=LiveCD live quiet rhgb selinux=0 rd.live.check" \ + # -initrd "$TESTDIR"/initramfs.testing +diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh +index 1ad9ba6..c375fa2 100755 +--- a/test/TEST-17-LVM-THIN/test.sh ++++ b/test/TEST-17-LVM-THIN/test.sh +@@ -9,7 +9,7 @@ KVERSION=${KVERSION-$(uname -r)} + test_run() { + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ +- -m 256M -smp 2 -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net none \ + -no-reboot \ + -append "panic=1 root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ +@@ -72,7 +72,7 @@ test_setup() { + -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 + rm -rf -- $TESTDIR/overlay + # Invoke KVM and/or QEMU to actually create the target filesystem. +- $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -smp 2 -nographic -net none \ ++ $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -cpu host -smp 2 -nographic -net none \ + -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 +diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh +index 039fb61..66e5e3e 100755 +--- a/test/TEST-20-NFS/test.sh ++++ b/test/TEST-20-NFS/test.sh +@@ -14,7 +14,7 @@ run_server() { + fsck -a $TESTDIR/server.ext3 || return 1 + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/server.ext3 \ +- -m 256M -smp 2 \ ++ -m 256M -cpu host -smp 2 \ + -display none \ + -net socket,listen=127.0.0.1:12320 \ + -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ +@@ -51,7 +51,7 @@ client_test() { + + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/client.img \ +- -m 256M -smp 2 -nographic \ ++ -m 256M -cpu host -smp 2 -nographic \ + -net nic,macaddr=$mac,model=e1000 \ + -net socket,connect=127.0.0.1:12320 \ + -watchdog i6300esb -watchdog-action poweroff \ +diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh +index 53ac5c7..1abde7a 100755 +--- a/test/TEST-30-ISCSI/test.sh ++++ b/test/TEST-30-ISCSI/test.sh +@@ -19,7 +19,7 @@ run_server() { + -drive format=raw,index=1,media=disk,file=$TESTDIR/root.ext3 \ + -drive format=raw,index=2,media=disk,file=$TESTDIR/iscsidisk2.img \ + -drive format=raw,index=3,media=disk,file=$TESTDIR/iscsidisk3.img \ +- -m 512M -smp 2 \ ++ -m 512M -cpu host -smp 2 \ + -display none \ + -serial $SERIAL \ + -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ +@@ -46,7 +46,7 @@ run_client() { + + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/client.img \ +- -m 512M -smp 2 -nographic \ ++ -m 512M -cpu host -smp 2 -nographic \ + -net nic,macaddr=52:54:00:12:34:00,model=e1000 \ + -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ + -net socket,connect=127.0.0.1:12330 \ +@@ -207,7 +207,7 @@ test_setup() { + -drive format=raw,index=1,media=disk,file=$TESTDIR/client.img \ + -drive format=raw,index=2,media=disk,file=$TESTDIR/iscsidisk2.img \ + -drive format=raw,index=3,media=disk,file=$TESTDIR/iscsidisk3.img \ +- -smp 2 -m 256M -nographic -net none \ ++ -cpu host -smp 2 -m 256M -nographic -net none \ + -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 + grep -F -m 1 -q dracut-root-block-created $TESTDIR/client.img || return 1 +diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh +index 8d49b05..7f7aa66 100755 +--- a/test/TEST-40-NBD/test.sh ++++ b/test/TEST-40-NBD/test.sh +@@ -17,7 +17,7 @@ run_server() { + -drive format=raw,index=0,media=disk,file=$TESTDIR/server.ext2 \ + -drive format=raw,index=1,media=disk,file=$TESTDIR/nbd.ext2 \ + -drive format=raw,index=2,media=disk,file=$TESTDIR/encrypted.ext2 \ +- -m 256M -smp 2 \ ++ -m 256M -cpu host -smp 2 \ + -display none \ + -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ + -net socket,listen=127.0.0.1:12340 \ +@@ -55,7 +55,7 @@ client_test() { + + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/flag.img \ +- -m 512M -smp 2 \ ++ -m 512M -cpu host -smp 2 \ + -nographic \ + -net nic,macaddr=$mac,model=e1000 \ + -net socket,connect=127.0.0.1:12340 \ +@@ -249,7 +249,7 @@ make_encrypted_root() { + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file=$TESTDIR/flag.img \ + -drive format=raw,index=1,media=disk,file=$TESTDIR/encrypted.ext2 \ +- -m 256M -smp 2\ ++ -m 256M -cpu host -smp 2\ + -nographic -net none \ + -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \ + -initrd $TESTDIR/initramfs.makeroot || return 1 +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index ef27682..e919bac 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -14,7 +14,7 @@ run_server() { + fsck -a "$TESTDIR"/server.ext3 || return 1 + $testdir/run-qemu \ + -drive format=raw,index=0,media=disk,file="$TESTDIR"/server.ext3 \ +- -m 512M -smp 2 \ ++ -m 512M -cpu host -smp 2 \ + -display none \ + -net socket,listen=127.0.0.1:12350 \ + -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ +@@ -49,7 +49,7 @@ client_test() { + return 1 + fi + +- $testdir/run-qemu -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img -m 512M -smp 2 -nographic \ ++ $testdir/run-qemu -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img -m 512M -cpu host -smp 2 -nographic \ + -net socket,connect=127.0.0.1:12350 \ + -net nic,macaddr=52:54:00:12:34:$mac1,model=e1000 \ + -net nic,macaddr=52:54:00:12:34:$mac2,model=e1000 \ diff --git a/0172-TEST-99-RPM-retry-dnf-5-times-in-case-http-fails.patch b/0172-TEST-99-RPM-retry-dnf-5-times-in-case-http-fails.patch new file mode 100644 index 0000000..cd9e51d --- /dev/null +++ b/0172-TEST-99-RPM-retry-dnf-5-times-in-case-http-fails.patch @@ -0,0 +1,89 @@ +From ae69ae9a28f76729c6f54fb586e33abbad2afd7d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 14 Nov 2016 17:14:30 +0100 +Subject: [PATCH] TEST-99-RPM: retry dnf 5 times in case http fails + +--- + test/TEST-99-RPM/test.sh | 55 +++++++++++++++++++++++++----------------------- + 1 file changed, 29 insertions(+), 26 deletions(-) + +diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh +index 345d524..a670b55 100755 +--- a/test/TEST-99-RPM/test.sh ++++ b/test/TEST-99-RPM/test.sh +@@ -18,8 +18,8 @@ test_run() { + mkdir -p "$rootdir/dev" + mkdir -p "$rootdir/boot" + +-trap 'ret=$?; [[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit $ret;' EXIT +-trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit 1;' SIGINT ++ trap 'ret=$?; [[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit $ret;' EXIT ++ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit 1;' SIGINT + + mount --bind /proc "$rootdir/proc" + mount --bind /sys "$rootdir/sys" +@@ -34,27 +34,30 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou + dnf_or_yum=yum + dnf_or_yum_cmd=yum + command -v dnf >/dev/null && { dnf_or_yum="dnf"; dnf_or_yum_cmd="dnf --allowerasing"; } +- $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo='*' \ +- --enablerepo=fedora --enablerepo=updates \ +- install -y \ +- $dnf_or_yum \ +- passwd \ +- rootfiles \ +- systemd \ +- systemd-udev \ +- kernel \ +- kernel-core \ +- redhat-release \ +- device-mapper-multipath \ +- lvm2 \ +- mdadm \ +- bash \ +- iscsi-initiator-utils \ +- "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ +- ${NULL} +- #"$TESTDIR"/dracut-config-rescue-[0-9]*.$(arch).rpm \ +- #"$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ +-# ${NULL} ++ for (( i=0; i < 5 ; i++)); do ++ $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo='*' \ ++ --enablerepo=fedora --enablerepo=updates \ ++ install -y \ ++ $dnf_or_yum \ ++ passwd \ ++ rootfiles \ ++ systemd \ ++ systemd-udev \ ++ kernel \ ++ kernel-core \ ++ redhat-release \ ++ device-mapper-multipath \ ++ lvm2 \ ++ mdadm \ ++ bash \ ++ iscsi-initiator-utils \ ++ "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ ++ ${NULL} || continue ++ #"$TESTDIR"/dracut-config-rescue-[0-9]*.$(arch).rpm \ ++ #"$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ ++ # ${NULL} ++ done ++ (( i < 5 )) + + cat >"$rootdir"/test.sh <&2 +- cat "$rootdir"/test.output >&2 ++ failed=1 ++ echo TEST Failed >&2 ++ cat "$rootdir"/test.output >&2 + fi + + umount "$rootdir/proc" diff --git a/0173-test-Makefile-proper-return-code-for-make-check.patch b/0173-test-Makefile-proper-return-code-for-make-check.patch new file mode 100644 index 0000000..c01d775 --- /dev/null +++ b/0173-test-Makefile-proper-return-code-for-make-check.patch @@ -0,0 +1,32 @@ +From 45ab6b164724e3c7540bbc723f437806d3791098 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 11 Nov 2016 12:18:06 +0100 +Subject: [PATCH] test/Makefile: proper return code for "make check" + +(cherry picked from commit aa40b82145ecc923edfade8149c2ba892bfb664d) +--- + test/Makefile | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/test/Makefile b/test/Makefile +index f71f854..eaa944f 100644 +--- a/test/Makefile ++++ b/test/Makefile +@@ -2,13 +2,14 @@ + + check: + @[ "$$EUID" == "0" ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; } +- @for i in TEST-[0-9]*; do \ ++ @{ ret=0; \ ++ for i in TEST-[0-9]*; do \ + [ -d $$i ] || continue ; \ + [ -f $$i/Makefile ] || continue ; \ + if [ -n "$$TESTS" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${TESTS#*$$t*}" != "$$TESTS" ] || continue; fi; \ + if [ -n "$$SKIP" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${SKIP#*$$t*}" != "$$SKIP" ] && continue; fi; \ +- $(MAKE) -C $$i all ; \ +- done ++ $(MAKE) -C $$i all ; ret=$$((ret + $$?)); \ ++ done; exit $$ret; } + + clean: + @for i in TEST-[0-9]*; do \ diff --git a/0174-.dir-locals.el-changed-to-sane-style.patch b/0174-.dir-locals.el-changed-to-sane-style.patch new file mode 100644 index 0000000..429a6de --- /dev/null +++ b/0174-.dir-locals.el-changed-to-sane-style.patch @@ -0,0 +1,24 @@ +From 8c8da6838ad97a571e81341f81dc76c8b703bbc2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 8 Dec 2016 17:52:54 +0100 +Subject: [PATCH] .dir-locals.el: changed to sane style + +--- + .dir-locals.el | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/.dir-locals.el b/.dir-locals.el +index 8130058..b38d4d6 100644 +--- a/.dir-locals.el ++++ b/.dir-locals.el +@@ -1,3 +1,7 @@ +-((nil . ((sh-basic-offset . 4) +- (indent-tabs-mode . nil) +- ))) ++;;; Directory Local Variables ++;;; For more information see (info "(emacs) Directory Variables") ++ ++((sh-mode ++ (indent-tabs-mode) ++ (sh-basic-offset . 4))) ++ diff --git a/0175-dracut.sh-add-default-path-for-uefi.patch b/0175-dracut.sh-add-default-path-for-uefi.patch new file mode 100644 index 0000000..772a286 --- /dev/null +++ b/0175-dracut.sh-add-default-path-for-uefi.patch @@ -0,0 +1,115 @@ +From 13e8bf850ce5e64b2a6b0c9baa336ce525c45848 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 8 Dec 2016 17:53:40 +0100 +Subject: [PATCH] dracut.sh: add default path for --uefi + +The default output filename for --uefi is +/EFI/Linux/linux-$kernel$--.efi. + might be /efi, /boot or /boot/efi depending on where the ESP partition +is mounted. The is taken from BUILD_ID in /usr/lib/os-release or +if it exists /etc/os-release and is left out, if BUILD_ID is non-existant or +empty. + +Also a new option --no-machineid was added, which affects the default output +filename of --uefi and will discard the part. +--- + dracut.8.asc | 10 +++++++++- + dracut.sh | 43 +++++++++++++++++++++++++++++++++---------- + 2 files changed, 42 insertions(+), 11 deletions(-) + +diff --git a/dracut.8.asc b/dracut.8.asc +index 0e01707..4ab0872 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -485,7 +485,15 @@ will not be able to boot. + + **--uefi**:: + Instead of creating an initramfs image, dracut will create an UEFI executable, +- which can be executed by an UEFI BIOS. ++ which can be executed by an UEFI BIOS. The default output filename is ++ _/EFI/Linux/linux-$kernel$--.efi_. might be ++ _/efi_, _/boot_ or _/boot/efi_ depending on where the ESP partition is mounted. ++ The is taken from BUILD_ID in _/usr/lib/os-release_ or if it exists ++ _/etc/os-release_ and is left out, if BUILD_ID is non-existant or empty. ++ ++**--no-machineid**:: ++ affects the default output filename of **--uefi** and will discard the ++ part. + + **--uefi-stub __**:: + Specifies the UEFI stub loader, which will load the attached kernel, initramfs and +diff --git a/dracut.sh b/dracut.sh +index 2d79bbc..0886343 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -371,6 +371,7 @@ rearrange_params() + --long kernel-image: \ + --long no-hostonly-i18n \ + --long hostonly-i18n \ ++ --long no-machineid \ + -- "$@") + + if (( $? != 0 )); then +@@ -566,6 +567,8 @@ while :; do + uefi_stub_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --kernel-image) + kernel_image_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; ++ --no-machineid) ++ machine_id_l="no";; + --) shift; break;; + + *) # should not even reach this point +@@ -624,16 +627,6 @@ if [[ $kernel ]]; then + fi + fi + +-if ! [[ $outfile ]]; then +- [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id +- +- if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then +- outfile="/boot/${MACHINE_ID}/$kernel/initrd" +- else +- outfile="/boot/initramfs-$kernel.img" +- fi +-fi +- + unset LC_MESSAGES + unset LC_CTYPE + export LC_ALL=C +@@ -751,6 +744,36 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) + [[ $loginstall_l ]] && loginstall="$loginstall_l" + [[ $uefi_stub_l ]] && uefi_stub="$uefi_stub_l" + [[ $kernel_image_l ]] && kernel_image="$kernel_image_l" ++[[ $machine_id_l ]] && machine_id="$machine_id_l" ++ ++if ! [[ $outfile ]]; then ++ if [[ $machine_id != "no" ]]; then ++ [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id ++ fi ++ ++ if [[ $uefi == "yes" ]]; then ++ BUILD_ID=$(cat /etc/os-release /usr/lib/os-release \ ++ | while read -r line || [[ $line ]]; do \ ++ [[ $line =~ BUILD_ID\=* ]] && eval "$line" && echo "$BUILD_ID" && break; \ ++ done) ++ if [[ -d /efi ]] && mountpoint -q /efi; then ++ efidir=/efi ++ else ++ efidir=/boot/EFI ++ if [[ -d /boot/efi/EFI ]] && mountpoint -q /boot/efi; then ++ efidir=/boot/efi/EFI ++ fi ++ fi ++ mkdir -p "$efidir/Linux" ++ outfile="$efidir/Linux/linux-$kernel${MACHINE_ID:+-${MACHINE_ID}}${BUILD_ID:+-${BUILD_ID}}.efi" ++ else ++ if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then ++ outfile="/boot/${MACHINE_ID}/$kernel/initrd" ++ else ++ outfile="/boot/initramfs-$kernel.img" ++ fi ++ fi ++fi + + # eliminate IFS hackery when messing with fw_dir + export DRACUT_FIRMWARE_PATH=${fw_dir// /:} diff --git a/dracut.spec b/dracut.spec index c5a32f7..dadea11 100644 --- a/dracut.spec +++ b/dracut.spec @@ -16,7 +16,7 @@ Name: dracut Version: 044 -Release: 117%{?dist} +Release: 176%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -141,16 +141,75 @@ Patch103: 0103-network-use-arping2-if-available.patch Patch104: 0104-dracut.conf.5.asc-remove-duplicate-i18n_install_all-.patch Patch105: 0105-add-rd.emergency-reboot-poweroff-halt.patch Patch106: 0106-fips-module-add-missing-space.patch -Patch107: 0107-network-support-macaddr-in-brackets.patch -Patch108: 0108-nfs-install-all-nfs-modules-non-hostonly.patch -Patch109: 0109-network-use-require_any_binary-instead-of-require_an.patch -Patch110: 0110-TEST-20-NFS-remove-stale-pid-file.patch -Patch111: 0111-dracut-functions.sh-catch-all-lvm-slaves.patch -Patch112: 0112-systemd-dracut-cmdline.sh-unset-UNSET-root.patch -Patch113: 0113-url-lib-ca-bundle.crt-changed-to-a-symlink.patch -Patch114: 0114-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch -Patch115: 0115-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch -Patch116: 0116-network-ibft-put-IPv6-IP-in-brackets.patch +Patch107: 0107-qemu-include-the-qemu_fw_cfg-kernel-module.patch +Patch108: 0108-network-support-macaddr-in-brackets.patch +Patch109: 0109-nfs-install-all-nfs-modules-non-hostonly.patch +Patch110: 0110-network-use-require_any_binary-instead-of-require_an.patch +Patch111: 0111-TEST-20-NFS-remove-stale-pid-file.patch +Patch112: 0112-dracut-functions.sh-catch-all-lvm-slaves.patch +Patch113: 0113-systemd-dracut-cmdline.sh-unset-UNSET-root.patch +Patch114: 0114-url-lib-ca-bundle.crt-changed-to-a-symlink.patch +Patch115: 0115-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch +Patch116: 0116-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch +Patch117: 0117-network-ibft-put-IPv6-IP-in-brackets.patch +Patch118: 0118-livenet-support-nfs-urls-in-livenet-generator.patch +Patch119: 0119-Update-nfs-lib.sh.patch +Patch120: 0120-dracut-systemd-dracut-mount.service-add-DefaultDepen.patch +Patch121: 0121-kernel-modules-add-nvme-kernel-module.patch +Patch122: 0122-test-TEST-30-ISCSI-depend-on-tgtd-and-tgtadm.patch +Patch123: 0123-network-arping2-use-0.0.0.0-as-source-address.patch +Patch124: 0124-TEST-30-ISCSI-add-message-that-all-tests-passed.patch +Patch125: 0125-caps-make-it-a-non-default-module.patch +Patch126: 0126-correctly-install-rsyslog.conf-template.patch +Patch127: 0127-source-dracut-lib-for-warn.patch +Patch128: 0128-move-start-from-udev-to-initqueue-online.patch +Patch129: 0129-fixup-No-such-file-or-directory-errors-when-module-i.patch +Patch130: 0130-subshell-and-set-f-to-prevent-expansion.patch +Patch131: 0131-add-imjournal.so-to-read-systemd-journal.patch +Patch132: 0132-dracut-install-fallback-to-non-hostonly-mode-if-lsmo.patch +Patch133: 0133-dmsquash-live-dmsquash-live-root-det_img_fs-redirect.patch +Patch134: 0134-98integrity-support-validating-the-IMA-policy-file-s.patch +Patch135: 0135-rescue-use-proper-path-for-0-rescue.conf.patch +Patch136: 0136-integrity-ima-policy-load.sh-s-echo-n-printf.patch +Patch137: 0137-test-test-rhel-7.2.rpms.patch +Patch138: 0138-add-README.md.patch +Patch139: 0139-README.md-update.patch +Patch140: 0140-README.md-update.patch +Patch141: 0141-dracut-install-preserve-extended-attributes-when-cop.patch +Patch142: 0142-README-correct-github-URLs.patch +Patch143: 0143-dracut.8-document-INITRD_COMPRESS-environment-variab.patch +Patch144: 0144-README.md-remove-CI-badge.patch +Patch145: 0145-README-update.patch +Patch146: 0146-TODO-remove-some-items.patch +Patch147: 0147-50-dracut.install-use-bin-bash-shebang.patch +Patch148: 0148-dracut.sh-create-the-initramfs-non-world-readable-al.patch +Patch149: 0149-NEWS-update-for-045.patch +Patch150: 0150-Use-versioned-Obsoletes.patch +Patch151: 0151-Makefile-create-rpms-in-DESTDIR-for-target-rpm.patch +Patch152: 0152-TEST-99-RPM-create-dracut-rpms-to-install-first.patch +Patch153: 0153-TEST-99-RPM-add-test_check-for-rpm-dnf-yum.patch +Patch154: 0154-TEST-30-ISCSI-fixed-dhcpd.conf-and-disabled-nowait.patch +Patch155: 0155-TEST-99-RPM-actually-use-the-generated-rpms-with-dnf.patch +Patch156: 0156-TEST-99-RPM-set-release-version-and-disable-update-t.patch +Patch157: 0157-README.testsuite-add-more-requirements.patch +Patch158: 0158-TEST-30-ISCSI-give-server-more-time-for-the-head-sta.patch +Patch159: 0159-Makefile-fixed-DESTDIR-in-rpm-target.patch +Patch160: 0160-TEST-99-RPM-append-to-DESTDIR.patch +Patch161: 0161-README.testsuite-add-dmraid.patch +Patch162: 0162-network-Try-to-load-xennet.patch +Patch163: 0163-dracut.spec-add-systemd-udev-requirement.patch +Patch164: 0164-test-TEST-99-RPM-speedup-test.patch +Patch165: 0165-test-TEST-99-RPM-dnf-does-not-like-any-dracut-subpac.patch +Patch166: 0166-README.md-add-CentOS-badge.patch +Patch167: 0167-TEST-99-RPM-use-best-and-install-all-rpms.patch +Patch168: 0168-Revert-TEST-99-RPM-use-best-and-install-all-rpms.patch +Patch169: 0169-test-test-rhel-7.2.rpms-remove-file.patch +Patch170: 0170-README.md-change-centosci-badge.patch +Patch171: 0171-testsuite-add-cpu-host-to-kvm-call.patch +Patch172: 0172-TEST-99-RPM-retry-dnf-5-times-in-case-http-fails.patch +Patch173: 0173-test-Makefile-proper-return-code-for-make-check.patch +Patch174: 0174-.dir-locals.el-changed-to-sane-style.patch +Patch175: 0175-dracut.sh-add-default-path-for-uefi.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -232,6 +291,7 @@ Requires: kpartx %if 0%{?fedora} || 0%{?rhel} > 6 Requires: util-linux >= 2.21 Requires: systemd >= 219 +Requires: systemd-udev >= 219 Requires: procps-ng Conflicts: grubby < 8.23 Conflicts: initscripts < 8.63-1 @@ -614,6 +674,9 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Thu Dec 08 2016 Harald Hoyer - 044-176 +- git snapshot + * Fri Aug 19 2016 Harald Hoyer - 044-117 - git snapshot