From 802a30f236390234d24e119aff81b36fa5adf5a0 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Mon, 20 Jul 2020 10:33:50 +0200 Subject: virtualbox packages: Bump to versions 5.2.44, 6.0.24 and 6.1.12 Closes: https://bugs.gentoo.org/704700 Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Lars Wendler --- app-emulation/virtualbox-guest-additions/Manifest | 6 + .../virtualbox-guest-additions-5.2.44.ebuild | 232 +++++++++++++++++++++ .../virtualbox-guest-additions-6.0.24.ebuild | 219 +++++++++++++++++++ .../virtualbox-guest-additions-6.1.12a.ebuild | 221 ++++++++++++++++++++ 4 files changed, 678 insertions(+) create mode 100644 app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.44.ebuild create mode 100644 app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.24.ebuild create mode 100644 app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.12a.ebuild (limited to 'app-emulation/virtualbox-guest-additions') diff --git a/app-emulation/virtualbox-guest-additions/Manifest b/app-emulation/virtualbox-guest-additions/Manifest index e50d741be1c5..571bee7dc444 100644 --- a/app-emulation/virtualbox-guest-additions/Manifest +++ b/app-emulation/virtualbox-guest-additions/Manifest @@ -1,11 +1,17 @@ DIST VirtualBox-5.2.40.tar.bz2 118285273 BLAKE2B 5d1fa572522c0a4d0124b49d68ec6f2bf240431bbe9ebd3dcf34252cc4710ec158c295c3cdb9628f045ce672a840b251b644cd92131cd4ff5ec9eab958609bc6 SHA512 3632c7184593350e484b055f85040f2a1883db4c228b04dc41e36d60de6e3123284cc9eb89ee0eba68bcd317dfdf1a5bb8594738108ea642528cafba965f3a18 DIST VirtualBox-5.2.42.tar.bz2 124013981 BLAKE2B e22c80861727b14175db6eb476e78ad620e35cdfd480e83331306bbc251e1cf6d21a3dba15b0db1c516c530f0a58dca7d9c70748c8b194a2cf5fe7dfc9c0b80c SHA512 d396d34c0cbc652ad66b7c0e5b8bf206f29e751612543173f01f498f16e113ace0da64e674cd398c1fc0309f46ff99823c8b1000ffc8a7a453bcf8646af2900a +DIST VirtualBox-5.2.44.tar.bz2 124016934 BLAKE2B da75f107a16d28663a491846a730541b406b68b34962c5ac8bbaee5c05558a2ca1a80ebe67b993bad95b0df5ea5f599e33d037d566e03427dff7e02769ac14d6 SHA512 329b5f8bc4902214d740b2089731c41d1185e76621a5438045e13d03dae739f902fb159b70cb22d1fecbecdf5c2b516ef49ad426cdc606a018e65713dec4ed26 DIST VirtualBox-6.0.20.tar.bz2 154286741 BLAKE2B e5000919dd21ebca52a508e88a54d404c0cbceb9c101d47d146b45af2509f1e922403e0ea05753dac7293870f64f8c3e478fa0c0a77611f35a3f3ce52b1fa4c1 SHA512 0ecfcc68514ca89f9bee818c43e19e999561798cba72afa27f44a46bf53c7e45e05371d973fc76b7af003e85528b19b3156531fd9bf9a0d5f30dc53665e2f48f DIST VirtualBox-6.0.22.tar.bz2 159831666 BLAKE2B 7c8878aec9ce1d5caf44677fa64119f0c0e99a111780a68c93702ff6681c48760d9622e91260b92096ca881fdf715bcb382e6eb2112b82567232b0014f1d975d SHA512 83aa7469e99abbe2d9da99102fb4e15bc5347bae06fe954f82d07eaaeccded1d92cf56b01c238c6cbc2b611fcb30e5dd6af91444278c166529c5b8972acdb657 +DIST VirtualBox-6.0.24.tar.bz2 159833756 BLAKE2B 321f7988a5b55a794e2d51937a0752d96eaefb376c12e2fb23be08dff81b164153e19a7d5963a0404f630fb38d6047b9d954a67923f26b2aa16d861a0c6a1b63 SHA512 e6f98d0036cdebc52c78c5ddbce369d9ef0a036c366647b299060e1ccf6942f6b6f899201dfa08c410a039f353b767a41a0d14579c741dc5c034a035cb16c534 DIST VirtualBox-6.1.10.tar.bz2 164989732 BLAKE2B 0f6d681462245dec10f651c1fac9e7ff5ee1e361d86cb764d84df46a4a51a0e413f8b1ab233e34af53fa3fda14ca17542e4d5c148e857548e03ff80ad2af22ee SHA512 729840d669281ed3ba2936923a50410e52bcec3fcfd5b6b740d5991aa1c25c2a8f5a5a05b4e3e39ef1a271ab3431d4c4f4b3a1262703d1e281d7111f0d4e8a3b +DIST VirtualBox-6.1.12a.tar.bz2 165246721 BLAKE2B e9ee7c10d92b151ab10833c68d0c71a09419bba4dbf86f21401263a98273f5ad5cf628347215d641e80e11d8e77bafeda606822cdd4d02344490fca6b95814ef SHA512 27fe66daf7fa254d9fc4a2cca4a8bbcfbfe6c3387a9f4a740c8ac1297587b5083bccbeef97dcc4e482c4974c843450212e02415b4952eb38b82e179615741193 DIST VirtualBox-6.1.6.tar.bz2 159389496 BLAKE2B 00a5dd823e3136417b075aac2f526f954b5bcaad828cb6abcbd5b3ad7412c4afe8d499e0fb2a8897f4cdab7e7084e848fde69a0d8e355c14767eafde21ebac46 SHA512 4a94417fe69c40755b55526cee67068ca8d32e71e5b6ebe0cccf46062dfb4ee76b33ac92f8b8f4748d438eda1714129360fdbaa39c16df3877b20109a7c6439a DIST virtualbox-5.2.36-patches-01.tar.xz 3440 BLAKE2B 66749efba87d82ed4a11ff09444c68f86f82a360e9dbb44fa6072d6c28120f3c23cff8c15bacbd38bce8b69b3d8f35c4d3d493684df962ea6e353eec413dcc38 SHA512 3cf2526d209a54e94cd94840793769fd96fa988e21555d76eda2207a7f87e04b446a28ac6c8a2954e7c00a35107c144cadaec276d171214acdcc2900eb41306c +DIST virtualbox-5.2.44-patches-01.tar.xz 3608 BLAKE2B 6656f1eef7281dcd89e685cfc5403a6e7cd8d3f226d8cca8efa12c2c20339cb68b6f9b259c3de7925fc55433aa93ef7552dfe0441b9ef4a17a733282f791a62e SHA512 0f6a78e9b60b4fff71e87ba13c6a2af255a234f64e2a5f2be79aaf52146e2ab94c0e52def9096a32baf67c66e048f7ae9606a5e4010e9a1de5f31eec831ee892 DIST virtualbox-6.0.20-patches-01.tar.xz 3464 BLAKE2B dbfd15322edf178e752139c6f82be966422ff0d3c5d914fe8d4b6980f5805d27552dc813e97ea17665004d5f6cc3486461732edaaeabdd59cd1799b2ee85af06 SHA512 04f0c9d0565c77bca334cbcfd8ac439dff1a1d8246dbea3f5e06035eff6f6dd72b54f2227d6197e2851e418ad74bb4feeef07e442f3441bc75d80a72d0d0e00d DIST virtualbox-6.0.22-patches-01.tar.xz 3464 BLAKE2B 03ec3460f1f072c4f673e14a66b1f36de95f55c0c893482434049e077e0eff6d3724a8f1f6046d5ddff66675a9a39ecd2e40a6f43904bd575ba86505ed5e0ade SHA512 44875f8eda2e433bfe3b85551d3157c5b5d1740689e05c54772c78f9feba80ed08df88f99f9dd0d0f26d0912b00919e7ed5c38583a8ddc8e8e7e962d89cd2374 +DIST virtualbox-6.0.24-patches-01.tar.xz 3640 BLAKE2B e55c30395978471edd0f291cd34ecb772cce2f27bea88c6fe348e83046777638be9bdd36bf3a2fd1967357ea7ff53936398cd94ee74d8e55d31c1896069404ff SHA512 b8d9395083769a641a5d7f78ac734a86220fec817e3e49461208f8e72ef7d11c19fe4507e6766fe7c8c815c9888f793fd66f3fae36d6e3a217e53620b5d95029 DIST virtualbox-6.1.0_rc1-patches-01.tar.xz 2152 BLAKE2B 5ca1aa008d0a4bd2d8ff4e8b02e506f2bdd68d41b1ae6a733362925b12a82e4f26b4040817800342c69be8e1eec73477d1731e05eb677d09948ed59881be190c SHA512 31f5b77cc86e7fe83e08df956639f50b9936aeab32d98d8f8800c4fa762245a7e6784189409006f82f8ed4bbdadbad7249e2663063448f3f0b0e157acfba6c42 DIST virtualbox-6.1.10-patches-01.tar.xz 2640 BLAKE2B 4aeeb596bcaf6b57a707c08211408d760092187710ce468f3e60bb7e66f22b04db4f4c58d06cea4cf7d4b69c9cfd2ebee5c2c5b8b93766097cf8c7cf9ebd8ae5 SHA512 24393d6e7cb62b65d79dc407f25fba42994d37a761c6c111ab952800715b1ee966ba4f7403a4e79fbf67035c72ef5aa3d1f203bdd69c6078894564018aa284c0 +DIST virtualbox-6.1.12-patches-01.tar.xz 2528 BLAKE2B a5d7cde0daea41bee2e40e46569c725769927a31865d99d13b8b13c4903e59b4097f85da15dc592b9c7e8baf8ff805397af827620f107ba09a468b4d1198ecab SHA512 f71d10a9fbce99c3f631ef30bcfa9d0e017e702ac509541b039e08ccbcd024beb93fde09c43d90af5d9d28f6842a7947f20e7950d3897da3e6d57859657e1123 diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.44.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.44.ebuild new file mode 100644 index 000000000000..7c62694fd2ac --- /dev/null +++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.44.ebuild @@ -0,0 +1,232 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit linux-mod systemd user toolchain-funcs + +MY_PV="${PV/beta/BETA}" +MY_PV="${MY_PV/rc/RC}" +MY_P="VirtualBox-${MY_PV}" +DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests" +HOMEPAGE="https://www.virtualbox.org/" +SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2 + https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-5.2.44-patches-01.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="X" + +RDEPEND=" + X? ( x11-apps/xrandr + x11-apps/xrefresh + x11-libs/libXmu + x11-libs/libX11 + x11-libs/libXt + x11-libs/libXext + x11-libs/libXau + x11-libs/libXdmcp + x11-libs/libSM + x11-libs/libICE ) + sys-apps/dbus +" +DEPEND=" + ${RDEPEND} + >=dev-util/kbuild-0.1.9998.3127 + >=dev-lang/yasm-0.6.2 + sys-devel/bin86 + sys-libs/pam + sys-power/iasl + x11-base/xorg-proto +" +PDEPEND=" + X? ( x11-drivers/xf86-video-vboxvideo ) +" +BUILD_TARGETS="all" +BUILD_TARGET_ARCH="${ARCH}" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + export DISTCC_DISABLE=1 #674256 + MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest) + vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)" + use X && MODULE_NAMES+=" vboxvideo(misc:${WORKDIR}/vboxvideo::${WORKDIR}/vboxvideo)" + + linux-mod_pkg_setup + BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR} KBUILD_EXTRA_SYMBOLS=${S}/Module.symvers" +} + +src_unpack() { + unpack ${A} + + # Create and unpack a tarball with the sources of the Linux guest + # kernel modules, to include all the needed files + "${S}"/src/VBox/Additions/linux/export_modules.sh "${WORKDIR}/vbox-kmod.tar.gz" + unpack ./vbox-kmod.tar.gz + + # Remove shipped binaries (kBuild,yasm), see bug #232775 + cd "${S}" + rm -rf kBuild/bin tools +} + +src_prepare() { + # PaX fixes (see bug #298988) + pushd "${WORKDIR}" &>/dev/null || die + eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch + popd &>/dev/null || die + + # Disable things unused or splitted into separate ebuilds + cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die + use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk + + # stupid new header references... + local vboxheader mdir + for vboxheader in {product,revision,version}-generated.h ; do + for mdir in vbox{guest,sf} ; do + ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \ + "${WORKDIR}/${mdir}/${vboxheader}" + done + done + + # Remove pointless GCC version check + sed -e '/^check_gcc$/d' -i configure || die + + rm "${WORKDIR}/patches/008_virtualbox-4.3.14-missing_define.patch" || die + eapply "${WORKDIR}/patches" + + eapply_user +} + +src_configure() { + # build the user-space tools, warnings are harmless + local cmd=( + ./configure + --nofatal + --disable-xpcom + --disable-sdl-ttf + --disable-pulse + --disable-alsa + --with-gcc="$(tc-getCC)" + --with-g++="$(tc-getCXX)" + --target-arch=${ARCH} + --with-linux="${KV_OUT_DIR}" + --build-headless + ) + echo "${cmd[@]}" + "${cmd[@]}" || die "configure failed" + source ./env.sh + export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}" +} + +src_compile() { + MAKE="kmk" emake\ + VBOX_BUILD_PUBLISHER=_Gentoo \ + TOOL_GXX3_CC="$(tc-getCC)" TOOL_GXX3_CXX="$(tc-getCXX)" \ + TOOL_GXX3_LD="$(tc-getCXX)" VBOX_GCC_OPT="${CXXFLAGS}" \ + TOOL_YASM_AS=yasm \ + VBOX_ONLY_ADDITIONS=1 \ + KBUILD_VERBOSE=2 + + # Now creating the kernel modules. We must do this _after_ + # we compiled the user-space tools as we need two of the + # automatically generated header files. (>=3.2.0) + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install + + cd "${S}"/out/linux.${ARCH}/release/bin/additions || die + + insinto /sbin + newins mount.vboxsf mount.vboxsf + fperms 4755 /sbin/mount.vboxsf + + newinitd "${FILESDIR}"/${PN}-8.initd ${PN} + + insinto /usr/sbin/ + newins VBoxService vboxguest-service + fperms 0755 /usr/sbin/vboxguest-service + + insinto /usr/bin + doins VBoxControl + fperms 0755 /usr/bin/VBoxControl + + # VBoxClient user service and xrandr wrapper + if use X ; then + doins VBoxClient + fperms 0755 /usr/bin/VBoxClient + + pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \ + || die + newins 98vboxadd-xclient VBoxClient-all + fperms 0755 /usr/bin/VBoxClient-all + popd &>/dev/null || die + fi + + # udev rule for vboxdrv + local udev_rules_dir="/lib/udev/rules.d" + dodir ${udev_rules_dir} + echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ + >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ + || die + echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ + >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ + || die + + # VBoxClient autostart file + insinto /etc/xdg/autostart + doins "${FILESDIR}"/vboxclient.desktop + + # sample xorg.conf + dodoc "${FILESDIR}"/xorg.conf.vbox + docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox + + systemd_dounit "${FILESDIR}/${PN}.service" +} + +pkg_preinst() { + enewgroup vboxguest + enewuser vboxguest -1 /bin/sh /dev/null vboxguest + # automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist + enewgroup vboxsf +} + +pkg_postinst() { + linux-mod_pkg_postinst + if ! use X ; then + elog "use flag X is off, enable it to install the" + elog "X Window System video driver." + fi + elog "" + elog "Please add users to the \"vboxguest\" group so they can" + elog "benefit from seamless mode, auto-resize and clipboard." + elog "" + elog "The vboxsf group has been added to make automount services work." + elog "These services are part of the shared folders support." + elog "" + elog "Please add:" + elog "/etc/init.d/${PN}" + elog "to the default runlevel in order to start" + elog "needed services." + elog "To use the VirtualBox X driver, use the following" + elog "file as your /etc/X11/xorg.conf:" + elog " /usr/share/doc/${PF}/xorg.conf.vbox" + elog "" + elog "Also make sure you use the Mesa library for OpenGL:" + elog " eselect opengl set xorg-x11" + elog "" + elog "An autostart .desktop file has been installed to start" + elog "VBoxClient in desktop sessions." + elog "" + elog "You can mount shared folders with:" + elog " mount -t vboxsf " + elog "" + elog "Warning:" + elog "this ebuild is only needed if you are running gentoo" + elog "inside a VirtualBox Virtual Machine, you don't need" + elog "it to run VirtualBox itself." + elog "" +} diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.24.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.24.ebuild new file mode 100644 index 000000000000..cb1ff36699e4 --- /dev/null +++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.24.ebuild @@ -0,0 +1,219 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit linux-mod systemd toolchain-funcs + +MY_PV="${PV/beta/BETA}" +MY_PV="${MY_PV/rc/RC}" +MY_P="VirtualBox-${MY_PV}" +DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests" +HOMEPAGE="https://www.virtualbox.org/" +SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2 + https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-6.0.24-patches-01.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \ +KEYWORDS="~amd64 ~x86" +IUSE="X" + +# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist +RDEPEND=" + acct-group/vboxguest + acct-group/vboxsf + acct-user/vboxguest + X? ( x11-apps/xrandr + x11-apps/xrefresh + x11-libs/libXmu + x11-libs/libX11 + x11-libs/libXt + x11-libs/libXext + x11-libs/libXau + x11-libs/libXdmcp + x11-libs/libSM + x11-libs/libICE ) + sys-apps/dbus +" +DEPEND=" + ${RDEPEND} + >=dev-util/kbuild-0.1.9998.3127 + >=dev-lang/yasm-0.6.2 + sys-devel/bin86 + sys-libs/pam + sys-power/iasl + x11-base/xorg-proto +" +PDEPEND=" + X? ( x11-drivers/xf86-video-vboxvideo ) +" +BUILD_TARGETS="all" +BUILD_TARGET_ARCH="${ARCH}" + +S="${WORKDIR}/${MY_P}" +VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src" + +pkg_setup() { + export DISTCC_DISABLE=1 #674256 + MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest) + vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)" + use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)" + + linux-mod_pkg_setup + BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR} KBUILD_EXTRA_SYMBOLS=${S}/Module.symvers" +} + +src_prepare() { + # Remove shipped binaries (kBuild,yasm), see bug #232775 + rm -r kBuild/bin tools || die + + # Provide kernel sources + pushd src/VBox/Additions &>/dev/null || die + ebegin "Extracting guest kernel module sources" + kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null || die + eend + popd &>/dev/null || die + + # PaX fixes (see bug #298988) + pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die + eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch + popd &>/dev/null || die + + # Disable things unused or splitted into separate ebuilds + cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die + use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk + + # Remove pointless GCC version check + sed -e '/^check_gcc$/d' -i configure || die + + rm "${WORKDIR}/patches/010_virtualbox-5.2.12-qt511.patch" || die + eapply "${WORKDIR}/patches" + + eapply_user +} + +src_configure() { + # build the user-space tools, warnings are harmless + local cmd=( + ./configure + --nofatal + --disable-xpcom + --disable-sdl-ttf + --disable-pulse + --disable-alsa + --with-gcc="$(tc-getCC)" + --with-g++="$(tc-getCXX)" + --target-arch=${ARCH} + --with-linux="${KV_OUT_DIR}" + --build-headless + ) + echo "${cmd[@]}" + "${cmd[@]}" || die "configure failed" + source ./env.sh + export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}" +} + +src_compile() { + MAKE="kmk" emake \ + VBOX_BUILD_PUBLISHER=_Gentoo \ + TOOL_GXX3_CC="$(tc-getCC)" TOOL_GXX3_CXX="$(tc-getCXX)" \ + TOOL_GXX3_LD="$(tc-getCXX)" VBOX_GCC_OPT="${CXXFLAGS}" \ + TOOL_YASM_AS=yasm \ + VBOX_ONLY_ADDITIONS=1 \ + KBUILD_VERBOSE=2 + + # Now creating the kernel modules. We must do this _after_ + # we compiled the user-space tools as we need two of the + # automatically generated header files. (>=3.2.0) + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install + + cd "${S}"/out/linux.${ARCH}/release/bin/additions || die + + insinto /sbin + newins mount.vboxsf mount.vboxsf + fperms 4755 /sbin/mount.vboxsf + + newinitd "${FILESDIR}"/${PN}-8.initd ${PN} + + insinto /usr/sbin/ + newins VBoxService vboxguest-service + fperms 0755 /usr/sbin/vboxguest-service + + insinto /usr/bin + doins VBoxControl + fperms 0755 /usr/bin/VBoxControl + + # VBoxClient user service and xrandr wrapper + if use X ; then + doins VBoxClient + fperms 0755 /usr/bin/VBoxClient + + pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \ + || die + newins 98vboxadd-xclient VBoxClient-all + fperms 0755 /usr/bin/VBoxClient-all + popd &>/dev/null || die + fi + + # udev rule for vboxdrv + local udev_rules_dir="/lib/udev/rules.d" + dodir ${udev_rules_dir} + echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ + >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ + || die + echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ + >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ + || die + + # VBoxClient autostart file + insinto /etc/xdg/autostart + doins "${FILESDIR}"/vboxclient.desktop + + # sample xorg.conf + dodoc "${FILESDIR}"/xorg.conf.vbox + docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox + + systemd_dounit "${FILESDIR}/${PN}.service" +} + +pkg_postinst() { + linux-mod_pkg_postinst + if ! use X ; then + elog "use flag X is off, enable it to install the" + elog "X Window System video driver." + fi + elog "" + elog "Please add users to the \"vboxguest\" group so they can" + elog "benefit from seamless mode, auto-resize and clipboard." + elog "" + elog "The vboxsf group has been added to make automount services work." + elog "These services are part of the shared folders support." + elog "" + elog "Please add:" + elog "/etc/init.d/${PN}" + elog "to the default runlevel in order to start" + elog "needed services." + elog "To use the VirtualBox X driver, use the following" + elog "file as your /etc/X11/xorg.conf:" + elog " /usr/share/doc/${PF}/xorg.conf.vbox" + elog "" + elog "Also make sure you use the Mesa library for OpenGL:" + elog " eselect opengl set xorg-x11" + elog "" + elog "An autostart .desktop file has been installed to start" + elog "VBoxClient in desktop sessions." + elog "" + elog "You can mount shared folders with:" + elog " mount -t vboxsf " + elog "" + elog "Warning:" + elog "this ebuild is only needed if you are running gentoo" + elog "inside a VirtualBox Virtual Machine, you don't need" + elog "it to run VirtualBox itself." + elog "" +} diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.12a.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.12a.ebuild new file mode 100644 index 000000000000..24c3f7e1b184 --- /dev/null +++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.12a.ebuild @@ -0,0 +1,221 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit linux-mod systemd toolchain-funcs + +MY_PN="VirtualBox" +MY_PV="${PV/beta/BETA}" +MY_PV="${MY_PV/rc/RC}" +MY_P="${MY_PN}-${MY_PV}" +[[ "${PV}" == *a ]] && DIR_PV="$(ver_cut 1-3)" + +DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests" +HOMEPAGE="https://www.virtualbox.org/" +SRC_URI="https://download.virtualbox.org/virtualbox/${DIR_PV:-${MY_PV}}/${MY_P}.tar.bz2 + https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-6.1.12-patches-01.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \ +KEYWORDS="~amd64 ~x86" +IUSE="X" + +# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist +RDEPEND=" + acct-group/vboxguest + acct-group/vboxsf + acct-user/vboxguest + X? ( x11-apps/xrandr + x11-apps/xrefresh + x11-libs/libXmu + x11-libs/libX11 + x11-libs/libXt + x11-libs/libXext + x11-libs/libXau + x11-libs/libXdmcp + x11-libs/libSM + x11-libs/libICE ) + sys-apps/dbus +" +DEPEND=" + ${RDEPEND} + >=dev-util/kbuild-0.1.9998.3127 + >=dev-lang/yasm-0.6.2 + sys-devel/bin86 + sys-libs/pam + sys-power/iasl + x11-base/xorg-proto +" +PDEPEND=" + X? ( x11-drivers/xf86-video-vboxvideo ) +" +BUILD_TARGETS="all" +BUILD_TARGET_ARCH="${ARCH}" + +S="${WORKDIR}/${MY_PN}-${DIR_PV:-${PV}}" +VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src" + +pkg_setup() { + export DISTCC_DISABLE=1 #674256 + MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest) + vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)" + use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)" + + linux-mod_pkg_setup + BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR} KBUILD_EXTRA_SYMBOLS=${S}/Module.symvers" +} + +src_prepare() { + # Remove shipped binaries (kBuild,yasm), see bug #232775 + rm -r kBuild/bin tools || die + + # Provide kernel sources + pushd src/VBox/Additions &>/dev/null || die + ebegin "Extracting guest kernel module sources" + kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null || die + eend + popd &>/dev/null || die + + # PaX fixes (see bug #298988) + pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die + eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch + popd &>/dev/null || die + + # Disable things unused or splitted into separate ebuilds + cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die + use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk + + # Remove pointless GCC version check + sed -e '/^check_gcc$/d' -i configure || die + + eapply "${WORKDIR}/patches" + + eapply_user +} + +src_configure() { + # build the user-space tools, warnings are harmless + local cmd=( + ./configure + --nofatal + --disable-xpcom + --disable-sdl-ttf + --disable-pulse + --disable-alsa + --with-gcc="$(tc-getCC)" + --with-g++="$(tc-getCXX)" + --target-arch=${ARCH} + --with-linux="${KV_OUT_DIR}" + --build-headless + ) + echo "${cmd[@]}" + "${cmd[@]}" || die "configure failed" + source ./env.sh + export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}" +} + +src_compile() { + MAKE="kmk" emake \ + VBOX_BUILD_PUBLISHER=_Gentoo \ + TOOL_GXX3_CC="$(tc-getCC)" TOOL_GXX3_CXX="$(tc-getCXX)" \ + TOOL_GXX3_LD="$(tc-getCXX)" VBOX_GCC_OPT="${CXXFLAGS}" \ + TOOL_YASM_AS=yasm \ + VBOX_ONLY_ADDITIONS=1 \ + KBUILD_VERBOSE=2 + + # Now creating the kernel modules. We must do this _after_ + # we compiled the user-space tools as we need two of the + # automatically generated header files. (>=3.2.0) + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install + + cd "${S}"/out/linux.${ARCH}/release/bin/additions || die + + insinto /sbin + newins mount.vboxsf mount.vboxsf + fperms 4755 /sbin/mount.vboxsf + + newinitd "${FILESDIR}"/${PN}-8.initd ${PN} + + insinto /usr/sbin/ + newins VBoxService vboxguest-service + fperms 0755 /usr/sbin/vboxguest-service + + insinto /usr/bin + doins VBoxControl + fperms 0755 /usr/bin/VBoxControl + + # VBoxClient user service and xrandr wrapper + if use X ; then + doins VBoxClient + fperms 0755 /usr/bin/VBoxClient + + pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \ + || die + newins 98vboxadd-xclient VBoxClient-all + fperms 0755 /usr/bin/VBoxClient-all + popd &>/dev/null || die + fi + + # udev rule for vboxdrv + local udev_rules_dir="/lib/udev/rules.d" + dodir ${udev_rules_dir} + echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ + >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ + || die + echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ + >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ + || die + + # VBoxClient autostart file + insinto /etc/xdg/autostart + doins "${FILESDIR}"/vboxclient.desktop + + # sample xorg.conf + dodoc "${FILESDIR}"/xorg.conf.vbox + docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox + + systemd_dounit "${FILESDIR}/${PN}.service" +} + +pkg_postinst() { + linux-mod_pkg_postinst + if ! use X ; then + elog "use flag X is off, enable it to install the" + elog "X Window System video driver." + fi + elog "" + elog "Please add users to the \"vboxguest\" group so they can" + elog "benefit from seamless mode, auto-resize and clipboard." + elog "" + elog "The vboxsf group has been added to make automount services work." + elog "These services are part of the shared folders support." + elog "" + elog "Please add:" + elog "/etc/init.d/${PN}" + elog "to the default runlevel in order to start" + elog "needed services." + elog "To use the VirtualBox X driver, use the following" + elog "file as your /etc/X11/xorg.conf:" + elog " /usr/share/doc/${PF}/xorg.conf.vbox" + elog "" + elog "Also make sure you use the Mesa library for OpenGL:" + elog " eselect opengl set xorg-x11" + elog "" + elog "An autostart .desktop file has been installed to start" + elog "VBoxClient in desktop sessions." + elog "" + elog "You can mount shared folders with:" + elog " mount -t vboxsf " + elog "" + elog "Warning:" + elog "this ebuild is only needed if you are running gentoo" + elog "inside a VirtualBox Virtual Machine, you don't need" + elog "it to run VirtualBox itself." + elog "" +} -- cgit v1.2.3-65-gdbad