pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/qmail Substitute configured qmail users and group...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/60bdf964fae3
branches:  trunk
changeset: 360577:60bdf964fae3
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Tue Apr 04 07:50:18 2017 +0000

description:
Substitute configured qmail users and groups (defaults haven't changed).
Bump dependency on queue-fix to a version that does likewise.
Bump PKGREVISION.

diffstat:

 mail/qmail/Makefile                   |  58 ++++++++++++++++++++++++++++------
 mail/qmail/distinfo                   |   6 +-
 mail/qmail/options.mk                 |   4 +-
 mail/qmail/patches/patch-auto__uids.c |  24 +++++++-------
 mail/qmail/patches/patch-auto__uids.h |   6 +-
 5 files changed, 67 insertions(+), 31 deletions(-)

diffs (222 lines):

diff -r 2a3e0efcbc40 -r 60bdf964fae3 mail/qmail/Makefile
--- a/mail/qmail/Makefile       Tue Apr 04 07:46:20 2017 +0000
+++ b/mail/qmail/Makefile       Tue Apr 04 07:50:18 2017 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.81 2017/03/31 13:52:00 schmonz Exp $
+# $NetBSD: Makefile,v 1.82 2017/04/04 07:50:18 schmonz Exp $
 #
 
 DISTNAME=              ${PKGNAME_NOREV}
 PKGNAME=               qmail-1.03
-PKGREVISION=           25
+PKGREVISION=           26
 CATEGORIES=            mail
 MASTER_SITES=          http://qmail.org/
 
@@ -14,7 +14,7 @@
 
 DEPENDS+=              checkpassword-[0-9]*:../../sysutils/checkpassword
 DEPENDS+=              daemontools-[0-9]*:../../sysutils/daemontools
-DEPENDS+=              queue-fix-[0-9]*:../../mail/queue-fix
+DEPENDS+=              queue-fix>=1.4nb1:../../mail/queue-fix
 DEPENDS+=              ucspi-tcp-[0-9]*:../../net/ucspi-tcp
 
 CONFLICTS+=            courier-maildirmake-[0-9]*
@@ -29,6 +29,16 @@
 USE_TOOLS+=            nroff
 
 DJB_CONFIG_CMDS=       ${ECHO} ${DESTDIR:Q}${QMAILDIR:Q} > conf-destdir;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_ALIAS_USER:Q}     > conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_DAEMON_USER:Q}   >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_LOG_USER:Q}      >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_ROOT_USER:Q}     >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_PASSWD_USER:Q}   >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_QUEUE_USER:Q}    >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_REMOTE_USER:Q}   >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_SEND_USER:Q}     >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_QMAIL_GROUP:Q}    > conf-groups;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_NOFILES_GROUP:Q} >> conf-groups;
 DJB_BUILD_TARGETS=     man
 INSTALL_TARGET=                setup
 DJB_RESTRICTED=                no
@@ -66,6 +76,10 @@
 .include "../../mk/bsd.prefs.mk"
 
 BUILD_DEFS+=           QMAILDIR QMAIL_QUEUE_DIR QMAIL_QUEUE_EXTRA
+BUILD_DEFS+=           QMAIL_ALIAS_USER QMAIL_DAEMON_USER QMAIL_LOG_USER
+BUILD_DEFS+=           QMAIL_ROOT_USER QMAIL_PASSWD_USER QMAIL_QUEUE_USER
+BUILD_DEFS+=           QMAIL_REMOTE_USER QMAIL_SEND_USER
+BUILD_DEFS+=           QMAIL_QMAIL_GROUP QMAIL_NOFILES_GROUP
 
 .if !empty(QMAIL_QUEUE_DIR:M${QMAILDIR}/*)
 PKG_FAIL_REASON+=      "QMAIL_QUEUE_DIR must not be under ${QMAILDIR}"
@@ -101,6 +115,12 @@
 SUBST_SED.destdir=     -e 's|\(^load inst.*\.o\) auto_qmail\.o\(.*\)|\1 auto_destdir.o\2|g'
 SUBST_SED.destdir+=    -e 's|\(^       \./load inst.*\) auto_qmail\.o\(.*\)|\1 auto_destdir.o\2|g'
 
+SUBST_CLASSES+=                groups
+SUBST_STAGE.groups=    do-configure
+SUBST_FILES.groups=    auto_uids.c
+SUBST_SED.groups=      -e 's,@QMAIL_QMAIL_GROUP@,${QMAIL_QMAIL_GROUP:Q},g'
+SUBST_SED.groups+=     -e 's,@QMAIL_NOFILES_GROUP@,${QMAIL_NOFILES_GROUP:Q},g'
+
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     do-configure
 SUBST_FILES.paths=     README.pkgsrc
@@ -108,26 +128,42 @@
 SUBST_SED.paths+=      -e 's,@PKG_INFO@,${PKG_INFO:Q},g'
 SUBST_SED.paths+=      -e 's,@GREP@,${GREP:Q},g'
 
+SUBST_CLASSES+=                users
+SUBST_STAGE.users=     do-configure
+SUBST_FILES.users=     auto_uids.c
+SUBST_SED.users=       -e 's,@QMAIL_ROOT_USER@,${QMAIL_ROOT_USER:Q},g'
+SUBST_SED.users+=      -e 's,@QMAIL_ALIAS_USER@,${QMAIL_ALIAS_USER:Q},g'
+SUBST_SED.users+=      -e 's,@QMAIL_DAEMON_USER@,${QMAIL_DAEMON_USER:Q},g'
+SUBST_SED.users+=      -e 's,@QMAIL_LOG_USER@,${QMAIL_LOG_USER:Q},g'
+SUBST_SED.users+=      -e 's,@QMAIL_PASSWD_USER@,${QMAIL_PASSWD_USER:Q},g'
+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'
+
 SUBST_FILES.djbware+=  cdb_seek.c dns.c
 
-PKG_GROUPS=            qmail nofiles
-PKG_USERS+=            alias:nofiles
-PKG_USERS+=            qmaill:nofiles qmaild:nofiles qmailp:nofiles
-PKG_USERS+=            qmailq:qmail qmailr:qmail qmails:qmail
+PKG_GROUPS=            ${QMAIL_QMAIL_GROUP} ${QMAIL_NOFILES_GROUP}
+PKG_USERS+=            ${QMAIL_ALIAS_USER}:${QMAIL_NOFILES_GROUP}
+PKG_USERS+=            ${QMAIL_DAEMON_USER}:${QMAIL_NOFILES_GROUP}
+PKG_USERS+=            ${QMAIL_LOG_USER}:${QMAIL_NOFILES_GROUP}
+PKG_USERS+=            ${QMAIL_PASSWD_USER}:${QMAIL_NOFILES_GROUP}
+PKG_USERS+=            ${QMAIL_QUEUE_USER}:${QMAIL_QMAIL_GROUP}
+PKG_USERS+=            ${QMAIL_REMOTE_USER}:${QMAIL_QMAIL_GROUP}
+PKG_USERS+=            ${QMAIL_SEND_USER}:${QMAIL_QMAIL_GROUP}
 .for user in ${PKG_USERS:C/\:.*//}
 PKG_HOME.${user}=      ${QMAILDIR}
 .endfor
 PKG_HOME.alias=                ${QMAILDIR}/alias
 
-SPECIAL_PERMS+=                ${PREFIX}/bin/qmail-queue qmailq qmail 04711
+SPECIAL_PERMS+=                ${PREFIX}/bin/qmail-queue ${QMAIL_QUEUE_USER} ${QMAIL_QMAIL_GROUP} 04711
 .for f in qmail-inject qmail-pop3d qmail-qmqpc qmail-qmqpd qmail-qmtpd qmail-qread qmail-qstat qmail-showctl qmail-smtpd qmail-tcpok qmail-tcpto
-SPECIAL_PERMS+=                ${PREFIX}/bin/${f} root qmail 0755
+SPECIAL_PERMS+=                ${PREFIX}/bin/${f} ${QMAIL_ROOT_USER} ${QMAIL_QMAIL_GROUP} 0755
 .endfor
 .for f in qmail-clean qmail-getpw qmail-local qmail-popup qmail-pw2u qmail-remote qmail-rspawn qmail-send splogger
-SPECIAL_PERMS+=                ${PREFIX}/bin/${f} root qmail 0711
+SPECIAL_PERMS+=                ${PREFIX}/bin/${f} ${QMAIL_ROOT_USER} ${QMAIL_QMAIL_GROUP} 0711
 .endfor
 .for f in qmail-lspawn qmail-newmrh qmail-newu qmail-start
-SPECIAL_PERMS+=                ${PREFIX}/bin/${f} root qmail 0700
+SPECIAL_PERMS+=                ${PREFIX}/bin/${f} ${QMAIL_ROOT_USER} ${QMAIL_QMAIL_GROUP} 0700
 .endfor
 
 OPSYSVARS+=            DARWINSUFX
diff -r 2a3e0efcbc40 -r 60bdf964fae3 mail/qmail/distinfo
--- a/mail/qmail/distinfo       Tue Apr 04 07:46:20 2017 +0000
+++ b/mail/qmail/distinfo       Tue Apr 04 07:50:18 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.32 2017/03/31 13:52:00 schmonz Exp $
+$NetBSD: distinfo,v 1.33 2017/04/04 07:50:18 schmonz Exp $
 
 SHA1 (qmail-1.03.tar.gz) = 18fb960481291a0503e93a94df3f6094edb7f27a
 RMD160 (qmail-1.03.tar.gz) = b851f273f1d365d38efd949b1efcf35768ffa30f
@@ -53,8 +53,8 @@
 SHA512 (qmail-srs-0.8.patch) = a2a6c26a02d1c607f4ed4f73d6c8b57ed6a6c31126f20b073e9cd2258ca43c0da98a67de254df30e07e3887c90239cba0ccf3f45d535f4c66017217da1732f9b
 Size (qmail-srs-0.8.patch) = 25412 bytes
 SHA1 (patch-Makefile) = 7ab7c2893393f42d8587a14a2d0c86c09e60061a
-SHA1 (patch-auto__uids.c) = f900b61e047eb8776e5ff2e0381f2a53d49fafad
-SHA1 (patch-auto__uids.h) = 5041dc91e51fc8413c0bf5e83c3d6b423f71cf86
+SHA1 (patch-auto__uids.c) = df4e83de90bfe7845d5e12abd4309258e4eb36b1
+SHA1 (patch-auto__uids.h) = f38c649b05e5540e6e1035edca8b9ac980d9af0b
 SHA1 (patch-hier.c) = 7578a0977f168e337748773d63e57504bf7bf075
 SHA1 (patch-pkgsrc__user__destdir__fake__chown.c) = 3897b81327ca5c59503199d08dd6ed5cdc6a531a
 SHA1 (patch-pkgsrc__user__destdir__fake__uids.h) = 139f6cf38c1b928265a16bd3335b8ce6d7563f96
diff -r 2a3e0efcbc40 -r 60bdf964fae3 mail/qmail/options.mk
--- a/mail/qmail/options.mk     Tue Apr 04 07:46:20 2017 +0000
+++ b/mail/qmail/options.mk     Tue Apr 04 07:50:18 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.39 2017/03/31 13:52:00 schmonz Exp $
+# $NetBSD: options.mk,v 1.40 2017/04/04 07:50:18 schmonz Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.qmail
 PKG_OPTIONS_OPTIONAL_GROUPS=   rcpt
@@ -71,7 +71,7 @@
 SUBST_STAGE.srsreadme= do-configure
 SUBST_FILES.srsreadme= README.srs
 SUBST_SED.srsreadme=   -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR:Q},g'
-SPECIAL_PERMS+=                ${PREFIX}/bin/srsfilter root qmail 0755
+SPECIAL_PERMS+=                ${PREFIX}/bin/srsfilter ${QMAIL_ROOT_USER} ${QMAIL_QMAIL_GROUP} 0755
 PLIST.srs=             yes
 MESSAGE_SRC+=          ${PKGDIR}/MESSAGE.srs
 post-extract-srs:
diff -r 2a3e0efcbc40 -r 60bdf964fae3 mail/qmail/patches/patch-auto__uids.c
--- a/mail/qmail/patches/patch-auto__uids.c     Tue Apr 04 07:46:20 2017 +0000
+++ b/mail/qmail/patches/patch-auto__uids.c     Tue Apr 04 07:50:18 2017 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-auto__uids.c,v 1.1 2017/03/10 03:13:29 schmonz Exp $
+$NetBSD: patch-auto__uids.c,v 1.2 2017/04/04 07:50:18 schmonz Exp $
 
 Look up user/group IDs at runtime. Based on Paul Fox's getpwnam.patch.
 
---- auto_uids.c.orig   2017-03-10 01:13:38.000000000 +0000
+--- auto_uids.c.orig   2017-04-04 06:28:23.000000000 +0000
 +++ auto_uids.c
 @@ -0,0 +1,52 @@
 +#include <pwd.h>
@@ -43,16 +43,16 @@
 +  if (ids[id] >= 0) return ids[id];
 +
 +  switch(id) {
-+  case ID_OWNER:   ids[id] = name2uid("root"); break;
-+  case ID_ALIAS:   ids[id] = name2uid("alias"); break;
-+  case ID_DAEMON:  ids[id] = name2uid("qmaild"); break;
-+  case ID_LOG:     ids[id] = name2uid("qmaill"); break;
-+  case ID_PW:      ids[id] = name2uid("qmailp"); break;
-+  case ID_QUEUE:   ids[id] = name2uid("qmailq"); break;
-+  case ID_REMOTE:  ids[id] = name2uid("qmailr"); break;
-+  case ID_SEND:    ids[id] = name2uid("qmails"); break;
-+  case ID_QMAIL:   ids[id] = name2gid("qmail"); break;
-+  case ID_NOFILES: ids[id] = name2gid("nofiles"); break;
++  case ID_OWNER:   ids[id] = name2uid("@QMAIL_ROOT_USER@"); break;
++  case ID_ALIAS:   ids[id] = name2uid("@QMAIL_ALIAS_USER@"); break;
++  case ID_DAEMON:  ids[id] = name2uid("@QMAIL_DAEMON_USER@"); break;
++  case ID_LOG:     ids[id] = name2uid("@QMAIL_LOG_USER@"); break;
++  case ID_PASSWD:  ids[id] = name2uid("@QMAIL_PASSWD_USER@"); break;
++  case ID_QUEUE:   ids[id] = name2uid("@QMAIL_QUEUE_USER@"); break;
++  case ID_REMOTE:  ids[id] = name2uid("@QMAIL_REMOTE_USER@"); break;
++  case ID_SEND:    ids[id] = name2uid("@QMAIL_SEND_USER@"); break;
++  case ID_QMAIL:   ids[id] = name2gid("@QMAIL_QMAIL_GROUP@"); break;
++  case ID_NOFILES: ids[id] = name2gid("@QMAIL_NOFILES_GROUP@"); break;
 +  default: _exit(113);
 +  }
 +  return ids[id];
diff -r 2a3e0efcbc40 -r 60bdf964fae3 mail/qmail/patches/patch-auto__uids.h
--- a/mail/qmail/patches/patch-auto__uids.h     Tue Apr 04 07:46:20 2017 +0000
+++ b/mail/qmail/patches/patch-auto__uids.h     Tue Apr 04 07:50:18 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-auto__uids.h,v 1.1 2017/03/10 03:13:29 schmonz Exp $
+$NetBSD: patch-auto__uids.h,v 1.2 2017/04/04 07:50:18 schmonz Exp $
 
 Look up user/group IDs at runtime. Based on Paul Fox's getpwnam.patch.
 
@@ -20,7 +20,7 @@
 +#define ID_ALIAS   1
 +#define ID_DAEMON  2
 +#define ID_LOG     3
-+#define ID_PW      4
++#define ID_PASSWD  4
 +#define ID_QUEUE   5
 +#define ID_REMOTE  6
 +#define ID_SEND    7
@@ -33,7 +33,7 @@
 +#define auto_uida qm_id(ID_ALIAS)
 +#define auto_uidd qm_id(ID_DAEMON)
 +#define auto_uidl qm_id(ID_LOG)
-+#define auto_uidp qm_id(ID_PW)
++#define auto_uidp qm_id(ID_PASSWD)
 +#define auto_uidq qm_id(ID_QUEUE)
 +#define auto_uidr qm_id(ID_REMOTE)
 +#define auto_uids qm_id(ID_SEND)



Home | Main Index | Thread Index | Old Index