git: 9abc07bcb315 - main - net-mgmt/check_mk_agent: Update to 2.1.0p22

From: Fernando Apesteguía <fernape_at_FreeBSD.org>
Date: Sun, 19 Mar 2023 19:47:52 UTC
The branch main has been updated by fernape:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9abc07bcb3156136cf28a86c56dc1d1e7cc00dba

commit 9abc07bcb3156136cf28a86c56dc1d1e7cc00dba
Author:     Ian Valentine <ivalentine@arizona.edu>
AuthorDate: 2023-03-03 08:26:38 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-03-19 19:43:25 +0000

    net-mgmt/check_mk_agent: Update to 2.1.0p22
    
    PR:             269925
    Reported by:    ivalentine@arizona.edu (maintainer)
---
 net-mgmt/check_mk_agent/Makefile                   |  7 +---
 net-mgmt/check_mk_agent/distinfo                   | 14 +++----
 .../files/patch-check__mk__agent.freebsd           | 47 +++++++++-------------
 net-mgmt/check_mk_agent/pkg-descr                  | 19 +++++++--
 4 files changed, 45 insertions(+), 42 deletions(-)

diff --git a/net-mgmt/check_mk_agent/Makefile b/net-mgmt/check_mk_agent/Makefile
index 6e1a0dc55077..aec345b5c61b 100644
--- a/net-mgmt/check_mk_agent/Makefile
+++ b/net-mgmt/check_mk_agent/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	check_mk_agent
 DISTVERSIONPREFIX=	v
-DISTVERSION=	2.0.0p20
+DISTVERSION=	2.1.0p22
 CATEGORIES=	net-mgmt
 MASTER_SITES=	https://raw.githubusercontent.com/tribe29/checkmk/${DISTVERSIONFULL}/agents/:agent \
 		https://raw.githubusercontent.com/tribe29/checkmk/${DISTVERSIONFULL}/doc/agents/:doc \
@@ -11,7 +11,7 @@ DISTFILES=	${_CHECKMK_AGENT}:agent \
 DIST_SUBDIR=	${PORTNAME}-${PORTVERSION}
 
 MAINTAINER=	ivalentine@arizona.edu
-COMMENT=	Nagios-compatible agent for the Checkmk monitoring
+COMMENT=	Checkmk agent to monitor *nix style systems
 WWW=		https://checkmk.com/
 
 LICENSE=	GPLv2
@@ -46,15 +46,12 @@ OPTIONS_DEFINE=	DOCS
 _CHECKMK_AGENT=		${PORTNAME}.freebsd
 _CHECKMK_CONFDIR=	${LOCALBASE}/etc/check_mk
 _CHECKMK_LIBDIR=	${LOCALBASE}/lib/check_mk_agent
-_CHECKMK_TMPDIR=	/var/run/check_mk
 
 post-patch:
 	@${REINPLACE_CMD} \
 		-e 's|%%CHECKMK_LIBDIR%%|${_CHECKMK_LIBDIR}|' \
 		-e 's|%%CHECKMK_CONFDIR%%|${_CHECKMK_CONFDIR}|' \
-		-e 's|%%CHECKMK_TMPDIR%%|${_CHECKMK_TMPDIR}|' \
 		-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
-		-e 's|%%BASH%%|${LOCALBASE}/bin/bash|' \
 		${WRKSRC}/${_CHECKMK_AGENT}
 
 do-install:
diff --git a/net-mgmt/check_mk_agent/distinfo b/net-mgmt/check_mk_agent/distinfo
index 687929586852..93c84aaa2b46 100644
--- a/net-mgmt/check_mk_agent/distinfo
+++ b/net-mgmt/check_mk_agent/distinfo
@@ -1,7 +1,7 @@
-TIMESTAMP = 1645394456
-SHA256 (check_mk_agent-2.0.0.p20/check_mk_agent.freebsd) = 8a332e0f73533ffacf03a5cab2e42a4ff76e104777c8fe548a41618097661536
-SIZE (check_mk_agent-2.0.0.p20/check_mk_agent.freebsd) = 14350
-SHA256 (check_mk_agent-2.0.0.p20/README.FreeBSD) = 01094a2197ca0a3a43ac16098c0f800d2ee808db2fd9a2f133f4bad04062ec5f
-SIZE (check_mk_agent-2.0.0.p20/README.FreeBSD) = 1349
-SHA256 (check_mk_agent-2.0.0.p20/COPYING) = fbaab079995bef694ef8451f0f763b91b44e5b57b8e2a487d2a240b395187a7f
-SIZE (check_mk_agent-2.0.0.p20/COPYING) = 15174
+TIMESTAMP = 1677107456
+SHA256 (check_mk_agent-2.1.0.p22/check_mk_agent.freebsd) = c99b59beb8d0eee0916e8dc4b7f9dcce08afb62e157856e785837aadb0f071ec
+SIZE (check_mk_agent-2.1.0.p22/check_mk_agent.freebsd) = 28094
+SHA256 (check_mk_agent-2.1.0.p22/README.FreeBSD) = 01094a2197ca0a3a43ac16098c0f800d2ee808db2fd9a2f133f4bad04062ec5f
+SIZE (check_mk_agent-2.1.0.p22/README.FreeBSD) = 1349
+SHA256 (check_mk_agent-2.1.0.p22/COPYING) = fbaab079995bef694ef8451f0f763b91b44e5b57b8e2a487d2a240b395187a7f
+SIZE (check_mk_agent-2.1.0.p22/COPYING) = 15174
diff --git a/net-mgmt/check_mk_agent/files/patch-check__mk__agent.freebsd b/net-mgmt/check_mk_agent/files/patch-check__mk__agent.freebsd
index 1516ac616f85..0f20cdf271c2 100644
--- a/net-mgmt/check_mk_agent/files/patch-check__mk__agent.freebsd
+++ b/net-mgmt/check_mk_agent/files/patch-check__mk__agent.freebsd
@@ -1,31 +1,24 @@
---- check_mk_agent.freebsd.orig	2021-10-31 19:22:57 UTC
+--- check_mk_agent.freebsd.orig	2023-02-22 23:45:20 UTC
 +++ check_mk_agent.freebsd
-@@ -27,15 +27,15 @@ $MK_RUN_SYNC_PARTS || {
- export LC_ALL=C
- unset LANG
+@@ -105,8 +105,8 @@ set_up_get_epoch() {
+ #
  
--export MK_LIBDIR="/usr/local/lib/check_mk_agent"
--export MK_CONFDIR="/etc/check_mk"
--export MK_TMPDIR="/var/run/check_mk"
-+export MK_LIBDIR="%%CHECKMK_LIBDIR%%"
-+export MK_CONFDIR="%%CHECKMK_CONFDIR%%"
-+export MK_TMPDIR="%%CHECKMK_TMPDIR%%"
+ set_variable_defaults() {
+-    : "${MK_LIBDIR:=/usr/local/lib/check_mk_agent}"
+-    : "${MK_CONFDIR:=/etc/check_mk}"
++    : "${MK_LIBDIR:=%%CHECKMK_LIBDIR%%}"
++    : "${MK_CONFDIR:=%%CHECKMK_CONFDIR%%}"
+     : "${MK_VARDIR:=/var/lib/check_mk_agent}"
+     : "${MK_LOGDIR:=/var/log/check_mk_agent}"
  
- # Optionally set a tempdir for all subsequent calls
- #export TMPDIR=
- 
- # Make sure, locally installed binaries are found
--PATH=$PATH:/usr/local/bin:/usr/local/sbin
-+PATH=$PATH:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
- [ -d /var/qmail/bin ] && PATH=$PATH:/var/qmail/bin
- 
- # All executables in PLUGINSDIR will simply be executed and their
-@@ -102,7 +102,7 @@ function run_cached() {
- 
-     # Cache file outdated and new job not yet running? Start it
-     if [ -z "$USE_CACHEFILE" -a ! -e "$CACHEFILE.new" ] ; then
--        echo "$CMDLINE" | daemon /usr/local/bin/bash -o noclobber > $CACHEFILE.new && mv $CACHEFILE.new $CACHEFILE || rm -f $CACHEFILE $CACHEFILE.new &
-+        echo "$CMDLINE" | daemon %%BASH%% -o noclobber > $CACHEFILE.new && mv $CACHEFILE.new $CACHEFILE || rm -f $CACHEFILE $CACHEFILE.new &
-     fi
- }
+@@ -126,8 +126,8 @@ preamble_1() {
+     # Make sure locally installed binaries are found
+     # Only add binaries if they are not already in the path! If you append to path in a loop the process will
+     # eventually each the 128k size limit for the environment and become a zombie process. See execve manpage.
+-    [ "${PATH#*"/usr/local/bin"}" != "${PATH}" ] || PATH="${PATH}:/usr/local/bin"
+-    [ "${PATH#*"/usr/local/sbin"}" != "${PATH}" ] || PATH="${PATH}:/usr/local/sbin"
++    [ "${PATH#*"%%LOCALBASE%%/bin"}" != "${PATH}" ] || PATH="${PATH}:%%LOCALBASE%%/bin"
++    [ "${PATH#*"%%LOCALBASE%%/sbin"}" != "${PATH}" ] || PATH="${PATH}:%%LOCALBASE%%/sbin"
+     [ -d "/var/qmail/bin" ] && { [ "${PATH#*"/var/qmail/bin"}" != "${PATH}" ] || PATH="${PATH}:/var/qmail/bin"; }
  
+     # All executables in PLUGINSDIR will simply be executed and their
diff --git a/net-mgmt/check_mk_agent/pkg-descr b/net-mgmt/check_mk_agent/pkg-descr
index b5f8b79986d3..b9fce46e2f61 100644
--- a/net-mgmt/check_mk_agent/pkg-descr
+++ b/net-mgmt/check_mk_agent/pkg-descr
@@ -1,3 +1,16 @@
-Checkmk is a software for effective IT monitoring. Easy installation,
-best-in-class scalability and a broad range of features are just some of the
-reasons why more and more users become Checkmk fans.
+For a monitoring system to receive more information from an endpoint
+other than that it is simply accessible, help is required from the
+target system. For example - how else can Checkmk know how full a
+server's storage volume is without that system somehow providing the
+information? The component that provides this information is always an
+active piece of software - namely a monitoring agent, usually just
+referred to as an agent. An agent collects data relevant to monitoring
+from a host at specified intervals and transmits that data to the
+monitoring server.
+
+For servers and workstations, Checkmk provides its own agents, these
+are known as Checkmk agents. Checkmk agents are available for a wide
+variety of operating systems - from the commonplace such as Windows and
+Linux to exotics such as OpenVMS. The agents are passive and listen on
+TCP port 6556. Only on receiving a Checkmk server query will these
+agents be activated and respond with the required data.