ports/contrib (3.6): Revert "open-vm-tools: dropped unmaintained port"
commit e91a6d3ae80ae2b826730e135660084051f95978 Author: Matt Housh <jaeger@crux.ninja> Date: Sun Jun 27 19:08:53 2021 -0500 Revert "open-vm-tools: dropped unmaintained port" This reverts commit 23b0ec23c0bcf3ea2022e0ca03e231ffba838b16. diff --git a/open-vm-tools/.footprint b/open-vm-tools/.footprint new file mode 100644 index 000000000..2e8b80157 --- /dev/null +++ b/open-vm-tools/.footprint @@ -0,0 +1,125 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/pam.d/ +-rwxr-xr-x root/root etc/pam.d/vmtoolsd +drwxr-xr-x root/root etc/rc.d/ +-rwxr-xr-x root/root etc/rc.d/vmtoolsd +drwxr-xr-x root/root etc/vmware-tools/ +-rwxr-xr-x root/root etc/vmware-tools/poweroff-vm-default +-rwxr-xr-x root/root etc/vmware-tools/poweron-vm-default +-rwxr-xr-x root/root etc/vmware-tools/resume-vm-default +drwxr-xr-x root/root etc/vmware-tools/scripts/ +drwxr-xr-x root/root etc/vmware-tools/scripts/vmware/ +-rwxr-xr-x root/root etc/vmware-tools/scripts/vmware/network +-rwxr-xr-x root/root etc/vmware-tools/statechange.subr +-rwxr-xr-x root/root etc/vmware-tools/suspend-vm-default +-rw-r--r-- root/root etc/vmware-tools/tools.conf.example +drwxr-xr-x root/root lib/ +drwxr-xr-x root/root lib/udev/ +drwxr-xr-x root/root lib/udev/rules.d/ +-rw-r--r-- root/root lib/udev/rules.d/99-vmware-scsi-udev.rules +drwxr-xr-x root/root sbin/ +lrwxrwxrwx root/root sbin/mount.vmhgfs -> /usr/sbin/mount.vmhgfs +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/vm-support +-rwxr-xr-x root/root usr/bin/vmtoolsd +-rwxr-xr-x root/root usr/bin/vmware-checkvm +-rwxr-xr-x root/root usr/bin/vmware-hgfsclient +-rwxr-xr-x root/root usr/bin/vmware-namespace-cmd +-rwxr-xr-x root/root usr/bin/vmware-rpctool +-rwxr-xr-x root/root usr/bin/vmware-toolbox-cmd +-rwxr-xr-x root/root usr/bin/vmware-xferlogs +drwxr-xr-x root/root usr/include/ +drwxr-xr-x root/root usr/include/libDeployPkg/ +-rw-r--r-- root/root usr/include/libDeployPkg/deploypkg.h +-rw-r--r-- root/root usr/include/libDeployPkg/guestcust-events.h +-rw-r--r-- root/root usr/include/libDeployPkg/guestrpc.h +-rw-r--r-- root/root usr/include/libDeployPkg/imgcust-api.h +-rw-r--r-- root/root usr/include/libDeployPkg/includeCheck.h +-rw-r--r-- root/root usr/include/libDeployPkg/linuxDeployment.h +-rw-r--r-- root/root usr/include/libDeployPkg/log.h +-rw-r--r-- root/root usr/include/libDeployPkg/process.h +-rw-r--r-- root/root usr/include/libDeployPkg/vm_basic_types.h +drwxr-xr-x root/root usr/include/vmGuestLib/ +-rw-r--r-- root/root usr/include/vmGuestLib/includeCheck.h +-rw-r--r-- root/root usr/include/vmGuestLib/vmGuestLib.h +-rw-r--r-- root/root usr/include/vmGuestLib/vmSessionId.h +-rw-r--r-- root/root usr/include/vmGuestLib/vm_basic_types.h +drwxr-xr-x root/root usr/lib/ +-rw-r--r-- root/root usr/lib/libDeployPkg.a +-rwxr-xr-x root/root usr/lib/libDeployPkg.la +lrwxrwxrwx root/root usr/lib/libDeployPkg.so -> libDeployPkg.so.0.0.0 +lrwxrwxrwx root/root usr/lib/libDeployPkg.so.0 -> libDeployPkg.so.0.0.0 +-rwxr-xr-x root/root usr/lib/libDeployPkg.so.0.0.0 +-rw-r--r-- root/root usr/lib/libguestStoreClient.a +-rwxr-xr-x root/root usr/lib/libguestStoreClient.la +lrwxrwxrwx root/root usr/lib/libguestStoreClient.so -> libguestStoreClient.so.0.0.0 +lrwxrwxrwx root/root usr/lib/libguestStoreClient.so.0 -> libguestStoreClient.so.0.0.0 +-rwxr-xr-x root/root usr/lib/libguestStoreClient.so.0.0.0 +-rw-r--r-- root/root usr/lib/libguestlib.a +-rwxr-xr-x root/root usr/lib/libguestlib.la +lrwxrwxrwx root/root usr/lib/libguestlib.so -> libguestlib.so.0.0.0 +lrwxrwxrwx root/root usr/lib/libguestlib.so.0 -> libguestlib.so.0.0.0 +-rwxr-xr-x root/root usr/lib/libguestlib.so.0.0.0 +-rw-r--r-- root/root usr/lib/libhgfs.a +-rwxr-xr-x root/root usr/lib/libhgfs.la +lrwxrwxrwx root/root usr/lib/libhgfs.so -> libhgfs.so.0.0.0 +lrwxrwxrwx root/root usr/lib/libhgfs.so.0 -> libhgfs.so.0.0.0 +-rwxr-xr-x root/root usr/lib/libhgfs.so.0.0.0 +-rw-r--r-- root/root usr/lib/libvmtools.a +-rwxr-xr-x root/root usr/lib/libvmtools.la +lrwxrwxrwx root/root usr/lib/libvmtools.so -> libvmtools.so.0.0.0 +lrwxrwxrwx root/root usr/lib/libvmtools.so.0 -> libvmtools.so.0.0.0 +-rwxr-xr-x root/root usr/lib/libvmtools.so.0.0.0 +drwxr-xr-x root/root usr/lib/open-vm-tools/ +drwxr-xr-x root/root usr/lib/open-vm-tools/plugins/ +drwxr-xr-x root/root usr/lib/open-vm-tools/plugins/common/ +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/common/libhgfsServer.la +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/common/libhgfsServer.so +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/common/libvix.la +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/common/libvix.so +drwxr-xr-x root/root usr/lib/open-vm-tools/plugins/vmsvc/ +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/vmsvc/libappInfo.so +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/vmsvc/libdeployPkgPlugin.so +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/vmsvc/libgdp.so +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/vmsvc/libguestInfo.so +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/vmsvc/libguestStore.so +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/vmsvc/libpowerOps.so +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/vmsvc/libresolutionKMS.so +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/vmsvc/libtimeSync.so +-rwxr-xr-x root/root usr/lib/open-vm-tools/plugins/vmsvc/libvmbackup.so +drwxr-xr-x root/root usr/lib/pkgconfig/ +-rw-r--r-- root/root usr/lib/pkgconfig/libDeployPkg.pc +-rw-r--r-- root/root usr/lib/pkgconfig/vmguestlib.pc +drwxr-xr-x root/root usr/sbin/ +-rwxr-xr-x root/root usr/sbin/mount.vmhgfs +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/open-vm-tools/ +drwxr-xr-x root/root usr/share/open-vm-tools/messages/ +drwxr-xr-x root/root usr/share/open-vm-tools/messages/de/ +-rw-r--r-- root/root usr/share/open-vm-tools/messages/de/toolboxcmd.vmsg +-rw-r--r-- root/root usr/share/open-vm-tools/messages/de/vmtoolsd.vmsg +drwxr-xr-x root/root usr/share/open-vm-tools/messages/en/ +-rw-r--r-- root/root usr/share/open-vm-tools/messages/en/toolboxcmd.vmsg +-rw-r--r-- root/root usr/share/open-vm-tools/messages/en/vmtoolsd.vmsg +drwxr-xr-x root/root usr/share/open-vm-tools/messages/es/ +-rw-r--r-- root/root usr/share/open-vm-tools/messages/es/toolboxcmd.vmsg +-rw-r--r-- root/root usr/share/open-vm-tools/messages/es/vmtoolsd.vmsg +drwxr-xr-x root/root usr/share/open-vm-tools/messages/fr/ +-rw-r--r-- root/root usr/share/open-vm-tools/messages/fr/toolboxcmd.vmsg +-rw-r--r-- root/root usr/share/open-vm-tools/messages/fr/vmtoolsd.vmsg +drwxr-xr-x root/root usr/share/open-vm-tools/messages/it/ +-rw-r--r-- root/root usr/share/open-vm-tools/messages/it/toolboxcmd.vmsg +-rw-r--r-- root/root usr/share/open-vm-tools/messages/it/vmtoolsd.vmsg +drwxr-xr-x root/root usr/share/open-vm-tools/messages/ja/ +-rw-r--r-- root/root usr/share/open-vm-tools/messages/ja/toolboxcmd.vmsg +-rw-r--r-- root/root usr/share/open-vm-tools/messages/ja/vmtoolsd.vmsg +drwxr-xr-x root/root usr/share/open-vm-tools/messages/ko/ +-rw-r--r-- root/root usr/share/open-vm-tools/messages/ko/toolboxcmd.vmsg +-rw-r--r-- root/root usr/share/open-vm-tools/messages/ko/vmtoolsd.vmsg +drwxr-xr-x root/root usr/share/open-vm-tools/messages/zh_CN/ +-rw-r--r-- root/root usr/share/open-vm-tools/messages/zh_CN/toolboxcmd.vmsg +-rw-r--r-- root/root usr/share/open-vm-tools/messages/zh_CN/vmtoolsd.vmsg +drwxr-xr-x root/root usr/share/open-vm-tools/messages/zh_TW/ +-rw-r--r-- root/root usr/share/open-vm-tools/messages/zh_TW/toolboxcmd.vmsg +-rw-r--r-- root/root usr/share/open-vm-tools/messages/zh_TW/vmtoolsd.vmsg diff --git a/open-vm-tools/.signature b/open-vm-tools/.signature new file mode 100644 index 000000000..288fd3923 --- /dev/null +++ b/open-vm-tools/.signature @@ -0,0 +1,6 @@ +untrusted comment: verify with /etc/ports/contrib.pub +RWSagIOpLGJF30VPQXFzMx6DePAl8zTGtxquiVyhPwi66w/ryHrcWdapZzfrEf4HUH/2bgvmCFnuxjQv78NabH+oWnMYTnGXYgQ= +SHA256 (Pkgfile) = b4f98c8f0bc490ba2e6f4f9da14a92e7f7d2cfdd8b941b4ca254a372e7cce12c +SHA256 (.footprint) = f6b83c5dbbb030defc8d919331b27f0784cf3676793c0cd64074a0fc98bd13e2 +SHA256 (open-vm-tools-11.3.0-18090558.tar.gz) = 9bad3ee755340853bf7990e92f3d3880959a73e0749e8aaae62730854368bd2c +SHA256 (vmtoolsd) = a443b32dd7b0505db463ed20ff10c0ea3aefc41f003feb704921afa4c72325d8 diff --git a/open-vm-tools/Pkgfile b/open-vm-tools/Pkgfile new file mode 100644 index 000000000..61ff456ab --- /dev/null +++ b/open-vm-tools/Pkgfile @@ -0,0 +1,28 @@ +# Description: A set of services and modules that enable several features in VMware products for better management of, and seamless user interactions with, guests +# URL: https://github.com/vmware/open-vm-tools +# Maintainer: Matt Housh, jaeger at crux dot ninja +# Depends on: libmspack libdnet glib rpcsvc-proto + +name=open-vm-tools +version=11.3.0-18090558 +release=1 +source=(https://github.com/vmware/$name/releases/download/stable-${version%-*}/$name-$version.tar.gz \ + vmtoolsd) + +build() { + cd $name-$version + ./configure --prefix=/usr \ + --without-icu \ + --without-x \ + --without-xerces + make + make DESTDIR=$PKG install + + install -o root -g root -m 0755 -D $SRC/vmtoolsd \ + $PKG/etc/rc.d/vmtoolsd + + # fix mount.vmhgfs symlink + ln -sf /usr/sbin/mount.vmhgfs $PKG/sbin/mount.vmhgfs + + sed -i -e '/pam_unix_/d' $PKG/etc/pam.d/vmtoolsd +} diff --git a/open-vm-tools/README b/open-vm-tools/README new file mode 100644 index 000000000..3de139860 --- /dev/null +++ b/open-vm-tools/README @@ -0,0 +1,45 @@ +README for open-vm-tools + +INTRODUCTION + +This port contains VMware Tools. You should install it if you are running CRUX +as a virtual machine under the VMware hypervisor. +This has only been tested on single core 32-bit virtual machines. +The VMware filesystem (vmhgfs) has not been tested. +Feedback is appreciated. + +POST-INSTALL + +1. Run the post-install script. +2. Add vmtools to the list of services to start at boot time. + +FAQ + +Q: What is the difference between this and the official commercial VMware Tools + distribution? + +A: This code comes from the GPL release of VMware's tools, so in theory + it should work just as the commercial version. + That said, since this port is intended to be used on a server environment, + all the desktop utilities have been removed (eg: no GUI applications). + +Q: Where is the driver for the VMware network adapter and disk controller? + +A: Some device drivers are already included in the Linux kernel and disabled + in this port. + Please enable these kernel options: + * CONFIG_VMWARE_BALLOON + * CONFIG_VMWARE_PVSCSI + * CONFIG_VMXNET3 + If your boot filesystem is connected to a paravirtual SCSI interface make + sure CONFIG_VMWARE_PVSCSI is set as builtin instead of module. + + +Q: Why do I have to shutdown/reboot twice my VM from VMware before it reacts? + +A: Did you run the post-install script? + + +-- +If you have any feedback/problems please email me: +Alan Mizrahi, alan at mizrahi dot com dot ve diff --git a/open-vm-tools/post-install b/open-vm-tools/post-install new file mode 100644 index 000000000..ef33139bc --- /dev/null +++ b/open-vm-tools/post-install @@ -0,0 +1,2 @@ +#!/bin/sh +crux > /etc/release diff --git a/open-vm-tools/tools.conf b/open-vm-tools/tools.conf new file mode 100644 index 000000000..266d3854f --- /dev/null +++ b/open-vm-tools/tools.conf @@ -0,0 +1,11 @@ +[logging] +log=syslog +level=warning +vmsvc.level=warning +vmsvc.data=/var/log/vmware-vmsvc.log +vmusr.handler=syslog +vmusr.level=warning +vmusr.data=/var/log/vmware-vmsvc.log.user + +[vmsvc] +disable-tools-version=true diff --git a/open-vm-tools/vmtools.rc b/open-vm-tools/vmtools.rc new file mode 100755 index 000000000..71db6e4f4 --- /dev/null +++ b/open-vm-tools/vmtools.rc @@ -0,0 +1,77 @@ +#!/bin/bash + +NAME=vmtools +USER=root +CONFIG="/etc/vmware-tools/tools.conf" +RUNDIR="/var/run" +PIDFILE="$RUNDIR/vmtoolsd.pid" +STARTCMD="/usr/bin/vmtoolsd --config=$CONFIG --background=$PIDFILE" +STOPCMD="" +STOPTIMEOUT=300 + +function getpid() { + if [ -z "$PIDFILE" ]; then + pid="$(pgrep -xfn "$STARTCMD")" + else + if [ -f "$PIDFILE" ]; then + pid=$(< $PIDFILE) + if [ ! -d /proc/"$pid" ]; then + echo "$NAME: removing stale pidfile $PIDFILE" >&2 + rm -f "$PIDFILE" + unset pid + fi + fi + fi + echo "$pid" +} + +case $1 in +start) + pid=$(getpid) + install -d -m 755 -o $USER $RUNDIR || exit 1 + if [ -n "$pid" ]; then + echo "$NAME already running with pid $pid" >&2 + exit 1 + fi + eval "$STARTCMD" + ;; +stop) + pid=$(getpid) + if [ -n "$pid" ]; then + if [ -n "$STOPCMD" ]; then + eval "$STOPCMD" + else + kill "$pid" + fi + t=$(printf '%(%s)T' -1) + tend=$((t+STOPTIMEOUT)) + while [ -d /proc/$pid -a $t -lt $tend ]; do + sleep 0.5 + t=$(printf '%(%s)T' -1) + done + if [ -d /proc/"$pid" ]; then + echo "$NAME still running with pid $pid" >&2 + else + [ -n "$PIDFILE" ] && rm -f "$PIDFILE" + fi + else + echo "$NAME is not running" >&2 + fi + ;; +restart) + $0 stop + $0 start + ;; +status) + pid=$(getpid) + if [ -n "$pid" ]; then + echo "$NAME is running with pid $pid" + else + echo "$NAME is not running" + fi + ;; +*) + echo "usage: $0 [start|stop|restart|status]" + ;; +esac + diff --git a/open-vm-tools/vmtoolsd b/open-vm-tools/vmtoolsd new file mode 100755 index 000000000..6c30d666c --- /dev/null +++ b/open-vm-tools/vmtoolsd @@ -0,0 +1,36 @@ +#!/bin/sh +# +# /etc/rc.d/vmtoolsd: start/stop vmtoolsd daemon +# + +SSD=/sbin/start-stop-daemon +PROG=/usr/bin/vmtoolsd +PID=/var/run/vmtoolsd.pid +OPTS="-b ${PID}" + +case $1 in + start) + $SSD --start --pidfile $PID --exec $PROG -- $OPTS + ;; + stop) + $SSD --stop --retry 10 --pidfile $PID + ;; + restart) + $0 stop + $0 start + ;; + status) + $SSD --status --pidfile $PID + case $? in + 0) echo "$PROG is running with pid $(cat $PID)" ;; + 1) echo "$PROG is not running but the pid file $PID exists" ;; + 3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + ;; + *) + echo "usage: $0 [start|stop|restart|status]" + ;; +esac + +# End of file
participants (1)
-
crux@crux.nu