Bug 297244 - net-mgmt/check_mk_agent 2.5.0p9: MK_CONFDIR set to /usr/local/usr/local/etc/check_mk
Summary: net-mgmt/check_mk_agent 2.5.0p9: MK_CONFDIR set to /usr/local/usr/local/etc/c...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Bernhard Froehlich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-08-03 06:21 UTC by Felix J. Ogris
Modified: 2026-08-06 18:53 UTC (History)
3 users (show)

See Also:
ivalentine: maintainer-feedback+


Attachments
Patchfile for reported bug (1.48 KB, patch)
2026-08-03 20:30 UTC, Ian Valentine
ivalentine: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix J. Ogris 2026-08-03 06:21:19 UTC
After make extract of latest 2.5.0p9:

/usr/ports/net-mgmt/check_mk_agent # grep -n MK_CONFDIR work/check_mk_agent-2.5.0p9/check_mk_agent.freebsd
26:# Agent paths (MK_LIBDIR, MK_CONFDIR, MK_VARDIR, MK_LOGDIR, MK_BIN)
148:    : "${MK_CONFDIR:="/usr/local/etc/check_mk"}"


But after make patch and thus in the script which gets installed:

/usr/ports/net-mgmt/check_mk_agent # grep -n MK_CONFDIR work/check_mk_agent-2.5.0p9/check_mk_agent.freebsd
26:# Agent paths (MK_LIBDIR, MK_CONFDIR, MK_VARDIR, MK_LOGDIR, MK_BIN)
148:    : "${MK_CONFDIR:="/usr/local/usr/local/etc/check_mk"}"


Maybe remove this from the Makefile:

-e 's|/etc/check_mk|${_CHECKMK_CONFDIR}|' \
Comment 1 freebsd 2026-08-03 11:59:31 UTC
I just found the same thing in a troubleshooting session, appreciate forthcoming (un)patch!
Comment 2 Ian Valentine 2026-08-03 20:30:32 UTC
Created attachment 273419 [details]
Patchfile for reported bug

Thank you for catching this bug! Believe that the patch should still happen, so as to respect different PREFIX values, but I am open to better ways to do that.

Upstream commit that introduced this change: https://github.com/Checkmk/checkmk/commit/3919d291dde9961e10b25f11d4cabdc2263dd7f8
Comment 3 Felix J. Ogris 2026-08-03 21:15:05 UTC
Thank you, patch works fine for me.
My bad, I reported to upstream only at the same time you fixed MK_CONFDIR in the port's Makefile in August 2024.
Comment 4 freebsd 2026-08-05 09:02:29 UTC
Has this been committed to ports?
Comment 5 Ian Valentine 2026-08-05 18:38:09 UTC
It has not, I'm not a committer.
Comment 6 freebsd 2026-08-05 20:03:58 UTC
I dropped a request on freebsd-ports. A patch is fine, of course, but really only half the work. Anyone who installs or upgrades this port today still has a non-functional piece of software.
Comment 7 Bernhard Froehlich freebsd_committer freebsd_triage 2026-08-06 02:47:10 UTC
Reopen an take this.
Comment 8 commit-hook freebsd_committer freebsd_triage 2026-08-06 18:48:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1deeef98daabe9dc293951c1584d7c7aaf17d8ad

commit 1deeef98daabe9dc293951c1584d7c7aaf17d8ad
Author:     Ian Valentine <ivalentine@arizona.edu>
AuthorDate: 2026-08-06 18:34:09 +0000
Commit:     Bernhard Froehlich <decke@FreeBSD.org>
CommitDate: 2026-08-06 18:45:14 +0000

    net-mgmt/check_mk_agent: Change default paths

    Upstream changed default values for MK_CONFDIR and MK_VARDIR.
    This updates the patch to properly use PREFIX with the new defaults
    and not hardcode to /usr/local.

    PR:             297244
    Approved by:    maintainer

 net-mgmt/check_mk_agent/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Comment 9 Bernhard Froehlich freebsd_committer freebsd_triage 2026-08-06 18:53:40 UTC
Committed. Thanks!