summaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorvs <vs@FreeBSD.org>2005-04-26 14:32:53 +0000
committervs <vs@FreeBSD.org>2005-04-26 14:32:53 +0000
commit0a5d9158bb272ae1527de84c8e449076a340b80a (patch)
tree2b94c23b312d323ebe26ffe37d9ab38ef6c07bf0 /sysutils
parentc2ff4c1383f1102bf1c3b714933d1999317adf7a (diff)
downloadFreeBSD-ports-0a5d9158bb272ae1527de84c8e449076a340b80a.zip
FreeBSD-ports-0a5d9158bb272ae1527de84c8e449076a340b80a.tar.gz
- Update to 2.71
- Add rcNG scripts, donated by J. Martin Petersen (jmp at alvorlig dot dk) - Add WITHOUT_SYMON/WITHOUT_SYMUX flags PR: ports/80339 Submitted by: maintainer
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/symon/Makefile55
-rw-r--r--sysutils/symon/distinfo4
-rw-r--r--sysutils/symon/files/patch-conf.sh59
-rw-r--r--sysutils/symon/files/patch-sm_proc.c33
-rw-r--r--sysutils/symon/files/patch-symon-Makefile14
-rw-r--r--sysutils/symon/files/patch-symux-Makefile14
-rw-r--r--sysutils/symon/files/pkg-message.in (renamed from sysutils/symon/pkg-message)0
-rw-r--r--sysutils/symon/files/symon.sh.in18
-rw-r--r--sysutils/symon/files/symux.sh.in17
-rw-r--r--sysutils/symon/pkg-descr4
-rw-r--r--sysutils/symon/pkg-plist12
11 files changed, 104 insertions, 126 deletions
diff --git a/sysutils/symon/Makefile b/sysutils/symon/Makefile
index e4e2805..cf68d23 100644
--- a/sysutils/symon/Makefile
+++ b/sysutils/symon/Makefile
@@ -6,35 +6,70 @@
#
PORTNAME= symon
-PORTVERSION= 2.70
+PORTVERSION= 2.71
CATEGORIES= sysutils
MASTER_SITES= http://www.xs4all.nl/~wpd/symon/philes/
MAINTAINER= q@uni.de
COMMENT= Performance and information monitoring tool
+USE_REINPLACE= yes
+WRKSRC= ${WRKDIR}/${PORTNAME}
+SUB_FILES= pkg-message
+
+# Synonym for WITHOUT_SYMUX
+.if defined(WITHOUT_RRD)
+WITHOUT_SYMUX= yes
+.endif
+
+.if !defined(WITHOUT_SYMUX)
LIB_DEPENDS= rrd.0:${PORTSDIR}/net/rrdtool
+.endif
-WRKSRC= ${WRKDIR}/${PORTNAME}
-MAKE_ARGS+= SYSCONFDIR=${LOCALBASE}/etc BINDIR=bin
-PKGMESSAGE= ${WRKDIR}/.pkg-message
+.if defined(WITHOUT_SYMUX) && defined(WITHOUT_SYMON)
+IGNORE= You have defined both WITHOUT_SYMUX or WITHOUT_RRD *and* WITHOUT_SYMON
+.endif
-MAN8= symon.8 symux.8
+SUBDIR= lib
+.if !defined(WITHOUT_SYMON)
+SUBDIR+= symon
+MAN8+= symon.8
+PLIST_SUB+= SYMON=""
+USE_RC_SUBR+= symon.sh
+.else
+PLIST_SUB+= SYMON="@comment "
+.endif
+.if !defined(WITHOUT_SYMUX)
+SUBDIR+= symux
+MAN8+= symux.8
+PLIST_SUB+= SYMUX=""
+USE_RC_SUBR+= symux.sh
+.else
+PLIST_SUB+= SYMUX="@comment "
+.endif
+SUBDIR+= client
+
+MAKE_ARGS+= SUBDIR="${SUBDIR}"
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 500000
+# Symux doesn't need additional LIBS. Symon doesn't need libkvm on FreeBSD 4.x
post-patch:
- @${ECHO} "" > ${WRKSRC}/platform/FreeBSD/Makefile.inc
+ @${REINPLACE_CMD} 's/^LIBS+=/LIBS=/' ${WRKSRC}/symux/Makefile
+.if ${OSVERSION} < 500000
+ @${REINPLACE_CMD} 's/-lkvm//' ${WRKSRC}/platform/FreeBSD/Makefile.inc
.endif
-post-build:
- @${SED} 's,%%LOCALBASE%%,${LOCALBASE},g' pkg-message > ${PKGMESSAGE}
-
pre-install:
@${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
post-install:
+.if !defined(WITHOUT_SYMON)
+ @${INSTALL_SCRIPT} -m 555 ${WRKDIR}/symon.sh ${PREFIX}/etc/rc.d/symon.sh
+.endif
+.if !defined(WITHOUT_SYMUX)
+ @${INSTALL_SCRIPT} -m 555 ${WRKDIR}/symux.sh ${PREFIX}/etc/rc.d/symux.sh
+.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/sysutils/symon/distinfo b/sysutils/symon/distinfo
index a51691c..466fed1 100644
--- a/sysutils/symon/distinfo
+++ b/sysutils/symon/distinfo
@@ -1,2 +1,2 @@
-MD5 (symon-2.70.tar.gz) = 01b3cf975185418c85845bddf0ee22e6
-SIZE (symon-2.70.tar.gz) = 75322
+MD5 (symon-2.71.tar.gz) = a9c0c77239c834fad0f326521d76437e
+SIZE (symon-2.71.tar.gz) = 79223
diff --git a/sysutils/symon/files/patch-conf.sh b/sysutils/symon/files/patch-conf.sh
deleted file mode 100644
index 0ead1aa..0000000
--- a/sysutils/symon/files/patch-conf.sh
+++ /dev/null
@@ -1,59 +0,0 @@
---- platform/FreeBSD/conf.sh.orig Thu Mar 10 09:34:37 2005
-+++ platform/FreeBSD/conf.sh Thu Mar 10 09:35:24 2005
-@@ -1,25 +1,34 @@
--case `grep -cq "m_drops" /usr/include/sys/mbuf.h` in
--1) echo "#define HAS_MBUF_MDROPS 1" ;;
--0) echo "#undef HAS_MBUF_MDROPS" ;;
--esac;
--case `grep -cq "sf_allocfail" /usr/include/sys/mbuf.h` in
--1) echo "#define HAS_MBUF_SFALLOCFAIL 1" ;;
--0) echo "#undef HAS_MBUF_SFALLOCFAIL" ;;
--esac;
--case `grep -cq "VM_TOTAL" /usr/include/vm/vm_param.h` in
--0) echo "#define VM_TOTAL VM_METER" ;;
--esac;
--sysctl -N vm.nswapdev 1>/dev/null 2>&1
--case $? in
--1) echo "#undef HAS_VM_NSWAPDEV" ;;
--0) echo "#define HAS_VM_NSWAPDEV 1" ;;
--esac;
-+#!/bin/sh
-+if grep -q "m_drops" /usr/include/sys/mbuf.h; then
-+ echo "#define HAS_MBUF_MDROPS 1"
-+else
-+ echo "#undef HAS_MBUF_MDROPS"
-+fi
-+if grep -q "sf_allocfail" /usr/include/sys/mbuf.h; then
-+ echo "#define HAS_MBUF_SFALLOCFAIL 1"
-+else
-+ echo "#undef HAS_MBUF_SFALLOCFAIL"
-+fi
-+if ! grep -q "VM_TOTAL" /usr/include/vm/vm_param.h; then
-+ echo "#define VM_TOTAL VM_METER"
-+fi
-+if grep -q "struct xswdev" /usr/include/vm/vm_param.h; then
-+ echo "#define HAS_VM_NSWAPDEV 1"
-+else
-+ echo "#undef HAS_VM_NSWAPDEV"
-+fi
- if [ -f /usr/include/net/pfvar.h ]; then
- echo "#define HAS_PFVAR_H 1"
- else
- echo "#undef HAS_PFVAR_H"
--fi;
--case `grep -cq "ki_paddr" /usr/include/sys/user.h` in
--1) echo "#define HAS_KI_PADDR 1" ;;
--0) echo "#undef HAS_KI_PADDR" ;;
--esac;
-\ No newline at end of file
-+fi
-+if grep -q "ki_paddr" /usr/include/sys/user.h; then
-+ echo "#define HAS_KI_PADDR 1"
-+else
-+ echo "#undef HAS_KI_PADDR"
-+fi
-+if grep -q "struct rusage_ext" /usr/include/sys/proc.h; then
-+ echo "#define HAS_RUSAGE_EXT 1"
-+else
-+ echo "#undef HAS_RUSAGE_EXT"
-+fi
diff --git a/sysutils/symon/files/patch-sm_proc.c b/sysutils/symon/files/patch-sm_proc.c
index 7ab1d9d..9c6e334 100644
--- a/sysutils/symon/files/patch-sm_proc.c
+++ b/sysutils/symon/files/patch-sm_proc.c
@@ -1,18 +1,15 @@
---- platform/FreeBSD/sm_proc.c.orig Thu Mar 10 09:29:00 2005
-+++ platform/FreeBSD/sm_proc.c Thu Mar 10 09:27:52 2005
-@@ -181,9 +181,15 @@
- if (proc_kd) {
- if (kvm_read(proc_kd, (unsigned long)pp->ki_paddr, &pproc,
- sizeof(pproc)) == sizeof(pproc)) {
-+#ifdef HAS_RUSAGE_EXT
-+ cpu_uticks += pproc.p_rux.rux_uticks; /* user */
-+ cpu_sticks += pproc.p_rux.rux_sticks; /* sys */
-+ cpu_iticks += pproc.p_rux.rux_iticks; /* int */
-+#else
- cpu_uticks += pproc.p_uticks; /* user */
- cpu_sticks += pproc.p_sticks; /* sys */
- cpu_iticks += pproc.p_iticks; /* int */
-+#endif
- } else {
- warning("while reading kvm: %s", kvm_geterr(proc_kd));
- }
+--- platform/FreeBSD/sm_proc.c.orig Mon Apr 25 17:34:28 2005
++++ platform/FreeBSD/sm_proc.c Mon Apr 25 17:34:43 2005
+@@ -182,9 +182,9 @@
+ if (kvm_read(proc_kd, (unsigned long)pp->ki_paddr, &pproc,
+ sizeof(pproc)) == sizeof(pproc)) {
+ #ifdef HAS_RUSAGE_EXT
+- cpu_uticks += pproc.p_rux.p_uticks; /* user */
+- cpu_sticks += pproc.p_rux.p_sticks; /* sys */
+- cpu_iticks += pproc.p_rux.p_iticks; /* int */
++ cpu_uticks += pproc.p_rux.rux_uticks; /* user */
++ cpu_sticks += pproc.p_rux.rux_sticks; /* sys */
++ cpu_iticks += pproc.p_rux.rux_iticks; /* int */
+ #else
+ cpu_uticks += pproc.p_uticks; /* user */
+ cpu_sticks += pproc.p_sticks; /* sys */
diff --git a/sysutils/symon/files/patch-symon-Makefile b/sysutils/symon/files/patch-symon-Makefile
deleted file mode 100644
index 07904dc..0000000
--- a/sysutils/symon/files/patch-symon-Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
---- symon/Makefile.orig Fri Mar 4 10:39:20 2005
-+++ symon/Makefile Fri Mar 4 10:43:13 2005
-@@ -26,9 +26,9 @@
- clean:
- rm -f conf.h symon symon.cat8 symon.core ${OBJS}
-
--install: symon symon.cat8 symon.conf
-+install: symon symon.8 symon.conf
- ${INSTALL} -c -m 555 -g wheel -o root symon ${PREFIX}/${BINDIR}
-- ${INSTALL} -c -m 444 -g wheel -o root symon.cat8 ${PREFIX}/${MANDIR}/cat8/symon.0
-+ ${INSTALL} -c -m 444 -g wheel -o root symon.8 ${PREFIX}/${MANDIR}/man8/symon.8
- ${INSTALL} -d -m 555 -g bin -o root ${PREFIX}/${SHRDIR}
- ${INSTALL} -c -m 555 -g wheel -o root c_config.sh ${PREFIX}/${SHRDIR}
- ${INSTALL} -d -m 555 -g bin -o root ${PREFIX}/${EXADIR}
diff --git a/sysutils/symon/files/patch-symux-Makefile b/sysutils/symon/files/patch-symux-Makefile
deleted file mode 100644
index 34b06a3..0000000
--- a/sysutils/symon/files/patch-symux-Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
---- symux/Makefile.orig Fri Mar 4 10:43:43 2005
-+++ symux/Makefile Fri Mar 4 10:44:01 2005
-@@ -17,9 +17,9 @@
- clean:
- rm -f conf.h symux symux.cat8 symux.core ${OBJS}
-
--install: symux symux.cat8 c_smrrds.sh symux.conf
-+install: symux symux.8 c_smrrds.sh symux.conf
- ${INSTALL} -c -m 555 -g bin -o root symux ${PREFIX}/${BINDIR}
-- ${INSTALL} -c -m 444 -g wheel -o root symux.cat8 ${PREFIX}/${MANDIR}/cat8/symux.0
-+ ${INSTALL} -c -m 444 -g wheel -o root symux.8 ${PREFIX}/${MANDIR}/man8/symux.8
- ${INSTALL} -d -m 555 -g bin -o root ${PREFIX}/${SHRDIR}
- ${INSTALL} -c -m 544 -g bin -o root c_smrrds.sh ${PREFIX}/${SHRDIR}
- ${INSTALL} -d -m 555 -g bin -o root ${PREFIX}/${EXADIR}
diff --git a/sysutils/symon/pkg-message b/sysutils/symon/files/pkg-message.in
index b4501d4..b4501d4 100644
--- a/sysutils/symon/pkg-message
+++ b/sysutils/symon/files/pkg-message.in
diff --git a/sysutils/symon/files/symon.sh.in b/sysutils/symon/files/symon.sh.in
new file mode 100644
index 0000000..be8d457
--- /dev/null
+++ b/sysutils/symon/files/symon.sh.in
@@ -0,0 +1,18 @@
+#!/bin/sh
+# $FreeBSD$
+
+# PROVIDE: symon
+# REQUIRE: NETWORKING SERVERS
+# KEYWORD: FreeBSD
+
+. %%RC_SUBR%%
+
+name="symon"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/bin/symon"
+
+symon_enable=${symon_enable:-"NO"}
+
+load_rc_config $name
+run_rc_command "$1"
+
diff --git a/sysutils/symon/files/symux.sh.in b/sysutils/symon/files/symux.sh.in
new file mode 100644
index 0000000..39778dd
--- /dev/null
+++ b/sysutils/symon/files/symux.sh.in
@@ -0,0 +1,17 @@
+#!/bin/sh
+# $FreeBSD$
+
+# PROVIDE: symux
+# REQUIRE: NETWORKING SERVERS
+# KEYWORD: FreeBSD
+
+. %%RC_SUBR%%
+
+name="symux"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/bin/symux"
+symux_enable=${symux_enable:-"NO"}
+
+load_rc_config $name
+run_rc_command "$1"
+
diff --git a/sysutils/symon/pkg-descr b/sysutils/symon/pkg-descr
index 7ab6849..f0a57e0 100644
--- a/sysutils/symon/pkg-descr
+++ b/sysutils/symon/pkg-descr
@@ -6,11 +6,9 @@ interface and disk statistics every 5 seconds. It sends this data on to symux
for further processing. symon has been designed to inflict minimal performance
and security impact -- it can be run as nobody on the system it monitors.
-symux is a non-priviledged daemon that listens to incoming symon traffic. symux
+symux is a non-privileged daemon that listens to incoming symon traffic. symux
can write the incoming symon streams into rrd files. Clients interested in
monitoring machine state can also log into symux and receive data as ascii as
it arrives.
-symon2web is a php script that can show the data stored in the rrd files.
-
WWW: http://www.xs4all.nl/~wpd/symon
diff --git a/sysutils/symon/pkg-plist b/sysutils/symon/pkg-plist
index 14d0b3a..6adf8ad 100644
--- a/sysutils/symon/pkg-plist
+++ b/sysutils/symon/pkg-plist
@@ -1,9 +1,9 @@
-bin/symon
-bin/symux
-%%EXAMPLESDIR%%/symon.conf
-%%EXAMPLESDIR%%/symux.conf
-%%DATADIR%%/c_config.sh
-%%DATADIR%%/c_smrrds.sh
+%%SYMON%%bin/symon
+%%SYMUX%%bin/symux
+%%SYMON%%%%EXAMPLESDIR%%/symon.conf
+%%SYMUX%%%%EXAMPLESDIR%%/symux.conf
+%%SYMON%%%%DATADIR%%/c_config.sh
+%%SYMUX%%%%DATADIR%%/c_smrrds.sh
%%DATADIR%%/client/SymuxClient.0
%%DATADIR%%/client/SymuxClient.pm
%%DATADIR%%/client/getsymonitem.pl
OpenPOWER on IntegriCloud