Skip to contentSkip to conversation

New package: openvmtools

PATCH Superseded Karoly Kasza 1 participant 1 message Jul 31, 2014

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 New package: openvmtools

New package: openvmtools

---

Changes v4 -> v5:
- Removed submenu
- BR2_PACKAGE_BUSYBOX_SHOW_OTHERS for procps is now depended on instead of selected
- Startup script indenting changed, and start-stop-daemon used now
- OPENVMTOOLS_CONF_OPT & OPENVMTOOLS_CONF_ENV changed
- Comments, whitespacing, etc.

 package/Config.in                                  |    1 +
 package/openvmtools/Config.in                      |   55 ++++++++++++++
 package/openvmtools/S10vmtoolsd                    |   33 +++++++++
 .../openvmtools-01-has_bsd_printf.patch            |   26 +++++++
 package/openvmtools/openvmtools.mk                 |   76 ++++++++++++++++++++
 package/openvmtools/shutdown                       |    7 ++
 package/openvmtools/vmtoolsd.service               |    8 +++
 7 files changed, 206 insertions(+)
 create mode 100644 package/openvmtools/Config.in
 create mode 100644 package/openvmtools/S10vmtoolsd
 create mode 100644 package/openvmtools/openvmtools-01-has_bsd_printf.patch
 create mode 100644 package/openvmtools/openvmtools.mk
 create mode 100644 package/openvmtools/shutdown
 create mode 100644 package/openvmtools/vmtoolsd.service
package/Config.in +1 -0
index 29b8e6b..be42002 100644
@@ -1165,6 +1165,7 @@ endif
 	source "package/ncdu/Config.in"
 	source "package/numactl/Config.in"
 	source "package/nut/Config.in"
+	source "package/openvmtools/Config.in"
 	source "package/powerpc-utils/Config.in"
 	source "package/polkit/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
package/openvmtools/Config.in new file +55 -0

55 lines not on this page · raw message

package/openvmtools/S10vmtoolsd new file +33 -0
new file mode 100644
index 0000000..969ba93
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# Starts vmtoolsd for openvmtools
+#
+
+EXEC="/usr/bin/vmtoolsd"
+ARGS="-b"
+PID="/var/run/vmtoolsd.pid"
+
+case "$1" in
+  start)
+    echo -n "Starting vmtoolsd: "
+    start-stop-daemon -S -q -x $EXEC -- $ARGS $PID
+    if [ $? != 0 ]; then
+      echo "FAILED"
+      exit 1
+    else
+      echo "OK"
+    fi
+  ;;
+  stop)
+    echo -n "Stopping vmtoolsd: "
+    start-stop-daemon -K -q -p $PID
+    echo "OK"
+  ;;
+  restart|reload)
+    $0 stop
+    $0 start
+  ;;
+  *)
+    echo "Usage: $0 {start|stop|restart}"
+    exit 1
+esac
package/openvmtools/openvmtools-01-has_bsd_printf.patch new file +26 -0
new file mode 100644
index 0000000..889f7d1
@@ -0,0 +1,26 @@
+lib/misc/msgList.c: missing #ifdef
+
+This macro checks for BSD style printf(), which is not present
+when compiling for uClibc. The linked functions are unnecessary in
+this case, and they break compilation.
+
+Signed-off-by: Karoly Kasza <[email protected]>
+
+--- open-vm-tools-9.4.6-1770165.orig/lib/misc/msgList.c	2014-07-02 00:21:14.000000000 +0200
++++ open-vm-tools-9.4.6-1770165/lib/misc/msgList.c	2014-07-29 13:40:40.000000000 +0200
+@@ -487,6 +487,7 @@
+    return messages->id;
+ }
+ 
++#ifdef HAS_BSD_PRINTF
+ 
+ /*
+  *----------------------------------------------------------------------
+@@ -566,6 +567,7 @@
+    }
+ }
+ 
++#endif
+ 
+ /*
+  *----------------------------------------------------------------------
package/openvmtools/openvmtools.mk new file +76 -0

76 lines not on this page · raw message

package/openvmtools/shutdown new file +7 -0
new file mode 100644
index 0000000..bca9765
@@ -0,0 +1,7 @@
+#!/bin/sh
+#compatibility script for openvmtools
+if [ "$1" == "-r" ]; then
+/sbin/reboot
+else
+/sbin/poweroff
+fi
package/openvmtools/vmtoolsd.service new file +8 -0
new file mode 100644
index 0000000..b099ba3
@@ -0,0 +1,8 @@
+[Unit]
+Description=vmtoolsd for openvmtools
+
+[Service]
+ExecStart=/usr/bin/vmtoolsd -b /var/run/vmtoolsd.pid
+
+[Install]
+WantedBy=multi-user.target
Signature · 1 line
1.7.10.4