From 61536dac1a0ca1dce26a07909e5998c3929cb6cd Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Thu, 13 Jan 2011 21:01:39 +0000 Subject: Bugs 345145 and 349649 and 351592 Package-Manager: portage-2.1.9.31/cvs/Linux x86_64 --- app-emulation/vmware-modules/ChangeLog | 11 ++- app-emulation/vmware-modules/Manifest | 6 +- .../vmware-modules/files/1.0.0.25-sema.patch | 87 ++++++++++++++++++++++ .../vmware-modules-1.0.0.25-r2.ebuild | 4 +- .../vmware-modules-1.0.0.25-r3.ebuild | 82 ++++++++++++++++++++ 5 files changed, 184 insertions(+), 6 deletions(-) create mode 100644 app-emulation/vmware-modules/files/1.0.0.25-sema.patch create mode 100644 app-emulation/vmware-modules/vmware-modules-1.0.0.25-r3.ebuild (limited to 'app-emulation/vmware-modules') diff --git a/app-emulation/vmware-modules/ChangeLog b/app-emulation/vmware-modules/ChangeLog index ec48f9cc4760..a23df60cf1b6 100644 --- a/app-emulation/vmware-modules/ChangeLog +++ b/app-emulation/vmware-modules/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-emulation/vmware-modules -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.62 2010/11/21 15:58:59 vadimk Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.63 2011/01/13 21:01:38 vadimk Exp $ + +*vmware-modules-1.0.0.25-r3 (13 Jan 2011) + + 13 Jan 2011; Vadim Kuznetsov +files/1.0.0.25-sema.patch, + +vmware-modules-1.0.0.25-r3.ebuild: + Bug 345145 and 349649 and 351592 + Thanks to Mateusz Dziadko, Dane Smith and bugs et al. *vmware-modules-1.0.0.24-r2 (21 Nov 2010) diff --git a/app-emulation/vmware-modules/Manifest b/app-emulation/vmware-modules/Manifest index 5ee98cba5f43..ff3995a1c984 100644 --- a/app-emulation/vmware-modules/Manifest +++ b/app-emulation/vmware-modules/Manifest @@ -8,6 +8,7 @@ AUX 1.0.0.24-vmnet-2.6.31.patch 13974 RMD160 84af8197b341ccea2fdda39225f9259ccdb AUX 1.0.0.25-autoconf-generated.patch 17674 RMD160 38343d24d8cdfd7e312f3e60cf87f7236da6df22 SHA1 6e427c26f1a1efafff4a1c8623ef9ada874540e5 SHA256 d35b879cb950373939d3cef32e56be87f5b216ece3fe12af5e04c2c7c146a394 AUX 1.0.0.25-makefile-include.patch 3185 RMD160 a3aa2f7cb3a51c96be13080061543d9664d98096 SHA1 df61745eeb49f517a9b7fb882ec0baab772544dd SHA256 50b529606062794d90083a590e05966b3420f1f9c6648863bd0ff360c17d9b34 AUX 1.0.0.25-makefile-kernel-dir.patch 2129 RMD160 885b638c78cb0663d0d55682bafd453c6122fe17 SHA1 9a08768a9923d8259346f89ae78deae878b68df9 SHA256 fd583c13433bb3ddc64a21af6c472e3c6a2747990118a22881d2b48c16e5655f +AUX 1.0.0.25-sema.patch 3756 RMD160 b182d2aa998c61afc28c68e2b859fbb894ccd550 SHA1 9cb8bcee24e294ed8dbd5f27c8160186c8c6d1fe SHA256 2fe6190be73b29b29f99e8a0c74f2b34213cd394a11aef5866a957851cc37b03 AUX 1.0.0.25-sk_sleep.patch 2953 RMD160 39e0ae852ab54f84d40bdd9bfc343e3ae3742882 SHA1 875e4195420f52784605ad013dd77da59b0c3511 SHA256 0c318c8f54b55f6adaade2cdd805ccf8cb04a9ce279bce2382e7e4d1fd78d33f AUX 1.0.0.25-unlocked_ioctl.patch 1136 RMD160 a5ae0ebd54acac07144ab1510a04ebb7cabc0598 SHA1 177c3cf965d2c83084696f8132f6c7cd6ab82a2d SHA256 0bad0f0848772ec64d40a15a48c8f9d37212dd93b243e4cc5f1172371e7fbf14 AUX apic.patch 294 RMD160 ab0d6fea359f66ccd735cd3bc830442f6f6baa39 SHA1 537f1a903b94ea379003cf4e50c9507ae403c595 SHA256 6902f8dd82d48f479a3e5647e3bd7125d073f242dd85a5b2ddfd51f4ea8f663c @@ -31,6 +32,7 @@ EBUILD vmware-modules-1.0.0.15-r2.ebuild 445 RMD160 d16a678a0c9291289be89006b747 EBUILD vmware-modules-1.0.0.24-r1.ebuild 2059 RMD160 b7e8ec8509cec3df79a1e1c60e9f7ce6a7063402 SHA1 b14b5b4c02c93990e0ce94105a236bbc7559c474 SHA256 7afef8c3b65c858fca15174f81432537e8a04dd1bb0ff0bfcfdf61de4dbfd0f6 EBUILD vmware-modules-1.0.0.24-r2.ebuild 2134 RMD160 51e738688f0ed1c4639f60463cea5c10e73371d1 SHA1 0b1dcb90606ee8c5bcc8dcb8e428bee0b04ece88 SHA256 fb0856fd9851d77c5bccc8cec51409c539441b9edb689822c12e8ec1be53b8e4 EBUILD vmware-modules-1.0.0.25-r1.ebuild 2050 RMD160 b1d2772dedb71ec8351e1c58b131f671bfc02b4c SHA1 cd4995359b2192465eb6b6f4cfdef19d0f911683 SHA256 c323e7b3081a65d9f67d351d5f1976c2204160e164b4d5039bfb3002263ffe61 -EBUILD vmware-modules-1.0.0.25-r2.ebuild 2066 RMD160 61df9dc743fda05f5a436f5754ca33b96010114f SHA1 0a900ee13fd0eabe3f1d3150063ca54ac70b965f SHA256 f0af4be70228c91294920552af23618f4b97531aff35c487920af43767f77ed2 -MISC ChangeLog 14295 RMD160 6a62b1e23271f1849e1f6180bc672541250f77f0 SHA1 905137f0dbbd5e5f0b46c46c3a9d593841cc3cbd SHA256 7c00a6c5df7d5d84199730659abff5eb94f692ceb1264e36b3ef21dfcd8e475a +EBUILD vmware-modules-1.0.0.25-r2.ebuild 2066 RMD160 91d8a8c0f3dbcaa4e8a9274e1bfac34e47065f74 SHA1 c0c3fd0fec19c7d17e0f612b85e5bbd83e9f1b9a SHA256 9c640a96c300f8d0be19d7fcf23f426810f1456e9103c082a78910ae981d732b +EBUILD vmware-modules-1.0.0.25-r3.ebuild 2226 RMD160 94759d4c7982b0a4ac12116716c910c96608f889 SHA1 13ed9b7acc20ed015ee5b184abe388aa42719cad SHA256 e1fd5f8ddae62547fe9254fdf5c0b08722f738534fd72297162c819154058b67 +MISC ChangeLog 14547 RMD160 06959023c20e6e6268f98bfff5ebbedacaef9eb7 SHA1 426e60845108c8c5f4da6caa55e18c606a0a5f8a SHA256 1df9ad7e2f5939bb1b82b618d75ff2e382c59d974a4664972d7d3fc669160696 MISC metadata.xml 288 RMD160 da2ee1499dd87693b63592a337d8352494cb9652 SHA1 e1b50a587afb7878e21828a957a6838e7d08e4e8 SHA256 100017b3059be218965923798780ab195dafaa893f98088592fb5b299e686c37 diff --git a/app-emulation/vmware-modules/files/1.0.0.25-sema.patch b/app-emulation/vmware-modules/files/1.0.0.25-sema.patch new file mode 100644 index 000000000000..f5b06f3ccc0a --- /dev/null +++ b/app-emulation/vmware-modules/files/1.0.0.25-sema.patch @@ -0,0 +1,87 @@ +diff -ru vmware-modules-1.0.0.25-r2.orig/work/vmci-only/include/compat_semaphore.h vmware-modules-1.0.0.25-r2/work/vmci-only/include/compat_semaphore.h +--- vmware-modules-1.0.0.25-r2.orig/work/vmci-only/include/compat_semaphore.h 2011-01-11 21:55:57.016999997 +0100 ++++ vmware-modules-1.0.0.25-r2/work/vmci-only/include/compat_semaphore.h 2011-01-11 21:57:39.719999997 +0100 +@@ -45,5 +45,13 @@ + #endif + #endif + ++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) ++ #ifndef DECLARE_MUTEX ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) ++ #endif ++ #ifndef init_MUTEX ++ #define init_MUTEX(_m) sema_init(_m,1) ++ #endif ++#endif + + #endif /* __COMPAT_SEMAPHORE_H__ */ +diff -ru vmware-modules-1.0.0.25-r2.orig/work/vmmon-only/include/compat_semaphore.h vmware-modules-1.0.0.25-r2/work/vmmon-only/include/compat_semaphore.h +--- vmware-modules-1.0.0.25-r2.orig/work/vmmon-only/include/compat_semaphore.h 2011-01-11 21:55:57.028999997 +0100 ++++ vmware-modules-1.0.0.25-r2/work/vmmon-only/include/compat_semaphore.h 2011-01-11 21:58:57.529999998 +0100 +@@ -45,5 +45,13 @@ + #endif + #endif + ++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) ++ #ifndef DECLARE_MUTEX ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) ++ #endif ++ #ifndef init_MUTEX ++ #define init_MUTEX(_m) sema_init(_m,1) ++ #endif ++#endif + + #endif /* __COMPAT_SEMAPHORE_H__ */ +diff -ru vmware-modules-1.0.0.25-r2.orig/work/vmnet-only/compat_semaphore.h vmware-modules-1.0.0.25-r2/work/vmnet-only/compat_semaphore.h +--- vmware-modules-1.0.0.25-r2.orig/work/vmnet-only/compat_semaphore.h 2011-01-11 21:55:57.022999997 +0100 ++++ vmware-modules-1.0.0.25-r2/work/vmnet-only/compat_semaphore.h 2011-01-11 21:58:23.678999996 +0100 +@@ -45,5 +45,14 @@ + #endif + #endif + ++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) ++ #ifndef DECLARE_MUTEX ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) ++ #endif ++ #ifndef init_MUTEX ++ #define init_MUTEX(_m) sema_init(_m,1) ++ #endif ++#endif ++ + + #endif /* __COMPAT_SEMAPHORE_H__ */ +diff -ru vmware-modules-1.0.0.25-r2.orig/work/vmnet-only/vnetFilter.h vmware-modules-1.0.0.25-r2/work/vmnet-only/vnetFilter.h +--- vmware-modules-1.0.0.25-r2.orig/work/vmnet-only/vnetFilter.h 2011-01-11 21:55:57.020999997 +0100 ++++ vmware-modules-1.0.0.25-r2/work/vmnet-only/vnetFilter.h 2011-01-11 22:02:29.522999997 +0100 +@@ -203,5 +203,13 @@ + } + #include "vmware_pack_end.h" + VNet_SetLogLevel; ++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) ++ #ifndef DECLARE_MUTEX ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) ++ #endif ++ #ifndef init_MUTEX ++ #define init_MUTEX(_m) sema_init(_m,1) ++ #endif ++#endif + + #endif // ifndef _VNETFILTER_H_ +diff -ru vmware-modules-1.0.0.25-r2.orig/work/vsock-only/linux/af_vsock.h vmware-modules-1.0.0.25-r2/work/vsock-only/linux/af_vsock.h +--- vmware-modules-1.0.0.25-r2.orig/work/vsock-only/linux/af_vsock.h 2011-01-11 21:55:57.040999997 +0100 ++++ vmware-modules-1.0.0.25-r2/work/vsock-only/linux/af_vsock.h 2011-01-11 22:03:59.066999997 +0100 +@@ -88,4 +88,14 @@ + #endif + } VSockVmciSock; + ++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) ++ #ifndef DECLARE_MUTEX ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) ++ #endif ++ #ifndef init_MUTEX ++ #define init_MUTEX(_m) sema_init(_m,1) ++ #endif ++#endif ++ ++ + #endif /* __AF_VSOCK_H__ */ diff --git a/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r2.ebuild b/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r2.ebuild index 85c24384fe9f..f64deca32eb4 100644 --- a/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r2.ebuild +++ b/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r2.ebuild,v 1.2 2010/11/21 15:58:59 vadimk Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r2.ebuild,v 1.3 2011/01/13 21:01:38 vadimk Exp $ EAPI="2" diff --git a/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r3.ebuild b/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r3.ebuild new file mode 100644 index 000000000000..ce662b89bc3b --- /dev/null +++ b/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r3.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r3.ebuild,v 1.1 2011/01/13 21:01:38 vadimk Exp $ + +EAPI="2" + +inherit eutils flag-o-matic linux-mod + +DESCRIPTION="VMware kernel modules" +HOMEPAGE="http://www.vmware.com/" + +SRC_URI="x86? ( + mirror://gentoo/${P}.x86.tar.bz2 + http://dev.gentoo.org/~vadimk/${P}.x86.tar.bz2 + ) + amd64? ( + mirror://gentoo/${P}.amd64.tar.bz2 + http://dev.gentoo.org/~vadimk/${P}.amd64.tar.bz2 + )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +pkg_setup() { + linux-mod_pkg_setup + + VMWARE_VER="VME_V65" # THIS VALUE IS JUST A PLACE HOLDER + VMWARE_GROUP=${VMWARE_GROUP:-vmware} + + VMWARE_MODULE_LIST="vmblock vmci vmmon vmnet vsock" + VMWARE_MOD_DIR="${PN}-${PVR}" + + BUILD_TARGETS="auto-build VMWARE_VER=${VMWARE_VER} KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}" + + enewgroup "${VMWARE_GROUP}" + filter-flags -mfpmath=sse + + for mod in ${VMWARE_MODULE_LIST}; do + MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)" + done +} + +src_unpack() { + unpack ${A} + cd "${S}" + for mod in ${VMWARE_MODULE_LIST}; do + unpack ./"${P}"/${mod}.tar + done +} + +src_prepare() { + epatch "${FILESDIR}/${PV}-makefile-kernel-dir.patch" + epatch "${FILESDIR}/${PV}-makefile-include.patch" + epatch "${FILESDIR}/sched_h-2.6.32.patch" + epatch "${FILESDIR}/${PV}-autoconf-generated.patch" + epatch "${FILESDIR}/apic.patch" + kernel_is ge 2 6 35 && epatch "${FILESDIR}/${PV}-sk_sleep.patch" + kernel_is ge 2 6 36 && epatch "${FILESDIR}/${PV}-unlocked_ioctl.patch" + kernel_is 2 6 37 && epatch "${FILESDIR}/${PV}-sema.patch" + + sed -i -e 's/make/$(MAKE)/g' {vmmon,vsock,vmblock,vmnet,vmci}-only/Makefile\ + || die "Sed failed." +} + +src_install() { + # this adds udev rules for vmmon* + if [[ -n "`echo ${VMWARE_MODULE_LIST} | grep vmmon`" ]]; + then + dodir /etc/udev/rules.d + echo 'KERNEL=="vmmon*", GROUP="'$VMWARE_GROUP'" MODE=660' >> "${D}/etc/udev/rules.d/60-vmware.rules" || die + echo 'KERNEL=="vmnet*", GROUP="'$VMWARE_GROUP'" MODE=660' >> "${D}/etc/udev/rules.d/60-vmware.rules" || die + fi + + linux-mod_src_install +} -- cgit v1.2.3-65-gdbad