summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kuznetsov <vadimk@gentoo.org>2009-06-14 15:27:10 +0000
committerVadim Kuznetsov <vadimk@gentoo.org>2009-06-14 15:27:10 +0000
commit9ad6437ca63ef8b883040bf47ff800581046160d (patch)
treee316e6e72edde8b103a6f9f4df72d88caa067b17 /app-emulation/vmware-modules
parentRemove no longer needed sed. Add configure phase with new QT_ONLY cmake flag.... (diff)
downloadhistorical-9ad6437ca63ef8b883040bf47ff800581046160d.tar.gz
historical-9ad6437ca63ef8b883040bf47ff800581046160d.tar.bz2
historical-9ad6437ca63ef8b883040bf47ff800581046160d.zip
Bugs 268099, 270150, 273750. New ebuild without vmware-mod eclass.
Package-Manager: portage-2.2_rc33/cvs/Linux x86_64
Diffstat (limited to 'app-emulation/vmware-modules')
-rw-r--r--app-emulation/vmware-modules/ChangeLog10
-rw-r--r--app-emulation/vmware-modules/Manifest20
-rw-r--r--app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.29.patch288
-rw-r--r--app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.30.patch33
-rw-r--r--app-emulation/vmware-modules/files/1.0.0.24-makefile-kernel-dir.patch80
-rw-r--r--app-emulation/vmware-modules/metadata.xml8
-rw-r--r--app-emulation/vmware-modules/vmware-modules-1.0.0.24.ebuild76
7 files changed, 501 insertions, 14 deletions
diff --git a/app-emulation/vmware-modules/ChangeLog b/app-emulation/vmware-modules/ChangeLog
index 6ddd8f4f69ae..1309acc1b508 100644
--- a/app-emulation/vmware-modules/ChangeLog
+++ b/app-emulation/vmware-modules/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-emulation/vmware-modules
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.43 2009/05/16 07:33:20 ikelos Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.44 2009/06/14 15:27:10 vadimk Exp $
+
+*vmware-modules-1.0.0.24 (14 Jun 2009)
+
+ 14 Jun 2009; Vadim Kuznetsov vadimk@gentoo.org
+ +vmware-modules-1.0.0.24.ebuild, +files/1.0.0.24-kernel-2.6.29.patch,
+ +files/1.0.0.24-kernel-2.6.30.patch,
+ +files/1.0.0.24-makefile-kernel-dir.patch, metadata.xml:
+ Bugs 268099, 270150, 273750. New ebuild without vmware-mod eclass.
*vmware-modules-1.0.0.23-r1 (16 May 2009)
diff --git a/app-emulation/vmware-modules/Manifest b/app-emulation/vmware-modules/Manifest
index 7573b9821878..345fc4ee68ab 100644
--- a/app-emulation/vmware-modules/Manifest
+++ b/app-emulation/vmware-modules/Manifest
@@ -1,8 +1,8 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX 1.0.0.23-makefile-kernel-dir.patch 2129 RMD160 885b638c78cb0663d0d55682bafd453c6122fe17 SHA1 9a08768a9923d8259346f89ae78deae878b68df9 SHA256 fd583c13433bb3ddc64a21af6c472e3c6a2747990118a22881d2b48c16e5655f
AUX 1.0.0.23-r1-kernel-2.6.29.patch 10451 RMD160 2f0094a87ae9530e6a5937f6b3dc3bdeeebe2370 SHA1 86d4f265ecb7921dae4a5cf6531c85f5c4dde82e SHA256 c1f0467f9326f39fbfe81027f26fac478eeb5136f0c06c102e4d3b029971d021
+AUX 1.0.0.24-kernel-2.6.29.patch 10343 RMD160 4c93cab9f129a279671aa82af989121b3bf1f191 SHA1 1fcd62b30ca2a15c82ffc82924eef3447a4a4e08 SHA256 7bda64e6c0fb2fd30f71b38fa0920169356913e17bb8802ffc1e57622a0dd79c
+AUX 1.0.0.24-kernel-2.6.30.patch 1062 RMD160 8c02543ffcd46db13f179a63c589315f103b6c22 SHA1 f4d8030f1197788d9e2263ab4e3e861652702cd3 SHA256 deef76da29aec2aff33a0fe816faa1c4b61cb27858cdd6c1af70f9eaf9cde158
+AUX 1.0.0.24-makefile-kernel-dir.patch 2129 RMD160 885b638c78cb0663d0d55682bafd453c6122fe17 SHA1 9a08768a9923d8259346f89ae78deae878b68df9 SHA256 fd583c13433bb3ddc64a21af6c472e3c6a2747990118a22881d2b48c16e5655f
AUX patches/000_all_makefile-include-directory.patch 342 RMD160 ae8b7c2e628681fff153bfa10242e62df5ab2e10 SHA1 be4f203063e676dc022ce600e15479b6ea56b954 SHA256 2da16602ef3c4cb040ac80a9fed18660fadcae2e843f425da0872f50aa5356db
AUX patches/020_all_epoll-def-warnings.patch 435 RMD160 b9152d9af93862c99c72abc1ef97639351d82141 SHA1 d0a40f0483a144fc98d02213c6c63b2e2ddb9f66 SHA256 2033f23fc8d696e1a9d20c6c446703166ea82a4e5e448494e6a52ef09bac7521
AUX patches/vmblock/010_all_kernel-2.6.25.patch 2398 RMD160 d0a3464f03486eda983b230d0bd90bca8a5d7ed3 SHA1 b5de035a7d1f0051a76512be7e25b04ff3d0dbdd SHA256 4036d37415cad6109e95e82c3789f32ea2c4901961612fb158d5f7148671b32e
@@ -17,16 +17,12 @@ DIST vmware-modules-1.0.0.23-r1.amd64.tar.bz2 486989 RMD160 12f197294b4df7bf1593
DIST vmware-modules-1.0.0.23-r1.x86.tar.bz2 487101 RMD160 f69475312cbaeb0afccc46e8465dfbed7bee49d2 SHA1 f2b23a2adcfc8fde3cd26f1a75e504c82010bb10 SHA256 5fb5eb11d26e86a62018a57e6afe975f32ce9a7b0ec1069ed1f756e034337b6b
DIST vmware-modules-1.0.0.23.amd64.tar.bz2 489196 RMD160 5ef5d18ec22129cd4563d14ed8b213fdd3ad86ec SHA1 64a2fb7b1195d3ee773b9e49fe8dc9b5d7ffc43a SHA256 7d8028b9da2ad1694a6e71f1f6b1f63a9a03e78249f4cacdfccd1ea508e07d2a
DIST vmware-modules-1.0.0.23.x86.tar.bz2 486085 RMD160 d039206f0ed3fcd93f7acf3bc24c340b8641057a SHA1 5a4e9ed931f6592c8332239e424afdd80b1b46e5 SHA256 5780292e519da9e1512bf78b1e0e6c21e44f4e10f214dcc0caf83af482dedf68
+DIST vmware-modules-1.0.0.24.amd64.tar.bz2 486925 RMD160 64e81b90f9e838100bdc4e901021a86433efeed8 SHA1 bbbf3974afcb77fa0a670ac7821382a725cc6e4e SHA256 d010d0797bc303d2e3a69efc17dca56d3e3de5c43028c780334c57c69606ab94
+DIST vmware-modules-1.0.0.24.x86.tar.bz2 487178 RMD160 9dd4aa6ecabe1ff1621e0a7a9c573479ab92df3c SHA1 e861a6c2d33193a57226a9be562e9e7a1926e45f SHA256 0021b2eefdfb2de3d352d70f84f1e9ec3d375e1073c5f960435208cf3ee2409e
EBUILD vmware-modules-1.0.0.15-r1.ebuild 311 RMD160 910dd70caac0af5c1bdb6d714b96f9c134cbdd8a SHA1 c56288915c67790e3b38207e14598923203b2c7c SHA256 dbce7d028f4fe0f042323a7e05754e311366ac33feb7361dab63af70017683f7
EBUILD vmware-modules-1.0.0.15-r2.ebuild 445 RMD160 d16a678a0c9291289be89006b74782aeb0ba5a7a SHA1 c27bc611caae5e0b4afdc45ed5d62ee238a43b1e SHA256 f387e8c45b0b2fcee19b80a66dd3497981c54297fd9d21b7e01c60fb7e39a65d
EBUILD vmware-modules-1.0.0.23-r1.ebuild 817 RMD160 e126704918b1c106185e7743006c8178a156620c SHA1 8aa89f0e4a772fa59e05b7a158817ccf84aba54d SHA256 c846170c19b8525ebcdbd01a3c0d9e0bad2ff02b8129475814c65c3f8403d711
EBUILD vmware-modules-1.0.0.23.ebuild 724 RMD160 35c62995060e0c709dbd690ef63c48a431dfae8a SHA1 6ea6e450fd540c772f5c7227056848f8513939c2 SHA256 a132d0c74e914ff65e0cef0bdbe54e4e9e05e59ad7d1dc72e404d568bd0e31f4
-MISC ChangeLog 10102 RMD160 7fdae32d2bdb877ee93d6ccb952ceca05728ab33 SHA1 9809b418ff0218e0aecbfd483d55e3f66d6ef4dd SHA256 40f7ed64b52cd65412524be2c6e8ee1fe153d0fb8bb12b167ca5160a4123a2fe
-MISC metadata.xml 159 RMD160 fc7f68a382390e5916b0fb43f37a893fad4f9798 SHA1 f46b02a39bcd0165558de67ff4256cfc812418a3 SHA256 8581ae1c90a48f50fa0542c7fb28cb8984baaf12f50fa18f33e467081effb215
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.11 (GNU/Linux)
-
-iEYEARECAAYFAkoObE0ACgkQu7rWomwgFXqiMwCgmOeQPsMkR+opBygDe30t15Kf
-jAAAn3oU3e+WamvCfYTasPlmLOqb2Jwt
-=gHBA
------END PGP SIGNATURE-----
+EBUILD vmware-modules-1.0.0.24.ebuild 1867 RMD160 ad40015fe1b80d12a564e86962ea3c040422d6e7 SHA1 5172cb152892d787cbaf197b681d3f133b1aa754 SHA256 d4b93f2031284c24a30f5e4e43b92904908c0383c61a6afa5752507dc78acb35
+MISC ChangeLog 10431 RMD160 b747a7e038242186a1dc144c1b79e3dda437df7f SHA1 745792b86154c1981469410b1cb94d0a29fee0d0 SHA256 fa0da446a309f4335972ac5b1bc1cfd09a4dc3de5f2ac360113749a3d8b22b89
+MISC metadata.xml 281 RMD160 8b9930d34fb422bdaf4ae72e3d95004311c7f7d0 SHA1 86cc22d58f7d45028c2f34b2625e6a88702cd61b SHA256 152d4dde5f6f3c5b453d805f697f152afc326b51f29b7f2fe42ab9ddae730638
diff --git a/app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.29.patch b/app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.29.patch
new file mode 100644
index 000000000000..cd8aeb9eb247
--- /dev/null
+++ b/app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.29.patch
@@ -0,0 +1,288 @@
+diff -ur vmware-modules-1.0.0.24.0/work/vmblock-only/Makefile.kernel vmware-modules-1.0.0.24/work/vmblock-only/Makefile.kernel
+--- vmware-modules-1.0.0.24.0/work/vmblock-only/Makefile.kernel 2009-03-27 08:05:21.000000000 +0300
++++ vmware-modules-1.0.0.24/work/vmblock-only/Makefile.kernel 2009-04-07 16:14:55.000000000 +0400
+@@ -19,7 +19,7 @@
+
+ INCLUDE := -I$(SRCROOT)/include
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/setnice.c, -DVMW_HAVE_SET_USER_NICE, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, )
+diff -ur vmware-modules-1.0.0.24.0/work/vmci-only/Makefile.kernel vmware-modules-1.0.0.24/work/vmci-only/Makefile.kernel
+--- vmware-modules-1.0.0.24.0/work/vmci-only/Makefile.kernel 2009-03-27 08:05:22.000000000 +0300
++++ vmware-modules-1.0.0.24/work/vmci-only/Makefile.kernel 2009-04-07 16:14:55.000000000 +0400
+@@ -21,7 +21,7 @@
+
+ INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, )
+
+diff -ur vmware-modules-1.0.0.24.0/work/vmmon-only/linux/driver.c vmware-modules-1.0.0.24/work/vmmon-only/linux/driver.c
+--- vmware-modules-1.0.0.24.0/work/vmmon-only/linux/driver.c 2009-03-27 08:05:19.000000000 +0300
++++ vmware-modules-1.0.0.24/work/vmmon-only/linux/driver.c 2009-04-07 16:15:11.000000000 +0400
+@@ -1984,10 +1984,10 @@
+ }
+
+ case IOCTL_VMX86_ALLOW_CORE_DUMP:
+- if (current->euid == current->uid &&
+- current->fsuid == current->uid &&
+- current->egid == current->gid &&
+- current->fsgid == current->gid) {
++ if (current_euid() == current_uid() &&
++ current_fsuid() == current_uid() &&
++ current_egid() == current_gid() &&
++ current_fsgid() == current_gid()) {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) || defined(MMF_DUMPABLE)
+ /* Dump core, readable by user. */
+ set_bit(MMF_DUMPABLE, &current->mm->flags);
+diff -ur vmware-modules-1.0.0.24.0/work/vmmon-only/linux/hostif.c vmware-modules-1.0.0.24/work/vmmon-only/linux/hostif.c
+--- vmware-modules-1.0.0.24.0/work/vmmon-only/linux/hostif.c 2009-03-27 08:05:18.000000000 +0300
++++ vmware-modules-1.0.0.24/work/vmmon-only/linux/hostif.c 2009-04-07 16:19:05.000000000 +0400
+@@ -3424,6 +3424,82 @@
+ }
+
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
++static inline
++void compat_cap_raise(int cap)
++{
++ cap_raise(current->cap_effective, cap);
++}
++#else
++static
++void compat_cap_raise(int cap)
++{
++ struct cred *new_cred;
++
++ new_cred = prepare_creds();
++ if (new_cred != NULL)
++ {
++ cap_raise(new_cred->cap_effective, cap);
++ commit_creds(new_cred);
++ }
++ else
++ {
++ Log("compat_cap_raise(%d) prepare_creds(): Out of memory\n", cap);
++ }
++}
++#endif
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
++static inline
++void compat_cap_lower(int cap)
++{
++ cap_lower(current->cap_effective, cap);
++}
++#else
++static
++void compat_cap_lower(int cap)
++{
++ struct cred *new_cred;
++
++ new_cred = prepare_creds();
++ if (new_cred != NULL)
++ {
++ cap_lower(new_cred->cap_effective, cap);
++ commit_creds(new_cred);
++ }
++ else
++ {
++ Log("compat_cap_lower(%d) prepare_creds(): Out of memory\n", cap);
++ }
++}
++#endif
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
++static inline
++void compat_set_fsuid(int fsuid)
++{
++ current->fsuid = fsuid;
++}
++#else
++static
++void compat_set_fsuid(int fsuid)
++{
++ struct cred *new_cred;
++
++ new_cred = prepare_creds();
++ if (new_cred != NULL)
++ {
++ new_cred->fsuid = fsuid;
++ commit_creds(new_cred);
++ }
++ else
++ {
++ Log("compat_set_fsuid(%d) prepare_creds(): Out of memory\n", fsuid);
++ }
++}
++#endif
++
++
+ /*
+ *----------------------------------------------------------------------
+ *
+@@ -3456,7 +3532,7 @@
+ oldFS = get_fs();
+ set_fs(KERNEL_DS);
+ compat_allow_signal(SIGKILL);
+- cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
++ compat_cap_raise(CAP_SYS_RESOURCE);
+ compat_set_user_nice(current, linuxState.fastClockPriority);
+
+ while (linuxState.fastClockRate > HZ + HZ/16) {
+@@ -3580,19 +3656,19 @@
+ Bool cap;
+ long pid;
+
+- fsuid = current->fsuid;
+- current->fsuid = 0;
++ fsuid = current_fsuid();
++ compat_set_fsuid(0);
+ filp = filp_open("/dev/rtc", O_RDONLY, 0);
+- current->fsuid = fsuid;
++ compat_set_fsuid(fsuid);
+ if (IS_ERR(filp)) {
+ Warning("/dev/rtc open failed: %d\n", (int)(VA)filp);
+ return -(int)(VA)filp;
+ }
+- cap = cap_raised(current->cap_effective, CAP_SYS_RESOURCE);
+- cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
++ cap = cap_raised(current_cap(), CAP_SYS_RESOURCE);
++ compat_cap_raise(CAP_SYS_RESOURCE);
+ res = HostIFDoIoctl(filp, RTC_PIE_ON, 0);
+ if (!cap) {
+- cap_lower(current->cap_effective, CAP_SYS_RESOURCE);
++ compat_cap_lower(CAP_SYS_RESOURCE);
+ }
+ if (res < 0) {
+ Warning("/dev/rtc enable interrupt failed: %d\n", res);
+diff -ur vmware-modules-1.0.0.24.0/work/vmmon-only/Makefile.kernel vmware-modules-1.0.0.24/work/vmmon-only/Makefile.kernel
+--- vmware-modules-1.0.0.24.0/work/vmmon-only/Makefile.kernel 2009-03-27 08:05:19.000000000 +0300
++++ vmware-modules-1.0.0.24/work/vmmon-only/Makefile.kernel 2009-04-07 16:15:21.000000000 +0400
+@@ -22,7 +22,7 @@
+ INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
+ -I$(SRCROOT)/vmcore
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/nopage1.c, -DVMW_NOPAGE_261, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/skas1.c, -DVMW_SKAS_MMAP, )
+diff -ur vmware-modules-1.0.0.24.0/work/vmnet-only/Makefile.kernel vmware-modules-1.0.0.24/work/vmnet-only/Makefile.kernel
+--- vmware-modules-1.0.0.24.0/work/vmnet-only/Makefile.kernel 2009-03-27 08:05:20.000000000 +0300
++++ vmware-modules-1.0.0.24/work/vmnet-only/Makefile.kernel 2009-04-07 16:15:21.000000000 +0400
+@@ -19,7 +19,7 @@
+
+ INCLUDE := -I$(SRCROOT)
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/socket.c, -DVMW_HAVE_SK_WMEM_ALLOC, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, )
+diff -ur vmware-modules-1.0.0.24.0/work/vmnet-only/netif.c vmware-modules-1.0.0.24/work/vmnet-only/netif.c
+--- vmware-modules-1.0.0.24.0/work/vmnet-only/netif.c 2009-03-27 08:05:20.000000000 +0300
++++ vmware-modules-1.0.0.24/work/vmnet-only/netif.c 2009-04-07 16:15:21.000000000 +0400
+@@ -55,6 +55,30 @@
+ struct net_device_stats stats;
+ } VNetNetIF;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
++/*
++ Prior to KERNEL_VERSION(2, 6, 29) "struct net_device" had "void
++ *priv" field which was used as pointer to "VNetNetIF".
++*/
++
++#define VNetNetIF_netdev_priv_size 0
++
++#define VNetNetIF_netdev_netIf(dev) (*(VNetNetIF**)&((dev)->priv))
++
++#else
++/*
++ Since KERNEL_VERSION(2, 6, 29) pointer to "VNetNetIF" is stored in
++ explicitly allocated private area.
++*/
++typedef struct {
++ VNetNetIF *netIf;
++} VNetNetIF_netdev_priv;
++
++#define VNetNetIF_netdev_priv_size sizeof(VNetNetIF_netdev_priv)
++
++#define VNetNetIF_netdev_netIf(dev) (((VNetNetIF_netdev_priv *)compat_netdev_priv(dev))->netIf)
++
++#endif
+
+ static void VNetNetIfFree(VNetJack *this);
+ static void VNetNetIfReceive(VNetJack *this, struct sk_buff *skb);
+@@ -318,13 +342,13 @@
+ memcpy(netIf->devName, devName, sizeof netIf->devName);
+ NULL_TERMINATE_STRING(netIf->devName);
+
+- dev = compat_alloc_netdev(0, netIf->devName, VNetNetIfSetup);
++ dev = compat_alloc_netdev(VNetNetIF_netdev_priv_size, netIf->devName, VNetNetIfSetup);
+ if (!dev) {
+ retval = -ENOMEM;
+ goto out;
+ }
+
+- dev->priv = netIf;
++ VNetNetIF_netdev_netIf(dev) = netIf;
+ netIf->dev = dev;
+
+ memcpy(dev->dev_addr, netIf->port.paddr, sizeof netIf->port.paddr);
+@@ -566,7 +590,7 @@
+ VNetNetifStartXmit(struct sk_buff *skb, // IN:
+ struct net_device *dev) // IN:
+ {
+- VNetNetIF *netIf = (VNetNetIF*)dev->priv;
++ VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev);
+
+ if(skb == NULL) {
+ return 0;
+@@ -618,7 +642,7 @@
+ VNetNetifSetMAC(struct net_device *dev, // IN:
+ void *p) // IN:
+ {
+- VNetNetIF *netIf = (VNetNetIF*)dev->priv;
++ VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev);
+ struct sockaddr const *addr = p;
+ if (!VMX86_IS_STATIC_MAC(addr->sa_data)) {
+ return -EINVAL;
+@@ -675,7 +699,7 @@
+ struct net_device_stats *
+ VNetNetifGetStats(struct net_device *dev) // IN:
+ {
+- VNetNetIF *netIf = (VNetNetIF*)dev->priv;
++ VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev);
+ return &(netIf->stats);
+ }
+
+diff -ur vmware-modules-1.0.0.24.0/work/vsock-only/linux/util.c vmware-modules-1.0.0.24/work/vsock-only/linux/util.c
+--- vmware-modules-1.0.0.24.0/work/vsock-only/linux/util.c 2009-03-27 08:05:23.000000000 +0300
++++ vmware-modules-1.0.0.24/work/vsock-only/linux/util.c 2009-04-07 16:15:21.000000000 +0400
+@@ -154,7 +154,7 @@
+ goto error;
+ }
+
+- Log(buf);
++ Log("%s", buf);
+
+ return;
+
+diff -ur vmware-modules-1.0.0.24.0/work/vsock-only/Makefile.kernel vmware-modules-1.0.0.24/work/vsock-only/Makefile.kernel
+--- vmware-modules-1.0.0.24.0/work/vsock-only/Makefile.kernel 2009-03-27 08:05:23.000000000 +0300
++++ vmware-modules-1.0.0.24/work/vsock-only/Makefile.kernel 2009-04-07 16:15:21.000000000 +0400
+@@ -25,7 +25,7 @@
+ INCLUDE += -I$(SRCROOT)/linux
+ INCLUDE += -I$(SRCROOT)/common
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/setnice.c, -DVMW_HAVE_SET_USER_NICE, )
+
diff --git a/app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.30.patch b/app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.30.patch
new file mode 100644
index 000000000000..2c95e1c80ede
--- /dev/null
+++ b/app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.30.patch
@@ -0,0 +1,33 @@
+diff -urN source-OLD/vmblock-only/linux/control.c source-NEW/vmblock-only/linux/control.c
+--- source-OLD/vmblock-only/linux/control.c 2008-10-28 22:47:20.000000000 -0700
++++ source-NEW/vmblock-only/linux/control.c 2009-05-07 12:25:33.000000000 -0700
+@@ -46,7 +46,9 @@
+
+ static struct proc_dir_entry *controlProcDirEntry;
+ struct file_operations ControlFileOps = {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
+ .owner = THIS_MODULE,
++#endif
+ .write = ControlFileOpWrite,
+ .release = ControlFileOpRelease,
+ };
+@@ -156,7 +158,9 @@
+ return -EINVAL;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
+ controlProcDirEntry->owner = THIS_MODULE;
++#endif
+
+ /* Create /proc/fs/vmblock/mountPoint */
+ controlProcMountpoint = proc_mkdir(VMBLOCK_CONTROL_MOUNTPOINT,
+@@ -168,7 +172,9 @@
+ return -EINVAL;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
+ controlProcMountpoint->owner = THIS_MODULE;
++#endif
+
+ /* Create /proc/fs/vmblock/dev */
+ controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
diff --git a/app-emulation/vmware-modules/files/1.0.0.24-makefile-kernel-dir.patch b/app-emulation/vmware-modules/files/1.0.0.24-makefile-kernel-dir.patch
new file mode 100644
index 000000000000..8df4d8694e34
--- /dev/null
+++ b/app-emulation/vmware-modules/files/1.0.0.24-makefile-kernel-dir.patch
@@ -0,0 +1,80 @@
+diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile
+index 0a9ffd6..4aa09e8 100644
+--- a/vmblock-only/Makefile
++++ b/vmblock-only/Makefile
+@@ -29,9 +29,9 @@ SRCROOT = .
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vmblock
+ PRODUCT := @PRODUCT@
+diff --git a/vmci-only/Makefile b/vmci-only/Makefile
+index 0a6c9c6..6cd0b6d 100644
+--- a/vmci-only/Makefile
++++ b/vmci-only/Makefile
+@@ -29,9 +29,9 @@ SRCROOT = .
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vmci
+ PRODUCT := @PRODUCT@
+diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile
+index d26e58c..f8a40f4 100644
+--- a/vmmon-only/Makefile
++++ b/vmmon-only/Makefile
+@@ -29,9 +29,9 @@ SRCROOT = .
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vmmon
+ PRODUCT := @PRODUCT@
+diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile
+index 4cabc30..568271a 100644
+--- a/vmnet-only/Makefile
++++ b/vmnet-only/Makefile
+@@ -29,9 +29,9 @@ SRCROOT = .
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vmnet
+ PRODUCT := @PRODUCT@
+diff --git a/vsock-only/Makefile b/vsock-only/Makefile
+index a69bc22..8a74856 100644
+--- a/vsock-only/Makefile
++++ b/vsock-only/Makefile
+@@ -29,9 +29,9 @@ SRCROOT = .
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vsock
+ PRODUCT := ws
diff --git a/app-emulation/vmware-modules/metadata.xml b/app-emulation/vmware-modules/metadata.xml
index 3260ec55a8de..e478f760ef12 100644
--- a/app-emulation/vmware-modules/metadata.xml
+++ b/app-emulation/vmware-modules/metadata.xml
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>vmware</herd>
+ <herd>vmware</herd>
+ <maintainer>
+ <email>vadimk@g.o</email>
+ </maintainer>
+ <longdescription>
+ VMware kernel modules.
+ </longdescription>
</pkgmetadata>
diff --git a/app-emulation/vmware-modules/vmware-modules-1.0.0.24.ebuild b/app-emulation/vmware-modules/vmware-modules-1.0.0.24.ebuild
new file mode 100644
index 000000000000..d5ba57884e6e
--- /dev/null
+++ b/app-emulation/vmware-modules/vmware-modules-1.0.0.24.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2009 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.24.ebuild,v 1.1 2009/06/14 15:27:10 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
+# PATCH_VER="1"
+ 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}-kernel-2.6.29.patch"
+ epatch "${FILESDIR}/${PV}-kernel-2.6.30.patch"
+}
+
+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
+}
+