From 0169682f925b1b2e374a62fd607ecf80b3ea3b52 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 4 Jun 2017 15:37:52 +0100 Subject: bump all virtualbox packages to v5.1.22 --- app-emulation/virtualbox-extpack-oracle/Manifest | 2 +- .../virtualbox-extpack-oracle-5.1.14.112924.ebuild | 42 -- .../virtualbox-extpack-oracle-5.1.22.115126.ebuild | 42 ++ app-emulation/virtualbox-modules/Manifest | 2 +- .../files/virtualbox-modules-4.1.4-pax-const.patch | 48 --- .../virtualbox-modules-5.1.10-ALIGN-backport.patch | 12 - .../virtualbox-modules-5.1.14.ebuild | 36 -- .../virtualbox-modules-5.1.22.ebuild | 36 ++ app-emulation/virtualbox/Manifest | 4 +- .../virtualbox-5.1.22-opengl_dlopen_fix.patch | 167 ++++++++ app-emulation/virtualbox/virtualbox-5.1.14.ebuild | 447 -------------------- .../virtualbox/virtualbox-5.1.22-r1.ebuild | 457 +++++++++++++++++++++ sys-kernel/virtualbox-modules-dkms/Manifest | 2 +- .../virtualbox-modules-dkms-5.1.14.ebuild | 45 -- .../virtualbox-modules-dkms-5.1.22.ebuild | 45 ++ 15 files changed, 752 insertions(+), 635 deletions(-) delete mode 100644 app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.14.112924.ebuild create mode 100644 app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.22.115126.ebuild delete mode 100644 app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch delete mode 100644 app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.10-ALIGN-backport.patch delete mode 100644 app-emulation/virtualbox-modules/virtualbox-modules-5.1.14.ebuild create mode 100644 app-emulation/virtualbox-modules/virtualbox-modules-5.1.22.ebuild create mode 100644 app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch delete mode 100644 app-emulation/virtualbox/virtualbox-5.1.14.ebuild create mode 100644 app-emulation/virtualbox/virtualbox-5.1.22-r1.ebuild delete mode 100644 sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-5.1.14.ebuild create mode 100644 sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-5.1.22.ebuild diff --git a/app-emulation/virtualbox-extpack-oracle/Manifest b/app-emulation/virtualbox-extpack-oracle/Manifest index 2da1dbb4..04f89f2a 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.14-112924.tar.gz 19476532 SHA256 baddb7cc49224ecc1147f82d77fce2685ac39941ac9b0aac83c270dd6570ea85 SHA512 f54e915976a4b4f3ab55ce7d5ea2ab6bf00f4355cdf5fb05ec9c7ef629464f7d8ef798c443380326ce12d74cb316e41f34ef6017377542c8a91a3a547ef8a040 WHIRLPOOL f27c47f83fe3875eb0b11fac3454c40f2220e37c7fad3d11709d1059712ac66f7b70cf515d88a010301227c9679f07db5fc8dcb9bd2ae82aa5cabce30276c53e +DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.22-115126.tar.gz 19559514 SHA256 244e6f450cba64e0b025711050db3c43e6ce77e12cd80bcd08796315a90c8aaf SHA512 55841287d580d984142a0572aff4124a180bbe10cb8536426992b5d9e0ce0f3f6d3858aae12de728995a237101a581aa6500b312e457b812f079e3ad67e7ec10 WHIRLPOOL fd883e9f4c77b282528c938296ab820a719334abd3573e4fb9f2023b9a4f2dfa09261aad94f808a6bc1203cf5419f17cbc39d7af8e1b6938b05b14ea51470990 diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.14.112924.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.14.112924.ebuild deleted file mode 100644 index 3c6c739d..00000000 --- a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.14.112924.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.1.22.115126.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.22.115126.ebuild new file mode 100644 index 00000000..3c6c739d --- /dev/null +++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.22.115126.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-modules/Manifest b/app-emulation/virtualbox-modules/Manifest index 4128a06c..2b5a3be2 100644 --- a/app-emulation/virtualbox-modules/Manifest +++ b/app-emulation/virtualbox-modules/Manifest @@ -1 +1 @@ -DIST vbox-kernel-module-src-5.1.14.tar.xz 613508 SHA256 7409f0cdb4de7358aa5c1265bb6cc71802d37a28ac0156daa3c4c8c9c6d49551 SHA512 fad7c4d12a2afc1c112ee620fe748ecb0bacdcbf6db9d3c1375ac35f610dc017c8b0a62221b8401935ea7b266b2126191bf1c3fe96613b0a0bf779341df5d147 WHIRLPOOL c0ea8f4ab1b73cd04c20a095875beec4cd3b43630c0c3b17e884f59ed0ee7d12e3d6c102419d954b9f0dd27bc6e5fd1f0bcbf14aa605d0ebfc70eb5b703c03d8 +DIST vbox-kernel-module-src-5.1.22.tar.xz 620064 SHA256 e4d92a9cc6eb677d75364cb09f7e47360f80fb80f434caea2cc65b25853f94c4 SHA512 e38f67cc36bdb5b98546816eb66ad29b5b93830afa12e850ae00aae4382acd13e1a25d9c7f3e8bfb5e42636499798c95eb632c599ab96e51c55e0a77fa693e73 WHIRLPOOL c90c86e2c4c78c82f25c3c97d6efc13d5f098bd6266ad4f7b5a62f79d0dc2c2a823ec955b0d58d72aa363475b2ff784634b50742be40fc801f62707928e405b7 diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch deleted file mode 100644 index 4e4cde06..00000000 --- a/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -urp vboxdrv.orig/SUPDrvIDC.h vboxdrv/SUPDrvIDC.h ---- vboxdrv.orig/SUPDrvIDC.h 2011-09-06 15:53:27.852567531 +0200 -+++ vboxdrv/SUPDrvIDC.h 2011-09-06 15:54:05.420565524 +0200 -@@ -160,7 +160,7 @@ typedef struct SUPDRVIDCREQGETSYM - { - /** The symbol address. */ - PFNRT pfnSymbol; -- } Out; -+ } __no_const Out; - } u; - } SUPDRVIDCREQGETSYM; - /** Pointer to a SUPDRV IDC get symbol request. */ -diff -urp vboxnetflt.orig/include/VBox/intnet.h vboxnetflt/include/VBox/intnet.h ---- vboxnetflt.orig/include/VBox/intnet.h 2011-09-06 15:53:27.852567531 +0200 -+++ vboxnetflt/include/VBox/intnet.h 2011-09-06 15:54:05.424565524 +0200 -@@ -783,7 +783,7 @@ typedef struct INTNETTRUNKFACTORY - DECLR0CALLBACKMEMBER(int, pfnCreateAndConnect,(struct INTNETTRUNKFACTORY *pIfFactory, const char *pszName, - PINTNETTRUNKSWPORT pSwitchPort, uint32_t fFlags, - PINTNETTRUNKIFPORT *ppIfPort)); --} INTNETTRUNKFACTORY; -+} __no_const INTNETTRUNKFACTORY; - /** Pointer to the trunk factory. */ - typedef INTNETTRUNKFACTORY *PINTNETTRUNKFACTORY; - -diff -urp vboxnetflt.orig/linux/VBoxNetFlt-linux.c vboxnetflt/linux/VBoxNetFlt-linux.c ---- vboxnetflt.orig/linux/VBoxNetFlt-linux.c 2011-07-19 12:15:22.000000000 +0200 -+++ vboxnetflt/linux/VBoxNetFlt-linux.c 2011-09-06 15:56:00.516559379 +0200 -@@ -840,7 +840,7 @@ typedef struct ethtool_ops OVR_OPSTYPE; - - # else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) */ - --typedef struct net_device_ops OVR_OPSTYPE; -+typedef net_device_ops_no_const OVR_OPSTYPE; - # define OVR_OPS netdev_ops - # define OVR_XMIT pOrgOps->ndo_start_xmit - -diff -urp vboxpci.orig/include/VBox/rawpci.h vboxpci/include/VBox/rawpci.h ---- vboxpci.orig/include/VBox/rawpci.h 2011-04-18 17:01:12.000000000 +0200 -+++ vboxpci/include/VBox/rawpci.h 2011-09-06 15:57:17.340555277 +0200 -@@ -545,7 +545,7 @@ typedef struct RAWPCIFACTORY - DECLR0CALLBACKMEMBER(void, pfnDeinitVm,(PRAWPCIFACTORY pFactory, - PVM pVM, - PRAWPCIPERVM pPciData)); --} RAWPCIFACTORY; -+} __no_const RAWPCIFACTORY; - - #define RAWPCIFACTORY_UUID_STR "ea089839-4171-476f-adfb-9e7ab1cbd0fb" - diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.10-ALIGN-backport.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.10-ALIGN-backport.patch deleted file mode 100644 index 1bc3fddd..00000000 --- a/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.10-ALIGN-backport.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h -=================================================================== ---- a/vboxdrv/SUPDrvInternal.h -+++ b/vboxdrv/SUPDrvInternal.h -@@ -65,7 +65,4 @@ - # include - # endif --# endif --# if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 0) --# undef ALIGN - # endif - # ifndef KBUILD_STR diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.14.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.14.ebuild deleted file mode 100644 index e8b50e38..00000000 --- a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.14.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.1.22.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.22.ebuild new file mode 100644 index 00000000..e8b50e38 --- /dev/null +++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.22.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="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/Manifest b/app-emulation/virtualbox/Manifest index 237da10d..842a00c8 100644 --- a/app-emulation/virtualbox/Manifest +++ b/app-emulation/virtualbox/Manifest @@ -1,2 +1,2 @@ -DIST VirtualBox-5.1.14.tar.bz2 115042132 SHA256 8267bb026717c6e55237eb798210767d9c703cfcdf01224d9bc26f7dac9f228a SHA512 ab0646c587fa1b573a9332ca0f1959660adc02f2ecf63ac808f4a7e3ceb9b2c58adab8e309aec4630ff7fa447f47d7487e7e8d0a1f718a42d39ce71e96067fae WHIRLPOOL 915b3ac0d50def86e92b662c7fe32e1390c9dab73efb9fc9595465c45818b86b4380be93a7075d17e33f9b70d92dbbbf6063ce0dad6448c9a592648a10f2409b -DIST virtualbox-5.1.6-patches-01.tar.xz 4268 SHA256 5bfae08bc53fee06aea501e77b7998348adba43792149248d217ab03dea8c04f SHA512 2401df42ac8c2fd1f4bbc795713b185d5e65c2a36c763fa1d7274686599808aecdc28aaa6443c9efc9842f7b3eeb928818c95d1e7ad3b86239c2ace441a5e116 WHIRLPOOL 25505eaff2eeb820a09a2c8807c2d5cec48cbfe98fcd30b04daf86c4cd7c506f09c67b80d5ecc221ded08af6e48297e0161bae16862e5a1d3204b27945c511b0 +DIST VirtualBox-5.1.22.tar.bz2 115838360 SHA256 fcc918000b8c5ece553541ec10a9182410a742b7266257c76dda895dcd389899 SHA512 e48457371c9139fc04477c82fbd18974378fde08af2a6f9058a0eafa6e522987bd129b8d87c9f381789c4e817aded752fde6ea7fcb2ade471997373802e09348 WHIRLPOOL c6034aad69c8a25eaf5909b6889f04f8090ace562e18a76bc55ad4d3e8347844fa1ab466d32e92b09180dff71e0f928826db0994d34b03f44b11bdb03ccc40d2 +DIST virtualbox-5.1.18-patches-01.tar.xz 4512 SHA256 1aa525a8230f77abc672e61bea76af9ddfbb8f22acf21ef382b7a0a88de92764 SHA512 f1c88dd9b7fbafb9764df0a88dc5615aa78a01408d0a14c0dae33e3a53bd75c191c0181934848e17f5fd77784f9e01bf44b444f1485fc302cb1538c2e8ddac95 WHIRLPOOL c11adda0297cc18f0ac614a3492c411413bf640090c9cdb4c5382c4da0391734c479d92c2933e46e0dc8ccf59e155ce35e72182abcb5015a7e03ec33d51c1ab0 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 new file mode 100644 index 00000000..71fa978c --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch @@ -0,0 +1,167 @@ +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/virtualbox-5.1.14.ebuild b/app-emulation/virtualbox/virtualbox-5.1.14.ebuild deleted file mode 100644 index 496e3a16..00000000 --- a/app-emulation/virtualbox/virtualbox-5.1.14.ebuild +++ /dev/null @@ -1,447 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -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.6-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 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? ( - 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 ) - 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 - - # Remove pointless GCC version limitations in check_gcc() - sed -e "/\s*-o\s*\\\(\s*\$cc_maj\s*-eq\s*[5-9]\s*-a\s*\$cc_min\s*-gt\s*[0-5]\s*\\\)\s*\\\/d" \ - -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 - - eapply "${WORKDIR}/patches" - - eapply_user -} - -src_configure() { - local myconf=() - 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 \ - --with-gcc="$(tc-getCC)" \ - --with-g++="$(tc-getCXX)" \ - --disable-dbus \ - --disable-kmods \ - ${myconf[@]} \ - || die "configure failed" -} - -src_compile() { - source ./env.sh || die - - # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529) - MAKEJOBS=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+') - MAKELOAD=$(echo ${MAKEOPTS} | egrep -o '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+') #' - 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 -} - -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.1.22-r1.ebuild b/app-emulation/virtualbox/virtualbox-5.1.22-r1.ebuild new file mode 100644 index 00000000..24821a0e --- /dev/null +++ b/app-emulation/virtualbox/virtualbox-5.1.22-r1.ebuild @@ -0,0 +1,457 @@ +# 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 + + # Remove pointless GCC version check + sed -e '/^check_gcc$/d' -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 "${FILESDIR}/${P}-opengl_dlopen_fix.patch" #616238 + + eapply_user +} + +src_configure() { + local myconf=() + 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 \ + --with-gcc="$(tc-getCC)" \ + --with-g++="$(tc-getCXX)" \ + --disable-dbus \ + --disable-kmods \ + ${myconf[@]} \ + || die "configure failed" +} + +src_compile() { + source ./env.sh || die + + # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529) + MAKEJOBS=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+') + MAKELOAD=$(echo ${MAKEOPTS} | egrep -o '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+') #' + 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/sys-kernel/virtualbox-modules-dkms/Manifest b/sys-kernel/virtualbox-modules-dkms/Manifest index 4128a06c..2b5a3be2 100644 --- a/sys-kernel/virtualbox-modules-dkms/Manifest +++ b/sys-kernel/virtualbox-modules-dkms/Manifest @@ -1 +1 @@ -DIST vbox-kernel-module-src-5.1.14.tar.xz 613508 SHA256 7409f0cdb4de7358aa5c1265bb6cc71802d37a28ac0156daa3c4c8c9c6d49551 SHA512 fad7c4d12a2afc1c112ee620fe748ecb0bacdcbf6db9d3c1375ac35f610dc017c8b0a62221b8401935ea7b266b2126191bf1c3fe96613b0a0bf779341df5d147 WHIRLPOOL c0ea8f4ab1b73cd04c20a095875beec4cd3b43630c0c3b17e884f59ed0ee7d12e3d6c102419d954b9f0dd27bc6e5fd1f0bcbf14aa605d0ebfc70eb5b703c03d8 +DIST vbox-kernel-module-src-5.1.22.tar.xz 620064 SHA256 e4d92a9cc6eb677d75364cb09f7e47360f80fb80f434caea2cc65b25853f94c4 SHA512 e38f67cc36bdb5b98546816eb66ad29b5b93830afa12e850ae00aae4382acd13e1a25d9c7f3e8bfb5e42636499798c95eb632c599ab96e51c55e0a77fa693e73 WHIRLPOOL c90c86e2c4c78c82f25c3c97d6efc13d5f098bd6266ad4f7b5a62f79d0dc2c2a823ec955b0d58d72aa363475b2ff784634b50742be40fc801f62707928e405b7 diff --git a/sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-5.1.14.ebuild b/sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-5.1.14.ebuild deleted file mode 100644 index 00923566..00000000 --- a/sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-5.1.14.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit eutils - -MY_P=vbox-kernel-module-src-${PV} -DESCRIPTION="Kernel Modules source 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/dkms" -RDEPEND="${DEPEND}" - -S=${WORKDIR} - -src_prepare() { - grep -lR linux/autoconf.h * | xargs sed -i -e 's:::' -} - -src_compile() { - : -} - -src_install() { - cp ${FILESDIR}/dkms.conf ${S} - dodir /usr/src/${P} - insinto /usr/src/${P} - doins -r ${S}/* -} - -pkg_postinst() { - dkms add ${PN}/${PV} -} - -pkg_prerm() { - dkms remove ${PN}/${PV} --all -} diff --git a/sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-5.1.22.ebuild b/sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-5.1.22.ebuild new file mode 100644 index 00000000..00923566 --- /dev/null +++ b/sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-5.1.22.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils + +MY_P=vbox-kernel-module-src-${PV} +DESCRIPTION="Kernel Modules source 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/dkms" +RDEPEND="${DEPEND}" + +S=${WORKDIR} + +src_prepare() { + grep -lR linux/autoconf.h * | xargs sed -i -e 's:::' +} + +src_compile() { + : +} + +src_install() { + cp ${FILESDIR}/dkms.conf ${S} + dodir /usr/src/${P} + insinto /usr/src/${P} + doins -r ${S}/* +} + +pkg_postinst() { + dkms add ${PN}/${PV} +} + +pkg_prerm() { + dkms remove ${PN}/${PV} --all +} -- cgit v1.2.3