pkgsrc-Changes archive

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

CVS commit: pkgsrc/mail/postfix



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Fri Oct 28 16:10:52 UTC 2016

Modified Files:
        pkgsrc/mail/postfix: Makefile Makefile.common

Log Message:
Make the postfix user/group names variables.


To generate a diff of this commit:
cvs rdiff -u -r1.292 -r1.293 pkgsrc/mail/postfix/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/mail/postfix/Makefile.common

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

Modified files:

Index: pkgsrc/mail/postfix/Makefile
diff -u pkgsrc/mail/postfix/Makefile:1.292 pkgsrc/mail/postfix/Makefile:1.293
--- pkgsrc/mail/postfix/Makefile:1.292  Sun Sep 18 17:10:28 2016
+++ pkgsrc/mail/postfix/Makefile        Fri Oct 28 16:10:51 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.292 2016/09/18 17:10:28 taca Exp $
+# $NetBSD: Makefile,v 1.293 2016/10/28 16:10:51 jperkin Exp $
 
 .include "../../mail/postfix/Makefile.common"
 
@@ -9,8 +9,8 @@ CONFLICTS+=     esmtp>=1.2 nullmailer-[0-9]*
 
 USE_TOOLS+=    perl
 
-SPECIAL_PERMS+=        sbin/postdrop postfix maildrop 2555
-SPECIAL_PERMS+=        sbin/postqueue postfix maildrop 2555
+SPECIAL_PERMS+=        sbin/postdrop ${POSTFIX_USER} ${MAILDROP_GROUP} 2555
+SPECIAL_PERMS+=        sbin/postqueue ${POSTFIX_USER} ${MAILDROP_GROUP} 2555
 
 REPLACE_PERL+= auxiliary/qshape/qshape.pl
 
@@ -31,13 +31,14 @@ PLIST_SRC+=         ${PKGDIR}/PLIST
 
 RCD_SCRIPTS=           postfix
 OWN_DIRS+=             ${POSTFIX_QUEUE_DIR} ${POSTFIX_QUEUE_DIR}/etc
-OWN_DIRS_PERMS+=       ${POSTFIX_DATA_DIR} postfix postfix 0700
+OWN_DIRS_PERMS+=       ${POSTFIX_DATA_DIR} ${POSTFIX_USER} ${POSTFIX_GROUP} 0700
 MAKE_DIRS+=            ${METADIR}/dynamicmaps.cf.d ${METADIR}/postfix-files.d
 
-PKG_GROUPS?=           postfix maildrop
-PKG_USERS?=            postfix:postfix
-PKG_GECOS.postfix=     Postfix User
-PKG_HOME.postfix=      ${POSTFIX_QUEUE_DIR}
+PKG_GROUPS?=           ${POSTFIX_GROUP} ${MAILDROP_GROUP}
+PKG_USERS?=            ${POSTFIX_USER}:${POSTFIX_GROUP}
+
+PKG_GECOS.${POSTFIX_USER}=     Postfix User
+PKG_HOME.${POSTFIX_USER}=      ${POSTFIX_QUEUE_DIR}
 
 CONF_FILES=            # empty
 .for i in main.cf master.cf

Index: pkgsrc/mail/postfix/Makefile.common
diff -u pkgsrc/mail/postfix/Makefile.common:1.4 pkgsrc/mail/postfix/Makefile.common:1.5
--- pkgsrc/mail/postfix/Makefile.common:1.4     Sun Oct  9 12:28:19 2016
+++ pkgsrc/mail/postfix/Makefile.common Fri Oct 28 16:10:51 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.4 2016/10/09 12:28:19 taca Exp $
+# $NetBSD: Makefile.common,v 1.5 2016/10/28 16:10:51 jperkin Exp $
 # used by mail/postfix/Makefile
 # used by mail/postfix/Makefile.module
 
@@ -22,6 +22,10 @@ CHECK_HEADERS_SKIP+= src/global/mail_par
 
 .include "../../mk/bsd.prefs.mk"
 
+POSTFIX_USER?=         postfix
+POSTFIX_GROUP?=                postfix
+MAILDROP_GROUP?=       maildrop
+
 # POSTFIX_QUEUE_DIR is the default queue directory for Postfix.  This is
 # merely a default, and may be changed by setting "queue_directory" in
 # ${PKG_SYSCONFDIR}/main.cf.
@@ -84,7 +88,9 @@ SUBST_SED.postfix+=   \
 SUBST_SED.postfix+=    \
        -e 's|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|'
 SUBST_SED.postfix+=    \
-       -e 's|^\(setgid_group\) =.*|\1 = maildrop|'
+       -e 's|^\(mail_owner\) =.*|\1 = ${POSTFIX_USER}|'
+SUBST_SED.postfix+=    \
+       -e 's|^\(setgid_group\) =.*|\1 = ${MAILDROP_GROUP}|'
 SUBST_SED.postfix+=    \
        -e 's|^\(manpage_directory\) =.*|\1 = ${PREFIX}/${PKGMANDIR}|'
 SUBST_SED.postfix+=    \
@@ -92,7 +98,9 @@ SUBST_SED.postfix+=   \
 SUBST_SED.postfix+=    \
        -e 's|^\(readme_directory\) =.*|\1 = ${DOCDIR}|'
 SUBST_SED.postfix+=    \
-       -e '/^\#define DEF_SGID_GROUP[  ]/s,postdrop,maildrop,g'
+       -e '/^\#define DEF_MAIL_OWNER[  ]/s,postfix,${POSTFIX_USER},g'
+SUBST_SED.postfix+=    \
+       -e '/^\#define DEF_SGID_GROUP[  ]/s,postdrop,${MAILDROP_GROUP},g'
 
 PKG_SYSCONFSUBDIR=     postfix
 LIBEXECDIR=            ${PREFIX}/libexec/postfix



Home | Main Index | Thread Index | Old Index