diff --git a/0203-no-fail-builtin-module.patch b/0203-no-fail-builtin-module.patch new file mode 100644 index 0000000..c4ca62f --- /dev/null +++ b/0203-no-fail-builtin-module.patch @@ -0,0 +1,31 @@ +From a7996e5e33c0456c96764dfb1ab35c0a59134ccc Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Tue, 3 Nov 2015 16:29:21 +0100 +Subject: [PATCH] Don't let inst1mod fail if module is built-in + +- Fixes bsc#935563 + +Signed-off-by: Fabian Vogt +--- + dracut-functions.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index b666446..e5be295 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -1721,6 +1721,11 @@ instmods() { + return 0 + fi + ++ if grep -q "/${_mod}.ko" /lib/modules/$kernel/modules.builtin; then ++ # Module is built-in ++ return 0 ++ fi ++ + # If we are building a host-specific initramfs and this + # module is not already loaded, move on to the next one. + [[ $hostonly ]] \ +-- +2.6.2 + diff --git a/0204-mkinitrd-fix-monster.patch b/0204-mkinitrd-fix-monster.patch new file mode 100644 index 0000000..3d6aa33 --- /dev/null +++ b/0204-mkinitrd-fix-monster.patch @@ -0,0 +1,25 @@ +From: Fabian Vogt +Subject: Implement functionality of -A option +References: boo#935993 + +- Without this patch, -A sets host_only=0, + but host_only wasn't used +- Translates into --no-host-only now + +--- + mkinitrd-suse.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: dracut-043/mkinitrd-suse.sh +=================================================================== +--- dracut-043.orig/mkinitrd-suse.sh ++++ dracut-043/mkinitrd-suse.sh +@@ -263,7 +263,7 @@ while (($# > 0)); do + ;; + -M) read_arg map_file "$@" || shift $? + ;; +- -A) host_only=0;; ++ -A) dracut_args="${dracut_args} --no-host-only";; + -B) skip_update_bootloader=1;; + -v|--verbose) dracut_args="${dracut_args} -v";; + -L) logfile=;; diff --git a/0402-driver-fail-summary.patch b/0402-driver-fail-summary.patch new file mode 100644 index 0000000..a36a735 --- /dev/null +++ b/0402-driver-fail-summary.patch @@ -0,0 +1,88 @@ +From 9e0f4d437b55ff17a0c9e3cdca5e1dcdec136ca8 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Tue, 3 Nov 2015 17:25:44 +0100 +Subject: [PATCH] Accumulate kernel module installation failures + +- Port 0169-Enabled-Warning-for-failed-kernel-modules-per-defaul.patch: + Subject: Enable warning for failed kernel moduiles + + Enabled Warning for failed kernel modules per default + and added summary of those to the end of dracut output + + References: bnc#886839 + +- Disable inline warnings in favour of summary + +Signed-off-by: Fabian Vogt +--- + dracut-functions.sh | 11 ++++------- + dracut.sh | 9 +++++++++ + 2 files changed, 13 insertions(+), 7 deletions(-) + +Index: dracut-043/dracut-functions.sh +=================================================================== +--- dracut-043.orig/dracut-functions.sh ++++ dracut-043/dracut-functions.sh +@@ -1676,14 +1676,16 @@ instmods() { + [[ $no_kernel = yes ]] && return + # called [sub]functions inherit _fderr + local _fderr=9 +- local _check=no ++ local _check=yes + local _silent=no ++ + if [[ $1 = '-c' ]]; then + _check=yes + shift + fi + + if [[ $1 = '-s' ]]; then ++ _check=no + _silent=yes + shift + fi +@@ -1765,7 +1767,7 @@ instmods() { + while read _mod || [ -n "$_mod" ]; do + inst1mod "${_mod%.ko*}" || { + if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then +- dfatal "Failed to install module $_mod" ++ echo $_mod >> /tmp/dracut_failed_drivers + fi + } + done +@@ -1773,7 +1775,7 @@ instmods() { + while (($# > 0)); do # filenames as arguments + inst1mod ${1%.ko*} || { + if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then +- dfatal "Failed to install module $1" ++ echo $1 >> /tmp/dracut_failed_drivers + fi + } + shift +Index: dracut-043/dracut.sh +=================================================================== +--- dracut-043.orig/dracut.sh ++++ dracut-043/dracut.sh +@@ -420,6 +420,8 @@ verbosity_mod_l=0 + unset kernel + unset outfile + ++> /tmp/dracut_failed_drivers ++ + rearrange_params "$@" + eval set -- "$TEMP" + +@@ -1789,6 +1791,13 @@ if ! ( + fi + dinfo "*** Creating initrd image file '$outfile' done ***" + ++if [[ -s /tmp/dracut_failed_drivers ]]; then ++ dwarn "Some kernel modules could not be included: " ++ while read line; do ++ dwarn "$line" ++ done < /tmp/dracut_failed_drivers ++fi ++ + if (( maxloglvl >= 5 )); then + if [[ $allowlocal ]]; then + "$dracutbasedir/lsinitrd.sh" "$outfile"| ddebug diff --git a/dracut-rpmlintrc b/dracut-rpmlintrc new file mode 100644 index 0000000..0ecab9b --- /dev/null +++ b/dracut-rpmlintrc @@ -0,0 +1,3 @@ +addFilter("suse-missing-rclink") +addFilter("explicit-lib-dependency") +addFilter("systemd-service-without-service_*_*") diff --git a/dracut.changes b/dracut.changes index 9014e01..6c90218 100644 --- a/dracut.changes +++ b/dracut.changes @@ -1,3 +1,45 @@ +------------------------------------------------------------------- +Wed Nov 4 16:45:37 UTC 2015 - fvogt@suse.com + +- Add dracut-rpmlintrc +- Fix permissions of various scripts, as patch does not + create executable files + +------------------------------------------------------------------- +Wed Nov 4 16:07:07 UTC 2015 - fvogt@suse.com + +- Fix format of patch disablement + +------------------------------------------------------------------- +Wed Nov 4 16:05:31 UTC 2015 - fvogt@suse.com + +- Add 0204-mkinitrd-fix-monster.patch: + - Implement functionality of -A option + - Without this patch, -A sets host_only=0, + but host_only wasn't used + - Translates into --no-host-only now +- References boo#935993 + +------------------------------------------------------------------- +Tue Nov 3 16:12:44 UTC 2015 - fvogt@suse.com + +- Add 0402-driver-fail-summary.patch: + - Port 0169-Enabled-Warning-for-failed-kernel-modules-per-defaul.patch: + Subject: Enable warning for failed kernel moduiles + + Enabled Warning for failed kernel modules per default + and added summary of those to the end of dracut output + + References: bnc#886839 + - Disable inline warnings in favour of summary + +------------------------------------------------------------------- +Tue Nov 3 15:35:20 UTC 2015 - fvogt@suse.com + +- Add 0203-no-fail-builtin-module.patch: + Don't let inst1mod fail if module is built-in + - Fixes bsc#935563 + ------------------------------------------------------------------- Wed Oct 14 12:51:54 UTC 2015 - trenn@suse.de diff --git a/dracut.spec b/dracut.spec index b369345..ef7324e 100644 --- a/dracut.spec +++ b/dracut.spec @@ -26,6 +26,7 @@ License: GPL-2.0+ and LGPL-2.1+ Group: System/Base Url: https://dracut.wiki.kernel.org/ Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz +Source1: dracut-rpmlintrc Source3: mkinitrd_setup_dummy Source4: purge-kernels Source5: purge-kernels.service @@ -118,12 +119,15 @@ Patch128: 0128-90lvm-Install-dm-snapshot-module.patch Patch200: dracut_fix_multipath_without_config.patch Patch201: fix_nfs_with_ip_instead_of_hostname.patch Patch202: dracut_dmraid_use_udev.patch +Patch203: 0203-no-fail-builtin-module.patch +Patch204: 0204-mkinitrd-fix-monster.patch ## fix for SUSE systems which have dpkg installed anyway Patch300: dracut_dont_use_dpkg_defaults_on_SUSE.patch Patch400: 0400-use_fstab_systemd.patch Patch401: 0401-mount_option_mountpoint.patch +Patch402: 0402-driver-fail-summary.patch BuildRequires: asciidoc BuildRequires: bash @@ -184,6 +188,7 @@ and its cryptography during startup. %patch16 -p1 %patch17 -p1 %patch20 -p1 +chmod a+x modules.d/00warpclock/module-setup.sh %patch21 -p1 %patch48 -p1 %patch53 -p1 @@ -192,6 +197,7 @@ and its cryptography during startup. %patch58 -p1 %patch59 -p1 %patch60 -p1 +chmod a+x modules.d/45ifcfg/write-ifcfg-suse.sh %patch61 -p1 %patch75 -p1 %patch76 -p1 @@ -203,6 +209,7 @@ and its cryptography during startup. %patch86 -p1 %patch87 -p1 %patch88 -p1 +chmod a+x modules.d/91zipl/install_zipl_cmdline.sh %patch89 -p1 %patch90 -p1 %patch91 -p1 @@ -230,10 +237,10 @@ and its cryptography during startup. %patch132 -p1 # Still needed! -#%patch133 -p1 -#%patch134 -p1 -#%patch145 -p1 -#%patch162 -p1 +#patch133 -p1 +#patch134 -p1 +#patch145 -p1 +#patch162 -p1 %patch137 -p1 %patch138 -p1 @@ -258,11 +265,14 @@ and its cryptography during startup. %patch200 -p1 %patch201 -p1 %patch202 -p1 +%patch203 -p1 +%patch204 -p1 %patch300 -p1 %patch400 -p1 %patch401 -p1 +%patch402 -p1 %build %configure\