diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2011-10-24 22:12:42 +0000 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2011-10-24 22:12:42 +0000 |
commit | 96c5c30a34fe2dc33d9b8a1bfa4280fb6f02cae3 (patch) | |
tree | 6b92acb290ecc207b8bc31a33236b889dac062bc /app-emulation | |
parent | app-text/notmuch-0.9: ~amd64 keyword (diff) | |
download | gentoo-2-96c5c30a34fe2dc33d9b8a1bfa4280fb6f02cae3.tar.gz gentoo-2-96c5c30a34fe2dc33d9b8a1bfa4280fb6f02cae3.tar.bz2 gentoo-2-96c5c30a34fe2dc33d9b8a1bfa4280fb6f02cae3.zip |
Fixed compilation with >=3.0.4 hardened kernel (bug #386497)
(Portage version: 2.2.0_alpha71/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation')
4 files changed, 63 insertions, 3 deletions
diff --git a/app-emulation/virtualbox-modules/ChangeLog b/app-emulation/virtualbox-modules/ChangeLog index e093fd67398c..7b3ebe0055e6 100644 --- a/app-emulation/virtualbox-modules/ChangeLog +++ b/app-emulation/virtualbox-modules/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-emulation/virtualbox-modules # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/ChangeLog,v 1.90 2011/10/04 17:56:11 polynomial-c Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/ChangeLog,v 1.91 2011/10/24 22:12:42 polynomial-c Exp $ + + 24 Oct 2011; Lars Wendler <polynomial-c@gentoo.org> + virtualbox-modules-4.1.4.ebuild, + +files/virtualbox-modules-4.1.4-pax-const.patch: + Fixed compilation with >=3.0.4 hardened kernel. Thanks to letrec for + providing the patch and blueness for giving the correct hints wrt. USE flag + naming (bug #386497). *virtualbox-modules-4.1.4 (04 Oct 2011) 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 new file mode 100644 index 000000000000..4e4cde06c784 --- /dev/null +++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch @@ -0,0 +1,48 @@ +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/metadata.xml b/app-emulation/virtualbox-modules/metadata.xml index a5f042b854bc..4f33f93fd39f 100644 --- a/app-emulation/virtualbox-modules/metadata.xml +++ b/app-emulation/virtualbox-modules/metadata.xml @@ -13,4 +13,7 @@ <email>swapon@gmail.com</email> <name>Alessio Cassibba</name> </maintainer> +<use> + <flag name="pax_kernel">Apply patch needed for pax enabled kernels</flag> +</use> </pkgmetadata> diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-4.1.4.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-4.1.4.ebuild index 124b5c76d241..32e5acdfbff7 100644 --- a/app-emulation/virtualbox-modules/virtualbox-modules-4.1.4.ebuild +++ b/app-emulation/virtualbox-modules/virtualbox-modules-4.1.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/virtualbox-modules-4.1.4.ebuild,v 1.1 2011/10/04 17:56:11 polynomial-c Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/virtualbox-modules-4.1.4.ebuild,v 1.2 2011/10/24 22:12:42 polynomial-c Exp $ # XXX: the tarball here is just the kernel modules split out of the binary # package that comes from virtualbox-bin @@ -17,7 +17,7 @@ SRC_URI="http://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="pax_kernel" RDEPEND="!=app-emulation/virtualbox-9999" @@ -39,6 +39,8 @@ src_prepare() { # evil patch for new kernels - header moved grep -lR linux/autoconf.h * | xargs sed -i -e 's:<linux/autoconf.h>:<generated/autoconf.h>:' fi + + use pax_kernel && epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch } src_install() { |