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

- bail out if module directory does not exist (osc#1043900)
  * adds 0525-backport-bail-out-if-module-directory-does-not-exist.patch

OBS-URL: https://build.opensuse.org/request/show/509401
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=312
This commit is contained in:
Daniel Molkentin 2017-07-11 10:01:32 +00:00 committed by Git OBS Bridge
parent e9df4e7e17
commit caa8d5a40c
4 changed files with 59 additions and 2 deletions

View File

@ -1,4 +1,4 @@
From 33f374affcd65741dcef747c7cb57482d9ff3103 Mon Sep 17 00:00:00 2001
From a651341debaf284101cb32c27373ed9a0dec7107 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Mon, 19 Jun 2017 13:42:43 +0200
Subject: [PATCH] Suppress nonsensical error message (bsc#1032029)

View File

@ -0,0 +1,49 @@
From cb1c81fc7f6bc72a72de1f87847924572aa39b54 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Thu, 29 Jun 2017 17:18:37 +0200
Subject: [PATCH] backport: bail out if module directory does not exist
this basically reverts commit
05214a0bedc084a41c35a128609745ad04a0c6cf
if people want to build the initramfs without kernel modules,
then --no-kernel should be specified
Upstream-Commit: 106255afd46ea2be1d035aca0c5695186a3f2c41
---
dracut.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 1016d5ae..492ecbf7 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -632,12 +632,6 @@ if ! [[ $kernel ]]; then
kernel=$(uname -r)
fi
-if [[ $kernel ]]; then
- if ! [[ -d /lib/modules/$kernel ]] && [[ $no_kernel != yes ]]; then
- printf -- "Kernel version $kernel has no module directory /lib/modules/$kernel\n" >&2
- fi
-fi
-
if ! [[ $outfile ]]; then
[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
@@ -892,6 +886,12 @@ else
exit 1
fi
+if [[ $no_kernel != yes ]] && ! [[ -d $srcmods ]]; then
+ printf "%s\n" "dracut: Cannot find module directory $srcmods" >&2
+ printf "%s\n" "dracut: and --no-kernel was not specified" >&2
+ exit 1
+fi
+
if ! [[ $print_cmdline ]]; then
inst /bin/sh
if ! $DRACUT_INSTALL ${initdir:+-D "$initdir"} -R "$initdir/bin/sh" &>/dev/null; then
--
2.12.3

View File

@ -1,8 +1,14 @@
-------------------------------------------------------------------
Tue Jul 11 09:55:00 UTC 2017 - daniel.molkentin@suse.com
- bail out if module directory does not exist (osc#1043900)
* adds 0525-backport-bail-out-if-module-directory-does-not-exist.patch
-------------------------------------------------------------------
Mon Jun 19 11:54:44 UTC 2017 - daniel.molkentin@suse.com
- Suppress nonsensical error message (bsc#1032029)
adds 0524-Suppress-nonsensical-error-message-bsc-1032029.patch
* adds 0524-Suppress-nonsensical-error-message-bsc-1032029.patch
-------------------------------------------------------------------
Fri Jun 16 15:47:40 UTC 2017 - daniel.molkentin@suse.com

View File

@ -206,6 +206,7 @@ Patch521: 0521-Ensure-udev-persistent-storage-compat-rules-get-crea.patch
Patch522: 0522-Fix-typo-from-commit-3f1cdb520.patch
Patch523: 0523-98dracut-systemd-Fix-module-force-loading-with-syste.patch
Patch524: 0524-Suppress-nonsensical-error-message-bsc-1032029.patch
Patch525: 0525-backport-bail-out-if-module-directory-does-not-exist.patch
BuildRequires: asciidoc
BuildRequires: bash
@ -436,6 +437,7 @@ chmod a+x modules.d/91zipl/install_zipl_cmdline.sh
%patch522 -p1
%patch523 -p1
%patch524 -p1
%patch525 -p1
%build
%configure\