From 151799673acc8eef209373607507960454708476 Mon Sep 17 00:00:00 2001 From: sturm Date: Mon, 16 Feb 2004 20:09:03 +0000 Subject: [PATCH] update to symon 2.63 - some port cleanup - @extra - remove -web subpackage, will become independent port (maybe ;) from maintainer Willem Dijkstra --- sysutils/symon/Makefile | 26 ++++++---------------- sysutils/symon/distinfo | 6 +++--- sysutils/symon/pkg/DEINSTALL | 28 +++++++++++++----------- sysutils/symon/pkg/DEINSTALL-mon | 28 +++++++++++++----------- sysutils/symon/pkg/DESCR | 7 +++--- sysutils/symon/pkg/DESCR-web | 6 ------ sysutils/symon/pkg/INSTALL | 37 ++++++++++++++++++++++++-------- sysutils/symon/pkg/INSTALL-mon | 36 ++++++++++++++++++++++++------- sysutils/symon/pkg/MESSAGE | 2 +- sysutils/symon/pkg/MESSAGE-mon | 2 +- sysutils/symon/pkg/MESSAGE-mux | 2 +- sysutils/symon/pkg/MESSAGE-web | 8 ------- sysutils/symon/pkg/PLIST | 28 ++++++------------------ sysutils/symon/pkg/PLIST-mon | 5 ++++- sysutils/symon/pkg/PLIST-mux | 5 ++++- sysutils/symon/pkg/PLIST-web | 23 -------------------- 16 files changed, 117 insertions(+), 132 deletions(-) delete mode 100644 sysutils/symon/pkg/DESCR-web delete mode 100644 sysutils/symon/pkg/MESSAGE-web delete mode 100644 sysutils/symon/pkg/PLIST-web diff --git a/sysutils/symon/Makefile b/sysutils/symon/Makefile index b957141498d..dc791df310b 100644 --- a/sysutils/symon/Makefile +++ b/sysutils/symon/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.9 2004/02/04 07:39:19 sturm Exp $ +# $OpenBSD: Makefile,v 1.10 2004/02/16 20:09:03 sturm Exp $ COMMENT= "active monitoring tool" -V= 2.60 +V= 2.63 DISTNAME= symon-${V} CATEGORIES= sysutils net -HOMEPAGE= http://www.xs4all.nl/~wpd/symon/ +HOMEPAGE= http://www.xs4all.nl/~wpd/symon MAINTAINER= Willem Dijkstra # BSD @@ -14,7 +14,7 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -MASTER_SITES= ${HOMEPAGE} +MASTER_SITES= ${HOMEPAGE}/philes/ SUBPACKAGE?= @@ -22,17 +22,10 @@ SUBPACKAGE?= MULTI_PACKAGES+= -mon COMMENT-mon= "active host monitor" MON_LIBDEPENDS= -MON_RUNDEPENDS= # gatherer only package MULTI_PACKAGES+= -mux COMMENT-mux= "symon data gatherer" -MUX_LIBDEPENDS= rrd:rrdtool-*:net/rrdtool -MUX_RUNDEPENDS= rrd:rrdtool-*:net/rrdtool -# web frontend only package -MULTI_PACKAGES+= -web -COMMENT-web= "symon web frontend" -WEB_LIBDEPENDS= -WEB_RUNDEPENDS= rrd:rrdtool-*:net/rrdtool php:php4-core->=4.2.3:www/php4/core +MUX_LIBDEPENDS= rrd:rrdtool-*:net/rrdtool .for i in ${MULTI_PACKAGES} FULLPKGNAME${i}= symon${i}-${V} @@ -41,16 +34,9 @@ FULLPKGNAME${i}= symon${i}-${V} .if defined(PACKAGING) && !empty(SUBPACKAGE) MODULE_NAME= ${SUBPACKAGE:S/-//g} LIB_DEPENDS= ${${MODULE_NAME:U}_LIBDEPENDS} -RUN_DEPENDS= ${${MODULE_NAME:U}_RUNDEPENDS} MESSAGE= ${PKGDIR}/MESSAGE${SUBPACKAGE} .else -BUILD_DEPENDS= rrd:rrdtool-*:net/rrdtool -RUN_DEPENDS= rrd:rrdtool-*:net/rrdtool php:php4-core->=4.2.3:www/php4/core -LIB_DEPENDS= rrd:rrdtool-*:net/rrdtool -.endif - -.if defined(PACKAGING) && ${SUBPACKAGE} == "-web" -PKG_ARCH= * +LIB_DEPENDS= rrd:rrdtool-*:net/rrdtool .endif WRKDIST= ${WRKDIR}/symon diff --git a/sysutils/symon/distinfo b/sysutils/symon/distinfo index 27dc848371c..34d5870a12b 100644 --- a/sysutils/symon/distinfo +++ b/sysutils/symon/distinfo @@ -1,3 +1,3 @@ -MD5 (symon-2.60.tar.gz) = 8b57c61078faf5d5eaadef5f342d8306 -RMD160 (symon-2.60.tar.gz) = 36650923c893b4521e4c9f584f2b547925a070ff -SHA1 (symon-2.60.tar.gz) = c2f7dd6df28cd02a37d79358effefc262c74a5fa +MD5 (symon-2.63.tar.gz) = d5a203d924fd3c131200d93575289333 +RMD160 (symon-2.63.tar.gz) = d7df4290ffa8481f2b46010c49977ba7adaa4efb +SHA1 (symon-2.63.tar.gz) = 9d648c629b0ea6f4ac488ca8cd953235b7fdf9f0 diff --git a/sysutils/symon/pkg/DEINSTALL b/sysutils/symon/pkg/DEINSTALL index 3c927f3d6ab..f5fa3363b31 100644 --- a/sysutils/symon/pkg/DEINSTALL +++ b/sysutils/symon/pkg/DEINSTALL @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: DEINSTALL,v 1.2 2003/02/04 22:59:48 naddy Exp $ +# $OpenBSD: DEINSTALL,v 1.3 2004/02/16 20:09:04 sturm Exp $ # # symon de-installation @@ -7,19 +7,23 @@ set -e PATH=/bin:/usr/bin:/sbin:/usr/sbin PREFIX=${PKG_PREFIX:-/usr/local} CONFIG_FILE=${SYSCONFDIR}/symon.conf +SYMONUSER=_symon +SYMONGROUP=_symon -if [ -e $CONFIG_FILE ]; then - echo - echo "+---------------" - echo "| To completely deinstall the $1 package you need to perform" - echo "| this step as root:" - echo "|" +echo +echo "+---------------" +echo "| To completely deinstall the $1 package you need to perform" +echo "| this step as root:" +echo "|" +echo "| userdel $SYMONUSER" +echo "| groupdel $SYMONGROUP" +if [ "$PKG_DELETE_EXTRA" != Yes -a -f ${CONFIG_FILE} ]; then echo "| rm -f $CONFIG_FILE" - echo "|" - echo "| Do not do this if you plan on re-installing $1" - echo "| at some future time." - echo "+---------------" - echo fi +echo "|" +echo "| Do not do this if you plan on re-installing $1" +echo "| at some future time." +echo "+---------------" +echo exit 0 diff --git a/sysutils/symon/pkg/DEINSTALL-mon b/sysutils/symon/pkg/DEINSTALL-mon index 3d995362793..dfda46c8a44 100644 --- a/sysutils/symon/pkg/DEINSTALL-mon +++ b/sysutils/symon/pkg/DEINSTALL-mon @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: DEINSTALL-mon,v 1.2 2003/02/17 23:54:49 naddy Exp $ +# $OpenBSD: DEINSTALL-mon,v 1.3 2004/02/16 20:09:04 sturm Exp $ # # symon de-installation @@ -7,19 +7,23 @@ set -e PATH=/bin:/usr/bin:/sbin:/usr/sbin PREFIX=${PKG_PREFIX:-/usr/local} CONFIG_FILE=${SYSCONFDIR}/symon.conf +SYMONUSER=_symon +SYMONGROUP=_symon -if [ -e $CONFIG_FILE ]; then - echo - echo "+---------------" - echo "| To completely deinstall the $1 package you need to perform" - echo "| this step as root:" - echo "|" +echo +echo "+---------------" +echo "| To completely deinstall the $1 package you need to perform" +echo "| this step as root:" +echo "|" +echo "| userdel $SYMONUSER" +echo "| groupdel $SYMONGROUP" +if [ "$PKG_DELETE_EXTRA" != Yes -a -f ${CONFIG_FILE} ]; then echo "| rm -f $CONFIG_FILE" - echo "|" - echo "| Do not do this if you plan on re-installing $1" - echo "| at some future time." - echo "+---------------" - echo fi +echo "|" +echo "| Do not do this if you plan on re-installing $1" +echo "| at some future time." +echo "+---------------" +echo exit 0 diff --git a/sysutils/symon/pkg/DESCR b/sysutils/symon/pkg/DESCR index 110f9875d37..f0633ff804c 100644 --- a/sysutils/symon/pkg/DESCR +++ b/sysutils/symon/pkg/DESCR @@ -2,9 +2,8 @@ symon is a lightweight system monitor that measures cpu, memory, interface and disk statistics every 5 seconds. This information is then spooled over "the network" to symux for further processing. -The port will yield 4 packages: -symon-mon-${V}.tgz : symon daemon and manual -symon-mux-${V}.tgz : symux daemon, manual and auxiliary scripts -symon-web-${V}.tgz : web frontend +The port will yield 3 packages: +symon-mon-${V}.tgz : symon daemon and manual. +symon-mux-${V}.tgz : symux daemon, manual and rrd creation script. symon-${V}.tgz : all of the above rolled into a single package diff --git a/sysutils/symon/pkg/DESCR-web b/sysutils/symon/pkg/DESCR-web deleted file mode 100644 index cca8e58b623..00000000000 --- a/sysutils/symon/pkg/DESCR-web +++ /dev/null @@ -1,6 +0,0 @@ -symon is a lightweight system monitor that measures cpu, memory, -interface and disk statistics every 5 seconds. This information is -then spooled over "the network" to symux for further processing. - -symon2web is a set of php scripts that provide a view on the data that -symux gathered. diff --git a/sysutils/symon/pkg/INSTALL b/sysutils/symon/pkg/INSTALL index e727eb24fca..41292e26545 100644 --- a/sysutils/symon/pkg/INSTALL +++ b/sysutils/symon/pkg/INSTALL @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: INSTALL,v 1.3 2003/08/01 15:52:16 pvalchev Exp $ +# $OpenBSD: INSTALL,v 1.4 2004/02/16 20:09:04 sturm Exp $ # # Pre/post-installation setup of symon monitor @@ -10,6 +10,26 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin PREFIX=${PKG_PREFIX:-/usr/local} CONFIG_FILE=${SYSCONFDIR}/symon.conf SAMPLE_CONFIG_FILE=$PREFIX/share/examples/symon/symon.conf +SYMONUSER=_symon +SYMONGROUP=_symon +ID=525 + +do_usergroup_install() +{ + # Create symon user and group + if groupinfo -e $SYMONGROUP; then + echo "===> Using $SYMONGROUP group for symon" + else + echo "===> Creating $SYMONGROUP group for symon" + groupadd -g $ID $SYMONGROUP + fi + if userinfo -e $SYMONUSER; then + echo "===> Using $SYMONUSER user for symon" + else + echo "===> Creating $SYMONUSER user for symon" + useradd -g $SYMONGROUP -d /var/empty -L daemon -c 'symon Account' -s /sbin/nologin -u $ID $SYMONUSER + fi +} do_notice() { @@ -34,7 +54,7 @@ do_install() echo "| pf, default disks and interfaces. Please review this file and change" echo "| the configuration to suit your needs." echo "+---------------" - echo + echo } # verify proper execution @@ -48,20 +68,19 @@ fi # case $2 in PRE-INSTALL) - : nothing to pre-install for this port - ;; + do_usergroup_install + ;; POST-INSTALL) if [ -f $CONFIG_FILE ]; then do_notice $1 else do_install $1 fi - ;; + ;; *) - echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 - exit 1 - ;; + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 + ;; esac exit 0 - diff --git a/sysutils/symon/pkg/INSTALL-mon b/sysutils/symon/pkg/INSTALL-mon index 176e8a1d19a..279132a5b94 100644 --- a/sysutils/symon/pkg/INSTALL-mon +++ b/sysutils/symon/pkg/INSTALL-mon @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: INSTALL-mon,v 1.3 2003/08/01 15:52:16 pvalchev Exp $ +# $OpenBSD: INSTALL-mon,v 1.4 2004/02/16 20:09:04 sturm Exp $ # # Pre/post-installation setup of symon monitor @@ -10,6 +10,26 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin PREFIX=${PKG_PREFIX:-/usr/local} CONFIG_FILE=${SYSCONFDIR}/symon.conf SAMPLE_CONFIG_FILE=$PREFIX/share/examples/symon/symon.conf +SYMONUSER=_symon +SYMONGROUP=_symon +ID=525 + +do_usergroup_install() +{ + # Create symon user and group + if groupinfo -e $SYMONGROUP; then + echo "===> Using $SYMONGROUP group for symon" + else + echo "===> Creating $SYMONGROUP group for symon" + groupadd -g $ID $SYMONGROUP + fi + if userinfo -e $SYMONUSER; then + echo "===> Using $SYMONUSER user for symon" + else + echo "===> Creating $SYMONUSER user for symon" + useradd -g $SYMONGROUP -d /var/empty -L daemon -c 'symon Account' -s /sbin/nologin -u $ID $SYMONUSER + fi +} do_notice() { @@ -34,7 +54,7 @@ do_install() echo "| pf, default disks and interfaces. Please review this file and change" echo "| the configuration to suit your needs." echo "+---------------" - echo + echo } # verify proper execution @@ -48,19 +68,19 @@ fi # case $2 in PRE-INSTALL) - : nothing to pre-install for this port - ;; + do_usergroup_install + ;; POST-INSTALL) if [ -f $CONFIG_FILE ]; then do_notice $1 else do_install $1 fi - ;; + ;; *) - echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 - exit 1 - ;; + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 + ;; esac exit 0 diff --git a/sysutils/symon/pkg/MESSAGE b/sysutils/symon/pkg/MESSAGE index 0a8e0bcbfdd..78c7205e0f0 100644 --- a/sysutils/symon/pkg/MESSAGE +++ b/sysutils/symon/pkg/MESSAGE @@ -1,6 +1,6 @@ +--------------- | Example configurations for both symon and symux have been installed -| in ${PREFIX}/share/symon. +| in ${PREFIX}/share/examples/symon. | | RRD files can be obtained by running | ${PREFIX}/share/symon/c_smrrds.sh diff --git a/sysutils/symon/pkg/MESSAGE-mon b/sysutils/symon/pkg/MESSAGE-mon index 768efa40b38..57a5b6dc640 100644 --- a/sysutils/symon/pkg/MESSAGE-mon +++ b/sysutils/symon/pkg/MESSAGE-mon @@ -1,4 +1,4 @@ +--------------- | An example configuration for symon has been installed in -| ${PREFIX}/share/symon. +| ${PREFIX}/share/examples/symon. +--------------- diff --git a/sysutils/symon/pkg/MESSAGE-mux b/sysutils/symon/pkg/MESSAGE-mux index cf4bcd182b2..868db83a8f7 100644 --- a/sysutils/symon/pkg/MESSAGE-mux +++ b/sysutils/symon/pkg/MESSAGE-mux @@ -1,6 +1,6 @@ +--------------- | An example configuration for symux has been installed in -| ${PREFIX}/share/symon. +| ${PREFIX}/share/examples/symon. | | RRD files can be obtained by running | ${PREFIX}/share/symon/c_smrrds.sh diff --git a/sysutils/symon/pkg/MESSAGE-web b/sysutils/symon/pkg/MESSAGE-web deleted file mode 100644 index 20d934fbb7a..00000000000 --- a/sysutils/symon/pkg/MESSAGE-web +++ /dev/null @@ -1,8 +0,0 @@ -+--------------- -| The webapplication has been installed in -| ${PREFIX}/share/symon/web. -| -| Edit datasources.inc to point to the place where symux deposits the -| rrd files. This should point to a directory that contains rrd files -| in the following form: '.../machine/*.rrd'. -+--------------- diff --git a/sysutils/symon/pkg/PLIST b/sysutils/symon/pkg/PLIST index 1de62986f76..76c9cee1783 100644 --- a/sysutils/symon/pkg/PLIST +++ b/sysutils/symon/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.7 2003/10/16 16:44:48 pvalchev Exp $ +@comment $OpenBSD: PLIST,v 1.8 2004/02/16 20:09:04 sturm Exp $ @pkgcfl symon-* libexec/symon libexec/symux @@ -6,30 +6,14 @@ man/cat8/symon.0 man/cat8/symux.0 share/examples/symon/symon.conf share/examples/symon/symux.conf -share/symon/c_config.sh share/symon/c_smrrds.sh -share/symon/web/class_cpu.inc -share/symon/web/class_graph.inc -share/symon/web/class_if.inc -share/symon/web/class_io.inc -share/symon/web/class_mem.inc -share/symon/web/class_pf.inc -share/symon/web/class_debug.inc -share/symon/web/class_proc.inc -share/symon/web/datasources.inc -share/symon/web/graph_cpu.php -share/symon/web/graph_if.php -share/symon/web/graph_io.php -share/symon/web/graph_mem.php -share/symon/web/graph_pf.php -share/symon/web/index.php -share/symon/web/symon.css -share/symon/web/symon.png -share/symon/web/spacer.png -share/symon/web/test_config.php +share/symon/c_config.sh share/symon/client/getsymonitem.pl share/symon/client/SymuxClient.pm share/symon/client/SymuxClient.0 -@dirrm share/symon/web +@dirrm share/examples/symon @dirrm share/symon/client @dirrm share/symon +@cwd ${SYSCONFDIR} +@extra symon.conf +@extraunexec rm -f symux.conf diff --git a/sysutils/symon/pkg/PLIST-mon b/sysutils/symon/pkg/PLIST-mon index d8c1fdbccee..65c6178823e 100644 --- a/sysutils/symon/pkg/PLIST-mon +++ b/sysutils/symon/pkg/PLIST-mon @@ -1,7 +1,10 @@ -@comment $OpenBSD: PLIST-mon,v 1.5 2003/03/31 22:13:51 dhartmei Exp $ +@comment $OpenBSD: PLIST-mon,v 1.6 2004/02/16 20:09:04 sturm Exp $ @pkgcfl symon-[0-9]* libexec/symon man/cat8/symon.0 share/examples/symon/symon.conf share/symon/c_config.sh +@dirrm share/examples/symon @dirrm share/symon +@cwd ${SYSCONFDIR} +@extra symon.conf \ No newline at end of file diff --git a/sysutils/symon/pkg/PLIST-mux b/sysutils/symon/pkg/PLIST-mux index c777655d07b..97056f80350 100644 --- a/sysutils/symon/pkg/PLIST-mux +++ b/sysutils/symon/pkg/PLIST-mux @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST-mux,v 1.4 2003/03/31 22:13:51 dhartmei Exp $ +@comment $OpenBSD: PLIST-mux,v 1.5 2004/02/16 20:09:04 sturm Exp $ @pkgcfl symon-[0-9]* libexec/symux man/cat8/symux.0 @@ -7,5 +7,8 @@ share/examples/symon/symux.conf share/symon/client/getsymonitem.pl share/symon/client/SymuxClient.pm share/symon/client/SymuxClient.0 +@dirrm share/examples/symon @dirrm share/symon/client @dirrm share/symon +@cwd ${SYSCONFDIR} +@extraunexec rm -f symux.conf diff --git a/sysutils/symon/pkg/PLIST-web b/sysutils/symon/pkg/PLIST-web deleted file mode 100644 index 1307745ec32..00000000000 --- a/sysutils/symon/pkg/PLIST-web +++ /dev/null @@ -1,23 +0,0 @@ -@comment $OpenBSD: PLIST-web,v 1.5 2003/10/16 16:44:48 pvalchev Exp $ -@pkgcfl symon-[0-9]* -share/symon/web/class_cpu.inc -share/symon/web/class_graph.inc -share/symon/web/class_if.inc -share/symon/web/class_io.inc -share/symon/web/class_mem.inc -share/symon/web/class_pf.inc -share/symon/web/class_debug.inc -share/symon/web/class_proc.inc -share/symon/web/datasources.inc -share/symon/web/graph_cpu.php -share/symon/web/graph_if.php -share/symon/web/graph_io.php -share/symon/web/graph_mem.php -share/symon/web/graph_pf.php -share/symon/web/index.php -share/symon/web/symon.css -share/symon/web/symon.png -share/symon/web/spacer.png -share/symon/web/test_config.php -@dirrm share/symon/web -@dirrm share/symon