From df64c67bba9692bb3a3322756aee0754a7082bc8 Mon Sep 17 00:00:00 2001 From: Olli Hauer Date: Sun, 9 Nov 2014 18:21:23 +0000 Subject: [PATCH] - sort OPTIONS_DEFINE - fix build and install for non root users, (sgid and group for sbin/postdrop and sbin/postqueue was lost if build as non root and installed with sudo) - install /var/spool/postfix directories with correct owner/mode - use $WRKDIR instead of /tmp Approved by: sahil (implicit) --- mail/postfix/Makefile | 7 ++++--- mail/postfix/pkg-plist | 36 ++++++++++++++++++++---------------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile index 122b8fe9cd50..4df213004bff 100644 --- a/mail/postfix/Makefile +++ b/mail/postfix/Makefile @@ -3,6 +3,7 @@ PORTNAME= postfix PORTVERSION= 2.11.3 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \ @@ -38,8 +39,8 @@ USE_SUBMAKE= yes USE_PERL5= build SCRIPTS_ENV+= POSTFIX_DEFAULT_MTA="${POSTFIX_DEFAULT_MTA}" -OPTIONS_DEFINE= PCRE SASL2 TLS BDB MYSQL PGSQL SQLITE OPENLDAP LDAP_SASL \ - CDB NIS VDA TEST SPF INST_BASE LMDB DOCS +OPTIONS_DEFINE= BDB CDB DOCS INST_BASE LDAP_SASL LMDB MYSQL NIS \ + OPENLDAP PCRE PGSQL SASL2 SPF SQLITE TEST TLS VDA OPTIONS_RADIO= RG1 RG2 OPTIONS_RADIO_RG1= DOVECOT DOVECOT2 @@ -332,7 +333,7 @@ pre-install: .endif do-install: - @(cd ${WRKSRC} && ${SH} postfix-install -non-interactive install_root=${STAGEDIR} tempdir=/tmp \ + @(cd ${WRKSRC} && ${SH} postfix-install -non-interactive install_root=${STAGEDIR} tempdir=${WRKDIR} \ config_directory=${ETCDIR} \ command_directory=${PREFIX}/sbin \ daemon_directory=${DAEMONDIR} \ diff --git a/mail/postfix/pkg-plist b/mail/postfix/pkg-plist index 2e64bb964b83..1dd324f562f4 100644 --- a/mail/postfix/pkg-plist +++ b/mail/postfix/pkg-plist @@ -127,32 +127,36 @@ libexec/postfix/virtual sbin/postalias sbin/postcat sbin/postconf -sbin/postdrop sbin/postfix sbin/postkick sbin/postlock sbin/postlog sbin/postmap sbin/postmulti +@group maildrop +@mode 2755 +sbin/postdrop sbin/postqueue +@group +@mode sbin/postsuper sbin/sendmail @dir /var/db/postfix -@dir /var/spool/postfix/active -@dir /var/spool/postfix/bounce -@dir /var/spool/postfix/corrupt -@dir /var/spool/postfix/defer -@dir /var/spool/postfix/deferred -@dir /var/spool/postfix/flush -@dir /var/spool/postfix/hold -@dir /var/spool/postfix/incoming -@dir /var/spool/postfix/maildrop -@dir /var/spool/postfix/pid -@dir /var/spool/postfix/private -@dir /var/spool/postfix/public -@dir /var/spool/postfix/saved -@dir /var/spool/postfix/trace -@dir /var/spool/postfix +@dir(postfix,,700) /var/spool/postfix/active +@dir(postfix,,700) /var/spool/postfix/bounce +@dir(postfix,,700) /var/spool/postfix/corrupt +@dir(postfix,,700) /var/spool/postfix/defer +@dir(postfix,,700) /var/spool/postfix/deferred +@dir(postfix,,700) /var/spool/postfix/flush +@dir(postfix,,700) /var/spool/postfix/hold +@dir(postfix,,700) /var/spool/postfix/incoming +@dir(postfix,maildrop,730) /var/spool/postfix/maildrop +@dir(,postfix,755) /var/spool/postfix/pid +@dir(postfix,,700) /var/spool/postfix/private +@dir(postfix,maildrop,710) /var/spool/postfix/public +@dir(postfix,,700) /var/spool/postfix/saved +@dir(postfix,,700) /var/spool/postfix/trace +@dir(postfix,postfix,700) /var/spool/postfix %%BASE%%@cwd / @dir etc/postfix @cwd %%RESETPREFIX%%