Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 2019 10:27:43 +0000 (UTC)
From:      Mateusz Piotrowski <0mp@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r511292 - in head/net-mgmt/check_mk_agent: . files
Message-ID:  <201909061027.x86ARhbe033997@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: 0mp
Date: Fri Sep  6 10:27:43 2019
New Revision: 511292
URL: https://svnweb.freebsd.org/changeset/ports/511292

Log:
  net-mgmt/check_mk_agent: Update to 1.5.0p21
  
  - Use patches to have better control over future changes in the agent
    script.
  - Update the software name in pkg-message.
  - Break long lines.
  
  Reported by:	Repology

Added:
  head/net-mgmt/check_mk_agent/files/patch-agents_check__mk__agent.freebsd   (contents, props changed)
Modified:
  head/net-mgmt/check_mk_agent/Makefile
  head/net-mgmt/check_mk_agent/distinfo
  head/net-mgmt/check_mk_agent/files/pkg-message.in

Modified: head/net-mgmt/check_mk_agent/Makefile
==============================================================================
--- head/net-mgmt/check_mk_agent/Makefile	Fri Sep  6 10:26:49 2019	(r511291)
+++ head/net-mgmt/check_mk_agent/Makefile	Fri Sep  6 10:27:43 2019	(r511292)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	check_mk_agent
-DISTVERSION=	1.5.0p20
+DISTVERSION=	1.5.0p21
 CATEGORIES=	net-mgmt
 MASTER_SITES=	https://mathias-kettner.de/support/${DISTVERSION}/
 DISTNAME=	check-mk-raw-${DISTVERSION}.cre
@@ -16,7 +16,7 @@ RUN_DEPENDS=	bash>0:shells/bash
 
 USES=	shebangfix
 
-SHEBANG_FILES=	agents/${PORTNAME}.freebsd
+SHEBANG_FILES=	agents/${CHECKMK_AGENT}
 
 NO_ARCH=	yes
 NO_BUILD=	yes
@@ -30,16 +30,27 @@ PORTDOCS=	README.FreeBSD
 
 OPTIONS_DEFINE=	DOCS
 
+CHECKMK_AGENT=	${PORTNAME}.freebsd
+CHECKMK_LIBDIR=	${LOCALBASE}/lib/check_mk_agent
+CHECKMK_CONFDIR=${LOCALBASE}/etc/check_mk
+CHECKMK_TMPDIR=	/var/run/check_mk
+
 post-patch:
-	${REINPLACE_CMD} -E -e 's|^(export MK_CONFDIR=")|\1${PREFIX}|' \
-		-e 's|/usr/local/bin/bash|${LOCALBASE}/bin/bash|g' \
-		${WRKSRC}/agents/${PORTNAME}.freebsd
+	@${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}/agents/${CHECKMK_AGENT}
 
 do-install:
-	${INSTALL_SCRIPT} ${WRKSRC}/agents/${PORTNAME}.freebsd ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+	${INSTALL_SCRIPT} ${WRKSRC}/agents/${CHECKMK_AGENT} \
+		${STAGEDIR}${PREFIX}/bin/${PORTNAME}
 
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/doc/agents/README.FreeBSD ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/doc/agents/README.FreeBSD \
+		${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>

Modified: head/net-mgmt/check_mk_agent/distinfo
==============================================================================
--- head/net-mgmt/check_mk_agent/distinfo	Fri Sep  6 10:26:49 2019	(r511291)
+++ head/net-mgmt/check_mk_agent/distinfo	Fri Sep  6 10:27:43 2019	(r511292)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1564401961
-SHA256 (check-mk-raw-1.5.0p20.cre.tar.gz) = b8c4e93cb2ae8cb7040082e929adfd6f7c6f9ad95644f3a1c0f102cdbc0d1994
-SIZE (check-mk-raw-1.5.0p20.cre.tar.gz) = 386024878
+TIMESTAMP = 1567764056
+SHA256 (check-mk-raw-1.5.0p21.cre.tar.gz) = 270f5422adbbda151edf102bdd8665ff1b5ee96b2aec04a899114a5238381869
+SIZE (check-mk-raw-1.5.0p21.cre.tar.gz) = 386037040

Added: head/net-mgmt/check_mk_agent/files/patch-agents_check__mk__agent.freebsd
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/check_mk_agent/files/patch-agents_check__mk__agent.freebsd	Fri Sep  6 10:27:43 2019	(r511292)
@@ -0,0 +1,31 @@
+--- agents/check_mk_agent.freebsd.orig	2019-09-06 10:22:12 UTC
++++ agents/check_mk_agent.freebsd
+@@ -41,15 +41,15 @@
+ export LC_ALL=C
+ unset LANG
+ 
+-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%%"
+ 
+ # 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
+ 
+ # All executables in PLUGINSDIR will simply be executed and their
+ # ouput appended to the output of the agent. Plugins define their own
+@@ -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
+ }
+ 

Modified: head/net-mgmt/check_mk_agent/files/pkg-message.in
==============================================================================
--- head/net-mgmt/check_mk_agent/files/pkg-message.in	Fri Sep  6 10:26:49 2019	(r511291)
+++ head/net-mgmt/check_mk_agent/files/pkg-message.in	Fri Sep  6 10:27:43 2019	(r511292)
@@ -1,7 +1,7 @@
 [
 { type: install
   message: <<EOM
-Check_MK may collect additional data if the following ports are installed:
+Checkmk may collect additional data if the following ports are installed:
 - devel/libstatgrab
 - sysutils/ipmitool
 - sysutils/megacli



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909061027.x86ARhbe033997>