├── profiles
├── package.mask
├── repo_name
├── categories
└── desc
│ └── vmware_guest.desc
├── app-emulation
├── vmware-vsphere-cli
│ ├── Manifest
│ ├── metadata.xml
│ ├── files
│ │ └── makefile.patch
│ └── vmware-vsphere-cli-4.1.0.254719-r1.ebuild
├── vmware-tools
│ ├── metadata.xml
│ ├── vmware-tools-9.9.2.2496824.ebuild
│ ├── vmware-tools-9.6.5.2700073.ebuild
│ ├── vmware-tools-10.0.5.3228253.ebuild
│ ├── vmware-tools-10.0.6.3595377.ebuild
│ ├── vmware-tools-10.0.10.4301679.ebuild
│ ├── vmware-tools-10.3.2.9925305.ebuild
│ ├── vmware-tools-10.1.5.5055693.ebuild
│ ├── vmware-tools-10.1.6.5214329.ebuild
│ ├── vmware-tools-9.9.3.2780323.ebuild
│ ├── vmware-tools-9.9.4.3206955.ebuild
│ └── vmware-tools-9.9.5.3848939.ebuild
├── vmware-modules
│ ├── files
│ │ ├── 304-apic.patch
│ │ ├── 308-apic.patch
│ │ ├── 304-4.7-00-trans_start.patch
│ │ ├── 308-4.13-00-vmnet-refcount.patch
│ │ ├── 304-3.10-03-inline.patch
│ │ ├── 308-3.10-03-inline.patch
│ │ ├── 304-4.2-01-vmci_vmalloc.patch
│ │ ├── 304-3.19-01-dentry.patch
│ │ ├── 304-4.8-00-nr_anon_mapped.patch
│ │ ├── 304-4.10-00-generic_readlink.patch
│ │ ├── 308-4.10-00-generic_readlink.patch
│ │ ├── 308-4.12-00-vmblock-current_time.patch
│ │ ├── 308-5.03-00-force_sig.patch
│ │ ├── 304-4.7-01-readlink_copy.patch
│ │ ├── 308-4.07-01-readlink_copy.patch
│ │ ├── 308-5.00-00-totalram_pages.patch
│ │ ├── 308-5.06-01-ioremap_nocache.patch
│ │ ├── 304-3.19-03-iovec.patch
│ │ ├── 308-4.12-02-vmci-pci_enable_msix.patch
│ │ ├── 304-3.19-07-vsock.patch
│ │ ├── 308-3.19-07-vsock.patch
│ │ ├── 308-4.14-00-vmmon-global-page-state.patch
│ │ ├── 308-4.13-01-vmmon-fix-page-accounting.patch
│ │ ├── 304-4.9-01-get_user_pages.patch
│ │ ├── 304-3.19-06-vsock.patch
│ │ ├── 308-3.19-06-vsock.patch
│ │ ├── 308-5.06-02-timeval.patch
│ │ ├── 304-4.2-03-vsock.patch
│ │ ├── 304-4.9-00-get_user_pages.patch
│ │ ├── 308-4.12-01-vmci-do_once.patch
│ │ ├── 308-4.16-00-vmblock-iversion.patch
│ │ ├── 304-netdevice.patch
│ │ ├── 308-netdevice.patch
│ │ ├── 308-4.08-00-vmmon-fix-page-accounting.patch
│ │ ├── 308-4.03-00-vmci-misc_deregister.patch
│ │ ├── 308-4.06-00-user-pages.patch
│ │ ├── 304-3.19-00-compat-namei.patch
│ │ ├── 308-3.19-00-compat-namei.patch
│ │ ├── 308-5.01-01-kernel_ds.patch
│ │ ├── 308-4.02-01-sk_alloc.patch
│ │ ├── 304-4.11-01-vsock-lockdep.patch
│ │ ├── 308-4.11-01-vsock-lockdep.patch
│ │ ├── 304-3.18-00-version-redefined.patch
│ │ ├── 308-3.18-00-version-redefined.patch
│ │ ├── 304-4.3-00-misc_deregister.patch
│ │ ├── 308-5.01-00-vm_fault_t.patch
│ │ ├── 304-3.11-00-readdir.patch
│ │ ├── 308-3.11-00-readdir.patch
│ │ ├── 304-3.19-05-vmci_qpair.patch
│ │ ├── 308-3.19-05-vmci_qpair.patch
│ │ ├── 308-5.06-00-proc_create.patch
│ │ ├── 304-4.11-02-vmmon.patch
│ │ ├── 308-4.17-00-vsock-getname.patch
│ │ ├── 308-4.11-00-missing-headers.patch
│ │ ├── 308-5.00-01-access_ok.patch
│ │ ├── 304-3.15-00-vsock.patch
│ │ ├── 308-3.15-00-vsock.patch
│ │ ├── 304-4.9-02-get_user_pages.patch
│ │ ├── 304-3.10-00-dentry.patch
│ │ ├── 308-3.10-00-dentry.patch
│ │ ├── 308-4.09-00-user-pages.patch
│ │ ├── 308-5.04-00-skb_frag_t.patch
│ │ ├── 304-4.2-00-inode_op.patch
│ │ ├── 304-3.11-01-filldir.patch
│ │ ├── 308-3.11-01-filldir.patch
│ │ ├── 304-3.10-02-control.patch
│ │ ├── 308-3.10-02-control.patch
│ │ ├── 308-4.14-01-deprecated-asm-uaccess.patch
│ │ ├── 308-4.02-00-nd_set_link.patch
│ │ ├── 304-4.11-00-missing-headers.patch
│ │ ├── 304-3.19-04-iovec.patch
│ │ ├── 308-3.19-04-iovec.patch
│ │ ├── 308-4.05-00-vmblock-follow_link.patch
│ │ ├── 304-makefile-kernel-dir.patch
│ │ ├── 308-makefile-kernel-dir.patch
│ │ ├── 304-4.5-00-get_link.patch
│ │ ├── 304-makefile-include.patch
│ │ ├── 308-makefile-include.patch
│ │ ├── 304-4.6-00-user-pages.patch
│ │ ├── 304-3.19-02-vmblock-path.patch
│ │ ├── 308-3.19-02-vmblock-path.patch
│ │ ├── 304-3.10-01-inode.patch
│ │ ├── 308-3.10-01-inode.patch
│ │ ├── 308-hardened.patch
│ │ ├── 308-4.01-00-vsock.patch
│ │ ├── 308-4.15-00-init_timer.patch
│ │ ├── 304-hardened.patch
│ │ ├── 304-4.2-02-vsock.patch
│ │ └── 308-5.00-02-do_gettimeofday.patch
│ ├── metadata.xml
│ ├── vmware-modules-304.4-r1.ebuild
│ └── vmware-modules-308.5.9.ebuild
├── vmware-workstation
│ ├── files
│ │ ├── configure-hostd.sh
│ │ ├── vmware-server-11.1.rc
│ │ ├── vmware-server-12.5.rc
│ │ ├── vmware-12.5.rc
│ │ └── vmware-11.1.rc
│ ├── Manifest
│ └── metadata.xml
├── vmware-player
│ ├── metadata.xml
│ ├── Manifest
│ ├── files
│ │ ├── vmware-12.5.rc
│ │ └── vmware-7.1.rc
│ └── vmware-player-12.5.9.7535481-r1.ebuild
└── vmware-vix
│ ├── Manifest
│ ├── metadata.xml
│ └── vmware-vix-1.11.4.744019.ebuild
├── metadata
└── layout.conf
├── scripts
├── copytomaintree
└── copyfrommaintree
└── eclass
└── vmware-bundle.eclass
/profiles/package.mask:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/profiles/repo_name:
--------------------------------------------------------------------------------
1 | vmware
2 |
--------------------------------------------------------------------------------
/profiles/categories:
--------------------------------------------------------------------------------
1 | app-emulation
2 |
--------------------------------------------------------------------------------
/app-emulation/vmware-vsphere-cli/Manifest:
--------------------------------------------------------------------------------
1 | DIST VMware-vSphere-CLI-4.1.0-254719.i386.tar.gz 24109045 SHA256 261fa3651e8bbfb3da030b49434aaff6891779ca66af0273d434575b47d7ea7c
2 | DIST VMware-vSphere-CLI-4.1.0-254719.x86_64.tar.gz 23896345 SHA256 78e0bddd734a35ba18f2737ea9a748097f6f8ca044a8ef00f86746cf69332396
3 |
--------------------------------------------------------------------------------
/app-emulation/vmware-tools/metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vmware@gentoo.org
6 | Gentoo VMware Project
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-apic.patch:
--------------------------------------------------------------------------------
1 | diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
2 | index f1f4b10..c43242f 100644
3 | --- a/vmmon-only/linux/hostif.c
4 | +++ b/vmmon-only/linux/hostif.c
5 | @@ -55,6 +55,7 @@
6 | #include
7 | #include
8 |
9 | +#include
10 |
11 | #include "vmware.h"
12 | #include "x86apic.h"
13 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-apic.patch:
--------------------------------------------------------------------------------
1 | diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
2 | index f1f4b10..c43242f 100644
3 | --- a/vmmon-only/linux/hostif.c
4 | +++ b/vmmon-only/linux/hostif.c
5 | @@ -55,6 +55,7 @@
6 | #include
7 | #include
8 |
9 | +#include
10 |
11 | #include "vmware.h"
12 | #include "x86apic.h"
13 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.7-00-trans_start.patch:
--------------------------------------------------------------------------------
1 | --- ./vmnet-only/netif.c.old 2016-05-19 20:13:14.259914206 +0200
2 | +++ ./vmnet-only/netif.c 2016-05-19 20:13:21.250914596 +0200
3 | @@ -465,7 +465,7 @@
4 | VNetSend(&netIf->port.jack, skb);
5 |
6 | netIf->stats.tx_packets++;
7 | - dev->trans_start = jiffies;
8 | + netif_trans_update(dev);
9 |
10 | return 0;
11 | }
12 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.13-00-vmnet-refcount.patch:
--------------------------------------------------------------------------------
1 | --- vmnet-only/bridge.c 2017-06-20 04:54:39.000000000 +0200
2 | +++ vmnet-only/bridge.c.new 2017-08-18 11:16:20.979974593 +0200
3 | @@ -636,7 +636,7 @@
4 | unsigned long flags;
5 | int i;
6 |
7 | - atomic_inc(&clone->users);
8 | + refcount_inc(&clone->users);
9 |
10 | clone->dev = dev;
11 | clone->protocol = eth_type_trans(clone, dev);
12 |
--------------------------------------------------------------------------------
/metadata/layout.conf:
--------------------------------------------------------------------------------
1 | masters = gentoo
2 | # Use new hashes
3 | manifest-hashes = BLAKE2B SHA512
4 | # Do not update changelogs
5 | update-changelog = false
6 | # Use thin manifests
7 | thin-manifests = true
8 | # Dont sign thin manifests. There is no current policy for git commit signing
9 | sign-manifests = false
10 | # sign commits using git mechanisms
11 | sign-commits = true
12 | # Make egencache generate newer (more reliable)
13 | # md5-dict cache format (see bug #409445).
14 | cache-formats = md5-dict
15 |
--------------------------------------------------------------------------------
/app-emulation/vmware-workstation/files/configure-hostd.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | action="$1"
4 |
5 | case $action in
6 | add)
7 | rc-update -q add vmware-workstation-server default
8 | rc-service vmware-workstation-server start
9 | ;;
10 | remove)
11 | rc-update -q del vmware-workstation-server default
12 | rc-service vmware-workstation-server stop
13 | ;;
14 | status)
15 | rc-service -q vmware-workstation-server status
16 | ;;
17 | *)
18 | exit 1
19 | ;;
20 | esac
21 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.10-03-inline.patch:
--------------------------------------------------------------------------------
1 | Hushes a warning
2 | --- a/vmmon-only/linux/driver.c 2015-02-07 03:54:16.000000000 +0300
3 | +++ c/vmmon-only/linux/driver.c 2015-02-24 03:58:06.042605293 +0300
4 | @@ -1328,7 +1328,9 @@
5 | *-----------------------------------------------------------------------------
6 | */
7 |
8 | -__attribute__((always_inline)) static Bool
9 | +#include
10 | +
11 | +__always_inline static Bool
12 | LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
13 | {
14 | TSCDelta tscDelta;
15 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.10-03-inline.patch:
--------------------------------------------------------------------------------
1 | Hushes a warning
2 | --- a/vmmon-only/linux/driver.c 2015-02-07 03:54:16.000000000 +0300
3 | +++ c/vmmon-only/linux/driver.c 2015-02-24 03:58:06.042605293 +0300
4 | @@ -1328,7 +1328,9 @@
5 | *-----------------------------------------------------------------------------
6 | */
7 |
8 | -__attribute__((always_inline)) static Bool
9 | +#include
10 | +
11 | +__always_inline static Bool
12 | LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
13 | {
14 | TSCDelta tscDelta;
15 |
--------------------------------------------------------------------------------
/scripts/copytomaintree:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | [[ -f ${HOME}/.vmwareoverlayrc ]] && source ${HOME}/.vmwareoverlayrc
4 |
5 | CVS_PATH="${CVS_PATH:-${HOME}/Gentoo/gentoo}"
6 | OVERLAY_PATH="${OVERLAY_PATH:-${HOME}/Gentoo/vmware}"
7 |
8 | echo cd "${OVERLAY_PATH}"
9 | cd "${OVERLAY_PATH}"
10 |
11 | for name in $(
12 | find . -type f |
13 | grep -v '/Manifest$' |
14 | grep -v '/ChangeLog' |
15 | grep -v '^\./\.git' |
16 | grep -v '^\./profiles' |
17 | grep -v '^\./metadata' |
18 | grep -v '^\./scripts' ) ;
19 | do
20 | cp -v "$name" "${CVS_PATH}/${name#./}"
21 | done
22 |
--------------------------------------------------------------------------------
/scripts/copyfrommaintree:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | [[ -f ${HOME}/.vmwareoverlayrc ]] && source ${HOME}/.vmwareoverlayrc
4 |
5 | CVS_PATH="${CVS_PATH:-${HOME}/Gentoo/gentoo}"
6 | OVERLAY_PATH="${OVERLAY_PATH:-${HOME}/Gentoo/vmware}"
7 |
8 | echo cd "${OVERLAY_PATH}"
9 | cd "${OVERLAY_PATH}"
10 |
11 | for name in $(
12 | find . -type f |
13 | grep -v '/Manifest$' |
14 | grep -v '/ChangeLog' |
15 | grep -v '^\./\.git' |
16 | grep -v '^\./profiles' |
17 | grep -v '^\./metadata' |
18 | grep -v '^\./scripts' ) ;
19 | do
20 | cp -v "${CVS_PATH}/${name#./}" "${name}"
21 | done
22 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.2-01-vmci_vmalloc.patch:
--------------------------------------------------------------------------------
1 | diff -rupN vmci-only/linux/driver.c vmci-only.new/linux/driver.c
2 | --- vmci-only/linux/driver.c 2015-11-03 19:27:55.000000000 -0500
3 | +++ vmci-only.new/linux/driver.c 2016-03-16 21:30:47.646039829 -0400
4 | @@ -26,6 +26,9 @@
5 |
6 | #include
7 | #include
8 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
9 | +#include
10 | +#endif
11 | #include
12 | #if defined(__x86_64__) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
13 | # include
14 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.19-01-dentry.patch:
--------------------------------------------------------------------------------
1 | There is an level of abstrxtion in the newre API as of 3.19 here
2 | --- a/vmnet-only/driver.c 2015-02-07 03:54:17.000000000 +0300
3 | +++ c/vmnet-only/driver.c 2015-02-24 03:58:06.043605137 +0300
4 | @@ -1191,8 +1191,8 @@
5 | struct inode *inode = NULL;
6 | long err;
7 |
8 | - if (filp && filp->f_dentry) {
9 | - inode = filp->f_dentry->d_inode;
10 | + if (filp && filp->f_path.dentry) {
11 | + inode = filp->f_path.dentry->d_inode;
12 | }
13 | err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
14 | return err;
15 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.8-00-nr_anon_mapped.patch:
--------------------------------------------------------------------------------
1 | diff -uprNb a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
2 | --- a/vmmon-only/linux/hostif.c 2016-08-13 16:54:18.935207507 +0300
3 | +++ b/vmmon-only/linux/hostif.c 2016-08-13 16:53:52.981424256 +0300
4 | @@ -140,6 +140,10 @@ static DECLARE_TASKLET(timerTasklet, Hos
5 | */
6 | #define LOCKED_PAGE_SLACK 10000
7 |
8 | +#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 7, 99)
9 | +#define NR_ANON_PAGES NR_ANON_MAPPED
10 | +#endif
11 | +
12 | static struct {
13 | Atomic_uint64 uptimeBase;
14 | VersionedAtomic version;
15 |
--------------------------------------------------------------------------------
/app-emulation/vmware-player/metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vmware@gentoo.org
6 | Gentoo VMware Project
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.10-00-generic_readlink.patch:
--------------------------------------------------------------------------------
1 | --- vmblock-only/linux/inode.c 2017-02-21 08:38:50.844678686 -0700
2 | +++ vmblock-only/linux/inode.c 2017-02-21 08:59:40.557917497 -0700
3 | @@ -207,8 +207,10 @@
4 | return vfs_readlink(dentry, buffer, buflen, iinfo->name);
5 | #elif LINUX_VERSION_CODE <= KERNEL_VERSION(4, 6, 99)
6 | return readlink_copy(buffer, buflen, iinfo->name);
7 | -#else
8 | +#elif LINUX_VERSION_CODE <= KERNEL_VERSION(4, 9, 99)
9 | return generic_readlink(dentry, buffer, buflen);
10 | +#else
11 | + return vfs_readlink(dentry, buffer, buflen);
12 | #endif
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.10-00-generic_readlink.patch:
--------------------------------------------------------------------------------
1 | --- vmblock-only/linux/inode.c 2017-02-21 08:38:50.844678686 -0700
2 | +++ vmblock-only/linux/inode.c 2017-02-21 08:59:40.557917497 -0700
3 | @@ -207,8 +207,10 @@
4 | return vfs_readlink(dentry, buffer, buflen, iinfo->name);
5 | #elif LINUX_VERSION_CODE <= KERNEL_VERSION(4, 6, 99)
6 | return readlink_copy(buffer, buflen, iinfo->name);
7 | -#else
8 | +#elif LINUX_VERSION_CODE <= KERNEL_VERSION(4, 9, 99)
9 | return generic_readlink(dentry, buffer, buflen);
10 | +#else
11 | + return vfs_readlink(dentry, buffer, buflen);
12 | #endif
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.12-00-vmblock-current_time.patch:
--------------------------------------------------------------------------------
1 | --- ./vmblock-only/linux/inode.c 2017-07-06 11:47:09.496190133 -0600
2 | +++ ./vmblock-only/linux/inode.c.new 2017-07-06 11:55:53.212410091 -0600
3 | @@ -156,7 +156,7 @@
4 | inode->i_mode = S_IFLNK | S_IRWXUGO;
5 | inode->i_size = INODE_TO_IINFO(inode)->nameLen;
6 | inode->i_version = 1;
7 | - inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
8 | + inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
9 | #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
10 | inode->i_uid = inode->i_gid = 0;
11 | #else
12 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-5.03-00-force_sig.patch:
--------------------------------------------------------------------------------
1 | --- ./vmmon-only/linux/hostif.c 2019-08-09 11:03:35.984541672 +0200
2 | +++ ./vmmon-only/linux/hostif.c.new 2019-08-09 11:37:39.484542449 +0200
3 | @@ -3583,7 +3583,11 @@
4 | }
5 | } else {
6 | if (linuxState.fastClockThread) {
7 | +#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 2, 99)
8 | + send_sig(SIGKILL, linuxState.fastClockThread, 1);
9 | +#else
10 | force_sig(SIGKILL, linuxState.fastClockThread);
11 | +#endif
12 | kthread_stop(linuxState.fastClockThread);
13 | close_rtc(linuxState.fastClockFile, current->files);
14 |
15 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.7-01-readlink_copy.patch:
--------------------------------------------------------------------------------
1 | --- vmblock-only/linux/inode.c 2016-08-03 19:26:15.293707751 +0200
2 | +++ vmblock-only/linux/inode.c.new 2016-08-03 21:37:42.199148756 +0200
3 | @@ -205,10 +205,11 @@
4 |
5 | #if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 14, 99)
6 | return vfs_readlink(dentry, buffer, buflen, iinfo->name);
7 | +#elif LINUX_VERSION_CODE <= KERNEL_VERSION(4, 6, 99)
8 | + return readlink_copy(buffer, buflen, iinfo->name);
9 | #else
10 | - return readlink_copy(buffer, buflen, iinfo->name);
11 | + return generic_readlink(dentry, buffer, buflen);
12 | #endif
13 | -
14 | }
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.07-01-readlink_copy.patch:
--------------------------------------------------------------------------------
1 | --- vmblock-only/linux/inode.c 2016-08-03 19:26:15.293707751 +0200
2 | +++ vmblock-only/linux/inode.c.new 2016-08-03 21:37:42.199148756 +0200
3 | @@ -205,10 +205,11 @@
4 |
5 | #if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 14, 99)
6 | return vfs_readlink(dentry, buffer, buflen, iinfo->name);
7 | +#elif LINUX_VERSION_CODE <= KERNEL_VERSION(4, 6, 99)
8 | + return readlink_copy(buffer, buflen, iinfo->name);
9 | #else
10 | - return readlink_copy(buffer, buflen, iinfo->name);
11 | + return generic_readlink(dentry, buffer, buflen);
12 | #endif
13 | -
14 | }
15 |
16 |
17 |
--------------------------------------------------------------------------------
/profiles/desc/vmware_guest.desc:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2011 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | # This file contains descriptions of VMWARE_GUEST USE_EXPAND flags.
5 |
6 | # Keep it sorted.
7 |
8 | freebsd - Install VMware Tools for FreeBSD guests
9 | linux - Install VMware Tools for Linux guests
10 | netware - Install VMware Tools for Netware guests
11 | solaris - Install VMware Tools for Solaris guests
12 | windows - Install VMware Tools for Windows 2000+ guests
13 | winPre2k - Install VMware Tools for Windows 95/98/ME guests
14 | winPreVista - Install VMware Tools for Windows guests before Vista
15 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-5.00-00-totalram_pages.patch:
--------------------------------------------------------------------------------
1 | --- ./vmmon-only/linux/hostif.c 2019-03-19 23:19:56.087316621 +0100
2 | +++ ./vmmon-only/linux/hostif.c.new 2019-03-19 23:41:53.902419159 +0100
3 | @@ -1575,9 +1575,13 @@
4 | * since at least 2.6.0.
5 | */
6 |
7 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
8 | extern unsigned long totalram_pages;
9 |
10 | unsigned int totalPhysicalPages = totalram_pages;
11 | +#else
12 | + unsigned int totalPhysicalPages = totalram_pages();
13 | +#endif
14 |
15 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
16 | return MemDefaults_CalcMaxLockedPages(totalPhysicalPages);
17 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-5.06-01-ioremap_nocache.patch:
--------------------------------------------------------------------------------
1 | --- ./vmmon-only/linux/hostif.c 2020-04-11 17:06:49.676687324 +0200
2 | +++ ./vmmon-only/linux/hostif.c.new 2020-04-11 17:24:17.482768853 +0200
3 | @@ -2335,7 +2335,11 @@
4 | volatile void *hostapic;
5 |
6 | ASSERT_ON_COMPILE(APICR_SIZE <= PAGE_SIZE);
7 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
8 | hostapic = (volatile void *) ioremap_nocache(ma, PAGE_SIZE);
9 | +#else
10 | + hostapic = (volatile void *) ioremap(ma, PAGE_SIZE);
11 | +#endif
12 | if (hostapic) {
13 | if ((APIC_VERSIONREG(hostapic) & 0xF0) == 0x10) {
14 | vm->hostAPIC.base = (volatile uint32 (*)[4]) hostapic;
15 |
--------------------------------------------------------------------------------
/app-emulation/vmware-vsphere-cli/metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | The vSphere Command-Line Interface (vSphere CLI) command set allows you
6 | to run common system administration commands against ESX/ESXi systems
7 | from any machine with network access to those systems. You can also run
8 | most vSphere CLI commands against a vCenter Server system and target any
9 | ESX/ESXi system that vCenter Server system manages. vSphere CLI commands
10 | are especially useful for ESXi hosts because ESXi does not include a
11 | service console.
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.19-03-iovec.patch:
--------------------------------------------------------------------------------
1 | using new iterator based API, this matches exactly the changes made upstream as of vmware-modules-304.2
2 | --- a/vmnet-only/userif.c 2015-02-07 03:54:17.000000000 +0300
3 | +++ c/vmnet-only/userif.c 2015-02-24 03:58:06.043605137 +0300
4 | @@ -523,7 +523,15 @@
5 | .iov_base = buf,
6 | .iov_len = len,
7 | };
8 | - return skb_copy_datagram_iovec(skb, 0, &iov, len);
9 | +
10 | +
11 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
12 | + return skb_copy_datagram_iovec(skb, 0, &iov, len);
13 | +#else
14 | + struct iov_iter to;
15 | + iov_iter_init(&to, READ, &iov, 1, len);
16 | + return skb_copy_datagram_iter(skb, 0, &to, len);
17 | +#endif
18 | }
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.12-02-vmci-pci_enable_msix.patch:
--------------------------------------------------------------------------------
1 | --- ./vmci-only/linux/driver.c 2017-07-06 12:12:38.860458601 -0600
2 | +++ ./vmci-only/linux/driver.c.new 2017-07-06 12:21:09.986139888 -0600
3 | @@ -1726,11 +1726,11 @@
4 | vmci_dev.msix_entries[i].vector = i;
5 | }
6 |
7 | - result = pci_enable_msix(pdev, vmci_dev.msix_entries, VMCI_MAX_INTRS);
8 | + result = pci_enable_msix_exact(pdev, vmci_dev.msix_entries, VMCI_MAX_INTRS);
9 | if (!result) {
10 | vmci_dev.exclusive_vectors = TRUE;
11 | - } else if (result > 0) {
12 | - result = pci_enable_msix(pdev, vmci_dev.msix_entries, 1);
13 | + } else {
14 | + result = pci_enable_msix_exact(pdev, vmci_dev.msix_entries, 1);
15 | }
16 | return result;
17 | }
18 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.19-07-vsock.patch:
--------------------------------------------------------------------------------
1 | Some parts of the iovec API were replaced by the similar message API. Refactoring the code to use that.
2 | diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c
3 | --- vsock-only/linux/af_vsock.c 2015-05-05 11:26:05.145081792 -0400
4 | +++ vsock-only.new/linux/af_vsock.c 2015-05-05 11:30:54.304097466 -0400
5 | @@ -4266,7 +4266,7 @@ VSockVmciDgramSendmsg(struct kiocb *kioc
6 | goto out;
7 | }
8 |
9 | - memcpy_fromiovec(VMCI_DG_PAYLOAD(dg), msg->msg_iov, len);
10 | + memcpy_from_msg(VMCI_DG_PAYLOAD(dg), msg, len);
11 |
12 | dg->dst = VMCI_MAKE_HANDLE(remoteAddr->svm_cid, remoteAddr->svm_port);
13 | dg->src = VMCI_MAKE_HANDLE(vsk->localAddr.svm_cid, vsk->localAddr.svm_port);
14 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.19-07-vsock.patch:
--------------------------------------------------------------------------------
1 | Some parts of the iovec API were replaced by the similar message API. Refactoring the code to use that.
2 | diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c
3 | --- vsock-only/linux/af_vsock.c 2015-05-05 11:26:05.145081792 -0400
4 | +++ vsock-only.new/linux/af_vsock.c 2015-05-05 11:30:54.304097466 -0400
5 | @@ -4266,7 +4266,7 @@ VSockVmciDgramSendmsg(struct kiocb *kioc
6 | goto out;
7 | }
8 |
9 | - memcpy_fromiovec(VMCI_DG_PAYLOAD(dg), msg->msg_iov, len);
10 | + memcpy_from_msg(VMCI_DG_PAYLOAD(dg), msg, len);
11 |
12 | dg->dst = VMCI_MAKE_HANDLE(remoteAddr->svm_cid, remoteAddr->svm_port);
13 | dg->src = VMCI_MAKE_HANDLE(vsk->localAddr.svm_cid, vsk->localAddr.svm_port);
14 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.14-00-vmmon-global-page-state.patch:
--------------------------------------------------------------------------------
1 | --- vmmon-only/linux/hostif.c 2017-10-26 00:46:14.312597372 +0200
2 | +++ vmmon-only/linux/hostif.c.new 2017-10-26 00:49:16.419607555 +0200
3 | @@ -1595,7 +1595,11 @@
4 | unsigned int reservedPages = MEMDEFAULTS_MIN_HOST_PAGES;
5 | unsigned int hugePages = (vm == NULL) ? 0 :
6 | BYTES_2_PAGES(vm->memInfo.hugePageBytes);
7 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
8 | + unsigned int lockedPages = global_zone_page_state(NR_PAGETABLE) +
9 | +#else
10 | unsigned int lockedPages = global_page_state(NR_PAGETABLE) +
11 | +#endif
12 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
13 | global_node_page_state(NR_SLAB_UNRECLAIMABLE) +
14 | #else
15 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.13-01-vmmon-fix-page-accounting.patch:
--------------------------------------------------------------------------------
1 | --- vmmon-only/linux/hostif.c 2017-10-26 00:16:39.496498131 +0200
2 | +++ vmmon-only/linux/hostif.c.new 2017-10-26 00:20:35.154511309 +0200
3 | @@ -1596,7 +1596,11 @@
4 | unsigned int hugePages = (vm == NULL) ? 0 :
5 | BYTES_2_PAGES(vm->memInfo.hugePageBytes);
6 | unsigned int lockedPages = global_page_state(NR_PAGETABLE) +
7 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
8 | + global_node_page_state(NR_SLAB_UNRECLAIMABLE) +
9 | +#else
10 | global_page_state(NR_SLAB_UNRECLAIMABLE) +
11 | +#endif
12 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
13 | global_node_page_state(NR_UNEVICTABLE) +
14 | #else
15 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.9-01-get_user_pages.patch:
--------------------------------------------------------------------------------
1 | diff -rupN vmnet-only.bak/userif.c vmnet-only/userif.c
2 | --- vmnet-only.bak/userif.c 2017-04-05 10:44:29.166143701 -0400
3 | +++ vmnet-only/userif.c 2017-04-05 10:45:46.443146453 -0400
4 | @@ -113,12 +113,16 @@ UserifLockPage(VA addr) // IN
5 | int retval;
6 |
7 | down_read(¤t->mm->mmap_sem);
8 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
9 | + retval = get_user_pages(addr, 1, FOLL_WRITE, &page, NULL);
10 | +#else
11 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
12 | retval = get_user_pages(addr,
13 | #else
14 | retval = get_user_pages(current, current->mm, addr,
15 | #endif
16 | 1, 1, 0, &page, NULL);
17 | +#endif
18 | up_read(¤t->mm->mmap_sem);
19 |
20 | if (retval != 1) {
21 |
--------------------------------------------------------------------------------
/app-emulation/vmware-vix/Manifest:
--------------------------------------------------------------------------------
1 | DIST VMware-VIX-1.11.4-744019.i386.bundle 76259648 SHA256 0e866bbdcc7f9ed7511af012a8645092a29d7d7b6cedd9d82d08560a9e3bde03 SHA512 2a7dca59e03abb3ed2a64b75bec51fd67e42350a26b106bc855fe99f7c842737d4ae89f7aa3c2f76e131451be4a9977054335527098672dc80eae34b13d70e80 WHIRLPOOL 5120209529429bbbb8ca1006bd9796881e9fbd5f5597a19076d527fec99cb5d2a55d10e14e9b6c96b8ad9daddd6250e5d7eb386d439acbca40f3d41d95f5b192
2 | DIST VMware-VIX-1.11.4-744019.x86_64.bundle 79518116 SHA256 0a77d6254963d15f9238c3054d98aa3597bdca7e7df69a55a6a74debdb2784be SHA512 318622143b3686802c86f649eeb60d33ecf0d5974c701c52d3081c6ab7074977c9cb3cfe5399b081a7313282215888c6d3fb64c016e5d31cc30e60239c4cc761 WHIRLPOOL c8af9f68b9828c71a363a09ce9384f6ba6bc874b4dd911ceac7991881e22e4f46c2656f58c4f561000f6e31142a3d525c5a6c6091f689554de16d309f17eb913
3 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.19-06-vsock.patch:
--------------------------------------------------------------------------------
1 | Some parts of the iovec API were replaced by the similar message API. Refactoring the code to use that.
2 | diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c
3 | --- vsock-only/linux/af_vsock.c 2015-05-05 11:31:35.710099711 -0400
4 | +++ vsock-only.new/linux/af_vsock.c 2015-05-05 11:36:33.260115840 -0400
5 | @@ -4727,7 +4727,11 @@ VSockVmciDgramRecvmsg(struct kiocb *kioc
6 | }
7 |
8 | /* Place the datagram payload in the user's iovec. */
9 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
10 | err = skb_copy_datagram_iovec(skb, sizeof *dg, msg->msg_iov, payloadLen);
11 | +#else
12 | + err = skb_copy_datagram_iter(skb, sizeof *dg, &msg->msg_iter, payloadLen);
13 | +#endif
14 | if (err) {
15 | goto out;
16 | }
17 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.19-06-vsock.patch:
--------------------------------------------------------------------------------
1 | Some parts of the iovec API were replaced by the similar message API. Refactoring the code to use that.
2 | diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c
3 | --- vsock-only/linux/af_vsock.c 2015-05-05 11:31:35.710099711 -0400
4 | +++ vsock-only.new/linux/af_vsock.c 2015-05-05 11:36:33.260115840 -0400
5 | @@ -4727,7 +4727,11 @@ VSockVmciDgramRecvmsg(struct kiocb *kioc
6 | }
7 |
8 | /* Place the datagram payload in the user's iovec. */
9 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
10 | err = skb_copy_datagram_iovec(skb, sizeof *dg, msg->msg_iov, payloadLen);
11 | +#else
12 | + err = skb_copy_datagram_iter(skb, sizeof *dg, &msg->msg_iter, payloadLen);
13 | +#endif
14 | if (err) {
15 | goto out;
16 | }
17 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vmware@gentoo.org
6 | Gentoo VMware Project
7 |
8 |
9 | VMware kernel modules.
10 |
11 |
16 |
17 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-5.06-02-timeval.patch:
--------------------------------------------------------------------------------
1 | --- ./vsock-only/linux/af_vsock.c 2020-04-11 17:30:47.815799224 +0200
2 | +++ ./vsock-only/linux/af_vsock.c.new 2020-04-11 18:04:49.565958091 +0200
3 | @@ -4415,7 +4415,7 @@
4 | break;
5 |
6 | case SO_VMCI_CONNECT_TIMEOUT: {
7 | - struct timeval tv;
8 | + struct __kernel_old_timeval tv;
9 | COPY_IN(tv);
10 | if (tv.tv_sec >= 0 && tv.tv_usec < USEC_PER_SEC &&
11 | tv.tv_sec < (MAX_SCHEDULE_TIMEOUT/HZ - 1)) {
12 | @@ -4510,7 +4510,7 @@
13 | break;
14 |
15 | case SO_VMCI_CONNECT_TIMEOUT: {
16 | - struct timeval tv;
17 | + struct __kernel_old_timeval tv;
18 | tv.tv_sec = vsk->connectTimeout / HZ;
19 | tv.tv_usec = (vsk->connectTimeout - tv.tv_sec * HZ) * (1000000 / HZ);
20 | COPY_OUT(tv);
21 |
--------------------------------------------------------------------------------
/app-emulation/vmware-vix/metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vmware@gentoo.org
6 | Gentoo VMware Project
7 |
8 |
9 | The VIX API allows you to write programs and scripts that automate
10 | virtual machine operations, as well as the guests within virtual
11 | machines. This API is high-level, easy to use, and practical for both
12 | script writers and application programmers. It runs on both Windows and
13 | Linux and supports management of VMware Server, Workstation, and Virtual
14 | Infrastructure (both ESX and vCenter). Bindings are provided for C,
15 | Perl, and COM (Visual Basic, VBscript, C#).
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.2-03-vsock.patch:
--------------------------------------------------------------------------------
1 | diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c
2 | --- vsock-only/linux/af_vsock.c 2016-03-16 21:38:01.401045589 -0400
3 | +++ vsock-only.new/linux/af_vsock.c 2016-03-16 21:39:32.529046799 -0400
4 | @@ -2836,7 +2836,9 @@ __VSockVmciCreate(struct net *net,
5 | * network namespace, and the option to zero the sock was dropped.
6 | *
7 | */
8 | -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
9 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
10 | + sk = sk_alloc(net, vsockVmciFamilyOps.family, priority, &vsockVmciProto, 1);
11 | +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
12 | sk = sk_alloc(vsockVmciFamilyOps.family, priority,
13 | vsockVmciProto.slab_obj_size, vsockVmciProto.slab);
14 | #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
15 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.9-00-get_user_pages.patch:
--------------------------------------------------------------------------------
1 | --- vmmon-only.bak/linux/hostif.c 2017-04-05 10:10:24.522070886 -0400
2 | +++ vmmon-only/linux/hostif.c 2017-04-05 10:13:35.871077701 -0400
3 | @@ -1171,12 +1171,16 @@ HostIFGetUserPages(void *uvAddr,
4 | int retval;
5 |
6 | down_read(¤t->mm->mmap_sem);
7 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
8 | + retval = get_user_pages((unsigned long)uvAddr, numPages, 0, ppages, NULL);
9 | +#else
10 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
11 | retval = get_user_pages((unsigned long)uvAddr,
12 | #else
13 | retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
14 | #endif
15 | numPages, 0, 0, ppages, NULL);
16 | +#endif
17 | up_read(¤t->mm->mmap_sem);
18 |
19 | return retval != numPages;
20 |
21 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.12-01-vmci-do_once.patch:
--------------------------------------------------------------------------------
1 | --- vmci-only/shared/vm_basic_defs.h 2017-06-19 20:29:40.000000000 -0600
2 | +++ vmci-only/shared/vm_basic_defs.h.new 2017-07-06 12:11:37.146017203 -0600
3 | @@ -720,6 +720,7 @@
4 | lfMessageFont)
5 |
6 | /* This is not intended to be thread-safe. */
7 | +#ifndef DO_ONCE
8 | #define DO_ONCE(code) \
9 | do { \
10 | static Bool _doOnceDone = FALSE; \
11 | @@ -728,6 +729,7 @@
12 | code; \
13 | } \
14 | } while (0)
15 | +#endif
16 |
17 | /*
18 | * Bug 827422 and 838523.
19 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.16-00-vmblock-iversion.patch:
--------------------------------------------------------------------------------
1 | --- ./vmblock-only/linux/inode.c 2018-02-20 16:33:44.296417858 +0100
2 | +++ ./vmblock-only/linux/inode.c.new 2018-02-20 17:33:24.525618051 +0100
3 | @@ -30,6 +30,10 @@
4 | #include
5 | #include
6 |
7 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
8 | +#include
9 | +#endif
10 | +
11 | #include "vmblockInt.h"
12 | #include "filesystem.h"
13 | #include "block.h"
14 | @@ -155,7 +159,11 @@
15 |
16 | inode->i_mode = S_IFLNK | S_IRWXUGO;
17 | inode->i_size = INODE_TO_IINFO(inode)->nameLen;
18 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
19 | + inode_set_iversion(inode, 1);
20 | +#else
21 | inode->i_version = 1;
22 | +#endif
23 | inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
24 | #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
25 | inode->i_uid = inode->i_gid = 0;
26 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-netdevice.patch:
--------------------------------------------------------------------------------
1 | diff --git a/vmnet-only/compat_netdevice.h b/vmnet-only/compat_netdevice.h
2 | index 7a56304..9ff4548 100644
3 | --- a/vmnet-only/compat_netdevice.h
4 | +++ b/vmnet-only/compat_netdevice.h
5 | @@ -47,6 +47,19 @@
6 | # define net_device device
7 | #endif
8 |
9 | +/* it looks like these have been removed from the kernel 3.1
10 | + * probably because the "transition" is considered complete.
11 | + * so to keep this source compatible we just redefine them like they were
12 | + * previously
13 | + */
14 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
15 | +#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev
16 | + functions are available. */
17 | +#define HAVE_FREE_NETDEV /* free_netdev() */
18 | +#define HAVE_NETDEV_PRIV /* netdev_priv() */
19 | +#define HAVE_NETIF_QUEUE
20 | +#define HAVE_NET_DEVICE_OPS
21 | +#endif
22 |
23 | /*
24 | * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting
25 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-netdevice.patch:
--------------------------------------------------------------------------------
1 | diff --git a/vmnet-only/compat_netdevice.h b/vmnet-only/compat_netdevice.h
2 | index 7a56304..9ff4548 100644
3 | --- a/vmnet-only/compat_netdevice.h
4 | +++ b/vmnet-only/compat_netdevice.h
5 | @@ -47,6 +47,19 @@
6 | # define net_device device
7 | #endif
8 |
9 | +/* it looks like these have been removed from the kernel 3.1
10 | + * probably because the "transition" is considered complete.
11 | + * so to keep this source compatible we just redefine them like they were
12 | + * previously
13 | + */
14 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
15 | +#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev
16 | + functions are available. */
17 | +#define HAVE_FREE_NETDEV /* free_netdev() */
18 | +#define HAVE_NETDEV_PRIV /* netdev_priv() */
19 | +#define HAVE_NETIF_QUEUE
20 | +#define HAVE_NET_DEVICE_OPS
21 | +#endif
22 |
23 | /*
24 | * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting
25 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.08-00-vmmon-fix-page-accounting.patch:
--------------------------------------------------------------------------------
1 | --- vmmon-only/linux/hostif.c 2017-10-26 00:01:58.466448868 +0200
2 | +++ vmmon-only/linux/hostif.c.new 2017-10-26 00:10:42.874478191 +0200
3 | @@ -1597,11 +1597,15 @@
4 | BYTES_2_PAGES(vm->memInfo.hugePageBytes);
5 | unsigned int lockedPages = global_page_state(NR_PAGETABLE) +
6 | global_page_state(NR_SLAB_UNRECLAIMABLE) +
7 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
8 | + global_node_page_state(NR_UNEVICTABLE) +
9 | +#else
10 | global_page_state(NR_UNEVICTABLE) +
11 | +#endif
12 | hugePages + reservedPages;
13 | unsigned int anonPages =
14 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
15 | - global_page_state(NR_ANON_MAPPED);
16 | + global_node_page_state(NR_ANON_MAPPED);
17 | #else
18 | global_page_state(NR_ANON_PAGES);
19 | #endif
20 |
--------------------------------------------------------------------------------
/app-emulation/vmware-player/Manifest:
--------------------------------------------------------------------------------
1 | DIST VMware-Player-12.5.9-7535481.x86_64.bundle.tar 134686720 BLAKE2B d8b867151a688d33a7ba9f57300d2576ddeee28afd8ac4a47e2f5d974052e392384c5c917b27a3a4310aafdda1575e0290bd9fb29e6a264972d368936a31e816 SHA512 6c64d87aa965c07eca53189ca8f8ab4c9177666a4dbc1414e39262e56a6acf633ad8cca2c928b83eece52fd4da24ccc0e82e3b27fe179e2d56b90804f0fafd2c
2 | DIST VMware-Player-7.1.4-3848939.x86_64.bundle.tar 211374080 BLAKE2B 5e7ae90dfe5ff72d49eec1d990b8f0eee117ad54186ce2ffbfd54e386bc3dc279f6d7fc0f2c991df4d5c4bcfdadaf54fa91ae96d7eca5ac14560fd661d88297c SHA512 332f0f667d0b95cbf1de5ff2cc95b9302f88d3a9c7e69e13abb58dd7131d6997b2307bc8588111e3fb35717fcf59ed9cd3052873c72bd968c3f6eb68b31dabc0
3 | DIST vmware-systemd-gentoo-02.tgz 14064 BLAKE2B 24ac2c2f295130f4aadad867ec88d652bd292cc60e6b471bb2e01069fe01d84dac3d8b0ca7690ebf218d663adfe0c1dc889d3f4f53cf3178b68291461260748b SHA512 3a382bfd5f1eb2b218d8012588ea55c1f22786dba35a1fc0fdfdb4e40b05e0e735ed09c6961684f6442e863c3ed72024ce01f19113bbd9ca47c32e3f43c55f42
4 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.03-00-vmci-misc_deregister.patch:
--------------------------------------------------------------------------------
1 | diff -ru work.old/vmci-only/linux/driver.c work/vmci-only/linux/driver.c
2 | --- work.old/vmci-only/linux/driver.c 2015-09-14 21:07:49.751696932 +0200
3 | +++ work/vmci-only/linux/driver.c 2015-09-14 22:10:48.015908198 +0200
4 | @@ -2467,8 +2467,6 @@
5 | static void __exit
6 | vmci_exit(void)
7 | {
8 | - int retval;
9 | -
10 | if (guestDeviceInit) {
11 | pci_unregister_driver(&vmci_driver);
12 | vfree(data_buffer);
13 | @@ -2480,12 +2478,8 @@
14 |
15 | VMCI_HostCleanup();
16 |
17 | - retval = misc_deregister(&linuxState.misc);
18 | - if (retval) {
19 | - Warning(LGPFX "Module %s: error unregistering\n", VMCI_MODULE_NAME);
20 | - } else {
21 | - Log(LGPFX"Module %s: unloaded\n", VMCI_MODULE_NAME);
22 | - }
23 | + misc_deregister(&linuxState.misc);
24 | + Log(LGPFX"Module %s: unloaded\n", VMCI_MODULE_NAME);
25 |
26 | hostDeviceInit = FALSE;
27 | }
28 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.06-00-user-pages.patch:
--------------------------------------------------------------------------------
1 | --- ./vmci-only/linux/vmciKernelIf.c.old 2016-05-19 18:57:04.344658673 +0200
2 | +++ ./vmci-only/linux/vmciKernelIf.c 2016-05-19 19:03:28.600680159 +0200
3 | @@ -1835,7 +1835,11 @@
4 | if (dirty) {
5 | set_page_dirty(pages[i]);
6 | }
7 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
8 | + put_page(pages[i]);
9 | +#else
10 | page_cache_release(pages[i]);
11 | +#endif
12 | pages[i] = NULL;
13 | }
14 | }
15 | @@ -2063,9 +2067,13 @@
16 | goto out;
17 | }
18 |
19 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
20 | + retval = get_user_pages((VA)consumeUVA,
21 | +#else
22 | retval = get_user_pages(current,
23 | current->mm,
24 | (VA)consumeUVA,
25 | +#endif
26 | consumeQ->kernelIf->numPages,
27 | 1, 0,
28 | consumeQ->kernelIf->u.h.headerPage,
29 |
--------------------------------------------------------------------------------
/app-emulation/vmware-workstation/Manifest:
--------------------------------------------------------------------------------
1 | DIST VMware-Workstation-11.1.4-3848939.x86_64.bundle.tar 259563520 BLAKE2B bda41d66b81acfccb15211177e12c7ed9cf225319ded3680f64a272456f6d5615e894deb69aef0025620cd2fc7d7ec94d04869aee4e058380f8979c0e0f3c211 SHA512 57aa62d53b4eae08c281959b559635e28877e7f8c5b6c0909dcec16129ae4ea130175410e698724b6164cbfb9d08f6bbf8a48f2d78471d6232868ff4bed23cca
2 | DIST VMware-Workstation-12.5.9-7535481.x86_64.bundle.tar 166492160 BLAKE2B f37ab5950efa076297c71fe3fc8e57bd223907c3547081943abf3edea36a06bb91445ea54c8ba0c6c6836cc831585de13e5a6ef623d038339d2a2efce2c40dfd SHA512 9985265159dbe4d2e53f3e9b152331bc3c927330f25fa4c89be977b8a97c453a13f79c6906cc3682896a071a97c4972bd22f7ae13cce5fa1a05a945d29497267
3 | DIST vmware-systemd-gentoo-02.tgz 14064 BLAKE2B 24ac2c2f295130f4aadad867ec88d652bd292cc60e6b471bb2e01069fe01d84dac3d8b0ca7690ebf218d663adfe0c1dc889d3f4f53cf3178b68291461260748b SHA512 3a382bfd5f1eb2b218d8012588ea55c1f22786dba35a1fc0fdfdb4e40b05e0e735ed09c6961684f6442e863c3ed72024ce01f19113bbd9ca47c32e3f43c55f42
4 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.19-00-compat-namei.patch:
--------------------------------------------------------------------------------
1 | A copy of this since it is no longer exported by the kernel headers
2 | --- a/vmblock-only/shared/compat_namei.h 2015-02-07 03:11:55.000000000 +0300
3 | +++ c/vmblock-only/shared/compat_namei.h 2015-02-24 03:51:25.235286047 +0300
4 | @@ -21,6 +21,20 @@
5 |
6 | #include
7 |
8 | +/* Copy-n-paste from kernel's source/fs/namei.c */
9 | +struct nameidata {
10 | + struct path path;
11 | + struct qstr last;
12 | + struct path root;
13 | + struct inode *inode; /* path.dentry.d_inode */
14 | + unsigned int flags;
15 | + unsigned seq, m_seq;
16 | + int last_type;
17 | + unsigned depth;
18 | + struct file *base;
19 | + char *saved_names[MAX_NESTED_LINKS + 1];
20 | +};
21 | +
22 | /*
23 | * In 2.6.25-rc2, dentry and mount objects were removed from the nameidata
24 | * struct. They were both replaced with a struct path.
25 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.19-00-compat-namei.patch:
--------------------------------------------------------------------------------
1 | A copy of this since it is no longer exported by the kernel headers
2 | --- a/vmblock-only/shared/compat_namei.h 2015-02-07 03:11:55.000000000 +0300
3 | +++ c/vmblock-only/shared/compat_namei.h 2015-02-24 03:51:25.235286047 +0300
4 | @@ -21,6 +21,20 @@
5 |
6 | #include
7 |
8 | +/* Copy-n-paste from kernel's source/fs/namei.c */
9 | +struct nameidata {
10 | + struct path path;
11 | + struct qstr last;
12 | + struct path root;
13 | + struct inode *inode; /* path.dentry.d_inode */
14 | + unsigned int flags;
15 | + unsigned seq, m_seq;
16 | + int last_type;
17 | + unsigned depth;
18 | + struct file *base;
19 | + char *saved_names[MAX_NESTED_LINKS + 1];
20 | +};
21 | +
22 | /*
23 | * In 2.6.25-rc2, dentry and mount objects were removed from the nameidata
24 | * struct. They were both replaced with a struct path.
25 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-5.01-01-kernel_ds.patch:
--------------------------------------------------------------------------------
1 | --- ./vmmon-only/linux/hostif.c 2019-05-04 17:33:42.135920654 +0200
2 | +++ ./vmmon-only/linux/hostif.c.new 2019-05-04 17:37:02.428936239 +0200
3 | @@ -2298,7 +2298,11 @@
4 | int ret;
5 |
6 | old_fs = get_fs();
7 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
8 | + set_fs(KERNEL_DS);
9 | +#else
10 | set_fs(get_ds());
11 | +#endif
12 | r = APICR_TO_ADDR(r, APICR_VERSION);
13 | ret = HostIF_CopyFromUser(&dummy, (void*)r, sizeof(dummy));
14 | set_fs(old_fs);
15 | @@ -2499,7 +2503,11 @@
16 | }
17 |
18 | old_fs = get_fs();
19 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
20 | + set_fs(KERNEL_DS);
21 | +#else
22 | set_fs(get_ds());
23 | +#endif
24 |
25 | {
26 | struct poll_wqueues table;
27 | @@ -2628,7 +2636,11 @@
28 | }
29 |
30 | old_fs = get_fs();
31 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
32 | + set_fs(KERNEL_DS);
33 | +#else
34 | set_fs(get_ds());
35 | +#endif
36 |
37 | /*
38 | * Always write sizeof(uint64) bytes. This works fine for eventfd and
39 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.02-01-sk_alloc.patch:
--------------------------------------------------------------------------------
1 | --- vmnet-only/vmnetInt.h 2015-05-28 01:46:53.023206897 +0200
2 | +++ vmnet-only/vmnetInt.h.new 2015-05-28 01:47:07.911207730 +0200
3 | @@ -79,7 +79,7 @@
4 | extern struct proto vmnet_proto;
5 | #ifdef VMW_NETDEV_HAS_NET
6 | # define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
7 | - PF_NETLINK, _pri, &vmnet_proto)
8 | + PF_NETLINK, _pri, &vmnet_proto, 0)
9 | #else
10 | # define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1)
11 | #endif
12 | --- vsock-only/linux/af_vsock.c 2015-05-28 01:50:03.553217551 +0200
13 | +++ vsock-only/linux/af_vsock.c.new 2015-05-28 01:54:55.248233862 +0200
14 | @@ -2829,7 +2829,7 @@
15 | #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
16 | sk = sk_alloc(vsockVmciFamilyOps.family, priority, &vsockVmciProto, 1);
17 | #else
18 | - sk = sk_alloc(net, vsockVmciFamilyOps.family, priority, &vsockVmciProto);
19 | + sk = sk_alloc(net, vsockVmciFamilyOps.family, priority, &vsockVmciProto, 0);
20 | #endif
21 | if (!sk) {
22 | return NULL;
23 |
--------------------------------------------------------------------------------
/app-emulation/vmware-workstation/metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vmware@gentoo.org
6 | Gentoo VMware Project
7 |
8 |
9 | VMWare Workstation is a virtual machine which can be used to install
10 | other operating systems in a virtual environment to run on top of Gentoo.
11 |
12 |
22 |
23 | akhuettel/systemd-vmware
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.11-01-vsock-lockdep.patch:
--------------------------------------------------------------------------------
1 | --- vsock-only/linux/af_vsock.c 2017-05-21 00:58:02.900776185 +0200
2 | +++ vsock-only/linux/af_vsock.c.new 2017-05-21 00:57:18.932773727 +0200
3 | @@ -213,7 +213,7 @@
4 | struct sockaddr *addr, int addrLen, int flags);
5 | static int VSockVmciStreamConnect(struct socket *sock,
6 | struct sockaddr *addr, int addrLen, int flags);
7 | -static int VSockVmciAccept(struct socket *sock, struct socket *newsock, int flags);
8 | +static int VSockVmciAccept(struct socket *sock, struct socket *newsock, int flags, bool kern);
9 | static int VSockVmciGetname(struct socket *sock,
10 | struct sockaddr *addr, int *addrLen, int peer);
11 | static unsigned int VSockVmciPoll(struct file *file,
12 | @@ -3772,7 +3772,8 @@
13 | static int
14 | VSockVmciAccept(struct socket *sock, // IN
15 | struct socket *newsock, // IN/OUT
16 | - int flags) // IN
17 | + int flags, // IN
18 | + bool kern) // IN
19 | {
20 | struct sock *listener;
21 | int err;
22 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.11-01-vsock-lockdep.patch:
--------------------------------------------------------------------------------
1 | --- vsock-only/linux/af_vsock.c 2017-05-21 00:58:02.900776185 +0200
2 | +++ vsock-only/linux/af_vsock.c.new 2017-05-21 00:57:18.932773727 +0200
3 | @@ -213,7 +213,7 @@
4 | struct sockaddr *addr, int addrLen, int flags);
5 | static int VSockVmciStreamConnect(struct socket *sock,
6 | struct sockaddr *addr, int addrLen, int flags);
7 | -static int VSockVmciAccept(struct socket *sock, struct socket *newsock, int flags);
8 | +static int VSockVmciAccept(struct socket *sock, struct socket *newsock, int flags, bool kern);
9 | static int VSockVmciGetname(struct socket *sock,
10 | struct sockaddr *addr, int *addrLen, int peer);
11 | static unsigned int VSockVmciPoll(struct file *file,
12 | @@ -3772,7 +3772,8 @@
13 | static int
14 | VSockVmciAccept(struct socket *sock, // IN
15 | struct socket *newsock, // IN/OUT
16 | - int flags) // IN
17 | + int flags, // IN
18 | + bool kern) // IN
19 | {
20 | struct sock *listener;
21 | int err;
22 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.18-00-version-redefined.patch:
--------------------------------------------------------------------------------
1 | Hushes some (but not all warnings) relating to redefinitions of this define
2 | --- a/vmci-only/shared/vm_device_version.h 2015-02-07 03:11:55.000000000 +0300
3 | +++ c/vmci-only/shared/vm_device_version.h 2015-02-24 03:58:06.041605450 +0300
4 | @@ -53,7 +53,9 @@
5 | * VMware HD Audio codec
6 | * VMware HD Audio controller
7 | */
8 | +#ifndef PCI_VENDOR_ID_VMWARE
9 | #define PCI_VENDOR_ID_VMWARE 0x15AD
10 | +#endif
11 | #define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
12 | #define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
13 | #define PCI_DEVICE_ID_VMWARE_VGA 0x0711
14 | --- a/vmnet-only/vm_device_version.h 2015-02-07 03:54:16.000000000 +0300
15 | +++ c/vmnet-only/vm_device_version.h 2015-02-24 03:58:06.044604981 +0300
16 | @@ -53,7 +53,9 @@
17 | * VMware HD Audio codec
18 | * VMware HD Audio controller
19 | */
20 | +#ifndef PCI_VENDOR_ID_VMWARE
21 | #define PCI_VENDOR_ID_VMWARE 0x15AD
22 | +#endif
23 | #define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
24 | #define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
25 | #define PCI_DEVICE_ID_VMWARE_VGA 0x0711
26 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.18-00-version-redefined.patch:
--------------------------------------------------------------------------------
1 | Hushes some (but not all warnings) relating to redefinitions of this define
2 | --- a/vmci-only/shared/vm_device_version.h 2015-02-07 03:11:55.000000000 +0300
3 | +++ c/vmci-only/shared/vm_device_version.h 2015-02-24 03:58:06.041605450 +0300
4 | @@ -53,7 +53,9 @@
5 | * VMware HD Audio codec
6 | * VMware HD Audio controller
7 | */
8 | +#ifndef PCI_VENDOR_ID_VMWARE
9 | #define PCI_VENDOR_ID_VMWARE 0x15AD
10 | +#endif
11 | #define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
12 | #define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
13 | #define PCI_DEVICE_ID_VMWARE_VGA 0x0711
14 | --- a/vmnet-only/vm_device_version.h 2015-02-07 03:54:16.000000000 +0300
15 | +++ c/vmnet-only/vm_device_version.h 2015-02-24 03:58:06.044604981 +0300
16 | @@ -53,7 +53,9 @@
17 | * VMware HD Audio codec
18 | * VMware HD Audio controller
19 | */
20 | +#ifndef PCI_VENDOR_ID_VMWARE
21 | #define PCI_VENDOR_ID_VMWARE 0x15AD
22 | +#endif
23 | #define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
24 | #define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
25 | #define PCI_DEVICE_ID_VMWARE_VGA 0x0711
26 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.3-00-misc_deregister.patch:
--------------------------------------------------------------------------------
1 | diff -rupN vmci-only/linux/driver.c vmci-only.new/linux/driver.c
2 | --- vmci-only/linux/driver.c 2016-03-16 21:59:30.229062702 -0400
3 | +++ vmci-only.new/linux/driver.c 2016-03-16 21:58:35.452061974 -0400
4 | @@ -2469,7 +2469,9 @@ vmci_init(void)
5 | static void __exit
6 | vmci_exit(void)
7 | {
8 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
9 | int retval;
10 | +#endif
11 |
12 | if (guestDeviceInit) {
13 | pci_unregister_driver(&vmci_driver);
14 |
15 | diff -rupN vmci-only/linux/driver.c vmci-only.new/linux/driver.c
16 | --- vmci-only/linux/driver.c 2016-03-16 21:53:24.184057841 -0400
17 | +++ vmci-only.new/linux/driver.c 2016-03-16 21:54:37.558058816 -0400
18 | @@ -2482,12 +2482,16 @@ vmci_exit(void)
19 |
20 | VMCI_HostCleanup();
21 |
22 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
23 | + misc_deregister(&linuxState.misc);
24 | +#else
25 | retval = misc_deregister(&linuxState.misc);
26 | if (retval) {
27 | Warning(LGPFX "Module %s: error unregistering\n", VMCI_MODULE_NAME);
28 | } else {
29 | Log(LGPFX"Module %s: unloaded\n", VMCI_MODULE_NAME);
30 | }
31 | +#endif
32 |
33 | hostDeviceInit = FALSE;
34 | }
35 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-5.01-00-vm_fault_t.patch:
--------------------------------------------------------------------------------
1 | --- ./vmmon-only/linux/driver.c 2019-05-04 17:14:03.601828954 +0200
2 | +++ ./vmmon-only/linux/driver.c.new 2019-05-04 17:31:37.452910953 +0200
3 | @@ -104,7 +104,9 @@
4 |
5 | static int LinuxDriver_Close(struct inode *inode, struct file *filp);
6 | static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait);
7 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
8 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
9 | +static vm_fault_t LinuxDriverFault(struct vm_fault *fault);
10 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
11 | static int LinuxDriverFault(struct vm_fault *fault);
12 | #elif defined(VMW_NOPAGE_2624)
13 | static int LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault);
14 | @@ -924,7 +926,10 @@
15 | *-----------------------------------------------------------------------------
16 | */
17 |
18 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
19 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
20 | +static vm_fault_t
21 | +LinuxDriverFault(struct vm_fault *fault) //IN/OUT
22 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
23 | static int
24 | LinuxDriverFault(struct vm_fault *fault) //IN/OUT
25 | #elif defined(VMW_NOPAGE_2624)
26 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.11-00-readdir.patch:
--------------------------------------------------------------------------------
1 | replaces usage of vfs_readdir with iterate_dir. origionally found here:
2 | https://bugs.gentoo.org/show_bug.cgi?id=508204
3 |
4 | diff -Naur vmblock-only/linux/file.c vmblock-only/linux/file.c
5 | --- vmblock-only/linux/file.c 2013-11-05 23:33:26.000000000 -0500
6 | +++ vmblock-only/linux/file.c 2014-04-26 10:58:03.062635343 -0400
7 | @@ -166,11 +166,9 @@
8 |
9 | static int
10 | FileOpReaddir(struct file *file, // IN
11 | - void *dirent, // IN
12 | - filldir_t filldir) // IN
13 | + struct dir_context *ctx)
14 | {
15 | int ret;
16 | - FilldirInfo info;
17 | struct file *actualFile;
18 |
19 | if (!file) {
20 | @@ -184,11 +182,8 @@
21 | return -EINVAL;
22 | }
23 |
24 | - info.filldir = filldir;
25 | - info.dirent = dirent;
26 | -
27 | actualFile->f_pos = file->f_pos;
28 | - ret = vfs_readdir(actualFile, Filldir, &info);
29 | + ret = iterate_dir(actualFile, ctx);
30 | file->f_pos = actualFile->f_pos;
31 |
32 | return ret;
33 | @@ -237,7 +232,7 @@
34 |
35 |
36 | struct file_operations RootFileOps = {
37 | - .readdir = FileOpReaddir,
38 | + .iterate = FileOpReaddir,
39 | .open = FileOpOpen,
40 | .release = FileOpRelease,
41 | };
42 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.11-00-readdir.patch:
--------------------------------------------------------------------------------
1 | replaces usage of vfs_readdir with iterate_dir. origionally found here:
2 | https://bugs.gentoo.org/show_bug.cgi?id=508204
3 |
4 | diff -Naur vmblock-only/linux/file.c vmblock-only/linux/file.c
5 | --- vmblock-only/linux/file.c 2013-11-05 23:33:26.000000000 -0500
6 | +++ vmblock-only/linux/file.c 2014-04-26 10:58:03.062635343 -0400
7 | @@ -166,11 +166,9 @@
8 |
9 | static int
10 | FileOpReaddir(struct file *file, // IN
11 | - void *dirent, // IN
12 | - filldir_t filldir) // IN
13 | + struct dir_context *ctx)
14 | {
15 | int ret;
16 | - FilldirInfo info;
17 | struct file *actualFile;
18 |
19 | if (!file) {
20 | @@ -184,11 +182,8 @@
21 | return -EINVAL;
22 | }
23 |
24 | - info.filldir = filldir;
25 | - info.dirent = dirent;
26 | -
27 | actualFile->f_pos = file->f_pos;
28 | - ret = vfs_readdir(actualFile, Filldir, &info);
29 | + ret = iterate_dir(actualFile, ctx);
30 | file->f_pos = actualFile->f_pos;
31 |
32 | return ret;
33 | @@ -237,7 +232,7 @@
34 |
35 |
36 | struct file_operations RootFileOps = {
37 | - .readdir = FileOpReaddir,
38 | + .iterate = FileOpReaddir,
39 | .open = FileOpOpen,
40 | .release = FileOpRelease,
41 | };
42 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.19-05-vmci_qpair.patch:
--------------------------------------------------------------------------------
1 | Some parts of the iovec API were replaced by the similar message API. Refactoring the code to use that.
2 | diff -rupN vsock-only.old/linux/af_vsock.c vsock-only/linux/af_vsock.c
3 | --- vsock-only.old/linux/af_vsock.c 2015-05-06 20:41:47.684046762 -0400
4 | +++ vsock-only/linux/af_vsock.c 2015-05-06 20:52:15.245080779 -0400
5 | @@ -4629,7 +4629,7 @@ VSockVmciStreamSendmsg(struct kiocb *kio
6 | * able to send.
7 | */
8 |
9 | - written = vmci_qpair_enquev(vsk->qpair, msg->msg_iov,
10 | + written = vmci_qpair_enquev(vsk->qpair, &msg->msg_iter.iov,
11 | len - totalWritten, 0);
12 | if (written < 0) {
13 | err = -ENOMEM;
14 | @@ -4874,9 +4874,9 @@ VSockVmciStreamRecvmsg(struct kiocb *kio
15 | }
16 |
17 | if (flags & MSG_PEEK) {
18 | - read = vmci_qpair_peekv(vsk->qpair, msg->msg_iov, len - copied, 0);
19 | + read = vmci_qpair_peekv(vsk->qpair, &msg->msg_iter.iov, len - copied, 0);
20 | } else {
21 | - read = vmci_qpair_dequev(vsk->qpair, msg->msg_iov, len - copied, 0);
22 | + read = vmci_qpair_dequev(vsk->qpair, &msg->msg_iter.iov, len - copied, 0);
23 | }
24 |
25 | if (read < 0) {
26 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.19-05-vmci_qpair.patch:
--------------------------------------------------------------------------------
1 | Some parts of the iovec API were replaced by the similar message API. Refactoring the code to use that.
2 | diff -rupN vsock-only.old/linux/af_vsock.c vsock-only/linux/af_vsock.c
3 | --- vsock-only.old/linux/af_vsock.c 2015-05-06 20:41:47.684046762 -0400
4 | +++ vsock-only/linux/af_vsock.c 2015-05-06 20:52:15.245080779 -0400
5 | @@ -4629,7 +4629,7 @@ VSockVmciStreamSendmsg(struct kiocb *kio
6 | * able to send.
7 | */
8 |
9 | - written = vmci_qpair_enquev(vsk->qpair, msg->msg_iov,
10 | + written = vmci_qpair_enquev(vsk->qpair, &msg->msg_iter.iov,
11 | len - totalWritten, 0);
12 | if (written < 0) {
13 | err = -ENOMEM;
14 | @@ -4874,9 +4874,9 @@ VSockVmciStreamRecvmsg(struct kiocb *kio
15 | }
16 |
17 | if (flags & MSG_PEEK) {
18 | - read = vmci_qpair_peekv(vsk->qpair, msg->msg_iov, len - copied, 0);
19 | + read = vmci_qpair_peekv(vsk->qpair, &msg->msg_iter.iov, len - copied, 0);
20 | } else {
21 | - read = vmci_qpair_dequev(vsk->qpair, msg->msg_iov, len - copied, 0);
22 | + read = vmci_qpair_dequev(vsk->qpair, &msg->msg_iter.iov, len - copied, 0);
23 | }
24 |
25 | if (read < 0) {
26 |
--------------------------------------------------------------------------------
/app-emulation/vmware-vsphere-cli/files/makefile.patch:
--------------------------------------------------------------------------------
1 | diff --git a/Makefile.PL b/Makefile.PL
2 | index 046e794..429dc42 100644
3 | --- a/Makefile.PL
4 | +++ b/Makefile.PL
5 | @@ -81,43 +81,5 @@ WriteMakefile(
6 | # /usr/bin/perl, and attempt to find a reasonable spot if you
7 | # are running some other perl.
8 | #
9 | - macro => {
10 | - # vmware apps
11 | - INST_VMWARE_APPS => 'apps',
12 | - DEST_VMWARE_APPS => (
13 | - $Config{perlpath} eq '/usr/bin/perl' ?
14 | - '/usr/lib/vmware-viperl/apps' :
15 | - '$(INSTALLSITESCRIPT)/apps'
16 | - ),
17 | - # vmware docs
18 | - INST_VMWARE_DOC => 'doc',
19 | - DEST_VMWARE_DOC => (
20 | - $Config{perlpath} eq '/usr/bin/perl' ?
21 | - '/usr/share/doc/vmware-viperl/doc' :
22 | - '$(SITEPREFIX)/doc'
23 | - ),
24 | - },
25 | );
26 |
27 | -#
28 | -# Additional targets for installing apps and doc.
29 | -#
30 | -sub MY::postamble {
31 | - return <<'MAKE';
32 | -install :: install_vmware_apps install_vmware_doc
33 | - $(NOECHO) $(NOOP)
34 | -
35 | -install_vmware_apps :
36 | - $(NOECHO) $(MOD_INSTALL) \
37 | - $(INST_VMWARE_APPS) $(DEST_VMWARE_APPS)
38 | -
39 | -install_vmware_doc :
40 | - $(NOECHO) $(MOD_INSTALL) \
41 | - $(INST_VMWARE_DOC) $(DEST_VMWARE_DOC)
42 | -
43 | -clean ::
44 | - $(RM_RF) VMware WSMan
45 | -
46 | -MAKE
47 | -}
48 | -
49 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-5.06-00-proc_create.patch:
--------------------------------------------------------------------------------
1 | --- ./vmblock-only/linux/control.c 2020-04-11 16:28:51.246510041 +0200
2 | +++ ./vmblock-only/linux/control.c.new 2020-04-11 16:55:29.826634425 +0200
3 | @@ -46,12 +46,18 @@
4 |
5 |
6 | static struct proc_dir_entry *controlProcDirEntry;
7 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
8 | struct file_operations ControlFileOps = {
9 | .owner = THIS_MODULE,
10 | .write = ControlFileOpWrite,
11 | .release = ControlFileOpRelease,
12 | };
13 | -
14 | +#else
15 | +struct proc_ops ControlFileOps = {
16 | + .proc_write = ControlFileOpWrite,
17 | + .proc_release = ControlFileOpRelease,
18 | +};
19 | +#endif
20 |
21 | /* Public initialization/cleanup routines */
22 |
23 | --- ./vmnet-only/procfs.c 2018-01-09 08:13:21.000000000 +0100
24 | +++ ./vmnet-only/procfs.c.new 2020-04-11 17:28:05.017786557 +0200
25 | @@ -161,12 +161,21 @@
26 | }
27 |
28 | /* Our procfs callbacks. We only need to specialize open. */
29 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
30 | static struct file_operations fops = {
31 | .open = VNetProcOpen,
32 | .read = seq_read,
33 | .llseek = seq_lseek,
34 | .release = single_release,
35 | };
36 | +#else
37 | +static struct proc_ops fops = {
38 | + .proc_open = VNetProcOpen,
39 | + .proc_read = seq_read,
40 | + .proc_lseek = seq_lseek,
41 | + .proc_release = single_release,
42 | +};
43 | +#endif
44 | #endif
45 |
46 |
47 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.11-02-vmmon.patch:
--------------------------------------------------------------------------------
1 | diff -ur old/vmmon-only/linux/driver.c vmmon-only/linux/driver.c
2 | --- old/vmmon-only/linux/driver.c 2016-11-12 09:15:52.000000000 +0200
3 | +++ vmmon-only/linux/driver.c 2017-03-06 10:46:33.347053458 +0200
4 | @@ -105,7 +105,7 @@
5 | static int LinuxDriver_Close(struct inode *inode, struct file *filp);
6 | static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait);
7 | #if defined(VMW_NOPAGE_2624)
8 | -static int LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault);
9 | +static int LinuxDriverFault(struct vm_fault *fault);
10 | #else
11 | static struct page *LinuxDriverNoPage(struct vm_area_struct *vma,
12 | unsigned long address,
13 | @@ -882,15 +882,14 @@
14 | */
15 |
16 | #if defined(VMW_NOPAGE_2624)
17 | -static int LinuxDriverFault(struct vm_area_struct *vma, //IN
18 | - struct vm_fault *fault) //IN/OUT
19 | +static int LinuxDriverFault(struct vm_fault *fault) //IN/OUT
20 | #else
21 | static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, //IN
22 | unsigned long address, //IN
23 | int *type) //OUT: Fault type
24 | #endif
25 | {
26 | - VMLinux *vmLinux = (VMLinux *) vma->vm_file->private_data;
27 | + VMLinux *vmLinux = (VMLinux *) fault->vma->vm_file->private_data;
28 | unsigned long pg;
29 | struct page* page;
30 |
31 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.17-00-vsock-getname.patch:
--------------------------------------------------------------------------------
1 | --- vsock-only/linux/af_vsock.c 2018-04-28 17:46:58.489492168 +0200
2 | +++ vsock-only/linux/af_vsock.c.new 2018-04-28 17:46:49.528491470 +0200
3 | @@ -215,7 +215,11 @@
4 | struct sockaddr *addr, int addrLen, int flags);
5 | static int VSockVmciAccept(struct socket *sock, struct socket *newsock, int flags, bool kern);
6 | static int VSockVmciGetname(struct socket *sock,
7 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
8 | struct sockaddr *addr, int *addrLen, int peer);
9 | +#else
10 | + struct sockaddr *addr, int peer);
11 | +#endif
12 | static unsigned int VSockVmciPoll(struct file *file,
13 | struct socket *sock, poll_table *wait);
14 | static int VSockVmciListen(struct socket *sock, int backlog);
15 | @@ -3878,7 +3882,9 @@
16 | static int
17 | VSockVmciGetname(struct socket *sock, // IN
18 | struct sockaddr *addr, // OUT
19 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
20 | int *addrLen, // OUT
21 | +#endif
22 | int peer) // IN
23 | {
24 | int err;
25 | @@ -3914,7 +3920,11 @@
26 | */
27 | ASSERT_ON_COMPILE(sizeof *vmciAddr <= 128);
28 | memcpy(addr, vmciAddr, sizeof *vmciAddr);
29 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
30 | *addrLen = sizeof *vmciAddr;
31 | +#else
32 | + err = sizeof *vmciAddr;
33 | +#endif
34 |
35 | out:
36 | release_sock(sk);
37 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.11-00-missing-headers.patch:
--------------------------------------------------------------------------------
1 | --- vmblock-only/linux/inode.c 2017-05-06 16:54:57.000000000 +0200
2 | +++ vmblock-only/linux/inode.c.new 2017-05-06 16:55:32.000000000 +0200
3 | @@ -28,6 +28,7 @@
4 | #include
5 | #include
6 | #include
7 | +#include
8 |
9 | #include "vmblockInt.h"
10 | #include "filesystem.h"
11 | --- vmci-only/linux/driver.c 2017-05-06 16:59:06.000000000 +0200
12 | +++ vmci-only/linux/driver.c.new 2017-05-06 17:00:03.000000000 +0200
13 | @@ -38,6 +38,7 @@
14 | #include
15 | #include
16 | #include
17 | +#include
18 |
19 | #include "compat_highmem.h"
20 | #include "compat_interrupt.h"
21 | --- vmci-only/linux/vmciKernelIf.c 2017-05-06 17:00:42.000000000 +0200
22 | +++ vmci-only/linux/vmciKernelIf.c.new 2017-05-06 17:01:24.000000000 +0200
23 | @@ -41,6 +41,7 @@
24 | #include
25 | #include
26 | #include
27 | +#include
28 |
29 | #include "compat_highmem.h"
30 | #include "compat_interrupt.h"
31 | --- vsock-only/linux/af_vsock.c 2017-05-06 17:02:05.000000000 +0200
32 | +++ vsock-only/linux/af_vsock.c.new 2017-05-06 17:02:49.000000000 +0200
33 | @@ -106,6 +106,7 @@
34 | #include
35 | #include
36 | #include
37 | +#include
38 | #include
39 | #if defined(__x86_64__) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
40 | # include
41 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-5.00-01-access_ok.patch:
--------------------------------------------------------------------------------
1 | --- ./vmmon-only/linux/hostif.c 2019-03-21 23:28:27.735722426 +0100
2 | +++ ./vmmon-only/linux/hostif.c.new 2019-03-21 23:40:55.262780590 +0100
3 | @@ -3597,7 +3597,11 @@
4 |
5 | ASSERT(handle);
6 |
7 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
8 | if (!access_ok(VERIFY_WRITE, p, size)) {
9 | +#else
10 | + if (!access_ok(p, size)) {
11 | +#endif
12 | printk(KERN_ERR "%s: Couldn't verify write to uva 0x%p with size %"
13 | FMTSZ"u\n", __func__, p, size);
14 |
15 | --- ./vmnet-only/userif.c 2018-01-09 08:13:21.000000000 +0100
16 | +++ ./vmnet-only/userif.c.new 2019-03-22 00:09:58.432916225 +0100
17 | @@ -157,7 +157,11 @@
18 | struct page **p, // OUT: locked page
19 | void **ptr) // OUT: kernel mapped pointer
20 | {
21 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
22 | if (!access_ok(VERIFY_WRITE, (void *)uAddr, size) ||
23 | +#else
24 | + if (!access_ok((void *)uAddr, size) ||
25 | +#endif
26 | (((uAddr + size - 1) & ~(PAGE_SIZE - 1)) !=
27 | (uAddr & ~(PAGE_SIZE - 1)))) {
28 | return -EINVAL;
29 | --- ./vmci-only/linux/driver.c 2019-03-22 00:10:40.166919472 +0100
30 | +++ ./vmci-only/linux/driver.c.new 2019-03-22 00:11:52.528925103 +0100
31 | @@ -1439,7 +1439,11 @@
32 | VMCIUserVAInvalidPointer(VA uva, // IN:
33 | size_t size) // IN:
34 | {
35 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
36 | return !access_ok(VERIFY_WRITE, (void *)uva, size);
37 | +#else
38 | + return !access_ok((void *)uva, size);
39 | +#endif
40 | }
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.15-00-vsock.patch:
--------------------------------------------------------------------------------
1 | removing the no longer existing second parameter to sk_data_ready
2 | doesn't seem it ever served a purpose.
3 |
4 | diff -rupN vsock-only/linux/notify.c vsock-only.new/linux/notify.c
5 | --- vsock-only/linux/notify.c 2013-11-05 23:33:27.000000000 -0500
6 | +++ vsock-only.new/linux/notify.c 2014-10-05 23:46:47.943304728 -0400
7 | @@ -515,8 +515,11 @@ VSockVmciHandleWrote(struct sock *sk,
8 | vsk = vsock_sk(sk);
9 | PKT_FIELD(vsk, sentWaitingRead) = FALSE;
10 | #endif
11 | -
12 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
13 | + sk->sk_data_ready(sk);
14 | +#else
15 | sk->sk_data_ready(sk, 0);
16 | +#endif
17 | }
18 |
19 |
20 | diff -rupN vsock-only/linux/notifyQState.c vsock-only.new/linux/notifyQState.c
21 | --- vsock-only/linux/notifyQState.c 2013-11-05 23:33:27.000000000 -0500
22 | +++ vsock-only.new/linux/notifyQState.c 2014-10-05 23:46:33.231303931 -0400
23 | @@ -164,7 +164,11 @@ VSockVmciHandleWrote(struct sock *sk,
24 | struct sockaddr_vm *dst, // IN: unused
25 | struct sockaddr_vm *src) // IN: unused
26 | {
27 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
28 | + sk->sk_data_ready(sk);
29 | +#else
30 | sk->sk_data_ready(sk, 0);
31 | +#endif
32 | }
33 |
34 |
35 | @@ -566,7 +570,11 @@ VSockVmciNotifyPktRecvPostDequeue(struct
36 | }
37 |
38 | /* See the comment in VSockVmciNotifyPktSendPostEnqueue */
39 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
40 | + sk->sk_data_ready(sk);
41 | +#else
42 | sk->sk_data_ready(sk, 0);
43 | +#endif
44 | }
45 |
46 | return err;
47 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.15-00-vsock.patch:
--------------------------------------------------------------------------------
1 | removing the no longer existing second parameter to sk_data_ready
2 | doesn't seem it ever served a purpose.
3 |
4 | diff -rupN vsock-only/linux/notify.c vsock-only.new/linux/notify.c
5 | --- vsock-only/linux/notify.c 2013-11-05 23:33:27.000000000 -0500
6 | +++ vsock-only.new/linux/notify.c 2014-10-05 23:46:47.943304728 -0400
7 | @@ -515,8 +515,11 @@ VSockVmciHandleWrote(struct sock *sk,
8 | vsk = vsock_sk(sk);
9 | PKT_FIELD(vsk, sentWaitingRead) = FALSE;
10 | #endif
11 | -
12 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
13 | + sk->sk_data_ready(sk);
14 | +#else
15 | sk->sk_data_ready(sk, 0);
16 | +#endif
17 | }
18 |
19 |
20 | diff -rupN vsock-only/linux/notifyQState.c vsock-only.new/linux/notifyQState.c
21 | --- vsock-only/linux/notifyQState.c 2013-11-05 23:33:27.000000000 -0500
22 | +++ vsock-only.new/linux/notifyQState.c 2014-10-05 23:46:33.231303931 -0400
23 | @@ -164,7 +164,11 @@ VSockVmciHandleWrote(struct sock *sk,
24 | struct sockaddr_vm *dst, // IN: unused
25 | struct sockaddr_vm *src) // IN: unused
26 | {
27 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
28 | + sk->sk_data_ready(sk);
29 | +#else
30 | sk->sk_data_ready(sk, 0);
31 | +#endif
32 | }
33 |
34 |
35 | @@ -566,7 +570,11 @@ VSockVmciNotifyPktRecvPostDequeue(struct
36 | }
37 |
38 | /* See the comment in VSockVmciNotifyPktSendPostEnqueue */
39 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
40 | + sk->sk_data_ready(sk);
41 | +#else
42 | sk->sk_data_ready(sk, 0);
43 | +#endif
44 | }
45 |
46 | return err;
47 |
--------------------------------------------------------------------------------
/app-emulation/vmware-tools/vmware-tools-9.9.2.2496824.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2015 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | inherit versionator vmware-bundle
5 |
6 | MY_PV="$(replace_version_separator 3 - $PV)"
7 | BASE_URI="http://softwareupdate.vmware.com/cds/vmw-desktop/player/7.1.0/$(get_version_component_range 4)/linux/packages/"
8 |
9 | DESCRIPTION="VMware Tools for guest operating systems"
10 | HOMEPAGE="http://www.vmware.com/products/player/"
11 |
12 | LICENSE="vmware"
13 | SLOT="0"
14 | KEYWORDS="-* ~amd64"
15 | RESTRICT="mirror"
16 | IUSE=""
17 |
18 | DEPEND=""
19 | RDEPEND=""
20 |
21 | IUSE_VMWARE_GUEST="freebsd linux netware solaris windows winPre2k"
22 |
23 | VM_INSTALL_DIR="/opt/vmware"
24 |
25 | for guest in ${IUSE_VMWARE_GUEST} ; do
26 | SRC_URI+=" vmware_guest_${guest}? (
27 | amd64? ( ${BASE_URI}vmware-tools-${guest}-${MY_PV}.x86_64.component.tar )
28 | )"
29 | IUSE+=" vmware_guest_${guest}"
30 | done ; unset guest
31 |
32 | src_unpack() {
33 | local arch
34 | if use x86 ; then arch='i386'
35 | elif use amd64 ; then arch='x86_64'
36 | fi
37 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
38 | if use "vmware_guest_${guest}" ; then
39 | local component="vmware-tools-${guest}-${MY_PV}.${arch}.component"
40 | unpack "${component}.tar"
41 | vmware-bundle_extract-component "${component}"
42 | fi
43 | done
44 | }
45 |
46 | src_install() {
47 | insinto "${VM_INSTALL_DIR}"/lib/vmware/isoimages
48 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
49 | if use "vmware_guest_${guest}" ; then
50 | doins "${guest}".iso{,.sig}
51 | fi
52 | done
53 | }
54 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.9-02-get_user_pages.patch:
--------------------------------------------------------------------------------
1 | --- vmci-only/linux/driver.c.old 2017-05-24 01:02:34.453636688 +0200
2 | +++ vmci-only/linux/driver.c 2017-05-24 01:04:12.757631983 +0200
3 | @@ -1476,7 +1476,11 @@
4 | #else
5 | retval = get_user_pages(current, current->mm, addr,
6 | #endif
7 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
8 | + 1, FOLL_WRITE, &page, NULL);
9 | +#else
10 | 1, 1, 0, &page, NULL);
11 | +#endif
12 | up_read(¤t->mm->mmap_sem);
13 |
14 | if (retval != 1) {
15 | --- vmci-only/linux/vmciKernelIf.c.old 2017-05-24 00:58:58.837647006 +0200
16 | +++ vmci-only/linux/vmciKernelIf.c 2017-05-24 01:02:07.668637969 +0200
17 | @@ -2062,7 +2062,11 @@
18 | (VA)produceUVA,
19 | #endif
20 | produceQ->kernelIf->numPages,
21 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
22 | + FOLL_WRITE,
23 | +#else
24 | 1, 0,
25 | +#endif
26 | produceQ->kernelIf->u.h.headerPage,
27 | NULL);
28 | if (retval < produceQ->kernelIf->numPages) {
29 | @@ -2080,7 +2084,11 @@
30 | (VA)consumeUVA,
31 | #endif
32 | consumeQ->kernelIf->numPages,
33 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
34 | + FOLL_WRITE,
35 | +#else
36 | 1, 0,
37 | +#endif
38 | consumeQ->kernelIf->u.h.headerPage,
39 | NULL);
40 | if (retval < consumeQ->kernelIf->numPages) {
41 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.10-00-dentry.patch:
--------------------------------------------------------------------------------
1 | Minor change the API, now it just gets passed flags instead of a pointer to the nameidata
2 | --- a/vmblock-only/linux/dentry.c 2015-02-07 03:11:55.000000000 +0300
3 | +++ c/vmblock-only/linux/dentry.c 2015-02-24 03:58:06.038605919 +0300
4 | @@ -32,7 +32,11 @@
5 | #include "block.h"
6 |
7 |
8 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
9 | static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd);
10 | +#else
11 | +static int DentryOpRevalidate(struct dentry *dentry, unsigned int);
12 | +#endif
13 |
14 | struct dentry_operations LinkDentryOps = {
15 | .d_revalidate = DentryOpRevalidate,
16 | @@ -58,9 +62,12 @@
17 | *----------------------------------------------------------------------------
18 | */
19 |
20 | -static int
21 | -DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating
22 | - struct nameidata *nd) // IN: lookup flags & intent
23 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
24 | +static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd)
25 | +#else
26 | +static int DentryOpRevalidate(struct dentry *dentry, unsigned int flags)
27 | +#endif
28 | +
29 | {
30 | VMBlockInodeInfo *iinfo;
31 | struct nameidata actualNd;
32 | @@ -101,7 +108,11 @@
33 | if (actualDentry &&
34 | actualDentry->d_op &&
35 | actualDentry->d_op->d_revalidate) {
36 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
37 | + return actualDentry->d_op->d_revalidate(actualDentry, flags);
38 | +#else
39 | return actualDentry->d_op->d_revalidate(actualDentry, nd);
40 | +#endif
41 | }
42 |
43 | if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
44 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.10-00-dentry.patch:
--------------------------------------------------------------------------------
1 | Minor change the API, now it just gets passed flags instead of a pointer to the nameidata
2 | --- a/vmblock-only/linux/dentry.c 2015-02-07 03:11:55.000000000 +0300
3 | +++ c/vmblock-only/linux/dentry.c 2015-02-24 03:58:06.038605919 +0300
4 | @@ -32,7 +32,11 @@
5 | #include "block.h"
6 |
7 |
8 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
9 | static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd);
10 | +#else
11 | +static int DentryOpRevalidate(struct dentry *dentry, unsigned int);
12 | +#endif
13 |
14 | struct dentry_operations LinkDentryOps = {
15 | .d_revalidate = DentryOpRevalidate,
16 | @@ -58,9 +62,12 @@
17 | *----------------------------------------------------------------------------
18 | */
19 |
20 | -static int
21 | -DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating
22 | - struct nameidata *nd) // IN: lookup flags & intent
23 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
24 | +static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd)
25 | +#else
26 | +static int DentryOpRevalidate(struct dentry *dentry, unsigned int flags)
27 | +#endif
28 | +
29 | {
30 | VMBlockInodeInfo *iinfo;
31 | struct nameidata actualNd;
32 | @@ -101,7 +108,11 @@
33 | if (actualDentry &&
34 | actualDentry->d_op &&
35 | actualDentry->d_op->d_revalidate) {
36 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
37 | + return actualDentry->d_op->d_revalidate(actualDentry, flags);
38 | +#else
39 | return actualDentry->d_op->d_revalidate(actualDentry, nd);
40 | +#endif
41 | }
42 |
43 | if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
44 |
--------------------------------------------------------------------------------
/app-emulation/vmware-tools/vmware-tools-9.6.5.2700073.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2015 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | inherit versionator vmware-bundle
5 |
6 | MY_PV="$(replace_version_separator 3 - $PV)"
7 | BASE_URI="http://softwareupdate.vmware.com/cds/vmw-desktop/player/6.0.6/$(get_version_component_range 4)/linux/packages/"
8 |
9 | DESCRIPTION="VMware Tools for guest operating systems"
10 | HOMEPAGE="http://www.vmware.com/products/player/"
11 |
12 | LICENSE="vmware"
13 | SLOT="0"
14 | KEYWORDS="-* ~amd64 ~x86"
15 | RESTRICT="mirror"
16 | IUSE=""
17 |
18 | DEPEND=""
19 | RDEPEND=""
20 |
21 | IUSE_VMWARE_GUEST="freebsd linux netware solaris windows winPre2k"
22 |
23 | VM_INSTALL_DIR="/opt/vmware"
24 |
25 | for guest in ${IUSE_VMWARE_GUEST} ; do
26 | SRC_URI+=" vmware_guest_${guest}? (
27 | amd64? ( ${BASE_URI}vmware-tools-${guest}-${MY_PV}.x86_64.component.tar )
28 | x86? ( ${BASE_URI}vmware-tools-${guest}-${MY_PV}.i386.component.tar )
29 | )"
30 | IUSE+=" vmware_guest_${guest}"
31 | done ; unset guest
32 |
33 | src_unpack() {
34 | local arch
35 | if use x86 ; then arch='i386'
36 | elif use amd64 ; then arch='x86_64'
37 | fi
38 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
39 | if use "vmware_guest_${guest}" ; then
40 | local component="vmware-tools-${guest}-${MY_PV}.${arch}.component"
41 | unpack "${component}.tar"
42 | vmware-bundle_extract-component "${component}"
43 | fi
44 | done
45 | }
46 |
47 | src_install() {
48 | insinto "${VM_INSTALL_DIR}"/lib/vmware/isoimages
49 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
50 | if use "vmware_guest_${guest}" ; then
51 | doins "${guest}".iso{,.sig}
52 | fi
53 | done
54 | }
55 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.09-00-user-pages.patch:
--------------------------------------------------------------------------------
1 | --- ./vmci-only/linux/vmciKernelIf.c 2017-02-23 12:19:59.706822502 +0100
2 | +++ ./vmci-only/linux/vmciKernelIf.c.new 2017-02-23 13:12:09.382997502 +0100
3 | @@ -2056,7 +2056,11 @@
4 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
5 | retval = get_user_pages((VA)produceUVA,
6 | produceQ->kernelIf->numPages,
7 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
8 | + FOLL_WRITE,
9 | +#else
10 | 1, 0,
11 | +#endif
12 | produceQ->kernelIf->u.h.headerPage,
13 | NULL);
14 | #else
15 | @@ -2083,7 +2087,11 @@
16 | (VA)consumeUVA,
17 | #endif
18 | consumeQ->kernelIf->numPages,
19 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
20 | + FOLL_WRITE,
21 | +#else
22 | 1, 0,
23 | +#endif
24 | consumeQ->kernelIf->u.h.headerPage,
25 | NULL);
26 | if (retval < consumeQ->kernelIf->numPages) {
27 | --- ./vmci-only/linux/driver.c 2017-02-23 12:19:59.645822499 +0100
28 | +++ ./vmci-only/linux/driver.c.new 2017-02-23 12:30:38.845858240 +0100
29 | @@ -1468,7 +1468,9 @@
30 | int retval;
31 |
32 | down_read(¤t->mm->mmap_sem);
33 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
34 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
35 | + retval = get_user_pages(addr, 1, FOLL_WRITE, &page, NULL);
36 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
37 | retval = get_user_pages(addr, 1, 1, 0, &page, NULL);
38 | #else
39 | retval = get_user_pages(current, current->mm, addr,
40 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-5.04-00-skb_frag_t.patch:
--------------------------------------------------------------------------------
1 | --- ./vmnet-only/userif.c 2020-03-22 00:10:12.265769247 +0100
2 | +++ ./vmnet-only/userif.c.new 2020-03-22 00:13:38.735785312 +0100
3 | @@ -86,9 +86,12 @@
4 | #if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
5 | # define compat_kmap(page) kmap(page)
6 | # define compat_kunmap(page) kunmap(page)
7 | -#else
8 | +#elif COMPAT_LINUX_VERSION_CHECK_LT(5, 4, 0)
9 | # define compat_kmap(page) kmap((page).p)
10 | # define compat_kunmap(page) kunmap((page).p)
11 | +#else
12 | +# define compat_kmap(page) kmap(page)
13 | +# define compat_kunmap(page) kunmap(page)
14 | #endif
15 |
16 | /*
17 | @@ -598,20 +601,35 @@
18 | for (frag = skb_shinfo(skb)->frags;
19 | frag != skb_shinfo(skb)->frags + skb_shinfo(skb)->nr_frags;
20 | frag++) {
21 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
22 | if (frag->size > 0) {
23 | +#else
24 | + if (skb_frag_size(frag) > 0) {
25 | +#endif
26 | unsigned int tmpCsum;
27 | const void *vaddr;
28 |
29 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
30 | vaddr = compat_kmap(frag->page);
31 | tmpCsum = csum_and_copy_to_user(vaddr + frag->page_offset,
32 | curr, frag->size, 0, &err);
33 | compat_kunmap(frag->page);
34 | +#else
35 | + vaddr = compat_kmap(skb_frag_page(frag));
36 | + tmpCsum = csum_and_copy_to_user(vaddr + skb_frag_off(frag),
37 | + curr, skb_frag_size(frag), 0, &err);
38 | + compat_kunmap(skb_frag_page(frag));
39 | +#endif
40 |
41 | if (err) {
42 | return err;
43 | }
44 | csum = csum_block_add(csum, tmpCsum, curr - buf);
45 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
46 | curr += frag->size;
47 | +#else
48 | + curr += skb_frag_size(frag);
49 | +#endif
50 | }
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/app-emulation/vmware-tools/vmware-tools-10.0.5.3228253.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2016 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | inherit versionator vmware-bundle
5 |
6 | MY_PV="$(replace_version_separator 3 - $PV)"
7 | BASE_URI="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/12.1.0/3272444/linux/packages/"
8 |
9 | DESCRIPTION="VMware Tools for guest operating systems"
10 | HOMEPAGE="http://www.vmware.com/products/player/"
11 |
12 | LICENSE="vmware"
13 | SLOT="0"
14 | KEYWORDS="-* ~amd64"
15 | RESTRICT="mirror"
16 | IUSE=""
17 |
18 | DEPEND=""
19 | RDEPEND=""
20 |
21 | IUSE_VMWARE_GUEST="freebsd linux netware solaris windows winPre2k"
22 |
23 | VM_INSTALL_DIR="/opt/vmware"
24 |
25 | for guest in ${IUSE_VMWARE_GUEST} ; do
26 | SRC_URI+=" vmware_guest_${guest}? (
27 | amd64? ( ${BASE_URI}vmware-tools-${guest}-${MY_PV}.x86_64.component.tar )
28 | )"
29 | IUSE+=" vmware_guest_${guest}"
30 | done ; unset guest
31 |
32 | src_unpack() {
33 | local arch
34 | if use x86 ; then arch='i386'
35 | elif use amd64 ; then arch='x86_64'
36 | fi
37 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
38 | if use "vmware_guest_${guest}" ; then
39 | local component="vmware-tools-${guest}-${MY_PV}.${arch}.component"
40 | unpack "${component}.tar"
41 | vmware-bundle_extract-component "${component}"
42 | fi
43 | done
44 | }
45 |
46 | src_install() {
47 | insinto "${VM_INSTALL_DIR}"/lib/vmware/isoimages
48 | local somethingdone;
49 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
50 | if use "vmware_guest_${guest}" ; then
51 | doins "${guest}".iso{,.sig}
52 | somethingdone=yes
53 | fi
54 | done
55 |
56 | [ -n "${somethingdone}" ] || ewarn "You should set VMWARE_GUEST in make.conf to specify which operating systems you need."
57 | }
58 |
--------------------------------------------------------------------------------
/app-emulation/vmware-tools/vmware-tools-10.0.6.3595377.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2016 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | inherit versionator vmware-bundle
5 |
6 | MY_PV="$(replace_version_separator 3 - $PV)"
7 | BASE_URI="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/12.1.1/3770994/linux/packages/"
8 |
9 | DESCRIPTION="VMware Tools for guest operating systems"
10 | HOMEPAGE="http://www.vmware.com/products/player/"
11 |
12 | LICENSE="vmware"
13 | SLOT="0"
14 | KEYWORDS="-* ~amd64"
15 | RESTRICT="mirror"
16 | IUSE=""
17 |
18 | DEPEND=""
19 | RDEPEND=""
20 |
21 | IUSE_VMWARE_GUEST="freebsd linux netware solaris windows winPre2k"
22 |
23 | VM_INSTALL_DIR="/opt/vmware"
24 |
25 | for guest in ${IUSE_VMWARE_GUEST} ; do
26 | SRC_URI+=" vmware_guest_${guest}? (
27 | amd64? ( ${BASE_URI}vmware-tools-${guest}-${MY_PV}.x86_64.component.tar )
28 | )"
29 | IUSE+=" vmware_guest_${guest}"
30 | done ; unset guest
31 |
32 | src_unpack() {
33 | local arch
34 | if use x86 ; then arch='i386'
35 | elif use amd64 ; then arch='x86_64'
36 | fi
37 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
38 | if use "vmware_guest_${guest}" ; then
39 | local component="vmware-tools-${guest}-${MY_PV}.${arch}.component"
40 | unpack "${component}.tar"
41 | vmware-bundle_extract-component "${component}"
42 | fi
43 | done
44 | }
45 |
46 | src_install() {
47 | insinto "${VM_INSTALL_DIR}"/lib/vmware/isoimages
48 | local somethingdone;
49 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
50 | if use "vmware_guest_${guest}" ; then
51 | doins "${guest}".iso{,.sig}
52 | somethingdone=yes
53 | fi
54 | done
55 |
56 | [ -n "${somethingdone}" ] || ewarn "You should set VMWARE_GUEST in make.conf to specify which operating systems you need."
57 | }
58 |
--------------------------------------------------------------------------------
/app-emulation/vmware-tools/vmware-tools-10.0.10.4301679.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2016 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | inherit versionator vmware-bundle
5 |
6 | MY_PV="$(replace_version_separator 3 - $PV)"
7 | BASE_URI="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/12.5.2/4638234/linux/packages/"
8 |
9 | DESCRIPTION="VMware Tools for guest operating systems"
10 | HOMEPAGE="http://www.vmware.com/products/player/"
11 |
12 | LICENSE="vmware"
13 | SLOT="0"
14 | KEYWORDS="-* ~amd64"
15 | RESTRICT="mirror"
16 | IUSE=""
17 |
18 | DEPEND=""
19 | RDEPEND=""
20 |
21 | IUSE_VMWARE_GUEST="freebsd linux netware solaris windows winPre2k"
22 |
23 | VM_INSTALL_DIR="/opt/vmware"
24 |
25 | for guest in ${IUSE_VMWARE_GUEST} ; do
26 | SRC_URI+=" vmware_guest_${guest}? (
27 | amd64? ( ${BASE_URI}vmware-tools-${guest}-${MY_PV}.x86_64.component.tar )
28 | )"
29 | IUSE+=" vmware_guest_${guest}"
30 | done ; unset guest
31 |
32 | src_unpack() {
33 | local arch
34 | if use x86 ; then arch='i386'
35 | elif use amd64 ; then arch='x86_64'
36 | fi
37 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
38 | if use "vmware_guest_${guest}" ; then
39 | local component="vmware-tools-${guest}-${MY_PV}.${arch}.component"
40 | unpack "${component}.tar"
41 | vmware-bundle_extract-component "${component}"
42 | fi
43 | done
44 | }
45 |
46 | src_install() {
47 | insinto "${VM_INSTALL_DIR}"/lib/vmware/isoimages
48 | local somethingdone;
49 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
50 | if use "vmware_guest_${guest}" ; then
51 | doins "${guest}".iso{,.sig}
52 | somethingdone=yes
53 | fi
54 | done
55 |
56 | [ -n "${somethingdone}" ] || ewarn "You should set VMWARE_GUEST in make.conf to specify which operating systems you need."
57 | }
58 |
--------------------------------------------------------------------------------
/app-emulation/vmware-tools/vmware-tools-10.3.2.9925305.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2018 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | inherit versionator vmware-bundle
5 |
6 | MY_PV="$(replace_version_separator 3 - $PV)"
7 | BASE_URI="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/15.0.3/12422535/linux/packages/"
8 |
9 | DESCRIPTION="VMware Tools for guest operating systems"
10 | HOMEPAGE="http://www.vmware.com/products/player/"
11 |
12 | LICENSE="vmware"
13 | SLOT="0"
14 | KEYWORDS="-* ~amd64"
15 | RESTRICT="mirror"
16 | IUSE=""
17 |
18 | DEPEND=""
19 | RDEPEND=""
20 |
21 | IUSE_VMWARE_GUEST="linux netware solaris windows winPre2k winPreVista"
22 |
23 | VM_INSTALL_DIR="/opt/vmware"
24 |
25 | for guest in ${IUSE_VMWARE_GUEST} ; do
26 | SRC_URI+=" vmware_guest_${guest}? (
27 | amd64? ( ${BASE_URI}vmware-tools-${guest}-${MY_PV}.x86_64.component.tar )
28 | )"
29 | IUSE+=" vmware_guest_${guest}"
30 | done ; unset guest
31 |
32 | src_unpack() {
33 | local arch
34 | if use x86 ; then arch='i386'
35 | elif use amd64 ; then arch='x86_64'
36 | fi
37 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
38 | if use "vmware_guest_${guest}" ; then
39 | local component="vmware-tools-${guest}-${MY_PV}.${arch}.component"
40 | unpack "${component}.tar"
41 | vmware-bundle_extract-component "${component}"
42 | fi
43 | done
44 | }
45 |
46 | src_install() {
47 | insinto "${VM_INSTALL_DIR}"/lib/vmware/isoimages
48 | local somethingdone;
49 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
50 | if use "vmware_guest_${guest}" ; then
51 | doins "${guest}".iso{,.sig}
52 | somethingdone=yes
53 | fi
54 | done
55 |
56 | [ -n "${somethingdone}" ] || ewarn "You should set VMWARE_GUEST in make.conf to specify which operating systems you need."
57 | }
58 |
--------------------------------------------------------------------------------
/app-emulation/vmware-tools/vmware-tools-10.1.5.5055693.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2016 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | inherit versionator vmware-bundle
5 |
6 | MY_PV="$(replace_version_separator 3 - $PV)"
7 | BASE_URI="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/12.5.4/5192485/linux/packages/"
8 |
9 | DESCRIPTION="VMware Tools for guest operating systems"
10 | HOMEPAGE="http://www.vmware.com/products/player/"
11 |
12 | LICENSE="vmware"
13 | SLOT="0"
14 | KEYWORDS="-* ~amd64"
15 | RESTRICT="mirror"
16 | IUSE=""
17 |
18 | DEPEND=""
19 | RDEPEND=""
20 |
21 | IUSE_VMWARE_GUEST="freebsd linux netware solaris windows winPre2k winPreVista"
22 |
23 | VM_INSTALL_DIR="/opt/vmware"
24 |
25 | for guest in ${IUSE_VMWARE_GUEST} ; do
26 | SRC_URI+=" vmware_guest_${guest}? (
27 | amd64? ( ${BASE_URI}vmware-tools-${guest}-${MY_PV}.x86_64.component.tar )
28 | )"
29 | IUSE+=" vmware_guest_${guest}"
30 | done ; unset guest
31 |
32 | src_unpack() {
33 | local arch
34 | if use x86 ; then arch='i386'
35 | elif use amd64 ; then arch='x86_64'
36 | fi
37 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
38 | if use "vmware_guest_${guest}" ; then
39 | local component="vmware-tools-${guest}-${MY_PV}.${arch}.component"
40 | unpack "${component}.tar"
41 | vmware-bundle_extract-component "${component}"
42 | fi
43 | done
44 | }
45 |
46 | src_install() {
47 | insinto "${VM_INSTALL_DIR}"/lib/vmware/isoimages
48 | local somethingdone;
49 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
50 | if use "vmware_guest_${guest}" ; then
51 | doins "${guest}".iso{,.sig}
52 | somethingdone=yes
53 | fi
54 | done
55 |
56 | [ -n "${somethingdone}" ] || ewarn "You should set VMWARE_GUEST in make.conf to specify which operating systems you need."
57 | }
58 |
--------------------------------------------------------------------------------
/app-emulation/vmware-tools/vmware-tools-10.1.6.5214329.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2017 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | inherit versionator vmware-bundle
5 |
6 | MY_PV="$(replace_version_separator 3 - $PV)"
7 | BASE_URI="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/12.5.6/5528349/linux/packages/"
8 |
9 | DESCRIPTION="VMware Tools for guest operating systems"
10 | HOMEPAGE="http://www.vmware.com/products/player/"
11 |
12 | LICENSE="vmware"
13 | SLOT="0"
14 | KEYWORDS="-* ~amd64"
15 | RESTRICT="mirror"
16 | IUSE=""
17 |
18 | DEPEND=""
19 | RDEPEND=""
20 |
21 | IUSE_VMWARE_GUEST="freebsd linux netware solaris windows winPre2k winPreVista"
22 |
23 | VM_INSTALL_DIR="/opt/vmware"
24 |
25 | for guest in ${IUSE_VMWARE_GUEST} ; do
26 | SRC_URI+=" vmware_guest_${guest}? (
27 | amd64? ( ${BASE_URI}vmware-tools-${guest}-${MY_PV}.x86_64.component.tar )
28 | )"
29 | IUSE+=" vmware_guest_${guest}"
30 | done ; unset guest
31 |
32 | src_unpack() {
33 | local arch
34 | if use x86 ; then arch='i386'
35 | elif use amd64 ; then arch='x86_64'
36 | fi
37 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
38 | if use "vmware_guest_${guest}" ; then
39 | local component="vmware-tools-${guest}-${MY_PV}.${arch}.component"
40 | unpack "${component}.tar"
41 | vmware-bundle_extract-component "${component}"
42 | fi
43 | done
44 | }
45 |
46 | src_install() {
47 | insinto "${VM_INSTALL_DIR}"/lib/vmware/isoimages
48 | local somethingdone;
49 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
50 | if use "vmware_guest_${guest}" ; then
51 | doins "${guest}".iso{,.sig}
52 | somethingdone=yes
53 | fi
54 | done
55 |
56 | [ -n "${somethingdone}" ] || ewarn "You should set VMWARE_GUEST in make.conf to specify which operating systems you need."
57 | }
58 |
--------------------------------------------------------------------------------
/app-emulation/vmware-workstation/files/vmware-server-11.1.rc:
--------------------------------------------------------------------------------
1 | #!/sbin/openrc-run
2 | # Copyright 1999-2013 Gentoo Foundation
3 | # Distributed under the terms of the GNU General Public License v2
4 |
5 | depend() {
6 | need localmount vmware
7 | use net
8 | }
9 |
10 | checkconfig() {
11 | # Check if certificates exist. If not, we need to generate them, ala sshd.
12 | if [ ! -e @@ETCDIR@@/ssl/rui.key -o ! -e @@ETCDIR@@/ssl/rui.crt ]; then
13 | mkdir -p @@ETCDIR@@/ssl
14 | openssl req -x509 -days 365 -newkey rsa:2048 -keyout @@ETCDIR@@/ssl/rui.key -out @@ETCDIR@@/ssl/rui.crt -config @@ETCDIR@@/ssl/hostd.ssl.config
15 | chmod -R 600 @@ETCDIR@@/ssl
16 | fi
17 | }
18 |
19 | start() {
20 | checkconfig
21 |
22 | ebegin Starting VMware Authentication Daemon
23 | start-stop-daemon --start \
24 | --exec @@PREFIX@@/sbin/vmware-authdlauncher
25 | eend $?
26 | ebegin Starting VMware Workstation Server
27 | start-stop-daemon --start \
28 | --pidfile /var/run/vmware/vmware-hostd.PID \
29 | --exec @@BINDIR@@/vmware-hostd \
30 | -- -a -d @@ETCDIR@@/hostd/config.xml
31 |
32 | eend $?
33 | }
34 |
35 | stop() {
36 | ebegin "Shutdown VMs in the AutoStart Sequence"
37 | local HOHO_ADMIN="$(@@BINDIR@@/vmware-wssc-adminTool "@@ETCDIR@@/hostd/authorization.xml" 2>/dev/null)"
38 |
39 | if [ "x" != "x${HOHO_ADMIN}" ]; then
40 | @@BINDIR@@/vmware-vim-cmd -U "${HOHO_ADMIN}" hostsvc/autostartmanager/autostop
41 | fi
42 | eend $?
43 |
44 | ebegin Stopping VMware Workstation Server
45 | start-stop-daemon --stop \
46 | --pidfile /var/run/vmware/vmware-hostd.PID \
47 | --exec @@BINDIR@@/vmware-hostd
48 | eend $?
49 | ebegin Stopping VMware Authentication Daemon
50 | #start-stop-daemon --stop \
51 | # --exec @@PREFIX@@/sbin/vmware-authdlauncher
52 | killall @@PREFIX@@/sbin/vmware-authdlauncher
53 | eend $?
54 | }
55 |
--------------------------------------------------------------------------------
/app-emulation/vmware-workstation/files/vmware-server-12.5.rc:
--------------------------------------------------------------------------------
1 | #!/sbin/openrc-run
2 | # Copyright 1999-2013 Gentoo Foundation
3 | # Distributed under the terms of the GNU General Public License v2
4 |
5 | depend() {
6 | need localmount vmware
7 | use net
8 | }
9 |
10 | checkconfig() {
11 | # Check if certificates exist. If not, we need to generate them, ala sshd.
12 | if [ ! -e @@ETCDIR@@/ssl/rui.key -o ! -e @@ETCDIR@@/ssl/rui.crt ]; then
13 | mkdir -p @@ETCDIR@@/ssl
14 | openssl req -x509 -days 365 -newkey rsa:2048 -keyout @@ETCDIR@@/ssl/rui.key -out @@ETCDIR@@/ssl/rui.crt -config @@ETCDIR@@/ssl/hostd.ssl.config
15 | chmod -R 600 @@ETCDIR@@/ssl
16 | fi
17 | }
18 |
19 | start() {
20 | checkconfig
21 |
22 | ebegin Starting VMware Authentication Daemon
23 | start-stop-daemon --start \
24 | --exec @@PREFIX@@/sbin/vmware-authdlauncher
25 | eend $?
26 | ebegin Starting VMware Workstation Server
27 | start-stop-daemon --start \
28 | --pidfile /var/run/vmware/vmware-hostd.PID \
29 | --exec @@BINDIR@@/vmware-hostd \
30 | -- -a -d @@ETCDIR@@/hostd/config.xml
31 |
32 | eend $?
33 | }
34 |
35 | stop() {
36 | ebegin "Shutdown VMs in the AutoStart Sequence"
37 | local HOHO_ADMIN="$(@@BINDIR@@/vmware-wssc-adminTool "@@ETCDIR@@/hostd/authorization.xml" 2>/dev/null)"
38 |
39 | if [ "x" != "x${HOHO_ADMIN}" ]; then
40 | @@BINDIR@@/vmware-vim-cmd -U "${HOHO_ADMIN}" hostsvc/autostartmanager/autostop
41 | fi
42 | eend $?
43 |
44 | ebegin Stopping VMware Workstation Server
45 | start-stop-daemon --stop \
46 | --pidfile /var/run/vmware/vmware-hostd.PID \
47 | --exec @@BINDIR@@/vmware-hostd
48 | eend $?
49 | ebegin Stopping VMware Authentication Daemon
50 | #start-stop-daemon --stop \
51 | # --exec @@PREFIX@@/sbin/vmware-authdlauncher
52 | killall @@PREFIX@@/sbin/vmware-authdlauncher
53 | eend $?
54 | }
55 |
--------------------------------------------------------------------------------
/app-emulation/vmware-tools/vmware-tools-9.9.3.2780323.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2015 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | inherit versionator vmware-bundle
5 |
6 | MY_PV="$(replace_version_separator 3 - $PV)"
7 | BASE_URI="http://softwareupdate.vmware.com/cds/vmw-desktop/player/7.1.2/$(get_version_component_range 4)/linux/packages/"
8 |
9 | DESCRIPTION="VMware Tools for guest operating systems"
10 | HOMEPAGE="http://www.vmware.com/products/player/"
11 |
12 | LICENSE="vmware"
13 | SLOT="0"
14 | KEYWORDS="-* ~amd64"
15 | RESTRICT="mirror"
16 | IUSE=""
17 |
18 | DEPEND=""
19 | RDEPEND=""
20 |
21 | IUSE_VMWARE_GUEST="freebsd linux netware solaris windows winPre2k"
22 |
23 | VM_INSTALL_DIR="/opt/vmware"
24 |
25 | for guest in ${IUSE_VMWARE_GUEST} ; do
26 | SRC_URI+=" vmware_guest_${guest}? (
27 | amd64? ( ${BASE_URI}vmware-tools-${guest}-${MY_PV}.x86_64.component.tar )
28 | )"
29 | IUSE+=" vmware_guest_${guest}"
30 | done ; unset guest
31 |
32 | src_unpack() {
33 | local arch
34 | if use x86 ; then arch='i386'
35 | elif use amd64 ; then arch='x86_64'
36 | fi
37 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
38 | if use "vmware_guest_${guest}" ; then
39 | local component="vmware-tools-${guest}-${MY_PV}.${arch}.component"
40 | unpack "${component}.tar"
41 | vmware-bundle_extract-component "${component}"
42 | fi
43 | done
44 | }
45 |
46 | src_install() {
47 | insinto "${VM_INSTALL_DIR}"/lib/vmware/isoimages
48 | local somethingdone;
49 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
50 | if use "vmware_guest_${guest}" ; then
51 | doins "${guest}".iso{,.sig}
52 | somethingdone=yes
53 | fi
54 | done
55 |
56 | [ -n "${somethingdone}" ] || ewarn "You should set VMWARE_GUEST in make.conf to specify which operating systems you need."
57 | }
58 |
--------------------------------------------------------------------------------
/app-emulation/vmware-tools/vmware-tools-9.9.4.3206955.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2016 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | inherit versionator vmware-bundle
5 |
6 | MY_PV="$(replace_version_separator 3 - $PV)"
7 | BASE_URI="http://softwareupdate.vmware.com/cds/vmw-desktop/player/7.1.3/$(get_version_component_range 4)/linux/packages/"
8 |
9 | DESCRIPTION="VMware Tools for guest operating systems"
10 | HOMEPAGE="http://www.vmware.com/products/player/"
11 |
12 | LICENSE="vmware"
13 | SLOT="0"
14 | KEYWORDS="-* ~amd64"
15 | RESTRICT="mirror"
16 | IUSE=""
17 |
18 | DEPEND=""
19 | RDEPEND=""
20 |
21 | IUSE_VMWARE_GUEST="freebsd linux netware solaris windows winPre2k"
22 |
23 | VM_INSTALL_DIR="/opt/vmware"
24 |
25 | for guest in ${IUSE_VMWARE_GUEST} ; do
26 | SRC_URI+=" vmware_guest_${guest}? (
27 | amd64? ( ${BASE_URI}vmware-tools-${guest}-${MY_PV}.x86_64.component.tar )
28 | )"
29 | IUSE+=" vmware_guest_${guest}"
30 | done ; unset guest
31 |
32 | src_unpack() {
33 | local arch
34 | if use x86 ; then arch='i386'
35 | elif use amd64 ; then arch='x86_64'
36 | fi
37 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
38 | if use "vmware_guest_${guest}" ; then
39 | local component="vmware-tools-${guest}-${MY_PV}.${arch}.component"
40 | unpack "${component}.tar"
41 | vmware-bundle_extract-component "${component}"
42 | fi
43 | done
44 | }
45 |
46 | src_install() {
47 | insinto "${VM_INSTALL_DIR}"/lib/vmware/isoimages
48 | local somethingdone;
49 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
50 | if use "vmware_guest_${guest}" ; then
51 | doins "${guest}".iso{,.sig}
52 | somethingdone=yes
53 | fi
54 | done
55 |
56 | [ -n "${somethingdone}" ] || ewarn "You should set VMWARE_GUEST in make.conf to specify which operating systems you need."
57 | }
58 |
--------------------------------------------------------------------------------
/app-emulation/vmware-tools/vmware-tools-9.9.5.3848939.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2016 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | inherit versionator vmware-bundle
5 |
6 | MY_PV="$(replace_version_separator 3 - $PV)"
7 | BASE_URI="http://softwareupdate.vmware.com/cds/vmw-desktop/player/7.1.4/$(get_version_component_range 4)/linux/packages/"
8 |
9 | DESCRIPTION="VMware Tools for guest operating systems"
10 | HOMEPAGE="http://www.vmware.com/products/player/"
11 |
12 | LICENSE="vmware"
13 | SLOT="0"
14 | KEYWORDS="-* ~amd64"
15 | RESTRICT="mirror"
16 | IUSE=""
17 |
18 | DEPEND=""
19 | RDEPEND=""
20 |
21 | IUSE_VMWARE_GUEST="freebsd linux netware solaris windows winPre2k"
22 |
23 | VM_INSTALL_DIR="/opt/vmware"
24 |
25 | for guest in ${IUSE_VMWARE_GUEST} ; do
26 | SRC_URI+=" vmware_guest_${guest}? (
27 | amd64? ( ${BASE_URI}vmware-tools-${guest}-${MY_PV}.x86_64.component.tar )
28 | )"
29 | IUSE+=" vmware_guest_${guest}"
30 | done ; unset guest
31 |
32 | src_unpack() {
33 | local arch
34 | if use x86 ; then arch='i386'
35 | elif use amd64 ; then arch='x86_64'
36 | fi
37 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
38 | if use "vmware_guest_${guest}" ; then
39 | local component="vmware-tools-${guest}-${MY_PV}.${arch}.component"
40 | unpack "${component}.tar"
41 | vmware-bundle_extract-component "${component}"
42 | fi
43 | done
44 | }
45 |
46 | src_install() {
47 | insinto "${VM_INSTALL_DIR}"/lib/vmware/isoimages
48 | local somethingdone;
49 | local guest ; for guest in ${IUSE_VMWARE_GUEST} ; do
50 | if use "vmware_guest_${guest}" ; then
51 | doins "${guest}".iso{,.sig}
52 | somethingdone=yes
53 | fi
54 | done
55 |
56 | [ -n "${somethingdone}" ] || ewarn "You should set VMWARE_GUEST in make.conf to specify which operating systems you need."
57 | }
58 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.2-00-inode_op.patch:
--------------------------------------------------------------------------------
1 | diff -rupN vmblock-only/linux/inode.c vmblock-only.new/linux/inode.c
2 | --- vmblock-only/linux/inode.c 2016-03-16 21:24:25.771034759 -0400
3 | +++ vmblock-only.new/linux/inode.c 2016-03-16 21:26:22.697036311 -0400
4 | @@ -44,7 +44,9 @@ static struct dentry *InodeOpLookup(stru
5 | static int InodeOpReadlink(struct dentry *, char __user *, int);
6 | #endif
7 |
8 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
9 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
10 | +static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie);
11 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
12 | static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
13 | #else
14 | static int InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
15 | @@ -220,7 +222,9 @@ InodeOpReadlink(struct dentry *dentry,
16 | *
17 | *----------------------------------------------------------------------------
18 | */
19 | -
20 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
21 | +static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie)
22 | +#else
23 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
24 | static void *
25 | #else
26 | @@ -228,6 +232,7 @@ static int
27 | #endif
28 | InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink
29 | struct nameidata *nd) // OUT: stores result
30 | +#endif
31 | {
32 | int ret;
33 | VMBlockInodeInfo *iinfo;
34 | @@ -244,7 +249,11 @@ InodeOpFollowlink(struct dentry *dentry,
35 | goto out;
36 | }
37 |
38 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
39 | + return *cookie = (char *)(iinfo->name);
40 | +#else
41 | nd_set_link(nd, iinfo->name);
42 | +#endif
43 |
44 | out:
45 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
46 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.11-01-filldir.patch:
--------------------------------------------------------------------------------
1 | simply remove the code for Filldir since it is no longer used with the new
2 | iterate_dir API
3 |
4 | diff -rupN vmblock-only/linux/file.c vmblock-only.new/linux/file.c
5 | --- vmblock-only/linux/file.c 2014-10-07 23:22:46.832469618 -0400
6 | +++ vmblock-only.new/linux/file.c 2014-10-07 23:24:35.276472720 -0400
7 | @@ -38,46 +38,6 @@ typedef u64 inode_num_t;
8 | typedef ino_t inode_num_t;
9 | #endif
10 |
11 | -/* Specifically for our filldir_t callback */
12 | -typedef struct FilldirInfo {
13 | - filldir_t filldir;
14 | - void *dirent;
15 | -} FilldirInfo;
16 | -
17 | -
18 | -/*
19 | - *----------------------------------------------------------------------------
20 | - *
21 | - * Filldir --
22 | - *
23 | - * Callback function for readdir that we use in place of the one provided.
24 | - * This allows us to specify that each dentry is a symlink, but pass through
25 | - * everything else to the original filldir function.
26 | - *
27 | - * Results:
28 | - * Original filldir's return value.
29 | - *
30 | - * Side effects:
31 | - * Directory information gets copied to user's buffer.
32 | - *
33 | - *----------------------------------------------------------------------------
34 | - */
35 | -
36 | -static int
37 | -Filldir(void *buf, // IN: Dirent buffer passed from FileOpReaddir
38 | - const char *name, // IN: Dirent name
39 | - int namelen, // IN: len of dirent's name
40 | - loff_t offset, // IN: Offset
41 | - inode_num_t ino, // IN: Inode number of dirent
42 | - unsigned int d_type) // IN: Type of file
43 | -{
44 | - FilldirInfo *info = buf;
45 | -
46 | - /* Specify DT_LNK regardless */
47 | - return info->filldir(info->dirent, name, namelen, offset, ino, DT_LNK);
48 | -}
49 | -
50 | -
51 | /* File operations */
52 |
53 | /*
54 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.11-01-filldir.patch:
--------------------------------------------------------------------------------
1 | simply remove the code for Filldir since it is no longer used with the new
2 | iterate_dir API
3 |
4 | diff -rupN vmblock-only/linux/file.c vmblock-only.new/linux/file.c
5 | --- vmblock-only/linux/file.c 2014-10-07 23:22:46.832469618 -0400
6 | +++ vmblock-only.new/linux/file.c 2014-10-07 23:24:35.276472720 -0400
7 | @@ -38,46 +38,6 @@ typedef u64 inode_num_t;
8 | typedef ino_t inode_num_t;
9 | #endif
10 |
11 | -/* Specifically for our filldir_t callback */
12 | -typedef struct FilldirInfo {
13 | - filldir_t filldir;
14 | - void *dirent;
15 | -} FilldirInfo;
16 | -
17 | -
18 | -/*
19 | - *----------------------------------------------------------------------------
20 | - *
21 | - * Filldir --
22 | - *
23 | - * Callback function for readdir that we use in place of the one provided.
24 | - * This allows us to specify that each dentry is a symlink, but pass through
25 | - * everything else to the original filldir function.
26 | - *
27 | - * Results:
28 | - * Original filldir's return value.
29 | - *
30 | - * Side effects:
31 | - * Directory information gets copied to user's buffer.
32 | - *
33 | - *----------------------------------------------------------------------------
34 | - */
35 | -
36 | -static int
37 | -Filldir(void *buf, // IN: Dirent buffer passed from FileOpReaddir
38 | - const char *name, // IN: Dirent name
39 | - int namelen, // IN: len of dirent's name
40 | - loff_t offset, // IN: Offset
41 | - inode_num_t ino, // IN: Inode number of dirent
42 | - unsigned int d_type) // IN: Type of file
43 | -{
44 | - FilldirInfo *info = buf;
45 | -
46 | - /* Specify DT_LNK regardless */
47 | - return info->filldir(info->dirent, name, namelen, offset, ino, DT_LNK);
48 | -}
49 | -
50 | -
51 | /* File operations */
52 |
53 | /*
54 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.10-02-control.patch:
--------------------------------------------------------------------------------
1 | The API to create proc entries now takes the file ops structure directly, instead of being set after the fact
2 | Using new __getname/__putname API
3 | --- a/vmblock-only/linux/control.c 2015-02-07 03:11:55.000000000 +0300
4 | +++ c/vmblock-only/linux/control.c 2015-02-24 03:58:06.038605919 +0300
5 | @@ -208,9 +208,11 @@
6 | VMBlockSetProcEntryOwner(controlProcMountpoint);
7 |
8 | /* Create /proc/fs/vmblock/dev */
9 | - controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
10 | - VMBLOCK_CONTROL_MODE,
11 | - controlProcDirEntry);
12 | + controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME,
13 | + VMBLOCK_CONTROL_MODE,
14 | + controlProcDirEntry,
15 | + &ControlFileOps);
16 | +
17 | if (!controlProcEntry) {
18 | Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n");
19 | remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry);
20 | @@ -218,7 +220,10 @@
21 | return -EINVAL;
22 | }
23 |
24 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
25 | controlProcEntry->proc_fops = &ControlFileOps;
26 | +#endif
27 | +
28 | return 0;
29 | }
30 |
31 | @@ -287,18 +287,24 @@ ExecuteBlockOp(const char __user *buf,
32 | int i;
33 | int retval;
34 |
35 | - name = getname(buf);
36 | + name = __getname();
37 | if (IS_ERR(name)) {
38 | return PTR_ERR(name);
39 | }
40 |
41 | + i = strncpy_from_user(name, buf, PATH_MAX);
42 | + if (i < 0 || i == PATH_MAX) {
43 | + __putname(name);
44 | + return -EINVAL;
45 | + }
46 | +
47 | for (i = strlen(name) - 1; i >= 0 && name[i] == '/'; i--) {
48 | name[i] = '\0';
49 | }
50 |
51 | retval = i < 0 ? -EINVAL : blockOp(name, blocker);
52 |
53 | - putname(name);
54 | + __putname(name);
55 |
56 | return retval;
57 | }
58 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.10-02-control.patch:
--------------------------------------------------------------------------------
1 | The API to create proc entries now takes the file ops structure directly, instead of being set after the fact
2 | Using new __getname/__putname API
3 | --- a/vmblock-only/linux/control.c 2015-02-07 03:11:55.000000000 +0300
4 | +++ c/vmblock-only/linux/control.c 2015-02-24 03:58:06.038605919 +0300
5 | @@ -208,9 +208,11 @@
6 | VMBlockSetProcEntryOwner(controlProcMountpoint);
7 |
8 | /* Create /proc/fs/vmblock/dev */
9 | - controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
10 | - VMBLOCK_CONTROL_MODE,
11 | - controlProcDirEntry);
12 | + controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME,
13 | + VMBLOCK_CONTROL_MODE,
14 | + controlProcDirEntry,
15 | + &ControlFileOps);
16 | +
17 | if (!controlProcEntry) {
18 | Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n");
19 | remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry);
20 | @@ -218,7 +220,10 @@
21 | return -EINVAL;
22 | }
23 |
24 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
25 | controlProcEntry->proc_fops = &ControlFileOps;
26 | +#endif
27 | +
28 | return 0;
29 | }
30 |
31 | @@ -287,18 +287,24 @@ ExecuteBlockOp(const char __user *buf,
32 | int i;
33 | int retval;
34 |
35 | - name = getname(buf);
36 | + name = __getname();
37 | if (IS_ERR(name)) {
38 | return PTR_ERR(name);
39 | }
40 |
41 | + i = strncpy_from_user(name, buf, PATH_MAX);
42 | + if (i < 0 || i == PATH_MAX) {
43 | + __putname(name);
44 | + return -EINVAL;
45 | + }
46 | +
47 | for (i = strlen(name) - 1; i >= 0 && name[i] == '/'; i--) {
48 | name[i] = '\0';
49 | }
50 |
51 | retval = i < 0 ? -EINVAL : blockOp(name, blocker);
52 |
53 | - putname(name);
54 | + __putname(name);
55 |
56 | return retval;
57 | }
58 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.14-01-deprecated-asm-uaccess.patch:
--------------------------------------------------------------------------------
1 | --- vmblock-only/linux/control.c 2017-10-26 00:35:44.391562150 +0200
2 | +++ vmblock-only/linux/control.c.new 2017-10-26 00:44:31.803591641 +0200
3 | @@ -29,7 +29,7 @@
4 | #include
5 | #include
6 |
7 | -#include
8 | +#include
9 |
10 | #include "vmblockInt.h"
11 | #include "block.h"
12 | --- ./vsock-only/shared/compat_uaccess.h 2017-06-20 04:29:39.000000000 +0200
13 | +++ ./vsock-only/shared/compat_uaccess.h.new 2017-10-26 01:09:20.867674903 +0200
14 | @@ -21,7 +21,9 @@
15 |
16 |
17 | /* User space access functions moved in 2.1.7 to asm/uaccess.h --hpreg */
18 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 7)
19 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
20 | +# include
21 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 7)
22 | # include
23 | #else
24 | # include
25 | --- ./vmci-only/shared/compat_uaccess.h 2017-06-20 04:29:39.000000000 +0200
26 | +++ ./vmci-only/shared/compat_uaccess.h.new 2017-10-26 01:08:43.547672817 +0200
27 | @@ -21,7 +21,9 @@
28 |
29 |
30 | /* User space access functions moved in 2.1.7 to asm/uaccess.h --hpreg */
31 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 7)
32 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
33 | +# include
34 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 7)
35 | # include
36 | #else
37 | # include
38 | --- ./vmblock-only/shared/compat_uaccess.h 2017-06-20 04:29:39.000000000 +0200
39 | +++ ./vmblock-only/shared/compat_uaccess.h.new 2017-10-26 01:07:48.915669762 +0200
40 | @@ -21,7 +21,9 @@
41 |
42 |
43 | /* User space access functions moved in 2.1.7 to asm/uaccess.h --hpreg */
44 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 7)
45 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
46 | +# include
47 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 7)
48 | # include
49 | #else
50 | # include
51 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.02-00-nd_set_link.patch:
--------------------------------------------------------------------------------
1 | --- vmci-only/linux/driver.c 2015-02-07 01:11:55.000000000 +0100
2 | +++ vmci-only/linux/driver.c.new 2015-07-23 00:28:25.713804866 +0200
3 | @@ -37,6 +37,7 @@
4 | #include
5 | #include
6 | #include
7 | +#include
8 |
9 | #include "compat_highmem.h"
10 | #include "compat_interrupt.h"
11 | --- vmblock-only/linux/inode.c 2015-08-23 00:34:11.959377109 +0200
12 | +++ vmblock-only/linux/inode.c.new 2015-08-23 00:37:49.839389292 +0200
13 | @@ -38,7 +38,9 @@
14 | static int InodeOpReadlink(struct dentry *, char __user *, int);
15 | #endif
16 |
17 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
18 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
19 | +static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie);
20 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
21 | static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
22 | #else
23 | static int InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
24 | @@ -203,13 +205,19 @@
25 | *----------------------------------------------------------------------------
26 | */
27 |
28 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
29 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
30 | +static const char *
31 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
32 | static void *
33 | #else
34 | static int
35 | #endif
36 | InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink
37 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
38 | + void **cookie) // OUT: stores opaque pointer
39 | +#else
40 | struct nameidata *nd) // OUT: stores result
41 | +#endif
42 | {
43 | int ret;
44 | VMBlockInodeInfo *iinfo;
45 | @@ -226,7 +234,11 @@
46 | goto out;
47 | }
48 |
49 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
50 | + return *cookie = iinfo->name;
51 | +#else
52 | nd_set_link(nd, iinfo->name);
53 | +#endif
54 |
55 | out:
56 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
57 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.11-00-missing-headers.patch:
--------------------------------------------------------------------------------
1 | --- vmblock-only/linux/inode.c 2017-05-06 16:54:57.000000000 +0200
2 | +++ vmblock-only/linux/inode.c.new 2017-05-06 16:55:32.000000000 +0200
3 | @@ -28,6 +28,7 @@
4 | #include
5 | #include
6 | #include
7 | +#include
8 |
9 | #include "vmblockInt.h"
10 | #include "filesystem.h"
11 | --- vmci-only/linux/driver.c 2017-05-06 16:59:06.000000000 +0200
12 | +++ vmci-only/linux/driver.c.new 2017-05-06 17:00:03.000000000 +0200
13 | @@ -38,6 +38,7 @@
14 | #include
15 | #include
16 | #include
17 | +#include
18 |
19 | #include "compat_highmem.h"
20 | #include "compat_interrupt.h"
21 | --- vmci-only/linux/vmciKernelIf.c 2017-05-06 17:00:42.000000000 +0200
22 | +++ vmci-only/linux/vmciKernelIf.c.new 2017-05-06 17:01:24.000000000 +0200
23 | @@ -41,6 +41,7 @@
24 | #include
25 | #include
26 | #include
27 | +#include
28 |
29 | #include "compat_highmem.h"
30 | #include "compat_interrupt.h"
31 | --- vsock-only/linux/af_vsock.c 2017-05-06 17:02:05.000000000 +0200
32 | +++ vsock-only/linux/af_vsock.c.new 2017-05-06 17:02:49.000000000 +0200
33 | @@ -106,6 +106,7 @@
34 | #include
35 | #include
36 | #include
37 | +#include
38 | #include
39 | #if defined(__x86_64__) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
40 | # include
41 | --- vmmon-only/linux/hostif.c 2017-05-06 16:56:09.000000000 +0200
42 | +++ vmmon-only/linux/hostif.c.new 2017-05-06 16:56:41.000000000 +0200
43 | @@ -73,6 +73,7 @@
44 | #include
45 | #include
46 | #include
47 | +#include
48 |
49 | #include
50 |
51 | --- vmnet-only/userif.c 2017-03-13 04:05:59.000000000 +0100
52 | +++ vmnet-only/userif.c.new 2017-05-06 16:58:32.000000000 +0200
53 | @@ -36,6 +36,7 @@
54 | #include
55 | #include
56 | #include
57 | +#include
58 |
59 | #include
60 | #include
61 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.19-04-iovec.patch:
--------------------------------------------------------------------------------
1 | Some parts of the iovec API were replaced by the similar message API. Refactoring the code to use that.
2 | --- a/vmci-only/linux/vmciKernelIf.c 2015-02-07 03:11:55.000000000 +0300
3 | +++ c/vmci-only/linux/vmciKernelIf.c 2015-02-24 03:58:06.041605450 +0300
4 | @@ -40,6 +40,7 @@
5 | #include /* For memcpy_{to,from}iovec(). */
6 | #include
7 | #include
8 | +#include
9 |
10 | #include "compat_highmem.h"
11 | #include "compat_interrupt.h"
12 | @@ -1196,21 +1197,21 @@
13 | } else {
14 | toCopy = size - bytesCopied;
15 | }
16 | -
17 | + /* Code cloned from kernels drivers/misc/vmw_vmci/vmci_queue_pair.c */
18 | if (isIovec) {
19 | - struct iovec *iov = (struct iovec *)src;
20 | - int err;
21 | + struct msghdr *msg = (struct msghdr *)src;
22 | + int err;
23 |
24 | - /* The iovec will track bytesCopied internally. */
25 | - err = memcpy_fromiovec((uint8 *)va + pageOffset, iov, toCopy);
26 | - if (err != 0) {
27 | - if (kernelIf->host) {
28 | - kunmap(kernelIf->u.h.page[pageIndex]);
29 | + /* The iovec will track bytes_copied internally. */
30 | + err = memcpy_from_msg((u8 *)va + pageOffset, msg, toCopy);
31 | + if (err != 0) {
32 | + if (kernelIf->host)
33 | + kunmap(kernelIf->u.h.page[pageIndex]);
34 | + return VMCI_ERROR_INVALID_ARGS;
35 | }
36 | - return VMCI_ERROR_INVALID_ARGS;
37 | - }
38 | - } else {
39 | - memcpy((uint8 *)va + pageOffset, (uint8 *)src + bytesCopied, toCopy);
40 | + } else {
41 | + memcpy((u8 *)va + pageOffset,
42 | + (u8 *)src + bytesCopied, toCopy);
43 | }
44 |
45 | bytesCopied += toCopy;
46 | @@ -1273,11 +1274,11 @@
47 | }
48 |
49 | if (isIovec) {
50 | - struct iovec *iov = (struct iovec *)dest;
51 | + struct msghdr *msg = (struct msghdr *)dest;
52 | int err;
53 |
54 | /* The iovec will track bytesCopied internally. */
55 | - err = memcpy_toiovec(iov, (uint8 *)va + pageOffset, toCopy);
56 | + err = memcpy_to_msg(msg, (uint8 *)va + pageOffset, toCopy);
57 | if (err != 0) {
58 | if (kernelIf->host) {
59 | kunmap(kernelIf->u.h.page[pageIndex]);
60 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.19-04-iovec.patch:
--------------------------------------------------------------------------------
1 | Some parts of the iovec API were replaced by the similar message API. Refactoring the code to use that.
2 | --- a/vmci-only/linux/vmciKernelIf.c 2015-02-07 03:11:55.000000000 +0300
3 | +++ c/vmci-only/linux/vmciKernelIf.c 2015-02-24 03:58:06.041605450 +0300
4 | @@ -40,6 +40,7 @@
5 | #include /* For memcpy_{to,from}iovec(). */
6 | #include
7 | #include
8 | +#include
9 |
10 | #include "compat_highmem.h"
11 | #include "compat_interrupt.h"
12 | @@ -1196,21 +1197,21 @@
13 | } else {
14 | toCopy = size - bytesCopied;
15 | }
16 | -
17 | + /* Code cloned from kernels drivers/misc/vmw_vmci/vmci_queue_pair.c */
18 | if (isIovec) {
19 | - struct iovec *iov = (struct iovec *)src;
20 | - int err;
21 | + struct msghdr *msg = (struct msghdr *)src;
22 | + int err;
23 |
24 | - /* The iovec will track bytesCopied internally. */
25 | - err = memcpy_fromiovec((uint8 *)va + pageOffset, iov, toCopy);
26 | - if (err != 0) {
27 | - if (kernelIf->host) {
28 | - kunmap(kernelIf->u.h.page[pageIndex]);
29 | + /* The iovec will track bytes_copied internally. */
30 | + err = memcpy_from_msg((u8 *)va + pageOffset, msg, toCopy);
31 | + if (err != 0) {
32 | + if (kernelIf->host)
33 | + kunmap(kernelIf->u.h.page[pageIndex]);
34 | + return VMCI_ERROR_INVALID_ARGS;
35 | }
36 | - return VMCI_ERROR_INVALID_ARGS;
37 | - }
38 | - } else {
39 | - memcpy((uint8 *)va + pageOffset, (uint8 *)src + bytesCopied, toCopy);
40 | + } else {
41 | + memcpy((u8 *)va + pageOffset,
42 | + (u8 *)src + bytesCopied, toCopy);
43 | }
44 |
45 | bytesCopied += toCopy;
46 | @@ -1273,11 +1274,11 @@
47 | }
48 |
49 | if (isIovec) {
50 | - struct iovec *iov = (struct iovec *)dest;
51 | + struct msghdr *msg = (struct msghdr *)dest;
52 | int err;
53 |
54 | /* The iovec will track bytesCopied internally. */
55 | - err = memcpy_toiovec(iov, (uint8 *)va + pageOffset, toCopy);
56 | + err = memcpy_to_msg(msg, (uint8 *)va + pageOffset, toCopy);
57 | if (err != 0) {
58 | if (kernelIf->host) {
59 | kunmap(kernelIf->u.h.page[pageIndex]);
60 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.05-00-vmblock-follow_link.patch:
--------------------------------------------------------------------------------
1 | --- vmblock-only/linux/inode.c.old 2016-05-27 15:12:49.315632906 +0200
2 | +++ vmblock-only/linux/inode.c 2016-05-27 22:57:39.550192422 +0200
3 | @@ -44,7 +44,9 @@
4 | static int InodeOpReadlink(struct dentry *, char __user *, int);
5 | #endif
6 |
7 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
8 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 99)
9 | +static const char *InodeOpFollowlink(struct dentry *dentry, struct inode *inode, struct delayed_call *done);
10 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
11 | static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie);
12 | #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
13 | static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
14 | @@ -63,7 +65,11 @@
15 | struct inode_operations LinkInodeOps = {
16 | #endif
17 | .readlink = InodeOpReadlink,
18 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 99)
19 | + .get_link = InodeOpFollowlink,
20 | +#else
21 | .follow_link = InodeOpFollowlink,
22 | +#endif
23 | };
24 |
25 | /*
26 | @@ -231,7 +237,10 @@
27 | static int
28 | #endif
29 | InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink
30 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
31 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 99)
32 | + struct inode *inode,
33 | + struct delayed_call *done)
34 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
35 | void **cookie) // OUT: stores opaque pointer
36 | #else
37 | struct nameidata *nd) // OUT: stores result
38 | @@ -241,18 +250,28 @@
39 | VMBlockInodeInfo *iinfo;
40 |
41 | if (!dentry) {
42 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 99)
43 | + ret = -ECHILD;
44 | +#else
45 | Warning("InodeOpReadlink: invalid args from kernel\n");
46 | ret = -EINVAL;
47 | +#endif
48 | goto out;
49 | }
50 |
51 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 99)
52 | + iinfo = INODE_TO_IINFO(inode);
53 | +#else
54 | iinfo = INODE_TO_IINFO(dentry->d_inode);
55 | +#endif
56 | if (!iinfo) {
57 | ret = -EINVAL;
58 | goto out;
59 | }
60 |
61 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
62 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 99)
63 | + return iinfo->name;
64 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
65 | return *cookie = iinfo->name;
66 | #else
67 | nd_set_link(nd, iinfo->name);
68 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-makefile-kernel-dir.patch:
--------------------------------------------------------------------------------
1 | diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile
2 | index 2b81323..746c8b8 100644
3 | --- a/vmblock-only/Makefile
4 | +++ b/vmblock-only/Makefile
5 | @@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
6 | ifdef LINUXINCLUDE
7 | HEADER_DIR = $(LINUXINCLUDE)
8 | else
9 | -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
10 | +HEADER_DIR = $(KERNEL_DIR)
11 | endif
12 |
13 | -BUILD_DIR = $(HEADER_DIR)/..
14 | +BUILD_DIR = $(KBUILD_OUTPUT)
15 |
16 | DRIVER := vmblock
17 | PRODUCT := ws
18 | diff --git a/vmci-only/Makefile b/vmci-only/Makefile
19 | index 8e9c5be..6ec828b 100644
20 | --- a/vmci-only/Makefile
21 | +++ b/vmci-only/Makefile
22 | @@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
23 | ifdef LINUXINCLUDE
24 | HEADER_DIR = $(LINUXINCLUDE)
25 | else
26 | -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
27 | +HEADER_DIR = $(KERNEL_DIR)
28 | endif
29 |
30 | -BUILD_DIR = $(HEADER_DIR)/..
31 | +BUILD_DIR = $(KBUILD_OUTPUT)
32 |
33 | DRIVER := vmci
34 | PRODUCT := ws
35 | diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile
36 | index 5bd867b..91a83d4 100644
37 | --- a/vmmon-only/Makefile
38 | +++ b/vmmon-only/Makefile
39 | @@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
40 | ifdef LINUXINCLUDE
41 | HEADER_DIR = $(LINUXINCLUDE)
42 | else
43 | -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
44 | +HEADER_DIR = $(KERNEL_DIR)
45 | endif
46 |
47 | -BUILD_DIR = $(HEADER_DIR)/..
48 | +BUILD_DIR = $(KBUILD_OUTPUT)
49 |
50 | DRIVER := vmmon
51 | PRODUCT := @@PRODUCT@@
52 | diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile
53 | index d4eb73c..c7c6d38 100644
54 | --- a/vmnet-only/Makefile
55 | +++ b/vmnet-only/Makefile
56 | @@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
57 | ifdef LINUXINCLUDE
58 | HEADER_DIR = $(LINUXINCLUDE)
59 | else
60 | -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
61 | +HEADER_DIR = $(KERNEL_DIR)
62 | endif
63 |
64 | -BUILD_DIR = $(HEADER_DIR)/..
65 | +BUILD_DIR = $(KBUILD_OUTPUT)
66 |
67 | DRIVER := vmnet
68 | PRODUCT := @@PRODUCT@@
69 | diff --git a/vsock-only/Makefile b/vsock-only/Makefile
70 | index 93dd61d..9765696 100644
71 | --- a/vsock-only/Makefile
72 | +++ b/vsock-only/Makefile
73 | @@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
74 | ifdef LINUXINCLUDE
75 | HEADER_DIR = $(LINUXINCLUDE)
76 | else
77 | -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
78 | +HEADER_DIR = $(KERNEL_DIR)
79 | endif
80 |
81 | -BUILD_DIR = $(HEADER_DIR)/..
82 | +BUILD_DIR = $(KBUILD_OUTPUT)
83 |
84 | DRIVER := vsock
85 | PRODUCT := ws
86 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-makefile-kernel-dir.patch:
--------------------------------------------------------------------------------
1 | diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile
2 | index 2b81323..746c8b8 100644
3 | --- a/vmblock-only/Makefile
4 | +++ b/vmblock-only/Makefile
5 | @@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
6 | ifdef LINUXINCLUDE
7 | HEADER_DIR = $(LINUXINCLUDE)
8 | else
9 | -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
10 | +HEADER_DIR = $(KERNEL_DIR)
11 | endif
12 |
13 | -BUILD_DIR = $(HEADER_DIR)/..
14 | +BUILD_DIR = $(KBUILD_OUTPUT)
15 |
16 | DRIVER := vmblock
17 | PRODUCT := ws
18 | diff --git a/vmci-only/Makefile b/vmci-only/Makefile
19 | index 8e9c5be..6ec828b 100644
20 | --- a/vmci-only/Makefile
21 | +++ b/vmci-only/Makefile
22 | @@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
23 | ifdef LINUXINCLUDE
24 | HEADER_DIR = $(LINUXINCLUDE)
25 | else
26 | -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
27 | +HEADER_DIR = $(KERNEL_DIR)
28 | endif
29 |
30 | -BUILD_DIR = $(HEADER_DIR)/..
31 | +BUILD_DIR = $(KBUILD_OUTPUT)
32 |
33 | DRIVER := vmci
34 | PRODUCT := ws
35 | diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile
36 | index 5bd867b..91a83d4 100644
37 | --- a/vmmon-only/Makefile
38 | +++ b/vmmon-only/Makefile
39 | @@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
40 | ifdef LINUXINCLUDE
41 | HEADER_DIR = $(LINUXINCLUDE)
42 | else
43 | -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
44 | +HEADER_DIR = $(KERNEL_DIR)
45 | endif
46 |
47 | -BUILD_DIR = $(HEADER_DIR)/..
48 | +BUILD_DIR = $(KBUILD_OUTPUT)
49 |
50 | DRIVER := vmmon
51 | PRODUCT := @@PRODUCT@@
52 | diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile
53 | index d4eb73c..c7c6d38 100644
54 | --- a/vmnet-only/Makefile
55 | +++ b/vmnet-only/Makefile
56 | @@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
57 | ifdef LINUXINCLUDE
58 | HEADER_DIR = $(LINUXINCLUDE)
59 | else
60 | -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
61 | +HEADER_DIR = $(KERNEL_DIR)
62 | endif
63 |
64 | -BUILD_DIR = $(HEADER_DIR)/..
65 | +BUILD_DIR = $(KBUILD_OUTPUT)
66 |
67 | DRIVER := vmnet
68 | PRODUCT := @@PRODUCT@@
69 | diff --git a/vsock-only/Makefile b/vsock-only/Makefile
70 | index 93dd61d..9765696 100644
71 | --- a/vsock-only/Makefile
72 | +++ b/vsock-only/Makefile
73 | @@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
74 | ifdef LINUXINCLUDE
75 | HEADER_DIR = $(LINUXINCLUDE)
76 | else
77 | -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
78 | +HEADER_DIR = $(KERNEL_DIR)
79 | endif
80 |
81 | -BUILD_DIR = $(HEADER_DIR)/..
82 | +BUILD_DIR = $(KBUILD_OUTPUT)
83 |
84 | DRIVER := vsock
85 | PRODUCT := ws
86 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.5-00-get_link.patch:
--------------------------------------------------------------------------------
1 | diff -rupN vmblock-only/linux/inode.c vmblock-only.new/linux/inode.c
2 | --- vmblock-only/linux/inode.c 2016-03-16 22:22:00.470080630 -0400
3 | +++ vmblock-only.new/linux/inode.c 2016-03-16 22:23:33.016081859 -0400
4 | @@ -44,7 +44,9 @@ static struct dentry *InodeOpLookup(stru
5 | static int InodeOpReadlink(struct dentry *, char __user *, int);
6 | #endif
7 |
8 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
9 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
10 | +const char *InodeOpGetLink(struct dentry *dentry, struct inode *inode, struct delayed_call *done);
11 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
12 | static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie);
13 | #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
14 | static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
15 | @@ -63,7 +65,11 @@ static struct inode_operations LinkInode
16 | struct inode_operations LinkInodeOps = {
17 | #endif
18 | .readlink = InodeOpReadlink,
19 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
20 | + .get_link = InodeOpGetLink,
21 | +#else
22 | .follow_link = InodeOpFollowlink,
23 | +#endif
24 | };
25 |
26 | /*
27 | @@ -222,7 +228,9 @@ InodeOpReadlink(struct dentry *dentry,
28 | *
29 | *----------------------------------------------------------------------------
30 | */
31 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
32 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
33 | +const char *InodeOpGetLink(struct dentry *dentry, struct inode *inode, struct delayed_call *done)
34 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
35 | static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie)
36 | #else
37 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
38 | @@ -238,18 +246,28 @@ InodeOpFollowlink(struct dentry *dentry,
39 | VMBlockInodeInfo *iinfo;
40 |
41 | if (!dentry) {
42 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
43 | + ret = -ECHILD;
44 | +#else
45 | Warning("InodeOpReadlink: invalid args from kernel\n");
46 | ret = -EINVAL;
47 | +#endif
48 | goto out;
49 | }
50 |
51 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
52 | + iinfo = INODE_TO_IINFO(inode);
53 | +#else
54 | iinfo = INODE_TO_IINFO(dentry->d_inode);
55 | +#endif
56 | if (!iinfo) {
57 | ret = -EINVAL;
58 | goto out;
59 | }
60 |
61 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
62 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
63 | + return (char *)(iinfo->name);
64 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
65 | return *cookie = (char *)(iinfo->name);
66 | #else
67 | nd_set_link(nd, iinfo->name);
68 |
--------------------------------------------------------------------------------
/app-emulation/vmware-player/files/vmware-12.5.rc:
--------------------------------------------------------------------------------
1 | #!/sbin/openrc-run
2 | # Copyright 1999-2014 Gentoo Foundation
3 | # Distributed under the terms of the GNU General Public License v2
4 |
5 | depend() {
6 | need localmount
7 | use net
8 | }
9 |
10 | start() {
11 | ebegin Starting VMware USB Arbitrator
12 | #start-stop-daemon --start --exec @@BINDIR@@/vmware-usbarbitrator
13 | @@BINDIR@@/vmware-usbarbitrator
14 | eend $?
15 | ebegin Starting VMware services
16 |
17 | # vmci might be:
18 | # 1) built as external kernel module
19 | # 2) built as internal kernel module (with name vmw_vmci)
20 | # 3) embedded in the kernel
21 | for mod in /lib/modules/$(uname -r)/misc/vmci.ko \
22 | /lib/modules/$(uname -r)/kernel/drivers/misc/vmw_vmci/vmw_vmci.ko ;
23 | do
24 | if [ -f "${mod}" ] ; then
25 | modprobe -v $(basename "${mod}" .ko)
26 | eend $?
27 | break
28 | fi
29 | done
30 |
31 | # vsock might be:
32 | # 1) built as external kernel module
33 | # 2) built as internal kernel module (with name vmw_vsock_vmci_transport)
34 | # 3) embedded in the kernel
35 | for mod in /lib/modules/$(uname -r)/misc/vsock.ko \
36 | /lib/modules/$(uname -r)/kernel/net/vmw_vsock/vmw_vsock_vmci_transport.ko ;
37 | do
38 | if [ -f "${mod}" ] ; then
39 | modprobe -v $(basename "${mod}" .ko)
40 | eend $?
41 | break
42 | fi
43 | done
44 |
45 | # vmci or vsock were already loaded by the previous modprobe,
46 | # no need to do it here
47 | modprobe -av vmmon vmblock vmnet
48 | eend $?
49 | @@BINDIR@@/vmware-networks --start
50 | eend $?
51 | }
52 |
53 | stop() {
54 | ebegin Stopping VMware USB Arbitrator
55 | #start-stop-daemon --stop --exec @@BINDIR@@/vmware-usbarbitrator
56 | killall --wait @@BINDIR@@/vmware-usbarbitrator
57 | eend $?
58 | @@BINDIR@@/vmware-networks --stop
59 | eend $?
60 | ebegin Stopping VMware services
61 | modprobe -rv vmmon vmblock vmnet
62 | eend $?
63 |
64 | # vsock might be:
65 | # 1) built as external kernel module
66 | # 2) built as internal kernel module (with name vmw_vsock_vmci_transport)
67 | # 3) embedded in the kernel
68 | for mod in /lib/modules/$(uname -r)/misc/vsock.ko \
69 | /lib/modules/$(uname -r)/kernel/net/vmw_vsock/vmw_vsock_vmci_transport.ko ;
70 | do
71 | if [ -f "${mod}" ] ; then
72 | modprobe -rv $(basename "${mod}" .ko)
73 | eend $?
74 | break
75 | fi
76 | done
77 |
78 | # vmci might be:
79 | # 1) built as external kernel module
80 | # 2) built as internal kernel module (with name vmw_vmci)
81 | # 3) embedded in the kernel
82 | for mod in /lib/modules/$(uname -r)/misc/vmci.ko \
83 | /lib/modules/$(uname -r)/kernel/drivers/misc/vmw_vmci/vmw_vmci.ko ;
84 | do
85 | if [ -f "${mod}" ] ; then
86 | modprobe -rv $(basename "${mod}" .ko)
87 | eend $?
88 | break
89 | fi
90 | done
91 | }
92 |
--------------------------------------------------------------------------------
/app-emulation/vmware-player/files/vmware-7.1.rc:
--------------------------------------------------------------------------------
1 | #!/sbin/openrc-run
2 | # Copyright 1999-2014 Gentoo Foundation
3 | # Distributed under the terms of the GNU General Public License v2
4 |
5 | depend() {
6 | need localmount
7 | use net
8 | }
9 |
10 | start() {
11 | ebegin Starting VMware USB Arbitrator
12 | #start-stop-daemon --start --exec @@BINDIR@@/vmware-usbarbitrator
13 | @@BINDIR@@/vmware-usbarbitrator
14 | eend $?
15 | ebegin Starting VMware services
16 |
17 | # vmci might be:
18 | # 1) built as external kernel module
19 | # 2) built as internal kernel module (with name vmw_vmci)
20 | # 3) embedded in the kernel
21 | for mod in /lib/modules/$(uname -r)/misc/vmci.ko \
22 | /lib/modules/$(uname -r)/kernel/drivers/misc/vmw_vmci/vmw_vmci.ko ;
23 | do
24 | if [[ -f "${mod}" ]] ; then
25 | modprobe -v $(basename "${mod}" .ko)
26 | eend $?
27 | break
28 | fi
29 | done
30 |
31 | # vsock might be:
32 | # 1) built as external kernel module
33 | # 2) built as internal kernel module (with name vmw_vsock_vmci_transport)
34 | # 3) embedded in the kernel
35 | for mod in /lib/modules/$(uname -r)/misc/vsock.ko \
36 | /lib/modules/$(uname -r)/kernel/net/vmw_vsock/vmw_vsock_vmci_transport.ko ;
37 | do
38 | if [[ -f "${mod}" ]] ; then
39 | modprobe -v $(basename "${mod}" .ko)
40 | eend $?
41 | break
42 | fi
43 | done
44 |
45 | # vmci or vsock were already loaded by the previous modprobe,
46 | # no need to do it here
47 | modprobe -av vmmon vmblock vmnet
48 | eend $?
49 | @@BINDIR@@/vmware-networks --start
50 | eend $?
51 | }
52 |
53 | stop() {
54 | ebegin Stopping VMware USB Arbitrator
55 | #start-stop-daemon --stop --exec @@BINDIR@@/vmware-usbarbitrator
56 | killall --wait @@BINDIR@@/vmware-usbarbitrator
57 | eend $?
58 | @@BINDIR@@/vmware-networks --stop
59 | eend $?
60 | ebegin Stopping VMware services
61 | modprobe -rv vmmon vmblock vmnet
62 | eend $?
63 |
64 | # vsock might be:
65 | # 1) built as external kernel module
66 | # 2) built as internal kernel module (with name vmw_vsock_vmci_transport)
67 | # 3) embedded in the kernel
68 | for mod in /lib/modules/$(uname -r)/misc/vsock.ko \
69 | /lib/modules/$(uname -r)/kernel/net/vmw_vsock/vmw_vsock_vmci_transport.ko ;
70 | do
71 | if [[ -f "${mod}" ]] ; then
72 | modprobe -rv $(basename "${mod}" .ko)
73 | eend $?
74 | break
75 | fi
76 | done
77 |
78 | # vmci might be:
79 | # 1) built as external kernel module
80 | # 2) built as internal kernel module (with name vmw_vmci)
81 | # 3) embedded in the kernel
82 | for mod in /lib/modules/$(uname -r)/misc/vmci.ko \
83 | /lib/modules/$(uname -r)/kernel/drivers/misc/vmw_vmci/vmw_vmci.ko ;
84 | do
85 | if [[ -f "${mod}" ]] ; then
86 | modprobe -rv $(basename "${mod}" .ko)
87 | eend $?
88 | break
89 | fi
90 | done
91 | }
92 |
--------------------------------------------------------------------------------
/app-emulation/vmware-workstation/files/vmware-12.5.rc:
--------------------------------------------------------------------------------
1 | #!/sbin/openrc-run
2 | # Copyright 1999-2014 Gentoo Foundation
3 | # Distributed under the terms of the GNU General Public License v2
4 |
5 | depend() {
6 | need localmount
7 | use net
8 | }
9 |
10 | start() {
11 | ebegin Starting VMware USB Arbitrator
12 | #start-stop-daemon --start --exec @@BINDIR@@/vmware-usbarbitrator
13 | @@BINDIR@@/vmware-usbarbitrator
14 | eend $?
15 | ebegin Starting VMware services
16 |
17 | # vmci might be:
18 | # 1) built as external kernel module
19 | # 2) built as internal kernel module (with name vmw_vmci)
20 | # 3) embedded in the kernel
21 | for mod in /lib/modules/$(uname -r)/misc/vmci.ko \
22 | /lib/modules/$(uname -r)/kernel/drivers/misc/vmw_vmci/vmw_vmci.ko ;
23 | do
24 | if [ -f "${mod}" ] ; then
25 | modprobe -v $(basename "${mod}" .ko)
26 | eend $?
27 | break
28 | fi
29 | done
30 |
31 | # vsock might be:
32 | # 1) built as external kernel module
33 | # 2) built as internal kernel module (with name vmw_vsock_vmci_transport)
34 | # 3) embedded in the kernel
35 | for mod in /lib/modules/$(uname -r)/misc/vsock.ko \
36 | /lib/modules/$(uname -r)/kernel/net/vmw_vsock/vmw_vsock_vmci_transport.ko ;
37 | do
38 | if [ -f "${mod}" ] ; then
39 | modprobe -v $(basename "${mod}" .ko)
40 | eend $?
41 | break
42 | fi
43 | done
44 |
45 | # vmci or vsock were already loaded by the previous modprobe,
46 | # no need to do it here
47 | modprobe -av vmmon vmblock vmnet
48 | eend $?
49 | @@BINDIR@@/vmware-networks --start
50 | eend $?
51 | }
52 |
53 | stop() {
54 | ebegin Stopping VMware USB Arbitrator
55 | #start-stop-daemon --stop --exec @@BINDIR@@/vmware-usbarbitrator
56 | killall --wait @@BINDIR@@/vmware-usbarbitrator
57 | eend $?
58 | @@BINDIR@@/vmware-networks --stop
59 | eend $?
60 | ebegin Stopping VMware services
61 | modprobe -rv vmmon vmblock vmnet
62 | eend $?
63 |
64 | # vsock might be:
65 | # 1) built as external kernel module
66 | # 2) built as internal kernel module (with name vmw_vsock_vmci_transport)
67 | # 3) embedded in the kernel
68 | for mod in /lib/modules/$(uname -r)/misc/vsock.ko \
69 | /lib/modules/$(uname -r)/kernel/net/vmw_vsock/vmw_vsock_vmci_transport.ko ;
70 | do
71 | if [ -f "${mod}" ] ; then
72 | modprobe -rv $(basename "${mod}" .ko)
73 | eend $?
74 | break
75 | fi
76 | done
77 |
78 | # vmci might be:
79 | # 1) built as external kernel module
80 | # 2) built as internal kernel module (with name vmw_vmci)
81 | # 3) embedded in the kernel
82 | for mod in /lib/modules/$(uname -r)/misc/vmci.ko \
83 | /lib/modules/$(uname -r)/kernel/drivers/misc/vmw_vmci/vmw_vmci.ko ;
84 | do
85 | if [ -f "${mod}" ] ; then
86 | modprobe -rv $(basename "${mod}" .ko)
87 | eend $?
88 | break
89 | fi
90 | done
91 | }
92 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-makefile-include.patch:
--------------------------------------------------------------------------------
1 | diff --git a/vmblock-only/Makefile.kernel b/vmblock-only/Makefile.kernel
2 | index ab7a727..e3ec9d2 100644
3 | --- a/vmblock-only/Makefile.kernel
4 | +++ b/vmblock-only/Makefile.kernel
5 | @@ -19,7 +19,7 @@
6 |
7 | INCLUDE += -I$(SRCROOT)/include
8 |
9 | -EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
10 | +EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
11 |
12 | EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachecreate.c, -DVMW_KMEMCR_HAS_DTOR, )
13 | EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachector.c, -DVMW_KMEMCR_CTOR_HAS_3_ARGS, )
14 | diff --git a/vmci-only/Makefile.kernel b/vmci-only/Makefile.kernel
15 | index ba343ee..861ea83 100644
16 | --- a/vmci-only/Makefile.kernel
17 | +++ b/vmci-only/Makefile.kernel
18 | @@ -21,7 +21,7 @@ CC_OPTS += -DVMCI
19 |
20 | INCLUDE += -I$(SRCROOT)/shared -I$(SRCROOT)/common -I$(SRCROOT)/linux
21 |
22 | -EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
23 | +EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
24 |
25 | obj-m += $(DRIVER).o
26 |
27 | diff --git a/vmmon-only/Makefile.kernel b/vmmon-only/Makefile.kernel
28 | index 8770d1d..c4746c3 100644
29 | --- a/vmmon-only/Makefile.kernel
30 | +++ b/vmmon-only/Makefile.kernel
31 | @@ -22,7 +22,7 @@ CC_OPTS += -DVMMON -DVMCORE
32 | INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
33 | -I$(SRCROOT)/vmcore
34 |
35 | -EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
36 | +EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
37 |
38 | EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/smpcall.c, -DVMW_HAVE_SMP_CALL_3ARG, )
39 |
40 | diff --git a/vmnet-only/Makefile.kernel b/vmnet-only/Makefile.kernel
41 | index d1e3133..665d428 100644
42 | --- a/vmnet-only/Makefile.kernel
43 | +++ b/vmnet-only/Makefile.kernel
44 | @@ -19,7 +19,7 @@
45 |
46 | INCLUDE := -I$(SRCROOT)
47 |
48 | -EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
49 | +EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
50 | EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
51 | EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_dev_net.c,-DVMW_NETDEV_HAS_DEV_NET, )
52 | EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/nfhook_uses_skb.c,-DVMW_NFHOOK_USES_SKB, )
53 | diff --git a/vsock-only/Makefile.kernel b/vsock-only/Makefile.kernel
54 | index b4629ee..264b8cb 100644
55 | --- a/vsock-only/Makefile.kernel
56 | +++ b/vsock-only/Makefile.kernel
57 | @@ -25,7 +25,7 @@ INCLUDE += -I$(SRCROOT)/include
58 | INCLUDE += -I$(SRCROOT)/linux
59 | INCLUDE += -I$(SRCROOT)/common
60 |
61 | -EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
62 | +EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
63 | EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/netcreate_num_params.c, -DVMW_NETCREATE_KERNARG, )
64 |
65 |
66 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-makefile-include.patch:
--------------------------------------------------------------------------------
1 | diff --git a/vmblock-only/Makefile.kernel b/vmblock-only/Makefile.kernel
2 | index ab7a727..e3ec9d2 100644
3 | --- a/vmblock-only/Makefile.kernel
4 | +++ b/vmblock-only/Makefile.kernel
5 | @@ -19,7 +19,7 @@
6 |
7 | INCLUDE += -I$(SRCROOT)/include
8 |
9 | -EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
10 | +EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
11 |
12 | EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachecreate.c, -DVMW_KMEMCR_HAS_DTOR, )
13 | EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachector.c, -DVMW_KMEMCR_CTOR_HAS_3_ARGS, )
14 | diff --git a/vmci-only/Makefile.kernel b/vmci-only/Makefile.kernel
15 | index ba343ee..861ea83 100644
16 | --- a/vmci-only/Makefile.kernel
17 | +++ b/vmci-only/Makefile.kernel
18 | @@ -21,7 +21,7 @@ CC_OPTS += -DVMCI
19 |
20 | INCLUDE += -I$(SRCROOT)/shared -I$(SRCROOT)/common -I$(SRCROOT)/linux
21 |
22 | -EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
23 | +EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
24 |
25 | obj-m += $(DRIVER).o
26 |
27 | diff --git a/vmmon-only/Makefile.kernel b/vmmon-only/Makefile.kernel
28 | index 8770d1d..c4746c3 100644
29 | --- a/vmmon-only/Makefile.kernel
30 | +++ b/vmmon-only/Makefile.kernel
31 | @@ -22,7 +22,7 @@ CC_OPTS += -DVMMON -DVMCORE
32 | INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
33 | -I$(SRCROOT)/vmcore
34 |
35 | -EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
36 | +EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
37 |
38 | EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/smpcall.c, -DVMW_HAVE_SMP_CALL_3ARG, )
39 |
40 | diff --git a/vmnet-only/Makefile.kernel b/vmnet-only/Makefile.kernel
41 | index d1e3133..665d428 100644
42 | --- a/vmnet-only/Makefile.kernel
43 | +++ b/vmnet-only/Makefile.kernel
44 | @@ -19,7 +19,7 @@
45 |
46 | INCLUDE := -I$(SRCROOT)
47 |
48 | -EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
49 | +EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
50 | EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
51 | EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_dev_net.c,-DVMW_NETDEV_HAS_DEV_NET, )
52 | EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/nfhook_uses_skb.c,-DVMW_NFHOOK_USES_SKB, )
53 | diff --git a/vsock-only/Makefile.kernel b/vsock-only/Makefile.kernel
54 | index b4629ee..264b8cb 100644
55 | --- a/vsock-only/Makefile.kernel
56 | +++ b/vsock-only/Makefile.kernel
57 | @@ -25,7 +25,7 @@ INCLUDE += -I$(SRCROOT)/include
58 | INCLUDE += -I$(SRCROOT)/linux
59 | INCLUDE += -I$(SRCROOT)/common
60 |
61 | -EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
62 | +EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
63 | EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/netcreate_num_params.c, -DVMW_NETCREATE_KERNARG, )
64 |
65 |
66 |
--------------------------------------------------------------------------------
/app-emulation/vmware-workstation/files/vmware-11.1.rc:
--------------------------------------------------------------------------------
1 | #!/sbin/openrc-run
2 | # Copyright 1999-2014 Gentoo Foundation
3 | # Distributed under the terms of the GNU General Public License v2
4 |
5 | depend() {
6 | need localmount
7 | use net
8 | }
9 |
10 | start() {
11 | ebegin Starting VMware USB Arbitrator
12 | #start-stop-daemon --start --exec @@BINDIR@@/vmware-usbarbitrator
13 | @@BINDIR@@/vmware-usbarbitrator
14 | eend $?
15 | ebegin Starting VMware services
16 |
17 | # vmci might be:
18 | # 1) built as external kernel module
19 | # 2) built as internal kernel module (with name vmw_vmci)
20 | # 3) embedded in the kernel
21 | for mod in /lib/modules/$(uname -r)/misc/vmci.ko \
22 | /lib/modules/$(uname -r)/kernel/drivers/misc/vmw_vmci/vmw_vmci.ko ;
23 | do
24 | if [[ -f "${mod}" ]] ; then
25 | modprobe -v $(basename "${mod}" .ko)
26 | eend $?
27 | break
28 | fi
29 | done
30 |
31 | # vsock might be:
32 | # 1) built as external kernel module
33 | # 2) built as internal kernel module (with name vmw_vsock_vmci_transport)
34 | # 3) embedded in the kernel
35 | for mod in /lib/modules/$(uname -r)/misc/vsock.ko \
36 | /lib/modules/$(uname -r)/kernel/net/vmw_vsock/vmw_vsock_vmci_transport.ko ;
37 | do
38 | if [[ -f "${mod}" ]] ; then
39 | modprobe -v $(basename "${mod}" .ko)
40 | eend $?
41 | break
42 | fi
43 | done
44 |
45 | # vmci or vsock were already loaded by the previous modprobe,
46 | # no need to do it here
47 | modprobe -av vmmon vmblock vmnet
48 | eend $?
49 | @@BINDIR@@/vmware-networks --start
50 | eend $?
51 | }
52 |
53 | stop() {
54 | ebegin Stopping VMware USB Arbitrator
55 | #start-stop-daemon --stop --exec @@BINDIR@@/vmware-usbarbitrator
56 | killall --wait @@BINDIR@@/vmware-usbarbitrator
57 | eend $?
58 | @@BINDIR@@/vmware-networks --stop
59 | eend $?
60 | ebegin Stopping VMware services
61 | modprobe -rv vmmon vmblock vmnet
62 | eend $?
63 |
64 | # vsock might be:
65 | # 1) built as external kernel module
66 | # 2) built as internal kernel module (with name vmw_vsock_vmci_transport)
67 | # 3) embedded in the kernel
68 | for mod in /lib/modules/$(uname -r)/misc/vsock.ko \
69 | /lib/modules/$(uname -r)/kernel/net/vmw_vsock/vmw_vsock_vmci_transport.ko ;
70 | do
71 | if [[ -f "${mod}" ]] ; then
72 | modprobe -rv $(basename "${mod}" .ko)
73 | eend $?
74 | break
75 | fi
76 | done
77 |
78 | # vmci might be:
79 | # 1) built as external kernel module
80 | # 2) built as internal kernel module (with name vmw_vmci)
81 | # 3) embedded in the kernel
82 | for mod in /lib/modules/$(uname -r)/misc/vmci.ko \
83 | /lib/modules/$(uname -r)/kernel/drivers/misc/vmw_vmci/vmw_vmci.ko ;
84 | do
85 | if [[ -f "${mod}" ]] ; then
86 | modprobe -rv $(basename "${mod}" .ko)
87 | eend $?
88 | break
89 | fi
90 | done
91 | }
92 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.6-00-user-pages.patch:
--------------------------------------------------------------------------------
1 | --- ./vmci-only/linux/driver.c.old 2016-05-19 19:00:09.784669042 +0200
2 | +++ ./vmci-only/linux/driver.c 2016-05-19 19:00:47.480671150 +0200
3 | @@ -1468,7 +1468,11 @@
4 | int retval;
5 |
6 | down_read(¤t->mm->mmap_sem);
7 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
8 | + retval = get_user_pages(addr,
9 | +#else
10 | retval = get_user_pages(current, current->mm, addr,
11 | +#endif
12 | 1, 1, 0, &page, NULL);
13 | up_read(¤t->mm->mmap_sem);
14 |
15 | --- ./vmci-only/linux/vmciKernelIf.c.old 2016-05-19 18:57:04.344658673 +0200
16 | +++ ./vmci-only/linux/vmciKernelIf.c 2016-05-19 19:03:28.600680159 +0200
17 | @@ -1835,7 +1835,11 @@
18 | if (dirty) {
19 | set_page_dirty(pages[i]);
20 | }
21 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
22 | + put_page(pages[i]);
23 | +#else
24 | page_cache_release(pages[i]);
25 | +#endif
26 | pages[i] = NULL;
27 | }
28 | }
29 | @@ -2049,9 +2053,13 @@
30 | int err = VMCI_SUCCESS;
31 |
32 | down_write(¤t->mm->mmap_sem);
33 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
34 | + retval = get_user_pages((VA)produceUVA,
35 | +#else
36 | retval = get_user_pages(current,
37 | current->mm,
38 | (VA)produceUVA,
39 | +#endif
40 | produceQ->kernelIf->numPages,
41 | 1, 0,
42 | produceQ->kernelIf->u.h.headerPage,
43 | @@ -2063,9 +2071,13 @@
44 | goto out;
45 | }
46 |
47 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
48 | + retval = get_user_pages((VA)consumeUVA,
49 | +#else
50 | retval = get_user_pages(current,
51 | current->mm,
52 | (VA)consumeUVA,
53 | +#endif
54 | consumeQ->kernelIf->numPages,
55 | 1, 0,
56 | consumeQ->kernelIf->u.h.headerPage,
57 | --- ./vmmon-only/linux/hostif.c.old 2016-05-19 18:50:42.872637343 +0200
58 | +++ ./vmmon-only/linux/hostif.c 2016-05-19 18:53:40.208647259 +0200
59 | @@ -1163,7 +1163,11 @@
60 | int retval;
61 |
62 | down_read(¤t->mm->mmap_sem);
63 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
64 | + retval = get_user_pages((unsigned long)uvAddr,
65 | +#else
66 | retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
67 | +#endif
68 | numPages, 0, 0, ppages, NULL);
69 | up_read(¤t->mm->mmap_sem);
70 |
71 | --- ./vmnet-only/userif.c.old 2016-05-19 18:52:45.904644222 +0200
72 | +++ ./vmnet-only/userif.c 2016-05-19 18:53:28.599646610 +0200
73 | @@ -113,7 +113,11 @@
74 | int retval;
75 |
76 | down_read(¤t->mm->mmap_sem);
77 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
78 | + retval = get_user_pages(addr,
79 | +#else
80 | retval = get_user_pages(current, current->mm, addr,
81 | +#endif
82 | 1, 1, 0, &page, NULL);
83 | up_read(¤t->mm->mmap_sem);
84 |
85 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.19-02-vmblock-path.patch:
--------------------------------------------------------------------------------
1 | Sources:
2 | https://531682.bugs.gentoo.org/attachment.cgi?id=396484
3 | https://531682.bugs.gentoo.org/attachment.cgi?id=396482
4 | diff -rupN vmblock-only.orig/linux/dentry.c vmblock-only/linux/dentry.c
5 | --- vmblock-only.orig/linux/dentry.c 2015-02-14 18:05:46.000000000 -0500
6 | +++ vmblock-only/linux/dentry.c 2015-02-14 18:09:59.000000000 -0500
7 | @@ -63,7 +63,7 @@ DentryOpRevalidate(struct dentry *dentry
8 | unsigned int flags) // IN: lookup flags & intent
9 | {
10 | VMBlockInodeInfo *iinfo;
11 | - struct nameidata actualNd;
12 | + struct path actualNd;
13 | struct dentry *actualDentry;
14 | int ret;
15 |
16 | diff -rupN vmblock-only.orig/linux/filesystem.c vmblock-only/linux/filesystem.c
17 | --- vmblock-only.orig/linux/filesystem.c 2014-11-20 19:29:15.000000000 -0500
18 | +++ vmblock-only/linux/filesystem.c 2015-02-14 18:10:49.000000000 -0500
19 | @@ -322,7 +322,7 @@ Iget(struct super_block *sb, // IN: f
20 | {
21 | VMBlockInodeInfo *iinfo;
22 | struct inode *inode;
23 | - struct nameidata actualNd;
24 | + struct path actualNd;
25 |
26 | ASSERT(sb);
27 |
28 | diff -rupN vmblock-only.orig/shared/compat_namei.h vmblock-only/shared/compat_namei.h
29 | --- vmblock-only.orig/shared/compat_namei.h 2014-11-20 19:29:15.000000000 -0500
30 | +++ vmblock-only/shared/compat_namei.h 2015-02-14 18:08:38.000000000 -0500
31 | @@ -26,21 +26,21 @@
32 | * struct. They were both replaced with a struct path.
33 | */
34 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
35 | -#define compat_vmw_nd_to_dentry(nd) (nd).path.dentry
36 | +#define compat_vmw_nd_to_dentry(nd) (nd).dentry
37 | #else
38 | #define compat_vmw_nd_to_dentry(nd) (nd).dentry
39 | #endif
40 |
41 | /* In 2.6.25-rc2, path_release(&nd) was replaced with path_put(&nd.path). */
42 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
43 | -#define compat_path_release(nd) path_put(&(nd)->path)
44 | +#define compat_path_release(nd) path_put(nd)
45 | #else
46 | #define compat_path_release(nd) path_release(nd)
47 | #endif
48 |
49 | /* path_lookup was removed in 2.6.39 merge window VFS merge */
50 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
51 | -#define compat_path_lookup(name, flags, nd) kern_path(name, flags, &((nd)->path))
52 | +#define compat_path_lookup(name, flags, nd) kern_path(name, flags, nd)
53 | #else
54 | #define compat_path_lookup(name, flags, nd) path_lookup(name, flags, nd)
55 | #endif
56 | diff -u vmblock-only.orig/linux/file.c vmblock-only/linux/file.c
57 | --- vmblock-only.orig/linux/file.c 2015-02-11 12:18:29.000000000 -0500
58 | +++ vmblock-only/linux/file.c 2015-02-11 12:41:41.000000000 -0500
59 | @@ -92,7 +92,7 @@
60 | * and that would try to acquire the inode's semaphore; if the two inodes
61 | * are the same we'll deadlock.
62 | */
63 | - if (actualFile->f_dentry && inode == actualFile->f_dentry->d_inode) {
64 | + if (actualFile->f_path.dentry && inode == actualFile->f_path.dentry->d_inode) {
65 | Warning("FileOpOpen: identical inode encountered, open cannot succeed.\n");
66 | if (filp_close(actualFile, current->files) < 0) {
67 | Warning("FileOpOpen: unable to close opened file.\n");
68 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.19-02-vmblock-path.patch:
--------------------------------------------------------------------------------
1 | Sources:
2 | https://531682.bugs.gentoo.org/attachment.cgi?id=396484
3 | https://531682.bugs.gentoo.org/attachment.cgi?id=396482
4 | diff -rupN vmblock-only.orig/linux/dentry.c vmblock-only/linux/dentry.c
5 | --- vmblock-only.orig/linux/dentry.c 2015-02-14 18:05:46.000000000 -0500
6 | +++ vmblock-only/linux/dentry.c 2015-02-14 18:09:59.000000000 -0500
7 | @@ -63,7 +63,7 @@ DentryOpRevalidate(struct dentry *dentry
8 | unsigned int flags) // IN: lookup flags & intent
9 | {
10 | VMBlockInodeInfo *iinfo;
11 | - struct nameidata actualNd;
12 | + struct path actualNd;
13 | struct dentry *actualDentry;
14 | int ret;
15 |
16 | diff -rupN vmblock-only.orig/linux/filesystem.c vmblock-only/linux/filesystem.c
17 | --- vmblock-only.orig/linux/filesystem.c 2014-11-20 19:29:15.000000000 -0500
18 | +++ vmblock-only/linux/filesystem.c 2015-02-14 18:10:49.000000000 -0500
19 | @@ -322,7 +322,7 @@ Iget(struct super_block *sb, // IN: f
20 | {
21 | VMBlockInodeInfo *iinfo;
22 | struct inode *inode;
23 | - struct nameidata actualNd;
24 | + struct path actualNd;
25 |
26 | ASSERT(sb);
27 |
28 | diff -rupN vmblock-only.orig/shared/compat_namei.h vmblock-only/shared/compat_namei.h
29 | --- vmblock-only.orig/shared/compat_namei.h 2014-11-20 19:29:15.000000000 -0500
30 | +++ vmblock-only/shared/compat_namei.h 2015-02-14 18:08:38.000000000 -0500
31 | @@ -26,21 +26,21 @@
32 | * struct. They were both replaced with a struct path.
33 | */
34 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
35 | -#define compat_vmw_nd_to_dentry(nd) (nd).path.dentry
36 | +#define compat_vmw_nd_to_dentry(nd) (nd).dentry
37 | #else
38 | #define compat_vmw_nd_to_dentry(nd) (nd).dentry
39 | #endif
40 |
41 | /* In 2.6.25-rc2, path_release(&nd) was replaced with path_put(&nd.path). */
42 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
43 | -#define compat_path_release(nd) path_put(&(nd)->path)
44 | +#define compat_path_release(nd) path_put(nd)
45 | #else
46 | #define compat_path_release(nd) path_release(nd)
47 | #endif
48 |
49 | /* path_lookup was removed in 2.6.39 merge window VFS merge */
50 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
51 | -#define compat_path_lookup(name, flags, nd) kern_path(name, flags, &((nd)->path))
52 | +#define compat_path_lookup(name, flags, nd) kern_path(name, flags, nd)
53 | #else
54 | #define compat_path_lookup(name, flags, nd) path_lookup(name, flags, nd)
55 | #endif
56 | diff -u vmblock-only.orig/linux/file.c vmblock-only/linux/file.c
57 | --- vmblock-only.orig/linux/file.c 2015-02-11 12:18:29.000000000 -0500
58 | +++ vmblock-only/linux/file.c 2015-02-11 12:41:41.000000000 -0500
59 | @@ -92,7 +92,7 @@
60 | * and that would try to acquire the inode's semaphore; if the two inodes
61 | * are the same we'll deadlock.
62 | */
63 | - if (actualFile->f_dentry && inode == actualFile->f_dentry->d_inode) {
64 | + if (actualFile->f_path.dentry && inode == actualFile->f_path.dentry->d_inode) {
65 | Warning("FileOpOpen: identical inode encountered, open cannot succeed.\n");
66 | if (filp_close(actualFile, current->files) < 0) {
67 | Warning("FileOpOpen: unable to close opened file.\n");
68 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-3.10-01-inode.patch:
--------------------------------------------------------------------------------
1 | Minor change the API, now it just gets passed flags instead of a pointer to the nameidata
2 | Properly initializes UID/GID with repsect to namespaces
3 | Some changes the readlink/setlink APIs
4 | --- a/vmblock-only/linux/inode.c 2015-02-07 03:11:55.000000000 +0300
5 | +++ c/vmblock-only/linux/inode.c 2015-02-24 03:58:06.039605762 +0300
6 | @@ -35,9 +35,15 @@
7 |
8 |
9 | /* Inode operations */
10 | -static struct dentry *InodeOpLookup(struct inode *dir,
11 | - struct dentry *dentry, struct nameidata *nd);
12 | +
13 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
14 | +static struct dentry *InodeOpLookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd);
15 | static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
16 | +#else
17 | +static struct dentry *InodeOpLookup(struct inode *, struct dentry *, unsigned int);
18 | +static int InodeOpReadlink(struct dentry *, char __user *, int);
19 | +#endif
20 | +
21 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
22 | static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
23 | #else
24 | @@ -49,12 +55,15 @@
25 | .lookup = InodeOpLookup,
26 | };
27 |
28 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
29 | static struct inode_operations LinkInodeOps = {
30 | +#else
31 | +struct inode_operations LinkInodeOps = {
32 | +#endif
33 | .readlink = InodeOpReadlink,
34 | .follow_link = InodeOpFollowlink,
35 | };
36 |
37 | -
38 | /*
39 | *----------------------------------------------------------------------------
40 | *
41 | @@ -75,7 +84,11 @@
42 | static struct dentry *
43 | InodeOpLookup(struct inode *dir, // IN: parent directory's inode
44 | struct dentry *dentry, // IN: dentry to lookup
45 | - struct nameidata *nd) // IN: lookup intent and information
46 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
47 | + struct nameidata *nd) // IN: lookup intent and information
48 | +#else
49 | + unsigned int flags)
50 | +#endif
51 | {
52 | char *filename;
53 | struct inode *inode;
54 | @@ -135,7 +148,12 @@
55 | inode->i_size = INODE_TO_IINFO(inode)->nameLen;
56 | inode->i_version = 1;
57 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
58 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
59 | inode->i_uid = inode->i_gid = 0;
60 | +#else
61 | + inode->i_gid = make_kgid(current_user_ns(), 0);
62 | + inode->i_uid = make_kuid(current_user_ns(), 0);
63 | +#endif
64 | inode->i_op = &LinkInodeOps;
65 |
66 | d_add(dentry, inode);
67 | @@ -177,7 +195,12 @@
68 | return -EINVAL;
69 | }
70 |
71 | - return vfs_readlink(dentry, buffer, buflen, iinfo->name);
72 | +#if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 14, 99)
73 | + return vfs_readlink(dentry, buffer, buflen, iinfo->name);
74 | +#else
75 | + return readlink_copy(buffer, buflen, iinfo->name);
76 | +#endif
77 | +
78 | }
79 |
80 |
81 | @@ -221,7 +244,7 @@
82 | goto out;
83 | }
84 |
85 | - ret = vfs_follow_link(nd, iinfo->name);
86 | + nd_set_link(nd, iinfo->name);
87 |
88 | out:
89 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
90 | @@ -230,3 +253,4 @@
91 | return ret;
92 | #endif
93 | }
94 | +
95 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-3.10-01-inode.patch:
--------------------------------------------------------------------------------
1 | Minor change the API, now it just gets passed flags instead of a pointer to the nameidata
2 | Properly initializes UID/GID with repsect to namespaces
3 | Some changes the readlink/setlink APIs
4 | --- a/vmblock-only/linux/inode.c 2015-02-07 03:11:55.000000000 +0300
5 | +++ c/vmblock-only/linux/inode.c 2015-02-24 03:58:06.039605762 +0300
6 | @@ -35,9 +35,15 @@
7 |
8 |
9 | /* Inode operations */
10 | -static struct dentry *InodeOpLookup(struct inode *dir,
11 | - struct dentry *dentry, struct nameidata *nd);
12 | +
13 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
14 | +static struct dentry *InodeOpLookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd);
15 | static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
16 | +#else
17 | +static struct dentry *InodeOpLookup(struct inode *, struct dentry *, unsigned int);
18 | +static int InodeOpReadlink(struct dentry *, char __user *, int);
19 | +#endif
20 | +
21 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
22 | static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
23 | #else
24 | @@ -49,12 +55,15 @@
25 | .lookup = InodeOpLookup,
26 | };
27 |
28 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
29 | static struct inode_operations LinkInodeOps = {
30 | +#else
31 | +struct inode_operations LinkInodeOps = {
32 | +#endif
33 | .readlink = InodeOpReadlink,
34 | .follow_link = InodeOpFollowlink,
35 | };
36 |
37 | -
38 | /*
39 | *----------------------------------------------------------------------------
40 | *
41 | @@ -75,7 +84,11 @@
42 | static struct dentry *
43 | InodeOpLookup(struct inode *dir, // IN: parent directory's inode
44 | struct dentry *dentry, // IN: dentry to lookup
45 | - struct nameidata *nd) // IN: lookup intent and information
46 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
47 | + struct nameidata *nd) // IN: lookup intent and information
48 | +#else
49 | + unsigned int flags)
50 | +#endif
51 | {
52 | char *filename;
53 | struct inode *inode;
54 | @@ -135,7 +148,12 @@
55 | inode->i_size = INODE_TO_IINFO(inode)->nameLen;
56 | inode->i_version = 1;
57 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
58 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
59 | inode->i_uid = inode->i_gid = 0;
60 | +#else
61 | + inode->i_gid = make_kgid(current_user_ns(), 0);
62 | + inode->i_uid = make_kuid(current_user_ns(), 0);
63 | +#endif
64 | inode->i_op = &LinkInodeOps;
65 |
66 | d_add(dentry, inode);
67 | @@ -177,7 +195,12 @@
68 | return -EINVAL;
69 | }
70 |
71 | - return vfs_readlink(dentry, buffer, buflen, iinfo->name);
72 | +#if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 14, 99)
73 | + return vfs_readlink(dentry, buffer, buflen, iinfo->name);
74 | +#else
75 | + return readlink_copy(buffer, buflen, iinfo->name);
76 | +#endif
77 | +
78 | }
79 |
80 |
81 | @@ -221,7 +244,7 @@
82 | goto out;
83 | }
84 |
85 | - ret = vfs_follow_link(nd, iinfo->name);
86 | + nd_set_link(nd, iinfo->name);
87 |
88 | out:
89 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
90 | @@ -230,3 +253,4 @@
91 | return ret;
92 | #endif
93 | }
94 | +
95 |
--------------------------------------------------------------------------------
/app-emulation/vmware-vix/vmware-vix-1.11.4.744019.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2016 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | EAPI="4"
5 |
6 | inherit eutils versionator vmware-bundle
7 |
8 | MY_PN="VMware-VIX"
9 | MY_PV="$(replace_version_separator 3 - $PV)"
10 | MY_P="${MY_PN}-${MY_PV}"
11 |
12 | DESCRIPTION="VMware VIX API for Linux"
13 | HOMEPAGE="http://www.vmware.com/support/developer/vix-api/"
14 | SRC_URI="
15 | x86? ( ${MY_P}.i386.bundle )
16 | amd64? ( ${MY_P}.x86_64.bundle )
17 | "
18 |
19 | LICENSE="vmware"
20 | SLOT="0"
21 | KEYWORDS="-* ~amd64 ~x86"
22 | IUSE="doc"
23 | RESTRICT="fetch mirror strip"
24 |
25 | # vmware-workstation should not use virtual/libc as this is a
26 | # precompiled binary package thats linked to glibc.
27 | RDEPEND="
28 | dev-libs/glib:2
29 | dev-libs/libxml2
30 | =dev-libs/openssl-0.9.8*
31 | net-misc/curl
32 | sys-libs/glibc
33 | sys-libs/zlib
34 | !app-emulation/vmware-workstation"
35 |
36 | S=${WORKDIR}
37 | VM_INSTALL_DIR="/opt/vmware"
38 |
39 | pkg_nofetch() {
40 | local bundle
41 |
42 | if use x86; then
43 | bundle="${MY_P}.i386.bundle"
44 | elif use amd64; then
45 | bundle="${MY_P}.x86_64.bundle"
46 | fi
47 |
48 | einfo "Please download ${bundle}"
49 | einfo "from ${HOMEPAGE}"
50 | einfo "and place it in ${DISTDIR}"
51 | }
52 |
53 | src_unpack() {
54 | local component; for component in \
55 | vmware-vix \
56 | vmware-vix-core \
57 | vmware-vix-lib-Workstation800andvSphere500
58 | #vmware-vix-legacy \
59 | do
60 | vmware-bundle_extract-bundle-component "${DISTDIR}/${A}" "${component}" "${S}"
61 | done
62 | }
63 |
64 | src_install() {
65 | # install the binary
66 | into "${VM_INSTALL_DIR}"
67 | dobin bin/*
68 |
69 | # install the libraries
70 | insinto "${VM_INSTALL_DIR}"/lib/vmware-vix
71 | doins -r lib/*
72 |
73 | dosym vmware-vix/libvixAllProducts.so "${VM_INSTALL_DIR}"/lib/libbvixAllProducts.so
74 |
75 | # install headers
76 | insinto /usr/include/vmware-vix
77 | doins include/*
78 |
79 | if use doc; then
80 | dohtml -r doc/*
81 | fi
82 |
83 | # fix permissions
84 | fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware-vix/setup/vmware-config
85 |
86 | # create the environment
87 | local envd="${T}/90${PN}"
88 | cat > "${envd}" <<-EOF
89 | PATH='${VM_INSTALL_DIR}/bin'
90 | ROOTPATH='${VM_INSTALL_DIR}/bin'
91 | EOF
92 | doenvd "${envd}"
93 |
94 | # create the configuration
95 | dodir /etc/vmware
96 |
97 | local vmconfig="${T}/config"
98 | if [[ -e ${ROOT}/etc/vmware/config ]]
99 | then
100 | cp -a "${ROOT}"/etc/vmware/config "${vmconfig}"
101 | sed -i -e "/vmware.fullpath/d" "${vmconfig}"
102 | sed -i -e "/vix.libdir/d" "${vmconfig}"
103 | sed -i -e "/vix.config.version/d" "${vmconfig}"
104 | fi
105 |
106 | cat >> "${vmconfig}" <<-EOF
107 | vmware.fullpath = "${VM_INSTALL_DIR}/bin/vmware"
108 | vix.libdir = "${VM_INSTALL_DIR}/lib/vmware-vix"
109 | vix.config.version = "1"
110 | EOF
111 |
112 | insinto /etc/vmware/
113 | doins "${vmconfig}"
114 | }
115 |
116 | pkg_postinst() {
117 | ewarn "/etc/env.d was updated. Please run:"
118 | ewarn "env-update && source /etc/profile"
119 | }
120 |
121 | pkg_prerm() {
122 | sed -i -e "/vix.libdir/d" "${ROOT}"/etc/vmware/config
123 | }
124 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-hardened.patch:
--------------------------------------------------------------------------------
1 | diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
2 | index b21dd44..960c2aa 100644
3 | --- a/vmmon-only/linux/driver.c
4 | +++ b/vmmon-only/linux/driver.c
5 | @@ -178,7 +178,16 @@ static struct vm_operations_struct vmuser_mops = {
6 | #endif
7 | };
8 |
9 | -static struct file_operations vmuser_fops;
10 | +static struct file_operations vmuser_fops = {
11 | + .owner = THIS_MODULE,
12 | + .poll = LinuxDriverPoll,
13 | + .unlocked_ioctl = LinuxDriver_Ioctl,
14 | + .compat_ioctl = LinuxDriver_Ioctl,
15 | + .open = LinuxDriver_Open,
16 | + .release = LinuxDriver_Close,
17 | + .mmap = LinuxDriverMmap
18 | +};
19 | +
20 | static struct timer_list tscTimer;
21 | static Atomic_uint32 tsckHz;
22 | static VmTimeStart tsckHzStartTime;
23 | @@ -357,21 +372,6 @@ init_module(void)
24 | linuxState.fastClockPriority = -20;
25 | linuxState.swapSize = VMMON_UNKNOWN_SWAP_SIZE;
26 |
27 | - /*
28 | - * Initialize the file_operations structure. Because this code is always
29 | - * compiled as a module, this is fine to do it here and not in a static
30 | - * initializer.
31 | - */
32 | -
33 | - memset(&vmuser_fops, 0, sizeof vmuser_fops);
34 | - vmuser_fops.owner = THIS_MODULE;
35 | - vmuser_fops.poll = LinuxDriverPoll;
36 | - vmuser_fops.unlocked_ioctl = LinuxDriver_Ioctl;
37 | - vmuser_fops.compat_ioctl = LinuxDriver_Ioctl;
38 | - vmuser_fops.open = LinuxDriver_Open;
39 | - vmuser_fops.release = LinuxDriver_Close;
40 | - vmuser_fops.mmap = LinuxDriverMmap;
41 | -
42 | #ifdef VMX86_DEVEL
43 | devel_init_module();
44 | linuxState.minor = 0;
45 | diff --git a/vmnet-only/driver.c b/vmnet-only/driver.c
46 | index b12b982..40bd4cf 100644
47 | --- a/vmnet-only/driver.c
48 | +++ b/vmnet-only/driver.c
49 | @@ -165,7 +165,16 @@ static long VNetFileOpUnlockedIoctl(struct file * filp,
50 | unsigned int iocmd, unsigned long ioarg);
51 | #endif
52 |
53 | -static struct file_operations vnetFileOps;
54 | +static struct file_operations vnetFileOps = {
55 | + .owner = THIS_MODULE,
56 | + .read = VNetFileOpRead,
57 | + .write = VNetFileOpWrite,
58 | + .poll = VNetFileOpPoll,
59 | + .unlocked_ioctl = VNetFileOpUnlockedIoctl,
60 | + .compat_ioctl = VNetFileOpUnlockedIoctl,
61 | + .open = VNetFileOpOpen,
62 | + .release = VNetFileOpClose
63 | +};
64 |
65 | /*
66 | * Utility functions
67 | @@ -476,22 +491,6 @@ init_module(void)
68 | goto err_proto;
69 | }
70 |
71 | - /*
72 | - * Initialize the file_operations structure. Because this code is always
73 | - * compiled as a module, this is fine to do it here and not in a static
74 | - * initializer.
75 | - */
76 | -
77 | - memset(&vnetFileOps, 0, sizeof vnetFileOps);
78 | - vnetFileOps.owner = THIS_MODULE;
79 | - vnetFileOps.read = VNetFileOpRead;
80 | - vnetFileOps.write = VNetFileOpWrite;
81 | - vnetFileOps.poll = VNetFileOpPoll;
82 | - vnetFileOps.unlocked_ioctl = VNetFileOpUnlockedIoctl;
83 | - vnetFileOps.compat_ioctl = VNetFileOpUnlockedIoctl;
84 | - vnetFileOps.open = VNetFileOpOpen;
85 | - vnetFileOps.release = VNetFileOpClose;
86 | -
87 | retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps);
88 | if (retval) {
89 | LOG(0, (KERN_NOTICE "/dev/vmnet: could not register major device %d\n",
90 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.01-00-vsock.patch:
--------------------------------------------------------------------------------
1 | --- vsock-only/linux/af_vsock.c 2015-05-03 00:55:58.955156116 +0200
2 | +++ vsock-only/linux/af_vsock.c.new 2015-05-03 01:01:14.305173750 +0200
3 | @@ -233,14 +233,10 @@
4 | static int VSockVmciStreamGetsockopt(struct socket *sock, int level, int optname,
5 | char __user *optval, int __user * optlen);
6 |
7 | -static int VSockVmciDgramSendmsg(struct kiocb *kiocb,
8 | - struct socket *sock, struct msghdr *msg, size_t len);
9 | -static int VSockVmciDgramRecvmsg(struct kiocb *kiocb, struct socket *sock,
10 | - struct msghdr *msg, size_t len, int flags);
11 | -static int VSockVmciStreamSendmsg(struct kiocb *kiocb,
12 | - struct socket *sock, struct msghdr *msg, size_t len);
13 | -static int VSockVmciStreamRecvmsg(struct kiocb *kiocb, struct socket *sock,
14 | - struct msghdr *msg, size_t len, int flags);
15 | +static int VSockVmciDgramSendmsg(struct socket *sock, struct msghdr *msg, size_t len);
16 | +static int VSockVmciDgramRecvmsg(struct socket *sock, struct msghdr *msg, size_t len, int flags);
17 | +static int VSockVmciStreamSendmsg(struct socket *sock, struct msghdr *msg, size_t len);
18 | +static int VSockVmciStreamRecvmsg(struct socket *sock, struct msghdr *msg, size_t len, int flags);
19 |
20 | static int VSockVmciCreate(
21 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
22 | @@ -4211,8 +4207,7 @@
23 | */
24 |
25 | static int
26 | -VSockVmciDgramSendmsg(struct kiocb *kiocb, // UNUSED
27 | - struct socket *sock, // IN: socket to send on
28 | +VSockVmciDgramSendmsg(struct socket *sock, // IN: socket to send on
29 | struct msghdr *msg, // IN: message to send
30 | size_t len) // IN: length of message
31 | {
32 | @@ -4541,8 +4536,7 @@
33 | */
34 |
35 | static int
36 | -VSockVmciStreamSendmsg(struct kiocb *kiocb, // UNUSED
37 | - struct socket *sock, // IN: socket to send on
38 | +VSockVmciStreamSendmsg(struct socket *sock, // IN: socket to send on
39 | struct msghdr *msg, // IN: message to send
40 | size_t len) // IN: length of message
41 | {
42 | @@ -4710,8 +4704,7 @@
43 | */
44 |
45 | static int
46 | -VSockVmciDgramRecvmsg(struct kiocb *kiocb, // UNUSED
47 | - struct socket *sock, // IN: socket to receive from
48 | +VSockVmciDgramRecvmsg(struct socket *sock, // IN: socket to receive from
49 | struct msghdr *msg, // IN/OUT: message to receive into
50 | size_t len, // IN: length of receive buffer
51 | int flags) // IN: receive flags
52 | @@ -4803,8 +4796,7 @@
53 | */
54 |
55 | static int
56 | -VSockVmciStreamRecvmsg(struct kiocb *kiocb, // UNUSED
57 | - struct socket *sock, // IN: socket to receive from
58 | +VSockVmciStreamRecvmsg(struct socket *sock, // IN: socket to receive from
59 | struct msghdr *msg, // IN/OUT: message to receive into
60 | size_t len, // IN: length of receive buffer
61 | int flags) // IN: receive flags
62 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-4.15-00-init_timer.patch:
--------------------------------------------------------------------------------
1 | --- vmmon-only/linux/hostif.c 2017-12-04 23:49:53.485615520 +0100
2 | +++ vmmon-only/linux/hostif.c.orig 2017-12-04 23:54:13.982630086 +0100
3 | @@ -1780,7 +1780,11 @@
4 | */
5 |
6 | static void
7 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
8 | +HostIFUptimeResyncMono(struct timer_list *data) // IN: ignored
9 | +#else
10 | HostIFUptimeResyncMono(unsigned long data) // IN: ignored
11 | +#endif
12 | {
13 | unsigned long jifs;
14 | uintptr_t flags;
15 | @@ -1842,8 +1846,12 @@
16 | -(tv.tv_usec * (UPTIME_FREQ / 1000000) +
17 | tv.tv_sec * UPTIME_FREQ));
18 |
19 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
20 | + timer_setup(&uptimeState.timer, HostIFUptimeResyncMono, 0);
21 | +#else
22 | init_timer(&uptimeState.timer);
23 | uptimeState.timer.function = HostIFUptimeResyncMono;
24 | +#endif
25 | mod_timer(&uptimeState.timer, jiffies + HZ);
26 | }
27 |
28 | --- vmmon-only/linux/driver.c 2017-12-04 23:49:53.061615496 +0100
29 | +++ vmmon-only/linux/driver.c.orig 2017-12-04 23:53:26.086627408 +0100
30 | @@ -115,7 +115,11 @@
31 | #endif
32 | static int LinuxDriverMmap(struct file *filp, struct vm_area_struct *vma);
33 |
34 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
35 | +static void LinuxDriverPollTimeout(struct timer_list *clientData);
36 | +#else
37 | static void LinuxDriverPollTimeout(unsigned long clientData);
38 | +#endif
39 | static unsigned int LinuxDriverEstimateTSCkHz(void);
40 |
41 | static struct vm_operations_struct vmuser_mops = {
42 | @@ -227,7 +231,11 @@
43 | *----------------------------------------------------------------------
44 | */
45 | static void
46 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
47 | +LinuxDriverEstimateTSCkHzDeferred(struct timer_list *data)
48 | +#else
49 | LinuxDriverEstimateTSCkHzDeferred(unsigned long data)
50 | +#endif
51 | {
52 | LinuxDriverEstimateTSCkHz();
53 | }
54 | @@ -265,9 +273,11 @@
55 | }
56 |
57 | Vmx86_ReadTSCAndUptime(&tsckHzStartTime);
58 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
59 | tscTimer.function = LinuxDriverEstimateTSCkHzDeferred;
60 | - tscTimer.expires = jiffies + 4 * HZ;
61 | tscTimer.data = 0;
62 | +#endif
63 | + tscTimer.expires = jiffies + 4 * HZ;
64 | add_timer(&tscTimer);
65 | }
66 |
67 | @@ -309,9 +319,14 @@
68 | */
69 |
70 | init_waitqueue_head(&linuxState.pollQueue);
71 | +
72 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
73 | + timer_setup(&linuxState.pollTimer, LinuxDriverPollTimeout, 0);
74 | +#else
75 | init_timer(&linuxState.pollTimer);
76 | linuxState.pollTimer.data = 0;
77 | linuxState.pollTimer.function = LinuxDriverPollTimeout;
78 | +#endif
79 |
80 | linuxState.fastClockThread = NULL;
81 | linuxState.fastClockFile = NULL;
82 | @@ -360,7 +375,11 @@
83 | linuxState.deviceName, linuxState.major, linuxState.minor);
84 |
85 | HostIF_InitUptime();
86 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
87 | + timer_setup(&tscTimer, LinuxDriverEstimateTSCkHzDeferred, 0UL);
88 | +#else
89 | init_timer(&tscTimer);
90 | +#endif
91 | LinuxDriverInitTSCkHz();
92 | Vmx86_InitIDList();
93 |
94 | @@ -858,7 +877,11 @@
95 | */
96 |
97 | static void
98 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
99 | +LinuxDriverPollTimeout(struct timer_list *clientData) // IN:
100 | +#else
101 | LinuxDriverPollTimeout(unsigned long clientData) // IN:
102 | +#endif
103 | {
104 | LinuxDriverWakeUp(FALSE);
105 | }
106 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-hardened.patch:
--------------------------------------------------------------------------------
1 | diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
2 | index b21dd44..960c2aa 100644
3 | --- a/vmmon-only/linux/driver.c
4 | +++ b/vmmon-only/linux/driver.c
5 | @@ -178,7 +178,22 @@ static struct vm_operations_struct vmuser_mops = {
6 | #endif
7 | };
8 |
9 | -static struct file_operations vmuser_fops;
10 | +static struct file_operations vmuser_fops = {
11 | + .owner = THIS_MODULE,
12 | + .poll = LinuxDriverPoll,
13 | +#ifdef HAVE_UNLOCKED_IOCTL
14 | + .unlocked_ioctl = LinuxDriver_UnlockedIoctl,
15 | +#else
16 | + .ioctl = LinuxDriver_Ioctl,
17 | +#endif
18 | +#ifdef HAVE_COMPAT_IOCTL
19 | + .compat_ioctl = LinuxDriver_UnlockedIoctl,
20 | +#endif
21 | + .open = LinuxDriver_Open,
22 | + .release = LinuxDriver_Close,
23 | + .mmap = LinuxDriverMmap
24 | +};
25 | +
26 | static struct timer_list tscTimer;
27 |
28 | /*
29 | @@ -357,27 +372,6 @@ init_module(void)
30 | spin_lock_init(&linuxState.pollListLock);
31 | #endif
32 |
33 | - /*
34 | - * Initialize the file_operations structure. Because this code is always
35 | - * compiled as a module, this is fine to do it here and not in a static
36 | - * initializer.
37 | - */
38 | -
39 | - memset(&vmuser_fops, 0, sizeof vmuser_fops);
40 | - vmuser_fops.owner = THIS_MODULE;
41 | - vmuser_fops.poll = LinuxDriverPoll;
42 | -#ifdef HAVE_UNLOCKED_IOCTL
43 | - vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
44 | -#else
45 | - vmuser_fops.ioctl = LinuxDriver_Ioctl;
46 | -#endif
47 | -#ifdef HAVE_COMPAT_IOCTL
48 | - vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl;
49 | -#endif
50 | - vmuser_fops.open = LinuxDriver_Open;
51 | - vmuser_fops.release = LinuxDriver_Close;
52 | - vmuser_fops.mmap = LinuxDriverMmap;
53 | -
54 | #ifdef VMX86_DEVEL
55 | devel_init_module();
56 | linuxState.minor = 0;
57 | diff --git a/vmnet-only/driver.c b/vmnet-only/driver.c
58 | index b12b982..40bd4cf 100644
59 | --- a/vmnet-only/driver.c
60 | +++ b/vmnet-only/driver.c
61 | @@ -165,7 +165,22 @@ static long VNetFileOpUnlockedIoctl(struct file * filp,
62 | unsigned int iocmd, unsigned long ioarg);
63 | #endif
64 |
65 | -static struct file_operations vnetFileOps;
66 | +static struct file_operations vnetFileOps = {
67 | + .owner = THIS_MODULE,
68 | + .read = VNetFileOpRead,
69 | + .write = VNetFileOpWrite,
70 | + .poll = VNetFileOpPoll,
71 | +#ifdef HAVE_UNLOCKED_IOCTL
72 | + .unlocked_ioctl = VNetFileOpUnlockedIoctl,
73 | +#else
74 | + .ioctl = VNetFileOpIoctl,
75 | +#endif
76 | +#ifdef HAVE_COMPAT_IOCTL
77 | + .compat_ioctl = VNetFileOpUnlockedIoctl,
78 | +#endif
79 | + .open = VNetFileOpOpen,
80 | + .release = VNetFileOpClose
81 | +};
82 |
83 | /*
84 | * Utility functions
85 | @@ -476,22 +491,6 @@ init_module(void)
86 | goto err_proto;
87 | }
88 |
89 | - /*
90 | - * Initialize the file_operations structure. Because this code is always
91 | - * compiled as a module, this is fine to do it here and not in a static
92 | - * initializer.
93 | - */
94 | -
95 | - memset(&vnetFileOps, 0, sizeof vnetFileOps);
96 | - vnetFileOps.owner = THIS_MODULE;
97 | - vnetFileOps.read = VNetFileOpRead;
98 | - vnetFileOps.write = VNetFileOpWrite;
99 | - vnetFileOps.poll = VNetFileOpPoll;
100 | - vnetFileOps.unlocked_ioctl = VNetFileOpUnlockedIoctl;
101 | - vnetFileOps.compat_ioctl = VNetFileOpUnlockedIoctl;
102 | - vnetFileOps.open = VNetFileOpOpen;
103 | - vnetFileOps.release = VNetFileOpClose;
104 | -
105 | retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps);
106 | if (retval) {
107 | LOG(0, (KERN_NOTICE "/dev/vmnet: could not register major device %d\n",
108 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/304-4.2-02-vsock.patch:
--------------------------------------------------------------------------------
1 | diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c
2 | --- vsock-only/linux/af_vsock.c 2016-03-16 21:31:24.582040320 -0400
3 | +++ vsock-only.new/linux/af_vsock.c 2016-03-16 21:37:22.140045067 -0400
4 | @@ -231,7 +231,16 @@ static int VSockVmciStreamSetsockopt(str
5 |
6 | static int VSockVmciStreamGetsockopt(struct socket *sock, int level, int optname,
7 | char __user *optval, int __user * optlen);
8 | -
9 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
10 | +static int VSockVmciDgramSendmsg(
11 | + struct socket *sock, struct msghdr *msg, size_t len);
12 | +static int VSockVmciDgramRecvmsg(struct socket *sock,
13 | + struct msghdr *msg, size_t len, int flags);
14 | +static int VSockVmciStreamSendmsg(
15 | + struct socket *sock, struct msghdr *msg, size_t len);
16 | +static int VSockVmciStreamRecvmsg(struct socket *sock,
17 | + struct msghdr *msg, size_t len, int flags);
18 | +#else
19 | static int VSockVmciDgramSendmsg(struct kiocb *kiocb,
20 | struct socket *sock, struct msghdr *msg, size_t len);
21 | static int VSockVmciDgramRecvmsg(struct kiocb *kiocb, struct socket *sock,
22 | @@ -240,6 +249,7 @@ static int VSockVmciStreamSendmsg(struct
23 | struct socket *sock, struct msghdr *msg, size_t len);
24 | static int VSockVmciStreamRecvmsg(struct kiocb *kiocb, struct socket *sock,
25 | struct msghdr *msg, size_t len, int flags);
26 | +#endif
27 |
28 | static int VSockVmciCreate(
29 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
30 | @@ -4210,7 +4220,11 @@ VSockVmciShutdown(struct socket *sock,
31 | */
32 |
33 | static int
34 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
35 | +VSockVmciDgramSendmsg(
36 | +#else
37 | VSockVmciDgramSendmsg(struct kiocb *kiocb, // UNUSED
38 | +#endif
39 | struct socket *sock, // IN: socket to send on
40 | struct msghdr *msg, // IN: message to send
41 | size_t len) // IN: length of message
42 | @@ -4540,7 +4554,11 @@ VSockVmciStreamGetsockopt(struct socket
43 | */
44 |
45 | static int
46 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
47 | +VSockVmciStreamSendmsg(
48 | +#else
49 | VSockVmciStreamSendmsg(struct kiocb *kiocb, // UNUSED
50 | +#endif
51 | struct socket *sock, // IN: socket to send on
52 | struct msghdr *msg, // IN: message to send
53 | size_t len) // IN: length of message
54 | @@ -4709,7 +4727,11 @@ out:
55 | */
56 |
57 | static int
58 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
59 | +VSockVmciDgramRecvmsg(
60 | +#else
61 | VSockVmciDgramRecvmsg(struct kiocb *kiocb, // UNUSED
62 | +#endif
63 | struct socket *sock, // IN: socket to receive from
64 | struct msghdr *msg, // IN/OUT: message to receive into
65 | size_t len, // IN: length of receive buffer
66 | @@ -4804,7 +4826,11 @@ out:
67 | */
68 |
69 | static int
70 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
71 | +VSockVmciStreamRecvmsg(
72 | +#else
73 | VSockVmciStreamRecvmsg(struct kiocb *kiocb, // UNUSED
74 | +#endif
75 | struct socket *sock, // IN: socket to receive from
76 | struct msghdr *msg, // IN/OUT: message to receive into
77 | size_t len, // IN: length of receive buffer
78 |
--------------------------------------------------------------------------------
/eclass/vmware-bundle.eclass:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2011 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | # @ECLASS: vmware-bundle.eclass
5 | # @MAINTAINER:
6 | # vmware@gentoo.org
7 | # @AUTHOR:
8 | # Matt Whitlock
9 | # @BLURB: Provides extract functionality for vmware products bundles
10 |
11 | DEPEND="dev-libs/libxslt"
12 |
13 | vmware-bundle_extract-bundle-component() {
14 | local bundle=${1:?} component=${2:?} dest=${3:-${2}}
15 | cat > "${T}"/list-bundle-components.xsl <<-EOF
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | EOF
30 | local -i bundle_size=$(stat -L -c'%s' "${bundle}")
31 | local -i bundle_manifestOffset=$(od -An -j$((bundle_size-36)) -N4 -tu4 "${bundle}")
32 | local -i bundle_manifestSize=$(od -An -j$((bundle_size-40)) -N4 -tu4 "${bundle}")
33 | local -i bundle_dataOffset=$(od -An -j$((bundle_size-44)) -N4 -tu4 "${bundle}")
34 | local -i bundle_dataSize=$(od -An -j$((bundle_size-52)) -N8 -tu8 "${bundle}")
35 | tail -c+$((bundle_manifestOffset+1)) "${bundle}" 2> /dev/null | head -c$((bundle_manifestSize)) |
36 | xsltproc "${T}"/list-bundle-components.xsl - |
37 | while read -r component_offset component_size component_name ; do
38 | if [[ ${component_name} == ${component} ]] ; then
39 | ebegin "Extracting '${component_name}' component from '$(basename "${bundle}")'"
40 | vmware-bundle_extract-component "${bundle}" "${dest}" $((bundle_dataOffset+component_offset))
41 | eend
42 | fi
43 | done
44 | }
45 |
46 | vmware-bundle_extract-component() {
47 | local component=${1:?} dest=${2:-.}
48 | local -i offset=${3}
49 | cat > "${T}"/list-component-files.xsl <<-EOF
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | EOF
66 | local -i component_manifestOffset=$(od -An -j$((offset+9)) -N4 -tu4 "${component}")
67 | local -i component_manifestSize=$(od -An -j$((offset+13)) -N4 -tu4 "${component}")
68 | local -i component_dataOffset=$(od -An -j$((offset+17)) -N4 -tu4 "${component}")
69 | local -i component_dataSize=$(od -An -j$((offset+21)) -N8 -tu8 "${component}")
70 | tail -c+$((offset+component_manifestOffset+1)) "${component}" 2> /dev/null |
71 | head -c$((component_manifestSize)) | xsltproc "${T}"/list-component-files.xsl - |
72 | while read -r file_offset file_compressedSize file_uncompressedSize file_path ; do
73 | if [[ ${file_path} ]] ; then
74 | file_path="${dest}/${file_path}"
75 | mkdir -p "$(dirname "${file_path}")" || die
76 | if [[ ${file_compressedSize} -gt 0 ]] ; then
77 | echo -n '.'
78 | tail -c+$((offset+component_dataOffset+file_offset+1)) "${component}" 2> /dev/null |
79 | head -c$((file_compressedSize)) | gzip -cd > "${file_path}" || die
80 | else
81 | echo -n 'x'
82 | fi
83 | fi
84 | done
85 | echo
86 | }
87 |
--------------------------------------------------------------------------------
/app-emulation/vmware-vsphere-cli/vmware-vsphere-cli-4.1.0.254719-r1.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2015 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | # Unlike many other binary packages the user doesn't need to agree to a licence
5 | # to download VMWare. The agreeing to a licence is part of the configure step
6 | # which the user must run manually.
7 |
8 | EAPI=5
9 |
10 | inherit eutils perl-module versionator
11 |
12 | MY_PV=$(replace_version_separator 3 '-' )
13 | MY_PN="VMware-vSphere-CLI-${MY_PV}"
14 |
15 | DESCRIPTION="VMware vSphere Command-Line Interface"
16 | HOMEPAGE="http://www.vmware.com/"
17 | SRC_URI=" x86? ( mirror://vmware/software/vmserver/${MY_PN}.i386.tar.gz )
18 | amd64? ( mirror://vmware/software/vmserver/${MY_PN}.x86_64.tar.gz ) "
19 |
20 | LICENSE="vmware"
21 | IUSE=""
22 | SLOT="0"
23 | KEYWORDS="-* ~x86 ~amd64"
24 | RESTRICT="strip"
25 |
26 | DEPEND="
27 | >=dev-lang/perl-5
28 | dev-libs/expat
29 | dev-libs/glib:2
30 | dev-libs/libxml2
31 | dev-libs/openssl:0.9.8
32 | dev-perl/Archive-Zip
33 | dev-perl/Class-MethodMaker
34 | dev-perl/Crypt-SSLeay
35 | dev-perl/Data-Dump
36 | dev-perl/Data-Dumper-Concise
37 | dev-perl/HTML-Parser
38 | dev-perl/SOAP-Lite
39 | dev-perl/URI
40 | dev-perl/Data-UUID
41 | dev-perl/XML-LibXML
42 | dev-perl/XML-NamespaceSupport
43 | dev-perl/XML-SAX
44 | dev-perl/libwww-perl
45 | dev-perl/libxml-perl
46 | virtual/perl-Compress-Raw-Zlib
47 | virtual/perl-IO-Compress
48 | virtual/perl-version
49 | sys-fs/e2fsprogs
50 | sys-libs/zlib"
51 | # !app-emulation/vmware-server
52 | # !app-emulation/vmware-vix
53 | # !app-emulation/vmware-workstation"
54 | RDEPEND="${DEPEND}"
55 |
56 | S=${WORKDIR}/${PN}-distrib
57 |
58 | pkg_setup() {
59 | if use x86; then
60 | MY_P="${MY_PN}.i386"
61 | elif use amd64; then
62 | MY_P="${MY_PN}.x86_64"
63 | fi
64 | }
65 |
66 | src_prepare() {
67 | VMWARE_GROUP=${VMWARE_GROUP:-vmware}
68 | VMWARE_INSTALL_DIR=/opt/${PN//-//}
69 |
70 | shortname="vcli"
71 | product="vmware-vcli"
72 | config_dir="/etc/vmware-vcli"
73 | product_name="vSphere CLI"
74 |
75 | enewgroup ${VMWARE_GROUP}
76 |
77 | sed -i.bak -e "s:/sbin/lsmod:/bin/lsmod:" "${S}"/installer/services.sh || die "sed of services"
78 |
79 | # We won't want any perl scripts from VMware
80 | rm -f *.pl bin/*.pl
81 | rm -f etc/installer.sh
82 |
83 | epatch "${FILESDIR}"/makefile.patch
84 |
85 | perl-module_src_prepare
86 | }
87 |
88 | src_install() {
89 | # We loop through our directories and copy everything to our system.
90 | for x in apps bin
91 | do
92 | if [[ -e "${S}"/${x} ]]
93 | then
94 | dodir "${VMWARE_INSTALL_DIR}"/${x}
95 | cp -pPR "${S}"/${x}/* "${D}""${VMWARE_INSTALL_DIR}"/${x} || die "copying ${x}"
96 | fi
97 | done
98 |
99 | perl-module_src_install
100 |
101 | # init script
102 | if [[ -e "${FILESDIR}/${PN}.rc" ]]
103 | then
104 | newinitd "${FILESDIR}"/${PN}.rc ${product}
105 | fi
106 |
107 | # create the environment
108 | local envd="${T}/90vmware-cli"
109 | cat > "${envd}" <<-EOF
110 | PATH='${VMWARE_INSTALL_DIR}/bin'
111 | ROOTPATH='${VMWARE_INSTALL_DIR}/bin'
112 | EOF
113 | doenvd "${envd}"
114 |
115 | # Last, we check for any mime files.
116 | if [[ -e "${FILESDIR}/${PN}.xml" ]]
117 | then
118 | insinto /usr/share/mime/packages
119 | doins "${FILESDIR}"/${PN}.xml
120 | fi
121 |
122 | if [[ -e doc/EULA ]]
123 | then
124 | insinto "${VMWARE_INSTALL_DIR}"/doc
125 | doins doc/EULA
126 | fi
127 |
128 | doman man/*
129 |
130 | # create the configuration
131 | #dodir "${config_dir}"
132 |
133 | }
134 |
135 | pkg_postinst() {
136 | [[ -d "${config_dir}" ]] && chown -R root:${VMWARE_GROUP} ${config_dir}
137 |
138 | ewarn "In order to run ${product_name}, you have to"
139 | ewarn "be in the '${VMWARE_GROUP}' group."
140 | }
141 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/files/308-5.00-02-do_gettimeofday.patch:
--------------------------------------------------------------------------------
1 | --- ./vmmon-only/linux/hostif.c 2019-03-21 23:45:15.452800836 +0100
2 | +++ ./vmmon-only/linux/hostif.c.new 2019-03-21 23:55:42.963849662 +0100
3 | @@ -1709,7 +1709,11 @@
4 | static uint64
5 | HostIFReadUptimeWork(unsigned long *j) // OUT: current jiffies
6 | {
7 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
8 | struct timeval tv;
9 | +#else
10 | + struct timespec64 ts;
11 | +#endif
12 | uint64 monotime, uptime, upBase, monoBase;
13 | int64 diff;
14 | uint32 version;
15 | @@ -1727,13 +1731,21 @@
16 | monoBase = uptimeState.monotimeBase;
17 | } while (!VersionedAtomic_EndTryRead(&uptimeState.version, version));
18 |
19 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
20 | do_gettimeofday(&tv);
21 | +#else
22 | + ktime_get_real_ts64(&ts);
23 | +#endif
24 | upBase = Atomic_Read64(&uptimeState.uptimeBase);
25 |
26 | monotime = (uint64)(jifs - jifBase) * (UPTIME_FREQ / HZ);
27 | monotime += monoBase;
28 |
29 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
30 | uptime = tv.tv_usec * (UPTIME_FREQ / 1000000) + tv.tv_sec * UPTIME_FREQ;
31 | +#else
32 | + uptime = ts.tv_nsec / NSEC_PER_USEC * (UPTIME_FREQ / 1000000) + ts.tv_sec * UPTIME_FREQ;
33 | +#endif
34 | uptime += upBase;
35 |
36 | /*
37 | @@ -1842,6 +1854,7 @@
38 | void
39 | HostIF_InitUptime(void)
40 | {
41 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
42 | struct timeval tv;
43 |
44 | uptimeState.jiffiesBase = jiffies;
45 | @@ -1849,6 +1862,15 @@
46 | Atomic_Write64(&uptimeState.uptimeBase,
47 | -(tv.tv_usec * (UPTIME_FREQ / 1000000) +
48 | tv.tv_sec * UPTIME_FREQ));
49 | +#else
50 | + struct timespec64 ts;
51 | +
52 | + uptimeState.jiffiesBase = jiffies;
53 | + ktime_get_real_ts64(&ts);
54 | + Atomic_Write64(&uptimeState.uptimeBase,
55 | + -(ts.tv_nsec / NSEC_PER_USEC * (UPTIME_FREQ / 1000000) +
56 | + ts.tv_sec * UPTIME_FREQ));
57 | +#endif
58 |
59 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
60 | timer_setup(&uptimeState.timer, HostIFUptimeResyncMono, 0);
61 | --- ./vmmon-only/linux/driver.c 2019-03-21 23:45:15.277800822 +0100
62 | +++ ./vmmon-only/linux/driver.c.new 2019-03-21 23:50:55.619827304 +0100
63 | @@ -760,14 +760,23 @@
64 | LinuxDriverWakeUp(Bool selective) // IN:
65 | {
66 | if (selective && linuxState.pollList != NULL) {
67 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
68 | struct timeval tv;
69 | +#else
70 | + struct timespec64 ts;
71 | +#endif
72 | VmTimeType now;
73 | VMLinux *p;
74 | VMLinux *next;
75 |
76 | HostIF_PollListLock(1);
77 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
78 | do_gettimeofday(&tv);
79 | now = tv.tv_sec * 1000000ULL + tv.tv_usec;
80 | +#else
81 | + ktime_get_real_ts64(&ts);
82 | + now = ts.tv_sec * 1000000ULL + ts.tv_nsec / NSEC_PER_USEC;
83 | +#endif
84 |
85 | for (p = linuxState.pollList; p != NULL; p = next) {
86 | next = p->pollForw;
87 | @@ -834,12 +843,21 @@
88 | }
89 | } else {
90 | if (linuxState.fastClockThread && vmLinux->pollTimeoutPtr != NULL) {
91 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
92 | struct timeval tv;
93 |
94 | do_gettimeofday(&tv);
95 | poll_wait(filp, &vmLinux->pollQueue, wait);
96 | vmLinux->pollTime = *vmLinux->pollTimeoutPtr +
97 | tv.tv_sec * 1000000ULL + tv.tv_usec;
98 | +#else
99 | + struct timespec64 ts;
100 | +
101 | + ktime_get_real_ts64(&ts);
102 | + poll_wait(filp, &vmLinux->pollQueue, wait);
103 | + vmLinux->pollTime = *vmLinux->pollTimeoutPtr +
104 | + ts.tv_sec * 1000000ULL + ts.tv_nsec / NSEC_PER_USEC;
105 | +#endif
106 | if (vmLinux->pollBack == NULL) {
107 | HostIF_PollListLock(2);
108 | if (vmLinux->pollBack == NULL) {
109 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/vmware-modules-304.4-r1.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2017 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | EAPI=5
5 |
6 | inherit eutils flag-o-matic linux-info linux-mod user versionator udev
7 |
8 | PV_MAJOR=$(get_major_version)
9 | PV_MINOR=$(get_version_component_range 2)
10 |
11 | DESCRIPTION="VMware kernel modules"
12 | HOMEPAGE="http://www.vmware.com/"
13 |
14 | SRC_URI=""
15 |
16 | LICENSE="GPL-2"
17 | SLOT="0"
18 | KEYWORDS="-* ~amd64"
19 | IUSE="pax_kernel +vmci +vsock"
20 |
21 | RDEPEND=""
22 | DEPEND="${RDEPEND}
23 | || ( =app-emulation/vmware-player-7.1.${PV_MINOR}*
24 | =app-emulation/vmware-workstation-11.1.${PV_MINOR}* )"
25 |
26 | S=${WORKDIR}
27 |
28 | pkg_setup() {
29 | CONFIG_CHECK="~HIGH_RES_TIMERS"
30 | if kernel_is ge 2 6 37 && kernel_is lt 2 6 39; then
31 | CONFIG_CHECK="${CONFIG_CHECK} BKL"
32 | fi
33 | if use vmci ; then
34 | CONFIG_CHECK="${CONFIG_CHECK} !VMWARE_VMCI"
35 | else
36 | CONFIG_CHECK="${CONFIG_CHECK} VMWARE_VMCI"
37 | fi
38 | if use vsock ; then
39 | CONFIG_CHECK="${CONFIG_CHECK} !VMWARE_VMCI_VSOCKETS"
40 | else
41 | CONFIG_CHECK="${CONFIG_CHECK} VMWARE_VMCI_VSOCKETS"
42 | fi
43 |
44 | linux-info_pkg_setup
45 |
46 | linux-mod_pkg_setup
47 |
48 | VMWARE_GROUP=${VMWARE_GROUP:-vmware}
49 |
50 | VMWARE_MODULE_LIST_ALL="vmblock vmmon vmnet vmci vsock"
51 | VMWARE_MODULE_LIST="vmblock vmmon vmnet"
52 | use vmci && VMWARE_MODULE_LIST="${VMWARE_MODULE_LIST} vmci"
53 | use vsock && VMWARE_MODULE_LIST="${VMWARE_MODULE_LIST} vsock"
54 |
55 | VMWARE_MOD_DIR="${PN}-${PVR}"
56 |
57 | BUILD_TARGETS="auto-build KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
58 |
59 | enewgroup "${VMWARE_GROUP}"
60 | filter-flags -mfpmath=sse
61 |
62 | for mod in ${VMWARE_MODULE_LIST}; do
63 | MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)"
64 | done
65 | }
66 |
67 | src_unpack() {
68 | cd "${S}"
69 | for mod in ${VMWARE_MODULE_LIST_ALL}; do
70 | tar -xf /opt/vmware/lib/vmware/modules/source/${mod}.tar
71 | done
72 | }
73 |
74 | src_prepare() {
75 | epatch "${FILESDIR}/${PV_MAJOR}-makefile-kernel-dir.patch"
76 | epatch "${FILESDIR}/${PV_MAJOR}-makefile-include.patch"
77 | epatch "${FILESDIR}/${PV_MAJOR}-netdevice.patch"
78 | use pax_kernel && epatch "${FILESDIR}/${PV_MAJOR}-hardened.patch"
79 | epatch "${FILESDIR}/${PV_MAJOR}-apic.patch"
80 |
81 | kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-00-dentry.patch"
82 | kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-01-inode.patch"
83 | kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-02-control.patch"
84 | kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-03-inline.patch"
85 | kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.11-00-readdir.patch"
86 | kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.11-01-filldir.patch"
87 | kernel_is ge 3 15 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.15-00-vsock.patch"
88 | kernel_is ge 3 18 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.18-00-version-redefined.patch"
89 | kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-00-compat-namei.patch"
90 | #kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-01-dentry.patch"
91 | kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-02-vmblock-path.patch"
92 | #kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-03-iovec.patch"
93 | kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-04-iovec.patch"
94 | kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-05-vmci_qpair.patch"
95 | kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-06-vsock.patch"
96 | kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-07-vsock.patch"
97 | kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.2-00-inode_op.patch"
98 | kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.2-01-vmci_vmalloc.patch"
99 | kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.2-02-vsock.patch"
100 | kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.2-03-vsock.patch"
101 | kernel_is ge 4 3 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.3-00-misc_deregister.patch"
102 | kernel_is ge 4 5 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.5-00-get_link.patch"
103 | kernel_is ge 4 6 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.6-00-user-pages.patch"
104 | kernel_is ge 4 7 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.7-00-trans_start.patch"
105 | kernel_is ge 4 7 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.7-01-readlink_copy.patch"
106 | kernel_is ge 4 8 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.8-00-nr_anon_mapped.patch"
107 | kernel_is ge 4 9 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.9-00-get_user_pages.patch"
108 | kernel_is ge 4 9 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.9-01-get_user_pages.patch"
109 | kernel_is ge 4 9 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.9-02-get_user_pages.patch"
110 | kernel_is ge 4 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.10-00-generic_readlink.patch"
111 | kernel_is ge 4 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.11-00-missing-headers.patch"
112 | kernel_is ge 4 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.11-01-vsock-lockdep.patch"
113 | kernel_is ge 4 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.11-02-vmmon.patch"
114 |
115 | # Allow user patches so they can support RC kernels and whatever else
116 | epatch_user
117 | }
118 |
119 | src_install() {
120 | linux-mod_src_install
121 | local udevrules="${T}/60-vmware.rules"
122 | cat > "${udevrules}" <<-EOF
123 | KERNEL=="vmci", GROUP="vmware", MODE="660"
124 | KERNEL=="vmw_vmci", GROUP="vmware", MODE="660"
125 | KERNEL=="vmmon", GROUP="vmware", MODE="660"
126 | KERNEL=="vsock", GROUP="vmware", MODE="660"
127 | EOF
128 | udev_dorules "${udevrules}"
129 | }
130 |
--------------------------------------------------------------------------------
/app-emulation/vmware-player/vmware-player-12.5.9.7535481-r1.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2018 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | EAPI=5
5 |
6 | inherit eutils versionator readme.gentoo-r1 gnome2-utils pax-utils systemd vmware-bundle xdg-utils
7 |
8 | MY_PN="VMware-Player"
9 | MY_PV=$(get_version_component_range 1-3)
10 | PV_MODULES="308.$(get_version_component_range 2-3)"
11 | PV_BUILD=$(get_version_component_range 4)
12 | MY_P="${MY_PN}-${MY_PV}-${PV_BUILD}"
13 |
14 | SYSTEMD_UNITS_TAG="gentoo-02"
15 |
16 | DESCRIPTION="Emulate a complete PC without the performance overhead of most emulators"
17 | HOMEPAGE="http://www.vmware.com/products/player/"
18 | BASE_URI="https://softwareupdate.vmware.com/cds/vmw-desktop/player/${MY_PV}/${PV_BUILD}/linux/core/"
19 | SRC_URI="
20 | ${BASE_URI}${MY_P}.x86_64.bundle.tar
21 | https://github.com/akhuettel/systemd-vmware/archive/${SYSTEMD_UNITS_TAG}.tar.gz -> vmware-systemd-${SYSTEMD_UNITS_TAG}.tgz
22 | "
23 |
24 | LICENSE="vmware GPL-2 GPL-3"
25 | SLOT="0"
26 | KEYWORDS="-* ~amd64"
27 | IUSE="cups doc ovftool +vmware-tools"
28 | RESTRICT="mirror strip"
29 |
30 | # vmware should not use virtual/libc as this is a
31 | # precompiled binary package thats linked to glibc.
32 | RDEPEND="
33 | || (
34 | >=media-libs/libjpeg-turbo-1.3.0-r3:0
35 | >=media-libs/jpeg-6b-r12:62
36 | )
37 | media-libs/alsa-lib
38 | net-print/cups
39 | x11-libs/libICE
40 | x11-libs/libSM
41 | x11-libs/libX11
42 | x11-libs/libXcursor
43 | x11-libs/libXext
44 | x11-libs/libXi
45 | x11-libs/libXinerama
46 | x11-libs/libXtst
47 | x11-libs/startup-notification
48 | x11-themes/hicolor-icon-theme
49 | !app-emulation/vmware-workstation
50 | "
51 | PDEPEND="~app-emulation/vmware-modules-${PV_MODULES}
52 | vmware-tools? ( app-emulation/vmware-tools )"
53 | DEPEND=">=dev-util/patchelf-0.9"
54 |
55 | S=${WORKDIR}
56 | VM_INSTALL_DIR="/opt/vmware"
57 |
58 | QA_PREBUILT="/opt/*"
59 |
60 | QA_WX_LOAD="opt/vmware/lib/vmware/tools-upgraders/vmware-tools-upgrader-32 opt/vmware/lib/vmware/bin/vmware-vmx-stats opt/vmware/lib/vmware/bin/vmware-vmx-debug opt/vmware/lib/vmware/bin/vmware-vmx"
61 |
62 | src_unpack() {
63 | default
64 | local bundle=${MY_P}.x86_64.bundle
65 |
66 | local component; for component in \
67 | vmware-player \
68 | vmware-player-app \
69 | vmware-player-setup \
70 | vmware-vmx \
71 | vmware-network-editor \
72 | vmware-usbarbitrator
73 | do
74 | vmware-bundle_extract-bundle-component "${bundle}" "${component}" "${S}"
75 | done
76 |
77 | if use ovftool; then
78 | vmware-bundle_extract-bundle-component "${bundle}" vmware-ovftool
79 | fi
80 | }
81 |
82 | src_prepare() {
83 | rm -f bin/vmware-modconfig
84 | rm -rf lib/modules/binary
85 | # Bug 459566
86 | mv lib/libvmware-netcfg.so lib/lib/
87 |
88 | # if librsvg is not installed in the system then vmware doesn't start
89 | pushd >/dev/null .
90 | einfo "Patching svg_loader.so"
91 | cd "${S}"/lib/libconf/lib/gtk-2.0/2.10.0/loaders || die
92 | patchelf --set-rpath "\$ORIGIN/../../../../../lib/librsvg-2.so.2" \
93 | svg_loader.so || die
94 | popd >/dev/null
95 |
96 | DOC_CONTENTS="
97 | /etc/env.d is updated during ${PN} installation. Please run:\n
98 | env-update && source /etc/profile\n
99 | Before you can use ${PN}, you must configure a default network setup.
100 | You can do this by running 'emerge --config ${PN}'.\n
101 | To be able to run ${PN} your user must be in the vmware group.\n
102 | "
103 | }
104 |
105 | src_install() {
106 | local major_minor=$(get_version_component_range 1-2 "${PV}")
107 |
108 | # revdep-rebuild entry
109 | insinto /etc/revdep-rebuild
110 | echo "SEARCH_DIRS_MASK=\"${VM_INSTALL_DIR}\"" >> ${T}/10${PN}
111 | doins "${T}"/10${PN}
112 |
113 | # install the binaries
114 | into "${VM_INSTALL_DIR}"
115 | dobin bin/*
116 |
117 | # install the libraries
118 | insinto "${VM_INSTALL_DIR}"/lib/vmware
119 | doins -r lib/*
120 |
121 | # bug 616958
122 | # system libs don't work anymore with embedeed zlib because it doesn't support ZLIB_1.2.9,
123 | # add this hack to bypass embedded zlib which is always loaded and required during startup
124 | # of vmware since 12.5.x
125 | dosym /$(get_libdir)/libz.so.1 \
126 | "${VM_INSTALL_DIR}"/lib/vmware/lib/libz.so.1/libz.so.1
127 |
128 | # install the ancillaries
129 | insinto /usr
130 | doins -r share
131 |
132 | if use cups; then
133 | exeinto $(cups-config --serverbin)/filter
134 | doexe extras/thnucups
135 |
136 | insinto /etc/cups
137 | doins -r etc/cups/*
138 | fi
139 |
140 | if use doc; then
141 | dodoc doc/*
142 | fi
143 |
144 | exeinto "${VM_INSTALL_DIR}"/lib/vmware/setup
145 | doexe vmware-config
146 |
147 | # install ovftool
148 | if use ovftool; then
149 | cd "${S}"
150 |
151 | insinto "${VM_INSTALL_DIR}"/lib/vmware-ovftool
152 | doins -r vmware-ovftool/*
153 |
154 | chmod 0755 "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/{ovftool,ovftool.bin}
155 | dosym "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/ovftool "${VM_INSTALL_DIR}"/bin/ovftool
156 | fi
157 |
158 | # create symlinks for the various tools
159 | local tool ; for tool in thnuclnt vmplayer{,-daemon} \
160 | vmware-{acetool,modconfig{,-console},gksu,fuseUI} ; do
161 | dosym appLoader "${VM_INSTALL_DIR}"/lib/vmware/bin/"${tool}"
162 | done
163 | dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmplayer "${VM_INSTALL_DIR}"/bin/vmplayer
164 | dosym "${VM_INSTALL_DIR}"/lib/vmware/icu /etc/vmware/icu
165 |
166 | # fix permissions
167 | fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/bin/{appLoader,fusermount,launcher.sh,mkisofs,vmware-remotemks}
168 | fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/wrapper-gtk24.sh
169 | fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/libgksu2.so.0/gksu-run-helper
170 | fperms 4711 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx{,-debug,-stats}
171 |
172 | pax-mark -m "${D}${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx
173 |
174 | # create the environment
175 | local envd="${T}/90vmware"
176 | cat > "${envd}" <<-EOF
177 | PATH='${VM_INSTALL_DIR}/bin'
178 | ROOTPATH='${VM_INSTALL_DIR}/bin'
179 | EOF
180 |
181 | doenvd "${envd}"
182 |
183 | # create the configuration
184 | dodir /etc/vmware
185 |
186 | cat > "${D}"/etc/vmware/bootstrap <<-EOF
187 | BINDIR='${VM_INSTALL_DIR}/bin'
188 | LIBDIR='${VM_INSTALL_DIR}/lib'
189 | EOF
190 |
191 | cat > "${D}"/etc/vmware/config <<-EOF
192 | bindir = "${VM_INSTALL_DIR}/bin"
193 | libdir = "${VM_INSTALL_DIR}/lib/vmware"
194 | initscriptdir = "/etc/init.d"
195 | authd.fullpath = "${VM_INSTALL_DIR}/sbin/vmware-authd"
196 | gksu.rootMethod = "su"
197 | VMCI_CONFED = "yes"
198 | VMBLOCK_CONFED = "yes"
199 | VSOCK_CONFED = "yes"
200 | NETWORKING = "yes"
201 | player.product.version = "${MY_PV}"
202 | product.buildNumber = "${PV_BUILD}"
203 | EOF
204 |
205 | # install the init.d script
206 | local initscript="${T}/vmware.rc"
207 | sed -e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
208 | "${FILESDIR}/vmware-${major_minor}.rc" > "${initscript}" || die
209 | newinitd "${initscript}" vmware
210 |
211 | # fill in variable placeholders
212 | sed -e "s:@@LIBCONF_DIR@@:${VM_INSTALL_DIR}/lib/vmware/libconf:g" \
213 | -i "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf/etc/{gtk-2.0/{gdk-pixbuf.loaders,gtk.immodules},pango/pango{.modules,rc}} || die
214 | sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmplayer:g" \
215 | -e "/^Encoding/d" \
216 | -i "${D}/usr/share/applications/vmware-player.desktop" || die
217 |
218 | # install systemd unit files
219 | systemd_dounit "${WORKDIR}/systemd-vmware-${SYSTEMD_UNITS_TAG}/"*.{service,target}
220 |
221 | readme.gentoo_create_doc
222 | }
223 |
224 | pkg_config() {
225 | "${VM_INSTALL_DIR}"/bin/vmware-networks --postinstall ${PN},old,new
226 | }
227 |
228 | pkg_preinst() {
229 | gnome2_icon_savelist
230 | }
231 |
232 | pkg_postinst() {
233 | xdg_desktop_database_update
234 | xdg_mimeinfo_database_update
235 | gnome2_icon_cache_update
236 | readme.gentoo_print_elog
237 |
238 | ewarn "${P} is using an old version of libgcrypt library which"
239 | ewarn "has been removed from portage due to security reasons"
240 | ewarn "(see also bugs #567382 or #656372)."
241 | ewarn "This version of vmware is not going to be fixed upstream (EOL)"
242 | ewarn "so you're exposed to security issues!"
243 | }
244 |
245 | pkg_prerm() {
246 | einfo "Stopping ${PN} for safe unmerge"
247 | /etc/init.d/vmware stop
248 | }
249 |
250 | pkg_postrm() {
251 | xdg_desktop_database_update
252 | xdg_mimeinfo_database_update
253 | gnome2_icon_cache_update
254 | }
255 |
--------------------------------------------------------------------------------
/app-emulation/vmware-modules/vmware-modules-308.5.9.ebuild:
--------------------------------------------------------------------------------
1 | # Copyright 1999-2017 Gentoo Foundation
2 | # Distributed under the terms of the GNU General Public License v2
3 |
4 | EAPI=5
5 |
6 | inherit eutils flag-o-matic linux-info linux-mod user versionator udev
7 |
8 | PV_MAJOR=$(get_major_version)
9 | PV_MINOR=$(get_version_component_range 2-3)
10 |
11 | DESCRIPTION="VMware kernel modules"
12 | HOMEPAGE="http://www.vmware.com/"
13 |
14 | SRC_URI=""
15 |
16 | LICENSE="GPL-2"
17 | SLOT="0"
18 | KEYWORDS="~amd64"
19 | IUSE="pax_kernel +vmci +vsock"
20 | REQUIRED_USE="!vsock? ( !vmci )"
21 |
22 | RDEPEND=""
23 | DEPEND="${RDEPEND}
24 | || ( =app-emulation/vmware-player-12.${PV_MINOR}*
25 | =app-emulation/vmware-workstation-12.${PV_MINOR}* )"
26 |
27 | S=${WORKDIR}
28 |
29 | pkg_setup() {
30 | CONFIG_CHECK="~HIGH_RES_TIMERS"
31 | kernel_is ge 5 5 0 &&
32 | CONFIG_CHECK="${CONFIG_CHECK} X86_IOPL_IOPERM" # to avoid startup problems with vmnet-natd
33 | if kernel_is ge 2 6 37 && kernel_is lt 2 6 39; then
34 | CONFIG_CHECK="${CONFIG_CHECK} BKL"
35 | fi
36 | if use vmci ; then
37 | CONFIG_CHECK="${CONFIG_CHECK} !VMWARE_VMCI"
38 | else
39 | CONFIG_CHECK="${CONFIG_CHECK} VMWARE_VMCI"
40 | fi
41 | if use vsock ; then
42 | CONFIG_CHECK="${CONFIG_CHECK} !VMWARE_VMCI_VSOCKETS"
43 | else
44 | CONFIG_CHECK="${CONFIG_CHECK} VMWARE_VMCI_VSOCKETS"
45 | fi
46 |
47 | linux-info_pkg_setup
48 |
49 | linux-mod_pkg_setup
50 |
51 | VMWARE_GROUP=${VMWARE_GROUP:-vmware}
52 |
53 | VMWARE_MODULE_LIST_ALL="vmblock vmmon vmnet vmci vsock"
54 | VMWARE_MODULE_LIST="vmblock vmmon vmnet"
55 | use vmci && VMWARE_MODULE_LIST="${VMWARE_MODULE_LIST} vmci"
56 | use vsock && VMWARE_MODULE_LIST="${VMWARE_MODULE_LIST} vsock" # vsock must be listed AFTER vmci
57 |
58 | VMWARE_MOD_DIR="${PN}-${PVR}"
59 |
60 | BUILD_TARGETS="auto-build"
61 | BUILD_PARAMS="KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
62 | # Since kernel 5.5 (commit 39808e451fdf) the Module.symvers is not read automatically
63 | # but an extra parameter KBUILD_EXTRA_SYMBOLS has been defined for that purpose.
64 | # Here vsock needs symbols defined by vmci
65 | kernel_is ge 5 5 0 && BUILD_PARAMS="${BUILD_PARAMS} KBUILD_EXTRA_SYMBOLS=${S}/Module.symvers"
66 |
67 | enewgroup "${VMWARE_GROUP}"
68 |
69 | filter-flags -mfpmath=sse -mavx -mpclmul -maes
70 | append-cflags -mno-sse # Found a problem similar to bug #492964
71 |
72 | for mod in ${VMWARE_MODULE_LIST}; do
73 | MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)"
74 | done
75 | }
76 |
77 | src_unpack() {
78 | cd "${S}"
79 | for mod in ${VMWARE_MODULE_LIST_ALL}; do
80 | tar -xf /opt/vmware/lib/vmware/modules/source/${mod}.tar
81 | done
82 | }
83 |
84 | src_prepare() {
85 | find -iname Makefile | while read m ; do
86 | convert_to_m "${m}"
87 | done
88 |
89 | epatch "${FILESDIR}/${PV_MAJOR}-makefile-kernel-dir.patch"
90 | epatch "${FILESDIR}/${PV_MAJOR}-makefile-include.patch"
91 | epatch "${FILESDIR}/${PV_MAJOR}-netdevice.patch"
92 | use pax_kernel && epatch "${FILESDIR}/${PV_MAJOR}-hardened.patch"
93 | epatch "${FILESDIR}/${PV_MAJOR}-apic.patch"
94 |
95 | kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-00-dentry.patch"
96 | kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-01-inode.patch"
97 | kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-02-control.patch"
98 | kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10-03-inline.patch"
99 | kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.11-00-readdir.patch"
100 | kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.11-01-filldir.patch"
101 | kernel_is ge 3 15 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.15-00-vsock.patch"
102 | kernel_is ge 3 18 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.18-00-version-redefined.patch"
103 | kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-00-compat-namei.patch"
104 | kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-02-vmblock-path.patch"
105 | kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-04-iovec.patch"
106 | kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-05-vmci_qpair.patch"
107 | kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-06-vsock.patch"
108 | kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-07-vsock.patch"
109 | kernel_is ge 4 1 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.01-00-vsock.patch"
110 | kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.02-00-nd_set_link.patch"
111 | kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.02-01-sk_alloc.patch"
112 | kernel_is ge 4 3 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.03-00-vmci-misc_deregister.patch"
113 | kernel_is ge 4 5 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.05-00-vmblock-follow_link.patch"
114 | kernel_is ge 4 6 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.06-00-user-pages.patch"
115 | kernel_is ge 4 7 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.07-01-readlink_copy.patch"
116 | kernel_is ge 4 8 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.08-00-vmmon-fix-page-accounting.patch"
117 | kernel_is ge 4 9 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.09-00-user-pages.patch"
118 | kernel_is ge 4 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.10-00-generic_readlink.patch"
119 | kernel_is ge 4 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.11-00-missing-headers.patch"
120 | kernel_is ge 4 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.11-01-vsock-lockdep.patch"
121 | kernel_is ge 4 12 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.12-00-vmblock-current_time.patch"
122 | kernel_is ge 4 12 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.12-01-vmci-do_once.patch"
123 | kernel_is ge 4 12 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.12-02-vmci-pci_enable_msix.patch"
124 | kernel_is ge 4 13 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.13-00-vmnet-refcount.patch"
125 | kernel_is ge 4 13 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.13-01-vmmon-fix-page-accounting.patch"
126 | kernel_is ge 4 14 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.14-00-vmmon-global-page-state.patch"
127 | kernel_is ge 4 14 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.14-01-deprecated-asm-uaccess.patch"
128 | kernel_is ge 4 15 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.15-00-init_timer.patch"
129 | kernel_is ge 4 16 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.16-00-vmblock-iversion.patch"
130 | kernel_is ge 4 17 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.17-00-vsock-getname.patch"
131 | kernel_is ge 5 00 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.00-00-totalram_pages.patch"
132 | kernel_is ge 5 00 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.00-01-access_ok.patch"
133 | kernel_is ge 5 00 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.00-02-do_gettimeofday.patch"
134 | kernel_is ge 5 01 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.01-00-vm_fault_t.patch"
135 | kernel_is ge 5 01 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.01-01-kernel_ds.patch"
136 | kernel_is ge 5 03 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.03-00-force_sig.patch"
137 | kernel_is ge 5 04 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.04-00-skb_frag_t.patch"
138 | kernel_is ge 5 06 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.06-00-proc_create.patch"
139 | kernel_is ge 5 06 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.06-01-ioremap_nocache.patch"
140 | kernel_is ge 5 06 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.06-02-timeval.patch"
141 |
142 | # Allow user patches so they can support RC kernels and whatever else
143 | epatch_user
144 | }
145 |
146 | src_install() {
147 | linux-mod_src_install
148 | local udevrules="${T}/60-vmware.rules"
149 | cat > "${udevrules}" <<-EOF
150 | KERNEL=="vmci", GROUP="vmware", MODE="660"
151 | KERNEL=="vmw_vmci", GROUP="vmware", MODE="660"
152 | KERNEL=="vmmon", GROUP="vmware", MODE="660"
153 | KERNEL=="vsock", GROUP="vmware", MODE="660"
154 | EOF
155 | udev_dorules "${udevrules}"
156 |
157 | if ! use vmci ; then
158 | dodir /etc/modprobe.d/
159 |
160 | cat > "${D}"/etc/modprobe.d/vmware.conf <<-EOF
161 | # Support for vmware vmci in kernel module
162 | alias vmci vmw_vmci
163 | EOF
164 |
165 | export installed_modprobe_conf=1
166 | fi
167 | if ! use vsock ; then
168 | dodir /etc/modprobe.d/
169 | cat >> "${D}"/etc/modprobe.d/vmware.conf <<-EOF
170 | # Support for vmware vsock in kernel module
171 | alias vsock vmw_vsock_vmci_transport
172 | EOF
173 |
174 | export installed_modprobe_conf=1
175 | fi
176 | }
177 |
178 | pkg_postinst() {
179 | linux-mod_pkg_postinst
180 | if [ "${installed_modprobe_conf}"x == "x" ] ; then
181 | if [ -f "${ROOT}/etc/modprobe.d/vmware.conf" ] ; then
182 | ewarn "Please check the /etc/modprobe.d/vmware.conf file and"
183 | ewarn "possible conflicts when using vmci and/or vsock modules built"
184 | ewarn "out of kernel"
185 | fi
186 | fi
187 | }
188 |
--------------------------------------------------------------------------------