diff --git a/net-mgmt/xymon-server/Makefile b/net-mgmt/xymon-server/Makefile index fd0da5d3ac0e..4b2f5cdda735 100644 --- a/net-mgmt/xymon-server/Makefile +++ b/net-mgmt/xymon-server/Makefile @@ -1,110 +1,110 @@ PORTNAME= xymon PORTVERSION= 4.3.30 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net-mgmt www MASTER_SITES= SF/xymon/Xymon/${PORTVERSION} PKGNAMESUFFIX= -server${PKGNAMESUFFIX2} DIST_SUBDIR= repacked MAINTAINER= feld@FreeBSD.org COMMENT= System for monitoring servers and networks WWW= http://xymon.sourceforge.net/ LICENSE= GPLv2 BUILD_DEPENDS= rrdtool:databases/rrdtool LIB_DEPENDS= libpng.so:graphics/png \ libpcre.so:devel/pcre \ libcares.so:dns/c-ares RUN_DEPENDS= rrdtool:databases/rrdtool \ fping:net/fping \ mtr:net/mtr@nox11 USERS= xymon GROUPS= xymon # Options XYMONUSER?= xymon XYMONHOSTNAME?= xymon.example.com XYMONHOSTIP?= 127.0.0.1 USES= compiler:c11 cpe gmake shebangfix ssl SHEBANG_FILES= ${WRKSRC}/xymond/xymonreports.sh.DIST ${WRKSRC}/build/upgrade430.sh MAKE_JOBS_UNSAFE= yes CONFIGURE_ENV= MAKE=gmake MAKE_ENV+= XYMONUSER="${XYMONUSER}" MAKE_ENV+= XYMONHOSTNAME="${XYMONHOSTNAME}" MAKE_ENV+= XYMONHOSTIP="${XYMONHOSTIP}" MAKE_ENV+= INSTALLROOT="${STAGEDIR}" MAKE_ENV+= MANPREFIX="${STAGEDIR}${PREFIX}/share" MAKE_ARGS+= PKGBUILD="true" USE_RC_SUBR= xymon-server SUB_LIST+= XYMONUSER="${XYMONUSER}" PLIST_SUB+= XYMONUSER="${XYMONUSER}" CONFIG_FILES= cgioptions.cfg client-local.cfg \ columndoc.csv graphs.cfg protocols.cfg \ tasks.cfg xymonserver.cfg xymon-apache.conf FIXME1= alerts.cfg hosts.cfg xymon-apache-open xymon-apache-secure FIXME2= analysis.cfg combo.cfg holidays.cfg rrddefinitions.cfg \ snmpmibs.cfg xymonmenu.cfg xymonserver-migration.cfg OPTIONS_DEFINE=DEBUG LDAP NETSNMP NETSNMP_DESC=Enable Net-SNMP support LDAP_USES= ldap LDAP_MAKE_ENV= WITH_LDAP=1 NETSNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp NETSNMP_MAKE_ENV= WITH_NETSNMP=1 post-patch: ${REINPLACE_CMD} -e 's|web-build client|web-build|' ${WRKSRC}/build/Makefile.rules ${REINPLACE_CMD} -e 's|install-docs install-client|install-docs|' ${WRKSRC}/build/Makefile.rules ${REINPLACE_CMD} -e 's|$$(INSTALLETCDIR)/protocols.cfg|$$(INSTALLETCDIR)/protocols.cfg.DIST|' ${WRKSRC}/xymonnet/Makefile ${REINPLACE_CMD} -e 's|TRACEROUTE="traceroute"|TRACEROUTE="mtr"|' ${WRKSRC}/xymond/etcfiles/xymonserver.cfg.DIST ${REINPLACE_CMD} -e 's|TRACEROUTEOPTS="-n -q 2 -w 2 -m 15"|TRACEROUTEOPTS="-n -c 2 -w 2 -m 15 --report"|' ${WRKSRC}/xymond/etcfiles/xymonserver.cfg.DIST ${RM} ${WRKSRC}/docs/manpages/man1/xymonping.1.html ${RM} ${WRKSRC}/xymonnet/xymonping.1 ${REINPLACE_CMD} -e 's|@CGIDIR@|${WWWDIR}/server/cgi-bin|g' \ -e 's|@SECURECGIDIR@|${WWWDIR}/server/cgi-secure|g' \ -e 's|@INSTALLETCDIR@|${WWWDIR}/server/etc|g' \ -e 's|@INSTALLWWWDIR@|${WWWDIR}/server/www|g' \ -e 's|@SECUREXYMONCGIURL@|/cgi-secure|g' \ -e 's|@XYMONCGIURL@|/cgi-bin|g' \ -e 's|@XYMONHOSTURL@|/xymon|g' ${WRKSRC}/xymond/etcfiles/xymon-apache-*.DIST # Configure script is interactive do-configure: ${CP} ${FILESDIR}/Makefile ${WRKSRC}/ post-install: ${MKDIR} ${STAGEDIR}${WWWDIR}/data ${MKDIR} ${STAGEDIR}${WWWDIR}/data/acks ${MKDIR} ${STAGEDIR}${WWWDIR}/data/data ${MKDIR} ${STAGEDIR}${WWWDIR}/data/disabled ${MKDIR} ${STAGEDIR}${WWWDIR}/data/hist ${MKDIR} ${STAGEDIR}${WWWDIR}/data/histlogs ${MKDIR} ${STAGEDIR}${WWWDIR}/data/hostdata ${MKDIR} ${STAGEDIR}${WWWDIR}/data/logs ${MKDIR} ${STAGEDIR}${WWWDIR}/data/rrd ${MKDIR} ${STAGEDIR}${WWWDIR}/server/download ${MKDIR} ${STAGEDIR}${WWWDIR}/server/tmp ${MKDIR} ${STAGEDIR}${WWWDIR}/server/www/html ${MKDIR} ${STAGEDIR}${WWWDIR}/server/www/notes ${MKDIR} ${STAGEDIR}${WWWDIR}/server/www/rep ${MKDIR} ${STAGEDIR}${WWWDIR}/server/www/snap ${MKDIR} ${STAGEDIR}${WWWDIR}/server/www/wml ${LN} -s ${LOCALBASE}/sbin/fping ${STAGEDIR}${WWWDIR}/server/bin/xymonping ${INSTALL_SCRIPT} ${WRKSRC}/build/upgrade430.sh ${STAGEDIR}${WWWDIR}/server/bin/ ${INSTALL_PROGRAM} ${WRKSRC}/build/renamevars ${STAGEDIR}${WWWDIR}/server/bin/ .for i in ${FIXME1} ${INSTALL_DATA} ${WRKSRC}/xymond/etcfiles/${i}.DIST ${STAGEDIR}${WWWDIR}/server/etc/${i}.sample .endfor .for i in ${FIXME2} ${INSTALL_DATA} ${WRKSRC}/xymond/etcfiles/${i} ${STAGEDIR}${WWWDIR}/server/etc/${i}.sample .endfor .for i in ${CONFIG_FILES} ${MV} ${STAGEDIR}${WWWDIR}/server/etc/${i}.DIST ${STAGEDIR}${WWWDIR}/server/etc/${i}.sample .endfor .include diff --git a/net-mgmt/xymon-server/files/patch-bbcombotest-fix b/net-mgmt/xymon-server/files/patch-bbcombotest-fix new file mode 100644 index 000000000000..a71d722b739b --- /dev/null +++ b/net-mgmt/xymon-server/files/patch-bbcombotest-fix @@ -0,0 +1,18 @@ +Description: Fix bbcombotest: "Could not access hobbitd board, error 0" +Author: Christoph Berg +Forwarded: no +Last-Update: 2015-09-10 + +Index: xymon/xymond/combostatus.c +=================================================================== +--- xymond/combostatus.c 2012-07-23 23:39:37.000000000 +0200 ++++ xymond/combostatus.c 2012-07-23 23:41:04.000000000 +0200 +@@ -207,7 +207,7 @@ + xymondresult = sendmessage("xymondboard fields=hostname,testname,color", NULL, XYMON_TIMEOUT, sres); + board = getsendreturnstr(sres, 1); + +- if ((xymondresult != XYMONSEND_OK) || (board == NULL)) { ++ if (xymondresult != XYMONSEND_OK) { + board = ""; + *errptr += sprintf(*errptr, "Could not access xymond board, error %d\n", xymondresult); + return COL_CLEAR; diff --git a/net-mgmt/xymon-server/files/patch-fix_tls13_banner b/net-mgmt/xymon-server/files/patch-fix_tls13_banner new file mode 100644 index 000000000000..ebcffdcfdf30 --- /dev/null +++ b/net-mgmt/xymon-server/files/patch-fix_tls13_banner @@ -0,0 +1,39 @@ +From: Andreas Oberritter +Date: Tue, 11 May 2021 13:05:10 +0200 +Subject: Fix reading service banners from TLS-1.3-enabled hosts + +Bug-Debian: https://bugs.debian.org/930532 +Forwarded: https://lists.xymon.com/archive/2024-February/048290.html +Last-Update: 2021-05-11 + + +Related discussion: +https://lists.xymon.com/archive/2019-July/046585.html +https://lists.xymon.com/archive/2019-November/046893.html +https://lists.xymon.com/archive/2020-February/046986.html +https://lists.xymon.com/archive/2020-March/046987.html +https://sourceforge.net/p/xymon/discussion/435278/thread/c0359f08e7/ +--- + xymonnet/contest.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +--- xymonnet/contest.c ++++ xymonnet/contest.c +@@ -1347,13 +1347,12 @@ restartselect: + } + } + +- if ((item->svcinfo->flags & TCP_HTTP) && +- ((res > 0) || item->sslagain) && +- (!datadone) ) { ++ if (((item->svcinfo->flags & TCP_HTTP) && res > 0) || item->sslagain) { + /* +- * HTTP : Grab the entire response. ++ * Grab the entire HTTP response or wait for ++ * TLS handshake to complete. + */ +- wantmoredata = 1; ++ wantmoredata = !datadone; + } + + if (!wantmoredata) { diff --git a/net-mgmt/xymon-server/files/patch-md5_buffer_overflow b/net-mgmt/xymon-server/files/patch-md5_buffer_overflow new file mode 100644 index 000000000000..3b4d1a92ae89 --- /dev/null +++ b/net-mgmt/xymon-server/files/patch-md5_buffer_overflow @@ -0,0 +1,17 @@ +From: Roland Rosenfeld +Date: Tue, 24 Sep 2024 21:53:18 +0200 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/xymon/+bug/2078638 +Subject: Fix buffer overflow in md5hash + This is triggered/found by -D_FORTIFY_SOURCE=3 + +--- lib/digest.c ++++ lib/digest.c +@@ -41,7 +41,7 @@ char *md5hash(char *input) + myMD5_Final(md_value, ctx->mdctx); + + for(i = 0, p = md_string; (i < sizeof(md_value)); i++) +- p += snprintf(p, (sizeof(md_string) - (md_string - p)), "%02x", md_value[i]); ++ p += snprintf(p, (sizeof(md_string) - (p - md_string)), "%02x", md_value[i]); + *p = '\0'; + + return md_string; diff --git a/net-mgmt/xymon-server/files/patch-nousemultipart b/net-mgmt/xymon-server/files/patch-nousemultipart new file mode 100644 index 000000000000..44cc7550971a --- /dev/null +++ b/net-mgmt/xymon-server/files/patch-nousemultipart @@ -0,0 +1,29 @@ +From: Roland Rosenfeld +Date: Mon, 12 Jul 2021 13:34:10 +0200 +Forwarded: https://lists.xymon.com/archive/2024-February/048287.html +Subject: Fix Snapshort and Availability Report on Firefox + +Bug-Debian: https://bugs.debian.org/990989 + +--- web/report.c ++++ web/report.c +@@ -204,7 +204,7 @@ int main(int argc, char *argv[]) + int argi, newargi; + char *envarea = NULL; + char *useragent = NULL; +- int usemultipart = 1; ++ int usemultipart = 0; + + SBUF_MALLOC(outdir, PATH_MAX+1024); + SBUF_MALLOC(xymonwebenv, PATH_MAX+1024); +--- web/snapshot.c ++++ web/snapshot.c +@@ -145,7 +145,7 @@ int main(int argc, char *argv[]) + int argi, newargi; + char *envarea = NULL; + char *useragent; +- int usemultipart = 1; ++ int usemultipart = 0; + + SBUF_MALLOC(xymongencmd, 2048+PATH_MAX); + SBUF_MALLOC(xymonwebenv, 4096);