summaryrefslogtreecommitdiff
path: root/app-emulation/virtualbox-modules
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/virtualbox-modules')
-rw-r--r--app-emulation/virtualbox-modules/Manifest3
-rw-r--r--app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.6-kernel-6.3.patch27
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-6.1.42-r1.ebuild61
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-7.0.6-r1.ebuild61
4 files changed, 152 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest
index c26c50dd2349..aa0d5be63d9a 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,7 +1,10 @@
AUX create_vbox_modules_tarball.sh 896 BLAKE2B 4153a8fa67cd8fe7187f3c4232691b1ded8e51315f41292f9fcc0adb294e9b235b0c2f1e91f6f728076ab85f687ea1ba2877dc44b511eaceb24e7d6e71a8bbd4 SHA512 c3154a13550817c581fa142e24081edfbdbc145315d34cc4569d12ad87a518fa0bf1443c053b50fdfdea6915bda1325ad973455ee85079294b83a49fd53f4771
+AUX virtualbox-modules-7.0.6-kernel-6.3.patch 1064 BLAKE2B cfdd3779ec7349c4fe9a13f9954dd1bce7ec98f76a6695c9b1e68e7939bdbd6251cd87fad15ad179effd4318722220cf4458495fe80229e3e3f986e9186c9be7 SHA512 b03845d549d3a2a4cf71eb24b723bb4ba401e08208ea9f3e02c1513afe1fe7a8ea75e9d2e051fc23cf183ee389fe661c4fa077bf10d15ba528109434b64b1875
AUX virtualbox.conf-r1 30 BLAKE2B 6308dedc75e2677cbdc844b53f51359e6b5745d3510636b04d08512122aeb6db81a1a18af156a8b9acccad395d390b24f9c27ed47413382cb6101266762de230 SHA512 5c6d31f527ca2db8d7fbeea759ac328eff42803d7940fd81ef12af22eb09f8913a0e561c35db1963e2a8b398ee288692817b5c8f3d439f2a6fd381769ec2ac8a
DIST vbox-kernel-module-src-6.1.42.tar.xz 679052 BLAKE2B d89324cee9cfc71e2762f5d2b7dfff33297b0d2eab5714ad9ddcfb762b1263ca17acbe5fdffe53170936fe0a0faffbc69989b62cdcc0b979f394fcff35f5b69c SHA512 3bb363c8f163b5958edc11c971122c35977275c0995eab832262277720c7486150939d50a0640170fa7a5cd32c1dc2918c5e3430ec90a836400d0a774b48d886
DIST vbox-kernel-module-src-7.0.6.tar.xz 718156 BLAKE2B 9f855482c77b14e233ed247f7d94df7c23a00e0f9fca27926921f8c18fa6ab2205075f1b9be61429cfbee325d5f22805c850c0c79fd4fa9ccf7668dcb714f345 SHA512 fca794fd36203b296ce14d7d06022360bb9d94a6e06d8d9c77cc0221f63a898b6482b423e7deb6bd7b0355ee98fc3c7bbe11c9a1fa5dcf1d634eebc4fe537dc3
+EBUILD virtualbox-modules-6.1.42-r1.ebuild 1932 BLAKE2B c850dc5b405aaf949124981f0a4a93209ba04b6e932fe8f69bde275c515685e7d9a35b3e83be8b192b4dfdb573b8e5a2f1ef3188248a1fa8157508ea3ae2dee1 SHA512 489c31a7c353fe14e2ca5e8dbf76ad9252615083cd7e95d92a98ce801c16815d2332d7157b97290ad94eb3c05900b8771403a24220c54b9dc230364fd6417c16
EBUILD virtualbox-modules-6.1.42.ebuild 1861 BLAKE2B 2a4bb02e3b4ac8627c1683a728546506b709d68cfa0e3aa8a5f957801ee88c9412639b570a38197727146d1826e322c219a95d94c8bdfedc987c524b25ea6056 SHA512 4f382baa17e4a514fdad4094cfdd8abac5f3891d8cd344c895693d1af97a036daf6102264d0563184d8d72f601f50ca1dcf8ef151a0939da3448f874a6d75ea2
+EBUILD virtualbox-modules-7.0.6-r1.ebuild 1932 BLAKE2B fdfba91492faf7d72d05a272cbd47666e791eacca1d08d32096bf69ca5865694ee010a23070b0170eba11762f9642146615bd1130e1be8b378c36e0835c44c2c SHA512 1d0411915cb264827c49d02dc83d10fb9cc44dfbe7eb82f2982db761b8805d9f5ff56d2d5fb9dd0ce469eebc3ec026b39dd39fbebac31a3aeab497a1866b8664
EBUILD virtualbox-modules-7.0.6.ebuild 1861 BLAKE2B f85afbdf42f018df9d567b5a6630b9b62745a78a116c7ce43db8b1bceab22bc481f58a5ba77225781eef1d3cf7e8d81c6829142917c3346044a3f59d36fabefa SHA512 a132c018784f1b16fac18257f4e33f68bf919c3d7cf3792aac18173a7cf01cd0efea2ddfba9a292f567ae62a39b4a35d95bd6d8fdb49970f1be74e51e2ad2bfb
MISC metadata.xml 255 BLAKE2B 9386ef3bdb55211441f303528b31f8ccd9ad9039744400e859574a424fa1f366a989fe78f5c10038f3dd9b06a6a389e4a7e643b3eac0dc93a79ac4cc3b4c5423 SHA512 6c158e12464285afd44b70d0653b65f65da1c523fc2b1b07eb6d2dec56f58234bb31cb9dc36238cd6dfc20031b4d58c04e7c1678cc9f917194403ad8a209513f
diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.6-kernel-6.3.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.6-kernel-6.3.patch
new file mode 100644
index 000000000000..3ea343791773
--- /dev/null
+++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.6-kernel-6.3.patch
@@ -0,0 +1,27 @@
+Linux: vboxdrv: Introduce initial support for kernel 6.3.x series, bugref:10381.
+https://www.virtualbox.org/changeset/98867/vbox
+
+Index: trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
+===================================================================
+--- a/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
++++ b/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
+@@ -1402,5 +1402,9 @@
+ {
+ flush_dcache_page(pMemLnx->apPages[rc]);
++#if RTLNX_VER_MIN(6,3,0)
++ vm_flags_set(papVMAs[rc], VM_DONTCOPY | VM_LOCKED);
++#else
+ papVMAs[rc]->vm_flags |= VM_DONTCOPY | VM_LOCKED;
++#endif
+ }
+
+@@ -1873,5 +1877,8 @@
+ /* Thes flags help making 100% sure some bad stuff wont happen (swap, core, ++).
+ * See remap_pfn_range() in mm/memory.c */
+-#if RTLNX_VER_MIN(3,7,0)
++
++#if RTLNX_VER_MIN(6,3,0)
++ vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP);
++#elif RTLNX_VER_MIN(3,7,0)
+ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
+ #else
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.42-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.42-r1.ebuild
new file mode 100644
index 000000000000..3258677a03ed
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.42-r1.ebuild
@@ -0,0 +1,61 @@
+# 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"
+
+PATCHES=(
+ "${FILESDIR}"/virtualbox-modules-7.0.6-kernel-6.3.patch
+)
+
+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
+}
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.6-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.6-r1.ebuild
new file mode 100644
index 000000000000..e4544d662bf5
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.6-r1.ebuild
@@ -0,0 +1,61 @@
+# 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"
+
+PATCHES=(
+ "${FILESDIR}"/virtualbox-modules-7.0.6-kernel-6.3.patch
+)
+
+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
+}