[arch-commits] Commit in postfix/trunk (PKGBUILD install)

Gaetan Bisson bisson at archlinux.org
Thu Mar 19 21:00:40 UTC 2015


    Date: Thursday, March 19, 2015 @ 22:00:40
  Author: bisson
Revision: 234173

fix FS#43823 and FS#43646

Modified:
  postfix/trunk/PKGBUILD
  postfix/trunk/install

----------+
 PKGBUILD |   24 ++++++++++++++++++++----
 install  |    7 +++++--
 2 files changed, 25 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-03-19 19:37:23 UTC (rev 234172)
+++ PKGBUILD	2015-03-19 21:00:40 UTC (rev 234173)
@@ -5,7 +5,7 @@
 
 pkgname=postfix
 pkgver=3.0.0
-pkgrel=2
+pkgrel=3
 url='http://www.postfix.org/'
 pkgdesc='Fast, easy to administer, secure mail server'
 license=('custom')
@@ -39,10 +39,9 @@
                 -DHAS_SQLITE
                 -DHAS_CDB
                 -DDEF_COMMAND_DIR=\"/usr/bin\"
-                -DDEF_DAEMON_DIR=\"/usr/lib/postfix\"
+                -DDEF_DAEMON_DIR=\"/usr/lib/postfix/bin\"
                 -DDEF_SENDMAIL_PATH=\"/usr/bin/sendmail\"
                 -DDEF_README_DIR=\"/usr/share/doc/postfix\"
-                -DDEF_SAMPLE_DIR=\"/etc/postfix/sample\"
                 -DDEF_MANPAGE_DIR=\"/usr/share/man\"
         '
 	AUXLIBS='
@@ -67,7 +66,8 @@
 package() {
 	cd "${srcdir}/postfix-${pkgver}"
 
-        LD_PRELOAD= LD_LIBRARY_PATH=./lib \
+	sed 's:bin/postconf -dhx:bin/postconf -c conf -dhx:g' -i postfix-install
+	LD_LIBRARY_PATH=lib:$LD_LIBRARY_PATH \
 	sh postfix-install -non-interactive install_root="${pkgdir}"
 
 	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
@@ -78,7 +78,23 @@
 		install -Dm755 "bin/${name}" "${pkgdir}/usr/bin/${name}"
 	done
 
+	# now set permissions right to appease the pacman gods
+	sed -r \
+		-e '/override=1/d' \
+		-e '/absolute path name/d' \
+		-e 's/\$POSTCONF -/$POSTCONF -c .\/etc\/postfix -/g' \
+		-e '/(if \[|chmod|chown|find|mkdir|test)/s/\$path/.\/$path/g' \
+		libexec/post-install > ../arch-post-install
 	cd "${pkgdir}"
+	LD_LIBRARY_PATH=usr/lib/postfix:$LD_LIBRARY_PATH \
+	sh "${srcdir}/arch-post-install" \
+                command_directory=usr/bin \
+                config_directory=etc/postfix \
+                meta_directory=etc/postfix \
+                setgid_group=75 \
+                mail_owner=73 \
+                set-permissions
+
 	patch -p0 -i "${srcdir}"/aliases.patch
 	sed 's/^\(\$manpage[^:]*\):/\1.gz:/' -i "etc/postfix/postfix-files"
 }

Modified: install
===================================================================
--- install	2015-03-19 19:37:23 UTC (rev 234172)
+++ install	2015-03-19 21:00:40 UTC (rev 234173)
@@ -1,6 +1,9 @@
 post_upgrade() {
-	/usr/lib/postfix/post-install meta_directory=/etc/postfix daemon_directory=/usr/lib/postfix command_directory=/usr/bin upgrade-package
-	chown postfix var/lib/postfix
+	if [[ $(vercmp $2 3.0.0-3) -eq -1 ]]; then
+		echo '==> The postfix daemon binaries have moved.'
+		echo '==> Please restart postfix as soon as possible.'
+	fi
+	/usr/lib/postfix/bin/post-install command_directory=/usr/bin meta_directory=/etc/postfix upgrade-configuration
 }
 
 post_install() {



More information about the arch-commits mailing list