Re: [PATCH 2/4] libkmod, depmod: Load modprobe.d, depmod.d from $prefix/lib.

From: Jiri Slaby
Date: Wed Jul 12 2023 - 02:47:31 EST


On 11. 07. 23, 17:31, Michal Suchanek wrote:
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.

On some distributions /usr/lib and /lib are the same directory because
of a compatibility symlink, and it is possible to craft configuration
files with sideeffects that would behave differently when loaded twice.
However, the override semantic ensures that one 'overrides' the other,
and only one configuration file of the same name is loaded from any of
the seach directories.

search

...
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -17,9 +17,14 @@ EXTRA_DIST = $(MAN5:%.5=%.xml) $(MAN8:%.8=%.xml)
CLEANFILES = $(dist_man_MANS)
%.5 %.8: %.xml
- $(AM_V_XSLT)$(XSLT) \
+ $(AM_V_XSLT)if [ -n '$(prefix)' ] ; then \
+ sed -e 's|@PREFIX@|$(prefix)|g' $< ; \

Hmm, if prefix is empty, this will remove @PREFIX@. So why you need this 'if' at all?

+ else \
+ sed -e '/@PREFIX@/d' $< ; \
+ fi | \


--
js
suse labs