Mail archive
alpine-aports

[alpine-aports] [PATCH] main/opensmtpd: fix mail spool path, other fixes

From: Valery Kartel <valery.kartel_at_gmail.com>
Date: Mon, 24 Apr 2017 15:24:54 +0300

/var/mail is used from /usr/include/paths.h if not set,
So set --with-path-mbox=/var/spool/mail to fix spoll path
from /var/mail to /var/spool/mail.

change libexec prefix --libexecdir=/usr/lib. So now full path
is /usr/lib/opensmtpd, not /usr/lib/opensmtpd/opensmtpd

remove post-install script. There is no need to run 'newaliases' because
in default config aliases table use file: driver, not db: driver

remove empty /usr/bin directory

in init-script explictly set 'name' and 'command' variables to not
be dependent on script name.
---
 main/opensmtpd/APKBUILD               | 8 +++++---
 main/opensmtpd/opensmtpd.post-install | 4 ----
 main/opensmtpd/smtpd.initd            | 4 ++--
 3 files changed, 7 insertions(+), 9 deletions(-)
 delete mode 100644 main/opensmtpd/opensmtpd.post-install
diff --git a/main/opensmtpd/APKBUILD b/main/opensmtpd/APKBUILD
index cea226a2de..293442778b 100644
--- a/main/opensmtpd/APKBUILD
+++ b/main/opensmtpd/APKBUILD
_at_@ -4,7 +4,7 @@
 # Maintainer: Jonathan Curran <jonathan_at_curran.in>
 pkgname=opensmtpd
 pkgver=6.0.2p1
-pkgrel=2
+pkgrel=3
 pkgdesc="secure, reliable, lean, and easy-to configure SMTP server"
 url="http://www.opensmtpd.org"
 arch="all"
_at_@ -12,7 +12,7 @@ license="ISC"
 depends=""
 makedepends="automake autoconf libtool mdocml db-dev libasr-dev libevent-dev
 	fts-dev zlib-dev libressl-dev bison flex-dev"
-install="$pkgname.pre-install $pkgname.post-install"
+install="$pkgname.pre-install"
 subpackages="$pkgname-doc"
 source="https://www.opensmtpd.org/archives/${pkgname}-${pkgver}.tar.gz
 	smtpd.initd
_at_@ -31,7 +31,8 @@ build() {
 		--sysconfdir=/etc/smtpd \
 		--with-libssl=/usr/include/openssl \
 		--mandir=/usr/share/man \
-		--libexecdir=/usr/lib/$pkgname \
+		--libexecdir=/usr/lib \
+		--with-path-mbox=/var/spool/mail \
 		--with-table-db \
 		--with-user-queue=smtpq \
 		--with-group-queue=smtpq \
_at_@ -55,6 +56,7 @@ package() {
 	for binary in mailq newaliases makemap sendmail; do
 		ln -s /usr/sbin/smtpctl "$pkgdir"/usr/sbin/$binary || return 1
 	done
+	rmdir "$pkgdir"/usr/bin
 }
 
 sha512sums="1e4275795dd2c43174ffa268398a0d9864ce4cb7d370330f7b8c55a9b40e757616bbd280919a409ebde403769e3dea62047857dc2ff98d7ecce660b459c7ff1c  opensmtpd-6.0.2p1.tar.gz
diff --git a/main/opensmtpd/opensmtpd.post-install b/main/opensmtpd/opensmtpd.post-install
deleted file mode 100644
index 7d87fae4b3..0000000000
--- a/main/opensmtpd/opensmtpd.post-install
+++ /dev/null
_at_@ -1,4 +0,0 @@
-#!/bin/sh
-
-/usr/sbin/newaliases
-exit 0
diff --git a/main/opensmtpd/smtpd.initd b/main/opensmtpd/smtpd.initd
index ad6f05dd45..566bc8ea77 100644
--- a/main/opensmtpd/smtpd.initd
+++ b/main/opensmtpd/smtpd.initd
_at_@ -1,7 +1,7 @@
 #!/sbin/openrc-run
 
-name="$RC_SVCNAME"
-command="/usr/sbin/$RC_SVCNAME"
+name="SMTP Server"
+command="/usr/sbin/smtpd"
 command_args="-F $SMTPD_OPTS"
 command_background=yes
 pidfile="/run/$RC_SVCNAME.pid"
-- 
2.12.2
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Apr 24 2017 - 15:24:54 UTC