public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/postsrsd/files/, mail-filter/postsrsd/
@ 2016-04-13 14:17 Dirkjan Ochtman
  0 siblings, 0 replies; 2+ messages in thread
From: Dirkjan Ochtman @ 2016-04-13 14:17 UTC (permalink / raw
  To: gentoo-commits

commit:     6513c932bb009883b648f2f60df32b534571f01a
Author:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 13 14:11:09 2016 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Wed Apr 13 14:17:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6513c932

mail-filter/postsrsd: initial version (1.4)

Package-Manager: portage-2.2.26

 mail-filter/postsrsd/Manifest            |  1 +
 mail-filter/postsrsd/files/postsrsd.init | 30 ++++++++++++++++++++++++++++++
 mail-filter/postsrsd/metadata.xml        | 11 +++++++++++
 mail-filter/postsrsd/postsrsd-1.4.ebuild | 25 +++++++++++++++++++++++++
 4 files changed, 67 insertions(+)

diff --git a/mail-filter/postsrsd/Manifest b/mail-filter/postsrsd/Manifest
new file mode 100644
index 0000000..eee16e9
--- /dev/null
+++ b/mail-filter/postsrsd/Manifest
@@ -0,0 +1 @@
+DIST postsrsd-1.4.tar.gz 26555 SHA256 f3230d57c36ba4688cc3beb90fbb0f199a06381e4df2edbc4ef541a9e8a574ff SHA512 e5b9d2091d562030dd8d35117a3c5fb7d99c0613120fc90f74be57af5e88a3fe0ce73a5ce702708047ae37f70c6aedb4a0df018dccbe480048ccb6ed4debbcef WHIRLPOOL 8589c87aa5c59a7b0865d47b74dfa5a50e932f76a55c11fae651f3ad1ffb666d483cc237c4be1f1625a6fb8de1f2bcb689d01c11a6b20100b4056abf9f734ab1

diff --git a/mail-filter/postsrsd/files/postsrsd.init b/mail-filter/postsrsd/files/postsrsd.init
new file mode 100644
index 0000000..2a55b35
--- /dev/null
+++ b/mail-filter/postsrsd/files/postsrsd.init
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PIDFILE=/var/run/$SVCNAME.pid
+SRS_DOMAIN=`postconf -h mydomain || true`
+SRS_EXCLUDE_DOMAINS=
+
+depend() {
+	need net
+}
+
+start() {
+	ebegin "Starting ${SVCNAME}"
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+						--name $SVCNAME \
+						--exec /usr/sbin/postsrsd \
+						-- -f "$SRS_FORWARD_PORT" -r "$SRS_REVERSE_PORT" \
+							-d "$SRS_DOMAIN" -s "$SRS_SECRET" -a "$SRS_SEPARATOR" \
+							-u "$RUN_AS" -p "$PIDFILE" -c "$CHROOT" \
+							-D -X"$SRS_EXCLUDE_DOMAINS"
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping ${SVCNAME}"
+	start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+						--name $SVCNAME
+	eend $?
+}

diff --git a/mail-filter/postsrsd/metadata.xml b/mail-filter/postsrsd/metadata.xml
new file mode 100644
index 0000000..941bbee
--- /dev/null
+++ b/mail-filter/postsrsd/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>djc@gentoo.org</email>
+    <name>Dirkjan Ochtman</name>
+  </maintainer>
+  <upstream>
+    <remote-id type="github">roehling/postsrsd</remote-id>
+  </upstream>
+</pkgmetadata>

diff --git a/mail-filter/postsrsd/postsrsd-1.4.ebuild b/mail-filter/postsrsd/postsrsd-1.4.ebuild
new file mode 100644
index 0000000..cecc711
--- /dev/null
+++ b/mail-filter/postsrsd/postsrsd-1.4.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils user
+
+DESCRIPTION="Postfix Sender Rewriting Scheme daemon"
+SRC_URI="https://github.com/roehling/postsrsd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="https://github.com/roehling/postsrsd"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_install() {
+	cmake-utils_src_install
+	newinitd "${FILESDIR}/postsrsd.init" postsrsd
+	newconfd "${BUILD_DIR}/postsrsd.default" postsrsd
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/postsrsd/files/, mail-filter/postsrsd/
@ 2025-04-12 20:12 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-04-12 20:12 UTC (permalink / raw
  To: gentoo-commits

commit:     f9c49c0666eb8941caa3c5bc70bde931d6512388
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 12 18:29:42 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 12 20:12:18 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9c49c06

mail-filter/postsrsd: add 2.0.11

Closes: https://bugs.gentoo.org/951885
Signed-off-by: Sam James <sam <AT> gentoo.org>

 mail-filter/postsrsd/Manifest                      |  1 +
 .../postsrsd/files/postsrsd-2.0.11-docdir.patch    | 13 +++++
 mail-filter/postsrsd/files/postsrsd.confd          | 62 ++++++++++++++++++++++
 mail-filter/postsrsd/postsrsd-2.0.11.ebuild        | 61 +++++++++++++++++++++
 4 files changed, 137 insertions(+)

diff --git a/mail-filter/postsrsd/Manifest b/mail-filter/postsrsd/Manifest
index 80dd3901dc52..41d9aa90a052 100644
--- a/mail-filter/postsrsd/Manifest
+++ b/mail-filter/postsrsd/Manifest
@@ -1 +1,2 @@
 DIST postsrsd-1.12.tar.gz 36860 BLAKE2B 9f760e010c791d993df83d1f55bd02f2f42fe336e4aef9aae87e62aab2ef86354d99ff1b9be2b2a24d33006fe0461887224dad11a03139e7ce24ab23a775d3ad SHA512 9b83d89f8ac26ba0477998c495b0566295e16ae62a661a9edaef430cbc2eea592fe178b3686d0ad0578a808d13c13d526ac44a2360fd6e715d701887086fa51a
+DIST postsrsd-2.0.11.tar.gz 64995 BLAKE2B 5958dd3d45ad2181fb46b6bd086b95e6f952309dccacb889fd704994d822ce01f3487e2b8dfa19f7a8627ede58f8f619ae891da053d053cbc4b3a362759a23fe SHA512 d85be04decfcf38ac2aaa3435f804106faf37bd51914184f91ff2f130ff39ce4e1b73e9d0748dc57c940bdbc917dddcd25fc8777fcba65e864a1c6f0066c3995

diff --git a/mail-filter/postsrsd/files/postsrsd-2.0.11-docdir.patch b/mail-filter/postsrsd/files/postsrsd-2.0.11-docdir.patch
new file mode 100644
index 000000000000..4640cdd1dfbe
--- /dev/null
+++ b/mail-filter/postsrsd/files/postsrsd-2.0.11-docdir.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 218ae66..c319dce 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -362,7 +362,7 @@ configure_file(
+ 
+ install(TARGETS postsrsd RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.conf"
+-        DESTINATION "${CMAKE_INSTALL_DATADIR}/doc/${PROJECT_NAME}"
++        DESTINATION "${CMAKE_INSTALL_DOCDIR}"
+ )
+ if(INSTALL_SYSTEMD_SERVICE)
+     install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.service"

diff --git a/mail-filter/postsrsd/files/postsrsd.confd b/mail-filter/postsrsd/files/postsrsd.confd
new file mode 100644
index 000000000000..121fba8a63e9
--- /dev/null
+++ b/mail-filter/postsrsd/files/postsrsd.confd
@@ -0,0 +1,62 @@
+# Default settings for PostSRSd
+
+# Local domain name.
+# Addresses are rewritten to originate from this domain. The default value
+# is taken from `postconf -h mydomain` and probably okay.
+#
+#SRS_DOMAIN=example.com
+
+# Exclude additional domains.
+# You may list domains which shall not be subjected to address rewriting.
+# If a domain name starts with a dot, it matches all subdomains, but not
+# the domain itself. Separate multiple domains by space or comma.
+#
+#SRS_EXCLUDE_DOMAINS=.example.com,example.org
+
+# First separator character after SRS0 or SRS1.
+# Can be one of: -+=
+SRS_SEPARATOR==
+
+# Secret key to sign rewritten addresses.
+# When postsrsd is installed for the first time, a random secret is generated
+# and stored in /etc/postsrsd.secret. For most installations, that's just fine.
+#
+SRS_SECRET=/etc/postsrsd.secret
+
+# Length of hash to be used in rewritten addresses
+SRS_HASHLENGTH=4
+
+# Minimum length of hash to accept when validating return addresses.
+# When increasing SRS_HASHLENGTH, set this to its previous value and
+# wait for the duration of SRS return address validity (21 days) before
+# increading this value as well.
+SRS_HASHMIN=4
+
+# Local ports for TCP list.
+# These ports are used to bind the TCP list for postfix. If you change
+# these, you have to modify the postfix settings accordingly. The ports
+# are bound to the loopback interface, and should never be exposed on
+# the internet.
+#
+SRS_FORWARD_PORT=10001
+SRS_REVERSE_PORT=10002
+
+# Drop root privileges and run as another user after initialization.
+# This is highly recommended as postsrsd handles untrusted input.
+#
+RUN_AS=nobody
+
+# Bind to this address
+#
+SRS_LISTEN_ADDR=127.0.0.1
+
+# Jail daemon in chroot environment
+#
+CHROOT=/var/lib/postsrsd
+
+# Additional Options
+# PostSRSd understands a few rarely needed extra options:
+# -A     always rewrite email addresses, even from SRS_DOMAIN
+# -t<n>  set connection timeout to <n> seconds (default: 1800)
+#
+#SRS_EXTRA_OPTIONS=-A

diff --git a/mail-filter/postsrsd/postsrsd-2.0.11.ebuild b/mail-filter/postsrsd/postsrsd-2.0.11.ebuild
new file mode 100644
index 000000000000..7e751da2513a
--- /dev/null
+++ b/mail-filter/postsrsd/postsrsd-2.0.11.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake systemd
+
+DESCRIPTION="Postfix Sender Rewriting Scheme daemon"
+HOMEPAGE="https://github.com/roehling/postsrsd"
+SRC_URI="https://github.com/roehling/postsrsd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+# See REUSE.toml; GPL-3 for the main software, BSD for src/sha*.
+LICENSE="GPL-3 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-libs/confuse:="
+DEPEND="
+	${RDEPEND}
+	test? (
+		dev-libs/check
+	)
+"
+
+CHROOT_DIR="${EPREFIX}/var/lib/postsrsd"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.0.11-docdir.patch
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_TESTING=$(usex test)
+
+		-DPOSTSRSD_CHROOTDIR="${CHROOT_DIR}"
+		-DSYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
+
+		-DINSTALL_SYSTEMD_SERVICE=ON
+		# https://github.com/roehling/postsrsd/blob/main/doc/packaging.rst#third-party-dependencies
+		-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS
+		# We don't want to run tests with sanitizers. They're
+		# unreliable under sandbox and don't run on all platforms
+		-DTESTS_WITH_ASAN=OFF
+
+		-DWITH_MILTER=OFF
+		-DWITH_SQLITE=OFF
+		-DWITH_REDIS=OFF
+	)
+
+	cmake_src_configure
+}
+
+src_install() {
+	cmake_src_install
+
+	newinitd "${FILESDIR}"/postsrsd.init-r2 postsrsd
+	newconfd "${FILESDIR}"/postsrsd.confd postsrsd
+	keepdir "${CHROOT_DIR}"
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-12 20:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-12 20:12 [gentoo-commits] repo/gentoo:master commit in: mail-filter/postsrsd/files/, mail-filter/postsrsd/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2016-04-13 14:17 Dirkjan Ochtman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox