Accepting request 677134 from Base:System

- Avoid "Failed to chown ... Operation not permitted" when run from non-root,
  by not copying xattrs. (osc#1092178)
  * adds 0593-dracut-only-copy-xattr-if-root.patch 

- Correct fix for displaying text on emergency consoles (boo#1124088)
  * removes 0589-Fix-displaying-text-on-emergency-consoles.patch
  * adds 0589-Fix-98dracut-systemd-dracut-emergency.sh.patch
- 95iscsi: handle qedi like bnx2i (bsc#1113712)
  * adds 0592-95iscsi-handle-qedi-like-bnx2i.patch

OBS-URL: https://build.opensuse.org/request/show/677134
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dracut?expand=0&rev=133
This commit is contained in:
Stephan Kulow 2019-02-24 16:07:20 +00:00 committed by Git OBS Bridge
commit 1ced6eadc1
5 changed files with 118 additions and 9 deletions

View File

@ -1,15 +1,20 @@
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
From 0d08f43d7137e10cbbf7390809c4659128f8a2ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C3=B6sz=C3=B6rm=C3=A9nyi=20Zolt=C3=A1n?= <zboszor@pr.hu>
Date: Tue, 12 Feb 2019 12:55:32 +0100
Subject: [PATCH] Fix 98dracut-systemd/dracut-emergency.sh
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Reference: boo#1124088
/dev/consoles does not exist. It's /proc/consoles.
Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
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
index 1a11220b..864f13ba 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
@ -17,7 +22,7 @@ index 1a11220b..b9156d2f 100755
[ -f "$FSTXT" ] && cat "$FSTXT"
) > /dev/$_tty
- done < /dev/consoles
+ done < /dev/console
+ done < /proc/consoles
[ -f /etc/profile ] && . /etc/profile
[ -z "$PS1" ] && export PS1="$_name:\${PWD}# "
exec sulogin -e

View File

@ -0,0 +1,48 @@
From 8095b250d173b0e12f9826e7124c0781086be891 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Tue, 12 Feb 2019 16:55:26 +0100
Subject: [PATCH] 95iscsi: handle qedi like bnx2i
The new qedi driver needs to be handled just like
the bnx2i driver, so update 95iscsi scripts to do this.
References: bsc#1113712
Signed-off-by: Lee Duncan <lduncan@suse.com>
---
modules.d/95iscsi/cleanup-iscsi.sh | 5 +++--
modules.d/95iscsi/iscsiroot.sh | 9 ++++++---
2 files changed, 9 insertions(+), 5 deletions(-)
Index: dracut-044/modules.d/95iscsi/cleanup-iscsi.sh
===================================================================
--- dracut-044.orig/modules.d/95iscsi/cleanup-iscsi.sh
+++ dracut-044/modules.d/95iscsi/cleanup-iscsi.sh
@@ -1,4 +1,5 @@
#!/bin/sh
-[ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && killproc iscsiuio
-
+if [[ -z "${DRACUT_SYSTEMD}" ]] && ( [[ -e /sys/module/bnx2i ]] || [[ -e /sys/module/qedi ]] ) ; then
+ killproc iscsiuio
+fi
Index: dracut-044/modules.d/95iscsi/iscsiroot.sh
===================================================================
--- dracut-044.orig/modules.d/95iscsi/iscsiroot.sh
+++ dracut-044/modules.d/95iscsi/iscsiroot.sh
@@ -36,9 +36,12 @@ iroot=${iroot#:}
# figured out a way how to check whether this is built-in or not
modprobe crc32c 2>/dev/null
-if [ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then
- iscsiuio
- > /tmp/iscsiuio-started
+# start iscsiuio if needed
+if [[ -z "${DRACUT_SYSTEMD}" ]] && \
+ ( [[ -e /sys/module/bnx2i ]] || [[ -e /sys/module/qedi ]] ) && \
+ ! [ -e /tmp/iscsiuio-started ]; then
+ iscsiuio
+ > /tmp/iscsiuio-started
fi
#set value for initial login retry

View File

@ -0,0 +1,33 @@
From 97b36b154ce40f91b1c73a610c796965a569b637 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Mon, 18 Feb 2019 14:21:05 +0100
Subject: [PATCH] dracut: only copy xattr, if root
(Cherry-picked from 076fcd1652af25f57aae063fda3b8c39ef828ac6)
---
install/dracut-install.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/install/dracut-install.c b/install/dracut-install.c
index a7bfdb8c..381327c2 100644
--- a/install/dracut-install.c
+++ b/install/dracut-install.c
@@ -222,8 +222,13 @@ static int cp(const char *src, const char *dst)
if (ret == 0) {
struct timeval tv[2];
if (fchown(dest_desc, sb.st_uid, sb.st_gid) != 0)
- if(fchown(dest_desc, (uid_t) - 1, sb.st_gid) != 0)
- log_error("Failed to chown %s: %m", dst);
+ if(fchown(dest_desc, (uid_t) - 1, sb.st_gid) != 0) {
+ if (geteuid() == 0)
+ log_error("Failed to chown %s: %m", dst);
+ else
+ log_info("Failed to chown %s: %m", dst);
+ }
+
tv[0].tv_sec = sb.st_atime;
tv[0].tv_usec = 0;
tv[1].tv_sec = sb.st_mtime;
--
2.16.4

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Fri Feb 15 17:23:11 UTC 2019 - Daniel Molkentin <daniel.molkentin@suse.com>
- Avoid "Failed to chown ... Operation not permitted" when run from non-root,
by not copying xattrs. (osc#1092178)
* adds 0593-dracut-only-copy-xattr-if-root.patch
-------------------------------------------------------------------
Tue Feb 12 16:38:21 UTC 2019 - Daniel Molkentin <daniel.molkentin@suse.com>
- Correct fix for displaying text on emergency consoles (boo#1124088)
* removes 0589-Fix-displaying-text-on-emergency-consoles.patch
* adds 0589-Fix-98dracut-systemd-dracut-emergency.sh.patch
- 95iscsi: handle qedi like bnx2i (bsc#1113712)
* adds 0592-95iscsi-handle-qedi-like-bnx2i.patch
-------------------------------------------------------------------
Thu Feb 7 15:23:19 UTC 2019 - Daniel Molkentin <daniel.molkentin@suse.com>

View File

@ -421,12 +421,16 @@ 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
# Patch submitted to upstream
Patch589: 0589-Fix-displaying-text-on-emergency-consoles.patch
# Patch adopted from upstream commit 0d08f43d7137e10cbbf7390809c4659128f8a2ea
Patch589: 0589-Fix-98dracut-systemd-dracut-emergency.sh.patch
# Patch adopted from upstream commit 53cb081b4c3afa843022d8e6156bdbd4808db4a2
Patch590: 0590-00systemd-check-if-systemd-version-is-a-number.patch
# Patch adopted from upstream commit 38ccf7c8e5e19b1e7ef400ff0a77eb92531754c0
Patch591: 0591-91zipl-Don-t-use-contents-of-commented-lines.patch
# Patch submitted to upstream
Patch592: 0592-95iscsi-handle-qedi-like-bnx2i.patch
# Patch adopted from upstream commit e7ba1392e180eb6f5e19dfd28a340a98cf09a3cd
Patch593: 0593-dracut-only-copy-xattr-if-root.patch
BuildRequires: asciidoc
BuildRequires: bash
@ -736,6 +740,8 @@ chmod a+x modules.d/95qeth_rules/module-setup.sh
%patch589 -p1
%patch590 -p1
%patch591 -p1
%patch592 -p1
%patch593 -p1
%build
%configure\