public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/spf-engine/
Date: Wed, 19 Mar 2025 17:13:40 +0000 (UTC)	[thread overview]
Message-ID: <1742403962.254e52e028dca8dc70bbdbdbc781d4f1740c45aa.mjo@gentoo> (raw)

commit:     254e52e028dca8dc70bbdbdbc781d4f1740c45aa
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 19 17:05:28 2025 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Wed Mar 19 17:06:02 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=254e52e0

mail-filter/spf-engine: add 3.1.0

Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 mail-filter/spf-engine/Manifest                |  1 +
 mail-filter/spf-engine/spf-engine-3.1.0.ebuild | 74 ++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/mail-filter/spf-engine/Manifest b/mail-filter/spf-engine/Manifest
index 35f1277c7bad..ebb682494b67 100644
--- a/mail-filter/spf-engine/Manifest
+++ b/mail-filter/spf-engine/Manifest
@@ -1 +1,2 @@
 DIST spf-engine-3.0.4.tar.gz 61428 BLAKE2B b4c1e920cdb6706650341a21abe21a3318649a3bd379aea2d16c30bb9d27d95b83b980dfb0f62c234627f3c87b4d82f6074b88eb0f4ccb878618f61f9d8b9827 SHA512 29a6cd4d2c94ef1d47ff6d6d03bd485961f8c01e838800dd8c1194a51fdfbf384ffb5f073e1262993cd2bb5cbf2eff645048d6f1f3ce57bdebfefe3d0425ee77
+DIST spf-engine-3.1.0.tar.gz 62848 BLAKE2B 76a6aa214f79eb74fdeb647a48b66f6b7446c54ea75a0bbd6b08736d33bc11c1c25c94ed1e8bdb447fc6793eca3e64761af16184686935c616817397fc46ba4f SHA512 e464993bae176236d56be908bb758b9094a75d76d77229b9645c5cb69ecd0f2b8cfd3738e2be579414d4593c7ca9100209051e4cb5d298dbace6925b1855e82b

diff --git a/mail-filter/spf-engine/spf-engine-3.1.0.ebuild b/mail-filter/spf-engine/spf-engine-3.1.0.ebuild
new file mode 100644
index 000000000000..02fb6922989d
--- /dev/null
+++ b/mail-filter/spf-engine/spf-engine-3.1.0.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_10 python3_11 python3_12 python3_13 )
+
+# 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_PEP517=flit
+PYPI_NO_NORMALIZE=1
+inherit distutils-r1 pypi
+
+DESCRIPTION="Policy daemon for Postfix SPF verification"
+HOMEPAGE="https://launchpad.net/spf-engine"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+
+RDEPEND="dev-python/pyspf[${PYTHON_USEDEP}]
+	dev-python/authres[${PYTHON_USEDEP}]"
+
+DOCS=( CHANGES )
+
+python_prepare_all() {
+	distutils-r1_python_prepare_all
+
+	# The tarball has a "data" directory containing a hierarchy that
+	# flit wants to insert right into /usr. Before it does that, we have
+	# to remove the parts we don't want, and fix some of the paths.
+	#
+	# Note that one of our patches already mangles a few of these
+	# before we even see them.
+
+	einfo "removing milter files"
+	rm -v -r data/lib data/etc/init.d data/share/man/man8 || die
+	rm -v data/etc/pyspf-milter/pyspf-milter.conf || die
+	rm -v spf_engine/milter_spf.py || die
+
+	# And don't create a python-exec wrapper for it.
+	sed -e '/^pyspf-milter = /d' -i pyproject.toml || die
+
+	# The commented conf example is documentation, not configuration.
+	mv -v data/etc/python-policyd-spf/policyd-spf.conf.commented \
+	   data/share/doc/python-policyd-spf/ || die
+
+	# The man page hard-codes /usr/local/etc, it should be /etc.
+	sed -e 's:/usr/local/etc:/etc:g' \
+		-i data/share/man/man1/policyd-spf.1 || die
+
+	# Fix the documentation path.
+	mv -v data/share/doc/python-policyd-spf "data/share/doc/${PF}" || die
+
+	# The "real" config file mentions the commented one, so we point
+	# users in the right direction. Caveat: the documentation is
+	# compressed, so we're usually off by a ".bz2" suffix anyway.
+	local oldconf="policyd-spf.conf.commented"
+	local newconf="/usr/share/doc/${PF}/${oldconf}"
+	sed -e "1 s~ ${oldconf}~,\n#  ${newconf}~" \
+		-i "data/etc/python-policyd-spf/policyd-spf.conf" \
+		|| die 'failed to update commented config file path'
+}
+
+src_install() {
+	distutils-r1_src_install
+
+	# The "data" installation is relative to python's prefix, so
+	# data/etc gets installed to /usr/etc. Let's fix that.
+	mv -v "${ED}/usr/etc" "${ED}/" || die 'failed to relocate sysconfdir'
+}


             reply	other threads:[~2025-03-19 17:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 17:13 Michael Orlitzky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-29 13:53 [gentoo-commits] repo/gentoo:master commit in: mail-filter/spf-engine/ Michael Orlitzky
2024-05-28 13:19 Sam James
2024-04-14 12:14 Michael Orlitzky
2023-05-04 14:03 Michael Orlitzky
2023-05-04 14:03 Michael Orlitzky
2023-05-03  6:33 Arthur Zamarin
2023-05-03  3:53 Sam James
2023-03-26 22:59 Michael Orlitzky
2023-03-17 15:29 Michał Górny
2022-06-09 12:44 Michael Orlitzky
2022-06-09  7:39 Agostino Sarubbo
2022-06-09  7:34 Agostino Sarubbo
2022-05-13  9:16 Michael Orlitzky
2021-10-29 12:56 Michael Orlitzky
2021-08-31  9:05 Michał Górny
2021-05-30 11:51 Michael Orlitzky
2021-05-29 16:09 Sam James
2021-05-29 15:23 Sam James
2021-05-29  1:07 Michael Orlitzky
2020-05-26 13:40 Michael Orlitzky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1742403962.254e52e028dca8dc70bbdbdbc781d4f1740c45aa.mjo@gentoo \
    --to=mjo@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox