commit:     e0f3f9da51b19053e04e59e723257f357bddb5d2
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  7 22:18:33 2024 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Mar  7 22:18:33 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0f3f9da

sys-apps/kmod: move modprobe to /sbin on split-usr

The kernel calls /sbin/modprobe by default, so we need to match that.

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-apps/kmod/{kmod-32.ebuild => kmod-32-r1.ebuild} | 8 +++++++-
 sys-apps/kmod/kmod-9999.ebuild                      | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/sys-apps/kmod/kmod-32.ebuild b/sys-apps/kmod/kmod-32-r1.ebuild
similarity index 93%
rename from sys-apps/kmod/kmod-32.ebuild
rename to sys-apps/kmod/kmod-32-r1.ebuild
index 531212bc23bc..341d36a4f5e2 100644
--- a/sys-apps/kmod/kmod-32.ebuild
+++ b/sys-apps/kmod/kmod-32-r1.ebuild
@@ -18,7 +18,7 @@ fi
 
 LICENSE="LGPL-2"
 SLOT="0"
-IUSE="debug doc +lzma pkcs7 static-libs +tools +zlib +zstd"
+IUSE="debug doc +lzma pkcs7 split-usr static-libs +tools +zlib +zstd"
 
 # Upstream does not support running the test suite with custom configure flags.
 # I was also told that the test suite is intended for kmod developers.
@@ -99,6 +99,12 @@ src_install() {
 
        find "${ED}" -type f -name "*.la" -delete || die
 
+       if use tools && use split-usr; then
+               # Move modprobe to /sbin to match CONFIG_MODPROBE_PATH from 
kernel
+               rm "${ED}/usr/bin/modprobe" || die
+               dosym ../usr/bin/kmod /sbin/modprobe
+       fi
+
        cat <<-EOF > "${T}"/usb-load-ehci-first.conf
        softdep uhci_hcd pre: ehci_hcd
        softdep ohci_hcd pre: ehci_hcd

diff --git a/sys-apps/kmod/kmod-9999.ebuild b/sys-apps/kmod/kmod-9999.ebuild
index 531212bc23bc..341d36a4f5e2 100644
--- a/sys-apps/kmod/kmod-9999.ebuild
+++ b/sys-apps/kmod/kmod-9999.ebuild
@@ -18,7 +18,7 @@ fi
 
 LICENSE="LGPL-2"
 SLOT="0"
-IUSE="debug doc +lzma pkcs7 static-libs +tools +zlib +zstd"
+IUSE="debug doc +lzma pkcs7 split-usr static-libs +tools +zlib +zstd"
 
 # Upstream does not support running the test suite with custom configure flags.
 # I was also told that the test suite is intended for kmod developers.
@@ -99,6 +99,12 @@ src_install() {
 
        find "${ED}" -type f -name "*.la" -delete || die
 
+       if use tools && use split-usr; then
+               # Move modprobe to /sbin to match CONFIG_MODPROBE_PATH from 
kernel
+               rm "${ED}/usr/bin/modprobe" || die
+               dosym ../usr/bin/kmod /sbin/modprobe
+       fi
+
        cat <<-EOF > "${T}"/usb-load-ehci-first.conf
        softdep uhci_hcd pre: ehci_hcd
        softdep ohci_hcd pre: ehci_hcd

Reply via email to