HomeFreeBSD

Fix "make install" with DESTDIR set (#16995)

Description

Fix "make install" with DESTDIR set (#16995)

"DESTDIR=/path/to/target/root/ make install" may fail when installing to
a root that contains an existing lib/modules structure. When run as root
we may even affect the wrong kernel (the build system's one, or, if
running a different version, some other directory in /lib/modules, but
not the desired one installed in DESTDIR).

Add a missing reference to the INSTALL_MOD_PATH root when calling
"depmod" during "make install"

Also add a switch "DONT_DELETE_MODULES_FILES=1" that skips the removal
of files named "modules.*" prior to running depmod.

Signed-off-by: Christian Kohlschütter <christian@kohlschutter.com>
Closes #16994

Reviewed-by: Rob Norris <robn@despairlabs.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>

Details

Provenance
Dr. Christian Kohlschütter <christian@kohlschutter.com>Authored on Feb 8 2025, 12:38 AM
GitHub <noreply@github.com>Committed on Feb 8 2025, 12:38 AM
Parents
rGc2458ba921a8: optimize recv_fix_encryption_hierarchy()
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGd2147de319b3: Fix "make install" with DESTDIR set (#16995) (authored by Dr. Christian Kohlschütter <christian@kohlschutter.com>).Feb 8 2025, 12:38 AM