Re: [PATCH] modprobe.d: load from /usr/lib.
flat view
From: Michal Suchánek <hidden>
Date: 2021-01-14 09:55:36
Hello, On Wed, Jan 13, 2021 at 06:08:41AM -0800, Lucas De Marchi wrote:
On Tue, Jan 12, 2021 at 2:22 PM Dmitry V. Levin [off-list ref] wrote:quoted
On Tue, Jan 12, 2021 at 12:56:05PM -0800, Lucas De Marchi wrote:quoted
On Tue, Jan 12, 2021 at 8:06 AM Michal Suchanek [off-list ref] wrote:quoted
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./lib came from module-init-tools and we kept it for compatibility. It became a non-issue when distros decided to just merge them and do a symlink /lib -> /usr/lib following https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/ what distros didn't do that?FWiW, we decided not to do TheUsrMerge at all.It looks like we will need to put this behind a compilation option then: --enable-split-usr. Then we only add the additional dir if split-usr is being used.
We could also stat the directories and skip the current one if it's the same as the last one.
If it's not used, we may actually change the path and corresponding docs to move it to /usr, but that is another separate change.
Yes, the man page uses hardcoded paths rather than the actual paths. There is no support for expanding configure variables in it at the moment. Thanks Michal