diff --git a/net-mgmt/check_mk_agent/Makefile b/net-mgmt/check_mk_agent/Makefile index 7863f372c41e..62e003f54ce1 100644 --- a/net-mgmt/check_mk_agent/Makefile +++ b/net-mgmt/check_mk_agent/Makefile @@ -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 diff --git a/net-mgmt/check_mk_agent/distinfo b/net-mgmt/check_mk_agent/distinfo index 5ae51bd6076d..bcd925f27af7 100644 --- a/net-mgmt/check_mk_agent/distinfo +++ b/net-mgmt/check_mk_agent/distinfo @@ -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 diff --git a/net-mgmt/check_mk_agent/files/patch-agents_check__mk__agent.freebsd b/net-mgmt/check_mk_agent/files/patch-agents_check__mk__agent.freebsd new file mode 100644 index 000000000000..2dab8dfb0fb5 --- /dev/null +++ b/net-mgmt/check_mk_agent/files/patch-agents_check__mk__agent.freebsd @@ -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 + } + diff --git a/net-mgmt/check_mk_agent/files/pkg-message.in b/net-mgmt/check_mk_agent/files/pkg-message.in index a3864983d4fe..e09f614b1b4c 100644 --- a/net-mgmt/check_mk_agent/files/pkg-message.in +++ b/net-mgmt/check_mk_agent/files/pkg-message.in @@ -1,7 +1,7 @@ [ { type: install message: <