pkgsrc-WIP-changes archive

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

Version bump of dma to v0.11 and fix build on SunOS



Module Name:	pkgsrc-wip
Committed By:	Thomas Merkel <tm%core.io@localhost>
Pushed By:	drscream
Date:		Tue Feb 23 21:07:44 2016 +0000
Changeset:	b7e6612b5721ba08a2b2a76b94e919e5179efd66

Modified Files:
	dma/Makefile
	dma/PLIST
	dma/distinfo
Added Files:
	dma/patches/patch-Makefile
	dma/patches/patch-crypto.c
	dma/patches/patch-dma.c
	dma/patches/patch-dma.h
	dma/patches/patch-dns.c
	dma/patches/patch-local.c
	dma/patches/patch-mail.c
	dma/patches/patch-spool.c

Log Message:
Version bump of dma to v0.11 and fix build on SunOS

Patches available to build on SunOS. Rename queue struct to dma_queue
because it's already used on SunOS. Includes strings.h is required to
have bcopy and bzero available. For security reason remove write
permissions on setuid files.

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

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

diffstat:
 dma/Makefile               | 36 ++++++++++++++++++++--
 dma/PLIST                  |  2 ++
 dma/distinfo               | 15 +++++++--
 dma/patches/patch-Makefile | 17 ++++++++++
 dma/patches/patch-crypto.c | 14 +++++++++
 dma/patches/patch-dma.c    | 77 ++++++++++++++++++++++++++++++++++++++++++++++
 dma/patches/patch-dma.h    | 47 ++++++++++++++++++++++++++++
 dma/patches/patch-dns.c    | 20 ++++++++++++
 dma/patches/patch-local.c  | 14 +++++++++
 dma/patches/patch-mail.c   | 42 +++++++++++++++++++++++++
 dma/patches/patch-spool.c  | 63 +++++++++++++++++++++++++++++++++++++
 11 files changed, 341 insertions(+), 6 deletions(-)

diffs:
diff --git a/dma/Makefile b/dma/Makefile
index 31bd3ea..b79d506 100644
--- a/dma/Makefile
+++ b/dma/Makefile
@@ -1,25 +1,55 @@
 # $NetBSD$
 
-PKGNAME=		dma-0.10
 DISTNAME=		dma-${GITHUB_TAG}
+PKGNAME=		dma-0.11
 CATEGORIES=		mail
 MASTER_SITES=	${MASTER_SITE_GITHUB:=corecode/}
-GITHUB_PROJECT=	dma
-GITHUB_TAG=		v0.10
 
 MAINTAINER=	cfkoch%edgebsd.org@localhost
 HOMEPAGE=	https://github.com/corecode/dma
 COMMENT=	The DragonFly Mail Agent
 LICENSE=	modified-bsd
 
+GITHUB_PROJECT=	dma
+GITHUB_TAG=		v0.11
+
+BUILD_DEFS+=		VARBASE
+
+PKG_SYSCONFDIR=	dma
+EGDIR=			${PREFIX}/share/exmaples/${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
+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}\"
 
 MAKE_FLAGS=		"LIBEXEC=${PREFIX}/libexec"
 MAKE_FLAGS+=	"MAN=${PREFIX}/${PKGMANDIR}"
 
+INSTALLATION_DIRS=	${EGDIR}
+
+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
+
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/dma.conf ${DESTDIR}${EGDIR}/dma.conf
+	${INSTALL_DATA} ${WRKSRC}/auth.conf ${DESTDIR}${EGDIR}/auth.conf
+
 .include "../../mk/bsd.pkg.mk"
diff --git a/dma/PLIST b/dma/PLIST
index cedff35..66705d3 100644
--- a/dma/PLIST
+++ b/dma/PLIST
@@ -2,3 +2,5 @@
 libexec/dma-mbox-create
 man/man8/dma.8
 sbin/dma
+share/exmaples/dma/auth.conf
+share/exmaples/dma/dma.conf
diff --git a/dma/distinfo b/dma/distinfo
index bc7c2df..23cc4b9 100644
--- a/dma/distinfo
+++ b/dma/distinfo
@@ -1,5 +1,14 @@
 $NetBSD$
 
-SHA1 (dma-v0.10.tar.gz) = 299741b8b336267293812f3ceae3b8c43f06cc03
-RMD160 (dma-v0.10.tar.gz) = 3950fa80c434d8b8f8d7006e69411756a0b25453
-Size (dma-v0.10.tar.gz) = 34531 bytes
+SHA1 (dma-v0.11.tar.gz) = 39badd49b6305c282df7734c927e7a90420265dc
+RMD160 (dma-v0.11.tar.gz) = 1ec92cb8854640a1f0e0fc1f5cdf7132f715949e
+SHA512 (dma-v0.11.tar.gz) = 8ccf85a921da12cbf5b9f2c93dd96da91d2acdace979ed4a6b37af94e72441bf654ac65525fc2c1118c1b16136278de4daeafc753dcaf4300a017e317f83fc4d
+Size (dma-v0.11.tar.gz) = 34529 bytes
+SHA1 (patch-Makefile) = 76395db385e3afb8f3d3678f12bb676c0ef73f67
+SHA1 (patch-crypto.c) = 80f4eb7c3a7e5dc296259ac90678b0d8eac0ec35
+SHA1 (patch-dma.c) = a77711f474ded4c53eeb3176bd0c561777c15807
+SHA1 (patch-dma.h) = c1d57229ec790f5f11a18f277c19e0ba1cdcfdd4
+SHA1 (patch-dns.c) = 5f8a7adb8b1ca379ab8b837e56ca044d7699d2f1
+SHA1 (patch-local.c) = 28cfa61aedc87851addf0db0c347d0bce820869d
+SHA1 (patch-mail.c) = c4d952d16086f3c47448f6e4a55f24ed86da3e9b
+SHA1 (patch-spool.c) = 1c63ef62cefa3a20da3001d841393bbaf6ac5978
diff --git a/dma/patches/patch-Makefile b/dma/patches/patch-Makefile
new file mode 100644
index 0000000..48a9a83
--- /dev/null
+++ b/dma/patches/patch-Makefile
@@ -0,0 +1,17 @@
+$NetBSD$
+
+For setuid files its recommended to not set any write permissions
+
+--- Makefile.orig	2016-02-23 20:01:56.895785904 +0000
++++ Makefile
+@@ -50,8 +50,8 @@ clean:
+ install: all
+ 	${INSTALL} -d ${DESTDIR}${SBIN}
+ 	${INSTALL} -d ${DESTDIR}${MAN}/man8 ${DESTDIR}${LIBEXEC}
+-	${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:
diff --git a/dma/patches/patch-crypto.c b/dma/patches/patch-crypto.c
new file mode 100644
index 0000000..73c0d3b
--- /dev/null
+++ b/dma/patches/patch-crypto.c
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Include strings.h for bzero and bcopy function.
+
+--- crypto.c.orig	2016-02-07 12:41:49.000000000 +0000
++++ crypto.c
+@@ -40,6 +40,7 @@
+ #include <openssl/pem.h>
+ #include <openssl/rand.h>
+ 
++#include <strings.h>
+ #include <syslog.h>
+ 
+ #include "dma.h"
diff --git a/dma/patches/patch-dma.c b/dma/patches/patch-dma.c
new file mode 100644
index 0000000..a9572a6
--- /dev/null
+++ b/dma/patches/patch-dma.c
@@ -0,0 +1,77 @@
+$NetBSD$
+
+Rename queue to dma_queue because the struct is already defined in SunOS.
+
+--- dma.c.orig	2016-02-07 12:41:49.000000000 +0000
++++ dma.c
+@@ -54,6 +54,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <strings.h>
+ #include <syslog.h>
+ #include <unistd.h>
+ 
+@@ -94,7 +95,7 @@ sighup_handler(int signo)
+ }
+ 
+ static char *
+-set_from(struct queue *queue, const char *osender)
++set_from(struct dma_queue *queue, const char *osender)
+ {
+ 	const char *addr;
+ 	char *sender;
+@@ -153,7 +154,7 @@ read_aliases(void)
+ }
+ 
+ static int
+-do_alias(struct queue *queue, const char *addr)
++do_alias(struct dma_queue *queue, const char *addr)
+ {
+ 	struct alias *al;
+         struct stritem *sit;
+@@ -173,7 +174,7 @@ do_alias(struct queue *queue, const char
+ }
+ 
+ int
+-add_recp(struct queue *queue, const char *str, int expand)
++add_recp(struct dma_queue *queue, const char *str, int expand)
+ {
+ 	struct qitem *it, *tit;
+ 	struct passwd *pw;
+@@ -240,7 +241,7 @@ out:
+ }
+ 
+ static struct qitem *
+-go_background(struct queue *queue)
++go_background(struct dma_queue *queue)
+ {
+ 	struct sigaction sa;
+ 	struct qitem *it;
+@@ -372,7 +373,7 @@ bounce:
+ }
+ 
+ void
+-run_queue(struct queue *queue)
++run_queue(struct dma_queue *queue)
+ {
+ 	struct qitem *it;
+ 
+@@ -385,7 +386,7 @@ run_queue(struct queue *queue)
+ }
+ 
+ static void
+-show_queue(struct queue *queue)
++show_queue(struct dma_queue *queue)
+ {
+ 	struct qitem *it;
+ 	int locked = 0;	/* XXX */
+@@ -421,7 +422,7 @@ main(int argc, char **argv)
+ {
+ 	struct sigaction act;
+ 	char *sender = NULL;
+-	struct queue queue;
++	struct dma_queue queue;
+ 	int i, ch;
+ 	int nodot = 0, showq = 0, queue_only = 0;
+ 	int recp_from_header = 0;
diff --git a/dma/patches/patch-dma.h b/dma/patches/patch-dma.h
new file mode 100644
index 0000000..f2aeef5
--- /dev/null
+++ b/dma/patches/patch-dma.h
@@ -0,0 +1,47 @@
+$NetBSD$
+
+Rename queue to dma_queue because the struct is already defined in SunOS.
+
+--- dma.h.orig	2016-02-07 12:41:49.000000000 +0000
++++ dma.h
+@@ -118,7 +118,7 @@ struct qitem {
+ };
+ LIST_HEAD(queueh, qitem);
+ 
+-struct queue {
++struct dma_queue {
+ 	struct queueh queue;
+ 	char *id;
+ 	FILE *mailf;
+@@ -205,16 +205,16 @@ int base64_decode(const char *, void *);
+ /* dma.c */
+ #define EXPAND_ADDR	1
+ #define EXPAND_WILDCARD	2
+-int add_recp(struct queue *, const char *, int);
+-void run_queue(struct queue *);
++int add_recp(struct dma_queue *, const char *, int);
++void run_queue(struct dma_queue *);
+ 
+ /* spool.c */
+-int newspoolf(struct queue *);
+-int linkspool(struct queue *);
+-int load_queue(struct queue *);
++int newspoolf(struct dma_queue *);
++int linkspool(struct dma_queue *);
++int load_queue(struct dma_queue *);
+ void delqueue(struct qitem *);
+ int acquirespool(struct qitem *);
+-void dropspool(struct queue *, struct qitem *);
++void dropspool(struct dma_queue *, struct qitem *);
+ int flushqueue_since(unsigned int);
+ int flushqueue_signal(void);
+ 
+@@ -223,7 +223,7 @@ int deliver_local(struct qitem *);
+ 
+ /* mail.c */
+ void bounce(struct qitem *, const char *);
+-int readmail(struct queue *, int, int);
++int readmail(struct dma_queue *, int, int);
+ 
+ /* util.c */
+ const char *hostname(void);
diff --git a/dma/patches/patch-dns.c b/dma/patches/patch-dns.c
new file mode 100644
index 0000000..4c87bd1
--- /dev/null
+++ b/dma/patches/patch-dns.c
@@ -0,0 +1,20 @@
+$NetBSD$
+
+Include sysmacros.h for roundup is required on SunOS.
+
+--- dns.c.orig	2016-02-07 12:41:49.000000000 +0000
++++ dns.c
+@@ -41,8 +41,13 @@
+ #include <netdb.h>
+ #include <resolv.h>
+ #include <string.h>
++#include <strings.h>
+ #include <stdlib.h>
+ 
++#if defined(__sun)
++#include <sys/sysmacros.h>
++#endif
++
+ #include "dma.h"
+ 
+ static int
diff --git a/dma/patches/patch-local.c b/dma/patches/patch-local.c
new file mode 100644
index 0000000..51761de
--- /dev/null
+++ b/dma/patches/patch-local.c
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Include strings.h for bzero and bcopy function.
+
+--- local.c.orig	2016-02-07 12:41:49.000000000 +0000
++++ local.c
+@@ -45,6 +45,7 @@
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <syslog.h>
++#include <strings.h>
+ #include <unistd.h>
+ 
+ #include "dma.h"
diff --git a/dma/patches/patch-mail.c b/dma/patches/patch-mail.c
new file mode 100644
index 0000000..9632411
--- /dev/null
+++ b/dma/patches/patch-mail.c
@@ -0,0 +1,42 @@
+$NetBSD$
+
+Rename queue to dma_queue because the struct is already defined in SunOS. 
+Include strings.h for bzero and bcopy function.
+
+--- mail.c.orig	2016-02-07 12:41:49.000000000 +0000
++++ mail.c
+@@ -36,6 +36,7 @@
+ #include <errno.h>
+ #include <inttypes.h>
+ #include <signal.h>
++#include <strings.h>
+ #include <syslog.h>
+ #include <unistd.h>
+ 
+@@ -44,7 +45,7 @@
+ void
+ bounce(struct qitem *it, const char *reason)
+ {
+-	struct queue bounceq;
++	struct dma_queue bounceq;
+ 	char line[1000];
+ 	size_t pos;
+ 	int error;
+@@ -160,7 +161,7 @@ struct parse_state {
+  * XXX local addresses will need treatment
+  */
+ static int
+-parse_addrs(struct parse_state *ps, char *s, struct queue *queue)
++parse_addrs(struct parse_state *ps, char *s, struct dma_queue *queue)
+ {
+ 	char *addr;
+ 
+@@ -342,7 +343,7 @@ newaddr:
+ }
+ 
+ int
+-readmail(struct queue *queue, int nodot, int recp_from_header)
++readmail(struct dma_queue *queue, int nodot, int recp_from_header)
+ {
+ 	struct parse_state parse_state;
+ 	char line[1000];	/* by RFC2822 */
diff --git a/dma/patches/patch-spool.c b/dma/patches/patch-spool.c
new file mode 100644
index 0000000..462981f
--- /dev/null
+++ b/dma/patches/patch-spool.c
@@ -0,0 +1,63 @@
+$NetBSD$
+
+Rename queue to dma_queue because the struct is already defined in SunOS. 
+
+--- spool.c.orig	2016-02-07 12:41:49.000000000 +0000
++++ spool.c
+@@ -46,6 +46,7 @@
+ #include <inttypes.h>
+ #include <unistd.h>
+ #include <syslog.h>
++#include <strings.h>
+ 
+ #include "dma.h"
+ 
+@@ -69,7 +70,7 @@
+  */
+ 
+ int
+-newspoolf(struct queue *queue)
++newspoolf(struct dma_queue *queue)
+ {
+ 	char fn[PATH_MAX+1];
+ 	struct stat st;
+@@ -151,10 +152,10 @@ writequeuef(struct qitem *it)
+ }
+ 
+ static struct qitem *
+-readqueuef(struct queue *queue, char *queuefn)
++readqueuef(struct dma_queue *queue, char *queuefn)
+ {
+ 	char line[1000];
+-	struct queue itmqueue;
++	struct dma_queue itmqueue;
+ 	FILE *queuef = NULL;
+ 	char *s;
+ 	char *queueid = NULL, *sender = NULL, *addr = NULL;
+@@ -229,7 +230,7 @@ out:
+ }
+ 
+ int
+-linkspool(struct queue *queue)
++linkspool(struct dma_queue *queue)
+ {
+ 	struct stat st;
+ 	struct qitem *it;
+@@ -276,7 +277,7 @@ delfiles:
+ }
+ 
+ int
+-load_queue(struct queue *queue)
++load_queue(struct dma_queue *queue)
+ {
+ 	struct stat sb;
+ 	struct qitem *it;
+@@ -382,7 +383,7 @@ fail:
+ }
+ 
+ void
+-dropspool(struct queue *queue, struct qitem *keep)
++dropspool(struct dma_queue *queue, struct qitem *keep)
+ {
+ 	struct qitem *it;
+ 


Home | Main Index | Thread Index | Old Index