Gentoo Archives: gentoo-commits

From: Viorel Munteanu <ceamac@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-modules/
Date: Wed, 02 Nov 2022 06:41:45
Message-Id: 1667371182.d2b7e2ff93c216a518f05684921ed99c8c2af2bc.ceamac@gentoo
1 commit: d2b7e2ff93c216a518f05684921ed99c8c2af2bc
2 Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
3 AuthorDate: Wed Nov 2 05:56:28 2022 +0000
4 Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 2 06:39:42 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2b7e2ff
7
8 app-emulation/virtualbox-modules: add 7.0.2
9
10 Drop pax-kernel support
11
12 Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com>
13 Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>
14
15 app-emulation/virtualbox-modules/Manifest | 3 +-
16 .../virtualbox-modules-7.0.2.ebuild | 58 ++++++++++++++++++++++
17 2 files changed, 59 insertions(+), 2 deletions(-)
18
19 diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest
20 index f9ef789f86f8..dd1150faf86b 100644
21 --- a/app-emulation/virtualbox-modules/Manifest
22 +++ b/app-emulation/virtualbox-modules/Manifest
23 @@ -1,3 +1,2 @@
24 -DIST vbox-kernel-module-src-6.1.36.tar.xz 678624 BLAKE2B b09a9f4281287dc3a356e2af77fa024f06f64db41eac10efe8cf2b4ab39df292fac13a75247bdfa8b22dc3fbbc3747d217651da11c4788cfd08a2b6d775bb4f7 SHA512 b00c99a2db57c78c538539afc900ffa1e4729727f39ed68565a18c3fcbc28080d1ca340ee16f45e5616f535ce38ba646020a5373acc124a15821287fa29ddd52
25 -DIST vbox-kernel-module-src-6.1.38.tar.xz 678320 BLAKE2B 02fce9d8436e5e05cefae5e947c814470ff2898fa5ced2b734a7570e42fde2a84ecc98cbd2a3f0254443af1dd8131d541d565ecc4eb6a57ca88f7c638ed4994d SHA512 ef933e68942b847bd17ae9173d8c9963e12ffba73fe1d049e2fe9af10f720cc269ffdf7d2341ab75374f4737f4521c24316786574c0c71feb153a430c744eb0a
26 DIST vbox-kernel-module-src-6.1.40.tar.xz 680112 BLAKE2B 95bcb598bc3823c8bf4bfeb734a5d812a4830d072b186c999ed8632552550d0d21318bc50419fd18301cd6e8e58d091a4f6363c9ee86725d6bf8e74050b552d2 SHA512 8eec3c960077205d53b3d2a8367ce562edb02a6d90fe0a4bd06e1dfa256760e128b9895fc8005ceeb50a72eda6509533a28c6ee264d10a2cd30601ed5ced2eeb
27 +DIST vbox-kernel-module-src-7.0.2.tar.xz 719208 BLAKE2B 9e356c10b431f765dc7c13673c296b8acf6247304fe40f0a6accde30e1c1f2ab04f46ac18ac6350cb1c554f9d0aaf3cb831a5f737cbd7d50ae8efe48e312c8b4 SHA512 0c97b30ee14abeb62b9fbfe552da64f12f763cf3d35d5fda1dee595142f564f6220e61c15f73dcfd50853f4e4776bc73ba1808e5f78d7c2f5f2bf3522292d33e
28
29 diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.2.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.2.ebuild
30 new file mode 100644
31 index 000000000000..701dc908bb24
32 --- /dev/null
33 +++ b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.2.ebuild
34 @@ -0,0 +1,58 @@
35 +# Copyright 2022 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +# XXX: the tarball here is just the kernel modules split out of the binary
39 +# package that comes from VirtualBox-*.run
40 +# XXX: update: now it is split from virtualbox-*-Debian~bullseye_amd64.deb
41 +
42 +EAPI=8
43 +
44 +inherit linux-mod toolchain-funcs
45 +
46 +MY_P="vbox-kernel-module-src-${PV}"
47 +DESCRIPTION="Kernel Modules for Virtualbox"
48 +HOMEPAGE="https://www.virtualbox.org/"
49 +SRC_URI="https://github.com/ceamac/virtualbox-modules-dist/releases/download/v${PV}/${MY_P}.tar.xz"
50 +
51 +LICENSE="GPL-3"
52 +SLOT="0/$(ver_cut 1-2)"
53 +KEYWORDS="~amd64"
54 +
55 +S="${WORKDIR}"
56 +
57 +BUILD_TARGETS="all"
58 +MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})"
59 +MODULESD_VBOXDRV_ENABLED="yes"
60 +MODULESD_VBOXNETADP_ENABLED="no"
61 +MODULESD_VBOXNETFLT_ENABLED="no"
62 +
63 +pkg_setup() {
64 + linux-mod_pkg_setup
65 + BUILD_PARAMS="CC=\"$(tc-getBUILD_CC)\" KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
66 + if linux_chkconfig_present CC_IS_CLANG; then
67 + ewarn "Warning: building ${PN} with a clang-built kernel is experimental."
68 +
69 + BUILD_PARAMS+=' CC=${CHOST}-clang'
70 + if linux_chkconfig_present LD_IS_LLD; then
71 + BUILD_PARAMS+=' LD=ld.lld'
72 + if linux_chkconfig_present LTO_CLANG_THIN; then
73 + # kernel enables cache by default leading to sandbox violations
74 + BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir='
75 + fi
76 + fi
77 + fi
78 +}
79 +
80 +src_install() {
81 + linux-mod_src_install
82 + insinto /usr/lib/modules-load.d/
83 + newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
84 +}
85 +
86 +pkg_postinst() {
87 + # Remove vboxpci.ko from current running kernel
88 + # This module is obsolete, removed in december 2019, so it may be missing. No || die
89 + # TODO: consider removing this line in the near future
90 + find /lib/modules/${KV_FULL}/misc -type f -name "vboxpci.ko" -delete
91 + linux-mod_pkg_postinst
92 +}