git: 8cd7841d8435 - main - pkgbase: separate /etc/mail/aliases from the sendmail package

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Wed, 20 Mar 2024 15:45:05 UTC
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/src/commit/?id=8cd7841d84356adb91450e3daf2c25454a102221

commit 8cd7841d84356adb91450e3daf2c25454a102221
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2024-03-20 15:39:39 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2024-03-20 15:39:39 +0000

    pkgbase: separate /etc/mail/aliases from the sendmail package
    
    move /etc/aliases and /etc/mail/aliases into the runtime package
    this file is used by both sendmail and dma.
    
    While here mark this file as a config file so 3way merge is performed
---
 etc/Makefile | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/etc/Makefile b/etc/Makefile
index 229d9380901d..848176fef914 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -20,7 +20,7 @@ SUBDIR+=sendmail
 
 ETCMAIL=aliases
 .if ${MK_SENDMAIL} != "no"
-ETCMAIL+=Makefile README access.sample virtusertable.sample \
+ETCMAIL_SENDMAIL+=Makefile README access.sample virtusertable.sample \
 	mailertable.sample
 .endif
 
@@ -78,13 +78,17 @@ distribution:
 
 .if ${MK_MAIL} != "no"
 	cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
-	    -T "package=sendmail" ${ETCMAIL} ${DESTDIR}/etc/mail
+	    -T "package=runtime,config" ${ETCMAIL} ${DESTDIR}/etc/mail
 	if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \
 	      ! -f ${DESTDIR}/etc/aliases ]; then \
-		${INSTALL_SYMLINK} -T "package=sendmail" \
+		${INSTALL_SYMLINK} -T "package=runtime" \
 		mail/aliases ${DESTDIR}/etc/aliases; \
 	fi
 .endif
+.if ${MK_SENDMAIL} != "no"
+	cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
+		-T "package=sendmail" ${ETCMAIL_SENDMAIL} ${DESTDIR}/etc/mail
+.endif
 .if ${MK_LOCATE} != "no"
 	${INSTALL} -o nobody -g ${BINGRP} -m 644 -T "package=runtime"\
 	    /dev/null ${DESTDIR}/var/db/locate.database