Accepting request 645917 from Base:System

hostonly files (bsc#1090884) (forwarded request 645916 from dmolkentin)

OBS-URL: https://build.opensuse.org/request/show/645917
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dracut?expand=0&rev=130
This commit is contained in:
Dominique Leuenberger 2018-11-06 14:35:21 +00:00 committed by Git OBS Bridge
commit c964972d0e
6 changed files with 125 additions and 8 deletions

View File

@ -8,11 +8,11 @@ To support pmem devices, nfit module is required
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 f01470e7..3dfceff0 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -41,7 +41,7 @@ installkernel() {
Index: dracut-044/modules.d/90kernel-modules/module-setup.sh
===================================================================
--- dracut-044.orig/modules.d/90kernel-modules/module-setup.sh
+++ dracut-044/modules.d/90kernel-modules/module-setup.sh
@@ -55,7 +55,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 \
@ -21,6 +21,3 @@ index f01470e7..3dfceff0 100755
if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]]; then
# arm/aarch64 specific modules
--
2.16.4

View File

@ -0,0 +1,45 @@
From e9a84e0a215fb5a79e563f665bc406c0ea177d32 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Wed, 5 Sep 2018 12:06:06 +0200
Subject: [PATCH] 98dracut-systemd: Start systemd-vconsole-setup before
dracut-cmdline-ask
This is what happened before this patch (edited for brevity):
dracut-cmdline-ask.service in modules.d/98dracut-systemd, which invokes
dracut-cmdline-ask.sh. This script and systemd-vconsole-setup are
started in parallel for the same console (tty1).
Then dracut-cmdline-ask quits immediately without doing anything (unless
rd.cmdline=ask is given). As this is a bash script and it gets tty as
stdin as specified in its *.service, this triggers the hangup of tty1 at
its exit.
Meanwhile systemd-vconsole-setup continues and tries some ioctls after
that, but they fail because of the hung up tty1.
The usual culprit for starting systemd-vconsole-setup early on is
plymouth-start.service, even if plymouth.enable=0 is set.
A popular (and annoying) symptom of this as reported by users was
the inability use their configured keyboard layout in plymouth when
unlocking their crypted block devices.
Reference: boo#1055834
---
modules.d/98dracut-systemd/dracut-cmdline-ask.service | 2 ++
1 file changed, 2 insertions(+)
Index: dracut-044/modules.d/98dracut-systemd/dracut-cmdline-ask.service
===================================================================
--- dracut-044.orig/modules.d/98dracut-systemd/dracut-cmdline-ask.service
+++ dracut-044/modules.d/98dracut-systemd/dracut-cmdline-ask.service
@@ -12,6 +12,8 @@ Description=dracut ask for additional cm
DefaultDependencies=no
Before=dracut-cmdline.service
After=systemd-journald.socket
+After=systemd-vconsole-setup.service
+Requires=systemd-vconsole-setup.service
Wants=systemd-journald.socket
ConditionPathExists=/usr/lib/initrd-release
ConditionKernelCommandLine=|rd.cmdline=ask

View File

@ -0,0 +1,25 @@
From 7117bf627028298970d8a6a5e153e1942f3430f3 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Fri, 19 Oct 2018 14:30:36 +0200
Subject: [PATCH 1/2] 99base: Allow files with backslashes in hostonly files
Files with blackslashes are routinely by systemd.
Reference: bsc#1090884
---
modules.d/99base/dracut-lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: dracut-044/modules.d/99base/dracut-lib.sh
===================================================================
--- dracut-044.orig/modules.d/99base/dracut-lib.sh
+++ dracut-044/modules.d/99base/dracut-lib.sh
@@ -1291,7 +1291,7 @@ show_memstats()
remove_hostonly_files() {
rm -fr /etc/cmdline /etc/cmdline.d/*.conf "$hookdir/initqueue/finished"
if [ -f /lib/dracut/hostonly-files ]; then
- while read line || [ -n "$line" ]; do
+ while read -r line || [ -n "$line" ]; do
[ -e "$line" ] || [ -h "$line" ] || continue
rm -f "$line"
done < /lib/dracut/hostonly-files

View File

@ -0,0 +1,26 @@
From b38b7fef36333a59890233dccfbbb6d2c40ebe83 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Fri, 19 Oct 2018 14:39:30 +0200
Subject: [PATCH 2/2] 95dasd_rules: mark dasd rules host_only
Reference: bsc#1090884
---
modules.d/95dasd_rules/module-setup.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules.d/95dasd_rules/module-setup.sh b/modules.d/95dasd_rules/module-setup.sh
index 488400c3..124dbad9 100755
--- a/modules.d/95dasd_rules/module-setup.sh
+++ b/modules.d/95dasd_rules/module-setup.sh
@@ -54,6 +54,8 @@ install() {
if [[ $hostonly ]] ; then
inst_rules_wildcard 51-dasd-*.rules
inst_rules_wildcard 41-s390x-dasd-*.rules
+ mark_hostonly /etc/udev/rules.d/51-dasd-*.rules
+ mark_hostonly /etc/udev/rules.d/41-s390x-dasd-*.rules
fi
inst_rules 59-dasd.rules
}
--
2.16.4

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Wed Oct 31 09:57:55 UTC 2018 - Daniel Molkentin <daniel.molkentin@suse.com>
- 98dracut-systemd: Start systemd-vconsole-setup before dracut-cmdline-ask
(bsc#1055834)
* adds 0582-98dracut-systemd-Start-systemd-vconsole-setup-before.patch
- Fixed Patch 581 to apply cleanly
* Updates 0581-kernel-modules-add-nfit.patch
- Mark the DASD udev rules host-only and handle backslashes in paths for
hostonly files (bsc#1090884)
* adds 0583-99base-Allow-files-with-backslashes-in-hostonly-file.patch
* adds 0584-95dasd_rules-mark-dasd-rules-host_only.patch
-------------------------------------------------------------------
Wed Oct 10 14:56:36 UTC 2018 - Daniel Molkentin <daniel.molkentin@suse.com>

View File

@ -407,6 +407,12 @@ Patch574: 0574-s-find_btrfs_devs-btrfs_devs.patch
Patch580: 0580-check_for_CONFIG_ACPI_TABLE_UPGRADE.patch
# Patch adopted from upstream commit 09ba1b289f2cba613c1950b03f0f549ebb7eb83f
Patch581: 0581-kernel-modules-add-nfit.patch
# Patch adopted from upstream commit e9a84e0a215fb5a79e563f665bc406c0ea177d32
Patch582: 0582-98dracut-systemd-Start-systemd-vconsole-setup-before.patch
# Patch adopted from upstream commit 7117bf627028298970d8a6a5e153e1942f3430f3
Patch583: 0583-99base-Allow-files-with-backslashes-in-hostonly-file.patch
# Patch adopted from upstream commit b38b7fef36333a59890233dccfbbb6d2c40ebe83
Patch584: 0584-95dasd_rules-mark-dasd-rules-host_only.patch
BuildRequires: asciidoc
BuildRequires: bash
@ -706,6 +712,9 @@ chmod a+x modules.d/95qeth_rules/module-setup.sh
%patch574 -p1
%patch580 -p1
%patch581 -p1
%patch582 -p1
%patch583 -p1
%patch584 -p1
%build
%configure\