From de3c77de0c035dd795515a5941e4a1080464c61f250d1fdaea4aee19a7789753 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 31 May 2021 10:00:17 +0000 Subject: [PATCH] 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 --- kmod-testsuite.spec | 1 - kmod-usrmerge.patch | 68 --------------------------------------------- kmod.changes | 8 ++---- kmod.spec | 6 ---- 4 files changed, 2 insertions(+), 81 deletions(-) delete mode 100644 kmod-usrmerge.patch diff --git a/kmod-testsuite.spec b/kmod-testsuite.spec index b62c8ad..5b32048 100644 --- a/kmod-testsuite.spec +++ b/kmod-testsuite.spec @@ -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 diff --git a/kmod-usrmerge.patch b/kmod-usrmerge.patch deleted file mode 100644 index 026b845..0000000 --- a/kmod-usrmerge.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 6572069f71045f304780cb63a5a090a275fc22dd Mon Sep 17 00:00:00 2001 -From: Michal Suchanek -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 ---- - 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 @@ - - - -- /lib/depmod.d/*.conf - /usr/lib/depmod.d/*.conf - /usr/local/lib/depmod.d/*.conf - /run/depmod.d/*.conf -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 @@ - - - -- /lib/modprobe.d/*.conf - /usr/lib/modprobe.d/*.conf - /usr/local/lib/modprobe.d/*.conf - /run/modprobe.d/*.conf -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 - diff --git a/kmod.changes b/kmod.changes index 358ceb8..bef670a 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,12 +1,8 @@ ------------------------------------------------------------------- Sat May 29 09:58:09 UTC 2021 - Michal Suchanek -- 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 diff --git a/kmod.spec b/kmod.spec index b89ba1b..d14b9cd 100644 --- a/kmod.spec +++ b/kmod.spec @@ -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