From 536c3711867ec947c1738f2c4b96f22e4863322d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 18 Nov 2018 09:38:27 +0000 Subject: gentoo resync : 18.11.2018 --- app-emulation/virtualbox-guest-additions/Manifest | 8 +- .../virtualbox-guest-additions-5.2.18.ebuild | 232 --------------------- .../virtualbox-guest-additions-5.2.22.ebuild | 227 ++++++++++++++++++++ .../virtualbox-guest-additions-6.0.0_beta2.ebuild | 228 ++++++++++++++++++++ 4 files changed, 460 insertions(+), 235 deletions(-) delete mode 100644 app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.18.ebuild create mode 100644 app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.22.ebuild create mode 100644 app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.0_beta2.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 7a57e7158ef4..607a1165a6b8 100644 --- a/app-emulation/virtualbox-guest-additions/Manifest +++ b/app-emulation/virtualbox-guest-additions/Manifest @@ -6,12 +6,14 @@ AUX virtualbox-guest-additions-8.initd 538 BLAKE2B f720a0f9de10c5240f1ac8a590c4e AUX virtualbox-guest-additions.service 411 BLAKE2B f5f1c24a94764ca72a04879c27cd9fdc1e0c8a1440ac87674dad44a1493a9347e6e2b351ae2b71e050ba06ae9848168220d62981a9e0c984ea68bf48ea06b485 SHA512 b6226146f3591a778551e94ae2661e2ae3c6b761d20600d741eaaa03f43f0a2b841d2a44d9eec3a3768edb23b021cee94c7849d998ee4104ad60dad2df88df83 AUX xorg.conf.vbox 274 BLAKE2B 3a3035fcbdbd5810c54505f5a5e6deefa1540e5e01a038babb62a40bd5b2de2dc5b228cabe55612d92a522e6ae92aa7ff4ff2ab26772c3b54ce95ebac4e7fc5a SHA512 ac2b14970dc6667ceec2dbdae52bc92cbad4aff020898ede156454e8a8a703354f15c7e19cfbd2bdd15e251493fd05cacfe814cabee0f9b4cf155e44860ed4c9 DIST VirtualBox-5.2.14.tar.bz2 118597539 BLAKE2B 5e0a8d92405378eb438cae375041609f7a0e1288b040d3a0bcc06157f16ddd48b3537f2f026aa12a71c5319bdef56d6f3907785ac51ebe05a8b7143e04f22d0a SHA512 b8202eccd83e9f2c92a77548d003082b6b3ff7838bb32ae48c3a25dcd622bfdc8ceca42cc49b855eeabf4439c55ad42df9b3959dd1bab77de154468e139c904e -DIST VirtualBox-5.2.18.tar.bz2 118700952 BLAKE2B 5e9a5ca5379d80a8d9d0d53fe7b1f7cd98e03b6c535867932d55aa6a936e65f2d294264da014f332c2caa933a262ced3e350d9eb685ad99dec02a02ffcf5e7cb SHA512 f67c17cdd39e699e6c80af82a2c2d0c5dab073ddba2b55393740e605debb973030c48ce736ae753fc1e680845f0b62209c0f8951db08b665e9cdd83c52d5be20 DIST VirtualBox-5.2.20.tar.bz2 118760364 BLAKE2B 7a5f72340796d3278ef5f3210f4b25bf4d999ec93cdd0449853faf68b38c45a6ffd00fe2c88f12296029882f7715c012d1793cfff9d1c2441aa4db414fa3225e SHA512 ff039e487c43b584c5c5959df1622151d82f6c39101af869262f800d07e68a68005ed442112e36ebe249ed79de34c0b974bbd43e7889a5d40df2ebe7dec77a15 +DIST VirtualBox-5.2.22.tar.bz2 118757134 BLAKE2B be795cdbfb09d3d443f63e190b63898239622f5a57aefdd90f382d9a849d09cc1abc2624071fbc60b2c04a12f33376184540cc362c19225733f99a3bcc8ff6a3 SHA512 4f6c4611a3114778f45419587dc1519ca07410c1ea6474cdb18ecd3b068639a4fdac3f25146fe9b8e006e30f19eba134ce9f665182008b033f6f78497e1ea722 +DIST VirtualBox-6.0.0_BETA2.tar.bz2 150947619 BLAKE2B 53ed4cfea4a9e62cb8ba68089e3b6cea04b33950496e8aa945591f0d30bb69bbf02428b6bd6dd67afbc916d612b0135ea10124741c0538b917749f46935cf834 SHA512 10f7bd5c7c14d79ed1bf4662fce76d66f4f61bba1a9c8c7dfff57dad2dd6eaf2ae03911fdc994d53769f872079d7a04a1732126fc1aa9907237cbdccefda3348 DIST virtualbox-5.2.12-patches-01.tar.xz 2616 BLAKE2B 5731484d185414d83588ee227bbc1eef266451d1a3a710adf1b769cd6404ef1750dba7a60549f2ab9f3fb81ef15809db9ea0190127caefc72d7bc9bb8b741fb0 SHA512 712b55392a8e8357e95abb42ea4f8dac3391ecbf9cbecf27c7dbf674c40f42a1eb19d227a1b3adcf621384a9f64a6438d20fb43866c736189097fb5770c5c654 -DIST virtualbox-5.2.16-patches-01.tar.xz 2952 BLAKE2B 1d23d83bdb4d9576d402b67cc81d4427c5fe9163550d2817546382e1c1087000553d4a9a864f2527a909f52ce389105bcfe5518b5407de1299c7d2a62ee3cc21 SHA512 88c21583c51ae8e22e5fd3f08baae686045e884883153e2e365c35ba19f2773d5964c523a4ad3777fe30ca96bf76fab8819e09beeadf8350193041bff783893d DIST virtualbox-5.2.16-patches-02.tar.xz 3152 BLAKE2B c8d8f3872f544a465c7d1aa07291599307120ac9eabfb299ddd788a11f85ca6c2d84b8e7306ee4ad436270dad0dd39f101ee68a549eac15afd1e3cdc03f23c6c SHA512 85ee8c4045de562d71ab2d761695ea48b6726a6f0c4bcaa2562bb0d147542d3f1a1b5b47cf593a7f22dac1b86f87b59a56bef421dce3e1fa8e5260cd41998450 +DIST virtualbox-6.0.0_beta2-patches-01.tar.xz 2732 BLAKE2B a138e715d99f135f16ca21c92781bf6cd8913f7f766bb598eddcd63e98280e568e646f56bbd0a3714f273457ca90db0b77ec7940ba25028506a22891f1af7b2d SHA512 954e4b40d6e272efe756ee0965adb4110d45f764433a89080fda7ebaebbc20031f86a3e0027dfdaa1c6a7d6379a1af557cea71512504e4b57b5f5adbfc86b56e EBUILD virtualbox-guest-additions-5.2.14.ebuild 6162 BLAKE2B 387d7b3c897d68db498014ff54490b4c2b40683e4a37d53e9f1a93a42c71b04dffdd964344bc5a01a659e5f173d0996552a92eabe3c7273f6d82db4c3eb9596a SHA512 ec620e474c1906ae7bb0d2c1d57d22dbc0055e3e432daf67acefd1198a2fab0d078c1568b64bd86d7734ac94674c4cd326b8de0c64ca1ccf5806c61b86a4dce4 -EBUILD virtualbox-guest-additions-5.2.18.ebuild 6206 BLAKE2B 4353cbc8376d4bfb8c9806091b26f413df2754ad10a7b7340cb60478ab06a113b7a49a21eb9b66f03b0da64b028c138cfcbf5d100c6dd2e4270a12eb60f6cb74 SHA512 57d247a0b4cf51e06b54bfddf083f2154fae787a31aff1dd5fb57ea0cf2a67ca94ae3431017cf9d26dbca3b6d01531e65aad1ad13a5e23fd268d0785b11fd8bc EBUILD virtualbox-guest-additions-5.2.20.ebuild 6012 BLAKE2B 3bd29aa5b1464d3c511df21f0415e1b10c597c4c867fcbe11a1477b22990f3e1b418e4845bd848820b475ccf420a1e4a238707f192df7736a2038ad8f465e714 SHA512 9ee2e007b7534effb72caf52b7fdadcd8f6692b62492d493ad1185ef0a33509925b1e38fb149b121d1af36bc9bf883b4927a28ec233775fa12f9030dfd4099bc +EBUILD virtualbox-guest-additions-5.2.22.ebuild 6012 BLAKE2B 3bd29aa5b1464d3c511df21f0415e1b10c597c4c867fcbe11a1477b22990f3e1b418e4845bd848820b475ccf420a1e4a238707f192df7736a2038ad8f465e714 SHA512 9ee2e007b7534effb72caf52b7fdadcd8f6692b62492d493ad1185ef0a33509925b1e38fb149b121d1af36bc9bf883b4927a28ec233775fa12f9030dfd4099bc +EBUILD virtualbox-guest-additions-6.0.0_beta2.ebuild 6073 BLAKE2B 5190c5b2f7bb43768c5c383946fc32c8ab558a4695b431706baa31fe32f17643daa6915c4cb2a3d76abc006dbd463eb3d32f1ad0036c7d00dbc62dd75e33ea51 SHA512 827bb031a87b240a0da583d077839afe834947c25c6f03dbd54cc18b494524522a1a65a8bee56d5533c2a6fb1f2dff53d2be313b5b1d736ada7694272a93db9e MISC metadata.xml 260 BLAKE2B 55d9eb1793faf23ffb69c904a9daf755cefe1b1e04fc2331e792a81acc1b699591acb85e005a96e70167e4eba8444e0cfc8f03be4fcdc19487ad6b1cea356f4a SHA512 443c9c27369b12fa4d23ac7e9add34dbf93b54d560ca946dac97801698b79401a80d88c6570530e641ad4f7231a8c1419682e1e11af2b171ca2854c598e05635 diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.18.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.18.ebuild deleted file mode 100644 index 753cfe70961c..000000000000 --- a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.18.ebuild +++ /dev/null @@ -1,232 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -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.16-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() { - 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=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}" -} - -src_unpack() { - unpack ${A} - - # Apply before we create archive with Linux guest kernel modules - pushd "${S}" &>/dev/null || die - eapply "${FILESDIR}"/virtualbox-guest-additions-5.2.18-linux-4.18.patch # 663488 - popd &>/dev/null || die - - # 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 - - 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 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 - insinto /usr/share/doc/${PF} - doins "${FILESDIR}"/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-5.2.22.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.22.ebuild new file mode 100644 index 000000000000..64bc7a6872f8 --- /dev/null +++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.22.ebuild @@ -0,0 +1,227 @@ +# Copyright 1999-2018 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.16-patches-02.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() { + 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}" +} + +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 + + 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 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 + insinto /usr/share/doc/${PF} + doins "${FILESDIR}"/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.0_beta2.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.0_beta2.ebuild new file mode 100644 index 000000000000..978d1681f8b9 --- /dev/null +++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.0_beta2.ebuild @@ -0,0 +1,228 @@ +# Copyright 1999-2018 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-6.0.0_beta2-patches-01.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \ +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() { + 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}" +} + +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 + + 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 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 + insinto /usr/share/doc/${PF} + doins "${FILESDIR}"/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 "" +} -- cgit v1.2.3