git: 07cbf6cc46aa - main - net/samba423: Use ETCDIR instead of a custom variable

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

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

commit 07cbf6cc46aa6c0f64af394df0725afe7674793a
Author:     Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2025-12-16 09:11:46 +0000
Commit:     Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2025-12-16 11:03:06 +0000

    net/samba423: Use ETCDIR instead of a custom variable
---
 net/samba423/Makefile                | 6 ++----
 net/samba423/files/README.FreeBSD.in | 4 ++--
 net/samba423/files/pkg-message.in    | 2 +-
 net/samba423/files/samba_server.in   | 4 ++--
 4 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/net/samba423/Makefile b/net/samba423/Makefile
index 5c42bca1a16f..1abb8c7136a0 100644
--- a/net/samba423/Makefile
+++ b/net/samba423/Makefile
@@ -65,7 +65,7 @@ SHEBANG_FILES=			source3/script* source4/scripting/bin/* selftest/*
 
 CONFIGURE_LOG=			bin/config.log
 CONFIGURE_ARGS=			--mandir="${PREFIX}/share/man" \
-				--sysconfdir="${_CONFDIR}" \
+				--sysconfdir="${ETCDIR}" \
 				--includedir="${SAMBA_INCLUDEDIR}" \
 				--datadir="${DATADIR}" \
 				--libdir="${SAMBA_LIBDIR}" \
@@ -134,6 +134,7 @@ LDFLAGS+=			-Wl,--undefined-version
 
 CONFLICTS_INSTALL=		ldb2[0-9]-* samba4*
 
+ETCDIR=				${PREFIX}/etc
 EXTRA_PATCHES=			\
 				${PATCHDIR}/0001-Compact-and-simplify-modules-build-and-config-genera.patch:-p1 \
 				${PATCHDIR}/0002-Adjust-abi_gen.sh-script-to-run-under-FreeBSD-with-i.patch:-p1 \
@@ -405,14 +406,11 @@ _SAMBA_SUB=			SAMBA4_LOGDIR="${_LOGDIR}" \
 				SAMBA_LDB_MODULESDIR="${SAMBA_LDB_MODULESDIR}" \
 				SAMBA4_BINDDNSDIR="${_BINDDNSDIR}" \
 				SAMBA4_PRIVATEDIR="${_PRIVATEDIR}" \
-				SAMBA4_CONFDIR="${_CONFDIR}" \
 				SAMBA4_CONFIG="${_SAMBA_CONFIG}" \
 				SAMBA4_SERVICES="${_SAMBA_SERVICES}"
 
 _SAMBA_CONFIG=			smb4.conf
 
-# XXX: Instead of defining _CONFDIR we could probably just set ETCDIR.
-_CONFDIR=			${PREFIX}/etc
 _BINDDNSDIR=			${_LOCKDIR}/bind-dns
 _LOCKDIR=			${_VARDIR}/db/${_SAMBA_MAJVERNAME}
 _LOGDIR=			${_VARDIR}/log/${_SAMBA_MAJVERNAME}
diff --git a/net/samba423/files/README.FreeBSD.in b/net/samba423/files/README.FreeBSD.in
index 95d349f525af..4e06a33160ba 100644
--- a/net/samba423/files/README.FreeBSD.in
+++ b/net/samba423/files/README.FreeBSD.in
@@ -15,7 +15,7 @@ Documentation
 FreeBSD specific information
 ============================
 
-* Your configuration is in: %%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%
+* Your configuration is in: %%ETCDIR%%/%%SAMBA4_CONFIG%%
 
 * All the logs are under: %%SAMBA4_LOGDIR%%
 
@@ -46,7 +46,7 @@ To run this port you need to perform the following steps:
 all the relevant files. That includes 'smb.conf' file and all the
 content of the '/var/db/samba/' directory.
 
-1a. Create new '%%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%' file by running:
+1a. Create new '%%ETCDIR%%/%%SAMBA4_CONFIG%%' file by running:
 
     # samba-tool domain provision
 
diff --git a/net/samba423/files/pkg-message.in b/net/samba423/files/pkg-message.in
index 02818d517e50..afdc959dd436 100644
--- a/net/samba423/files/pkg-message.in
+++ b/net/samba423/files/pkg-message.in
@@ -3,7 +3,7 @@
   message: <<EOM
 How to start: http://wiki.samba.org/index.php/Samba4/HOWTO
 
-* Your configuration is: %%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%
+* Your configuration is: %%ETCDIR%%/%%SAMBA4_CONFIG%%
 
 * All the relevant databases are under: %%SAMBA4_LOCKDIR%%
 
diff --git a/net/samba423/files/samba_server.in b/net/samba423/files/samba_server.in
index 99c9b64cc78d..12d867cb9e26 100644
--- a/net/samba423/files/samba_server.in
+++ b/net/samba423/files/samba_server.in
@@ -17,7 +17,7 @@
 # You need to enable winbindd separately, by adding:
 #winbindd_enable=YES
 # Configuration file can be set with:
-#samba_server_config=%%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%
+#samba_server_config=%%ETCDIR%%/%%SAMBA4_CONFIG%%
 #
 # shellcheck disable=SC2034,SC2086,SC3043
 
@@ -45,7 +45,7 @@ reload_cmd=samba_server_reload_cmd
 rcvar_cmd=samba_server_rcvar_cmd
 stop_postcmd=samba_server_poststop
 # Defaults
-samba_server_config_default=%%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%
+samba_server_config_default=%%ETCDIR%%/%%SAMBA4_CONFIG%%
 smbcontrol_command=%%PREFIX%%/bin/smbcontrol
 
 samba_server_checkconfig()