1 |
commit: 69853414eda033b50db1931eede45b520ab1de0d |
2 |
Author: nic <nic <AT> boet <DOT> cc> |
3 |
AuthorDate: Wed Mar 30 15:55:50 2022 +0000 |
4 |
Commit: Dirkjan Ochtman <djc <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 7 14:12:41 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69853414 |
7 |
|
8 |
mail-filter/postsrsd fixes initd |
9 |
|
10 |
pass SRS_HASHLENGTH, SRS_HASHMIN, SRS_LISTEN_ADDR vars from confd into |
11 |
initd |
12 |
remove old unused init |
13 |
EAPI 8 the new ebuild |
14 |
|
15 |
Closes: https://bugs.gentoo.org/836390 |
16 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
17 |
Signed-off-by: Nic Boet <nic <AT> boet.cc> |
18 |
Signed-off-by: Dirkjan Ochtman <djc <AT> gentoo.org> |
19 |
|
20 |
.../files/{postsrsd.init => postsrsd.init-r2} | 7 +++-- |
21 |
mail-filter/postsrsd/postsrsd-1.11-r1.ebuild | 35 ++++++++++++++++++++++ |
22 |
2 files changed, 39 insertions(+), 3 deletions(-) |
23 |
|
24 |
diff --git a/mail-filter/postsrsd/files/postsrsd.init b/mail-filter/postsrsd/files/postsrsd.init-r2 |
25 |
similarity index 74% |
26 |
rename from mail-filter/postsrsd/files/postsrsd.init |
27 |
rename to mail-filter/postsrsd/files/postsrsd.init-r2 |
28 |
index acc00232be5b..e1b21218899e 100644 |
29 |
--- a/mail-filter/postsrsd/files/postsrsd.init |
30 |
+++ b/mail-filter/postsrsd/files/postsrsd.init-r2 |
31 |
@@ -1,10 +1,10 @@ |
32 |
#!/sbin/openrc-run |
33 |
-# Copyright 2015 Gentoo Foundation |
34 |
+# Copyright 2015-2022 Gentoo Foundation |
35 |
# Distributed under the terms of the GNU General Public License v2 |
36 |
|
37 |
PIDFILE=/var/run/$SVCNAME.pid |
38 |
-SRS_DOMAIN=`postconf -h mydomain || true` |
39 |
-SRS_EXCLUDE_DOMAINS= |
40 |
+SRS_DOMAIN="${SRS_DOMAIN:-`postconf -h mydomain || true`}" |
41 |
+SRS_EXCLUDE_DOMAINS="${SRS_EXCLUDE_DOMAINS:-''}" |
42 |
|
43 |
depend() { |
44 |
need net |
45 |
@@ -18,6 +18,7 @@ start() { |
46 |
-- -f "$SRS_FORWARD_PORT" -r "$SRS_REVERSE_PORT" \ |
47 |
-d "$SRS_DOMAIN" -s "$SRS_SECRET" -a "$SRS_SEPARATOR" \ |
48 |
-u "$RUN_AS" -p "$PIDFILE" -c "$CHROOT" \ |
49 |
+ -n "$SRS_HASHLENGTH" -N "$SRS_HASHMIN" -l "$SRS_LISTEN_ADDR" \ |
50 |
-D -X"$SRS_EXCLUDE_DOMAINS" |
51 |
eend $? |
52 |
} |
53 |
|
54 |
diff --git a/mail-filter/postsrsd/postsrsd-1.11-r1.ebuild b/mail-filter/postsrsd/postsrsd-1.11-r1.ebuild |
55 |
new file mode 100644 |
56 |
index 000000000000..25a52f452d8a |
57 |
--- /dev/null |
58 |
+++ b/mail-filter/postsrsd/postsrsd-1.11-r1.ebuild |
59 |
@@ -0,0 +1,35 @@ |
60 |
+# Copyright 1999-2022 Gentoo Authors |
61 |
+# Distributed under the terms of the GNU General Public License v2 |
62 |
+ |
63 |
+EAPI=8 |
64 |
+ |
65 |
+inherit cmake |
66 |
+ |
67 |
+DESCRIPTION="Postfix Sender Rewriting Scheme daemon" |
68 |
+SRC_URI="https://github.com/roehling/postsrsd/archive/${PV}.tar.gz -> ${P}.tar.gz" |
69 |
+HOMEPAGE="https://github.com/roehling/postsrsd" |
70 |
+ |
71 |
+LICENSE="GPL-2" |
72 |
+SLOT="0" |
73 |
+KEYWORDS="~amd64 ~x86" |
74 |
+IUSE="" |
75 |
+ |
76 |
+BDEPEND=">=dev-util/cmake-2.4" |
77 |
+RDEPEND="" |
78 |
+ |
79 |
+CHROOT_DIR="${EPREFIX}/var/lib/postsrsd" |
80 |
+ |
81 |
+src_configure() { |
82 |
+ local mycmakeargs=( |
83 |
+ -DCHROOT_DIR=${CHROOT_DIR} |
84 |
+ -DDOC_DIR="${EPREFIX}/usr/share/doc/${PF}" |
85 |
+ ) |
86 |
+ cmake_src_configure |
87 |
+} |
88 |
+ |
89 |
+src_install() { |
90 |
+ cmake_src_install |
91 |
+ newinitd "${FILESDIR}/postsrsd.init-r2" postsrsd |
92 |
+ newconfd "${BUILD_DIR}/postsrsd.default" postsrsd |
93 |
+ keepdir ${CHROOT_DIR} |
94 |
+} |