2021-01-13 10:00:05 +01:00
|
|
|
From: Michal Suchanek <msuchanek@suse.de>
|
|
|
|
Date: Tue, 12 Jan 2021 16:54:46 +0100
|
|
|
|
Subject: [PATCH] modprobe.d: load from /usr/lib.
|
|
|
|
|
|
|
|
There is an ongoing effort to limit use of files outside of /usr (or
|
|
|
|
$prefix on general). Currently all modprobe.d paths are hardcoded to
|
|
|
|
outside of $prefix. Teach kmod to load modprobe.d from $prefix/lib.
|
|
|
|
|
|
|
|
Cc: Marcus Rückert <mrueckert@suse.com>
|
|
|
|
Cc: Takashi Iwai <tiwai@suse.com>
|
|
|
|
Cc: Dominique Leuenberger <dimstar@opensuse.org>
|
|
|
|
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
|
2021-05-28 00:33:54 +02:00
|
|
|
|
|
|
|
From: Jan Engelhardt <jengelh@inai.de>
|
|
|
|
Date: 2021-05-28 00:17:47.552369139 +0200
|
|
|
|
|
|
|
|
If you make the build flexible and allow varying values for ``--sysconfdir``,
|
|
|
|
then permit the same for ``--prefix``.
|
|
|
|
|
|
|
|
An obvious side effect is that with little change, the unnecessary hard
|
|
|
|
dependency on merged /usr goes away.
|
2020-11-06 12:44:26 +01:00
|
|
|
---
|
2021-05-28 00:33:54 +02:00
|
|
|
Makefile.am | 1 +
|
|
|
|
libkmod/libkmod.c | 2 +-
|
|
|
|
man/modprobe.d.xml | 2 +-
|
|
|
|
tools/depmod.c | 2 +-
|
|
|
|
4 files changed, 4 insertions(+), 3 deletions(-)
|
2020-11-06 12:44:26 +01:00
|
|
|
|
2021-05-28 00:33:54 +02:00
|
|
|
Index: kmod-29/Makefile.am
|
|
|
|
===================================================================
|
|
|
|
--- kmod-29.orig/Makefile.am
|
|
|
|
+++ kmod-29/Makefile.am
|
2021-01-13 10:00:05 +01:00
|
|
|
@@ -19,6 +19,7 @@ AM_CPPFLAGS = \
|
|
|
|
-include $(top_builddir)/config.h \
|
|
|
|
-I$(top_srcdir) \
|
|
|
|
-DSYSCONFDIR=\""$(sysconfdir)"\" \
|
|
|
|
+ -DPREFIX=\""$(prefix)"\" \
|
|
|
|
${zlib_CFLAGS}
|
|
|
|
|
|
|
|
AM_CFLAGS = $(OUR_CFLAGS)
|
2021-05-28 00:33:54 +02:00
|
|
|
Index: kmod-29/libkmod/libkmod.c
|
|
|
|
===================================================================
|
|
|
|
--- kmod-29.orig/libkmod/libkmod.c
|
|
|
|
+++ kmod-29/libkmod/libkmod.c
|
|
|
|
@@ -65,7 +65,7 @@ static const char *default_config_paths[
|
2020-11-06 12:44:26 +01:00
|
|
|
SYSCONFDIR "/modprobe.d",
|
|
|
|
"/run/modprobe.d",
|
2021-05-28 00:33:54 +02:00
|
|
|
"/usr/local/lib/modprobe.d",
|
|
|
|
- "/lib/modprobe.d",
|
2021-01-13 10:00:05 +01:00
|
|
|
+ PREFIX "/lib/modprobe.d",
|
2020-11-06 12:44:26 +01:00
|
|
|
NULL
|
|
|
|
};
|
2021-01-13 10:00:05 +01:00
|
|
|
|
2021-05-28 00:33:54 +02:00
|
|
|
Index: kmod-29/man/modprobe.d.xml
|
|
|
|
===================================================================
|
|
|
|
--- kmod-29.orig/man/modprobe.d.xml
|
|
|
|
+++ kmod-29/man/modprobe.d.xml
|
|
|
|
@@ -40,7 +40,7 @@
|
2021-01-13 10:00:05 +01:00
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
2021-05-28 00:33:54 +02:00
|
|
|
- <para><filename>/lib/modprobe.d/*.conf</filename></para>
|
2021-01-13 10:00:05 +01:00
|
|
|
+ <para><filename>/usr/lib/modprobe.d/*.conf</filename></para>
|
2021-05-28 00:33:54 +02:00
|
|
|
<para><filename>/usr/local/lib/modprobe.d/*.conf</filename></para>
|
2021-01-13 10:00:05 +01:00
|
|
|
<para><filename>/run/modprobe.d/*.conf</filename></para>
|
2021-05-28 00:33:54 +02:00
|
|
|
<para><filename>/etc/modprobe.d/*.conf</filename></para>
|
|
|
|
Index: kmod-29/tools/depmod.c
|
|
|
|
===================================================================
|
|
|
|
--- kmod-29.orig/tools/depmod.c
|
|
|
|
+++ kmod-29/tools/depmod.c
|
|
|
|
@@ -54,7 +54,7 @@ static const char *default_cfg_paths[] =
|
|
|
|
SYSCONFDIR "/depmod.d",
|
|
|
|
"/run/depmod.d",
|
|
|
|
"/usr/local/lib/depmod.d",
|
|
|
|
- "/lib/depmod.d",
|
|
|
|
+ PREFIX "/lib/depmod.d",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|