tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[PATCH] wip/dma: update to 0.14
Hi,
Attached is an update of wip/dma from 0.13 to 0.14, adding upstream
VERIFYCERT support and other changes as per the upstream changelog from
0.13 to 0.14
Packaging changes:
Patch 1/2
- Adjust the queue-renaming patch to apply to 0.14
- Supply the version explicitly for BSD make
- Support unprivileged staging using SPECIAL_PERMS
- Remove the duplicate LIBEXEC_PATH definition (defined upstream and in
the package Makefile)
- Correct share/exmaples to share/examples
Patch 2/2
- Ordinary-user submission initially failed with exit 73 (“Permission
denied”): the spool directory was dma:dma 0750, preventing the setgid
dma executable from creating queue files. Change the spool mode to 0770
to grant the dma group write access. Root delivery passed before this
correction.
Tested on NetBSD-current/amd64:
- package built, and installed and tested against my local mail relay host
- isolated TLS tests: it accepted a valid certificate and rejected both
a trusted certificate for the wrong hostname and an untrusted certificate
- validated unprivileged user mail submission
Could someone review and commit this?
Besides the above, this package uses the portable ${PREFIX}/sbin/dma,
following upstream’s top-level Makefile and preserving the existing
pkgsrc layout. The FreeBSD port uses upstream’s separate bsd/ build and
explicitly sets BINDIR=${LIBEXEC}, installing it under
${PREFIX}/libexec/dma. This update does not change that, but it might be
desirable on BSD installs.
Thanks,
Philip
From 21e079d1b3b4f95e84be7192ba5d597fcc6daa08 Mon Sep 17 00:00:00 2001
From: Philip Dodd <orange.spyderman%gmail.com@localhost>
Date: Thu, 12 Nov 2026 08:07:12 +0000
Subject: [PATCH 1/2] dma: Update to 0.14 and support unprivileged staging
---
dma/Makefile | 10 +++++++---
dma/PLIST | 4 ++--
dma/distinfo | 11 +++++------
dma/patches/patch-Makefile | 17 ++++++-----------
dma/patches/patch-dma.c | 7 ++++---
5 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/dma/Makefile b/dma/Makefile
index c0d7ee93e3..b799d44e79 100644
--- a/dma/Makefile
+++ b/dma/Makefile
@@ -1,6 +1,6 @@
# $NetBSD$
-DISTNAME= dma-0.13
+DISTNAME= dma-0.14
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_GITHUB:=corecode/}
GITHUB_TAG= v${PKGVERSION_NOREV}
@@ -13,7 +13,7 @@ LICENSE= modified-bsd
BUILD_DEFS+= VARBASE
PKG_SYSCONFSUBDIR= dma
-EGDIR= ${PREFIX}/share/exmaples/${PKGBASE}
+EGDIR= ${PREFIX}/share/examples/${PKGBASE}
USE_TOOLS+= flex yacc
LDFLAGS.SunOS+= -lsocket -lnsl
@@ -25,12 +25,15 @@ USE_LANGUAGES= c
DMA_GROUP?= dma
DMA_ROOT_USER?= dma
+SPECIAL_PERMS+= ${PREFIX}/sbin/dma \
+ ${REAL_ROOT_USER} ${DMA_GROUP} 2555
+SPECIAL_PERMS+= ${PREFIX}/libexec/dma-mbox-create \
+ ${REAL_ROOT_USER} ${DMA_GROUP} 4554
PKG_GROUPS= ${DMA_GROUP}
PKG_USERS= ${DMA_ROOT_USER}:${DMA_GROUP}
CFLAGS+= -DHAVE_GETPROGNAME
CFLAGS+= -DHAVE_STRLCPY
-CFLAGS+= -DLIBEXEC_PATH=${PREFIX}/libexec
CFLAGS+= -DDMA_GROUP=\"${DMA_GROUP}\"
CFLAGS+= -DDMA_ROOT_USER=\"${DMA_ROOT_USER}\"
@@ -38,6 +41,7 @@ MAKE_ENV+= CONFDIR=${PKG_SYSCONFDIR}
MAKE_FLAGS= "LIBEXEC=${PREFIX}/libexec"
MAKE_FLAGS+= "MAN=${PREFIX}/${PKGMANDIR}"
+MAKE_FLAGS+= version=${PKGVERSION_NOREV}
INSTALLATION_DIRS= ${EGDIR}
diff --git a/dma/PLIST b/dma/PLIST
index 66705d3bfb..47d70a3958 100644
--- a/dma/PLIST
+++ b/dma/PLIST
@@ -2,5 +2,5 @@
libexec/dma-mbox-create
man/man8/dma.8
sbin/dma
-share/exmaples/dma/auth.conf
-share/exmaples/dma/dma.conf
+share/examples/dma/auth.conf
+share/examples/dma/dma.conf
diff --git a/dma/distinfo b/dma/distinfo
index 031744eab0..d8170704f6 100644
--- a/dma/distinfo
+++ b/dma/distinfo
@@ -1,11 +1,10 @@
$NetBSD$
-SHA1 (dma-0.13.tar.gz) = 2b6e871441fbf1282cab7f7a05783c310586e993
-RMD160 (dma-0.13.tar.gz) = 4213525ecdbad2d89aa0a7cb1d399a16daf258bf
-SHA512 (dma-0.13.tar.gz) = 12ca04c6e67ffeead4596dcbf6bbc42547461b224a7f70e7185822b5f968c369de4c20ae7de3415a54f6eef7d4acc12d5fca5ff5851d640f3611d89a345b41ac
-Size (dma-0.13.tar.gz) = 36315 bytes
-SHA1 (patch-Makefile) = 76395db385e3afb8f3d3678f12bb676c0ef73f67
-SHA1 (patch-dma.c) = a77711f474ded4c53eeb3176bd0c561777c15807
+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-dma.c) = bfd81f7e343d9d75a6ef446d04bd30a11ccf0672
SHA1 (patch-dma.h) = c1d57229ec790f5f11a18f277c19e0ba1cdcfdd4
SHA1 (patch-dns.c) = 5f8a7adb8b1ca379ab8b837e56ca044d7699d2f1
SHA1 (patch-mail.c) = b5397243763d2283cab33b1aa5d55cfd9ef4792e
diff --git a/dma/patches/patch-Makefile b/dma/patches/patch-Makefile
index 48a9a83340..a30864f490 100644
--- a/dma/patches/patch-Makefile
+++ b/dma/patches/patch-Makefile
@@ -1,17 +1,12 @@
$NetBSD$
-For setuid files its recommended to not set any write permissions
+Stage executables without privileged ownership or modes.
+The package declares their final permissions using SPECIAL_PERMS.
---- Makefile.orig 2016-02-23 20:01:56.895785904 +0000
+--- Makefile.orig
+++ Makefile
-@@ -50,8 +50,8 @@ clean:
- install: all
- ${INSTALL} -d ${DESTDIR}${SBIN}
- ${INSTALL} -d ${DESTDIR}${MAN}/man8 ${DESTDIR}${LIBEXEC}
+@@ -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 2555 -o root -g mail dma ${DESTDIR}${SBIN}
-+ ${INSTALL} -m 4554 -o root -g mail dma-mbox-create ${DESTDIR}${LIBEXEC}
- ${INSTALL} -m 0644 dma.8 ${DESTDIR}${MAN}/man8/
-
- sendmail-link:
++ ${INSTALL} -m 0555 dma ${DESTDIR}${SBIN}
++ ${INSTALL} -m 0555 dma-mbox-create ${DESTDIR}${LIBEXEC}
diff --git a/dma/patches/patch-dma.c b/dma/patches/patch-dma.c
index a9572a6d82..c75a8eb924 100644
--- a/dma/patches/patch-dma.c
+++ b/dma/patches/patch-dma.c
@@ -20,7 +20,7 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
+set_from(struct dma_queue *queue, const char *osender)
{
const char *addr;
- char *sender;
+ const char *from_user = NULL;
@@ -153,7 +154,7 @@ read_aliases(void)
}
@@ -66,12 +66,13 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
{
struct qitem *it;
int locked = 0; /* XXX */
-@@ -421,7 +422,7 @@ main(int argc, char **argv)
+@@ -421,8 +422,8 @@ main(int argc, char **argv)
{
struct sigaction act;
char *sender = NULL;
+ char *own_name = NULL;
- struct queue queue;
+ struct dma_queue queue;
int i, ch;
- int nodot = 0, showq = 0, queue_only = 0;
+ int nodot = 0, showq = 0, queue_only = 0, newaliases = 0;
int recp_from_header = 0;
--
2.56.0
From 1a1eca676a25a6e1cd7a1a4cdec472c19acf7285 Mon Sep 17 00:00:00 2001
From: Philip Dodd <orange.spyderman%gmail.com@localhost>
Date: Thu, 12 Nov 2026 08:36:29 +0000
Subject: [PATCH 2/2] dma: Allow unprivileged submission to the spool
---
dma/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dma/Makefile b/dma/Makefile
index b799d44e79..0e936048f6 100644
--- a/dma/Makefile
+++ b/dma/Makefile
@@ -49,7 +49,7 @@ CONF_FILES= ${EGDIR}/dma.conf ${PKG_SYSCONFDIR}/dma.conf
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} 750
+OWN_DIRS_PERMS= ${VARBASE}/spool/dma ${DMA_ROOT_USER} ${DMA_GROUP} 0770
post-install:
${INSTALL_DATA} ${WRKSRC}/dma.conf ${DESTDIR}${EGDIR}/dma.conf
--
2.56.0
Home |
Main Index |
Thread Index |
Old Index