summaryrefslogtreecommitdiff
path: root/mail-filter/spf-engine
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
commitf516638b7fe9592837389826a6152a7e1b251c54 (patch)
tree8bfecb640b7b6403d7a3d662d923eed630033da7 /mail-filter/spf-engine
parent1a61119f9f7b057830e2ce0563f913ec86f282ad (diff)
gentoo resync : 30.05.2020
Diffstat (limited to 'mail-filter/spf-engine')
-rw-r--r--mail-filter/spf-engine/Manifest5
-rw-r--r--mail-filter/spf-engine/metadata.xml11
-rw-r--r--mail-filter/spf-engine/spf-engine-2.0.2-r1.ebuild48
-rw-r--r--mail-filter/spf-engine/spf-engine-2.9.2.ebuild79
4 files changed, 143 insertions, 0 deletions
diff --git a/mail-filter/spf-engine/Manifest b/mail-filter/spf-engine/Manifest
new file mode 100644
index 000000000000..d1ef1385c146
--- /dev/null
+++ b/mail-filter/spf-engine/Manifest
@@ -0,0 +1,5 @@
+DIST pypolicyd-spf-2.0.2.tar.gz 38546 BLAKE2B 691cd5db37592be0ef0cda41223280e764e83802e37563f4e6c08505731118199c03d27b0bf51cec0556aa946fc6c7465fe09d3c9100c8e2582a4d85ad828495 SHA512 adcc7b30c6922894f9407edd0637b02a138623f4480ec37635475396826b457c835b3ffb599d1985e306770fe5f72404552ed705bd957e63b5c54ca3d8991673
+DIST spf-engine-2.9.2.tar.gz 52737 BLAKE2B 39d6c9831ef3ea489f2910fcbcaec9b2bed627f02459e20826166f04a2fe895aecf83768a3446a037e4231cc317ee277f6ff8e9030c72d8819739f6af889d632 SHA512 fe1fe82411ed4d6fcfadccd6ccc9fbd36372b4676051aafa5984740cba862336b00567576b3e32451cd24b0cfcd992d7dfdee33f0cf65a35f4009837e99b8f98
+EBUILD spf-engine-2.0.2-r1.ebuild 1374 BLAKE2B e37ced457ffa2294aab2031bb847928cbadbfd342dbb48b0899482686e564bb5b1f3ef6d7deb915824f6a5f85b3512102cb011feb5552edd99be9cad5d47e0bc SHA512 5c56fea79f669e534554488f770ba84559ea91b1c1e69bd4112cd3c08330590140f5f4c4901fcf4852df33fbaf2c8af4dcdfe736e0d73c8d1ad70460e5095d0b
+EBUILD spf-engine-2.9.2.ebuild 2782 BLAKE2B 92d0e8a0ec35717b3d0c0835078f377a8980bbd1331651ca651293db994fe331aa856d1947e9a71301de3a76e5e5a0dfc3a8d63e6c2d13d513b2a98e0fe1ed6a SHA512 3839b93d2b7282151a193ab570bcf1211becc3e61f21ba3268e844d1c601366c70aff1e69c2e19a3ce59e9ca3c606f4d42ecbef890f22782ec749b202c834a55
+MISC metadata.xml 350 BLAKE2B 979a5608d2877fdfe350a7f58ca1d0da721f3d2742b89bab11b6eae5d7ebfcf1f0b8cbda8b81c904aefcbbb908b325d732a6928093dfed57a13d407e91a769ca SHA512 434b6b307bfb636ed69cb2fa9a95daa7c5208501054df048346973a16ebb14786fdf4eda749eea6006c529f9d5a9c78b6ff32d7e85f76644250944e5d8f7b3a8
diff --git a/mail-filter/spf-engine/metadata.xml b/mail-filter/spf-engine/metadata.xml
new file mode 100644
index 000000000000..9d7516779a0b
--- /dev/null
+++ b/mail-filter/spf-engine/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mjo@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">spf-engine</remote-id>
+ <remote-id type="pypi">spf-engine</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/mail-filter/spf-engine/spf-engine-2.0.2-r1.ebuild b/mail-filter/spf-engine/spf-engine-2.0.2-r1.ebuild
new file mode 100644
index 000000000000..da8cc8d6ff55
--- /dev/null
+++ b/mail-filter/spf-engine/spf-engine-2.0.2-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_6 python3_7 python3_8 )
+
+# The built-in ipaddress module handles the parsing of IP addresses. If
+# python is built without ipv6 support, then ipaddress can't parse ipv6
+# addresses, and the daemon will crash if it sees an ipv6 SPF record. In
+# other words, it's completely broken.
+PYTHON_REQ_USE="ipv6"
+
+DISTUTILS_USE_SETUPTOOLS=no
+inherit distutils-r1
+
+OLD_PN="pypolicyd-spf"
+OLD_P="${OLD_PN}-${PV}"
+OLD_PF="${PN}-${PVR}"
+DESCRIPTION="Python-based policy daemon for Postfix SPF verification"
+HOMEPAGE="https://launchpad.net/pypolicyd-spf"
+SRC_URI="mirror://pypi/p/${OLD_PN}/${OLD_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="dev-python/pyspf[${PYTHON_USEDEP}]"
+
+RDEPEND="${DEPEND}
+ dev-python/authres[${PYTHON_USEDEP}]"
+
+S="${WORKDIR}/${OLD_P}"
+
+DOCS=( CHANGES policyd-spf.conf.commented README README.per_user_whitelisting )
+
+python_prepare_all() {
+ # The "real" config file mentions the commented one, so we point
+ # users in the right direction.
+ local oldconf="policyd-spf.conf.commented"
+ local newconf="/usr/share/doc/${OLD_PF}/${oldconf}"
+
+ sed -i "1 s~ ${oldconf}~,\n# ${newconf}~" policyd-spf.conf \
+ || die 'failed to update commented config file path'
+
+ distutils-r1_python_prepare_all
+}
diff --git a/mail-filter/spf-engine/spf-engine-2.9.2.ebuild b/mail-filter/spf-engine/spf-engine-2.9.2.ebuild
new file mode 100644
index 000000000000..eebe9b13725c
--- /dev/null
+++ b/mail-filter/spf-engine/spf-engine-2.9.2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_6 python3_7 python3_8 )
+
+# The built-in ipaddress module handles the parsing of IP addresses. If
+# python is built without ipv6 support, then ipaddress can't parse ipv6
+# addresses, and the daemon will crash if it sees an ipv6 SPF record. In
+# other words, it's completely broken.
+PYTHON_REQ_USE="ipv6"
+
+# setup.py defines entry_points
+DISTUTILS_USE_SETUPTOOLS=rdepend
+inherit distutils-r1
+
+DESCRIPTION="Policy daemon and milter for Postfix SPF verification"
+HOMEPAGE="https://launchpad.net/spf-engine"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/pyspf[${PYTHON_USEDEP}]"
+
+RDEPEND="${DEPEND}
+ dev-python/authres[${PYTHON_USEDEP}]"
+
+DOCS=( CHANGES policyd-spf.conf.commented README README.per_user_whitelisting )
+
+python_prepare_all() {
+ # The "real" config file mentions the commented one, so we point
+ # users in the right direction.
+ local oldconf="policyd-spf.conf.commented"
+ local newconf="/usr/share/doc/${PF}/${oldconf}"
+
+ sed -e "1 s~ ${oldconf}~,\n# ${newconf}~" -i policyd-spf.conf \
+ || die 'failed to update commented config file path'
+
+ distutils-r1_python_prepare_all
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ # Remove the milter files that are installed by default. The milter
+ # isn't quite ready:
+ #
+ # * The README says it's experimental not well-tested.
+ # * There's no documentation for its configuration parameters
+ # (expecially the UserID).
+ # * The configuration file is hard-coded to /usr/local.
+ # * The paths in the systemd service file are hard-coded to /usr/local.
+ # * We need to write an OpenRC service script for it.
+ #
+ # These are all eventually doable, but I'm not willing to commit to
+ # making the milter work before upstream is.
+ #
+ rm "${ED}/usr/bin/pyspf-milter" \
+ || die "failed to remove ${ED}/usr/bin/pyspf-milter"
+ rm -r "${ED}/usr/lib/systemd" \
+ || die "failed to remove ${ED}/usr/lib/systemd"
+ rm -r "${ED}/usr/etc/init.d" \
+ || die "failed to remove ${ED}/usr/etc/init.d"
+ einfo "The milter component of spf-engine is still deemed experimental"
+ einfo "and not well-tested by upstream. It's missing configuration"
+ einfo "files, service scripts, and documentation. In other words, it"
+ einfo "doesn't work yet."
+
+ # The setuptools installation routing always works relative to
+ # python's prefix, so that when installing locally you wind up
+ # with paths like /usr/local/etc. However for system installs
+ # that does the wrong thing and puts the sysconfdir at /usr/etc.
+ # Here we move it to the right place.
+ mv -v "${ED}/usr/etc" "${ED}/" || die 'failed to relocate sysconfdir'
+}