aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDāvis2014-03-31 02:17:46 +0300
committerDāvis2015-09-17 19:24:43 +0300
commit40ef118ba97d0bf2fefa70efd8839a4b64fdd098 (patch)
tree53344a0d64d6b4ddc1cfb914373263d6610e6e11
downloadaur-40ef118ba97d0bf2fefa70efd8839a4b64fdd098.tar.gz
Add files
Make `linux-headers` optional dependecy Use `__putname` instead of `putname` Don't build all modules, but just `vmblock`, `vmhgfs`, `vmsync` Add .gitignore Rename patch.patch to open-vm-tools.patch Update epoch version Update PKBUILD for 9.4.6 Working 9.4.6 build * Update version to 9.4.6 with relevant patches. * Rename dkms.conf to dkms.conf.in to follow practices of other packages. * Add open-vm-tools-dkms.install file for automatic installation/removal of the dkms modules when the package is (un)installed. * Change package numbering to reflect the Arch standards. * Delete dkms sources that aren't needed from the package: vmblock is now provided via the FUSE module for kernels >= 3.0. vmci and vmsock have been merged into kernels >= 3.9. vmsync is not needed since kernels >= 3.0 support FIFREEZE/FITHAW ioctls. Add patches for 3.16 kernels Add patch to fix segfault in vmhgfs * Bump pkgrel as well. Fix premissions Change 0005 hgfs patch to use wait_on_bit_io Updated for 3.18 with patch from andrwmorph One more d_u.d_alias fix Make vmhgfs work on kernel 3.19. Rebase patches on latest open-vm-tools-9.10.0 On rrva's suggestion, added bdi patch from rasa's vmware tools patches. Bunp epoch Adopted change to BDI patch in rasa's repository. Update 0004-Support-backing-dev-info-kernel-4.0 patch Update to latest open-vm-tools 10.0.0 Add SRCINFO
-rw-r--r--.SRCINFO29
-rw-r--r--.gitignore4
-rw-r--r--0001-Fix-vmxnet-module-on-kernels-3.16.patch74
-rw-r--r--0004-Support-backing-dev-info-kernel-4.0.patch86
-rw-r--r--0005-Remove-new_sync-for-Linux-4.1.patch27
-rw-r--r--PKGBUILD51
-rw-r--r--README.md1
-rw-r--r--UNLICENSE24
-rw-r--r--dkms.conf.in15
-rwxr-xr-xopen-vm-tools-dkms.install28
10 files changed, 339 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e5172a079375
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = open-vm-tools-dkms
+ pkgdesc = Open Virtual Machine Tools kernel modules (DKMS)
+ pkgver = 10.0.0
+ pkgrel = 3
+ epoch = 6
+ url = http://open-vm-tools.sourceforge.net/
+ install = open-vm-tools-dkms.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ depends = dkms
+ optdepends = open-vm-tools: Open Virtual Machine Tools
+ optdepends = linux-headers: Header files for Linux kernel
+ conflicts = open-vm-tools-modules,
+ conflicts = vmware-modules-dkms
+ options = !strip
+ source = http://downloads.sourceforge.net/open-vm-tools/open-vm-tools-10.0.0-3000743.tar.gz
+ source = 0001-Fix-vmxnet-module-on-kernels-3.16.patch
+ source = 0004-Support-backing-dev-info-kernel-4.0.patch
+ source = 0005-Remove-new_sync-for-Linux-4.1.patch
+ source = dkms.conf.in
+ sha256sums = 5adef80f43186aff426f4f22b4b31b514d18a1dcc3334d56ed22d2e308803971
+ sha256sums = 6684cf4cd9a492b82b24dff076fbbafef19e59ef969f532ee3da1501136a7c48
+ sha256sums = dac377beb660dc6c143356255346b34db0986511dcb74f051e06f243a0078af8
+ sha256sums = 38e2ae573a849251abde79c82b694d76f32cc75c9ff60878ebcb23f2f8c86928
+ sha256sums = 5255a183cccd80b2bfbbf519b1cc8cec81ae40bbc0b5a88dfddd95532ece84ed
+
+pkgname = open-vm-tools-dkms
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..8ba3a617d3d9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg/
+/src/
+/*.tar*
+
diff --git a/0001-Fix-vmxnet-module-on-kernels-3.16.patch b/0001-Fix-vmxnet-module-on-kernels-3.16.patch
new file mode 100644
index 000000000000..b7145d11b95c
--- /dev/null
+++ b/0001-Fix-vmxnet-module-on-kernels-3.16.patch
@@ -0,0 +1,74 @@
+From 08836a47c56b47b658025e41a20027c5d915f836 Mon Sep 17 00:00:00 2001
+From: "Scott M. Kroll" <skroll@gmail.com>
+Date: Fri, 15 Aug 2014 10:40:38 -0400
+Subject: [PATCH 1/3] Fix vmxnet module on kernels >= 3.16
+
+* Add compat check for ethtool_ops in net_device struct.
+* SET_ETHTOOL_OPS is no longer defined, but can be manually.
+---
+ open-vm-tools/modules/linux/shared/compat_netdevice.h | 4 ++++
+ open-vm-tools/modules/linux/vmxnet/vmxnet.c | 13 ++++++++-----
+ 2 files changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/open-vm-tools/modules/linux/shared/compat_netdevice.h b/open-vm-tools/modules/linux/shared/compat_netdevice.h
+index 3aec25b..a65d59b 100644
+--- a/open-vm-tools/modules/linux/shared/compat_netdevice.h
++++ b/open-vm-tools/modules/linux/shared/compat_netdevice.h
+@@ -337,4 +337,8 @@ typedef netdev_features_t compat_netdev_features_t;
+ typedef u32 compat_netdev_features_t;
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) || defined(SET_ETHTOOL_OPS)
++#define VMW_HAVE_ETHTOOL_OPS 1
++#endif
++
+ #endif /* __COMPAT_NETDEVICE_H__ */
+diff --git a/open-vm-tools/modules/linux/vmxnet/vmxnet.c b/open-vm-tools/modules/linux/vmxnet/vmxnet.c
+index 33afb9b..40abde5 100644
+--- a/open-vm-tools/modules/linux/vmxnet/vmxnet.c
++++ b/open-vm-tools/modules/linux/vmxnet/vmxnet.c
+@@ -279,8 +279,7 @@ vmxnet_change_mtu(struct net_device *dev, int new_mtu)
+
+ #endif
+
+-
+-#ifdef SET_ETHTOOL_OPS
++#ifdef VMW_HAVE_ETHTOOL_OPS
+ /*
+ *----------------------------------------------------------------------------
+ *
+@@ -526,7 +525,7 @@ vmxnet_ethtool_ops = {
+ };
+
+
+-#else /* !defined(SET_ETHTOOL_OPS) */
++#else /* !defined(VMW_HAVE_ETHTOOL_OPS) */
+
+
+ /*
+@@ -739,7 +738,7 @@ vmxnet_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+ }
+ return -EOPNOTSUPP;
+ }
+-#endif /* SET_ETHTOOL_OPS */
++#endif /* !defined(VMW_HAVE_ETHTOOL_OPS) */
+
+
+ /*
+@@ -1142,8 +1141,12 @@ vmxnet_probe_device(struct pci_dev *pdev, // IN: vmxnet PCI device
+ dev->watchdog_timeo = VMXNET_WATCHDOG_TIMEOUT;
+ #endif
+
+-#ifdef SET_ETHTOOL_OPS
++#ifdef VMW_HAVE_ETHTOOL_OPS
++# ifdef SET_ETHTOOL_OPS
+ SET_ETHTOOL_OPS(dev, &vmxnet_ethtool_ops);
++# else
++ dev->ethtool_ops = &vmxnet_ethtool_ops;
++# endif
+ #else
+ dev->do_ioctl = vmxnet_ioctl;
+ #endif
+--
+2.3.4
+
diff --git a/0004-Support-backing-dev-info-kernel-4.0.patch b/0004-Support-backing-dev-info-kernel-4.0.patch
new file mode 100644
index 000000000000..bc74d1a9c6ef
--- /dev/null
+++ b/0004-Support-backing-dev-info-kernel-4.0.patch
@@ -0,0 +1,86 @@
+From 122f184d946a007a7ba3ae68386a20f33ed62e1e Mon Sep 17 00:00:00 2001
+From: lotan <lotan@gmx.de>
+Date: Mon, 8 Jun 2015 14:20:06 +0200
+Subject: [PATCH] Support backing dev info kernel 4.0.
+
+---
+ open-vm-tools/modules/linux/vmhgfs/filesystem.c | 16 ++++++++++++++++
+ open-vm-tools/modules/linux/vmhgfs/module.h | 4 ++++
+ open-vm-tools/modules/linux/vmhgfs/super.c | 3 +++
+ 3 files changed, 23 insertions(+)
+
+diff --git a/open-vm-tools/modules/linux/vmhgfs/filesystem.c b/open-vm-tools/modules/linux/vmhgfs/filesystem.c
+index 10dd8ab..3148091 100644
+--- a/open-vm-tools/modules/linux/vmhgfs/filesystem.c
++++ b/open-vm-tools/modules/linux/vmhgfs/filesystem.c
+@@ -398,8 +398,21 @@ HgfsReadSuper(struct super_block *sb, // OUT: Superblock object
+ return PTR_ERR(si);
+ }
+ HGFS_SET_SB_TO_COMMON(sb, si);
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
++ memset(&si->bdi, 0, sizeof(si->bdi));
++ result = bdi_setup_and_register(&si->bdi, "vmhgfs");
++ if (result) {
++ kfree(si->shareName);
++ kfree(si);
++ }
++#endif
++
+ sb->s_magic = HGFS_SUPER_MAGIC;
+ sb->s_op = &HgfsSuperOperations;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
++ sb->s_bdi = &si->bdi;
++#endif
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
+ sb->s_d_op = &HgfsDentryOperations;
+@@ -439,6 +452,9 @@ HgfsReadSuper(struct super_block *sb, // OUT: Superblock object
+ exit:
+ if (result) {
+ dput(rootDentry);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
++ bdi_destroy(&si->bdi);
++#endif
+ kfree(si->shareName);
+ kfree(si);
+ }
+diff --git a/open-vm-tools/modules/linux/vmhgfs/module.h b/open-vm-tools/modules/linux/vmhgfs/module.h
+index b673dc1..f3eeffc 100644
+--- a/open-vm-tools/modules/linux/vmhgfs/module.h
++++ b/open-vm-tools/modules/linux/vmhgfs/module.h
+@@ -29,6 +29,7 @@
+ #include "driver-config.h"
+
+ #include <asm/atomic.h>
++#include <linux/backing-dev.h>
+ #include "compat_fs.h"
+ #include "compat_semaphore.h"
+ #include "compat_slab.h"
+@@ -144,6 +145,9 @@ typedef struct HgfsSuperInfo {
+ char *shareName; /* Mounted share name. */
+ size_t shareNameLen; /* To avoid repeated strlen() calls. */
+ uint32 mntFlags; /* HGFS mount flags */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
++ struct backing_dev_info bdi;
++#endif
+ } HgfsSuperInfo;
+
+ /*
+diff --git a/open-vm-tools/modules/linux/vmhgfs/super.c b/open-vm-tools/modules/linux/vmhgfs/super.c
+index 04a2192..41f8713 100644
+--- a/open-vm-tools/modules/linux/vmhgfs/super.c
++++ b/open-vm-tools/modules/linux/vmhgfs/super.c
+@@ -152,6 +152,9 @@ HgfsPutSuper(struct super_block *sb) // IN: The superblock
+
+ si = HGFS_SB_TO_COMMON(sb);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
++ bdi_destroy(&si->bdi);
++#endif
+ kfree(si->shareName);
+ kfree(si);
+ }
+--
+2.3.6
+
diff --git a/0005-Remove-new_sync-for-Linux-4.1.patch b/0005-Remove-new_sync-for-Linux-4.1.patch
new file mode 100644
index 000000000000..f51278be5f1c
--- /dev/null
+++ b/0005-Remove-new_sync-for-Linux-4.1.patch
@@ -0,0 +1,27 @@
+From fbb6fe5ec57a2a0a9464ec5c433fc18793ebb05f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?D=C4=81vis?= <davispuh@gmail.com>
+Date: Thu, 17 Sep 2015 18:05:29 +0300
+Subject: [PATCH] Remove new_sync for Linux >= 4.1
+
+---
+ open-vm-tools/modules/linux/vmhgfs/file.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/open-vm-tools/modules/linux/vmhgfs/file.c b/open-vm-tools/modules/linux/vmhgfs/file.c
+index 0bc5ee3..ada3eee 100644
+--- a/open-vm-tools/modules/linux/vmhgfs/file.c
++++ b/open-vm-tools/modules/linux/vmhgfs/file.c
+@@ -169,8 +169,10 @@ struct file_operations HgfsFileFileOperations = {
+ .flush = HgfsFlush,
+ #if defined VMW_USE_AIO
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)
+ .read = new_sync_read,
+ .write = new_sync_write,
++#endif // LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)
+ .read_iter = HgfsFileRead,
+ .write_iter = HgfsFileWrite,
+ #else // LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
+---
+2.5.2
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d3dbccdd6b1c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Dāvis Mosāns <davispuh at gmail dot com>
+
+pkgname=open-vm-tools-dkms
+epoch=6
+pkgver=10.0.0
+_pkgsubver=3000743
+pkgrel=3
+pkgdesc='Open Virtual Machine Tools kernel modules (DKMS)'
+arch=('i686' 'x86_64')
+url='http://open-vm-tools.sourceforge.net/'
+license=('GPL2')
+conflicts=('open-vm-tools-modules', 'vmware-modules-dkms')
+
+depends=('dkms')
+options=('!strip')
+optdepends=('open-vm-tools: Open Virtual Machine Tools'
+ 'linux-headers: Header files for Linux kernel')
+install=open-vm-tools-dkms.install
+
+_name='open-vm-tools'
+_dirname='stable-10.0.x'
+_version="${pkgver}-${_pkgsubver}"
+_full_name="${_name}-${_version}"
+_dkms_version='2015.01.29'
+
+source=(http://downloads.sourceforge.net/${_name}/${_full_name}.tar.gz
+ 0001-Fix-vmxnet-module-on-kernels-3.16.patch
+ 0004-Support-backing-dev-info-kernel-4.0.patch
+ 0005-Remove-new_sync-for-Linux-4.1.patch
+ dkms.conf.in)
+sha256sums=('5adef80f43186aff426f4f22b4b31b514d18a1dcc3334d56ed22d2e308803971'
+ '6684cf4cd9a492b82b24dff076fbbafef19e59ef969f532ee3da1501136a7c48'
+ 'dac377beb660dc6c143356255346b34db0986511dcb74f051e06f243a0078af8'
+ '38e2ae573a849251abde79c82b694d76f32cc75c9ff60878ebcb23f2f8c86928'
+ '5255a183cccd80b2bfbbf519b1cc8cec81ae40bbc0b5a88dfddd95532ece84ed')
+
+prepare() {
+ patch -d "$srcdir/${_full_name}" -Np2 -i "$srcdir/0001-Fix-vmxnet-module-on-kernels-3.16.patch"
+ patch -d "$srcdir/${_full_name}" -Np2 -i "$srcdir/0004-Support-backing-dev-info-kernel-4.0.patch"
+ patch -d "$srcdir/${_full_name}" -Np2 -i "$srcdir/0005-Remove-new_sync-for-Linux-4.1.patch"
+}
+
+package() {
+ cd "$srcdir/${_full_name}"
+ sed -i "s/${_dkms_version}/${pkgver}/g" ./modules/linux/dkms.sh
+ sh ./modules/linux/dkms.sh ./ "${pkgdir}/usr/src"
+ sed "s/%pkgver%/${pkgver}/g" "${srcdir}/dkms.conf.in" > "${pkgdir}/usr/src/${_name}-${pkgver}/dkms.conf"
+ for _module in {"vmblock","vmci","vmsync","vsock"}; do
+ rm -rf "${pkgdir}/usr/src/${_name}-${pkgver}/${_module}"
+ done
+}
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..6ff55042126b
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# open-vm-tools-dkms
diff --git a/UNLICENSE b/UNLICENSE
new file mode 100644
index 000000000000..68a49daad8ff
--- /dev/null
+++ b/UNLICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
diff --git a/dkms.conf.in b/dkms.conf.in
new file mode 100644
index 000000000000..c95b44368e23
--- /dev/null
+++ b/dkms.conf.in
@@ -0,0 +1,15 @@
+PACKAGE_NAME=open-vm-tools
+PACKAGE_VERSION=%pkgver%
+MAKE_CMD_TMPL="make VM_UNAME=\$kernelver MODULEBUILDDIR=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build"
+
+MAKE[0]="$MAKE_CMD_TMPL -C vmxnet; \
+ $MAKE_CMD_TMPL -C vmhgfs"
+CLEAN[0]="$MAKE_CMD_TMPL -C vmxnet clean; \
+ $MAKE_CMD_TMPL -C vmhgfs clean"
+BUILT_MODULE_NAME[0]="vmxnet"
+BUILT_MODULE_NAME[1]="vmhgfs"
+BUILT_MODULE_LOCATION[0]="vmxnet/"
+BUILT_MODULE_LOCATION[1]="vmhgfs/"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/net"
+DEST_MODULE_LOCATION[1]="/kernel/fs/vmhgfs"
+AUTOINSTALL="YES"
diff --git a/open-vm-tools-dkms.install b/open-vm-tools-dkms.install
new file mode 100755
index 000000000000..613471a23172
--- /dev/null
+++ b/open-vm-tools-dkms.install
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# arg 1: the new package version
+post_install() {
+ _version=`echo ${1%%-*} | sed -rne 's,^([0-9]*:)?(.*),\2,p'`
+ dkms install -m open-vm-tools/${_version}
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ pre_remove "$2"
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install "$1"
+}
+
+# arg 1: the old package version
+pre_remove() {
+ # Remove modules using dkms
+ _version=`echo ${1%%-*} | sed -rne 's,^([0-9]*:)?(.*),\2,p'`
+ dkms remove -m open-vm-tools -v ${_version} --all
+}
+
+# vim:set ts=2 sw=2 ft=sh et: