New package: openvmtools
PATCH v4 1/1 New package: openvmtools
New package: openvmtools
---
Changes v3 -> v4:
- Added patch to compile with uClibc and Buildroot toolchain
package/Config.in | 1 + package/openvmtools/Config.in | 56 ++++++++++++++ package/openvmtools/S10vmtoolsd | 33 ++++++++ .../openvmtools-01-has_bsd_printf.patch | 26 +++++++ package/openvmtools/openvmtools.mk | 81 ++++++++++++++++++++ package/openvmtools/shutdown | 7 ++ package/openvmtools/vmtoolsd.service | 8 ++ 7 files changed, 212 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
@@ -1164,6 +1164,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 +56 -0
56 lines not on this page · raw message
package/openvmtools/S10vmtoolsd new file +33 -0
@@ -0,0 +1,33 @@ +#!/bin/sh +# +# Starts vmtoolsd for openvmtools +# + +PID=/var/run/vmtoolsd.pid + +case "$1" in + start) + echo -n "Starting vmtoolsd: " + /usr/bin/vmtoolsd -b $PID + if [ $? != 0 ]; then + echo "FAILED" + exit 1 + else + echo "OK" + fi + ;; + stop) + echo -n "Stopping vmtoolsd: " + kill `cat $PID` + echo "OK" + ;; + restart|reload) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $?
package/openvmtools/openvmtools-01-has_bsd_printf.patch new file +26 -0
@@ -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 +81 -0
81 lines not on this page · raw message
package/openvmtools/shutdown new file +7 -0
@@ -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
@@ -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
PATCH v4 1/1 New package: openvmtools
Karoly, All,
On 2014-07-29 13:57 +0200, Karoly Kasza spake thusly:
Quoted 1 line
New package: openvmtools
Thanks for this new package!
See below for a few comments.
Quoted 1 line
Signed-off-by Karoly Kasza <[email protected]>
[--SNIP--]
package/openvmtools/Config.in line 6
Quoted 12 lines
package/openvmtools/Config.in new file +6
-0@@ -0,0 +1,56 @@ +config BR2_PACKAGE_OPENVMTOOLS + bool "openvmtools" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_USE_MMU + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS
Are all those dependencies just inherited from libglib2, or are they real dependencies on openvmtools?
If they are only inherited from libglib2, they it is customary to indicate the package as a comment to the dependency, like:
depends on BR2_USE_MMU # libglib2
depends on BR2_USE_WCHAR # libglib2
Quoted 7 lines
package/openvmtools/Config.in new file +7
-0+ 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 +
package/openvmtools/Config.in line 23
Quoted 10 lines
package/openvmtools/Config.in new file +10
-0+ 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 + +menu "openvmtools options"
Do not put it in a sub-menu, the options will be properly indented in the frontends.
We only do sub-menus when there are a *lot* of sub-options (there is no written rule on this, but above ~8 warants a sub-menu, otherwise indentation is considered enough.)
package/openvmtools/Config.in line 26
Quoted 2 lines
package/openvmtools/Config.in new file +2
-0+config BR2_PACKAGE_OPENVMTOOLS_PROCPS + bool "openvmtools procps support"
Do not repeat 'openvmtools' in the prompts. Since it depends on BR2_PACKAGE_OPENVMTOOLS, the frontends wil properly indent the sub-options, so that it is obvious they are options to openvmtools.
package/openvmtools/Config.in line 27
Quoted 1 line
package/openvmtools/Config.in new file +1
-0+ select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
I know we alkready have one package and one systm option that select busybox-show-others, but they are a bit special: one is systemd, the other is sysvinit. All other packages depend on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS instead.
For openvmtools, I would use a depends rather than a select, something like:
config BR2_PACKAGE_OPENVMTOOLS_PROCPS
bool "procps support"
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS select BR2_PACKAGE_PROCPS_NG
comment "procps support needs that BUSYBOX_SHOW_OTHERS be set"
depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
I'm not much satisfied with the comment text, however. If you find a better wording, feel free to adapt.
package/openvmtools/Config.in line 33
Quoted 6 lines
package/openvmtools/Config.in new file +6
-0+ select BR2_PACKAGE_PROCPS_NG + help + Enable support for procps / meminfo + +config BR2_PACKAGE_OPENVMTOOLS_DNET + bool "openvmtools dnet support"
Ditto: do not repeat 'openvmtools' in the prompts.
package/openvmtools/Config.in line 43
Quoted 10 lines
package/openvmtools/Config.in new file +10
-0+ 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 "openvmtools PAM support"
Ditto.
Quoted 19 lines
package/openvmtools/Config.in new file +13
-0+ select BR2_PACKAGE_LINUX_PAM + help + Support for PAM in openvmtools + +endmenu + +endif + +comment "openvmtools needs a toolchain w/ wchar, threads, RPC, largefile, locale" + 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_LOCALEpackage/openvmtools/S10vmtoolsd new file +0
-0
package/openvmtools/S10vmtoolsd line 10
Quoted 10 lines
package/openvmtools/S10vmtoolsd new file +10
-0@@ -0,0 +1,33 @@ +#!/bin/sh +# +# Starts vmtoolsd for openvmtools +# + +PID=/var/run/vmtoolsd.pid + +case "$1" in + start) + echo -n "Starting vmtoolsd: "
This scripts uses a mix of tabs and spaces to do the indentation; for example, the cases lines ("start)", "stop)"...) are indented with spaces, while the rest is indented with tabs. Please be consistent.
package/openvmtools/S10vmtoolsd line 12
Quoted 2 lines
package/openvmtools/S10vmtoolsd new file +2
-0+ +exit $?
No need to exit epxlicitly, it's implicit from POSIX, that a shell script exits with the error code from the last command. Besides, we do not care at all about the exit status of a startup script.
[--SNIP--]
Quoted 14 lines
package/openvmtools/openvmtools.mk new file +8
-0@@ -0,0 +1,81 @@ +################################################################################ +# +# openvmtools +# +################################################################################ + +OPENVMTOOLS_VERSION = 9.4.6-1770165 +OPENVMTOOLS_SOURCE = open-vm-tools-$(OPENVMTOOLS_VERSION).tar.gz
package/openvmtools/openvmtools.mk line 18
Quoted 10 lines
package/openvmtools/openvmtools.mk new file +10
-0+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 +OPENVMTOOLS_CONF_OPT = \ + --without-icu \ + --without-x \ + --without-gtk2 \ + --without-gtkmm \ + --without-kernel-modules
On a single line. If it is too long, just split it, like:
OPENVMTOOLS_CONF_OPT = --without-icu --without-x \
--without-gtk2 --without-gtkmm --without-kernel-modulespackage/openvmtools/openvmtools.mk line 21
Quoted 2 lines
package/openvmtools/openvmtools.mk new file +2
-0+#-Wno-deprecated-declarations is a workaround for a bug in open-vm-tools +#See http://sourceforge.net/p/open-vm-tools/mailman/message/31473171/
Nit-pick: space after the '#' symbol.
package/openvmtools/openvmtools.mk line 22
Quoted 1 line
package/openvmtools/openvmtools.mk new file +1
-0+OPENVMTOOLS_CONF_ENV = CFLAGS+="-Wno-deprecated-declarations"
This should be:
OPENVMTOOLS_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -Wno-deprecated-declarations"
package/openvmtools/openvmtools.mk line 29
Quoted 6 lines
package/openvmtools/openvmtools.mk new file +6
-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
No --enable-fuse/--disable-fuse options (or the likes)?
Quoted 18 lines
package/openvmtools/openvmtools.mk new file +18
-0+endif + +ifeq ($(BR2_PACKAGE_OPENVMTOOLS_PROCPS),y) +OPENVMTOOLS_CONF_ENV += CUSTOM_PROCPS_NAME=procps LDFLAGS="-L$(TARGET_DIR)/usr/lib" +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" +OPENVMTOOLS_CONF_OPT += --with-dnet +OPENVMTOOLS_DEPENDENCIES += libdnet +else +OPENVMTOOLS_CONF_OPT += --without-dnet +endif +
package/openvmtools/openvmtools.mk line 57
Quoted 10 lines
package/openvmtools/openvmtools.mk new file +10
-0+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 + +define OPENVMTOOLS_POST_INSTALL_TARGET_THINGIES +#needed by lib/system/systemLinux.c (or will cry in /var/log/messages)
Do not put the comments in the macro; put them above the macro defintion.
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. | '------------------------------^-------^------------------^--------------------'
PATCH v4 1/1 New package: openvmtools
In reply to Karoly KaszaKaroly, Yann, All,
Quoted 19 lines · Karoly Kasza
package/openvmtools/openvmtools.mk new file +19
-0+# 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" +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" +OPENVMTOOLS_CONF_OPT += --with-dnet +OPENVMTOOLS_DEPENDENCIES += libdnet +else
package/openvmtools/openvmtools.mk line 54
Quoted 10 lines
package/openvmtools/openvmtools.mk new file +10
-0+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
Here I have a question not necessarily directly for you Karoly, but for other Buildroot developers. We have a good example here of some dependencies being automatic (libfuse), some dependencies having their own package sub-options (procps, dnet, pam). Do we want to have this separation of treatment ? What is the rationale to do one or the other in this specific case ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v4 1/1 New package: openvmtools
In reply to Yann E. MORINHi Yann,
Thanks for reviewing my patch!
Quoted 8 lines
package/openvmtools/Config.in line 6
Quoted 7 lines
package/openvmtools/Config.in new file +6
-0+config BR2_PACKAGE_OPENVMTOOLS + bool "openvmtools" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_USE_MMU + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS
Quoted 8 lines
Are all those dependencies just inherited from libglib2, or are they real dependencies on openvmtools?
If they are only inherited from libglib2, they it is customary to indicate the package as a comment to the dependency, like:
depends on
BR2_USE_MMU# libglib2
depends onBR2_USE_WCHAR# libglib2
Actually they are, I did remove the comments since the v1 of the patch, because I misinterpreted ThomasP's recommendation.
I'll put these back.
Quoted 10 lines
package/openvmtools/Config.in line 23
Quoted 3 lines
package/openvmtools/Config.in new file +3
-0+if BR2_PACKAGE_OPENVMTOOLS + +menu "openvmtools options"Do not put it in a sub-menu, the options will be properly indented in the frontends.
We only do sub-menus when there are a *lot* of sub-options (there is no written rule on this, but above ~8 warants a sub-menu, otherwise indentation is considered enough.)
OK, I'll remove the sub-menu.
Quoted 7 lines
package/openvmtools/Config.in line 26
Quoted 2 lines
package/openvmtools/Config.in new file +2
-0+config BR2_PACKAGE_OPENVMTOOLS_PROCPS + bool "openvmtools procps support"Do not repeat 'openvmtools' in the prompts. Since it depends on
BR2_PACKAGE_OPENVMTOOLS, the frontends wil properly indent the sub-options, so that it is obvious they are options to openvmtools.
OK.
Quoted 16 lines
Quoted 1 line
+ select
BR2_PACKAGE_BUSYBOX_SHOW_OTHERSI know we alkready have one package and one systm option that select busybox-show-others, but they are a bit special: one is systemd, the other is sysvinit. All other packages depend on
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
instead.For openvmtools, I would use a depends rather than a select, something like:
config
BR2_PACKAGE_OPENVMTOOLS_PROCPS
bool "procps support"
depends onBR2_PACKAGE_BUSYBOX_SHOW_OTHERSselectBR2_PACKAGE_PROCPS_NG
Quoted 5 lines
comment "procps support needs that
BUSYBOX_SHOW_OTHERSbe set"
depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERSI'm not much satisfied with the comment text, however. If you find a better wording, feel free to adapt.
I'll change it to something like you recommended.
Quoted 4 lines
package/openvmtools/Config.in line 33
Quoted 2 lines
package/openvmtools/Config.in new file +2
-0+config BR2_PACKAGE_OPENVMTOOLS_DNET + bool "openvmtools dnet support"Ditto: do not repeat 'openvmtools' in the prompts
OK.
Quoted 5 lines
package/openvmtools/Config.in line 43
Quoted 2 lines
package/openvmtools/Config.in new file +2
-0+config BR2_PACKAGE_OPENVMTOOLS_PAM + bool "openvmtools PAM support"Ditto.
OK.
Quoted 13 lines
Review
Quoted 1 line
(quoted diff) +0
-0b/package/openvmtools/S10vmtoolsd
Quoted 11 lines
new file mode 100644
index 0000000..3ab351epackage/openvmtools/S10vmtoolsd new file +6
-0@@ -0,0 +1,33 @@ +#!/bin/sh +# +# Starts vmtoolsd for openvmtools +# + +PID=/var/run/vmtoolsd.pid
Quoted 9 lines
package/openvmtools/S10vmtoolsd line 10
Quoted 4 lines
package/openvmtools/S10vmtoolsd new file +4
-0+ +case "$1" in + start) + echo -n "Starting vmtoolsd: "This scripts uses a mix of tabs and spaces to do the indentation; for example, the cases lines ("start)", "stop)"...) are indented with spaces, while the rest is indented with tabs. Please be consistent.
I used dropbear's startup script as a template, and the indentation is exactly the same. Also with openssh, exim or ptpd (and possibly some others). I think I should not differ from those too much?
Quoted 8 lines
package/openvmtools/S10vmtoolsd line 12
Quoted 3 lines
package/openvmtools/S10vmtoolsd new file +2
-0+ +exit $?No need to exit epxlicitly, it's implicit from POSIX, that a shell script exits with the error code from the last command. Besides, we do not care at all about the exit status of a startup script.
Although you are right, it's on the end of the dropbear startup script and 26 other initscripts in the package/ subdir. I think I should leave this to stay consistent with the others as above.
Quoted 7 lines
package/openvmtools/S10vmtoolsd line 18
Quoted 6 lines
package/openvmtools/S10vmtoolsd new file +6
-0+OPENVMTOOLS_CONF_OPT = \ + --without-icu \ + --without-x \ + --without-gtk2 \ + --without-gtkmm \ + --without-kernel-modules
Quoted 5 lines
On a single line. If it is too long, just split it, like:
OPENVMTOOLS_CONF_OPT = --without-icu --without-x \ --without-gtk2 --without-gtkmm --without-kernel-modules
OK. I though it is more visible.
Quoted 5 lines
package/openvmtools/S10vmtoolsd line 20
Quoted 2 lines
package/openvmtools/S10vmtoolsd new file +2
-0+#-Wno-deprecated-declarations is a workaround for a bug in open-vm-tools +#See http://sourceforge.net/p/open-vm-tools/mailman/message/31473171/Nit-pick: space after the '#' symbol.
OK.
Quoted 7 lines
package/openvmtools/S10vmtoolsd line 21
Quoted 2 lines
package/openvmtools/S10vmtoolsd new file +1
-0+OPENVMTOOLS_CONF_ENV = CFLAGS+="-Wno-deprecated-declarations"This should be:
OPENVMTOOLS_CONF_ENV = CFLAGS="$(TARGET_CFLAGS)-Wno-deprecated-declarations"
OK.
Quoted 7 lines
package/openvmtools/S10vmtoolsd line 25
Quoted 4 lines
package/openvmtools/S10vmtoolsd new file +4
-0+# When libfuse is available, openvmtools can build vmblock-fuse, so +# make sure that libfuse gets built first. +ifeq ($(BR2_PACKAGE_LIBFUSE),y) +OPENVMTOOLS_DEPENDENCIES += libfuseNo --enable-fuse/--disable-fuse options (or the likes)?
Unfortunately not. If the "configure" script finds libfuse, it builds vmblock-fuse, else it won't. I experimented with it a bit, and found this the most logical solution.
Quoted 6 lines
package/openvmtools/S10vmtoolsd line 27
Quoted 3 lines
package/openvmtools/S10vmtoolsd new file +2
-0+define OPENVMTOOLS_POST_INSTALL_TARGET_THINGIES +#needed by lib/system/systemLinux.c (or will cry in /var/log/messages)Do not put the comments in the macro; put them above the macro defintion.
OK.
Thanks again, I'll send a v5 patch soon. Regarding the init script, I can use only spaces/tabs, but then this script will differ from the others. Should I?
Kind regards,
Karoly Kasza
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140730/9b856b87/attachment.html>
PATCH v4 1/1 New package: openvmtools
In reply to Thomas PetazzoniHi Thomas,
Quoted 34 lines · Thomas Petazzoni
Karoly, Yann, All,
package/openvmtools/openvmtools.mk
Quoted 8 lines · Karoly Kasza
package/openvmtools/openvmtools.mk new file +8
-0+# 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=procpsLDFLAGS="-L$(TARGET_DIR)/usr/lib"
package/openvmtools/openvmtools.mk
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"
Quoted 12 lines
package/openvmtools/openvmtools.mk new file +12
-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
Quoted 9 lines
Quoted 1 line
+endif
Here I have a question not necessarily directly for you Karoly, but for other Buildroot developers. We have a good example here of some dependencies being automatic (libfuse), some dependencies having their own package sub-options (procps, dnet, pam). Do we want to have this separation of treatment ? What is the rationale to do one or the other in this specific case ?
Some explanation:
In this special case, I can not turn off building vmblock-fuse with a configure parameter. If it finds libfuse, it builds vmblock-fuse. I think it's a minor defect in the configure script, it doesn't have a --without-fuse or similar switch.
It's not pretty I know.
BR
Karoly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140730/fa2ae8de/attachment.html>
PATCH v4 1/1 New package: openvmtools
In reply to Károly KaszaKaroly, All,
On 2014-07-30 00:41 +0200, K?roly Kasza spake thusly:
Quoted 1 line
Thanks for reviewing my patch!
Cheers! ;-)
[--SNIP--]
Quoted 7 lines
Quoted 3 lines
This scripts uses a mix of tabs and spaces to do the indentation; for example, the cases lines ("start)", "stop)"...) are indented with spaces, while the rest is indented with tabs. Please be consistent.
I used dropbear's startup script as a template, and the indentation is exactly the same. Also with openssh, exim or ptpd (and possibly some others). I think I should not differ from those too much?
OK, I undersand. But those scripts were intially written a loooong time ago. We prefer that new submissions be a bit more coherent. Eventually, someone will clean up those old scripts. One day. Maybe... ;-)
Quoted 10 lines
Quoted 6 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ +exit $?No need to exit epxlicitly, it's implicit from POSIX, that a shell script exits with the error code from the last command. Besides, we do not care at all about the exit status of a startup script.
Although you are right, it's on the end of the dropbear startup script and 26 other initscripts in the package/ subdir. I think I should leave this to stay consistent with the others as above.
I prefer we introduce sane new scripts. As said above, the others are really old, and no longer up to nowadays standards...
Quoted 7 lines
Quoted 7 lines
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
Quoted 6 lines
Quoted 4 lines
On a single line. If it is too long, just split it, like:
OPENVMTOOLS_CONF_OPT = --without-icu --without-x \ --without-gtk2 --without-gtkmm --without-kernel-modulesOK. I though it is more visible.
I agree, but that's not the coding rules. ;-)
Quoted 5 lines
Quoted 1 line
No --enable-fuse/--disable-fuse options (or the likes)?
Unfortunately not. If the "configure" script finds libfuse, it builds vmblock-fuse, else it won't. I experimented with it a bit, and found this the most logical solution.
OK, then.
Quoted 3 lines
Thanks again, I'll send a v5 patch soon. Regarding the init script, I can use only spaces/tabs, but then this script will differ from the others. Should I?
Yes, new scripts should be cleaner and saner than the old ones.
Thanks for your persistence with this patch! :-)
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. | '------------------------------^-------^------------------^--------------------'
PATCH v4 1/1 New package: openvmtools
Hi Yann,
Quoted 14 lines
I used dropbear's startup script as a template, and the indentation is
Quoted 2 lines
exactly the same. Also with openssh, exim or ptpd (and possibly some others). I think I should not differ from those too much?
OK, I undersand. But those scripts were intially written a loooong time ago. We prefer that new submissions be a bit more coherent. Eventually, someone will clean up those old scripts. One day. Maybe... ;-)
Quoted 1 line
Although you are right, it's on the end of the dropbear startup script
and
Quoted 1 line
26 other initscripts in the package/ subdir. I think I should leave this
to
Quoted 1 line
stay consistent with the others as above.
Quoted 9 lines
I prefer we introduce sane new scripts. As said above, the others are really old, and no longer up to nowadays standards...
Quoted 3 lines
Thanks again, I'll send a v5 patch soon. Regarding the init script, I can use only spaces/tabs, but then this script will differ from the others. Should I?
Yes, new scripts should be cleaner and saner than the old ones.
OK, I'll rewrite it, and also I can start rewriting all the others later, no problem.
Besides on consistent usage of tabs/spaces (I guess changing tabs to spaces using 2 for indenting) and omitting the exit code, do you have any other suggestions? Can you point me to some coding style for scripts that you prefer?
BR
Karoly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140730/cc90fb03/attachment.html>