diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-02-14 15:35:54 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-02-14 18:50:10 +0000 |
commit | 3731e1ad3be31be7e8f5b70a9a023b0faaa265f1 (patch) | |
tree | a202927f284aad2381ded10c39749cf90de5cca9 /unmaintained | |
parent | 7a1991a223764e0488d36e50fbc3ea3ee92640b2 (diff) | |
download | aports-3731e1ad3be31be7e8f5b70a9a023b0faaa265f1.tar.bz2 aports-3731e1ad3be31be7e8f5b70a9a023b0faaa265f1.tar.xz |
unmaintained/open-vm-tools-grsec: move from main
seems like those kernel modules are obsolete. There are a network driver
in mainline and there seems to be a vmhgfs-fuse driver to mount
filesystem from host.
Diffstat (limited to 'unmaintained')
3 files changed, 204 insertions, 0 deletions
diff --git a/unmaintained/open-vm-tools-grsec/0001-Fix-vmxnet-module-on-kernels-3.16.patch b/unmaintained/open-vm-tools-grsec/0001-Fix-vmxnet-module-on-kernels-3.16.patch new file mode 100644 index 0000000000..4f76f76f0a --- /dev/null +++ b/unmaintained/open-vm-tools-grsec/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/modules/linux/shared/compat_netdevice.h ++++ b/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/modules/linux/vmxnet/vmxnet.c ++++ b/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/unmaintained/open-vm-tools-grsec/APKBUILD b/unmaintained/open-vm-tools-grsec/APKBUILD new file mode 100644 index 0000000000..f93033bb1e --- /dev/null +++ b/unmaintained/open-vm-tools-grsec/APKBUILD @@ -0,0 +1,105 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> + +_flavor=grsec +_kpkg=linux-$_flavor +_realname=open-vm-tools +_kver=4.4.47 +_kpkgrel=0 +_realver=10.1.0 +_ver=${_realver/_p/-} +_mypkgrel=0 + +# source open-vm-tools version +if [ -f ../main/$_realname/APKBUILD ]; then + . ../main/$_realname/APKBUILD + [ "${_realver}" != "$pkgver" ] && pkgname=$_realname-$_flavor \ + && die "please set _realver to $pkgver" +fi + +# source the kernel version +if [ -f ../main/linux-${_flavor}/APKBUILD ]; then + . ../main/linux-${_flavor}/APKBUILD + [ "$_kver" != "$pkgver" ] && die "please set _kver to $pkgver" + [ "$_kpkgrel" != "$pkgrel" ] && die "please set _kpkgrel to $pkgrel" +fi + +_abiver="${_kver}-${_kpkgrel}" +_abi_releases="${_abiver}-${_flavor} ${_abiver}-virtgrsec" +_kernelver="$_kver-r$_kpkgrel" + +pkgname="$_realname-$_flavor" +pkgver=$_kver +pkgrel=$(($_kpkgrel + $_mypkgrel)) + +pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools." +url="https://github.com/vmware/open-vm-tools/" +arch="x86 x86_64" +license="LGPL" +subpackages="$_realname-virtgrsec:_virtgrsec" +depends="linux-${_flavor}=${_kernelver}" +depends_dev="bash glib-dev gettext-dev linux-${_flavor}-dev=${_kernelver} linux-virtgrsec-dev=${_kernelver}" +makedepends="$depends_dev autoconf automake libtool linux-headers" +source="https://github.com/vmware/open-vm-tools/archive/stable-$_ver.tar.gz + 0001-Fix-vmxnet-module-on-kernels-3.16.patch + missing-config-dir.patch + " +install_if="linux-${_flavor}=${_kernelver} open-vm-tools" + +builddir="$srcdir/open-vm-tools-stable-$_ver"/open-vm-tools + +prepare() { + cd "$builddir" + update_config_sub || return 1 + default_prepare || return 1 + autoreconf -vif || return 1 + for _abi in $_abi_releases; do + mkdir ../build-$_abi + cp -r * ../build-$_abi/ + done +} + +build() { + for _abi in $_abi_releases; do + cd "$builddir"/../build-$_abi + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --disable-deploypkg \ + --without-pam \ + --without-x \ + --without-dnet \ + --without-icu \ + --without-procps \ + --without-ssl \ + --with-kernel-release="${_abi}" \ + || return 1 + make -j1 -C modules modules MODULES="vmxnet vmhgfs" \ + || return 1 + done +} + +package() { + for _abi in $_abi_releases; do + mkdir -p "$pkgdir"/lib/modules/${_abi}/misc/ + cd "$builddir"/../build-$_abi + for module in $(find . -type f -name '*.ko'); do + install -D -m644 $module "$pkgdir/lib/modules/${_abi}/misc/" || return 1 + done + done +} + +_virtgrsec() { + pkgdesc="VMware guest modules for virtgrsec kernel" + mkdir -p "$subpkgdir"/lib/modules + mv "$pkgdir"/lib/modules/${_abiver}-virtgrsec "$subpkgdir"/lib/modules/ || return 1 +} + +md5sums="46f5a319275f63658f1a44b6c8755f6b stable-10.1.0.tar.gz +3254b99481cea970acd6d65863ce6b48 0001-Fix-vmxnet-module-on-kernels-3.16.patch +5ab8e8249a65a8b750c5bf278f438351 missing-config-dir.patch" +sha256sums="2b76d8461022774f2c077b032fbe870f86046f20724eb24824cf9b6ccc4b5355 stable-10.1.0.tar.gz +85be67ed9827e685d55dd5cba25144d95296159ff1be73f491b343c395dd6a7d 0001-Fix-vmxnet-module-on-kernels-3.16.patch +fb7a4bb532ffc81c8be73c66008538f4119a1147bbbdbf32328d286f012b2035 missing-config-dir.patch" +sha512sums="f497b828510ebc2a88788ad5292047f20513c844e889b3f652ecce382efd6d4672560be7387b55dcb7300cfdde5c8eda407836c9b75614c018e058bb169b374d stable-10.1.0.tar.gz +c445631b7faf8badfbf8e66518bfb70aec1049c1a0393ff038253e70190d7f8580cbcd3e7037c43664ee0ee48d26edd8f8eaca06383bbd7fa763a182050f9551 0001-Fix-vmxnet-module-on-kernels-3.16.patch +f77d3848d87d7c387d2cc1555ff3a39e547a8e8fcecee3aa1f785b828fd238c3779c1e5704f52ec46701b29a2ad9aec1cd5aef04677bc2a03b8a7780435f7fdd missing-config-dir.patch" diff --git a/unmaintained/open-vm-tools-grsec/missing-config-dir.patch b/unmaintained/open-vm-tools-grsec/missing-config-dir.patch new file mode 100644 index 0000000000..79a26ae03b --- /dev/null +++ b/unmaintained/open-vm-tools-grsec/missing-config-dir.patch @@ -0,0 +1,25 @@ +diff --git a/common-agent/etc/Makefile.am b/common-agent/etc/Makefile.am +index 25b386c..b6dd1bd 100644 +--- a/common-agent/etc/Makefile.am ++++ b/common-agent/etc/Makefile.am +@@ -15,7 +15,7 @@ + ### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + ################################################################################ + +-SUBDIRS = install config scripts ++SUBDIRS = install scripts + + uninstall-hook: + rm -rf $(DESTDIR)/etc/vmware-caf +diff --git a/configure.ac b/configure.ac +index 8d4604e..a4fc331 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1595,7 +1595,6 @@ AC_CONFIG_FILES([ \ + common-agent/input/invokers/Makefile \ + common-agent/input/providerReg/Makefile \ + common-agent/etc/Makefile \ +- common-agent/etc/config/Makefile \ + common-agent/etc/scripts/Makefile \ + common-agent/etc/install/Makefile \ + xferlogs/Makefile \ |