summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Williamson <awilliam@redhat.com>2014-04-21 09:17:03 -0700
committerAdam Williamson <awilliam@redhat.com>2014-04-21 09:17:03 -0700
commit1ba35bf55e0c0c55315039d80e891a5473561cc4 (patch)
tree958112f4e96fdf0424980f9cb157897000a68e25
parent05e06999006445b876d62159f68d9bbf25241b8b (diff)
downloaddracut-1ba35bf55e0c0c55315039d80e891a5473561cc4.tar.gz
dracut-1ba35bf55e0c0c55315039d80e891a5473561cc4.tar.xz
dracut-1ba35bf55e0c0c55315039d80e891a5473561cc4.zip
revert bad upstream changes that cause RHBZ #1084766
-rw-r--r--0001-Revert-Add-no-hostonly-cmdline-option-handling-for-g.patch27
-rw-r--r--0002-Revert-Add-flag-to-toggle-hostonly-cmdline-storing-i.patch229
-rw-r--r--dracut.spec9
3 files changed, 264 insertions, 1 deletions
diff --git a/0001-Revert-Add-no-hostonly-cmdline-option-handling-for-g.patch b/0001-Revert-Add-no-hostonly-cmdline-option-handling-for-g.patch
new file mode 100644
index 0000000..c8a8deb
--- /dev/null
+++ b/0001-Revert-Add-no-hostonly-cmdline-option-handling-for-g.patch
@@ -0,0 +1,27 @@
+From e1e8cd9f377b38f57b0e430697403dd47ca6b7fe Mon Sep 17 00:00:00 2001
+From: Adam Williamson <awilliam@redhat.com>
+Date: Thu, 17 Apr 2014 18:55:20 -0700
+Subject: [PATCH 1/2] Revert "Add -[-no]-hostonly-cmdline option handling for
+ getopt"
+
+This reverts commit 646e0506f6887db7811694c2c72ba5e516025993.
+---
+ dracut.sh | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/dracut.sh b/dracut.sh
+index c1ef474..1899db9 100755
+--- a/dracut.sh
++++ b/dracut.sh
+@@ -349,8 +349,6 @@ rearrange_params()
+ --long host-only \
+ --long no-hostonly \
+ --long no-host-only \
+- --long hostonly-cmdline \
+- --long no-hostonly-cmdline \
+ --long persistent-policy: \
+ --long fstab \
+ --long help \
+--
+1.9.0
+
diff --git a/0002-Revert-Add-flag-to-toggle-hostonly-cmdline-storing-i.patch b/0002-Revert-Add-flag-to-toggle-hostonly-cmdline-storing-i.patch
new file mode 100644
index 0000000..d09c617
--- /dev/null
+++ b/0002-Revert-Add-flag-to-toggle-hostonly-cmdline-storing-i.patch
@@ -0,0 +1,229 @@
+From dda971e5260bd2401e79461135e6c44af01da568 Mon Sep 17 00:00:00 2001
+From: Adam Williamson <awilliam@redhat.com>
+Date: Thu, 17 Apr 2014 18:55:31 -0700
+Subject: [PATCH 2/2] Revert "Add flag to toggle hostonly cmdline storing in
+ the initramfs"
+
+This reverts commit ab9457efd78ff74c654b4123956cdbd131935066.
+---
+ dracut.8.asc | 6 ------
+ dracut.conf.5.asc | 3 ---
+ dracut.sh | 18 +++-------------
+ modules.d/90crypt/module-setup.sh | 6 ++----
+ modules.d/90dmraid/module-setup.sh | 6 ++----
+ modules.d/90lvm/module-setup.sh | 6 ++----
+ modules.d/90mdraid/module-setup.sh | 6 ++----
+ modules.d/95rootfs-block/module-setup.sh | 37 ++++++++++++--------------------
+ 8 files changed, 25 insertions(+), 63 deletions(-)
+
+diff --git a/dracut.8.asc b/dracut.8.asc
+index 14ce26b..583a6dd 100644
+--- a/dracut.8.asc
++++ b/dracut.8.asc
+@@ -300,12 +300,6 @@ provide a valid _/etc/fstab_.
+ **-N, --no-hostonly**::
+ Disable Host-Only mode
+
+-**--hostonly-cmdline**:
+- Store kernel command line arguments needed in the initramfs
+-
+-**--no-hostonly-cmdline**:
+- Do not store kernel command line arguments needed in the initramfs
+-
+ **--persistent-policy** _<policy>_::
+ Use _<policy>_ to address disks and partitions.
+ _<policy>_ can be any directory name found in /dev/disk.
+diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc
+index be62da9..5c94118 100644
+--- a/dracut.conf.5.asc
++++ b/dracut.conf.5.asc
+@@ -76,9 +76,6 @@ Configuration files must have the extension .conf; other extensions are ignored.
+ Host-Only mode: Install only what is needed for booting the local host
+ instead of a generic host and generate host-specific configuration.
+
+-*hostonly_cmdline*"__{yes|no}__"::
+- If set, store the kernel command line arguments needed in the initramfs
+-
+ *persistent_policy=*"__<policy>__"::
+ Use _<policy>_ to address disks and partitions.
+ _<policy>_ can be any directory name found in /dev/disk.
+diff --git a/dracut.sh b/dracut.sh
+index 1899db9..1b33165 100755
+--- a/dracut.sh
++++ b/dracut.sh
+@@ -137,10 +137,6 @@ Creates initial ramdisk images for preloading modules
+ -H, --hostonly Host-Only mode: Install only what is needed for
+ booting the local host instead of a generic host.
+ -N, --no-hostonly Disables Host-Only mode
+- --hostonly-cmdline Store kernel command line arguments needed
+- in the initramfs
+- --no-hostonly-cmdline Do not store kernel command line arguments needed
+- in the initramfs
+ --persistent-policy [POLICY]
+ Use [POLICY] to address disks and partitions.
+ POLICY can be any directory name found in /dev/disk.
+@@ -492,12 +488,9 @@ while :; do
+ -f|--force) force=yes;;
+ --kernel-only) kernel_only="yes"; no_kernel="no";;
+ --no-kernel) kernel_only="no"; no_kernel="yes";;
+- --print-cmdline)
+- print_cmdline="yes"; hostonly_l="yes"; kernel_only="yes"; no_kernel="yes";;
+- --early-microcode)
+- early_microcode_l="yes";;
+- --no-early-microcode)
+- early_microcode_l="no";;
++ --print-cmdline) print_cmdline="yes"; hostonly_l="yes"; kernel_only="yes"; no_kernel="yes";;
++ --early-microcode) early_microcode_l="yes";;
++ --no-early-microcode) early_microcode_l="no";;
+ --strip) do_strip_l="yes";;
+ --nostrip) do_strip_l="no";;
+ --prelink) do_prelink_l="yes";;
+@@ -524,10 +517,6 @@ while :; do
+ hostonly_l="yes" ;;
+ -N|--no-hostonly|--no-host-only)
+ hostonly_l="no" ;;
+- --hostonly-cmdline)
+- hostonly_cmdline_l="yes" ;;
+- --no-hostonly-cmdline)
+- hostonly_cmdline_l="no" ;;
+ --persistent-policy)
+ persistent_policy_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
+ --fstab) use_fstab_l="yes" ;;
+@@ -766,7 +755,6 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
+ [[ $prefix_l ]] && prefix=$prefix_l
+ [[ $prefix = "/" ]] && unset prefix
+ [[ $hostonly_l ]] && hostonly=$hostonly_l
+-[[ $hostonly_cmdline_l ]] && hostonly_cmdline=$hostonly_cmdline_l
+ [[ $persistent_policy_l ]] && persistent_policy=$persistent_policy_l
+ [[ $use_fstab_l ]] && use_fstab=$use_fstab_l
+ [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l
+diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
+index 5707404..21d49c4 100755
+--- a/modules.d/90crypt/module-setup.sh
++++ b/modules.d/90crypt/module-setup.sh
+@@ -51,10 +51,8 @@ cmdline() {
+ # called by dracut
+ install() {
+
+- if [[ $hostonly_cmdline == "yes" ]]; then
+- cmdline >> "${initdir}/etc/cmdline.d/90crypt.conf"
+- echo >> "${initdir}/etc/cmdline.d/90crypt.conf"
+- fi
++ cmdline >> "${initdir}/etc/cmdline.d/90crypt.conf"
++ echo >> "${initdir}/etc/cmdline.d/90crypt.conf"
+
+ inst_multiple cryptsetup rmdir readlink umount
+ inst_script "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask
+diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh
+index aebb28d..d3888a4 100755
+--- a/modules.d/90dmraid/module-setup.sh
++++ b/modules.d/90dmraid/module-setup.sh
+@@ -65,10 +65,8 @@ cmdline() {
+ install() {
+ local _i
+
+- if [[ $hostonly_cmdline == "yes" ]]; then
+- cmdline >> "${initdir}/etc/cmdline.d/90dmraid.conf"
+- echo >> "${initdir}/etc/cmdline.d/90dmraid.conf"
+- fi
++ cmdline >> "${initdir}/etc/cmdline.d/90dmraid.conf"
++ echo >> "${initdir}/etc/cmdline.d/90dmraid.conf"
+
+ inst_multiple dmraid
+ inst_multiple -o kpartx
+diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
+index 5b810b9..781dfa4 100755
+--- a/modules.d/90lvm/module-setup.sh
++++ b/modules.d/90lvm/module-setup.sh
+@@ -50,10 +50,8 @@ install() {
+
+ inst lvm
+
+- if [[ $hostonly_cmdline == "yes" ]]; then
+- cmdline >> "${initdir}/etc/cmdline.d/90lvm.conf"
+- echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
+- fi
++ cmdline >> "${initdir}/etc/cmdline.d/90lvm.conf"
++ echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
+
+ inst_rules "$moddir/64-lvm.rules"
+
+diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
+index ac745d1..7d72098 100755
+--- a/modules.d/90mdraid/module-setup.sh
++++ b/modules.d/90mdraid/module-setup.sh
+@@ -70,10 +70,8 @@ install() {
+ inst $(command -v partx) /sbin/partx
+ inst $(command -v mdadm) /sbin/mdadm
+
+- if [[ $hostonly_cmdline == "yes" ]]; then
+- cmdline >> "${initdir}/etc/cmdline.d/90mdraid.conf"
+- echo >> "${initdir}/etc/cmdline.d/90mdraid.conf"
+- fi
++ cmdline >> "${initdir}/etc/cmdline.d/90mdraid.conf"
++ echo >> "${initdir}/etc/cmdline.d/90mdraid.conf"
+
+ # <mdadm-3.3 udev rule
+ inst_rules 64-md-raid.rules
+diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh
+index b209ab6..7bd0d2f 100755
+--- a/modules.d/95rootfs-block/module-setup.sh
++++ b/modules.d/95rootfs-block/module-setup.sh
+@@ -12,25 +12,6 @@ depends() {
+ echo fs-lib
+ }
+
+-cmdline_journal() {
+- if [[ $hostonly ]]; then
+- for dev in "${!host_fs_types[@]}"; do
+- [[ ${host_fs_types[$dev]} = "reiserfs" ]] || [[ ${host_fs_types[$dev]} = "xfs" ]] || continue
+- rootopts=$(find_dev_fsopts "$dev")
+- if [[ ${host_fs_types[$dev]} = "reiserfs" ]]; then
+- journaldev=$(fs_get_option $rootopts "jdev")
+- elif [[ ${host_fs_types[$dev]} = "xfs" ]]; then
+- journaldev=$(fs_get_option $rootopts "logdev")
+- fi
+-
+- if [ -n "$journaldev" ]; then
+- printf " root.journaldev=%s" "$journaldev"
+- fi
+- done
+- fi
+- return 0
+-}
+-
+ # called by dracut
+ cmdline() {
+ local dev=/dev/block/$(find_root_block_device)
+@@ -39,14 +20,24 @@ cmdline() {
+ printf " rootflags=%s" "$(find_mp_fsopts /)"
+ printf " rootfstype=%s" "$(find_mp_fstype /)"
+ fi
+- cmdline_journal
+ }
+
+ # called by dracut
+ install() {
+- if [[ $hostonly_cmdline == "yes" ]]; then
+- cmdline_journal | while read journaldev; do
+- [[ $journaldev ]] && printf "%s\n" "$journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf"
++
++ if [[ $hostonly ]]; then
++ for dev in "${!host_fs_types[@]}"; do
++ [[ ${host_fs_types[$dev]} = "reiserfs" ]] || [[ ${host_fs_types[$dev]} = "xfs" ]] || continue
++ rootopts=$(find_dev_fsopts "$dev")
++ if [[ ${host_fs_types[$dev]} = "reiserfs" ]]; then
++ journaldev=$(fs_get_option $rootopts "jdev")
++ elif [[ ${host_fs_types[$dev]} = "xfs" ]]; then
++ journaldev=$(fs_get_option $rootopts "logdev")
++ fi
++
++ if [ -n "$journaldev" ]; then
++ printf "%s\n" "root.journaldev=$journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf"
++ fi
+ done
+ fi
+
+--
+1.9.0
+
diff --git a/dracut.spec b/dracut.spec
index 5738205..5ab62c7 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -11,7 +11,7 @@
Name: dracut
Version: 037
-Release: 10.git20140402%{?dist}
+Release: 11.git20140402%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@@ -40,6 +40,10 @@ Patch7: 0007-dm-add-dm-cache-modules.patch
Patch8: 0008-fcoe-workaround-fcoe-timing-issues.patch
Patch9: 0009-fstab-do-not-mount-and-fsck-from-fstab-if-using-syst.patch
+# Revert dangerous behaviour change which breaks boot for multiple reporters
+# https://bugzilla.redhat.com/show_bug.cgi?id=1084766
+Patch100: 0001-Revert-Add-no-hostonly-cmdline-option-handling-for-g.patch
+Patch101: 0002-Revert-Add-flag-to-toggle-hostonly-cmdline-storing-i.patch
BuildRequires: bash git
@@ -487,6 +491,9 @@ rm -rf -- $RPM_BUILD_ROOT
%endif
%changelog
+* Thu Apr 17 2014 Adam Williamson <awilliam@redhat.com> - 037-11.git20140402
+- revert broken upstream change that causes RHBZ#1084766
+
* Wed Apr 02 2014 Harald Hoyer <harald@redhat.com> 037-10.git20140402
- fixed fstab.sys with systemd
- DHCPv6 fixes