pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

dma: Move dma to libexec and document mailwrapper setup



Module Name:	pkgsrc-wip
Committed By:	Philip Dodd <orange.spyderman%gmail.com@localhost>
Pushed By:	orange.spyderman
Date:		Mon Nov 16 16:06:06 2026 +0000
Changeset:	a72e53b816d6ba7084b2b18ab7bdead538811169

Modified Files:
	dma/Makefile
	dma/PLIST
	dma/distinfo
	dma/patches/patch-Makefile
Added Files:
	dma/files/README.pkgsrc
	dma/files/mailer.conf

Log Message:
dma: Move dma to libexec and document mailwrapper setup

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a72e53b816d6ba7084b2b18ab7bdead538811169

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 dma/Makefile               | 17 ++++++++++++++---
 dma/PLIST                  |  4 +++-
 dma/distinfo               |  2 +-
 dma/files/README.pkgsrc    | 23 +++++++++++++++++++++++
 dma/files/mailer.conf      |  4 ++++
 dma/patches/patch-Makefile |  3 ++-
 6 files changed, 47 insertions(+), 6 deletions(-)

diffs:
diff --git a/dma/Makefile b/dma/Makefile
index 0e936048f6..d8a443ed99 100644
--- a/dma/Makefile
+++ b/dma/Makefile
@@ -14,18 +14,18 @@ BUILD_DEFS+=		VARBASE
 
 PKG_SYSCONFSUBDIR=	dma
 EGDIR=			${PREFIX}/share/examples/${PKGBASE}
+DOCDIR=			${PREFIX}/share/doc/${PKGBASE}
 
 USE_TOOLS+=	flex yacc
 LDFLAGS.SunOS+=	-lsocket -lnsl
 
-NO_CONFIGURE=	yes
 USE_LANGUAGES=	c
 
 .include "../../mk/bsd.prefs.mk"
 
 DMA_GROUP?=	dma
 DMA_ROOT_USER?=	dma
-SPECIAL_PERMS+=	${PREFIX}/sbin/dma \
+SPECIAL_PERMS+=	${PREFIX}/libexec/dma \
 		${REAL_ROOT_USER} ${DMA_GROUP} 2555
 SPECIAL_PERMS+=	${PREFIX}/libexec/dma-mbox-create \
 		${REAL_ROOT_USER} ${DMA_GROUP} 4554
@@ -43,7 +43,7 @@ MAKE_FLAGS=	"LIBEXEC=${PREFIX}/libexec"
 MAKE_FLAGS+=	"MAN=${PREFIX}/${PKGMANDIR}"
 MAKE_FLAGS+=	version=${PKGVERSION_NOREV}
 
-INSTALLATION_DIRS=	${EGDIR}
+INSTALLATION_DIRS=	${EGDIR} ${DOCDIR}
 
 CONF_FILES=	${EGDIR}/dma.conf ${PKG_SYSCONFDIR}/dma.conf
 CONF_FILES+=	${EGDIR}/auth.conf ${PKG_SYSCONFDIR}/auth.conf
@@ -51,9 +51,20 @@ CONF_FILES+=	${EGDIR}/auth.conf ${PKG_SYSCONFDIR}/auth.conf
 OWN_DIRS=	${VARBASE}/spool/dma
 OWN_DIRS_PERMS=	${VARBASE}/spool/dma ${DMA_ROOT_USER} ${DMA_GROUP} 0770
 
+SUBST_CLASSES+=		mailer
+SUBST_STAGE.mailer=	pre-configure
+SUBST_FILES.mailer=	${WRKDIR}/mailer.conf ${WRKDIR}/README.pkgsrc
+SUBST_VARS.mailer=	PREFIX
+
+post-extract:
+	${CP} ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
+	${CP} ${FILESDIR}/README.pkgsrc ${WRKDIR}/README.pkgsrc
+
 post-install:
 	${INSTALL_DATA} ${WRKSRC}/dma.conf ${DESTDIR}${EGDIR}/dma.conf
 	${INSTALL_DATA} ${WRKSRC}/auth.conf ${DESTDIR}${EGDIR}/auth.conf
+	${INSTALL_DATA} ${WRKDIR}/mailer.conf ${DESTDIR}${EGDIR}/mailer.conf
+	${INSTALL_DATA} ${WRKDIR}/README.pkgsrc ${DESTDIR}${DOCDIR}/README.pkgsrc
 
 .include "../../security/openssl/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/dma/PLIST b/dma/PLIST
index 47d70a3958..2a4f853916 100644
--- a/dma/PLIST
+++ b/dma/PLIST
@@ -1,6 +1,8 @@
 @comment $NetBSD$
+libexec/dma
 libexec/dma-mbox-create
 man/man8/dma.8
-sbin/dma
+share/doc/dma/README.pkgsrc
 share/examples/dma/auth.conf
 share/examples/dma/dma.conf
+share/examples/dma/mailer.conf
diff --git a/dma/distinfo b/dma/distinfo
index d8170704f6..9979a7ef12 100644
--- a/dma/distinfo
+++ b/dma/distinfo
@@ -3,7 +3,7 @@ $NetBSD$
 BLAKE2s (dma-0.14.tar.gz) = 12d3e184851f64fe856cf79a01789b7d18fa05eeb0b03955b3f3e49be1b990eb
 SHA512 (dma-0.14.tar.gz) = c3ef94bb6f8fca64af673be392b9ae7f151bcfefb2996683dee101f15d777912f8ff5ecc9442c9c70e6d530db53baa4d71ff379018fb62632c85a8a61cc4b407
 Size (dma-0.14.tar.gz) = 37572 bytes
-SHA1 (patch-Makefile) = da0c5394028fbeeaa0d0f3a8792204956d287b11
+SHA1 (patch-Makefile) = e8db07f69c7f80c4faf39c26747aaf2211895a00
 SHA1 (patch-dma.c) = bfd81f7e343d9d75a6ef446d04bd30a11ccf0672
 SHA1 (patch-dma.h) = c1d57229ec790f5f11a18f277c19e0ba1cdcfdd4
 SHA1 (patch-dns.c) = 5f8a7adb8b1ca379ab8b837e56ca044d7699d2f1
diff --git a/dma/files/README.pkgsrc b/dma/files/README.pkgsrc
new file mode 100644
index 0000000000..c9790b2fec
--- /dev/null
+++ b/dma/files/README.pkgsrc
@@ -0,0 +1,23 @@
+Getting started
+===============
+
+Assuming you're using mailwrapper(8) or mail/mailwrapper from pkgsrc :
+
+- Edit the mailer.conf your system uses.  See @PREFIX@/share/examples/dma/mailer.conf
+- You may also want to set up a crontab entry to retry messages from the queue in case of network drops etc
+
+E.g.
+
+*/5 * * * * @PREFIX@/libexec/dma -q
+
+
+===========================================================================
+N.B.
+
+The dma executable has moved from @PREFIX@/sbin/dma to
+@PREFIX@/libexec/dma.
+
+When upgrading, update any existing mailwrapper configuration
+(mailer.conf), scripts, crontabs or other references that use the old path.
+Mail submission through the old path will fail until these are updated.
+===========================================================================
diff --git a/dma/files/mailer.conf b/dma/files/mailer.conf
new file mode 100644
index 0000000000..db9499ea51
--- /dev/null
+++ b/dma/files/mailer.conf
@@ -0,0 +1,4 @@
+sendmail    @PREFIX@/libexec/dma
+send-mail   @PREFIX@/libexec/dma
+mailq       @PREFIX@/libexec/dma
+newaliases  @PREFIX@/libexec/dma
diff --git a/dma/patches/patch-Makefile b/dma/patches/patch-Makefile
index a30864f490..65357a7643 100644
--- a/dma/patches/patch-Makefile
+++ b/dma/patches/patch-Makefile
@@ -1,6 +1,7 @@
 $NetBSD$
 
 Stage executables without privileged ownership or modes.
+Install dma into libexec alongside dma-mbox-create (rather than sbin).
 The package declares their final permissions using SPECIAL_PERMS.
 
 --- Makefile.orig
@@ -8,5 +9,5 @@ The package declares their final permissions using SPECIAL_PERMS.
 @@ -55,2 +55,2 @@
 -	${INSTALL} -m 2755 -o root -g mail dma ${DESTDIR}${SBIN}
 -	${INSTALL} -m 4754 -o root -g mail dma-mbox-create ${DESTDIR}${LIBEXEC}
-+	${INSTALL} -m 0555 dma ${DESTDIR}${SBIN}
++	${INSTALL} -m 0555 dma ${DESTDIR}${LIBEXEC}
 +	${INSTALL} -m 0555 dma-mbox-create ${DESTDIR}${LIBEXEC}


Home | Main Index | Thread Index | Old Index