summaryrefslogtreecommitdiff
path: root/pcr/postsrsd
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-04-23 19:29:18 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-04-23 19:29:18 -0400
commit6d8c63adc0c1088fd8a2f599e854f7fc00ba511c (patch)
tree28f05075ff565eb46dc427f6410b491fb13f784a /pcr/postsrsd
parentd75974d97652da95ff7efec856ba8214d80d56b7 (diff)
downloadabslibre-6d8c63adc0c1088fd8a2f599e854f7fc00ba511c.tar.gz
abslibre-6d8c63adc0c1088fd8a2f599e854f7fc00ba511c.tar.bz2
abslibre-6d8c63adc0c1088fd8a2f599e854f7fc00ba511c.zip
pcr/postsrsd: Fix SRS_DOMAIN default value
On systemd systems (ie, Parabola), the default value of the SRS_DOMAIN configuration variable is "localhost.localdomain", which is different than both the documented behavior, and the behavior on other init systems (which is the documented behavior). So, I've backported a patch from uptream that fixes this issue.
Diffstat (limited to 'pcr/postsrsd')
-rw-r--r--pcr/postsrsd/0001-systemd-populate-SRS_DOMAIN-default-using-postconf.patch40
-rw-r--r--pcr/postsrsd/PKGBUILD13
2 files changed, 52 insertions, 1 deletions
diff --git a/pcr/postsrsd/0001-systemd-populate-SRS_DOMAIN-default-using-postconf.patch b/pcr/postsrsd/0001-systemd-populate-SRS_DOMAIN-default-using-postconf.patch
new file mode 100644
index 000000000..03b5652ec
--- /dev/null
+++ b/pcr/postsrsd/0001-systemd-populate-SRS_DOMAIN-default-using-postconf.patch
@@ -0,0 +1,40 @@
+From 731ef505e2aff8b0a94986f03b4b57b2acce9996 Mon Sep 17 00:00:00 2001
+From: Dan Callaghan <dcallagh@redhat.com>
+Date: Mon, 7 Mar 2016 13:39:35 +1000
+Subject: [PATCH 1/1] systemd: populate SRS_DOMAIN default using postconf
+
+Fixes #48
+---
+ init/postsrsd.systemd.in | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/init/postsrsd.systemd.in b/init/postsrsd.systemd.in
+index dcc5298..ab168ca 100644
+--- a/init/postsrsd.systemd.in
++++ b/init/postsrsd.systemd.in
+@@ -3,11 +3,21 @@ Description=PostSRSd Daemon
+
+ [Service]
+ Type=simple
++Restart=always
++
++# Fallback defaults.
+ Environment=SRS_DOMAIN=localhost.localdomain
+ Environment=SRS_EXCLUDE_DOMAINS=
++
++# Fill in a default value for SRS_DOMAIN using postconf.
++RuntimeDirectory=@PROJECT_NAME@
++ExecStartPre=/bin/sh -c '{ echo -n SRS_DOMAIN= ; postconf -h mydomain ; } >/run/@PROJECT_NAME@/default'
++EnvironmentFile=-/run/@PROJECT_NAME@/default
++
++# Load the real configuration.
+ EnvironmentFile=@CONFIG_DIR@/@PROJECT_NAME@
++
+ ExecStart=@CMAKE_INSTALL_PREFIX@/sbin/@POSTSRSD@ -f "${SRS_FORWARD_PORT}" -r "${SRS_REVERSE_PORT}" -d "${SRS_DOMAIN}" -s "${SRS_SECRET}" -a "${SRS_SEPARATOR}" -u "${RUN_AS}" -c "${CHROOT}" -X"${SRS_EXCLUDE_DOMAINS}"
+-Restart=always
+
+ [Install]
+ WantedBy=multi-user.target
+--
+2.12.2
+
diff --git a/pcr/postsrsd/PKGBUILD b/pcr/postsrsd/PKGBUILD
index 42ec47ba8..dbb89dc7c 100644
--- a/pcr/postsrsd/PKGBUILD
+++ b/pcr/postsrsd/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=postsrsd
pkgver=1.4
-pkgrel=2
+pkgrel=3
pkgdesc="Sender Rewriting Scheme (SRS) daemon for Postfix"
arch=('i686' 'x86_64' 'armv7h')
makedepends=('cmake' 'help2man')
@@ -13,12 +13,23 @@ backup=('etc/default/postsrsd')
url="https://github.com/roehling/postsrsd"
license=('GPL2')
source=("$pkgname-$pkgver.tar.gz::https://github.com/roehling/postsrsd/archive/${pkgver}.tar.gz"
+ 0001-systemd-populate-SRS_DOMAIN-default-using-postconf.patch
postsrsd-genkey.service
postsrsd.service-genkey.conf)
md5sums=('cb6e13a06d6bbd7d383efb9bbf0867ce'
+ '55c38abef2084405eee3d4b7619d71dd'
'621d1ac7a15aec5d0cf91ec9b3ae7266'
'3441061474bd5da0d5f8148f53b05917')
+prepare() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+
+ local patch
+ for patch in ../*.patch; do
+ patch -Np1 -i "$patch"
+ done
+}
+
build() {
cd "$srcdir/${pkgname}-${pkgver}"
mkdir -p build