RE: [EXT] Re: git: 61d4ddfb22cf - main - net-mgmt/check_mk_agent: update to 2.3.0p12

From: Valentine, Ian - (ivalentine) <ivalentine_at_arizona.edu>
Date: Thu, 22 Aug 2024 17:50:03 UTC
Hi Mateusz,

Thanks for catching that, I see my mistake now. I've attached a patch that fixes that and bumps PORTREVISION.
Should I send it in through Bugzilla as well?

Regards,
Ian



From: Mateusz Piotrowski <0mp@FreeBSD.org> 
Sent: Thursday, August 22, 2024 1:53 AM
To: Zsolt Udvari <uzsolt@freebsd.org>; Valentine, Ian - (ivalentine) <ivalentine@arizona.edu>
Cc: ports-committers@freebsd.org; dev-commits-ports-all@freebsd.org; dev-commits-ports-main@freebsd.org
Subject: [EXT] Re: git: 61d4ddfb22cf - main - net-mgmt/check_mk_agent: update to 2.3.0p12

External Email

Hey!

> On 20. Aug 2024, at 22:32, Zsolt Udvari <uzsolt@freebsd.org> wrote:
> 
> The branch main has been updated by uzsolt:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=61d4ddfb22cf8e9e3048887938550dabeb985b51
> 
> commit 61d4ddfb22cf8e9e3048887938550dabeb985b51
> Author: Ian Valentine <ivalentine@arizona.edu>
> AuthorDate: 2024-08-20 20:27:35 +0000
> Commit: Zsolt Udvari <uzsolt@FreeBSD.org>
> CommitDate: 2024-08-20 20:32:23 +0000
> 
> net-mgmt/check_mk_agent: update to 2.3.0p12
[...]
> Switch to PREFIX (from LOCALBASE).
[...]

> ---
> net-mgmt/check_mk_agent/Makefile | 21 ++++++++++++---------
> net-mgmt/check_mk_agent/distinfo | 14 +++++++-------
> .../files/patch-check__mk__agent.freebsd | 14 ++++++++------
> net-mgmt/check_mk_agent/files/pkg-message.in | 4 +---
> 4 files changed, 28 insertions(+), 25 deletions(-)
> 
> diff --git a/net-mgmt/check_mk_agent/Makefile b/net-mgmt/check_mk_agent/Makefile
> index aec345b5c61b..7d2e7cf89031 100644
> --- a/net-mgmt/check_mk_agent/Makefile
> +++ b/net-mgmt/check_mk_agent/Makefile
[...]
> post-patch:
> @${REINPLACE_CMD} \
> -e 's|%%CHECKMK_LIBDIR%%|${_CHECKMK_LIBDIR}|' \
> -e 's|%%CHECKMK_CONFDIR%%|${_CHECKMK_CONFDIR}|' \
> - -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
> + -e 's|%%PREFIX%%|${PREFIX}|g' \
> ${WRKSRC}/${_CHECKMK_AGENT}
[...]
> diff --git a/net-mgmt/check_mk_agent/distinfo b/net-mgmt/check_mk_agent/distinfo
> index 93c84aaa2b46..807877b24a33 100644
> --- a/net-mgmt/check_mk_agent/distinfo
> +++ b/net-mgmt/check_mk_agent/distinfo
> -@@ -126,8 +126,8 @@ preamble_1() {
> + # some 'booleans'
> +@@ -138,8 +138,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"
> ++ [ "${PATH#*"%%PREFIX%%/bin"}" != "${PATH}" ] || PATH="${PATH}:%%PREFIX%%/bin"
> ++ [ "${PATH#*"%%PREFIX%%/sbin"}" != "${PATH}" ] || PATH="${PATH}:%%PREFIX%%/sbin"

LOCALBASE was the right variable. PREFIX is where you install the port. LOCALBASE is where you look for the port's dependencies were installed.


Best regards,

Mateusz Piotrowski