Skip to contentSkip to conversation

New package: openvmtools

PATCH Superseded Karoly Kasza 2 participants 5 messages Aug 8, 2014 – Sep 2, 2014 2 messages not in the archive

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 New package: openvmtools

New package: openvmtools

---

Changes v5 -> v6:
- Added workaround patch for suspend/resume
- Corrected systemd service script

 package/Config.in                                  |    1 +
 package/openvmtools/Config.in                      |   55 ++++++++++++++
 package/openvmtools/S10vmtoolsd                    |   33 +++++++++
 .../openvmtools-01-has_bsd_printf.patch            |   26 +++++++
 .../openvmtools-02-network_script.patch            |   21 ++++++
 package/openvmtools/openvmtools.mk                 |   76 ++++++++++++++++++++
 package/openvmtools/shutdown                       |    7 ++
 package/openvmtools/vmtoolsd.service               |   14 ++++
 8 files changed, 233 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-02-network_script.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 4520ba6..817c231 100644
@@ -1168,6 +1168,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-02-network_script.patch new file +21 -0
new file mode 100644
index 0000000..67705cc
@@ -0,0 +1,21 @@
+scripts/linux/network: exit normally if no network control script
+
+When using suspend/resume from the hypervisor, openvmtools checks for the
+networking script, and exists with an error if not found, making the hypervisor
+raise a warning message. This workaround silences that error message.
+
+Signed-off-by: Karoly Kasza <[email protected]>
+
+--- open-vm-tools-9.4.6-1770165.orig/scripts/linux/network	2014-07-02 00:21:14.000000000 +0200
++++ open-vm-tools-9.4.6-1770165/scripts/linux/network	2014-08-07 16:34:21.963514273 +0200
+@@ -88,7 +88,9 @@
+ run_network_script()
+ {
+    script=`find_networking_script`
+-   [ "$script" != "error" ] || Panic "Cannot find system networking script."
++#   [ "$script" != "error" ] || Panic "Cannot find system networking script."
++# Modified for buildroot
++   [ "$script" != "error" ] || exit 0
+ 
+    # Using SysV "service" if it exists, otherwise fall back to run the script directly
+    service=`which service 2>/dev/null`
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 +14 -0
new file mode 100644
index 0000000..17a4df4
@@ -0,0 +1,14 @@
+[Unit]
+Description=vmtoolsd for openvmtools
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/vmtoolsd.pid
+ExecStart=/usr/bin/vmtoolsd -b /var/run/vmtoolsd.pid
+Restart=on-failure
+KillMode=process
+KillSignal=SIGKILL
+
+[Install]
+WantedBy=multi-user.target
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v6 1/1 New package: openvmtools

Hello reviewers,

could anyone please verify if this package is suitable for committing to 2014.11?
Thank you in advance!

Kind regards,
Karoly

Quoted 340 lines · Karoly Kasza

New package: openvmtools

---

Changes v5 -> v6:
- Added workaround patch for suspend/resume
- Corrected systemd service script

 package/Config.in                                  |    1 +
 package/openvmtools/Config.in                      |   55 ++++++++++++++
 package/openvmtools/S10vmtoolsd                    |   33 +++++++++
 .../openvmtools-01-has_bsd_printf.patch            |   26 +++++++
 .../openvmtools-02-network_script.patch            |   21 ++++++
 package/openvmtools/openvmtools.mk                 |   76
++++++++++++++++++++
 package/openvmtools/shutdown                       |    7 ++
 package/openvmtools/vmtoolsd.service               |   14 ++++
 8 files changed, 233 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-02-network_script.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 4520ba6..817c231 100644
@@ -1168,6 +1168,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 +18 -0
new file mode 100644
index 0000000..65220f9
@@ -0,0 +1,55 @@
+config BR2_PACKAGE_OPENVMTOOLS
+       bool "openvmtools"
+       depends on BR2_i386 || BR2_x86_64
+       depends on BR2_USE_MMU # libglib2
+       depends on BR2_USE_WCHAR # libglib2
+       depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
+       depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
+       depends on BR2_LARGEFILE
+       depends on BR2_ENABLE_LOCALE
+       select BR2_PACKAGE_LIBGLIB2
+       help
+         Open Virtual Machine Tools for VMware guest OS
+
+         http://open-vm-tools.sourceforge.net/
+
+         ICU locales and X11 tools are currently not supported.
+
+         NOTE: Support for vmblock-fuse will be enabled in openvmtools if

the

package/openvmtools/Config.in new file +33 -0
+               libfuse package is selected.
+
+if BR2_PACKAGE_OPENVMTOOLS
+
+config BR2_PACKAGE_OPENVMTOOLS_PROCPS
+       bool "procps support"
+       depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+       select BR2_PACKAGE_PROCPS_NG
+       help
+         Enable support for procps / meminfo
+
+comment "procps support needs BR2_PACKAGE_BUSYBOX_SHOW_OTHERS"
+       depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+
+config BR2_PACKAGE_OPENVMTOOLS_DNET
+       bool "dnet support"
+       depends on BR2_INET_IPV6
+       select BR2_PACKAGE_LIBDNET
+       help
+         Enable support for libdnet / nicinfo
+
+comment "openvmtools dnet support needs a toolchain w/ IPv6"
+       depends on !BR2_INET_IPV6
+
+config BR2_PACKAGE_OPENVMTOOLS_PAM
+       bool "PAM support"
+       select BR2_PACKAGE_LINUX_PAM
+       help
+         Support for PAM in openvmtools
+
+endif
+
+comment "openvmtools needs a toolchain w/ wchar, threads, RPC, largefile,

locale"

package/openvmtools/Config.in new file +4 -0
+       depends on BR2_i386 || BR2_x86_64
+       depends on BR2_USE_MMU
+       depends on !BR2_USE_WCHAR ||!BR2_TOOLCHAIN_HAS_THREADS || \
+       !BR2_TOOLCHAIN_HAS_NATIVE_RPC || !BR2_LARGEFILE ||

!BR2_ENABLE_LOCALE

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 +9 -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 @@

package/openvmtools/openvmtools-01-has_bsd_printf.patch new file +15 -0
+    return messages->id;
+ }
+
++#ifdef HAS_BSD_PRINTF
+
+ /*
+  *----------------------------------------------------------------------
+@@ -566,6 +567,7 @@
+    }
+ }
+
++#endif
+
+ /*
+  *----------------------------------------------------------------------
package/openvmtools/openvmtools-02-network_script.patch new file +4 -0
new file mode 100644
index 0000000..67705cc
@@ -0,0 +1,21 @@
+scripts/linux/network: exit normally if no network control script
+
+When using suspend/resume from the hypervisor, openvmtools checks for the
+networking script, and exists with an error if not found, making the

hypervisor

package/openvmtools/openvmtools-02-network_script.patch new file +5 -0
+raise a warning message. This workaround silences that error message.
+
+Signed-off-by: Karoly Kasza <[email protected]>
+
+--- open-vm-tools-9.4.6-1770165.orig/scripts/linux/network     2014-07-02

00:21:14.000000000 +0200
++++ open-vm-tools-9.4.6-1770165/scripts/linux/network 2014-08-07 16:34:21.963514273 +0200
+@@ -88,7 +88,9 @@
+ run_network_script()
+ {
+ script=find_networking_script
+- [ "$script" != "error" ] || Panic "Cannot find system networking
script."
++# [ "$script" != "error" ] || Panic "Cannot find system networking
script."
++# Modified for buildroot
++ [ "$script" != "error" ] || exit 0

package/openvmtools/openvmtools-02-network_script.patch new file +2 -0
+
+    # Using SysV "service" if it exists, otherwise fall back to run the

script directly

package/openvmtools/openvmtools-02-network_script.patch new file +1 -0
+    service=`which service 2>/dev/null`
package/openvmtools/ renamed from package/openvmtools/openvmtools.mk +0 -0

openvmtools.mk
new file mode 100644
index 0000000..4b6e0bb

package/openvmtools/openvmtools.mk new file +9 -0
@@ -0,0 +1,76 @@
 
+################################################################################
+#
+# openvmtools
+#
 
+################################################################################
+
+OPENVMTOOLS_VERSION = 9.4.6-1770165
+OPENVMTOOLS_SOURCE = open-vm-tools-$(OPENVMTOOLS_VERSION).tar.gz
+OPENVMTOOLS_SITE =

http://downloads.sourceforge.net/project/open-vm-tools/open-vm-tools/stable-9.4.x

package/openvmtools/openvmtools.mk new file +19 -2
+OPENVMTOOLS_LICENSE = LGPLv2.1
+OPENVMTOOLS_LICENSE_FILES = COPYING
+OPENVMTOOLS_AUTORECONF = YES
+OPENVMTOOLS_CONF_OPT = --without-icu --without-x --without-gtk2
--without-gtkmm --without-kernel-modules
+
+# -Wno-deprecated-declarations is a workaround for a bug in open-vm-tools
+# See http://sourceforge.net/p/open-vm-tools/mailman/message/31473171/
+OPENVMTOOLS_CONF_ENV = CFLAGS="$(TARGET_CFLAGS)
-Wno-deprecated-declarations"
+
+OPENVMTOOLS_DEPENDENCIES = libglib2
+
+# When libfuse is available, openvmtools can build vmblock-fuse, so
+# make sure that libfuse gets built first.
+ifeq ($(BR2_PACKAGE_LIBFUSE),y)
+OPENVMTOOLS_DEPENDENCIES += libfuse
+endif
+
+ifeq ($(BR2_PACKAGE_OPENVMTOOLS_PROCPS),y)
+OPENVMTOOLS_CONF_ENV += CUSTOM_PROCPS_NAME=procps

LDFLAGS="-L$(TARGET_DIR)/usr/lib"

package/openvmtools/openvmtools.mk new file +8 -0
+OPENVMTOOLS_CONF_OPT += --with-procps
+OPENVMTOOLS_DEPENDENCIES += procps-ng
+else
+OPENVMTOOLS_CONF_OPT += --without-procps
+endif
+
+ifeq ($(BR2_PACKAGE_OPENVMTOOLS_DNET),y)
+OPENVMTOOLS_CONF_ENV +=

CUSTOM_DNET_CPPFLAGS="-I$(STAGING_DIR)/usr/include"

package/openvmtools/openvmtools.mk new file +15 -0
+OPENVMTOOLS_CONF_OPT += --with-dnet
+OPENVMTOOLS_DEPENDENCIES += libdnet
+else
+OPENVMTOOLS_CONF_OPT += --without-dnet
+endif
+
+ifeq ($(BR2_PACKAGE_OPENVMTOOLS_PAM),y)
+OPENVMTOOLS_CONF_OPT += --with-pam
+OPENVMTOOLS_MAKE_OPT += CFLAGS+="-Wno-unused-local-typedefs"
+OPENVMTOOLS_DEPENDENCIES += linux-pam
+else
+OPENVMTOOLS_CONF_OPT += --without-pam
+endif
+
+# symlink needed by lib/system/systemLinux.c (or will cry in

/var/log/messages)

package/openvmtools/openvmtools.mk new file +10 -0
+# /sbin/shutdown needed for Guest OS restart/shutdown from hypervisor
+define OPENVMTOOLS_POST_INSTALL_TARGET_THINGIES
+       ln -fs os-release $(TARGET_DIR)/etc/lfs-release
+       if [ ! -e $(TARGET_DIR)/sbin/shutdown ]; then \
+               $(INSTALL) -D -m 755 package/openvmtools/shutdown \
+                       $(TARGET_DIR)/sbin/shutdown; \
+       fi
+endef
+
+OPENVMTOOLS_POST_INSTALL_TARGET_HOOKS +=

OPENVMTOOLS_POST_INSTALL_TARGET_THINGIES

package/openvmtools/openvmtools.mk new file +15 -0
+
+define OPENVMTOOLS_INSTALL_INIT_SYSV
+       $(INSTALL) -D -m 755 package/openvmtools/S10vmtoolsd \
+               $(TARGET_DIR)/etc/init.d/S10vmtoolsd
+endef
+
+define OPENVMTOOLS_INSTALL_INIT_SYSTEMD
+       $(INSTALL) -D -m 644 package/openvmtools/vmtoolsd.service \
+               $(TARGET_DIR)/etc/systemd/system/vmtoolsd.service
+       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+       ln -fs ../vmtoolsd.service \
+
 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/vmtoolsd.service
+endef
+
+$(eval $(autotools-package))
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 +14 -1
new file mode 100644
index 0000000..17a4df4
@@ -0,0 +1,14 @@
+[Unit]
+Description=vmtoolsd for openvmtools
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/vmtoolsd.pid
+ExecStart=/usr/bin/vmtoolsd -b /var/run/vmtoolsd.pid
+Restart=on-failure
+KillMode=process
+KillSignal=SIGKILL
+
+[Install]
+WantedBy=multi-user.target
--
Quoted 3 lines

1.7.10.4

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140901/ecd66a07/attachment.html>

#2 lore raw

PATCH v6 1/1 New package: openvmtools

In reply to Karoly Kasza

Karoly, All,

On 2014-08-08 14:27 +0200, Karoly Kasza spake thusly:

Quoted 1 line

New package: openvmtools

Some comments below.

[--SNIP--]

Quoted 41 lines
package/openvmtools/Config.in new file +35 -0
new file mode 100644
index 0000000..65220f9
@@ -0,0 +1,55 @@
+config BR2_PACKAGE_OPENVMTOOLS
+	bool "openvmtools"
+	depends on BR2_i386 || BR2_x86_64
+	depends on BR2_USE_MMU # libglib2
+	depends on BR2_USE_WCHAR # libglib2
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
+	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	depends on BR2_LARGEFILE
+	depends on BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_LIBGLIB2
+	help
+	  Open Virtual Machine Tools for VMware guest OS
+
+	  http://open-vm-tools.sourceforge.net/
+
+	  ICU locales and X11 tools are currently not supported.
+
+	  NOTE: Support for vmblock-fuse will be enabled in openvmtools if the
+	        libfuse package is selected.
+
+if BR2_PACKAGE_OPENVMTOOLS
+
+config BR2_PACKAGE_OPENVMTOOLS_PROCPS
+	bool "procps support"
+	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+	select BR2_PACKAGE_PROCPS_NG
+	help
+	  Enable support for procps / meminfo
+
+comment "procps support needs BR2_PACKAGE_BUSYBOX_SHOW_OTHERS"
+	depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+
+config BR2_PACKAGE_OPENVMTOOLS_DNET
+	bool "dnet support"
+	depends on BR2_INET_IPV6

package/openvmtools/Config.in line 45

Quoted 10 lines
package/openvmtools/Config.in new file +10 -0
+	select BR2_PACKAGE_LIBDNET
+	help
+	  Enable support for libdnet / nicinfo
+
+comment "openvmtools dnet support needs a toolchain w/ IPv6"
+	depends on !BR2_INET_IPV6
+
+config BR2_PACKAGE_OPENVMTOOLS_PAM
+	bool "PAM support"
+	select BR2_PACKAGE_LINUX_PAM

linux-pam depends on !static, so you should propagate the dependency here.

linux-pam also depends on locales and wchar, but they re handled by the main symbols of openvmtools, so it is not needed to replicate them here. A comment might be OK, though:

    # linux-pam needs locale and wchar, but we already have this
    # dependency on the main symbol, above.
Quoted 8 lines
package/openvmtools/openvmtools.mk new file +2 -0
new file mode 100644
index 0000000..4b6e0bb
@@ -0,0 +1,76 @@
+################################################################################
+#

package/openvmtools/openvmtools.mk line 12

Quoted 10 lines
package/openvmtools/openvmtools.mk new file +10 -0
+# openvmtools
+#
+################################################################################
+
+OPENVMTOOLS_VERSION = 9.4.6-1770165
+OPENVMTOOLS_SOURCE = open-vm-tools-$(OPENVMTOOLS_VERSION).tar.gz
+OPENVMTOOLS_SITE = http://downloads.sourceforge.net/project/open-vm-tools/open-vm-tools/stable-9.4.x
+OPENVMTOOLS_LICENSE = LGPLv2.1
+OPENVMTOOLS_LICENSE_FILES = COPYING
+OPENVMTOOLS_AUTORECONF = YES

Please add a comment saying why we need to autoreconf.

Quoted 6 lines
package/openvmtools/openvmtools.mk new file +6 -0
+OPENVMTOOLS_CONF_OPT = --without-icu --without-x --without-gtk2 --without-gtkmm --without-kernel-modules
+
+# -Wno-deprecated-declarations is a workaround for a bug in open-vm-tools
+# See http://sourceforge.net/p/open-vm-tools/mailman/message/31473171/
+OPENVMTOOLS_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -Wno-deprecated-declarations"
+

package/openvmtools/openvmtools.mk line 28

Quoted 10 lines
package/openvmtools/openvmtools.mk new file +10 -0
+OPENVMTOOLS_DEPENDENCIES = libglib2
+
+# When libfuse is available, openvmtools can build vmblock-fuse, so
+# make sure that libfuse gets built first.
+ifeq ($(BR2_PACKAGE_LIBFUSE),y)
+OPENVMTOOLS_DEPENDENCIES += libfuse
+endif
+
+ifeq ($(BR2_PACKAGE_OPENVMTOOLS_PROCPS),y)
+OPENVMTOOLS_CONF_ENV += CUSTOM_PROCPS_NAME=procps LDFLAGS="-L$(TARGET_DIR)/usr/lib"

Why do you point to TARGET_DIR?

Usually, we consider the development files are installed in STAGING_DIR. So, if you need to point to a library path, you should point to STAGING_DIR here.

But STAGING_DIR/usr/lib is already searched for by our toolchain, so it should not be necessary to add it.

If you really need that, explain why.

package/openvmtools/openvmtools.mk line 36

Quoted 8 lines
package/openvmtools/openvmtools.mk new file +8 -0
+OPENVMTOOLS_CONF_OPT += --with-procps
+OPENVMTOOLS_DEPENDENCIES += procps-ng
+else
+OPENVMTOOLS_CONF_OPT += --without-procps
+endif
+
+ifeq ($(BR2_PACKAGE_OPENVMTOOLS_DNET),y)
+OPENVMTOOLS_CONF_ENV += CUSTOM_DNET_CPPFLAGS="-I$(STAGING_DIR)/usr/include"

Ditto, STAGING_DIR/usr/include is already searched for by our toolchain, so it should not be needed.

If you really need that, explain why.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

A message that is not in the archive (sent off-list or not yet received): CABbD_XDGZBqVgmMvHv365peWENui=TrXmBCBvEEuE678QA4=2Q@mail.gmail.com

#4 lore raw

PATCH v6 1/1 New package: openvmtools

I accidentally replied instead of reply-all.

---------- Forwarded message ----------
From: K?roly Kasza <[email protected]>
Date: Tue, Sep 2, 2014 at 3:59 PM
Subject: Re: [PATCH v6 1/1] New package: openvmtools
To: "Yann E. MORIN" <[email protected]>

Hello Yann,

thanks for reviewing this patch!

Quoted 8 lines

package/openvmtools/Config.in line 45

Quoted 3 lines
package/openvmtools/Config.in new file +3 -0
+config BR2_PACKAGE_OPENVMTOOLS_PAM
+     bool "PAM support"
+     select BR2_PACKAGE_LINUX_PAM

linux-pam depends on !static, so you should propagate the dependency here.

OK.

Quoted 8 lines

linux-pam also depends on locales and wchar, but they re handled by the main symbols of openvmtools, so it is not needed to replicate them here. A comment might be OK, though:

    # linux-pam needs locale and wchar, but we already have this
    # dependency on the main symbol, above.

OK.

Quoted 5 lines
Quoted 1 line

+OPENVMTOOLS_AUTORECONF = YES

Please add a comment saying why we need to autoreconf.

OK. (It's because the package is distributed without a configure script -
http://sourceforge.net/p/open-vm-tools/mailman/message/32550385/ )

Quoted 6 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+ifeq ($(BR2_PACKAGE_OPENVMTOOLS_PROCPS),y)
+OPENVMTOOLS_CONF_ENV += CUSTOM_PROCPS_NAME=procps

LDFLAGS="-L$(TARGET_DIR)/usr/lib"

Why do you point to TARGET_DIR?

Quoted 9 lines

Usually, we consider the development files are installed in STAGING_DIR. So, if you need to point to a library path, you should point to STAGING_DIR here.

But STAGING_DIR/usr/lib is already searched for by our toolchain, so it should not be necessary to add it.

If you really need that, explain why.

If I do not add -L$(TARGET_DIR)/usr/lib I simply get an error while configuring:

checking for getstat in -lprocps... no
checking for getstat in -lproc-3.2.8... no
checking for getstat in -lproc-3.2.7... no
configure: error: libproc not found. Please configure without procps (using --without-procps) or install procps - http://procps.sourceforge.net
make: *** [/home/scythe/buildroot/output/build/openvmtools-9.4.6-1770165/.stamp_configured] Error 1

I don't know why, but I simply can not find any procps related libraries in the staging directory:

scythe at buildroot-vm:~/buildroot/output$ find . | grep libproc ./build/procps-ng-3.3.9/proc/.libs/libprocps.lai ./build/procps-ng-3.3.9/proc/.libs/libprocps.so.3 ./build/procps-ng-3.3.9/proc/.libs/libprocps.a ./build/procps-ng-3.3.9/proc/.libs/libprocps.so.3.0.0 ./build/procps-ng-3.3.9/proc/.libs/libprocps.so ./build/procps-ng-3.3.9/proc/.libs/libprocps.la ./build/procps-ng-3.3.9/proc/libprocps.sym ./build/procps-ng-3.3.9/proc/libprocps.pc ./build/procps-ng-3.3.9/proc/libprocps.pc.in ./build/procps-ng-3.3.9/proc/libprocps.la ./target/usr/lib/pkgconfig/libprocps.pc ./target/usr/lib/libprocps.so.3
./target/usr/lib/libprocps.a ./target/usr/lib/libprocps.so.3.0.0 ./target/usr/lib/libprocps.so
./target/usr/lib/libprocps.la
scythe at buildroot-vm:~/buildroot/output$ cd staging
scythe at buildroot-vm:~/buildroot/output/staging$ find . | grep libproc

Quoted 9 lines

+ifeq ($(BR2_PACKAGE_OPENVMTOOLS_DNET),y)

Quoted 1 line

+OPENVMTOOLS_CONF_ENV +=

CUSTOM_DNET_CPPFLAGS="-I$(STAGING_DIR)/usr/include"

Ditto, STAGING_DIR/usr/include is already searched for by our toolchain, so it should not be needed.

If you really need that, explain why.

If I omit the CUSTOM_DNET_CPPFLAGS variable, I get an error while configuring:

checking for dumbnet-config... no
checking for dnet-config... no
configure: error: dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet -
http://libdnet.sourceforge.net
make: *** [/home/scythe/buildroot/output/build/openvmtools-9.4.6-1770165/.stamp_configured] Error 1

I think this is because the configure script is looking for a binary called "dnet-config", and it needs the environment variable if the binary is not found in the $PATH. So I guess this can't be circumvented.

I would send a new version, do you have any idea why procps-ng doesn't copy it's libraries into the $(STAGING_DIR)?

Kind regards,
Karoly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140902/83316703/attachment.html>

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

PATCH v6 1/1 New package: openvmtools

And Yann's reply for the list archives.

---------- Forwarded message ----------
From: Yann E. MORIN <[email protected]>
Date: Tue, Sep 2, 2014 at 4:11 PM
Subject: Re: [PATCH v6 1/1] New package: openvmtools
To: K?roly Kasza <[email protected]>

Karoly, All,

On 2014-09-02 15:59 +0200, K?roly Kasza spake thusly:
[--SNIP--]

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

+OPENVMTOOLS_AUTORECONF = YES

Please add a comment saying why we need to autoreconf.

OK. (It's because the package is distributed without a configure script -
http://sourceforge.net/p/open-vm-tools/mailman/message/32550385/ )

OK, add this above the "AUTORECONF = YES" line.

Quoted 16 lines
Quoted 6 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+ifeq ($(BR2_PACKAGE_OPENVMTOOLS_PROCPS),y)
+OPENVMTOOLS_CONF_ENV += CUSTOM_PROCPS_NAME=procps

LDFLAGS="-L$(TARGET_DIR)/usr/lib"

Why do you point to TARGET_DIR?

Quoted 9 lines

Usually, we consider the development files are installed in STAGING_DIR. So, if you need to point to a library path, you should point to STAGING_DIR here.

But STAGING_DIR/usr/lib is already searched for by our toolchain, so it should not be necessary to add it.

If you really need that, explain why.

Quoted 7 lines

If I do not add -L$(TARGET_DIR)/usr/lib I simply get an error while configuring:

checking for getstat in -lprocps... no
checking for getstat in -lproc-3.2.8... no
checking for getstat in -lproc-3.2.7... no
configure: error: libproc not found. Please configure without procps

(using

Quoted 3 lines

--without-procps) or install procps - http://procps.sourceforge.net
make: ***

[/home/scythe/buildroot/output/build/openvmtools-9.4.6-1770165/.stamp_configured]

Quoted 3 lines

Error 1

I don't know why, but I simply can not find any procps related libraries

in

Quoted 35 lines

the staging directory:

scythe at buildroot-vm:~/buildroot/output$ find . | grep libproc ./build/procps-ng-3.3.9/proc/.libs/libprocps.lai ./build/procps-ng-3.3.9/proc/.libs/libprocps.so.3 ./build/procps-ng-3.3.9/proc/.libs/libprocps.a ./build/procps-ng-3.3.9/proc/.libs/libprocps.so.3.0.0 ./build/procps-ng-3.3.9/proc/.libs/libprocps.so ./build/procps-ng-3.3.9/proc/.libs/libprocps.la ./build/procps-ng-3.3.9/proc/libprocps.sym ./build/procps-ng-3.3.9/proc/libprocps.pc ./build/procps-ng-3.3.9/proc/libprocps.pc.in ./build/procps-ng-3.3.9/proc/libprocps.la ./target/usr/lib/pkgconfig/libprocps.pc ./target/usr/lib/libprocps.so.3
./target/usr/lib/libprocps.a ./target/usr/lib/libprocps.so.3.0.0 ./target/usr/lib/libprocps.so
./target/usr/lib/libprocps.la
scythe at buildroot-vm:~/buildroot/output$ cd staging
scythe at buildroot-vm:~/buildroot/output/staging$ find . | grep libproc

Quoted 9 lines

+ifeq ($(BR2_PACKAGE_OPENVMTOOLS_DNET),y)

Quoted 1 line

+OPENVMTOOLS_CONF_ENV +=

CUSTOM_DNET_CPPFLAGS="-I$(STAGING_DIR)/usr/include"

Ditto, STAGING_DIR/usr/include is already searched for by our toolchain, so it should not be needed.

If you really need that, explain why.

If I omit the CUSTOM_DNET_CPPFLAGS variable, I get an error while configuring:

Quoted 7 lines

checking for dumbnet-config... no
checking for dnet-config... no
configure: error: dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet -
http://libdnet.sourceforge.net
make: ***

[/home/scythe/buildroot/output/build/openvmtools-9.4.6-1770165/.stamp_configured]

Quoted 3 lines

Error 1

I think this is because the configure script is looking for a binary

called

Quoted 2 lines

"dnet-config", and it needs the environment variable if the binary is not found in the $PATH. So I guess this can't be circumvented.

Ah, then there are a few possibilities, of which the best would be to change configure.ac to call $DNET_CONFIG is it is set, instead of just dnet-config, and then set DNT_CONFIG=$(STAGING_DIR)/usr/bin/dnet-config

Quoted 1 line

I would send a new version, do you have any idea why procps-ng doesn't

copy

Quoted 1 line

it's libraries into the $(STAGING_DIR)?

Yep, that's because propcs-ng.mk does not have INSTALL_STAGING = YES. Provide a (separate) patch that adds this to procps-ng.

I'll do a further review of your comments later (~16:00 UTC), for now I've got to go...

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___
   |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is
no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v
 conspiracy.  |

'------------------------------^-------^------------------^--------------------' -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140902/95ea963b/attachment.html>