summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViorel Munteanu <ceamac@gentoo.org>2023-04-18 19:43:48 +0300
committerViorel Munteanu <ceamac@gentoo.org>2023-04-21 19:35:22 +0300
commit3c47781472a64217a3dfef9c94968e1fa6b83858 (patch)
treef63a37aa05ca44e86edf4b17d50255bed840df91 /app-emulation
parentdev-util/kbuild: add 0.1.9998.3592 (diff)
downloadgentoo-3c47781472a64217a3dfef9c94968e1fa6b83858.tar.gz
gentoo-3c47781472a64217a3dfef9c94968e1fa6b83858.tar.bz2
gentoo-3c47781472a64217a3dfef9c94968e1fa6b83858.zip
app-emulation/virtualbox-modules: add 6.1.44
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/virtualbox-modules/Manifest1
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-6.1.44.ebuild81
2 files changed, 82 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest
index c5eb20b15cf8..0d9ec86a218d 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,2 +1,3 @@
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
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.44.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.44.ebuild
new file mode 100644
index 000000000000..9ecbdb504d37
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.44.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-2"
+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
+}