diff options
Diffstat (limited to 'main/open-vm-tools')
-rw-r--r-- | main/open-vm-tools/APKBUILD | 44 | ||||
-rw-r--r-- | main/open-vm-tools/open-vm-tools.confd | 7 | ||||
-rw-r--r-- | main/open-vm-tools/open-vm-tools.initd | 103 |
3 files changed, 62 insertions, 92 deletions
diff --git a/main/open-vm-tools/APKBUILD b/main/open-vm-tools/APKBUILD index b2c0ef9500..efa1dc24dc 100644 --- a/main/open-vm-tools/APKBUILD +++ b/main/open-vm-tools/APKBUILD @@ -3,7 +3,7 @@ pkgname=open-vm-tools pkgver=10.1.0 _pkgsubver=${pkgver#*_p} _ver=${pkgver/_p/-} -pkgrel=2 +pkgrel=3 pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools." url="https://github.com/vmware/open-vm-tools/" @@ -34,6 +34,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/vmware/open-vm-tools/archive 0014-remove-references-to-missing-common-agent-etc-config.patch open-vm-tools.initd + open-vm-tools.confd " builddir="$srcdir"/open-vm-tools-stable-$_ver @@ -63,9 +64,13 @@ build() { package() { cd "$builddir"/open-vm-tools + make install DESTDIR=$pkgdir || return 1 + install -Dm755 "$srcdir"/open-vm-tools.initd \ - "$pkgdir"/etc/init.d/open-vm-tools + "$pkgdir"/etc/init.d/open-vm-tools || return 1 + install -Dm755 "$srcdir"/open-vm-tools.confd \ + "$pkgdir"/etc/conf.d/open-vm-tools || return 1 mkdir -p "$pkgdir"/etc/modules-load.d/ cat >"$pkgdir"/etc/modules-load.d/open-vm-tools<<EOF @@ -91,38 +96,6 @@ gtk() { "$subpkgdir"/usr/lib/open-vm-tools/plugins/ } -md5sums="46f5a319275f63658f1a44b6c8755f6b open-vm-tools-10.1.0.tar.gz -509669f313820e1de957786a812c1323 0001-remove-autotools-generated-files.patch -c731466639f803e836fdfd65012ee133 0002-lib-misc-Recognize-Alpine-Linux.patch -5465735479dafd1b794a5c1f3b76569c 0003-open-vm-tools-Add-disable-werror-configure-option.patch -b9dffbf3f6e286329cbda37ed5fc9668 0004-Do-not-assume-that-linux-and-gnu-libc-are-the-same-t.patch -86f2351fa2d58572574424451faaeb1b 0005-Use-configure-test-for-struct-timespec.patch -a491d60823bb6d09f04d537f8611c59e 0006-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch -bcf9081bb6274f1ccf9678758a363072 0007-Use-configure-to-test-for-feature-instead-of-platfor.patch -2604d702a4b7512cc5746b641801bffd 0008-Use-configure-test-for-sys-stat.h-include.patch -98018d5ada49d4867f95b73419608c0a 0009-Rename-poll.h-to-vm_poll.h.patch -72ca616b5e32b174acc100e38faa0967 0010-Add-support-for-building-with-system-libtirpc.patch -e53951c2c92051e5c438a7ba0843aaae 0011-gnu-ucontext.patch -0ce71ad6c2d7a292abccb21cc0b3b679 0012-use-posix-strerror_r-unless-gnu.patch -d05d991069018fda5fd1b6d9cc7a51e5 0013-use-off64_t-instead-of-loff_t.patch -abb3bffc30a445cedb8b4855f6cc7ec7 0014-remove-references-to-missing-common-agent-etc-config.patch -d666cfe7f779f9cb6b5c2260f6c50b54 open-vm-tools.initd" -sha256sums="2b76d8461022774f2c077b032fbe870f86046f20724eb24824cf9b6ccc4b5355 open-vm-tools-10.1.0.tar.gz -d64a81213c1db39f92b7f7c381e28d111cd15099464d3856eea8bd7ab916373c 0001-remove-autotools-generated-files.patch -4e37095e09994d57c8d115c4376c777b6a4081702d1381f6f8bc476494e70862 0002-lib-misc-Recognize-Alpine-Linux.patch -a57d662e30b879b09a5f641810068aa9fb97d28f0e0bd91d1379971e300fe66b 0003-open-vm-tools-Add-disable-werror-configure-option.patch -d14bfbe6e914544ff879f1e0f4ed136c3a3ccc923021cbc21d1514fb8f96b2aa 0004-Do-not-assume-that-linux-and-gnu-libc-are-the-same-t.patch -31f5c64a22d80d26c009b4eb71be8daf2bf726fb2dfac983cf82df98b35fa954 0005-Use-configure-test-for-struct-timespec.patch -2fea0395e1dcfba9810fa05bdd0ed2635d0a57873942374154704ea6a865c879 0006-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch -9dbee023febafa00ccba6a5df3c07653ccf2fa9c6a38d813c9b2135d06d04864 0007-Use-configure-to-test-for-feature-instead-of-platfor.patch -84e64377eab9822aab73c2daf902ca7c062750efa17c5441886321016705b315 0008-Use-configure-test-for-sys-stat.h-include.patch -78b807398d710c6dc7506457827e4b721055e798efe067aa5f4713fc21682d48 0009-Rename-poll.h-to-vm_poll.h.patch -b51c76287154ce42876951f25cf77846231ad520097c66c203a845828f1d77a1 0010-Add-support-for-building-with-system-libtirpc.patch -98f451d400a90d9fac389f0420a895d764296f1a15ac6e8c4b622afb491d91b6 0011-gnu-ucontext.patch -b19397bffce98d06b668ea1dd774f5a6a7f8f8e58ad9e23ad820b50f7824cef9 0012-use-posix-strerror_r-unless-gnu.patch -aa02fd095d8e82523b6ef00d446534a51a42ffb5f3729f3ab5c75ceb666e21b8 0013-use-off64_t-instead-of-loff_t.patch -3a37f1f064591949c60ed5127ea96c403db00e9457ddcbb6a8b31f5c7f6d9713 0014-remove-references-to-missing-common-agent-etc-config.patch -5b824642ecf298136d39bc40ed25b4d62e1a83ecbdc6b3fe428c520c95f65479 open-vm-tools.initd" sha512sums="f497b828510ebc2a88788ad5292047f20513c844e889b3f652ecce382efd6d4672560be7387b55dcb7300cfdde5c8eda407836c9b75614c018e058bb169b374d open-vm-tools-10.1.0.tar.gz 529d2c43f8a9ab011dd60da6bcbbc09f26c1aed350e1e712ac1a6e9d363010d842e0cc19e5bbcea08a130d33a3916519d8fa7326c3f6aba352820d1a0afff636 0001-remove-autotools-generated-files.patch 1c5766a040cc7ffcaba407960b502c0d3a67f5b3d6e090f789a547cce9c9dc45980a33220f9a619d731ddebbc8a442a4810f7a48269df0c5f24504de148ba352 0002-lib-misc-Recognize-Alpine-Linux.patch @@ -138,4 +111,5 @@ d0551458fa6a9d9fd3e576f856fb0269e1a40930ab625bd5243a256a90ca89b3a90e7bd97678ca83 4d55f8bc31afe70831992b70e600a47078026d0f00215ef8284a97859d05167d33e23c2512bc17827b396cab070e2a200ae667d4dc918fef98c059559575e822 0012-use-posix-strerror_r-unless-gnu.patch af109a9aab9da5f312e1f06a4db318f577a5bbb22a8974892a9a1f6941865fea663694362dd8ffb0d8cbe776f3297458bec1004131b3e92b8da003506087df39 0013-use-off64_t-instead-of-loff_t.patch d30c74e2de1ae729fb0eec9f510c89b9c5180478b3ace625dd7a0b3fa3fd269ddbdcf802c6c014e39da794b36891beed2f5b85e7c6a0179ec0723ee6be390782 0014-remove-references-to-missing-common-agent-etc-config.patch -c675323a823b3069a281d1b2c1dedccd9d9959e36cffb4763ab72fcf7e828fb1a048a20e005c15a46697a98a61e073bcd778db427a6f77c7b24ac20133f95695 open-vm-tools.initd" +60a48c1fde857a68bfcf6587b714a06455d6b27b95c103bc1aa8b7f5edfbdf9683e2b5be07b24b3fef4d91691ebb1841f791048f2ae2f09164f7d4187088fa10 open-vm-tools.initd +ffc9c945a41e48791bab61ba72fed96c1a6ae3722caa715424e3077d167421b4e2f53bb4d415ab227d1f6e40d6ca3779df41e6b0a38db34b520979fa2b19298d open-vm-tools.confd" diff --git a/main/open-vm-tools/open-vm-tools.confd b/main/open-vm-tools/open-vm-tools.confd new file mode 100644 index 0000000000..a1f0d56dde --- /dev/null +++ b/main/open-vm-tools/open-vm-tools.confd @@ -0,0 +1,7 @@ +# Configuration for /etc/init.d/open-vm-tools + +# Set this to 'yes' to enable drag & drop (and vmblock) loading. +#vm_drag_and_drop="no" + +# Additional options to pass into vmtoolsd. +#command_args="" diff --git a/main/open-vm-tools/open-vm-tools.initd b/main/open-vm-tools/open-vm-tools.initd index 89e920c8c4..08f20a37d5 100644 --- a/main/open-vm-tools/open-vm-tools.initd +++ b/main/open-vm-tools/open-vm-tools.initd @@ -1,76 +1,65 @@ #!/sbin/openrc-run -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools/files/open-vm-tools.initd,v 1.2 2009/12/20 14:05:43 vadimk Exp $ -DND_TMPDIR="/tmp/VMwareDnD" -USER_GROUP="root:vmware" -DND_TMPDIR_PERMS="1777" -GUESTD_BIN="/usr/bin/vmtoolsd" -PIDFILE="/var/run/vmtoolsd.pid" -MOUNTPOINT="/proc/fs/vmblock/mountPoint" +# Note: $VM_DRAG_AND_DROP is here for backward compatibility. +: ${vm_drag_and_drop:="${VM_DRAG_AND_DROP:-}"} + +command="/usr/bin/vmtoolsd" +command_background="yes" +pidfile="/run/vmtoolsd.pid" + +vmblockmntpt="/proc/fs/vmblock/mountPoint" +vmblockfusemntpt="/run/vmblock-fuse" depend() { before net X } -start() { - if [ "${VM_DRAG_AND_DROP}" == "yes" ]; - then +start_vmblock() { + checkpath -d -m 1777 /tmp/VMwareDnD - if ! grep -q -w vmblock /proc/modules; - then - ebegin "Loading vmblock module" - modprobe vmblock - eend $? - sleep 0.25 - fi + if command -v vmware-vmblock-fuse > /dev/null; then + modprobe fuse > /dev/null 2>&1 + checkpath -d "$vmblockfusemntpt" - if [[ ! -d "${DND_TMPDIR}" ]]; - then - # einfo "Creating the VM drag and drop directory" - mkdir "${DND_TMPDIR}" - chown "${USER_GROUP}" "${DND_TMPDIR}" - chmod "${DND_TMPDIR_PERMS}" "${DND_TMPDIR}" - fi + ebegin "Mounting vmblock-fuse" + vmware-vmblock-fuse \ + -o subtype=vmware-vmblock,default_permissions,allow_other \ + "$vmblockfusemntpt" + eend $? + else + modprobe vmblock > /dev/null 2>&1 + checkpath -d "$vmblockmntpt" - # DnD_TMPDIR must exist before vmblock can be mounted - ebegin "Mounting vmblock device" - mount -t vmblock none ${MOUNTPOINT} + ebegin "Mounting vmblock" + mount -t vmblock vmblock "$vmblockmntpt" eend $? fi - - ebegin "Starting vmtoolsd" - start-stop-daemon --user "${USER_GROUP}" --start --quiet --background --make-pidfile --pidfile "${PIDFILE}" --exec ${GUESTD_BIN} - eend $? } -stop() { - local ret - - if [ "${VM_DRAG_AND_DROP}" == "yes" ]; - then - ebegin "Cleaning the contents of ${DND_TMPDIR}" - # First check, whether ${DND_TMPDIR} isn valid... we shouldn't risk deleting the content of ""/* - if [[ ! -z "${DND_TMPDIR}" ]] && [[ "${DND_TMPDIR}" != "/" ]]; - then - rm -rf ${DND_TMPDIR}/* - ret=0 - else - eerror "Not cleaning up ${DND_TMPDIR}, please check definition of variable" - ret=1 - fi - eend $ret +stop_vmblock() { + if [ -d "$vmblockfusemntpt" ]; then + ebegin "Unmounting vmblock-fuse" + umount "$vmblockfusemntpt" + eend $? + else + ebegin "Unmounting vmblock" + umount "$vmblockmntpt" + eend $? + fi +} - ebegin "Unmounting vmblock device" - if grep -q -w "${MOUNTPOINT}" /proc/mounts; - then - umount ${MOUNTPOINT} 1>&2 > /dev/null - fi - eend 0 +start_pre() { + if [ "$vm_drag_and_drop" = yes ]; then + start_vmblock fi + return 0 +} - ebegin "Stopping vmtoolsd" - start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" - eend $? +stop_post() { + if [ "$vm_drag_and_drop" = yes ]; then + stop_vmblock + fi + return 0 } |