diff options
author | schmonz <schmonz@pkgsrc.org> | 2017-04-04 07:46:14 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2017-04-04 07:46:14 +0000 |
commit | 8a9bac381b4c11e3e05a678c648b633c8f946306 (patch) | |
tree | 177dafef84734e26a5e5277ee115cdd54f16ac23 /mail | |
parent | 95c406e26a36c1804a455782215a0ea3ae89e333 (diff) | |
download | pkgsrc-8a9bac381b4c11e3e05a678c648b633c8f946306.tar.gz |
Substitute configured qmail users. Bump PKGREVISION.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/queue-fix/Makefile | 21 | ||||
-rw-r--r-- | mail/queue-fix/distinfo | 3 | ||||
-rw-r--r-- | mail/queue-fix/patches/patch-queue-fix.c | 35 |
3 files changed, 56 insertions, 3 deletions
diff --git a/mail/queue-fix/Makefile b/mail/queue-fix/Makefile index ac764945cf8..4a3e7c59c79 100644 --- a/mail/queue-fix/Makefile +++ b/mail/queue-fix/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.9 2012/10/08 12:19:29 asau Exp $ +# $NetBSD: Makefile,v 1.10 2017/04/04 07:46:14 schmonz Exp $ # DISTNAME= queue-fix-1.4 +PKGREVISION= 1 CATEGORIES= mail MASTER_SITES= ${HOMEPAGE} @@ -13,9 +14,25 @@ INSTALLATION_DIRS= bin DJB_RESTRICTED= NO +SUBST_CLASSES+= groups +SUBST_STAGE.groups= do-configure +SUBST_FILES.groups= queue-fix.c +SUBST_SED.groups= -e 's,@QMAIL_QMAIL_GROUP@,${QMAIL_QMAIL_GROUP:Q},g' + +SUBST_CLASSES+= users +SUBST_STAGE.users= do-configure +SUBST_FILES.users= queue-fix.c +SUBST_SED.users+= -e 's,@QMAIL_QUEUE_USER@,${QMAIL_QUEUE_USER:Q},g' +SUBST_SED.users+= -e 's,@QMAIL_REMOTE_USER@,${QMAIL_REMOTE_USER:Q},g' +SUBST_SED.users+= -e 's,@QMAIL_SEND_USER@,${QMAIL_SEND_USER:Q},g' + +BUILD_DEFS+= QMAIL_QUEUE_USER QMAIL_REMOTE_USER QMAIL_SEND_USER +BUILD_DEFS+= QMAIL_QMAIL_GROUP + +INSTALLATION_DIRS+= share/doc/queue-fix + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/queue-fix ${DESTDIR}${PREFIX}/bin - ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/queue-fix ${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/queue-fix .include "../../mk/djbware.mk" diff --git a/mail/queue-fix/distinfo b/mail/queue-fix/distinfo index d2f3c1a1133..c75eae758fc 100644 --- a/mail/queue-fix/distinfo +++ b/mail/queue-fix/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.4 2015/11/03 23:27:18 agc Exp $ +$NetBSD: distinfo,v 1.5 2017/04/04 07:46:14 schmonz Exp $ SHA1 (queue-fix-1.4.tar.gz) = ce42fcc4daf5076adcf8fea6a9a84f2e1716c67c RMD160 (queue-fix-1.4.tar.gz) = 7babeb21844214779dc58b96129ab0ee555393f8 SHA512 (queue-fix-1.4.tar.gz) = b7e0ac070a409eff156b3803cc1bb78d1c800ae685d107b872bf5b022a8645d1ca55a5c3380f6bc82e99927df8dbf586b74af587e882938b9a7678b506c600e0 Size (queue-fix-1.4.tar.gz) = 18486 bytes +SHA1 (patch-queue-fix.c) = 0967151617cf39cc5d88362ae0ed839a947d85f8 diff --git a/mail/queue-fix/patches/patch-queue-fix.c b/mail/queue-fix/patches/patch-queue-fix.c new file mode 100644 index 00000000000..4426c69b38b --- /dev/null +++ b/mail/queue-fix/patches/patch-queue-fix.c @@ -0,0 +1,35 @@ +$NetBSD: patch-queue-fix.c,v 1.1 2017/04/04 07:46:14 schmonz Exp $ + +Configure qmail users and groups at build time. + +--- queue-fix.c.orig 1999-03-14 19:54:50.000000000 +0000 ++++ queue-fix.c +@@ -729,20 +729,20 @@ struct group * gr; + } + + /*prepare the uid and gid*/ +- pw = getpwnam("qmailq"); +- if(!pw) die_user("qmailq"); ++ pw = getpwnam("@QMAIL_QUEUE_USER@"); ++ if(!pw) die_user("@QMAIL_QUEUE_USER@"); + qmailq_uid = pw->pw_uid; + +- pw = getpwnam("qmails"); +- if(!pw) die_user("qmails"); ++ pw = getpwnam("@QMAIL_SEND_USER@"); ++ if(!pw) die_user("@QMAIL_SEND_USER@"); + qmails_uid = pw->pw_uid; + +- pw = getpwnam("qmailr"); +- if(!pw) die_user("qmailr"); ++ pw = getpwnam("@QMAIL_REMOTE_USER@"); ++ if(!pw) die_user("@QMAIL_REMOTE_USER@"); + qmailr_uid = pw->pw_uid; + +- gr = getgrnam("qmail"); +- if(!gr) die_group("qmail"); ++ gr = getgrnam("@QMAIL_QMAIL_GROUP@"); ++ if(!gr) die_group("@QMAIL_QMAIL_GROUP@"); + qmail_gid = gr->gr_gid; + + /*check that all the proper directories exist with proper credentials*/ |