Accepting request 896324 from home:michals

- /usr/lib should override /lib where both are available. Support /usr/lib for
  depmod.d as well.

OBS-URL: https://build.opensuse.org/request/show/896324
OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=189
This commit is contained in:
Jan Engelhardt 2021-05-31 10:00:17 +00:00 committed by Git OBS Bridge
parent d0a8f9a8ff
commit de3c77de0c
4 changed files with 2 additions and 81 deletions

View File

@ -37,7 +37,6 @@ Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch
Patch6: 0012-modprobe-print-unsupported-status.patch
Patch7: usr-lib-modprobe.patch
Patch8: no-stylesheet-download.patch
Patch9: kmod-usrmerge.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: docbook5-xsl-stylesheets

View File

@ -1,68 +0,0 @@
From 6572069f71045f304780cb63a5a090a275fc22dd Mon Sep 17 00:00:00 2001
From: Michal Suchanek <msuchanek@suse.de>
Date: Sat, 29 May 2021 08:10:36 +0200
Subject: [PATCH] modprobe.d, depmod.d: Only read from /usr/lib, not /lib.
With usrmerge /lib is linked to /usr/lib and the modprobe.d files would
be interpreted twice. It is possible to write non-idempotent modprobe.d
files leading to weird errors.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
libkmod/libkmod.c | 1 -
man/depmod.d.xml | 1 -
man/modprobe.d.xml | 1 -
tools/depmod.c | 1 -
4 files changed, 4 deletions(-)
diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c
index ddf13fb3d822..262f5d1512c9 100644
--- a/libkmod/libkmod.c
+++ b/libkmod/libkmod.c
@@ -66,7 +66,6 @@ static const char *default_config_paths[] = {
"/run/modprobe.d",
"/usr/local/lib/modprobe.d",
PREFIX "/lib/modprobe.d",
- "/lib/modprobe.d",
NULL
};
diff --git a/man/depmod.d.xml b/man/depmod.d.xml
index 8a898cf4a9eb..b315e931d635 100644
--- a/man/depmod.d.xml
+++ b/man/depmod.d.xml
@@ -39,7 +39,6 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/lib/depmod.d/*.conf</filename></para>
<para><filename>/usr/lib/depmod.d/*.conf</filename></para>
<para><filename>/usr/local/lib/depmod.d/*.conf</filename></para>
<para><filename>/run/depmod.d/*.conf</filename></para>
diff --git a/man/modprobe.d.xml b/man/modprobe.d.xml
index 8a7c696dcee1..08d789176dd3 100644
--- a/man/modprobe.d.xml
+++ b/man/modprobe.d.xml
@@ -40,7 +40,6 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/lib/modprobe.d/*.conf</filename></para>
<para><filename>/usr/lib/modprobe.d/*.conf</filename></para>
<para><filename>/usr/local/lib/modprobe.d/*.conf</filename></para>
<para><filename>/run/modprobe.d/*.conf</filename></para>
diff --git a/tools/depmod.c b/tools/depmod.c
index 8f6a4f8cd7cb..3a4708316581 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
@@ -55,7 +55,6 @@ static const char *default_cfg_paths[] = {
"/run/depmod.d",
"/usr/local/lib/depmod.d",
PREFIX "/lib/depmod.d",
- "/lib/depmod.d",
NULL
};
--
2.26.2

View File

@ -1,12 +1,8 @@
-------------------------------------------------------------------
Sat May 29 09:58:09 UTC 2021 - Michal Suchanek <msuchanek@suse.de>
- Adjust to usermerge. On Tumbleweed /lib and /usr/lib are the same directory
and the canonical location is in /usr. Document and read only /usr to prevent
reading the same file twice.
On earlier releases preserve compatibility for files placed in /lib and read
both.
+ kmod-usrmerge.patch
- /usr/lib should override /lib where both are available. Support /usr/lib for
depmod.d as well.
* Refresh usr-lib-modprobe.patch
- Remove test patches included in release 29
- kmod-populate-modules-Use-more-bash-more-quotes.patch

View File

@ -37,7 +37,6 @@ Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch
Patch6: 0012-modprobe-print-unsupported-status.patch
Patch7: usr-lib-modprobe.patch
Patch8: no-stylesheet-download.patch
Patch9: kmod-usrmerge.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: docbook5-xsl-stylesheets
@ -101,11 +100,6 @@ in %lname.
%prep
%autosetup -p1
# When not on tumbleweed read both /lib and /usr/lib
# on Tumbleweed /lib and /usr/lib are the same - don't apply files twice
%if 0%{?suse_version} <= 1500
%patch9 -p1 -R
%endif
%build
autoreconf -fi