diff options
author | Viorel Munteanu <ceamac@gentoo.org> | 2023-04-18 19:45:22 +0300 |
---|---|---|
committer | Viorel Munteanu <ceamac@gentoo.org> | 2023-04-21 19:35:22 +0300 |
commit | 7c0bce2f517147970c05ac7c809ff31b83477509 (patch) | |
tree | 068b565a23438279f1a1abcb1514d65389cfb1b7 /app-emulation | |
parent | app-emulation/virtualbox-modules: add 6.1.44 (diff) | |
download | gentoo-7c0bce2f517147970c05ac7c809ff31b83477509.tar.gz gentoo-7c0bce2f517147970c05ac7c809ff31b83477509.tar.bz2 gentoo-7c0bce2f517147970c05ac7c809ff31b83477509.zip |
app-emulation/virtualbox-modules: add 7.0.8
Bug: https://bugs.gentoo.org/760102
Closes: https://bugs.gentoo.org/880229
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/virtualbox-modules/Manifest | 1 | ||||
-rw-r--r-- | app-emulation/virtualbox-modules/virtualbox-modules-7.0.8.ebuild | 81 |
2 files changed, 82 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest index 0d9ec86a218d..5abd73514c14 100644 --- a/app-emulation/virtualbox-modules/Manifest +++ b/app-emulation/virtualbox-modules/Manifest @@ -1,3 +1,4 @@ DIST vbox-kernel-module-src-6.1.42.tar.xz 679052 BLAKE2B d89324cee9cfc71e2762f5d2b7dfff33297b0d2eab5714ad9ddcfb762b1263ca17acbe5fdffe53170936fe0a0faffbc69989b62cdcc0b979f394fcff35f5b69c SHA512 3bb363c8f163b5958edc11c971122c35977275c0995eab832262277720c7486150939d50a0640170fa7a5cd32c1dc2918c5e3430ec90a836400d0a774b48d886 DIST vbox-kernel-module-src-6.1.44.tar.xz 678920 BLAKE2B d18bd899205b1baa476b6a17b29c8f210238ddcf5949dd5f7b73e06854c85a816422b8f24045d3d0c1adb3cf1fcadbe089e61c2b9764262a14b04b2beaede8be SHA512 a682c94e61ad1c6090223348522123ee7ba87cdd69aaa0bc09a268068bebc2f9d7c8a156c52d82237999f26664790dddb1c8aca72ac4b5ba2133e35086f6516c DIST vbox-kernel-module-src-7.0.6.tar.xz 718156 BLAKE2B 9f855482c77b14e233ed247f7d94df7c23a00e0f9fca27926921f8c18fa6ab2205075f1b9be61429cfbee325d5f22805c850c0c79fd4fa9ccf7668dcb714f345 SHA512 fca794fd36203b296ce14d7d06022360bb9d94a6e06d8d9c77cc0221f63a898b6482b423e7deb6bd7b0355ee98fc3c7bbe11c9a1fa5dcf1d634eebc4fe537dc3 +DIST vbox-kernel-module-src-7.0.8.tar.xz 718032 BLAKE2B f8993f6668d12f6bb6a4ab81376e02b11f806012e9ef101ab7d1cbe17004ce34c9214691e1047aa0b5a82b25b91521b9c9ab20a8b7638136cc64e44f1dda89e6 SHA512 5f56a94cdac2490a2dfea3f006f7fb0229e7467d7a71029063c200d42dbf4fbeb65d3d0612f862c5c303f8cd5b60a9ab58dc7a8f593f128e7e6b3f89c53eaefc diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.8.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.8.ebuild new file mode 100644 index 000000000000..b492291d280a --- /dev/null +++ b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.8.ebuild @@ -0,0 +1,81 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# XXX: the tarball here is just the kernel modules split out of the binary +# package that comes from VirtualBox-*.run +# XXX: update: now it is split from virtualbox-*-Debian~bullseye_amd64.deb + +EAPI=8 + +inherit linux-mod toolchain-funcs + +MY_P="vbox-kernel-module-src-${PV}" +DESCRIPTION="Kernel Modules for Virtualbox" +HOMEPAGE="https://www.virtualbox.org/" +SRC_URI="https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${MY_P}.tar.xz" +S="${WORKDIR}" + +LICENSE="GPL-3" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" + +BUILD_TARGETS="all" +MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})" +MODULESD_VBOXDRV_ENABLED="yes" +MODULESD_VBOXNETADP_ENABLED="no" +MODULESD_VBOXNETFLT_ENABLED="no" +CONFIG_CHECK="~!SPINLOCK JUMP_LABEL" + +# Check if the build directory exists and all directories above it have sane permissions +virtualbox_check_kv_dir() { + if [[ ! -d ${KV_DIR} ]]; then + elog "Directory not found: ${KV_DIR}" + local a=$(dirname "${KV_DIR}") + while [[ -n $a && $a != '/' ]]; do + if [[ -d $a && ( ! -r $a || ! -x $a ) ]]; then + elog "Please check permissions of $a" + fi + a=$(dirname "$a") + done + return 1 + fi + return 0 +} + +pkg_pretend() { + # bug 893286 + get_version + virtualbox_check_kv_dir +} + +pkg_setup() { + linux-mod_pkg_setup + virtualbox_check_kv_dir || die + BUILD_PARAMS="CC=\"$(tc-getBUILD_CC)\" KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1" + if linux_chkconfig_present CC_IS_CLANG; then + ewarn "Warning: building ${PN} with a clang-built kernel is experimental." + + BUILD_PARAMS+=' CC=${CHOST}-clang' + if linux_chkconfig_present LD_IS_LLD; then + BUILD_PARAMS+=' LD=ld.lld' + if linux_chkconfig_present LTO_CLANG_THIN; then + # kernel enables cache by default leading to sandbox violations + BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir=' + fi + fi + fi +} + +src_install() { + linux-mod_src_install + insinto /usr/lib/modules-load.d/ + newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf +} + +pkg_postinst() { + # Remove vboxpci.ko from current running kernel + # This module is obsolete, removed in december 2019, so it may be missing. No || die + # TODO: consider removing this line in the near future + find /lib/modules/${KV_FULL}/misc -type f -name "vboxpci.ko" -delete + linux-mod_pkg_postinst +} |