From 138fdeec99630ebe8146d455f2dba0ab4c85c5a2 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 22 Dec 2017 02:57:30 +0000 Subject: app-emulation/virtualbox : version bump --- app-emulation/virtualbox-extpack-oracle/Manifest | 2 +- ...albox-extpack-oracle-5.1.28.117968-r1710.ebuild | 42 -- .../virtualbox-extpack-oracle-5.2.4.119785.ebuild | 42 ++ app-emulation/virtualbox-guest-additions/Manifest | 3 +- .../files/virtualbox-guest-additions-3-localconfig | 30 -- .../virtualbox-guest-additions-5.1.28-r1710.ebuild | 191 --------- .../virtualbox-guest-additions-5.2.4.ebuild | 197 +++++++++ app-emulation/virtualbox-modules/Manifest | 1 - .../files/create_vbox_modules_tarball.sh | 29 -- .../virtualbox-modules-5.1.28-r1710.ebuild | 36 -- .../virtualbox-modules-5.2.4.ebuild | 36 ++ app-emulation/virtualbox/Manifest | 4 +- .../files/050_virtualbox-5.1.24-nopie.patch | 158 +++++++ app-emulation/virtualbox/files/vboxwebsrv-confd | 1 - app-emulation/virtualbox/files/vboxwebsrv-initd | 1 - .../virtualbox/files/virtualbox-4-localconfig | 45 -- .../virtualbox-5.1.22-opengl_dlopen_fix.patch | 167 -------- .../files/virtualbox-5.1.4-paxmark-bldprogs.patch | 59 +++ .../virtualbox/files/virtualbox-ose-3-config | 1 - .../virtualbox/files/virtualbox-ose-3-wrapper | 104 ----- .../virtualbox/virtualbox-5.1.28-r1710.ebuild | 459 --------------------- app-emulation/virtualbox/virtualbox-5.2.4.ebuild | 459 +++++++++++++++++++++ 22 files changed, 956 insertions(+), 1111 deletions(-) delete mode 100644 app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.28.117968-r1710.ebuild create mode 100644 app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.4.119785.ebuild delete mode 100644 app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3-localconfig delete mode 100644 app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.28-r1710.ebuild create mode 100644 app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.4.ebuild delete mode 100644 app-emulation/virtualbox-modules/Manifest delete mode 100755 app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh delete mode 100644 app-emulation/virtualbox-modules/virtualbox-modules-5.1.28-r1710.ebuild create mode 100644 app-emulation/virtualbox-modules/virtualbox-modules-5.2.4.ebuild create mode 100644 app-emulation/virtualbox/files/050_virtualbox-5.1.24-nopie.patch delete mode 100644 app-emulation/virtualbox/files/virtualbox-4-localconfig delete mode 100644 app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch create mode 100644 app-emulation/virtualbox/files/virtualbox-5.1.4-paxmark-bldprogs.patch delete mode 100644 app-emulation/virtualbox/files/virtualbox-ose-3-config delete mode 100644 app-emulation/virtualbox/files/virtualbox-ose-3-wrapper delete mode 100644 app-emulation/virtualbox/virtualbox-5.1.28-r1710.ebuild create mode 100644 app-emulation/virtualbox/virtualbox-5.2.4.ebuild (limited to 'app-emulation') diff --git a/app-emulation/virtualbox-extpack-oracle/Manifest b/app-emulation/virtualbox-extpack-oracle/Manifest index d778d08c..3b03dfeb 100644 --- a/app-emulation/virtualbox-extpack-oracle/Manifest +++ b/app-emulation/virtualbox-extpack-oracle/Manifest @@ -1 +1 @@ -DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.28-117968.tar.gz 19626161 SHA256 1a2551b204bd53a252a75a4653b983427bb15d473bc77b14149c7870ce049871 SHA512 71c6ce267c14303bbd9e386ea849d37aeb569afff848054deced4c74fd6fffca83c96b392d066f684b7101a786cc7d24cf9308114c08cbb77b26bb07bf23fcf8 WHIRLPOOL c6fd42f422dca4db4165ff18da0054aff5c0d275850dec4002fb70e8e4248f8f5cffc87697b0802343ebff29cf62938f298df365f9ce19523092d418206deff9 +DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.4-119785.tar.gz 19465971 SHA256 98e9df4f23212c3de827af9d770b391cf2dba8d21f4de597145512c1479302cd SHA512 97f496c9e3ef63a513c6fc31127459136b2bbef885a277d30c832831f079e3fbe8c6900b1799db1a4497a32b116cafb2fe982bd28a201da8d6f4222f70c548d8 WHIRLPOOL c0150bbd51725760cb68a39af3963a1113afd1d00ab5deb2c95800035068ae659328bb2f01088a5f406d4ea8392ba43bbd5913b99b73e8a1399d6a8a8802f718 diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.28.117968-r1710.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.28.117968-r1710.ebuild deleted file mode 100644 index 3c6c739d..00000000 --- a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.28.117968-r1710.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit eutils multilib versionator - -MAIN_PV="$(get_version_component_range 1-3)" -if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then - MY_PV="${MAIN_PV}_$(get_version_component_range 5)" - DEP_PV="${MY_PV}" - MY_PV="${MY_PV/beta/BETA}" - MY_PV="${MY_PV/rc/RC}" -else - MY_PV="${MAIN_PV}" - DEP_PV="${MAIN_PV}" -fi -VBOX_BUILD_ID="$(get_version_component_range 4)" -MY_PN="Oracle_VM_VirtualBox_Extension_Pack" -MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}" - -DESCRIPTION="PUEL extensions for VirtualBox" -HOMEPAGE="http://www.virtualbox.org/" -SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.vbox-extpack -> ${MY_P}.tar.gz" - -LICENSE="PUEL" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="" -RESTRICT="mirror strip" - -RDEPEND="~app-emulation/virtualbox-${DEP_PV}" - -S="${WORKDIR}" - -QA_PREBUILT="/usr/lib*/virtualbox/ExtensionPacks/${MY_PN}/.*" - -src_install() { - insinto /usr/$(get_libdir)/virtualbox/ExtensionPacks/${MY_PN} - doins -r linux.${ARCH} - doins ExtPack* PXE-Intel.rom -} diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.4.119785.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.4.119785.ebuild new file mode 100644 index 00000000..1c8dbec2 --- /dev/null +++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.4.119785.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils multilib versionator + +MAIN_PV="$(get_version_component_range 1-3)" +if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then + MY_PV="${MAIN_PV}_$(get_version_component_range 5)" + DEP_PV="${MY_PV}" + MY_PV="${MY_PV/beta/BETA}" + MY_PV="${MY_PV/rc/RC}" +else + MY_PV="${MAIN_PV}" + DEP_PV="${MAIN_PV}" +fi +VBOX_BUILD_ID="$(get_version_component_range 4)" +MY_PN="Oracle_VM_VirtualBox_Extension_Pack" +MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}" + +DESCRIPTION="PUEL extensions for VirtualBox" +HOMEPAGE="http://www.virtualbox.org/" +SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.vbox-extpack -> ${MY_P}.tar.gz" + +LICENSE="PUEL" +SLOT="0" +KEYWORDS="amd64 ~x86" +IUSE="" +RESTRICT="mirror strip" + +RDEPEND="~app-emulation/virtualbox-${DEP_PV}" + +S="${WORKDIR}" + +QA_PREBUILT="/usr/lib*/virtualbox/ExtensionPacks/${MY_PN}/.*" + +src_install() { + insinto /usr/$(get_libdir)/virtualbox/ExtensionPacks/${MY_PN} + doins -r linux.${ARCH} + doins ExtPack* PXE-Intel.rom +} diff --git a/app-emulation/virtualbox-guest-additions/Manifest b/app-emulation/virtualbox-guest-additions/Manifest index 05a3b09f..c4c2a6e6 100644 --- a/app-emulation/virtualbox-guest-additions/Manifest +++ b/app-emulation/virtualbox-guest-additions/Manifest @@ -1 +1,2 @@ -DIST VirtualBox-5.1.28.tar.bz2 116427658 SHA256 ce7d4bf6535f70e3214abeb4866f7a8634aa3c7b6dedf8825e6ad80bd821398d SHA512 5c21fd535424d7fd9adbb51894ec6d37ecf00a63a850362bd7b61fedca5031e096641814130a97ad839c0bd7089dc3dc465509615aab2af3c5735ff71005670a WHIRLPOOL 2e3fbeb39083c2e69fb23200570781a8845780a6295553af48fa9155db132e37d0fc2fb26e8a45c52864f69f02e8a0d0cbd4c895e5fbb87ab9a51dd60c7c7904 +DIST VirtualBox-5.2.4.tar.bz2 118481693 SHA256 c9a060bd99168e05587f1ba74b54e9c1f709734bdfc956b0242fe63e81bb7d14 SHA512 19cb168393098fd28ab2017a27d09a558721d57b31c5d3610deb68a17dfa7fd7ffe9ad7be18714a314724ab5ecb54e7ab5fb76183e8e89afbed2da79649e2798 WHIRLPOOL 3000c4e01ccc0fe09734892b8ed7a69b6f836d6dce8993a8b4049be56b73ce1a318843d27dbb174e92fbdfc25ee10e6c081cb2c3193912b7ec577c9fac619cda +DIST virtualbox-5.1.30-patches-02.tar.xz 2608 SHA256 25922641e19911fe41d63a348702ed2dcab2ef79379ea236c5da6c36f77a75a5 SHA512 8a490f7cc44e40262fc47819736251c177adb635256794e9500f52729197c85211d5b0c0d000268089953a4c185872a8ba03c5d42df6b80f05eac8b81335320a WHIRLPOOL 3a7ebadf5cc8ba71fe4e4fe43d529ce72dbe95c40838d66112418ad335cb1b1cf7b6aa37fa71ccc6d50044486cb0eef52e59567530935e5a0ed83e9c3f67ec36 diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3-localconfig b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3-localconfig deleted file mode 100644 index aeea54d6..00000000 --- a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3-localconfig +++ /dev/null @@ -1,30 +0,0 @@ -# -*- Makefile -*- -# -# Overwrite some default kBuild settings -# - -# -# Copyright (C) 2006-2008 Sun Microsystems, Inc. -# -# This file is part of VirtualBox Open Source Edition (OSE), as -# available from http://www.virtualbox.org. This file is free software; -# you can redistribute it and/or modify it under the terms of the GNU -# General Public License as published by the Free Software Foundation, -# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE -# distribution. VirtualBox OSE is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY of any kind. -# - -# don't build testcases to save time, they are not needed for the package -VBOX_WITH_TESTCASES := -VBOX_WITH_TESTSUITE := - -KBUILD_MSG_STYLE := brief - -## paths, origin, hardening -VBOX_WITH_HARDENING := 2 -VBOX_WITH_ORIGIN := -VBOX_ONLY_ADDITIONS := 1 - -## don't build with -Werror -VBOX_WITH_WARNINGS_AS_ERRORS := diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.28-r1710.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.28-r1710.ebuild deleted file mode 100644 index 34fbf5cf..00000000 --- a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.28-r1710.ebuild +++ /dev/null @@ -1,191 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit eutils 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="http://www.virtualbox.org/" -SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2" - -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 - x11-proto/glproto ) - sys-apps/dbus - ~sys-kernel/virtualbox-guest-dkms-${PV} - !!x11-drivers/xf86-input-virtualbox" -DEPEND="${RDEPEND} - >=dev-util/kbuild-0.1.9998_pre20131130 - >=dev-lang/yasm-0.6.2 - sys-devel/bin86 - sys-libs/pam - sys-power/iasl - X? ( x11-proto/renderproto ) - !X? ( x11-proto/xproto )" -PDEPEND="X? ( ~x11-drivers/xf86-video-virtualbox-${PV} )" - -BUILD_TARGETS="all" -BUILD_TARGET_ARCH="${ARCH}" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - enewgroup vboxguest - enewuser vboxguest -1 /bin/sh /dev/null vboxguest - enewgroup vboxsf -} - -src_unpack() { - unpack ${A} - - "${S}"/src/VBox/Additions/linux/export_modules "${WORKDIR}/vbox-kmod.tar.gz" - unpack ./vbox-kmod.tar.gz - - cd "${S}" - rm -rf kBuild/bin tools -} - -src_prepare() { - pushd "${WORKDIR}" &>/dev/null || die - eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch - popd &>/dev/null || die - - cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die - use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk - - 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 - - sed -e '/^check_gcc$/d' -i configure || die - - eapply_user -} - -src_configure() { - 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 -} - -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 - - 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 - - local udev_rules_dir="/lib/udev/rules.d" - dodir ${udev_rules_dir} - echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ - >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ - || die - echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ - >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ - || die - - insinto /etc/xdg/autostart - doins "${FILESDIR}"/vboxclient.desktop - - insinto /usr/share/doc/${PF} - doins "${FILESDIR}"/xorg.conf.vbox - - systemd_dounit "${FILESDIR}/${PN}.service" -} - -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.4.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.4.ebuild new file mode 100644 index 00000000..91b07ca6 --- /dev/null +++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.4.ebuild @@ -0,0 +1,197 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils 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="http://www.virtualbox.org/" +SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2 + https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-5.1.30-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 + x11-proto/glproto ) + sys-apps/dbus + ~sys-kernel/virtualbox-guest-dkms-${PV} + !!x11-drivers/xf86-input-virtualbox + !x11-drivers/xf86-video-virtualbox +" +DEPEND=" + ${RDEPEND} + >=dev-util/kbuild-0.1.9998.3127 + >=dev-lang/yasm-0.6.2 + sys-devel/bin86 + sys-libs/pam + sys-power/iasl + X? ( x11-proto/renderproto ) + !X? ( x11-proto/xproto ) +" +PDEPEND=" + X? ( x11-drivers/xf86-video-vboxvideo ) +" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup vboxguest + enewuser vboxguest -1 /bin/sh /dev/null vboxguest + enewgroup vboxsf +} + +src_unpack() { + unpack ${A} + + cd "${S}" + rm -rf kBuild/bin tools +} + +src_prepare() { + pushd "${WORKDIR}" &>/dev/null || die + eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch + popd &>/dev/null || die + + cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die + use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk + + 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 + + sed -e '/^check_gcc$/d' -i configure || die + + rm "${WORKDIR}/patches/011_virtualbox-5.1.30-sysmacros.patch" || die + eapply "${WORKDIR}/patches" + + eapply_user +} + +src_configure() { + 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 +} + +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 + + 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 + + local udev_rules_dir="/lib/udev/rules.d" + dodir ${udev_rules_dir} + echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ + >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ + || die + echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ + >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ + || die + + insinto /etc/xdg/autostart + doins "${FILESDIR}"/vboxclient.desktop + + insinto /usr/share/doc/${PF} + doins "${FILESDIR}"/xorg.conf.vbox + + systemd_dounit "${FILESDIR}/${PN}.service" +} + +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-modules/Manifest b/app-emulation/virtualbox-modules/Manifest deleted file mode 100644 index f5626a46..00000000 --- a/app-emulation/virtualbox-modules/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST vbox-kernel-module-src-5.1.28.tar.xz 625464 SHA256 d6f3b7afa98d2b526d8da3c8906addc307eea069db371d012ebbffc1ccdf9dd2 SHA512 c8ae6c065ad42e57eee9a54f288ba60fd9b32efe18cb74c8a035d547b30e7d857c9091307485a8dfc77eec45de29d3217c6871140e167e2438759c314c47680a WHIRLPOOL c6508d63cacfcd3ac901f276cd793dc83c595bc73965518baa544b5cf5157ea52363b759f03586f743d6c2e0fda7252b98136c96cef28ecfb31f6915d4ce5709 diff --git a/app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh b/app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh deleted file mode 100755 index 756d2435..00000000 --- a/app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Create a virtualbox modules tarball from a VirtualBox binary package. -# We cannot download the package by this script because of the unpredictable -# build number being in the filename. -# -# usage: create_vbox_modules_tarball.sh VirtualBox-4.1.18-78361-Linux_amd64.run - -[ -f "$1" ] || exit 1 - -VBOX_PACKAGE="$1" -VERSION_SUFFIX="" - -if [[ ${VBOX_PACKAGE} = *_BETA* ]] || [[ ${VBOX_PACKAGE} = *_RC* ]] ; then - VERSION_SUFFIX="$(echo ${VBOX_PACKAGE} | sed 's@.*VirtualBox-[[:digit:]\.]\+\(_[[:alpha:]]\+[[:digit:]]\).*@\L\1@')" - -fi - -VBOX_VER="$(echo ${VBOX_PACKAGE} | sed 's@.*VirtualBox-\([[:digit:]\.]\+\).*@\1@')${VERSION_SUFFIX}" - - -sh ${VBOX_PACKAGE} --noexec --keep --nox11 || exit 2 -cd install || exit 3 -tar -xaf VirtualBox.tar.bz2 || exit 4 -cd src/vboxhost || exit 5 -tar -cvJf ../../../vbox-kernel-module-src-${VBOX_VER}.tar.xz . || exit 6 -cd ../../.. && rm install -rf - -exit 0 diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.28-r1710.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.28-r1710.ebuild deleted file mode 100644 index 41d58d9d..00000000 --- a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.28-r1710.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -inherit eutils user - -MY_P=vbox-kernel-module-src-${PV} -DESCRIPTION="Kernel Modules for Virtualbox" -HOMEPAGE="http://www.virtualbox.org/" -SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="" - -DEPEND="~sys-kernel/${PN}-dkms-${PV}" -RDEPEND="${DEPEND} - !=app-emulation/virtualbox-9999" - -S=${WORKDIR} - -pkg_setup() { - enewgroup vboxusers -} - -src_compile() { - : -} - -src_install() { - insinto /usr/lib/modules-load.d/ - doins "${FILESDIR}"/virtualbox.conf -} diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.4.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.4.ebuild new file mode 100644 index 00000000..d420616a --- /dev/null +++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.4.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit eutils user + +MY_P=vbox-kernel-module-src-${PV} +DESCRIPTION="Kernel Modules for Virtualbox" +HOMEPAGE="http://www.virtualbox.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="~sys-kernel/${PN}-dkms-${PV}" +RDEPEND="${DEPEND} + !=app-emulation/virtualbox-9999" + +S=${WORKDIR} + +pkg_setup() { + enewgroup vboxusers +} + +src_compile() { + : +} + +src_install() { + insinto /usr/lib/modules-load.d/ + doins "${FILESDIR}"/virtualbox.conf +} diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest index a4d028e0..5c90cbae 100644 --- a/app-emulation/virtualbox/Manifest +++ b/app-emulation/virtualbox/Manifest @@ -1,2 +1,2 @@ -DIST VirtualBox-5.1.28.tar.bz2 116427658 SHA256 ce7d4bf6535f70e3214abeb4866f7a8634aa3c7b6dedf8825e6ad80bd821398d SHA512 5c21fd535424d7fd9adbb51894ec6d37ecf00a63a850362bd7b61fedca5031e096641814130a97ad839c0bd7089dc3dc465509615aab2af3c5735ff71005670a WHIRLPOOL 2e3fbeb39083c2e69fb23200570781a8845780a6295553af48fa9155db132e37d0fc2fb26e8a45c52864f69f02e8a0d0cbd4c895e5fbb87ab9a51dd60c7c7904 -DIST virtualbox-5.1.18-patches-01.tar.xz 4512 SHA256 1aa525a8230f77abc672e61bea76af9ddfbb8f22acf21ef382b7a0a88de92764 SHA512 f1c88dd9b7fbafb9764df0a88dc5615aa78a01408d0a14c0dae33e3a53bd75c191c0181934848e17f5fd77784f9e01bf44b444f1485fc302cb1538c2e8ddac95 WHIRLPOOL c11adda0297cc18f0ac614a3492c411413bf640090c9cdb4c5382c4da0391734c479d92c2933e46e0dc8ccf59e155ce35e72182abcb5015a7e03ec33d51c1ab0 +DIST VirtualBox-5.2.4.tar.bz2 118481693 SHA256 c9a060bd99168e05587f1ba74b54e9c1f709734bdfc956b0242fe63e81bb7d14 SHA512 19cb168393098fd28ab2017a27d09a558721d57b31c5d3610deb68a17dfa7fd7ffe9ad7be18714a314724ab5ecb54e7ab5fb76183e8e89afbed2da79649e2798 WHIRLPOOL 3000c4e01ccc0fe09734892b8ed7a69b6f836d6dce8993a8b4049be56b73ce1a318843d27dbb174e92fbdfc25ee10e6c081cb2c3193912b7ec577c9fac619cda +DIST virtualbox-5.2.0-patches-01.tar.xz 2460 SHA256 8487fce158d5f582cb298608bbfff1b6ac0bad531fc27fbc49cf80d201f1165f SHA512 b91278dd81a50e412f5a281c72949f591a1c53303080549b74b28763cab9e3948948afb0256e0453d17736683cca3372a8e9c6d63f02f3eff3ef92c2a1ea332b WHIRLPOOL ba508ce9493723e0f7d43d176e69d459c970ca532d19085be83d1c34d8fac8f30501718d3bd69ca09d453b51cfb5b31d563f238affbfd7551a3f7fd80d1765ba diff --git a/app-emulation/virtualbox/files/050_virtualbox-5.1.24-nopie.patch b/app-emulation/virtualbox/files/050_virtualbox-5.1.24-nopie.patch new file mode 100644 index 00000000..73c377a6 --- /dev/null +++ b/app-emulation/virtualbox/files/050_virtualbox-5.1.24-nopie.patch @@ -0,0 +1,158 @@ +diff -Naur VirtualBox-5.1.24/Config.kmk VirtualBox-5.1.24/Config.kmk +--- VirtualBox-5.1.24/Config.kmk 2017-07-26 13:55:27.803972185 -0400 ++++ VirtualBox-5.1.24/Config.kmk 2017-07-26 13:53:10.700974328 -0400 +@@ -2601,6 +2601,7 @@ + $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-overlength-strings?= $(call VBOX_GCC_CHECK_CC,-Wno-overlength-strings,)' + $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-overloaded-virtual?= $(call VBOX_GCC_CHECK_CXX,-Wno-overloaded-virtual,)' + $(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-stack-protector ?= $(call VBOX_GCC_CHECK_CC,-fno-stack-protector,)' ++ $(QUIET)$(APPEND) '$@' 'VBOX_GCC_nopie ?= $(call VBOX_GCC_CHECK_CC,-nopie,)' + $(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-dwarf2-cfi-asm ?= $(call VBOX_GCC_CHECK_CC,-fno-dwarf2-cfi-asm,)' + $(QUIET)$(APPEND) '$@' 'VBOX_GCC_m64 ?= $(call VBOX_GCC_CHECK_CC,-m64,)' + $(QUIET)$(APPEND) '$@' 'VBOX_GCC_no-pie ?= $(call VBOX_GCC_CHECK_CC,-no-pie,)' +@@ -3843,8 +3844,8 @@ + + ifeq ($(VBOX_LDR_FMT32),elf) + TEMPLATE_VBoxRc_TOOL = $(VBOX_GCC32_TOOL) +- TEMPLATE_VBoxRc_CXXFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK) +- TEMPLATE_VBoxRc_CFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_IPRT_FMT_CHECK) ++ TEMPLATE_VBoxRc_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK) ++ TEMPLATE_VBoxRc_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_IPRT_FMT_CHECK) + ifeq ($(KBUILD_TARGET),solaris) + TEMPLATE_VBoxRc_LDFLAGS = -r + else +@@ -3864,8 +3865,8 @@ + ifeq ($(VBOX_LDR_FMT32),macho) + TEMPLATE_VBoxRc_TOOL = $(VBOX_GCC_TOOL) + TEMPLATE_VBoxRc_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS) +- TEMPLATE_VBoxRc_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-rtti +- TEMPLATE_VBoxRc_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing ++ TEMPLATE_VBoxRc_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-rtti ++ TEMPLATE_VBoxRc_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing + TEMPLATE_VBoxRc_LDFLAGS = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -m32 -nostdlib + #TEMPLATE_VBoxRc_LDFLAGS.release = -Wl,-S ??? + endif +@@ -3903,9 +3904,9 @@ + endif + + ifeq ($(VBOX_LDR_FMT32),elf) +- TEMPLATE_VBoxRcExe_CFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CFLAGS)) -O0 +- TEMPLATE_VBoxRcExe_CXXFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CXXFLAGS)) -O0 +- TEMPLATE_VBoxRcExe_LDFLAGS = -g ++ TEMPLATE_VBoxRcExe_CFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CFLAGS)) -O0 $(VBOX_GCC_nopie) ++ TEMPLATE_VBoxRcExe_CXXFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CXXFLAGS)) -O0 $(VBOX_GCC_nopie) ++ TEMPLATE_VBoxRcExe_LDFLAGS = -g $(VBOX_GCC_nopie) + TEMPLATE_VBoxRcExe_LDFLAGS.dbgopt = -g + TEMPLATE_VBoxRcExe_LDFLAGS.strict = -g + TEMPLATE_VBoxRcExe_LDFLAGS.release = -g +@@ -3984,8 +3985,8 @@ + + ifeq ($(VBOX_LDR_FMT),elf) + TEMPLATE_VBoxR0_TOOL = $(VBOX_GCC_TOOL) +-TEMPLATE_VBoxR0_CFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK) +-TEMPLATE_VBoxR0_CXXFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK) ++TEMPLATE_VBoxR0_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK) ++TEMPLATE_VBoxR0_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK) + TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables -ffreestanding + TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables + ifeq ($(KBUILD_TARGET),solaris) +@@ -4018,12 +4019,12 @@ + TEMPLATE_VBoxR0_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS) + TEMPLATE_VBoxR0_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) \ + -fno-common -msoft-float -static -fno-rtti -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \ +- -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector) ++ -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) + TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -fno-unwind-tables + TEMPLATE_VBoxR0_CXXFLAGS.x86 = -m32 + TEMPLATE_VBoxR0_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) \ + -fno-common -msoft-float -static -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \ +- -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector) ++ -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) + TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -fno-unwind-tables + TEMPLATE_VBoxR0_CFLAGS.x86 = -m32 + TEMPLATE_VBoxR0_LDFLAGS = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -nostdlib +@@ -4259,7 +4260,7 @@ + -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \ + -Wimplicit-function-declaration -Werror-implicit-function-declaration \ + -O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \ +- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ ++ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ + -nostdinc -std=c99 + TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 + TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 --param inline-unit-growth=100 --param large-function-growth=1000 \ +@@ -4268,7 +4269,7 @@ + TEMPLATE_VBOXR0DRV_CXXFLAGS = -fno-exceptions -fno-rtti \ + $(VBOX_GCC_WARN) -Wpointer-arith -Winline \ + -O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \ +- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ ++ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ + -nostdinc + TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86) + TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64 = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64) +@@ -4341,7 +4342,7 @@ + -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \ + -Wimplicit-function-declaration -Werror-implicit-function-declaration \ + -O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \ +- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ ++ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ + -nostdinc -std=c99 -msoft-float + TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 \ + -mpreferred-stack-boundary=2 -mno-mmx -mno-sse -mno-avx \ +@@ -4353,7 +4354,7 @@ + TEMPLATE_VBOXR0DRV_CXXFLAGS = -fno-exceptions -fno-rtti \ + $(VBOX_GCC_WARN) -Wpointer-arith -Winline \ + -O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \ +- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ ++ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ + -nostdinc -msoft-float + TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86) + TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64 = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64) +@@ -4394,7 +4395,7 @@ + TEMPLATE_VBOXR0DRV_LDFLAGS = -shared -no-undefined -dc -dy -lroot -rpath-link /boot/system/develop/lib/x86 --no-add-needed /boot/system/develop/lib/_KERNEL_ --no-add-needed /boot/system/develop/lib/haiku_version_glue.o + TEMPLATE_VBOXR0DRV_CFLAGS = -fno-PIC \ + $(VBOX_GCC_WARN) -Wstrict-prototypes $(VBOX_GCC_Wno-pointer-sign) -Wno-sign-compare \ +- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration ++ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration + TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -mno-sse -mno-mmx -mno-sse2 -mno-3dnow + TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow + TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \ +@@ -5210,8 +5211,8 @@ + TEMPLATE_VBoxNoCrtGccLib_TOOL = $(VBOX_GCC_TOOL) + TEMPLATE_VBoxNoCrtGccLib_ASTOOL = $(VBOX_ASTOOL) + TEMPLATE_VBoxNoCrtGccLib_ASFLAGS = $(VBOX_ASFLAGS) +- TEMPLATE_VBoxNoCrtGccLib_CFLAGS += $(VBOX_GCC_fno-stack-protector) +- TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS += $(VBOX_GCC_fno-stack-protector) ++ TEMPLATE_VBoxNoCrtGccLib_CFLAGS += $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) ++ TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS += $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) + ifeq ($(KBUILD_TARGET_ARCH),amd64) + # in 64-bit mode we'll build a sys-module (VBoxREM2). + if1of ($(KBUILD_TARGET), darwin solaris) +@@ -6467,8 +6468,8 @@ + TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CFLAGS) -fno-pie -fno-merge-constants -std=c99 -ffreestanding + TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS= $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS) -fno-pie -fno-merge-constants -ffreestanding + ifndef VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE +- TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS += $(VBOX_GCC_fno-stack-protector) +- TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS += $(VBOX_GCC_fno-stack-protector) ++ TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS += $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) ++ TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS += $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) + endif + TEMPLATE_VBOXGUESTR3XF86MOD_SYSSUFF = .o + TEMPLATE_VBOXGUESTR3XF86MOD_LIBS = \ +diff -Naur VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk +--- VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk 2017-07-26 13:55:27.746972186 -0400 ++++ VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk 2017-07-26 13:53:10.641974329 -0400 +@@ -132,6 +132,7 @@ + -W \ + -Wformat-nonliteral \ + $(VBOX_GCC_fno-stack-protector) \ ++ $(VBOX_GCC_nopie) \ + $(VBOX_GCC_fno-dwarf2-cfi-asm) \ + $(VBOX_GCC_Wno-address) + TEMPLATE_iPxe_ASFLAGS = \ +@@ -155,6 +156,7 @@ + -W \ + -Wformat-nonliteral \ + $(VBOX_GCC_fno-stack-protector) \ ++ $(VBOX_GCC_nopie) \ + $(VBOX_GCC_fno-dwarf2-cfi-asm) \ + $(VBOX_GCC_Wno-address) \ + -DASSEMBLY diff --git a/app-emulation/virtualbox/files/vboxwebsrv-confd b/app-emulation/virtualbox/files/vboxwebsrv-confd index 447348e9..fdcd17e9 100644 --- a/app-emulation/virtualbox/files/vboxwebsrv-confd +++ b/app-emulation/virtualbox/files/vboxwebsrv-confd @@ -1,6 +1,5 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ # The host to bind to (defaults to "localhost"). VBOXWEBSRV_HOST="localhost" diff --git a/app-emulation/virtualbox/files/vboxwebsrv-initd b/app-emulation/virtualbox/files/vboxwebsrv-initd index d9544962..f50c3ec0 100644 --- a/app-emulation/virtualbox/files/vboxwebsrv-initd +++ b/app-emulation/virtualbox/files/vboxwebsrv-initd @@ -1,7 +1,6 @@ #!/sbin/openrc-run # Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ depend() { need net diff --git a/app-emulation/virtualbox/files/virtualbox-4-localconfig b/app-emulation/virtualbox/files/virtualbox-4-localconfig deleted file mode 100644 index 5138d925..00000000 --- a/app-emulation/virtualbox/files/virtualbox-4-localconfig +++ /dev/null @@ -1,45 +0,0 @@ -# -*- Makefile -*- -# -# Overwrite some default kBuild settings -# - -# -# Copyright (C) 2006-2008 Sun Microsystems, Inc. -# -# This file is part of VirtualBox Open Source Edition (OSE), as -# available from http://www.virtualbox.org. This file is free software; -# you can redistribute it and/or modify it under the terms of the GNU -# General Public License as published by the Free Software Foundation, -# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE -# distribution. VirtualBox OSE is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY of any kind. -# - -# shut up wine complaining about unknown locale -EXEC_X86_WIN32 := wine - -# don't build testcases to save time, they are not needed for the package -VBOX_WITH_TESTCASES := -VBOX_WITH_TESTSUITE := -VBOX_DOCBOOK_WITH_LATEX := 1 - -KBUILD_MSG_STYLE := brief - -## paths, origin, hardening -VBOX_WITH_HARDENING := 1 -VBOX_WITH_ORIGIN := -VBOX_PATH_APP_PRIVATE_ARCH := /usr/MY_LIBDIR/virtualbox -VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH) -VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH) -VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox -VBOX_PATH_APP_DOCS = $(VBOX_PATH_PACKAGE_DOCS) - -## don't build unwanted/splitted stuff -VBOX_WITHOUT_ADDITIONS := 1 -VBOX_WITH_VBOXDRV := -VBOX_WITH_VBOXBFE := -VBOX_WITH_KCHMVIEWER := - -## don't build with -Werror -VBOX_WITH_WARNINGS_AS_ERRORS := - diff --git a/app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch b/app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch deleted file mode 100644 index 71fa978c..00000000 --- a/app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch +++ /dev/null @@ -1,167 +0,0 @@ -Index: VirtualBox-5.1.22/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp -=================================================================== ---- VirtualBox-5.1.22/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp (revision 115126) -+++ VirtualBox-5.1.22/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp (revision 115307) -@@ -341,6 +341,7 @@ - * Patch 64-bit hosts. - */ - uint32_t cRipRelMovs = 0; -+ uint32_t cRelCalls = 0; - - /* Just use the disassembler to skip 12 bytes or more, we might need to - rewrite mov instructions using RIP relative addressing. */ -@@ -349,7 +350,8 @@ - cbInstr = 1; - int rc = DISInstr(pbTarget + offJmpBack, DISCPUMODE_64BIT, &Dis, &cbInstr); - if ( RT_FAILURE(rc) -- || (Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW) -+ || ( Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW -+ && Dis.pCurInstr->uOpcode != OP_CALL) - || ( Dis.ModRM.Bits.Mod == 0 - && Dis.ModRM.Bits.Rm == 5 /* wrt RIP */ - && Dis.pCurInstr->uOpcode != OP_MOV)) -@@ -357,15 +359,23 @@ - - if (Dis.ModRM.Bits.Mod == 0 && Dis.ModRM.Bits.Rm == 5 /* wrt RIP */) - cRipRelMovs++; -+ if ( Dis.pCurInstr->uOpcode == OP_CALL -+ && (Dis.pCurInstr->fOpType & DISOPTYPE_RELATIVE_CONTROLFLOW)) -+ cRelCalls++; - - offJmpBack += cbInstr; - cbPatchMem += cbInstr; - } - -+ /* -+ * Each relative call requires extra bytes as it is converted to a pushq imm32 -+ * + mov [RSP+4], imm32 + a jmp qword [$+8 wrt RIP] to avoid clobbering registers. -+ */ -+ cbPatchMem += cRelCalls * RT_ALIGN_32(13 + 6 + 8, 8); - cbPatchMem += 14; /* jmp qword [$+8 wrt RIP] + 8 byte address to jump to. */ - cbPatchMem = RT_ALIGN_32(cbPatchMem, 8); - -- /* Allocate suitable exectuable memory available. */ -+ /* Allocate suitable executable memory available. */ - bool fConvRipRelMovs = false; - uint8_t *pbPatchMem = supR3HardenedMainPosixExecMemAlloc(cbPatchMem, pbTarget, cRipRelMovs > 0); - if (!pbPatchMem) -@@ -396,7 +406,8 @@ - cbInstr = 1; - int rc = DISInstr(pbTarget + offInsn, DISCPUMODE_64BIT, &Dis, &cbInstr); - if ( RT_FAILURE(rc) -- || (Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW)) -+ || ( Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW -+ && Dis.pCurInstr->uOpcode != OP_CALL)) - return VERR_SUPLIB_UNEXPECTED_INSTRUCTION; - - if ( Dis.ModRM.Bits.Mod == 0 -@@ -439,6 +450,34 @@ - pbPatchMem += sizeof(int32_t); - } - } -+ else if ( Dis.pCurInstr->uOpcode == OP_CALL -+ && (Dis.pCurInstr->fOpType & DISOPTYPE_RELATIVE_CONTROLFLOW)) -+ { -+ /* Convert to absolute jump. */ -+ uintptr_t uAddr = (uintptr_t)&pbTarget[offInsn + cbInstr] + (intptr_t)Dis.Param1.uValue; -+ -+ /* Skip the push instructions till the return address is known. */ -+ uint8_t *pbPatchMemPush = pbPatchMem; -+ pbPatchMem += 13; -+ -+ *pbPatchMem++ = 0xff; /* jmp qword [$+8 wrt RIP] */ -+ *pbPatchMem++ = 0x25; -+ *(uint32_t *)pbPatchMem = (uint32_t)(RT_ALIGN_PT(pbPatchMem + 4, 8, uint8_t *) - (pbPatchMem + 4)); -+ pbPatchMem = RT_ALIGN_PT(pbPatchMem + 4, 8, uint8_t *); -+ *(uint64_t *)pbPatchMem = uAddr; -+ pbPatchMem += sizeof(uint64_t); -+ -+ /* Push the return address onto stack. Difficult on amd64 without clobbering registers... */ -+ uintptr_t uAddrReturn = (uintptr_t)pbPatchMem; -+ *pbPatchMemPush++ = 0x68; /* push imm32 sign-extended as 64-bit*/ -+ *(uint32_t *)pbPatchMemPush = RT_LO_U32(uAddrReturn); -+ pbPatchMemPush += sizeof(uint32_t); -+ *pbPatchMemPush++ = 0xc7; -+ *pbPatchMemPush++ = 0x44; -+ *pbPatchMemPush++ = 0x24; -+ *pbPatchMemPush++ = 0x04; /* movl [RSP+4], imm32 */ -+ *(uint32_t *)pbPatchMemPush = RT_HI_U32(uAddrReturn); -+ } - else - { - memcpy(pbPatchMem, pbTarget + offInsn, cbInstr); -Index: VirtualBox-5.1.22/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp -=================================================================== ---- VirtualBox-5.1.22/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp (revision 115126) -+++ VirtualBox-5.1.22/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp (revision 115307) -@@ -86,6 +86,9 @@ - /** The max path length acceptable for a trusted path. */ - #define SUPR3HARDENED_MAX_PATH 260U - -+/** Enable to resolve symlinks using realpath() instead of cooking our own stuff. */ -+#define SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH 1 -+ - #ifdef RT_OS_SOLARIS - # define dirfd(d) ((d)->d_fd) - #endif -@@ -1091,7 +1094,8 @@ - #endif - - --#if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) -+#ifndef SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH -+# if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) - /** - * Copies the error message to the error buffer and returns @a rc. - * -@@ -1104,6 +1108,7 @@ - { - return supR3HardenedSetErrorN(rc, pErrInfo, 1, pszMsg); - } -+# endif - #endif - - -@@ -1893,7 +1898,9 @@ - /* - * Verify each component from the root up. - */ -+#ifndef SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH - uint32_t iLoops = 0; -+#endif - SUPR3HARDENEDFSOBJSTATE FsObjState; - uint32_t iComponent = 0; - while (iComponent < Info.cComponents) -@@ -1915,6 +1922,24 @@ - if ( RT_SUCCESS(rc) - && S_ISLNK(FsObjState.Stat.st_mode)) - { -+#if SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH /* Another approach using realpath() and verifying the result when encountering a symlink. */ -+ char *pszFilenameResolved = realpath(pszFilename, NULL); -+ if (pszFilenameResolved) -+ { -+ rc = supR3HardenedVerifyFile(pszFilenameResolved, hNativeFile, fMaybe3rdParty, pErrInfo); -+ free(pszFilenameResolved); -+ return rc; -+ } -+ else -+ { -+ int iErr = errno; -+ supR3HardenedError(VERR_ACCESS_DENIED, false /*fFatal*/, -+ "supR3HardenedVerifyFileFollowSymlinks: Failed to resolve the real path '%s': %s (%d)\n", -+ pszFilename, strerror(iErr), iErr); -+ return supR3HardenedSetError4(VERR_ACCESS_DENIED, pErrInfo, -+ "realpath failed for '", pszFilename, "': ", strerror(iErr)); -+ } -+#else - /* Don't loop forever. */ - iLoops++; - if (iLoops < 8) -@@ -1989,6 +2014,7 @@ - else - return supR3HardenedSetError3(VERR_TOO_MANY_SYMLINKS, pErrInfo, - "Too many symbolic links: '", pszFilename, "'"); -+#endif - } - } - if (RT_FAILURE(rc)) diff --git a/app-emulation/virtualbox/files/virtualbox-5.1.4-paxmark-bldprogs.patch b/app-emulation/virtualbox/files/virtualbox-5.1.4-paxmark-bldprogs.patch new file mode 100644 index 00000000..50fa306d --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-5.1.4-paxmark-bldprogs.patch @@ -0,0 +1,59 @@ +2017-02-20 Quentin Minster + + #https://bugs.gentoo.org/show_bug.cgi?id=591582 + * Config.kmk: add paxmark befor VBOX_VBOXTPG get run. + * src/VBox/VMM/Makefile.kmk: add paxmark befor VBOX_VBOXCPP get run. + * src/VBox/Main/Makefile.kmk: add paxmark befor USBIdDatabaseGenerator_1_TARGET get run. + +--- a/Config.kmk ++++ b/Config.kmk 2016-09-21 02:22:28 +@@ -3719,11 +3719,13 @@ + $(if-expr $(intersects $(KBUILD_TARGET_ARCH),$(KBUILD_ARCHES_64)),-64,-32) \ + -h --host-$(VBOX_HC_ARCH_BITS)-bit #-vvv + define TOOL_VBoxTpG_DTRACE_HDR_CMDS ++ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)" + $(QUIET)$(VBOX_VBOXTPG) $(flags) -o "$(out)" -s "$(source)" + endef + TOOL_VBoxTpG_DTRACE_OBJ_NOT_NEEDED := + TOOL_VBoxTpG_DTRACE_OBJ_FLAGS := -G --host-$(VBOX_HC_ARCH_BITS)-bit #-vvv + define TOOL_VBoxTpG_DTRACE_OBJ_CMDS ++ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)" + $(QUIET)$(VBOX_VBOXTPG) \ + $(if-expr $(intersects $(bld_trg_arch),$(KBUILD_ARCHES_64)),-64,-32) \ + $(flags) \ +@@ -3738,6 +3740,7 @@ + TOOL_VBoxTpG-Disabled_DTRACE_DEPORD = $(VBOX_VBOXTPG) + TOOL_VBoxTpG-Disabled_DTRACE_HDR_FLAGS := -h + define TOOL_VBoxTpG-Disabled_DTRACE_HDR_CMDS ++ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)" + $(QUIET)$(VBOX_VBOXTPG) $(flags) -o "$(out)" -s "$(source)" + endef + TOOL_VBoxTpG-Disabled_DTRACE_OBJ_NOT_NEEDED := $(KBUILD_OSES) +@@ -3752,6 +3755,7 @@ + TOOL_DTraceAndVBoxTpG_DTRACE_HDR_CMDS = + define TOOL_DTraceAndVBoxTpG_DTRACE_HDR_CMDS + $(TOOL_StandardDTrace_DTRACE_HDR_CMDS) ++ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)" + $(QUIET)$(VBOX_VBOXTPG) --generate-wrapper-header --host-$(VBOX_HC_ARCH_BITS)-bit --ring-3-context \ + $(filter-out -C, $(filter-out -h,$(flags))) \ + -o "$(out).tmp" -s "$(source)" +--- a/src/VBox/VMM/Makefile.kmk ++++ b/src/VBox/VMM/Makefile.kmk 2016-09-21 02:26:11 +@@ -795,6 +795,7 @@ + define def_vmm_lib_dtrace_preprocess + $$$$(VMMLibDTrace_0_OUTDIR)/$1: $2 $$(VBOX_VBOXCPP) | $$$$(dir $$$$@) + $$(QUIET)$$(call MSG_GENERATE,VMMLibDTrace,$$@,$$<) ++ $$(QUIET)paxmark.sh -m "$(VBOX_VBOXCPP)" + $$(QUIET)$(VBOX_VBOXCPP) -d \ + -D VBOX_FOR_DTRACE_LIB \ + -D VBOX_FOR_DTRACE_LIB_$(toupper $(KBUILD_TARGET_ARCH)) \ +--- a/src/VBox/Main/Makefile.kmk ++++ b/src/VBox/Main/Makefile.kmk 2016-09-21 02:31:23 +@@ -522,6 +522,7 @@ + $$(VBoxSVC_0_OUTDIR)/USBIdDatabase.cpp: $$(USBIdDatabaseGenerator_1_TARGET) \ + $(PATH_SUB_CURRENT)/src-server/usb.ids $(PATH_SUB_CURRENT)/src-server/custom.ids | $$(dir $$@) + $(call MSG_GENERATE,USBIdDatabase,$@,$<) ++ $(QUIET)paxmark.sh -m "$(USBIdDatabaseGenerator_1_TARGET)" + $(QUIET)$(USBIdDatabaseGenerator_1_TARGET) -o "$@" $(filter %.ids,$^) + + BLDPROGS += USBIdDatabaseGenerator diff --git a/app-emulation/virtualbox/files/virtualbox-ose-3-config b/app-emulation/virtualbox/files/virtualbox-ose-3-config deleted file mode 100644 index af782214..00000000 --- a/app-emulation/virtualbox/files/virtualbox-ose-3-config +++ /dev/null @@ -1 +0,0 @@ -INSTALL_DIR=/usr/MY_LIBDIR/virtualbox diff --git a/app-emulation/virtualbox/files/virtualbox-ose-3-wrapper b/app-emulation/virtualbox/files/virtualbox-ose-3-wrapper deleted file mode 100644 index 6f2da490..00000000 --- a/app-emulation/virtualbox/files/virtualbox-ose-3-wrapper +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh -# -# Sun VirtualBox -# -# Copyright (C) 2006-2009 Sun Microsystems, Inc. -# -# This file is part of VirtualBox Open Source Edition (OSE), as -# available from http://www.virtualbox.org. This file is free software; -# you can redistribute it and/or modify it under the terms of the GNU -# General Public License (GPL) as published by the Free Software -# Foundation, in version 2 as it comes in the "COPYING" file of the -# VirtualBox OSE distribution. VirtualBox OSE is distributed in the -# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. -# -# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa -# Clara, CA 95054 USA or visit http://www.sun.com if you need -# additional information or have any questions. -# - -PATH="/usr/bin:/bin:/usr/sbin:/sbin" -CONFIG="/etc/vbox/vbox.cfg" - -if [ ! -r "$CONFIG" ]; then - echo "Could not find VirtualBox installation. Please reinstall." - exit 1 -fi - -. "$CONFIG" - -# Note: This script must not fail if the module was not successfully installed -# because the user might not want to run a VM but only change VM params! - -if [ "$1" = "shutdown" ]; then - SHUTDOWN="true" -elif ! lsmod|grep -q vboxdrv; then - cat << EOF -WARNING: The VirtualBox kernel modules are not loaded. - Please load all the needed kernel modules by: - - for m in vbox{drv,netadp,netflt}; do modprobe \$m; done - - You will not be able to start VMs until this problem is fixed. -EOF -elif [ ! -c /dev/vboxdrv ]; then - cat << EOF -WARNING: The character device /dev/vboxdrv does not exist. - Please try to reload all the needed kernel modules by: - - for m in vbox{netflt,netadp,drv}; do rmmod \$m; done - for m in vbox{drv,netadp,netflt}; do modprobe \$m; done - - and if that is not successful, try to re-install the package by: - - emerge -1av app-emulation/virtualbox-modules - - You will not be able to start VMs until this problem is fixed. -EOF -fi - -SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'` -if [ -z "$SERVER_PID" ]; then - # Server not running yet/anymore, cleanup socket path. - # See IPC_GetDefaultSocketPath()! - if [ -n "$LOGNAME" ]; then - rm -rf /tmp/.vbox-$LOGNAME-ipc > /dev/null 2>&1 - else - rm -rf /tmp/.vbox-$USER-ipc > /dev/null 2>&1 - fi -fi - -if [ "$SHUTDOWN" = "true" ]; then - if [ -n "$SERVER_PID" ]; then - kill -TERM $SERVER_PID - sleep 2 - fi - exit 0 -fi - -APP=`which $0` -APP=`basename $APP` -APP=${APP##/*/} -case "$APP" in - VirtualBox) - exec "$INSTALL_DIR/VirtualBox" "$@" - ;; - VBoxManage) - exec "$INSTALL_DIR/VBoxManage" "$@" - ;; - VBoxSDL) - exec "$INSTALL_DIR/VBoxSDL" "$@" - ;; - VBoxVRDP) - exec "$INSTALL_DIR/VBoxHeadless" "$@" - ;; - VBoxHeadless) - exec "$INSTALL_DIR/VBoxHeadless" "$@" - ;; - vboxwebsrv) - exec "$INSTALL_DIR/vboxwebsrv" "$@" - ;; - *) - echo "Unknown application - $APP" - ;; -esac diff --git a/app-emulation/virtualbox/virtualbox-5.1.28-r1710.ebuild b/app-emulation/virtualbox/virtualbox-5.1.28-r1710.ebuild deleted file mode 100644 index 35574cec..00000000 --- a/app-emulation/virtualbox/virtualbox-5.1.28-r1710.ebuild +++ /dev/null @@ -1,459 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) -inherit eutils fdo-mime flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 toolchain-funcs udev - -MY_PV="${PV/beta/BETA}" -MY_PV="${MY_PV/rc/RC}" -MY_P=VirtualBox-${MY_PV} -SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2 - https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.1.18-patches-01.tar.xz" -S="${WORKDIR}/${MY_P}" - -DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use" -HOMEPAGE="http://www.virtualbox.org/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="alsa debug doc headless java libressl lvm pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc" - -RDEPEND="!app-emulation/virtualbox-bin - ~app-emulation/virtualbox-modules-${PV} - dev-libs/libIDL - >=dev-libs/libxslt-1.1.19 - net-misc/curl - dev-libs/libxml2 - media-libs/libpng:0= - media-libs/libvpx:0= - sys-libs/zlib - !headless? ( - media-libs/libsdl:0[X,video] - x11-libs/libX11 - x11-libs/libXcursor - x11-libs/libXext - x11-libs/libXmu - x11-libs/libXt - opengl? ( virtual/opengl media-libs/freeglut ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtprintsupport:5 - dev-qt/qtwidgets:5 - dev-qt/qtx11extras:5 - opengl? ( dev-qt/qtopengl:5 ) - x11-libs/libXinerama - ) - ) - java? ( >=virtual/jre-1.6:= ) - libressl? ( dev-libs/libressl:= ) - !libressl? ( dev-libs/openssl:0= ) - lvm? ( sys-fs/lvm2 ) - udev? ( >=virtual/udev-171 ) - vnc? ( >=net-libs/libvncserver-0.9.9 )" -DEPEND="${RDEPEND} - >=dev-util/kbuild-0.1.9998_pre20131130-r1 - >=dev-lang/yasm-0.6.2 - sys-devel/bin86 - sys-libs/libcap - sys-power/iasl - virtual/pkgconfig - alsa? ( >=media-libs/alsa-lib-1.0.13 ) - doc? ( - app-text/docbook-sgml-dtd:4.4 - dev-texlive/texlive-basic - dev-texlive/texlive-latex - dev-texlive/texlive-latexrecommended - dev-texlive/texlive-latexextra - dev-texlive/texlive-fontsrecommended - dev-texlive/texlive-fontsextra - ) - !headless? ( x11-libs/libXinerama ) - java? ( >=virtual/jre-1.6:= ) - pam? ( sys-libs/pam ) - pax_kernel? ( sys-apps/elfix ) - pulseaudio? ( media-sound/pulseaudio ) - qt5? ( dev-qt/linguist-tools:5 ) - vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] ) - ${PYTHON_DEPS}" - -QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so - usr/lib/virtualbox/VBoxSDL.so - usr/lib/virtualbox/VBoxSharedFolders.so - usr/lib/virtualbox/VBoxDD2.so - usr/lib/virtualbox/VBoxOGLrenderspu.so - usr/lib/virtualbox/VBoxPython.so - usr/lib/virtualbox/VBoxDD.so - usr/lib/virtualbox/VBoxDDU.so - usr/lib/virtualbox/VBoxREM64.so - usr/lib/virtualbox/VBoxSharedClipboard.so - usr/lib/virtualbox/VBoxHeadless.so - usr/lib/virtualbox/VBoxRT.so - usr/lib/virtualbox/VBoxREM.so - usr/lib/virtualbox/VBoxSettings.so - usr/lib/virtualbox/VBoxKeyboard.so - usr/lib/virtualbox/VBoxSharedCrOpenGL.so - usr/lib/virtualbox/VBoxVMM.so - usr/lib/virtualbox/VirtualBox.so - usr/lib/virtualbox/VBoxOGLhosterrorspu.so - usr/lib/virtualbox/components/VBoxC.so - usr/lib/virtualbox/components/VBoxSVCM.so - usr/lib/virtualbox/components/VBoxDDU.so - usr/lib/virtualbox/components/VBoxRT.so - usr/lib/virtualbox/components/VBoxREM.so - usr/lib/virtualbox/components/VBoxVMM.so - usr/lib/virtualbox/VBoxREM32.so - usr/lib/virtualbox/VBoxPython2_7.so - usr/lib/virtualbox/VBoxXPCOMC.so - usr/lib/virtualbox/VBoxOGLhostcrutil.so - usr/lib/virtualbox/VBoxNetDHCP.so - usr/lib/virtualbox/VBoxNetNAT.so" - -REQUIRED_USE=" - java? ( sdk ) - python? ( sdk ) - vboxwebsrv? ( java ) - ${PYTHON_REQUIRED_USE} -" - -pkg_setup() { - if ! use headless && ! use qt5 ; then - einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend." - elif use headless && use qt5 ; then - einfo "You selected USE=\"headless qt5\", defaulting to" - einfo "USE=\"headless\", this build will not include any X11/Qt frontend." - fi - - if ! use opengl ; then - einfo "No USE=\"opengl\" selected, this build will lack" - einfo "the OpenGL feature." - fi - if ! use python ; then - einfo "You have disabled the \"python\" USE flag. This will only" - einfo "disable the python bindings being installed." - fi - java-pkg-opt-2_pkg_setup - python-single-r1_pkg_setup - - tc-ld-disable-gold #bug 488176 - tc-export CC CXX LD AR RANLIB - export HOST_CC="$(tc-getBUILD_CC)" -} - -src_prepare() { - # Remove shipped binaries (kBuild,yasm), see bug #232775 - rm -r kBuild/bin tools || die - - # Replace pointless GCC version check with something less stupid. - # This is needed for the qt5 version check. - sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' -i configure || die - - # Don't use "echo -n" - sed 's@ECHO_N="echo -n"@ECHO_N="printf"@' -i configure || die - - # Disable things unused or split into separate ebuilds - sed -e "s@MY_LIBDIR@$(get_libdir)@" \ - "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die - - # Respect LDFLAGS - sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \ - -i Config.kmk src/libs/xpcom18a4/Config.kmk || die - - # Do not use hard-coded ld (related to bug #488176) - sed -e '/QUIET)ld /s@ld @$(LD) @' \ - -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die - - # Use PAM only when pam USE flag is enbaled (bug #376531) - if ! use pam ; then - elog "Disabling PAM removes the possibility to use the VRDP features." - sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die - sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \ - src/VBox/HostServices/Makefile.kmk || die - fi - - # add correct java path - if use java ; then - sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \ - -i "${S}"/Config.kmk || die - java-pkg-opt-2_src_prepare - fi - - # Only add nopie patch when we're on hardened - if ! gcc-specs-pie ; then - rm "${WORKDIR}"/patches/050_${PN}-*-nopie.patch || die - fi - - # Only add paxmark patch when we're on pax_kernel - if use pax_kernel ; then - epatch "${FILESDIR}"/virtualbox-5.1.4-paxmark-bldprogs.patch || die - fi - - eapply "${WORKDIR}/patches" - - eapply_user -} - -src_configure() { - local myconf=( - --with-gcc="$(tc-getCC)" - --with-g++="$(tc-getCXX)" - --disable-dbus - --disable-kmods - ) - use alsa || myconf+=( --disable-alsa ) - use debug && myconf+=( --build-debug ) - use doc || myconf+=( --disable-docs ) - use java || myconf+=( --disable-java ) - use lvm || myconf+=( --disable-devmapper ) - use opengl || myconf+=( --disable-opengl ) - use pulseaudio || myconf+=( --disable-pulse ) - use python || myconf+=( --disable-python ) - use vboxwebsrv && myconf+=( --enable-webservice ) - use vnc && myconf+=( --enable-vnc ) - if ! use headless ; then - use qt5 || myconf+=( --disable-qt ) - else - myconf+=( --build-headless --disable-opengl ) - fi - if use amd64 && ! has_multilib_profile ; then - myconf+=( --disable-vmmraw ) - fi - # not an autoconf script - ./configure ${myconf[@]} || die "configure failed" -} - -src_compile() { - source ./env.sh || die - - # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529) - MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #' - MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #' - MAKEOPTS="${MAKEJOBS} ${MAKELOAD}" - MAKE="kmk" emake \ - VBOX_BUILD_PUBLISHER=_Gentoo \ - TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \ - TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \ - TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \ - TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \ - VBOX_GCC_OPT="${CXXFLAGS}" \ - TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \ - all -} - -src_install() { - local binpath="release" - use debug && binpath="debug" - cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die - - local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile - - vbox_inst() { - local binary="${1}" - local perms="${2:-0750}" - local path="${3:-${vbox_inst_path}}" - - [[ -n "${binary}" ]] || die "vbox_inst: No binray given!" - [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits." - - insinto ${path} - doins ${binary} - fowners root:vboxusers ${path}/${binary} - fperms ${perms} ${path}/${binary} - } - - # Create configuration files - insinto /etc/vbox - newins "${FILESDIR}/${PN}-4-config" vbox.cfg - - # Set the correct libdir - sed \ - -e "s@MY_LIBDIR@$(get_libdir)@" \ - -i "${D}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed" - - # Install the wrapper script - exeinto ${vbox_inst_path} - newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox" - fowners root:vboxusers ${vbox_inst_path}/VBox - fperms 0750 ${vbox_inst_path}/VBox - - # Install binaries and libraries - insinto ${vbox_inst_path} - doins -r components - - # *.rc files for x86_64 are only available on multilib systems - local rcfiles="*.rc" - if use amd64 && ! has_multilib_profile ; then - rcfiles="" - fi - for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do - vbox_inst ${each} - done - - # These binaries need to be suid root. - for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do - vbox_inst ${each} 4750 - done - - # Install EFI Firmware files (bug #320757) - pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die - for fwfile in VBoxEFI{32,64}.fd ; do - vbox_inst ${fwfile} 0644 - done - popd &>/dev/null || die - - # VBoxSVC and VBoxManage need to be pax-marked (bug #403453) - # VBoxXPCOMIPCD (bug #524202) - for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do - pax-mark -m "${D}"${vbox_inst_path}/${each} - done - - # Symlink binaries to the shipped wrapper - for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do - dosym ${vbox_inst_path}/VBox /usr/bin/${each} - done - dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl - - # VRDPAuth only works with this (bug #351949) - dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so - - # set an env-variable for 3rd party tools - echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox" - doenvd "${T}/90virtualbox" - - if ! use headless ; then - vbox_inst VBoxSDL 4750 - pax-mark -m "${D}"${vbox_inst_path}/VBoxSDL - - for each in vboxsdl VBoxSDL ; do - dosym ${vbox_inst_path}/VBox /usr/bin/${each} - done - - if use qt5 ; then - vbox_inst VirtualBox 4750 - pax-mark -m "${D}"${vbox_inst_path}/VirtualBox - - if use opengl ; then - vbox_inst VBoxTestOGL - pax-mark -m "${D}"${vbox_inst_path}/VBoxTestOGL - fi - - for each in virtualbox VirtualBox ; do - dosym ${vbox_inst_path}/VBox /usr/bin/${each} - done - - insinto /usr/share/${PN} - doins -r nls - - newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop - fi - - pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die - for size in 16 32 48 64 128 ; do - newicon -s ${size} ${PN}-${size}px.png ${PN}.png - done - newicon ${PN}-48px.png ${PN}.png - doicon -s scalable ${PN}.svg - popd &>/dev/null || die - pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die - for size in 16 24 32 48 64 72 96 128 256 512 ; do - for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do - icofile="${PN}-${ico}-${size}px.png" - if [[ -f "${icofile}" ]] ; then - newicon -s ${size} ${icofile} ${PN}-${ico}.png - fi - done - done - popd &>/dev/null || die - fi - - if use lvm ; then - vbox_inst VBoxVolInfo 4750 - dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo - fi - - if use sdk ; then - insinto ${vbox_inst_path} - doins -r sdk - - if use java ; then - java-pkg_regjar "${D}${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar" - java-pkg_regso "${D}${vbox_inst_path}/libvboxjxpcom.so" - fi - fi - - if use udev ; then - # New way of handling USB device nodes for VBox (bug #356215) - local udevdir="$(get_udevdir)" - insinto ${udevdir} - doins VBoxCreateUSBNode.sh - fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh - fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh - insinto ${udevdir}/rules.d - sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \ - > "${T}"/10-virtualbox.rules || die - doins "${T}"/10-virtualbox.rules - fi - - if use vboxwebsrv ; then - vbox_inst vboxwebsrv - dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv - newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv - newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv - fi - - if use doc ; then - dodoc UserManual.pdf - fi -} - -pkg_postinst() { - fdo-mime_desktop_database_update - - if use udev ; then - udevadm control --reload-rules \ - && udevadm trigger --subsystem-match=usb - fi - - if ! use headless && use qt5 ; then - elog "To launch VirtualBox just type: \"virtualbox\"." - fi - elog "You must be in the vboxusers group to use VirtualBox." - elog "" - elog "The latest user manual is available for download at:" - elog "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf" - elog "" - elog "For advanced networking setups you should emerge:" - elog "net-misc/bridge-utils and sys-apps/usermode-utilities" - elog "" - elog "IMPORTANT!" - elog "If you upgrade from app-emulation/virtualbox-ose make sure to run" - elog "\"env-update\" as root and logout and relogin as the user you wish" - elog "to run ${PN} as." - elog "" - elog "Starting with version 4.0.0, ${PN} has USB-1 support." - elog "For USB-2 support, PXE-boot ability and VRDP support please emerge" - elog " app-emulation/virtualbox-extpack-oracle" - elog "package." - elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and" - elog "the \"extension\" USE flag. For installation of the guest additions ISO" - elog "image, please emerge" - elog " app-emulation/virtualbox-additions" - elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge" - elog " app-emulation/virtualbox-extpack-oracle" - if ! use udev ; then - elog "" - elog "WARNING!" - elog "Without USE=udev, USB devices will likely not work in ${PN}." - elif [ -e "${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules" ] ; then - elog "" - elog "Please remove \"${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules\"" - elog "or else USB in ${PN} won't work." - fi -} - -pkg_postrm() { - fdo-mime_desktop_database_update -} diff --git a/app-emulation/virtualbox/virtualbox-5.2.4.ebuild b/app-emulation/virtualbox/virtualbox-5.2.4.ebuild new file mode 100644 index 00000000..d64c9f56 --- /dev/null +++ b/app-emulation/virtualbox/virtualbox-5.2.4.ebuild @@ -0,0 +1,459 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +inherit eutils flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 toolchain-funcs udev xdg-utils + +MY_PV="${PV/beta/BETA}" +MY_PV="${MY_PV/rc/RC}" +MY_P=VirtualBox-${MY_PV} +SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2 + https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.0-patches-01.tar.xz" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use" +HOMEPAGE="http://www.virtualbox.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~x86" +IUSE="alsa debug doc headless java libressl lvm pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc" + +RDEPEND="!app-emulation/virtualbox-bin + ~app-emulation/virtualbox-modules-${PV} + dev-libs/libIDL + >=dev-libs/libxslt-1.1.19 + net-misc/curl + dev-libs/libxml2 + media-libs/libpng:0= + media-libs/libvpx:0= + sys-libs/zlib + !headless? ( + media-libs/libsdl:0[X,video] + x11-libs/libX11 + x11-libs/libXcursor + x11-libs/libXext + x11-libs/libXmu + x11-libs/libXt + opengl? ( virtual/opengl media-libs/freeglut ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwidgets:5 + dev-qt/qtx11extras:5 + opengl? ( dev-qt/qtopengl:5 ) + x11-libs/libXinerama + ) + ) + java? ( >=virtual/jre-1.6:= ) + libressl? ( dev-libs/libressl:= ) + !libressl? ( dev-libs/openssl:0= ) + lvm? ( sys-fs/lvm2 ) + udev? ( >=virtual/udev-171 ) + vnc? ( >=net-libs/libvncserver-0.9.9 )" +DEPEND="${RDEPEND} + >=dev-util/kbuild-0.1.9998.3127 + >=dev-lang/yasm-0.6.2 + sys-devel/bin86 + sys-libs/libcap + sys-power/iasl + virtual/pkgconfig + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + doc? ( + app-text/docbook-sgml-dtd:4.4 + dev-texlive/texlive-basic + dev-texlive/texlive-latex + dev-texlive/texlive-latexrecommended + dev-texlive/texlive-latexextra + dev-texlive/texlive-fontsrecommended + dev-texlive/texlive-fontsextra + ) + !headless? ( x11-libs/libXinerama ) + java? ( >=virtual/jre-1.6:= ) + pam? ( sys-libs/pam ) + pax_kernel? ( sys-apps/elfix ) + pulseaudio? ( media-sound/pulseaudio ) + qt5? ( dev-qt/linguist-tools:5 ) + vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] ) + ${PYTHON_DEPS}" + +QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so + usr/lib/virtualbox/VBoxSDL.so + usr/lib/virtualbox/VBoxSharedFolders.so + usr/lib/virtualbox/VBoxDD2.so + usr/lib/virtualbox/VBoxOGLrenderspu.so + usr/lib/virtualbox/VBoxPython.so + usr/lib/virtualbox/VBoxDD.so + usr/lib/virtualbox/VBoxDDU.so + usr/lib/virtualbox/VBoxREM64.so + usr/lib/virtualbox/VBoxSharedClipboard.so + usr/lib/virtualbox/VBoxHeadless.so + usr/lib/virtualbox/VBoxRT.so + usr/lib/virtualbox/VBoxREM.so + usr/lib/virtualbox/VBoxSettings.so + usr/lib/virtualbox/VBoxKeyboard.so + usr/lib/virtualbox/VBoxSharedCrOpenGL.so + usr/lib/virtualbox/VBoxVMM.so + usr/lib/virtualbox/VirtualBox.so + usr/lib/virtualbox/VBoxOGLhosterrorspu.so + usr/lib/virtualbox/components/VBoxC.so + usr/lib/virtualbox/components/VBoxSVCM.so + usr/lib/virtualbox/components/VBoxDDU.so + usr/lib/virtualbox/components/VBoxRT.so + usr/lib/virtualbox/components/VBoxREM.so + usr/lib/virtualbox/components/VBoxVMM.so + usr/lib/virtualbox/VBoxREM32.so + usr/lib/virtualbox/VBoxPython2_7.so + usr/lib/virtualbox/VBoxXPCOMC.so + usr/lib/virtualbox/VBoxOGLhostcrutil.so + usr/lib/virtualbox/VBoxNetDHCP.so + usr/lib/virtualbox/VBoxNetNAT.so" + +REQUIRED_USE=" + java? ( sdk ) + python? ( sdk ) + vboxwebsrv? ( java ) + ${PYTHON_REQUIRED_USE} +" + +pkg_setup() { + if ! use headless && ! use qt5 ; then + einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend." + elif use headless && use qt5 ; then + einfo "You selected USE=\"headless qt5\", defaulting to" + einfo "USE=\"headless\", this build will not include any X11/Qt frontend." + fi + + if ! use opengl ; then + einfo "No USE=\"opengl\" selected, this build will lack" + einfo "the OpenGL feature." + fi + if ! use python ; then + einfo "You have disabled the \"python\" USE flag. This will only" + einfo "disable the python bindings being installed." + fi + java-pkg-opt-2_pkg_setup + python-single-r1_pkg_setup + + tc-ld-disable-gold #bug 488176 + tc-export CC CXX LD AR RANLIB + export HOST_CC="$(tc-getBUILD_CC)" +} + +src_prepare() { + # Remove shipped binaries (kBuild,yasm), see bug #232775 + rm -r kBuild/bin tools || die + + # Replace pointless GCC version check with something less stupid. + # This is needed for the qt5 version check. + sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' -i configure || die + + # Don't use "echo -n" + sed 's@ECHO_N="echo -n"@ECHO_N="printf"@' -i configure || die + + # Disable things unused or split into separate ebuilds + sed -e "s@MY_LIBDIR@$(get_libdir)@" \ + "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die + + # Respect LDFLAGS + sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \ + -i Config.kmk src/libs/xpcom18a4/Config.kmk || die + + # Do not use hard-coded ld (related to bug #488176) + sed -e '/QUIET)ld /s@ld @$(LD) @' \ + -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die + + # Use PAM only when pam USE flag is enbaled (bug #376531) + if ! use pam ; then + elog "Disabling PAM removes the possibility to use the VRDP features." + sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die + sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \ + src/VBox/HostServices/Makefile.kmk || die + fi + + # add correct java path + if use java ; then + sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \ + -i "${S}"/Config.kmk || die + java-pkg-opt-2_src_prepare + fi + + # Only add nopie patch when we're on hardened + if gcc-specs-pie ; then + eapply "${FILESDIR}/050_virtualbox-5.1.24-nopie.patch" + fi + + # Only add paxmark patch when we're on pax_kernel + if use pax_kernel ; then + eapply "${FILESDIR}"/virtualbox-5.1.4-paxmark-bldprogs.patch + fi + + eapply "${WORKDIR}/patches" + + eapply_user +} + +src_configure() { + local myconf=( + --with-gcc="$(tc-getCC)" + --with-g++="$(tc-getCXX)" + --disable-dbus + --disable-kmods + ) + use alsa || myconf+=( --disable-alsa ) + use debug && myconf+=( --build-debug ) + use doc || myconf+=( --disable-docs ) + use java || myconf+=( --disable-java ) + use lvm || myconf+=( --disable-devmapper ) + use opengl || myconf+=( --disable-opengl ) + use pulseaudio || myconf+=( --disable-pulse ) + use python || myconf+=( --disable-python ) + use vboxwebsrv && myconf+=( --enable-webservice ) + use vnc && myconf+=( --enable-vnc ) + if ! use headless ; then + use qt5 || myconf+=( --disable-qt ) + else + myconf+=( --build-headless --disable-opengl ) + fi + if use amd64 && ! has_multilib_profile ; then + myconf+=( --disable-vmmraw ) + fi + # not an autoconf script + ./configure ${myconf[@]} || die "configure failed" +} + +src_compile() { + source ./env.sh || die + + # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529) + MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #' + MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #' + MAKEOPTS="${MAKEJOBS} ${MAKELOAD}" + MAKE="kmk" emake \ + VBOX_BUILD_PUBLISHER=_Gentoo \ + TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \ + TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \ + TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \ + TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \ + VBOX_GCC_OPT="${CXXFLAGS}" \ + TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \ + all +} + +src_install() { + local binpath="release" + use debug && binpath="debug" + cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die + + local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile + + vbox_inst() { + local binary="${1}" + local perms="${2:-0750}" + local path="${3:-${vbox_inst_path}}" + + [[ -n "${binary}" ]] || die "vbox_inst: No binray given!" + [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits." + + insinto ${path} + doins ${binary} + fowners root:vboxusers ${path}/${binary} + fperms ${perms} ${path}/${binary} + } + + # Create configuration files + insinto /etc/vbox + newins "${FILESDIR}/${PN}-4-config" vbox.cfg + + # Set the correct libdir + sed \ + -e "s@MY_LIBDIR@$(get_libdir)@" \ + -i "${D}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed" + + # Install the wrapper script + exeinto ${vbox_inst_path} + newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox" + fowners root:vboxusers ${vbox_inst_path}/VBox + fperms 0750 ${vbox_inst_path}/VBox + + # Install binaries and libraries + insinto ${vbox_inst_path} + doins -r components + + # *.rc files for x86_64 are only available on multilib systems + local rcfiles="*.rc" + if use amd64 && ! has_multilib_profile ; then + rcfiles="" + fi + for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do + vbox_inst ${each} + done + + # These binaries need to be suid root. + for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do + vbox_inst ${each} 4750 + done + + # Install EFI Firmware files (bug #320757) + pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die + for fwfile in VBoxEFI{32,64}.fd ; do + vbox_inst ${fwfile} 0644 + done + popd &>/dev/null || die + + # VBoxSVC and VBoxManage need to be pax-marked (bug #403453) + # VBoxXPCOMIPCD (bug #524202) + for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do + pax-mark -m "${D}"${vbox_inst_path}/${each} + done + + # Symlink binaries to the shipped wrapper + for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl + + # VRDPAuth only works with this (bug #351949) + dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so + + # set an env-variable for 3rd party tools + echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox" + doenvd "${T}/90virtualbox" + + if ! use headless ; then + vbox_inst VBoxSDL 4750 + pax-mark -m "${D}"${vbox_inst_path}/VBoxSDL + + for each in vboxsdl VBoxSDL ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + + if use qt5 ; then + vbox_inst VirtualBox 4750 + pax-mark -m "${D}"${vbox_inst_path}/VirtualBox + + if use opengl ; then + vbox_inst VBoxTestOGL + pax-mark -m "${D}"${vbox_inst_path}/VBoxTestOGL + fi + + for each in virtualbox VirtualBox ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + + insinto /usr/share/${PN} + doins -r nls + + newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop + fi + + pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die + for size in 16 32 48 64 128 ; do + newicon -s ${size} ${PN}-${size}px.png ${PN}.png + done + newicon ${PN}-48px.png ${PN}.png + doicon -s scalable ${PN}.svg + popd &>/dev/null || die + pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die + for size in 16 24 32 48 64 72 96 128 256 512 ; do + for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do + icofile="${PN}-${ico}-${size}px.png" + if [[ -f "${icofile}" ]] ; then + newicon -s ${size} ${icofile} ${PN}-${ico}.png + fi + done + done + popd &>/dev/null || die + fi + + if use lvm ; then + vbox_inst VBoxVolInfo 4750 + dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo + fi + + if use sdk ; then + insinto ${vbox_inst_path} + doins -r sdk + + if use java ; then + java-pkg_regjar "${D}${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar" + java-pkg_regso "${D}${vbox_inst_path}/libvboxjxpcom.so" + fi + fi + + if use udev ; then + # New way of handling USB device nodes for VBox (bug #356215) + local udevdir="$(get_udevdir)" + insinto ${udevdir} + doins VBoxCreateUSBNode.sh + fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh + fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh + insinto ${udevdir}/rules.d + sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \ + > "${T}"/10-virtualbox.rules || die + doins "${T}"/10-virtualbox.rules + fi + + if use vboxwebsrv ; then + vbox_inst vboxwebsrv + dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv + newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv + newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv + fi + + if use doc ; then + dodoc UserManual.pdf + fi +} + +pkg_postinst() { + xdg_desktop_database_update + + if use udev ; then + udevadm control --reload-rules \ + && udevadm trigger --subsystem-match=usb + fi + + if ! use headless && use qt5 ; then + elog "To launch VirtualBox just type: \"virtualbox\"." + fi + elog "You must be in the vboxusers group to use VirtualBox." + elog "" + elog "The latest user manual is available for download at:" + elog "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf" + elog "" + elog "For advanced networking setups you should emerge:" + elog "net-misc/bridge-utils and sys-apps/usermode-utilities" + elog "" + elog "IMPORTANT!" + elog "If you upgrade from app-emulation/virtualbox-ose make sure to run" + elog "\"env-update\" as root and logout and relogin as the user you wish" + elog "to run ${PN} as." + elog "" + elog "Starting with version 4.0.0, ${PN} has USB-1 support." + elog "For USB-2 support, PXE-boot ability and VRDP support please emerge" + elog " app-emulation/virtualbox-extpack-oracle" + elog "package." + elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and" + elog "the \"extension\" USE flag. For installation of the guest additions ISO" + elog "image, please emerge" + elog " app-emulation/virtualbox-additions" + elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge" + elog " app-emulation/virtualbox-extpack-oracle" + if ! use udev ; then + elog "" + elog "WARNING!" + elog "Without USE=udev, USB devices will likely not work in ${PN}." + elif [ -e "${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules" ] ; then + elog "" + elog "Please remove \"${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules\"" + elog "or else USB in ${PN} won't work." + fi +} + +pkg_postrm() { + xdg_desktop_database_update +} -- cgit v1.2.3