git: fca2562ca0a0 - main - net/samba423: Fix pkg-plist for option CLUSTER

From: Mateusz Piotrowski <0mp_at_FreeBSD.org>
Date: Tue, 16 Dec 2025 13:34:45 UTC
The branch main has been updated by 0mp:

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

commit fca2562ca0a0015fb3fa6605ecbb0aaa07feea21
Author:     Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2025-12-16 13:30:15 +0000
Commit:     Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2025-12-16 13:34:18 +0000

    net/samba423: Fix pkg-plist for option CLUSTER
    
        ===> Checking for items in STAGEDIR missing from pkg-plist
        Error: Orphaned: @dir var/lib/ctdb/persistent
        Error: Orphaned: @dir var/lib/ctdb/state
        Error: Orphaned: @dir var/lib/ctdb/volatile
        Error: Orphaned: @dir var/log
        Error: Orphaned: @dir var/run/ctdb
        ===> Checking for items in pkg-plist which are not in STAGEDIR
        Error: Missing: @dir /var/lib/ctdb/persistent
        Error: Missing: @dir /var/lib/ctdb/state
        Error: Missing: @dir /var/lib/ctdb/volatile
        Error: Missing: @dir /var/lib/ctdb
        Error: Missing: @dir /var/lib
        Error: Missing: @dir /var/run/ctdb
    
    Also, address the problem with an symlink pointing to an absolute path:
    
        Warning: Bad symlink '/usr/local/etc/ctdb/statd-callout' pointing to an absolute pathname '/usr/local/libexec/ctdb/statd_callout'
    
    PR:             291104
    Reported by:    vvd
---
 net/samba423/Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/samba423/Makefile b/net/samba423/Makefile
index e75129b86b10..448ab05f8b52 100644
--- a/net/samba423/Makefile
+++ b/net/samba423/Makefile
@@ -74,7 +74,7 @@ CONFIGURE_ARGS=			--mandir="${PREFIX}/share/man" \
 				--with-modulesdir="${SAMBA_MODULESDIR}" \
 				--with-ldbmodulesdir="${SAMBA_LDB_MODULESDIR}" \
 				--with-pkgconfigdir="${_PKGCONFIGDIR}" \
-				--localstatedir="${VARDIR}" \
+				--localstatedir="${_LOCALSTATEDIR}" \
 				--with-piddir="${_RUNDIR}" \
 				--with-sockets-dir="${_RUNDIR}" \
 				--with-privileged-socket-dir="${_RUNDIR}" \
@@ -406,6 +406,7 @@ _SAMBA_SUB=			PKGCONFIGDIR=${_PKGCONFIGDIR_REL} \
 _SAMBA_CONFIG=			smb4.conf
 
 _BINDDNSDIR=			${_LOCKDIR}/bind-dns
+_LOCALSTATEDIR=			${_VARDIR}
 _LOCKDIR=			${_VARDIR}/db/${_SAMBA_MAJVERNAME}
 _LOGDIR=			${_VARDIR}/log/${_SAMBA_MAJVERNAME}
 _PAMDIR=			${PREFIX}/lib
@@ -413,7 +414,7 @@ _PKGCONFIGDIR=			${PREFIX}/${_PKGCONFIGDIR_REL}
 _PKGCONFIGDIR_REL=		libdata/pkgconfig
 _PRIVATEDIR=			${_LOCKDIR}/private
 _RUNDIR=			${_VARDIR}/run/${_SAMBA_MAJVERNAME}
-_VARDIR=			${DESTDIR}/var
+_VARDIR=			/var
 
 .include <bsd.port.options.mk>
 
@@ -488,6 +489,8 @@ post-install-CLUSTER-on:
 	${RLN} ${STAGEDIR}${PREFIX}/share/ctdb/events/legacy/10.interface.script ${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/10.interface.script
 	${RLN} ${STAGEDIR}${PREFIX}/share/ctdb/events/legacy/95.database.script ${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/95.database.script
 
+	${RLN} ${STAGEDIR}${PREFIX}/libexec/ctdb/statd_callout ${STAGEDIR}${PREFIX}/etc/ctdb/statd-callout
+
 post-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 .for doc in ${PORTDOCS}