summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViorel Munteanu <ceamac.paragon@gmail.com>2022-11-02 07:56:28 +0200
committerViorel Munteanu <ceamac@gentoo.org>2022-11-02 08:39:42 +0200
commitd2b7e2ff93c216a518f05684921ed99c8c2af2bc (patch)
treeddabb99969b4e47af3589031fe0c94fdbe5dcf42
parentapp-emulation/virtualbox-guest-additions: add 7.0.2 (diff)
downloadgentoo-d2b7e2ff.tar.gz
gentoo-d2b7e2ff.tar.bz2
gentoo-d2b7e2ff.zip
app-emulation/virtualbox-modules: add 7.0.2
Drop pax-kernel support Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com> Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
-rw-r--r--app-emulation/virtualbox-modules/Manifest3
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-7.0.2.ebuild58
2 files changed, 59 insertions, 2 deletions
diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest
index f9ef789f86f8..dd1150faf86b 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,3 +1,2 @@
-DIST vbox-kernel-module-src-6.1.36.tar.xz 678624 BLAKE2B b09a9f4281287dc3a356e2af77fa024f06f64db41eac10efe8cf2b4ab39df292fac13a75247bdfa8b22dc3fbbc3747d217651da11c4788cfd08a2b6d775bb4f7 SHA512 b00c99a2db57c78c538539afc900ffa1e4729727f39ed68565a18c3fcbc28080d1ca340ee16f45e5616f535ce38ba646020a5373acc124a15821287fa29ddd52
-DIST vbox-kernel-module-src-6.1.38.tar.xz 678320 BLAKE2B 02fce9d8436e5e05cefae5e947c814470ff2898fa5ced2b734a7570e42fde2a84ecc98cbd2a3f0254443af1dd8131d541d565ecc4eb6a57ca88f7c638ed4994d SHA512 ef933e68942b847bd17ae9173d8c9963e12ffba73fe1d049e2fe9af10f720cc269ffdf7d2341ab75374f4737f4521c24316786574c0c71feb153a430c744eb0a
DIST vbox-kernel-module-src-6.1.40.tar.xz 680112 BLAKE2B 95bcb598bc3823c8bf4bfeb734a5d812a4830d072b186c999ed8632552550d0d21318bc50419fd18301cd6e8e58d091a4f6363c9ee86725d6bf8e74050b552d2 SHA512 8eec3c960077205d53b3d2a8367ce562edb02a6d90fe0a4bd06e1dfa256760e128b9895fc8005ceeb50a72eda6509533a28c6ee264d10a2cd30601ed5ced2eeb
+DIST vbox-kernel-module-src-7.0.2.tar.xz 719208 BLAKE2B 9e356c10b431f765dc7c13673c296b8acf6247304fe40f0a6accde30e1c1f2ab04f46ac18ac6350cb1c554f9d0aaf3cb831a5f737cbd7d50ae8efe48e312c8b4 SHA512 0c97b30ee14abeb62b9fbfe552da64f12f763cf3d35d5fda1dee595142f564f6220e61c15f73dcfd50853f4e4776bc73ba1808e5f78d7c2f5f2bf3522292d33e
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.2.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.2.ebuild
new file mode 100644
index 000000000000..701dc908bb24
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 2022 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://github.com/ceamac/virtualbox-modules-dist/releases/download/v${PV}/${MY_P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+S="${WORKDIR}"
+
+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"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ 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
+}