From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8023A158086 for ; Fri, 29 Oct 2021 12:56:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8B0B8E0845; Fri, 29 Oct 2021 12:56:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5C397E0845 for ; Fri, 29 Oct 2021 12:56:54 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3B32D34319D for ; Fri, 29 Oct 2021 12:56:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9D09F89 for ; Fri, 29 Oct 2021 12:56:51 +0000 (UTC) From: "Michael Orlitzky" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Orlitzky" Message-ID: <1635512159.297fd5ee563da41f502a3bddbd0bccfe1da107d0.mjo@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/spf-engine/ X-VCS-Repository: repo/gentoo X-VCS-Files: mail-filter/spf-engine/spf-engine-2.9.2-r4.ebuild X-VCS-Directories: mail-filter/spf-engine/ X-VCS-Committer: mjo X-VCS-Committer-Name: Michael Orlitzky X-VCS-Revision: 297fd5ee563da41f502a3bddbd0bccfe1da107d0 X-VCS-Branch: master Date: Fri, 29 Oct 2021 12:56:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 3001be31-9b6f-426d-a6d8-34b6cf0509fe X-Archives-Hash: 40777711585b27f20d63349179e1122d commit: 297fd5ee563da41f502a3bddbd0bccfe1da107d0 Author: Michael Orlitzky gentoo org> AuthorDate: Fri Oct 29 12:47:34 2021 +0000 Commit: Michael Orlitzky gentoo org> CommitDate: Fri Oct 29 12:55:59 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=297fd5ee mail-filter/spf-engine: new revision with python-3.10 support. I've also dropped support for python-3.7, which lets us finally revert DISTUTILS_USE_SETUPTOOLS to the default value and stop spewing QA warnings. Closes: https://bugs.gentoo.org/820662 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Michael Orlitzky gentoo.org> mail-filter/spf-engine/spf-engine-2.9.2-r4.ebuild | 77 +++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/mail-filter/spf-engine/spf-engine-2.9.2-r4.ebuild b/mail-filter/spf-engine/spf-engine-2.9.2-r4.ebuild new file mode 100644 index 00000000000..250e794e33c --- /dev/null +++ b/mail-filter/spf-engine/spf-engine-2.9.2-r4.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_8 python3_9 python3_10 ) + +# 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(+)" + +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' +}