Fixed compilation with >=3.0.4 hardened kernel (bug #386497)
authorLars Wendler <polynomial-c@gentoo.org>
Mon, 24 Oct 2011 22:12:42 +0000 (22:12 +0000)
committerLars Wendler <polynomial-c@gentoo.org>
Mon, 24 Oct 2011 22:12:42 +0000 (22:12 +0000)
Package-Manager: portage-2.2.0_alpha71/cvs/Linux x86_64

app-emulation/virtualbox-modules/ChangeLog
app-emulation/virtualbox-modules/Manifest
app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch [new file with mode: 0644]
app-emulation/virtualbox-modules/metadata.xml
app-emulation/virtualbox-modules/virtualbox-modules-4.1.4.ebuild

index e093fd67398c6f39b1a5d555fab7a341453f7326..7b3ebe0055e67cc6ebb41bb7e2a741cef3c2d4e3 100644 (file)
@@ -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)
 
index 02a71f1bbb7c98c655a50e1952b70da5f54af99a..674cff5ffe23afb57d4bc27f81ea72123e6b620e 100644 (file)
@@ -1,28 +1,29 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA512
 
+AUX virtualbox-modules-4.1.4-pax-const.patch 2335 RMD160 6d082729b5393bab9c185cdc768488636ac9e59e SHA1 efc1fa014934afa0ea3ae692d93e1996441945a2 SHA256 d23da93fa1a3b7833766caa8329745ed7de7a5ed6ce1fecb090325fdc83e42f3
 DIST vbox-kernel-module-src-4.0.12.tar.bz2 901005 RMD160 6bc21432d363ec7d92a3c7b784788f3d8b2e60b9 SHA1 b431fd82d1e23cbcab52fcc2461424d896058eff SHA256 de7306958d5e807d5aed0aa401e0cbf6106f7f89c5930a7b04ceb8cd2d7ca5d1
 DIST vbox-kernel-module-src-4.1.2.tar.bz2 506649 RMD160 f8074daf1b4ef065b11a9d560c996bb4d9067530 SHA1 39f0e571fdd9d2c91b2d565a7d12425c3b6b8d83 SHA256 493339880675df3857c80b2b6efd0bab398452c72ec64dee4530df017a38cd85
 DIST vbox-kernel-module-src-4.1.4.tar.bz2 505952 RMD160 c540fb563d6fdab747366c66d5e472ebffbd3639 SHA1 35a4274118d44bd8603fecfa93817ef129c8e57c SHA256 03577cd31e5ff322102e9bec1ed40f189c50d94032e2d62206b6541a0fda1fb8
 EBUILD virtualbox-modules-4.0.12.ebuild 1570 RMD160 48502bec63dcabe8f9cae90651a0d08e1a2cd60e SHA1 42aa2e640f5e8772ae2ea0ccf6f7a427051572ea SHA256 56012f6439898de74457cfb429cd2f72c29c58daf67df9d833619a27d44a73de
 EBUILD virtualbox-modules-4.1.2.ebuild 1595 RMD160 d3d9d5aae3a3648669b61c1b99d51990a81930e6 SHA1 c0bbbbcd03a09fe331ce411a6fe66888b907c977 SHA256 97378c5b25f51f2d8fdc0c557c3567be6bfd7c476d541942f07bc939fb1ef74d
-EBUILD virtualbox-modules-4.1.4.ebuild 1595 RMD160 23155d6f486ff33bff8405e35beb8c9e637b5cad SHA1 30a30ddf37ccfc21892a5b44077f3e98eed91546 SHA256 71c767465b21decd011c43e18a9e9365ad7532c504fa843eb20b4f1ddcf07b94
-MISC ChangeLog 16454 RMD160 ae265a5f676f83786f17b6de1e4a7f95fb70e9a0 SHA1 ab91280386c65ee49a1435b1454123dd0064f65f SHA256 80e50168dd03fbe3f89aa164841651169dc4086db6f3849d8e3a2c0aee19b5ae
-MISC metadata.xml 436 RMD160 da869daa097bf3731216ae09227e00bd15fb7a93 SHA1 3f373b9fe3e639fac79cbe4fa1dbf98174a15737 SHA256 ba56d1cc5a9f6052b40d9a2af359a1fa69e39fa962cad0c0bbb27dd1f2c43923
+EBUILD virtualbox-modules-4.1.4.ebuild 1674 RMD160 625d002e27bd2b772a7e838acf7e26f02aba9692 SHA1 3967fd1dded050a13add9f77df2e0ad9e1137c06 SHA256 b12ce7bff230037479007062992ba1fa278a28d8e32344995fca3b2ee740a509
+MISC ChangeLog 16768 RMD160 a3a26b8349e20b66e1537bf6b52b1b7b924c3610 SHA1 730169b8707b671a3b49207e5cda651049a1b812 SHA256 1e0b77f444a2837643323f82a3c27df46bace87a0fec3c058dd328d4199c42a4
+MISC metadata.xml 524 RMD160 605893cae913de8fca2a99e283854a7c195fa4e2 SHA1 a476b7fcd62a5d1a54ad1a018c4daac50bb27d0b SHA256 9ae0eab26084901b8d307d8923f5c130d310deceb09047aae884557a00f70bbb
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
-iQIcBAEBCgAGBQJOi0jBAAoJEPiazRVxLXTFC40QAK182DBes1Q06uGeaikMRipm
-CjZcrTXGj+LIJ4+qLlDcdu4mylx7e5abf3km8tC+Jj21XCRI1WsW6ymfoAliMS3k
-me9cV93SgtkOEGVGGA2/V5T1H0qIcNF+y6E+XdbCzgVUXU9CUUKtZuHEWwo/zRnD
-4wDoMur/nN7k0qXFSBgaMP1tkgBtbPFPEYXMxpw5CHLPI+oRkFbXGyUpF9O9ts9P
-pF8kUwNGF63H9Huxh8vX3nEo9m8uCNPBiN+gs6y0c/71nzxqo+nsE70ufHz0b6Jl
-LogX4j7NTkD/6jIi0YjNO42+DbKgip+HFttlIKTzIEDX/Oks78K8QZ7SgupHNanZ
-PD8X+EG+Kc2wQ57k22OiwFGwXGX3uO5Hh4gFxF2X0q49/RQ3TfDizZudUYZhFaOQ
-PJABISSLgeCHf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box-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 (file)
index 0000000..4e4cde0
--- /dev/null
@@ -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"
index a5f042b854bc70d26027c4082a765846c1da44f0..4f33f93fd39fba35699e8de446d7721cbf2b7c74 100644 (file)
@@ -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>
index 124b5c76d2415cf4f7501f22cc91070683ce8682..32e5acdfbff798fe759ef249ad5e87fb84205a86 100644 (file)
@@ -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() {