1 |
commit: 328a9a69d17949b8bff1f1b854f4a301a759f10f |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 26 01:28:54 2020 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 26 13:31:17 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=328a9a69 |
7 |
|
8 |
mail-filter/spf-engine: new version 2.9.2. |
9 |
|
10 |
The first new version after the rename, with an ebuild that will make |
11 |
sense to future readers. Thanks to Alex Efros for pointing out that |
12 |
this package was renamed and for supplying an updated ebuild. |
13 |
|
14 |
Reported-by: Alex Efros <powerman-asdf <AT> yandex.ru> |
15 |
Closes: https://bugs.gentoo.org/724526 |
16 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
17 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
18 |
|
19 |
mail-filter/spf-engine/Manifest | 1 + |
20 |
mail-filter/spf-engine/spf-engine-2.9.2.ebuild | 79 ++++++++++++++++++++++++++ |
21 |
2 files changed, 80 insertions(+) |
22 |
|
23 |
diff --git a/mail-filter/spf-engine/Manifest b/mail-filter/spf-engine/Manifest |
24 |
index a02a604de1f..e26a6abe523 100644 |
25 |
--- a/mail-filter/spf-engine/Manifest |
26 |
+++ b/mail-filter/spf-engine/Manifest |
27 |
@@ -1 +1,2 @@ |
28 |
DIST pypolicyd-spf-2.0.2.tar.gz 38546 BLAKE2B 691cd5db37592be0ef0cda41223280e764e83802e37563f4e6c08505731118199c03d27b0bf51cec0556aa946fc6c7465fe09d3c9100c8e2582a4d85ad828495 SHA512 adcc7b30c6922894f9407edd0637b02a138623f4480ec37635475396826b457c835b3ffb599d1985e306770fe5f72404552ed705bd957e63b5c54ca3d8991673 |
29 |
+DIST spf-engine-2.9.2.tar.gz 52737 BLAKE2B 39d6c9831ef3ea489f2910fcbcaec9b2bed627f02459e20826166f04a2fe895aecf83768a3446a037e4231cc317ee277f6ff8e9030c72d8819739f6af889d632 SHA512 fe1fe82411ed4d6fcfadccd6ccc9fbd36372b4676051aafa5984740cba862336b00567576b3e32451cd24b0cfcd992d7dfdee33f0cf65a35f4009837e99b8f98 |
30 |
|
31 |
diff --git a/mail-filter/spf-engine/spf-engine-2.9.2.ebuild b/mail-filter/spf-engine/spf-engine-2.9.2.ebuild |
32 |
new file mode 100644 |
33 |
index 00000000000..eebe9b13725 |
34 |
--- /dev/null |
35 |
+++ b/mail-filter/spf-engine/spf-engine-2.9.2.ebuild |
36 |
@@ -0,0 +1,79 @@ |
37 |
+# Copyright 1999-2020 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=7 |
41 |
+ |
42 |
+PYTHON_COMPAT=( python3_6 python3_7 python3_8 ) |
43 |
+ |
44 |
+# The built-in ipaddress module handles the parsing of IP addresses. If |
45 |
+# python is built without ipv6 support, then ipaddress can't parse ipv6 |
46 |
+# addresses, and the daemon will crash if it sees an ipv6 SPF record. In |
47 |
+# other words, it's completely broken. |
48 |
+PYTHON_REQ_USE="ipv6" |
49 |
+ |
50 |
+# setup.py defines entry_points |
51 |
+DISTUTILS_USE_SETUPTOOLS=rdepend |
52 |
+inherit distutils-r1 |
53 |
+ |
54 |
+DESCRIPTION="Policy daemon and milter for Postfix SPF verification" |
55 |
+HOMEPAGE="https://launchpad.net/spf-engine" |
56 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
57 |
+ |
58 |
+LICENSE="Apache-2.0" |
59 |
+SLOT="0" |
60 |
+KEYWORDS="~amd64 ~x86" |
61 |
+IUSE="" |
62 |
+ |
63 |
+DEPEND="dev-python/pyspf[${PYTHON_USEDEP}]" |
64 |
+ |
65 |
+RDEPEND="${DEPEND} |
66 |
+ dev-python/authres[${PYTHON_USEDEP}]" |
67 |
+ |
68 |
+DOCS=( CHANGES policyd-spf.conf.commented README README.per_user_whitelisting ) |
69 |
+ |
70 |
+python_prepare_all() { |
71 |
+ # The "real" config file mentions the commented one, so we point |
72 |
+ # users in the right direction. |
73 |
+ local oldconf="policyd-spf.conf.commented" |
74 |
+ local newconf="/usr/share/doc/${PF}/${oldconf}" |
75 |
+ |
76 |
+ sed -e "1 s~ ${oldconf}~,\n# ${newconf}~" -i policyd-spf.conf \ |
77 |
+ || die 'failed to update commented config file path' |
78 |
+ |
79 |
+ distutils-r1_python_prepare_all |
80 |
+} |
81 |
+ |
82 |
+src_install() { |
83 |
+ distutils-r1_src_install |
84 |
+ |
85 |
+ # Remove the milter files that are installed by default. The milter |
86 |
+ # isn't quite ready: |
87 |
+ # |
88 |
+ # * The README says it's experimental not well-tested. |
89 |
+ # * There's no documentation for its configuration parameters |
90 |
+ # (expecially the UserID). |
91 |
+ # * The configuration file is hard-coded to /usr/local. |
92 |
+ # * The paths in the systemd service file are hard-coded to /usr/local. |
93 |
+ # * We need to write an OpenRC service script for it. |
94 |
+ # |
95 |
+ # These are all eventually doable, but I'm not willing to commit to |
96 |
+ # making the milter work before upstream is. |
97 |
+ # |
98 |
+ rm "${ED}/usr/bin/pyspf-milter" \ |
99 |
+ || die "failed to remove ${ED}/usr/bin/pyspf-milter" |
100 |
+ rm -r "${ED}/usr/lib/systemd" \ |
101 |
+ || die "failed to remove ${ED}/usr/lib/systemd" |
102 |
+ rm -r "${ED}/usr/etc/init.d" \ |
103 |
+ || die "failed to remove ${ED}/usr/etc/init.d" |
104 |
+ einfo "The milter component of spf-engine is still deemed experimental" |
105 |
+ einfo "and not well-tested by upstream. It's missing configuration" |
106 |
+ einfo "files, service scripts, and documentation. In other words, it" |
107 |
+ einfo "doesn't work yet." |
108 |
+ |
109 |
+ # The setuptools installation routing always works relative to |
110 |
+ # python's prefix, so that when installing locally you wind up |
111 |
+ # with paths like /usr/local/etc. However for system installs |
112 |
+ # that does the wrong thing and puts the sysconfdir at /usr/etc. |
113 |
+ # Here we move it to the right place. |
114 |
+ mv -v "${ED}/usr/etc" "${ED}/" || die 'failed to relocate sysconfdir' |
115 |
+} |