From ab013632e4309adefa96ad5415c92a8ba94848c3 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Sun, 3 Aug 2014 17:25:59 +0200 Subject: [PATCH] postfix: revamp template - Use upstream permissions in $make_dirs - Enforce upstream permissions in .INSTALL - Add legacy symlink /usr/sbin/sendmail - Manpages are installed uncompressed - Keep /etc/postfix like upstream --- srcpkgs/postfix/INSTALL | 4 +--- srcpkgs/postfix/template | 39 ++++++++++++++++++--------------------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/srcpkgs/postfix/INSTALL b/srcpkgs/postfix/INSTALL index 4bdda64baad..2713167adf3 100644 --- a/srcpkgs/postfix/INSTALL +++ b/srcpkgs/postfix/INSTALL @@ -1,9 +1,7 @@ case "${ACTION}" in post) # set up correct permissions. - cd usr/sbin - chgrp postdrop postqueue postdrop - chmod g+s postqueue postdrop + postfix set-permissions # run newaliases. newaliases diff --git a/srcpkgs/postfix/template b/srcpkgs/postfix/template index b31f3c5b03b..cceb2ed2118 100644 --- a/srcpkgs/postfix/template +++ b/srcpkgs/postfix/template @@ -1,7 +1,7 @@ # Template file for 'postfix' pkgname=postfix version=2.11.1 -revision=3 +revision=4 short_desc="High-performance mail transport agent" maintainer="Juan RP " license="IBM Public License 1.0, BSD-alike" @@ -36,21 +36,21 @@ system_groups="postdrop" provides="smtp-server-0_1" replaces="smtp-server>=0" make_dirs=" - /var/lib/postfix 0750 postfix root - /var/spool/postfix/active 0750 postfix root - /var/spool/postfix/bounce 0750 postfix root - /var/spool/postfix/corrupt 0750 postfix root - /var/spool/postfix/defer 0750 postfix root - /var/spool/postfix/deferred 0750 postfix root - /var/spool/postfix/flush 0750 postfix root - /var/spool/postfix/hold 0750 postfix root - /var/spool/postfix/incoming 0750 postfix root - /var/spool/postfix/private 0750 postfix root - /var/spool/postfix/maildrop 0750 postfix postdrop - /var/spool/postfix/public 0750 postfix postdrop - /var/spool/postfix/pid 0750 root root - /var/spool/postfix/saved 0750 postfix root - /var/spool/postfix/trace 0750 postfix root" + /var/lib/postfix 0700 postfix root + /var/spool/postfix/active 0700 postfix root + /var/spool/postfix/bounce 0700 postfix root + /var/spool/postfix/corrupt 0700 postfix root + /var/spool/postfix/defer 0700 postfix root + /var/spool/postfix/deferred 0700 postfix root + /var/spool/postfix/flush 0700 postfix root + /var/spool/postfix/hold 0700 postfix root + /var/spool/postfix/incoming 0700 postfix root + /var/spool/postfix/private 0700 postfix root + /var/spool/postfix/maildrop 0730 postfix postdrop + /var/spool/postfix/public 0710 postfix postdrop + /var/spool/postfix/pid 0755 root root + /var/spool/postfix/saved 0700 postfix root + /var/spool/postfix/trace 0700 postfix root" do_build() { sed -e "s,\(/usr/include/db.h\),${XBPS_CROSS_BASE}/\1,g" -i makedefs @@ -90,18 +90,15 @@ pre_install() { do_install() { sh postfix-install -non-interactive install_root=${DESTDIR} + vmkdir usr/sbin + ln -s /usr/bin/sendmail ${DESTDIR}/usr/sbin/sendmail vinstall LICENSE 644 usr/share/licenses/${pkgname} vinstall TLS_LICENSE 644 usr/share/licenses/${pkgname} cd $DESTDIR - sed 's/\(^\$manpage[^:]*\):/\1.gz:/' -i usr/libexec/${pkgname}/postfix-files patch -p0 -i ${FILESDIR}/aliases.patch - # Remove unused stuff. - rm -f ${DESTDIR}/etc/postfix/*LICENSE - rm -f ${DESTDIR}/etc/postfix/*.default - # systemd. vinstall ${FILESDIR}/postfix.service 644 usr/lib/systemd/system }