aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Landeg-Jones <jamie@catflap.org>2026-02-26 20:45:53 +0000
committerVladimir Druzenko <vvd@FreeBSD.org>2026-02-26 21:26:46 +0000
commitb98dccb9351011b852d603905dab1968f3af8585 (patch)
treeffcd9d51d58896b3717ede05b14e6e7eeda4677a
parent1370086edabc0ab7e4871a52b125fed11994ca4c (diff)
sysutils/symon: Improve port, take maintainership
- Convert to modern OPTIONS. - Add record to UPDATING about options. - "Samplefy" configs. - Fix warnings from portclippy. - "Unbreak" on 15+ - disable PF support (patches gratefully received!). PR: 292366 Co-authored-by: Vladimir Druzenko <vvd@FreeBSD.org>
-rw-r--r--UPDATING7
-rw-r--r--sysutils/symon/Makefile103
-rw-r--r--sysutils/symon/files/pkg-message.in14
-rw-r--r--sysutils/symon/pkg-plist6
4 files changed, 78 insertions, 52 deletions
diff --git a/UPDATING b/UPDATING
index 0a55bd92f776..3e7c6f3bf551 100644
--- a/UPDATING
+++ b/UPDATING
@@ -6,6 +6,13 @@ You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20260226:
+ AFFECTS: users of sysutils/symon
+ AUTHOR: jamie@catflap.org
+
+ The old WITHOUT_SYMON and WITHOUT_SYMUX knobs have been replaced with the
+ port options SYMON and SYMUX. The legacy "WITHOUT_RRD" knob has been retired.
+
+20260226:
AFFECTS: users of java/openjdk*
AUTHOR: ronald@FreeBSD.org
diff --git a/sysutils/symon/Makefile b/sysutils/symon/Makefile
index 257641e84068..53cc318a3671 100644
--- a/sysutils/symon/Makefile
+++ b/sysutils/symon/Makefile
@@ -1,70 +1,91 @@
PORTNAME= symon
DISTVERSION= 2.90
+PORTREVISION= 1
CATEGORIES= sysutils
-MASTER_SITES= https://wpd.home.xs4all.nl/symon/philes/ \
- LOCAL/uqs
+MASTER_SITES= https://wpd.home.xs4all.nl/symon/philes/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= jamie@catflap.org
COMMENT= Performance and information monitoring tool
WWW= https://wpd.home.xs4all.nl/symon/
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
-BROKEN_FreeBSD_15= requires no longer supported ioctl(DIOCGETSTATUS)
-
-SUB_FILES= pkg-message
-
USES= groff perl5 shebangfix
-SHEBANG_FILES= client/getsymonitem.pl
USE_PERL5= build
+
+SHEBANG_FILES= client/getsymonitem.pl
+
+MAKE_ARGS= EXADIR="etc" \
+ LORDER=echo \
+ MANDIR="share/man" \
+ PREFIX="${STAGEDIR}${PREFIX}" \
+ RRDDIR="${LOCALBASE}" \
+ SYSCONFDIR="${PREFIX}/etc" \
+ SUBDIR="lib ${SUBDIR} client" \
+ TSORT=cat
+
MAKE_JOBS_UNSAFE= yes
+
CFLAGS+= -D_WANT_SEMUN
+EXTRACT_AFTER_ARGS= --strip-components 1 \
+ --no-same-owner --no-same-permissions
+SUB_FILES= pkg-message
+
+NO_WRKSUBDIR= yes
+
USERS= _symon
GROUPS= _symon
-# Synonym for WITHOUT_SYMUX
-.if defined(WITHOUT_RRD)
-WITHOUT_SYMUX= yes
-.endif
-
-.if !defined(WITHOUT_SYMUX)
-LIB_DEPENDS+= librrd.so:databases/rrdtool
-.endif
+PORTDOCS= CHANGELOG HACKERS TODO
-.if defined(WITHOUT_SYMUX) && defined(WITHOUT_SYMON)
-IGNORE= you have defined both WITHOUT_SYMUX or WITHOUT_RRD *and* WITHOUT_SYMON
-.endif
+OPTIONS_DEFINE= DOCS
+OPTIONS_DEFAULT= SYMON SYMUX
+OPTIONS_MULTI= MODULES
+OPTIONS_MULTI_MODULES= SYMON SYMUX
+OPTIONS_SUB= yes
-SUBDIR= lib
-.if !defined(WITHOUT_SYMON)
-SUBDIR+= symon
-PLIST_SUB+= SYMON=""
-USE_RC_SUBR+= symon
-.else
-PLIST_SUB+= SYMON="@comment "
-.endif
-.if !defined(WITHOUT_SYMUX)
-SUBDIR+= symux
-PLIST_SUB+= SYMUX=""
-USE_RC_SUBR+= symux
-.else
-PLIST_SUB+= SYMUX="@comment "
-.endif
-SUBDIR+= client
+MODULES_DESC= Modules
+SYMON_DESC= Include symon(8) system monitor.
+SYMUX_DESC= Include symon stream multiplexer [symux(8)]
-MAKE_ARGS+= SUBDIR="${SUBDIR}" RRDDIR="${LOCALBASE}" LORDER=echo TSORT=cat \
- SYSCONFDIR="${PREFIX}/etc" PREFIX="${STAGEDIR}/${PREFIX}" \
- MANDIR="share/man"
+SYMON_VARS= SUBDIR+=symon \
+ USE_RC_SUBR+=symon
+SYMUX_LIB_DEPENDS= librrd.so:databases/rrdtool
+SYMUX_VARS= SUBDIR+=symux \
+ USE_RC_SUBR+=symux
.include <bsd.port.pre.mk>
-post-extract:
- @${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC}
-
post-patch:
# We need to teach symon about mbstat changes/removal in r253351 and r253361.
@${RM} ${WRKSRC}/platform/FreeBSD/sm_mbuf.c
+# We need to teach symon about pf API changes from FreeBSD 15 onwards.
+
+# Until someone can update sm_pf.c to use the nvlist variants, remove it
+# from FreeBSD 15 installs, as it no longer works due to the removal of
+# DIOCGETSTATUS. Patches welcome!
+# See https://lists.freebsd.org/archives/freebsd-pf/2023-April/000345.html
+# Subject: pf: remove DIOCGETRULE and DIOCGETSTATUS
+# Author: Kristof Provost <kp@FreeBSD.org>
+# Date: 2023-08-29 15:17:24 +0000
+# Link: https://cgit.freebsd.org/src/commit/?id=8d49fd7331bc72671a14f1aac1d9cdea36672d19
+.if (${OPSYS} == FreeBSD) && ${OSVERSION} >= 1500000
+ @${RM} ${WRKSRC}/platform/FreeBSD/sm_pf.c
+.endif
+
+do-install-DOCS-on:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} \
+ ${STAGEDIR}${DOCSDIR}
+
+post-install-SYMON-on:
+ ${MV} ${STAGEDIR}${PREFIX}/etc/symon.conf \
+ ${STAGEDIR}${PREFIX}/etc/symon.conf.sample
+
+post-install-SYMUX-on:
+ ${MV} ${STAGEDIR}${PREFIX}/etc/symux.conf \
+ ${STAGEDIR}${PREFIX}/etc/symux.conf.sample
.include <bsd.port.post.mk>
diff --git a/sysutils/symon/files/pkg-message.in b/sysutils/symon/files/pkg-message.in
index 50bf4fd584bc..c33d21e6dec1 100644
--- a/sysutils/symon/files/pkg-message.in
+++ b/sysutils/symon/files/pkg-message.in
@@ -1,21 +1,19 @@
[
{ type: install
message: <<EOM
-For the system monitor symon, use the following steps
+For the system monitor symon, use the following steps:
- 1. Copy %%PREFIX%%/share/examples/symon/symon.conf
- to %%PREFIX%%/etc and edit.
- 2. Run symon
+ 1. Edit %%PREFIX%%/etc/symon.conf.
+ 2. Run symon.
-For the data collector symux, use the following steps
+For the data collector symux, use the following steps:
- 1. Copy %%PREFIX%%/share/examples/symon/symux.conf
- to %%PREFIX%%/etc and edit.
+ 1. Edit %%PREFIX%%/etc/symux.conf.
2. Enter the directory, where symux should store its data
(e.g. /var/db/symux) and run
%%PREFIX%%/share/symon/c_smrrds.sh all
to create the RR database.
- 3. Run symux
+ 3. Run symux.
EOM
}
]
diff --git a/sysutils/symon/pkg-plist b/sysutils/symon/pkg-plist
index 6e80c7b48a13..fff10b003609 100644
--- a/sysutils/symon/pkg-plist
+++ b/sysutils/symon/pkg-plist
@@ -1,9 +1,9 @@
%%SYMON%%bin/symon
-%%SYMON%%share/man/man8/symon.8.gz
%%SYMUX%%bin/symux
+%%SYMON%%@sample etc/symon.conf.sample
+%%SYMUX%%@sample etc/symux.conf.sample
+%%SYMON%%share/man/man8/symon.8.gz
%%SYMUX%%share/man/man8/symux.8.gz
-%%SYMON%%%%EXAMPLESDIR%%/symon.conf
-%%SYMUX%%%%EXAMPLESDIR%%/symux.conf
%%SYMON%%%%DATADIR%%/c_config.sh
%%SYMUX%%%%DATADIR%%/c_smrrds.sh
%%DATADIR%%/client/SymuxClient.0