Accepting request 684094 from Base:System

(forwarded request 684092 from dmolkentin)

OBS-URL: https://build.opensuse.org/request/show/684094
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dracut?expand=0&rev=135
This commit is contained in:
Dominique Leuenberger 2019-03-12 08:50:23 +00:00 committed by Git OBS Bridge
commit b677d24dab
4 changed files with 45 additions and 3 deletions

View File

@ -0,0 +1,28 @@
From 6ead8ad47fa141eca039c45f09805808a5ff7d4d Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Mon, 11 Mar 2019 17:35:14 +0100
Subject: [PATCH] Check SUSE kernel module dependencies recursively
This fixes commit f29f334cf1638594f90bbf3e775917c610232785
Reference: bsc#1127891
---
dracut-init.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-init.sh b/dracut-init.sh
index 65597ffa..74e2086d 100644
--- a/dracut-init.sh
+++ b/dracut-init.sh
@@ -954,7 +954,7 @@ for_each_kmod_dep() {
for suse_mod_dep in ${suse_mod_deps["${_kmod%.ko*}"]}; do
_modpath=$(modinfo -k "$kernel" -F filename "$suse_mod_dep" 2> /dev/null)
[ -n "$_modpath" ] || continue
- for_each_kmod_dep "$_func" "$_modpath" "$@"
+ for_each_kmod_dep "$_func" $(basename "${_modpath%.ko*}") "$@"
$_func ${_modpath} || exit $?
done
}
--
2.16.4

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Mar 11 17:02:07 UTC 2019 - Daniel Molkentin <daniel.molkentin@suse.com>
- Check SUSE kernel module dependencies recursively (bsc#1127891)
* adds 0594-Check-SUSE-kernel-module-dependencies-recursively.patch
-------------------------------------------------------------------
Thu Feb 28 20:09:28 UTC 2019 - Michal Suchanek <msuchanek@suse.de>
- Handle non-versioned dependency in purge-kernels.
-------------------------------------------------------------------
Mon Feb 25 14:51:07 UTC 2019 - Daniel Molkentin <daniel.molkentin@suse.com>

View File

@ -431,6 +431,8 @@ Patch591: 0591-91zipl-Don-t-use-contents-of-commented-lines.patch
Patch592: 0592-95iscsi-handle-qedi-like-bnx2i.patch
# Patch adopted from upstream commit e7ba1392e180eb6f5e19dfd28a340a98cf09a3cd
Patch593: 0593-dracut-only-copy-xattr-if-root.patch
# Patch specific to SUSE, not upstream
Patch594: 0594-Check-SUSE-kernel-module-dependencies-recursively.patch
BuildRequires: asciidoc
BuildRequires: bash
@ -742,6 +744,7 @@ chmod a+x modules.d/95qeth_rules/module-setup.sh
%patch591 -p1
%patch592 -p1
%patch593 -p1
%patch594 -p1
%build
%configure\

View File

@ -272,7 +272,7 @@ sub find_package {
my $name = shift @_;
my $version = shift @_;
my @packages = @_;
my $expr = "^" . quotemeta("$name-$version");
my $expr = "^" . quotemeta($version ? "$name-$version" : $name);
my @found = grep { $_ =~ $expr } @packages;
return @found if @found;
$expr = "^" . quotemeta($name) . " = " . quotemeta($version) . "\$";
@ -334,12 +334,12 @@ sub remove_packages {
push(@packages, $1) unless $new_packages{$1};
$new_packages{$1} = 1;
$retry = 1;
} elsif (/([^ \t]*) = ([^ \t]*) is needed by \(installed\) /) {
} elsif (/([^ \t]*)(?: = ([^ \t]*))? is needed by \(installed\) /) {
my @unremovable = find_package($1, $2, @packages);
my $match = $unremovable[$#unremovable];
if ($match) {
print STDERR "$0: $_\n";
print STDERR "$0: Keeping $1 = $2 ($match)\n";
print STDERR "$0: Keeping " . ($2 ? "$1 = $2" : $1) . " ($match)\n";
@packages = grep { $_ !~ $match } @packages;
$taboo_packages{$match} = 1;
$retry = 1;