package/wview: New Package
Kinsella
PATCH 1/1 package/wview: New Package
wview is a collection of unix daemons which interface with a supported weather station to retrieve archive record (if generated by the station) current conditions.
--- package/Config.in | 1 + package/wview/0001-fix-absolute-path.patch | 220 +++++++++++++++++++++++++++++ package/wview/Config.in | 23 +++ package/wview/S61wview | 205 +++++++++++++++++++++++++++ package/wview/wview.hash | 1 + package/wview/wview.mk | 23 +++ 6 files changed, 473 insertions(+) create mode 100644 package/wview/0001-fix-absolute-path.patch create mode 100644 package/wview/Config.in create mode 100644 package/wview/S61wview create mode 100644 package/wview/wview.hash create mode 100644 package/wview/wview.mk
package/Config.in +1 -0
@@ -1279,6 +1279,7 @@ menu "Miscellaneous" source "package/snowball-init/Config.in" source "package/wine/Config.in" source "package/xutil_util-macros/Config.in" + source "package/wview/Config.in" endmenu menu "Networking applications"
package/wview/0001-fix-absolute-path.patch new file +220 -0
220 lines not on this page · raw message
package/wview/Config.in new file +23 -0
@@ -0,0 +1,23 @@ +comment "wview needs a toolchain w/ C++, wchar and udev /dev management" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && BR2_PACKAGE_HAS_UDEV) + +config BR2_PACKAGE_WVIEW + bool "wview" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_PACKAGE_APACHE + depends on BR2_PACKAGE_PHP + depends on BR2_PACKAGE_PHP_EXT_SQLITE + select BR2_PACKAGE_RADLIB + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_GD + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_OPENSSL + help + wview is a collection of unix daemons which interface with a + supported weather station to retrieve archive records + (if generated by the station) and current conditions. + + http://sourceforge.net/projects/radlib/
package/wview/S61wview new file +205 -0
205 lines not on this page · raw message
package/wview/wview.hash new file +1 -0
@@ -0,0 +1 @@ +sha256 460b34fcdf36f4905edf65e150ec83118e1e631c5532901feefcdc0266a27453 wview-5.21.7.tar.gz
package/wview/wview.mk new file +23 -0
@@ -0,0 +1,23 @@ +################################################################################ +# +# wview +# +################################################################################ + +WVIEW_VERSION = 5.21.7 +WVIEW_SOURCE = wview-$(WVIEW_VERSION).tar.gz +WVIEW_SITE = http://downloads.sourceforge.net/wview +WVIEW_INSTALL_STAGING = YES +WVIEW_LICENSE = GPL v2 +WVIEW_LICENSE_FILES = COPYING +VIEW_DEPENDENCIES = radlib libcurl gd libpng udev libusb openssl mysql +WVIEW_AUTORECONF = YES + +WVIEW_CONF_OPTS += --enable-mysql --prefix=$(STAGING_DIR)/usr + +define WVIEW_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 package/wview/S61wview \ + $(TARGET_DIR)/etc/init.d/ +endef + +$(eval $(autotools-package))
--
2.4.3
PATCH 1/1 package/wview: New Package
Ray,
Quoted 5 lines · Ray
wview is a collection of unix daemons which interface with a supported weather station to retrieve archive record (if generated by the station) current conditions.
Signed-off-by Ray Kinsella <ray.kinsella at intel.com<mailto:[email protected]>>
I'm sorry, but this patch is far, far from being ready. To be honest, I am not even sure you even tested it considering the numerous issues I found. See below.
package/Config.in menu "Miscellaneous" · line 1282
Quoted 9 lines
package/Config.in +1
-0@@ -1279,6 +1279,7 @@ menu "Miscellaneous" source "package/snowball-init/Config.in" source "package/wine/Config.in" source "package/xutil_util-macros/Config.in" + source "package/wview/Config.in"
Wrong indentation, alphabetic ordering not sepected.
package/wview/0001-fix-absolute-path.patch
Quoted 8 lines
package/Config.in +0
-0endmenu menu "Networking applications"package/wview/0001-fix-absolute-path.patch new file +0
-0
Patch lacks description + SoB.
package/wview/0001-fix-absolute-path.patch line 5
Quoted 6 lines
package/wview/0001-fix-absolute-path.patch new file +5
-0@@ -0,0 +1,220 @@ +diff -Naur a/alarms/Makefile.am b/alarms/Makefile.am +--- a/alarms/Makefile.am 2014-05-28 01:22:49.000000000 +0100 ++++ b/alarms/Makefile.am 2016-01-18 15:40:26.229746967 +0000 +@@ -39,6 +39,5 @@ + wvalarmd_LDFLAGS = -L$(prefix)/lib -L/usr/lib
The -L/usr/lib is quite certainly the thing to remove. So should -L$(prefix)/lib, as prefix=/usr, so it would become -L/usr/lib as well. Please fix this globally.
package/wview/Config.in line 2
Quoted 8 lines
package/wview/Config.in new file +2
-0@@ -0,0 +1,23 @@ +comment "wview needs a toolchain w/ C++, wchar and udev /dev management" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && BR2_PACKAGE_HAS_UDEV)
We normally write such conditions as:
depends on !<foo> || !<bar> || !<baz>
package/wview/Config.in line 9
Quoted 7 lines
package/wview/Config.in new file +7
-0+ +config BR2_PACKAGE_WVIEW + bool "wview" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_PACKAGE_APACHE
Why ?
package/wview/Config.in line 10
Quoted 1 line
package/wview/Config.in new file +1
-0+ depends on BR2_PACKAGE_PHP
Why ?
package/wview/Config.in line 12
Quoted 1 line
package/wview/Config.in new file +1
-0+ select BR2_PACKAGE_RADLIB
There is no such package in Buildroot.
package/wview/Config.in line 17
Quoted 5 lines
package/wview/Config.in new file +5
-0+ select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_GD + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_OPENSSL
The package also needs sqlite, as can be seen in its configure script:
AC_CHECK_LIB([sqlite3], [sqlite3_open], [], [echo "libsqlite3 is missing!";exit -1])
Thread support is also needed, as can be seen in the configure script:
AC_CHECK_LIB([pthread], [pthread_create], [], [echo "libpthread is missing!";exit -1])
package/wview/Config.in line 23
Quoted 6 lines
package/wview/Config.in new file +6
-0+ help + wview is a collection of unix daemons which interface with a + supported weather station to retrieve archive records + (if generated by the station) and current conditions. + + http://sourceforge.net/projects/radlib/
Is this the right URL ?
package/wview/S61wview line 4
Quoted 10 lines
package/wview/S61wview new file +4
-0@@ -0,0 +1,205 @@ +#!/bin/sh + +# add to the shared library search path +export LD_LIBRARY_PATH=/lib:/usr/lib
Not needed.
package/wview/S61wview line 8
Quoted 4 lines
package/wview/S61wview new file +4
-0+CONF_DIRECTORY=/etc/wview +RUN_DIRECTORY=/var/wview +WVIEW_INSTALL_DIR=/usr/bin +# chkconfig: - 89 11
Not needed.
package/wview/S61wview line 18
Quoted 10 lines
package/wview/S61wview new file +10
-0+# description: wview is a unix weather program +# +# wview Start/Stop the wview daemons +# +# processnames: wviewd htmlgend wviewftpd wvalarmd wvcwopd wviewsshd wvhttpd +# config: $prefix/etc/wview +# pidfiles: $prefix/var/wview/*.pid + +# Source function library: +#. /etc/init.d/functions
Not needed.
Quoted 9 lines
package/wview/S61wview new file +9
-0+ +WVIEWD_FILE=`cat $CONF_DIRECTORY/wview-binary` +WVIEWD_BIN=$WVIEW_INSTALL_DIR/$WVIEWD_FILE +test -x $WVIEWD_BIN || exit 5 + +HTMLD_BIN=$WVIEW_INSTALL_DIR/htmlgend +test -x $HTMLD_BIN || exit 6 + +FTPD_BIN=$WVIEW_INSTALL_DIR/wviewftpd
package/wview/S61wview line 37
Quoted 10 lines
package/wview/S61wview new file +10
-0+test -x $FTPD_BIN || exit 7 + +SSHD_BIN=$WVIEW_INSTALL_DIR/wviewsshd +test -x $SSHD_BIN || exit 7 + +ALARMD_BIN=$WVIEW_INSTALL_DIR/wvalarmd +test -x $ALARMD_BIN || exit 8 + +CWOPD_BIN=$WVIEW_INSTALL_DIR/wvcwopd +test -x $CWOPD_BIN || exit 9
All those checks are useless, we now Buildroot will have installed those binaries.
Quoted 18 lines
package/wview/S61wview new file +18
-0+HTTP_BIN=$WVIEW_INSTALL_DIR/wvhttpd + +SQLD_BIN=$WVIEW_INSTALL_DIR/wviewsqld + +RADROUTER_BIN=$WVIEW_INSTALL_DIR/radmrouted + +PMOND_BIN=$WVIEW_INSTALL_DIR/wvpmond +test -x $PMOND_BIN || exit 10 + +WVIEWD_PID=$RUN_DIRECTORY/wviewd.pid +HTMLD_PID=$RUN_DIRECTORY/htmlgend.pid +FTPD_PID=$RUN_DIRECTORY/wviewftpd.pid +SSHD_PID=$RUN_DIRECTORY/wviewsshd.pid +ALARMD_PID=$RUN_DIRECTORY/wvalarmd.pid +CWOPD_PID=$RUN_DIRECTORY/wvcwopd.pid +HTTP_PID=$RUN_DIRECTORY/wvhttpd.pid +SQLD_PID=$RUN_DIRECTORY/wviewsqld.pid +RADROUTER_PID=$RUN_DIRECTORY/radmrouted.pid
package/wview/S61wview line 66
Quoted 10 lines
package/wview/S61wview new file +10
-0+PMOND_PID=$RUN_DIRECTORY/wvpmond.pid + +wait_for_time_set() { + THOUSAND=1000 + CURRVAL=`date +%s` + while [ "$CURRVAL" -lt "$THOUSAND" ]; do + sleep 1 + CURRVAL=`date +%s` + done +}
Why is this needed ?
Quoted 37 lines
package/wview/S61wview new file +37
-0+ +kill_running_processes() { + if [ -f $RADROUTER_PID ]; then + echo "radlib router pid file $RADROUTER_PID exists - killing existing process" + kill -15 `cat $RADROUTER_PID` + rm -f $RADROUTER_PID + fi + if [ -f $WVIEWD_PID ]; then + echo "wviewd pid file $WVIEWD_PID exists - killing existing process" + kill -15 `cat $WVIEWD_PID` + rm -f $WVIEWD_PID + fi + if [ -f $HTMLD_PID ]; then + echo "htmlgend pid file $HTMLD_PID exists - killing existing process" + kill -15 `cat $HTMLD_PID` + rm -f $HTMLD_PID + fi + if [ -f $FTPD_PID ]; then + echo "wviewftpd pid file $FTPD_PID exists - killing existing process" + kill -15 `cat $FTPD_PID` + rm -f $FTPD_PID + fi + if [ -f $SSHD_PID ]; then + echo "wviewsshd pid file $SSHD_PID exists - killing existing process" + kill -15 `cat $SSHD_PID` + rm -f $SSHD_PID + fi + if [ -f $ALARMD_PID ]; then + echo "wvalarmd pid file $ALARMD_PID exists - killing existing process" + kill -15 `cat $ALARMD_PID` + rm -f $ALARMD_PID + fi + if [ -f $CWOPD_PID ]; then + echo "wvcwopd pid file $CWOPD_PID exists - killing existing process" + kill -15 `cat $CWOPD_PID` + rm -f $CWOPD_PID + fi
package/wview/S61wview line 113
Quoted 10 lines
package/wview/S61wview new file +10
-0+ if [ -f $HTTP_PID ]; then + echo "wvhttpd pid file $HTTP_PID exists - killing existing process" + kill -15 `cat $HTTP_PID` + rm -f $HTTP_PID + fi + if [ -f $PMOND_PID ]; then + echo "wvpmond pid file $PMOND_PID exists - killing existing process" + kill -15 `cat $PMOND_PID` + rm -f $PMOND_PID + fi
Please use start-stop-daemon instead of this code.
Quoted 16 lines
package/wview/S61wview new file +16
-0+} + +case "$1" in + start) + kill_running_processes + + wait_for_time_set + + echo "Starting wview daemons:" + + if [ -x $RADROUTER_BIN ]; then + $RADROUTER_BIN 1 $RUN_DIRECTORY + else + echo "Cannot find $RADROUTER_BIN - exiting!" + exit 10 + fi
package/wview/S61wview line 139
Quoted 10 lines
package/wview/S61wview new file +10
-0+ sleep 1 + $WVIEWD_BIN + sleep 1 + $HTMLD_BIN + $ALARMD_BIN + $CWOPD_BIN + $HTTP_BIN + $FTPD_BIN + $SSHD_BIN + $PMOND_BIN
Use start-stop-daemon.
Quoted 14 lines
package/wview/S61wview new file +14
-0+ ;; + start-trace) + kill_running_processes + + echo "Starting wview daemons (tracing to $RUN_DIRECTORY):" + echo "Warning: traced processes run very slowly and may effect performance." + + if [ -x $RADROUTER_BIN ]; then + $RADROUTER_BIN 1 $RUN_DIRECTORY + else + echo "Cannot find $RADROUTER_BIN - exiting!" + exit 10 + fi + sleep 1
package/wview/S61wview line 163
Quoted 10 lines
package/wview/S61wview new file +10
-0+ strace -o $RUN_DIRECTORY/$WVIEWD_FILE.trace $WVIEWD_BIN -f &> /dev/null & + sleep 1 + strace -o $RUN_DIRECTORY/htmlgend.trace $HTMLD_BIN -f &> /dev/null & + strace -o $RUN_DIRECTORY/wvalarmd.trace $ALARMD_BIN -f &> /dev/null & + strace -o $RUN_DIRECTORY/wvcwopd.trace $CWOPD_BIN -f &> /dev/null & + strace -o $RUN_DIRECTORY/wvhttpd.trace $HTTP_BIN -f &> /dev/null & + strace -o $RUN_DIRECTORY/wviewftpd.trace $FTPD_BIN -f &> /dev/null & + strace -o $RUN_DIRECTORY/wviewsshd.trace $SSHD_BIN -f &> /dev/null & + strace -o $RUN_DIRECTORY/wvpmond.trace $PMOND_BIN -f &> /dev/null & + ;;
Remove all of this.
Quoted 20 lines
package/wview/S61wview new file +20
-0+ stop) + echo "Shutting down wview daemons..." + if [ -f $PMOND_PID ]; then + kill -15 `cat $PMOND_PID` + fi + if [ -f $HTTP_PID ]; then + kill -15 `cat $HTTP_PID` + fi + if [ -f $CWOPD_PID ]; then + kill -15 `cat $CWOPD_PID` + fi + if [ -f $ALARMD_PID ]; then + kill -15 `cat $ALARMD_PID` + fi + if [ -f $SSHD_PID ]; then + kill -15 `cat $SSHD_PID` + fi + if [ -f $FTPD_PID ]; then + kill -15 `cat $FTPD_PID` + fi
package/wview/S61wview line 193
Quoted 10 lines
package/wview/S61wview new file +10
-0+ if [ -f $HTMLD_PID ]; then + kill -15 `cat $HTMLD_PID` + fi + if [ -f $WVIEWD_PID ]; then + kill -15 `cat $WVIEWD_PID` + fi + sleep 1 + if [ -f $RADROUTER_PID ]; then + kill -15 `cat $RADROUTER_PID` + fi
Use start-stop-daemon, and remove kill_running_processes.
Quoted 12 lines
index 0000000..701bf9f
package/wview/wview.hash new file +1
-0@@ -0,0 +1 @@ +sha256 460b34fcdf36f4905edf65e150ec83118e1e631c5532901feefcdc0266a27453 wview-5.21.7.tar.gzpackage/wview/wview.mk new file +1
-0@@ -0,0 +1,23 @@ +################################################################################
package/wview/wview.mk line 11
Quoted 10 lines
package/wview/wview.mk new file +10
-0+# +# wview +# +################################################################################ + +WVIEW_VERSION = 5.21.7 +WVIEW_SOURCE = wview-$(WVIEW_VERSION).tar.gz +WVIEW_SITE = http://downloads.sourceforge.net/wview +WVIEW_INSTALL_STAGING = YES +WVIEW_LICENSE = GPL v2
Should be "GPLv2"
package/wview/wview.mk line 13
Quoted 2 lines
package/wview/wview.mk new file +2
-0+WVIEW_LICENSE_FILES = COPYING +VIEW_DEPENDENCIES = radlib libcurl gd libpng udev libusb openssl mysql
VIEW_DEPENDENCIES is never taken into account since the variable prefix is not correct. This very mistake is a good indication that you have never built this package. Whenever you submit a new package in Buildroot, please at least make sure that it builds fine in a configuration that has *only* this package selected in menuconfig, and that a build from scratch of this configuration works fine.
radlib doesn't exist in Buildroot.
You have "mysql" in this variable, but it is not selected in the Config.in file. Plus, I don't see any mysql use in the source code itself.
You need to add sqlite in there.
package/wview/wview.mk line 16
Quoted 3 lines
package/wview/wview.mk new file +3
-0+WVIEW_AUTORECONF = YES + +WVIEW_CONF_OPTS += --enable-mysql --prefix=$(STAGING_DIR)/usr
There is no --enable-mysql configuration option.
Passing --prefix=$(STAGING_DIR)/usr is completely wrong. Leave --prefix to its default value. If the program doesn't build with --prefix=/usr, then something else is broken in the package Makefiles, and passing a different --prefix is 1/ papering over the problem and 2/ potentially harmful.
Hint: the problem is at least the -L$(prefix)/lib in the Makefile.am, as pointed above.
I've marked the patch as Changes Requested. Please resubmit a new version addressing the above issues. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Kinsella
PATCH 1/1 package/wview: New Package
Hi Thomas,
Sorry I only saw your response to this email now. Clearly I messed up badly when building this before sending this patch, apologies.
Much of the feedback below is already done, the rest I will sort out before sending a v2.
( BTW I was trying to reuse a system daemon script from WVIEW - clearly a bad idea, I will write one from scratch ).
Ray K
Quoted 6 lines · Thomas Petazzoni
Ray,
I'm sorry, but this patch is far, far from being ready. To be honest, I am not even sure you even tested it considering the numerous issues I found. See below.
Quoted 11 lines
package/Config.in menu "Miscellaneous" · line 1282
Quoted 9 lines
package/Config.in +1
-0@@ -1279,6 +1279,7 @@ menu "Miscellaneous" source "package/snowball-init/Config.in" source "package/wine/Config.in" source "package/xutil_util-macros/Config.in" + source "package/wview/Config.in"Wrong indentation, alphabetic ordering not sepected.
Will fix.
Quoted 12 lines
package/wview/0001-fix-absolute-path.patch
Quoted 10 lines
package/Config.in +0
-0endmenu menu "Networking applications"package/wview/0001-fix-absolute-path.patch new file +0
-0Patch lacks description + SoB.
Fixed + Fixed.
Quoted 12 lines
package/wview/0001-fix-absolute-path.patch line 5
Quoted 7 lines
package/wview/0001-fix-absolute-path.patch new file +5
-0@@ -0,0 +1,220 @@ +diff -Naur a/alarms/Makefile.am b/alarms/Makefile.am +--- a/alarms/Makefile.am 2014-05-28 01:22:49.000000000 +0100 ++++ b/alarms/Makefile.am 2016-01-18 15:40:26.229746967 +0000 +@@ -39,6 +39,5 @@ + wvalarmd_LDFLAGS = -L$(prefix)/lib -L/usr/libThe -L/usr/lib is quite certainly the thing to remove. So should -L$(prefix)/lib, as prefix=/usr, so it would become -L/usr/lib as well.
Please fix this globally.
Fixed across the board.
Quoted 14 lines
Quoted 11 lines
package/wview/Config.in new file +1
-0@@ -0,0 +1,23 @@ +comment "wview needs a toolchain w/ C++, wchar and udev /devmanagement"
+ depends on !(BR2_INSTALL_LIBSTDCPP &&BR2_USE_WCHAR&&BR2_PACKAGE_HAS_UDEV)We normally write such conditions as:
Quoted 1 line
depends on !<foo> || !<bar> || !<baz>
Fixed
Quoted 9 lines
package/wview/Config.in line 9
Quoted 7 lines
package/wview/Config.in new file +7
-0+ +config BR2_PACKAGE_WVIEW + bool "wview" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_PACKAGE_APACHEWhy ?
The daemon have a dependency on a webserver.
It uses apache + php to generate rolling graphs.
AUTOTOOLs checks for them as I remember.
Quoted 4 lines
Quoted 2 lines
+ depends on
BR2_PACKAGE_PHPWhy ?
as above ...
Quoted 4 lines
Quoted 2 lines
+ select
BR2_PACKAGE_RADLIBThere is no such package in Buildroot.
radklib v5 is on the mailing list.
Quoted 7 lines
package/wview/Config.in line 17
Quoted 6 lines
package/wview/Config.in new file +5
-0+ select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_GD + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_OPENSSL
Quoted 5 lines
The package also needs sqlite, as can be seen in its configure script:
AC_CHECK_LIB([sqlite3], [sqlite3_open], [], [echo "libsqlite3 is missing!";exit -1])
Let me look into that one, it may not be accurate.
Quoted 6 lines
Thread support is also needed, as can be seen in the configure script:
AC_CHECK_LIB([pthread], [pthread_create], [], [echo "libpthread is missing!";exit -1])
Will look into this.
Quoted 10 lines
package/wview/Config.in line 23
Quoted 8 lines
package/wview/Config.in new file +2
-0+ help + wview is a collection of unix daemons which interfacewith a
package/wview/Config.in new file +4
-0+ supported weather station to retrieve archive records + (if generated by the station) and current conditions. + + http://sourceforge.net/projects/radlib/Is this the right URL ?
Have fixed
Quoted 4 lines
Quoted 4 lines
package/wview/S61wview new file +0
-1--- /dev/null
Quoted 8 lines
package/wview/S61wview line 4
Quoted 6 lines
+++ b/package/wview/S61wview
package/wview/S61wview new file +4
-0@@ -0,0 +1,205 @@ +#!/bin/sh + +# add to the shared library search path +export LD_LIBRARY_PATH=/lib:/usr/libNot needed.
ok
Quoted 7 lines
package/wview/S61wview line 8
Quoted 5 lines
package/wview/S61wview new file +4
-0+CONF_DIRECTORY=/etc/wview +RUN_DIRECTORY=/var/wview +WVIEW_INSTALL_DIR=/usr/bin +# chkconfig: - 89 11Not needed.
ok
Quoted 14 lines
package/wview/S61wview line 18
Quoted 12 lines
package/wview/S61wview new file +5
-0+# description: wview is a unix weather program +# +# wview Start/Stop the wview daemons +# +# processnames: wviewd htmlgend wviewftpd wvalarmd wvcwopdwviewsshd wvhttpd
package/wview/S61wview new file +5
-0+# config: $prefix/etc/wview +# pidfiles: $prefix/var/wview/*.pid + +# Source function library: +#. /etc/init.d/functionsNot needed.
ok
Quoted 14 lines
Quoted 14 lines
package/wview/S61wview new file +14
-0+ +WVIEWD_FILE=`cat $CONF_DIRECTORY/wview-binary` +WVIEWD_BIN=$WVIEW_INSTALL_DIR/$WVIEWD_FILE +test -x $WVIEWD_BIN || exit 5 + +HTMLD_BIN=$WVIEW_INSTALL_DIR/htmlgend +test -x $HTMLD_BIN || exit 6 + +FTPD_BIN=$WVIEW_INSTALL_DIR/wviewftpd +test -x $FTPD_BIN || exit 7 + +SSHD_BIN=$WVIEW_INSTALL_DIR/wviewsshd +test -x $SSHD_BIN || exit 7 +
Quoted 8 lines
package/wview/S61wview line 37
Quoted 5 lines
package/wview/S61wview new file +5
-0+ALARMD_BIN=$WVIEW_INSTALL_DIR/wvalarmd +test -x $ALARMD_BIN || exit 8 + +CWOPD_BIN=$WVIEW_INSTALL_DIR/wvcwopd +test -x $CWOPD_BIN || exit 9All those checks are useless, we now Buildroot will have installed those binaries.
ok
Quoted 23 lines
Quoted 23 lines
package/wview/S61wview new file +22
-0+HTTP_BIN=$WVIEW_INSTALL_DIR/wvhttpd + +SQLD_BIN=$WVIEW_INSTALL_DIR/wviewsqld + +RADROUTER_BIN=$WVIEW_INSTALL_DIR/radmrouted + +PMOND_BIN=$WVIEW_INSTALL_DIR/wvpmond +test -x $PMOND_BIN || exit 10 + +WVIEWD_PID=$RUN_DIRECTORY/wviewd.pid +HTMLD_PID=$RUN_DIRECTORY/htmlgend.pid +FTPD_PID=$RUN_DIRECTORY/wviewftpd.pid +SSHD_PID=$RUN_DIRECTORY/wviewsshd.pid +ALARMD_PID=$RUN_DIRECTORY/wvalarmd.pid +CWOPD_PID=$RUN_DIRECTORY/wvcwopd.pid +HTTP_PID=$RUN_DIRECTORY/wvhttpd.pid +SQLD_PID=$RUN_DIRECTORY/wviewsqld.pid +RADROUTER_PID=$RUN_DIRECTORY/radmrouted.pid +PMOND_PID=$RUN_DIRECTORY/wvpmond.pid + +wait_for_time_set() { + THOUSAND=1000
Quoted 8 lines
package/wview/S61wview line 66
Quoted 6 lines
package/wview/S61wview new file +6
-0+ CURRVAL=`date +%s` + while [ "$CURRVAL" -lt "$THOUSAND" ]; do + sleep 1 + CURRVAL=`date +%s` + done +}Why is this needed ?
I will investigate.
Quoted 50 lines
Quoted 50 lines
package/wview/S61wview new file +9
-1+ +kill_running_processes() { + if [ -f $RADROUTER_PID ]; then + echo "radlib router pid file $RADROUTER_PID exists - killing existing process" + kill -15 `cat $RADROUTER_PID` + rm -f $RADROUTER_PID + fi + if [ -f $WVIEWD_PID ]; then + echo "wviewd pid file $WVIEWD_PID exists - killingexisting process"
package/wview/S61wview new file +5
-0+ kill -15 `cat $WVIEWD_PID` + rm -f $WVIEWD_PID + fi + if [ -f $HTMLD_PID ]; then + echo "htmlgend pid file $HTMLD_PID exists - killingexisting process"
package/wview/S61wview new file +5
-0+ kill -15 `cat $HTMLD_PID` + rm -f $HTMLD_PID + fi + if [ -f $FTPD_PID ]; then + echo "wviewftpd pid file $FTPD_PID exists - killingexisting process"
package/wview/S61wview new file +5
-0+ kill -15 `cat $FTPD_PID` + rm -f $FTPD_PID + fi + if [ -f $SSHD_PID ]; then + echo "wviewsshd pid file $SSHD_PID exists - killingexisting process"
package/wview/S61wview new file +5
-0+ kill -15 `cat $SSHD_PID` + rm -f $SSHD_PID + fi + if [ -f $ALARMD_PID ]; then + echo "wvalarmd pid file $ALARMD_PID exists -killing existing process"
package/wview/S61wview new file +5
-0+ kill -15 `cat $ALARMD_PID` + rm -f $ALARMD_PID + fi + if [ -f $CWOPD_PID ]; then + echo "wvcwopd pid file $CWOPD_PID exists - killingexisting process"
package/wview/S61wview new file +5
-0+ kill -15 `cat $CWOPD_PID` + rm -f $CWOPD_PID + fi + if [ -f $HTTP_PID ]; then + echo "wvhttpd pid file $HTTP_PID exists - killingexisting process"
package/wview/S61wview new file +3
-0+ kill -15 `cat $HTTP_PID` + rm -f $HTTP_PID + fi
Quoted 8 lines
package/wview/S61wview line 113
Quoted 6 lines
package/wview/S61wview new file +2
-0+ if [ -f $PMOND_PID ]; then + echo "wvpmond pid file $PMOND_PID exists - killingexisting process"
package/wview/S61wview new file +3
-0+ kill -15 `cat $PMOND_PID` + rm -f $PMOND_PID + fiPlease use start-stop-daemon instead of this code.
ok
Quoted 20 lines
Quoted 20 lines
package/wview/S61wview new file +20
-0+} + +case "$1" in + start) + kill_running_processes + + wait_for_time_set + + echo "Starting wview daemons:" + + if [ -x $RADROUTER_BIN ]; then + $RADROUTER_BIN 1 $RUN_DIRECTORY + else + echo "Cannot find $RADROUTER_BIN - exiting!" + exit 10 + fi + sleep 1 + $WVIEWD_BIN + sleep 1 + $HTMLD_BIN
Quoted 8 lines
package/wview/S61wview line 139
Quoted 6 lines
package/wview/S61wview new file +6
-0+ $ALARMD_BIN + $CWOPD_BIN + $HTTP_BIN + $FTPD_BIN + $SSHD_BIN + $PMOND_BINUse start-stop-daemon.
ok
Quoted 27 lines
+ ;;
Quoted 26 lines
package/wview/S61wview new file +5
-0+ start-trace) + kill_running_processes + + echo "Starting wview daemons (tracing to $RUN_DIRECTORY):" + echo "Warning: traced processes run very slowly and mayeffect performance."
package/wview/S61wview new file +9
-0+ + if [ -x $RADROUTER_BIN ]; then + $RADROUTER_BIN 1 $RUN_DIRECTORY + else + echo "Cannot find $RADROUTER_BIN - exiting!" + exit 10 + fi + sleep 1 + strace -o $RUN_DIRECTORY/$WVIEWD_FILE.trace $WVIEWD_BIN -f&>
/dev/null&package/wview/S61wview new file +2
-0+ sleep 1 + strace -o $RUN_DIRECTORY/htmlgend.trace $HTMLD_BIN -f &>
/dev/null&
+ strace -o $RUN_DIRECTORY/wvalarmd.trace $ALARMD_BIN -f &>/dev/null&
+ strace -o $RUN_DIRECTORY/wvcwopd.trace $CWOPD_BIN -f &>/dev/null&
+ strace -o $RUN_DIRECTORY/wvhttpd.trace $HTTP_BIN -f &>/dev/null&
+ strace -o $RUN_DIRECTORY/wviewftpd.trace $FTPD_BIN -f &>
Quoted 8 lines
Quoted 6 lines
/dev/null&
+ strace -o $RUN_DIRECTORY/wviewsshd.trace $SSHD_BIN -f &>/dev/null&
+ strace -o $RUN_DIRECTORY/wvpmond.trace $PMOND_BIN -f &>/dev/null&
+ ;;Remove all of this.
ok
Quoted 56 lines
Quoted 21 lines
package/wview/S61wview new file +20
-0+ stop) + echo "Shutting down wview daemons..." + if [ -f $PMOND_PID ]; then + kill -15 `cat $PMOND_PID` + fi + if [ -f $HTTP_PID ]; then + kill -15 `cat $HTTP_PID` + fi + if [ -f $CWOPD_PID ]; then + kill -15 `cat $CWOPD_PID` + fi + if [ -f $ALARMD_PID ]; then + kill -15 `cat $ALARMD_PID` + fi + if [ -f $SSHD_PID ]; then + kill -15 `cat $SSHD_PID` + fi + if [ -f $FTPD_PID ]; then + kill -15 `cat $FTPD_PID` + fipackage/wview/S61wview line 193
Quoted 10 lines
package/wview/S61wview new file +10
-0+ if [ -f $HTMLD_PID ]; then + kill -15 `cat $HTMLD_PID` + fi + if [ -f $WVIEWD_PID ]; then + kill -15 `cat $WVIEWD_PID` + fi + sleep 1 + if [ -f $RADROUTER_PID ]; then + kill -15 `cat $RADROUTER_PID` + fiUse start-stop-daemon, and remove
kill_running_processes.Quoted 20 lines
index 0000000..701bf9f
package/wview/wview.hash new file +1
-0@@ -0,0 +1 @@ +sha256
460b34fcdf36f4905edf65e150ec83118e1e631c5532901feefcdc0266a27453wview-5.21.7.tar.gzpackage/wview/wview.mk new file +1
-0@@ -0,0 +1,23 @@ +################################################################################
package/wview/wview.mk new file +4
-0+# +# wview +# +################################################################################
Quoted 8 lines
package/wview/wview.mk line 11
Quoted 6 lines
package/wview/wview.mk new file +6
-0+ +WVIEW_VERSION = 5.21.7 +WVIEW_SOURCE = wview-$(WVIEW_VERSION).tar.gz +WVIEW_SITE = http://downloads.sourceforge.net/wview +WVIEW_INSTALL_STAGING = YES +WVIEW_LICENSE = GPL v2Should be "GPLv2"
ok
Quoted 8 lines
Quoted 3 lines
package/wview/wview.mk new file +2
-0+WVIEW_LICENSE_FILES = COPYING +VIEW_DEPENDENCIES = radlib libcurl gd libpng udev libusb opensslmysql
VIEW_DEPENDENCIESis never taken into account since the variable prefix
is not correct. This very mistake is a good indication that you have never built this package.
Ok - my mistake.
Quoted 5 lines
Whenever you submit a new package in
Buildroot, please at least make sure that it builds fine in a configuration that has *only* this package selected in menuconfig, and
that a build from scratch of this configuration works fine.
Apologies I thought I had, I clearly messed up - I usually do a 'rm -rf output'.
Quoted 1 line
radlib doesn't exist in Buildroot.
radlib patch is in v5 on the BL mailing list.
Quoted 4 lines
You have "mysql" in this variable, but it is not selected in the Config.in file. Plus, I don't see any mysql use in the source code itself.
I will look into this, I am pretty sure it is required. I will confirm.
Quoted 2 lines
You need to add sqlite in there.
I will look into this.
Quoted 6 lines
package/wview/wview.mk line 16
Quoted 3 lines
package/wview/wview.mk new file +3
-0+WVIEW_AUTORECONF = YES + +WVIEW_CONF_OPTS += --enable-mysql --prefix=$(STAGING_DIR)/usrThere is no --enable-mysql configuration option.
I will look into this.
Quoted 7 lines
Passing --prefix=$(STAGING_DIR)/usr is completely wrong. Leave - -prefix
to its default value. If the program doesn't build with - -prefix=/usr,
then something else is broken in the package Makefiles, and passing a different --prefix is 1/ papering over the problem and 2/ potentially harmful.
Yes - this is the same mess that there was radlib, have had to make similar changes there.
Quoted 6 lines
Hint: the problem is at least the -L$(prefix)/lib in the Makefile.am, as pointed above.
I've marked the patch as Changes Requested. Please resubmit a new version addressing the above issues. Thanks!
Thanks Thomas - apologies for the mess.
Quoted 1 line
Thomas