Accepting request 671820 from home:dmolkentin:branches:Base:System

- Fix displaying text on emergency consoles (boo#1124088)
  - adds 0589-Fix-displaying-text-on-emergency-consoles.patch
- Fix systemd version check, will be required for systemd v241
  - 0590-00systemd-check-if-systemd-version-is-a-number.patch

OBS-URL: https://build.opensuse.org/request/show/671820
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=363
This commit is contained in:
Daniel Molkentin 2019-02-05 10:40:45 +00:00 committed by Git OBS Bridge
parent b7a611d1d4
commit d3ae36b2fe
4 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,26 @@
From 71ac8784994c2703ec4313821b3a314326255b65 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Mon, 4 Feb 2019 14:43:04 +0100
Subject: [PATCH] Fix displaying text on emergency consoles
Reference: boo#1124088
---
modules.d/98dracut-systemd/dracut-emergency.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/98dracut-systemd/dracut-emergency.sh b/modules.d/98dracut-systemd/dracut-emergency.sh
index 1a11220b..b9156d2f 100755
--- a/modules.d/98dracut-systemd/dracut-emergency.sh
+++ b/modules.d/98dracut-systemd/dracut-emergency.sh
@@ -31,7 +31,7 @@ if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
echo
[ -f "$FSTXT" ] && cat "$FSTXT"
) > /dev/$_tty
- done < /dev/consoles
+ done < /dev/console
[ -f /etc/profile ] && . /etc/profile
[ -z "$PS1" ] && export PS1="$_name:\${PWD}# "
exec sulogin -e
--
2.16.4

View File

@ -0,0 +1,37 @@
From 53cb081b4c3afa843022d8e6156bdbd4808db4a2 Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
Date: Fri, 4 Jan 2019 16:51:15 +0100
Subject: [PATCH] 00systemd: check if systemd version is a number
The recent systemd upstream introduced a slightly modified version
string which included information about a git commit, which however
broke the version check in dracut. Unfortunately, the (( )) bash syntax
went along with it in certain cases and introduced a pretty nasty issue,
when the systemd would boot up but with slightly changed environment.
To prevent this from happening in the future, let's at least check if
the version parsed from the `systemd --version` output is a comparable
number.
---
modules.d/00systemd/module-setup.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
index 1ed4b34f..3583062b 100755
--- a/modules.d/00systemd/module-setup.sh
+++ b/modules.d/00systemd/module-setup.sh
@@ -5,6 +5,11 @@ check() {
[[ $mount_needs ]] && return 1
if require_binaries $systemdutildir/systemd; then
SYSTEMD_VERSION=$($systemdutildir/systemd --version | { read a b a; echo $b; })
+ # Check if the systemd version is a valid number
+ if ! [[ $SYSTEMD_VERSION =~ ^[0-9]+$ ]]; then
+ dfatal "systemd version is not a number ($SYSTEMD_VERSION)"
+ exit 1
+ fi
(( $SYSTEMD_VERSION >= 198 )) && return 0
return 255
fi
--
2.16.4

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Feb 4 16:12:16 UTC 2019 - Daniel Molkentin <daniel.molkentin@suse.com>
- Fix displaying text on emergency consoles (boo#1124088)
- adds 0589-Fix-displaying-text-on-emergency-consoles.patch
- Fix systemd version check, will be required for systemd v241
- 0590-00systemd-check-if-systemd-version-is-a-number.patch
-------------------------------------------------------------------
Fri Jan 25 16:03:09 UTC 2019 - Daniel Molkentin <daniel.molkentin@suse.com>

View File

@ -421,6 +421,8 @@ Patch586: 0586-95zfcp_rules-parse-zfcp.sh-remove-rule-existence-check.patc
Patch587: 0587-Fix-a-missing-space-in-example-configs.patch
# Fix for 0562-Adjust-driver-list-to-modern-kernels.patch
Patch588: 0588-Ensure-mmc-host-modules-get-included-properly.patch
Patch589: 0589-Fix-displaying-text-on-emergency-consoles.patch
Patch590: 0590-00systemd-check-if-systemd-version-is-a-number.patch
BuildRequires: asciidoc
BuildRequires: bash
@ -727,6 +729,8 @@ chmod a+x modules.d/95qeth_rules/module-setup.sh
%patch586 -p1
%patch587 -p1
%patch588 -p1
%patch589 -p1
%patch590 -p1
%build
%configure\