add upstream patch to fix "modprobe --ignore-install --show-depends"

otherwise dracut misses a lot of modules, which are already loaded
This commit is contained in:
Harald Hoyer 2012-02-09 13:05:58 +01:00
parent 12b128784a
commit 76aac60664
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,42 @@
From 269de2e0bf5011072da2f40f4f2d4023fad696b9 Mon Sep 17 00:00:00 2001
From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Date: Tue, 7 Feb 2012 09:48:59 -0200
Subject: [PATCH 01/10] libkmod-module: probe: Fix ignore-loaded flag not
being applied
---
TODO | 3 +++
libkmod/libkmod-module.c | 3 ++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/TODO b/TODO
index 23d7c76..6ab11f1 100644
--- a/TODO
+++ b/TODO
@@ -38,6 +38,9 @@ Features:
* Stop using system() inside the library and use fork + exec instead
+* Add tests for --show-depends: we need to first trap calls to
+ kmod_module_get_path(), because it's printed to stdout/stderr.
+
Known Bugs:
===========
diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
index 0af3e2e..b5eb7c9 100644
--- a/libkmod/libkmod-module.c
+++ b/libkmod/libkmod-module.c
@@ -1132,7 +1132,8 @@ KMOD_EXPORT int kmod_module_probe_insert_module(struct kmod_module *mod,
if (mod == NULL)
return -ENOENT;
- if (module_is_inkernel(mod)) {
+ if (!(flags & KMOD_PROBE_IGNORE_LOADED)
+ && module_is_inkernel(mod)) {
if (flags & KMOD_PROBE_FAIL_ON_LOADED)
return -EEXIST;
else
--
1.7.9

View File

@ -1,6 +1,6 @@
Name: kmod Name: kmod
Version: 5 Version: 5
Release: 5%{?dist} Release: 6%{?dist}
Summary: Linux kernel module management utilities Summary: Linux kernel module management utilities
Group: System Environment/Kernel Group: System Environment/Kernel
@ -20,6 +20,7 @@ BuildRequires: xz-devel
Provides: module-init-tools = 4.0-1 Provides: module-init-tools = 4.0-1
Obsoletes: module-init-tools < 4.0-1 Obsoletes: module-init-tools < 4.0-1
Provides: /sbin/modprobe Provides: /sbin/modprobe
Patch1: 0001-libkmod-module-probe-Fix-ignore-loaded-flag-not-bein.patch
%description %description
The kmod package provides various programs needed for automatic The kmod package provides various programs needed for automatic
@ -47,6 +48,7 @@ applications that wish to load or unload Linux kernel modules.
%prep %prep
%setup -q %setup -q
%patch1 -p1
%build %build
%configure \ %configure \
@ -99,6 +101,10 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d
%{_libdir}/libkmod.so %{_libdir}/libkmod.so
%changelog %changelog
* Thu Feb 09 2012 Harald Hoyer <harald@redhat.com> 5-6
- add upstream patch to fix "modprobe --ignore-install --show-depends"
otherwise dracut misses a lot of modules, which are already loaded
* Wed Feb 08 2012 Harald Hoyer <harald@redhat.com> 5-5 * Wed Feb 08 2012 Harald Hoyer <harald@redhat.com> 5-5
- add "lsmod" - add "lsmod"