~alpine/aports

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

Details
Message ID
<20170424131820.2953-1-valery.kartel@gmail.com>
Sender timestamp
1493039900
DKIM signature
missing
Download raw message
Patch: +13 -14
/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.

---
v1 -> v2:

add !check to options
add checking for config file in init-script
fix path in aliases comments
---
 main/opensmtpd/APKBUILD               | 14 ++++++++------
 main/opensmtpd/aliases                |  2 +-
 main/opensmtpd/opensmtpd.post-install |  4 ----
 main/opensmtpd/smtpd.initd            |  7 ++++---
 4 files changed, 13 insertions(+), 14 deletions(-)
 delete mode 100644 main/opensmtpd/opensmtpd.post-install

diff --git a/main/opensmtpd/APKBUILD b/main/opensmtpd/APKBUILD
index cea226a2de..1d338ab5a4 100644
--- a/main/opensmtpd/APKBUILD
+++ b/main/opensmtpd/APKBUILD
@@ -4,7 +4,7 @@
# Maintainer: Jonathan Curran <jonathan@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"
@@ -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
@@ -20,7 +20,7 @@ source="https://www.opensmtpd.org/archives/${pkgname}-${pkgver}.tar.gz
	autoconf-decl-checks.patch
	missing-decls.patch
	libressl-compat.patch"
options="suid"
options="suid !check"

builddir="$srcdir"/$pkgname-$pkgver

@@ -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 \
@@ -55,11 +56,12 @@ 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
6cbcca9fc74cc0bb007164442dea87d039b06668da1b43da5e1fac2160a96da95d6644437c79a92480a3ab1fc252686bd10eceed38a19971344b0a8fca65a3d6  smtpd.initd
929ba0b8befca6cad558602f9793a9c653923924ee524902916b8ef4952d1ea8a391895e7450ed9768eb82a07bd307b49561f5d49ea4711bd87a1a73eb8d7dad  aliases
8f768c2c13012592d9893fc8c9fc53d0d1343d8c69dd9be1d4731ee11ae66bed4f7f3666f467cf0defcd74fd6148a410a817a2b070089174cca48403c3ab7170  smtpd.initd
51d47b34eb3d728daa45f29d6434cc75db28dfa69b6fb3ecd873121df85b296a2d2c81016d765a07778aa26a496e4b29c09a30b82678cf42596a536734b5deca  aliases
e61b7b0ab98acca9c092469d3ed756161225af5126e2fc0611b2676b8e1df05db7037549febe85b860fa48e47536a01fa3bfa37976f42e47666065ba4198e903  autoconf-decl-checks.patch
217e7212345f4202bf7e136b2d5b347a9967ea10d15ef50a216bfcd8e4a522076e4ee2044d18a606baf670c0fe6a339951b6381cdb9047730e06987ab7796790  missing-decls.patch
67b5bb221f10e014749592d24f7681bea6872785fa4a70e4e4b978f94859b527c4999aabb489586f7c19fac182acca450bdfa01af3ebc52c009f723830212058  libressl-compat.patch"
diff --git a/main/opensmtpd/aliases b/main/opensmtpd/aliases
index 766dc3e2d8..02c802dd4a 100644
--- a/main/opensmtpd/aliases
+++ b/main/opensmtpd/aliases
@@ -1,5 +1,5 @@
#  Aliases in this file will NOT be expanded in the header from
#  Mail, but WILL be visible over networks or from /usr/libexec/mail.local.
#  Mail, but WILL be visible over networks or from /usr/lib/opensmtpd/mail.local.
#
#	>>>>>>>>>>	The program "newaliases" must be run after
#	>> NOTE >>	this file is updated for any changes to
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
@@ -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..98881e8523 100644
--- a/main/opensmtpd/smtpd.initd
+++ b/main/opensmtpd/smtpd.initd
@@ -1,10 +1,11 @@
#!/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"
pidfile=/run/$RC_SVCNAME.pid
required_files=/etc/smtpd/smtpd.conf

depend() {
	need net localmount
-- 
2.12.2



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)