1 |
commit: 2dfc2acbfa522a31a773c916822caba20cfe3222 |
2 |
Author: Guillaume Castagnino <casta <AT> xwing <DOT> info> |
3 |
AuthorDate: Sun Nov 14 13:01:23 2021 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 24 08:07:35 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dfc2acb |
7 |
|
8 |
mail-filter/spampd: bump to 2.61 |
9 |
|
10 |
- add systemd support with gentoo override |
11 |
- grab patch from Fedora |
12 |
|
13 |
Note: perl is needed at build (moving from RDEPEND) for manpage |
14 |
generation (pod2man) |
15 |
|
16 |
Closes: https://bugs.gentoo.org/761855 |
17 |
Signed-off-by: Guillaume Castagnino <casta <AT> xwing.info> |
18 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
19 |
Closes: https://github.com/gentoo/gentoo/pull/22947 |
20 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
21 |
|
22 |
mail-filter/spampd/Manifest | 1 + |
23 |
mail-filter/spampd/files/init | 8 ++-- |
24 |
.../spampd/files/spampd-2.61-no-pid-file.patch | 11 ++++++ |
25 |
mail-filter/spampd/files/spampd.service | 11 ++++++ |
26 |
mail-filter/spampd/files/spampd.service.conf | 5 +++ |
27 |
mail-filter/spampd/spampd-2.61.ebuild | 46 ++++++++++++++++++++++ |
28 |
6 files changed, 78 insertions(+), 4 deletions(-) |
29 |
|
30 |
diff --git a/mail-filter/spampd/Manifest b/mail-filter/spampd/Manifest |
31 |
index 5c8eb31c7cee..223906db8157 100644 |
32 |
--- a/mail-filter/spampd/Manifest |
33 |
+++ b/mail-filter/spampd/Manifest |
34 |
@@ -1 +1,2 @@ |
35 |
DIST spampd-2.42.tar.gz 202504 BLAKE2B 9ad74d3199345ba54c613fa928cfd177fded551ca304dd22c802b996b95e2905d40d92bfa25d7c64b823b2357c657f283c9550b635f3188fbbb42fb793cd2b8d SHA512 5c44b5902efd6c628fb62887b755012b137940d7d687f5d9489e5f96623d6eeca5f3641a76fe3b2ce8585040c3661e19df981c612cdb1a767b4a46fec982fa4e |
36 |
+DIST spampd-2.61.tar.gz 246956 BLAKE2B de2b428fbed80ba6d65bd2b249a3adfb00cd0a33df21b71676da1949b680dbfee72412ae2c752f4e5dcf9f7f7349ae59ce94f81b2abae5fd4de34d3a92954fbb SHA512 e2f84c4b24648d4f4db70174f04b72981faa1c54ffc4bbc433d14c730ef4ad7fd4cd3772a476f25be0bee103e951700d038634d14848f1eb90849d1a6655199b |
37 |
|
38 |
diff --git a/mail-filter/spampd/files/init b/mail-filter/spampd/files/init |
39 |
index 7a5171e46034..339a938d9c7d 100644 |
40 |
--- a/mail-filter/spampd/files/init |
41 |
+++ b/mail-filter/spampd/files/init |
42 |
@@ -1,5 +1,5 @@ |
43 |
#!/sbin/openrc-run |
44 |
-# Copyright 1999-2014 Gentoo Foundation |
45 |
+# Copyright 1999-2021 Gentoo Authors |
46 |
# Distributed under the terms of the GNU General Public License v2 |
47 |
|
48 |
# Note: spampd configuration file is /etc/conf.d/spampd |
49 |
@@ -10,14 +10,14 @@ depend() { |
50 |
|
51 |
start() { |
52 |
ebegin "Starting spampd" |
53 |
- start-stop-daemon --start --quiet \ |
54 |
- --exec /usr/sbin/spampd -- --pid=/var/run/spampd.pid \ |
55 |
+ start-stop-daemon --start --quiet --interpreted \ |
56 |
+ --exec /usr/sbin/spampd -- --pid=/run/spampd.pid \ |
57 |
${SPAMPD_OPTS} |
58 |
eend $? "Failed to start spampd" |
59 |
} |
60 |
|
61 |
stop() { |
62 |
ebegin "Stopping spampd" |
63 |
- start-stop-daemon --stop --quiet --pidfile /var/run/spampd.pid |
64 |
+ start-stop-daemon --stop --quiet --retry 60 --pidfile /run/spampd.pid |
65 |
eend $? "Failed to stop spampd" |
66 |
} |
67 |
|
68 |
diff --git a/mail-filter/spampd/files/spampd-2.61-no-pid-file.patch b/mail-filter/spampd/files/spampd-2.61-no-pid-file.patch |
69 |
new file mode 100644 |
70 |
index 000000000000..b5151e11f8a5 |
71 |
--- /dev/null |
72 |
+++ b/mail-filter/spampd/files/spampd-2.61-no-pid-file.patch |
73 |
@@ -0,0 +1,11 @@ |
74 |
+diff -ruN spampd-2.61-v/spampd.pl spampd-2.61/spampd.pl |
75 |
+--- spampd-2.61-v/spampd.pl 2021-08-07 06:01:37.000000000 +1000 |
76 |
++++ spampd-2.61/spampd.pl 2021-08-13 03:48:34.527166029 +1000 |
77 |
+@@ -761,6 +761,7 @@ |
78 |
+ |
79 |
+ # Set misc. options based on other options. |
80 |
+ $srv_p->{setsid}= 0 if !$srv_p->{background}; |
81 |
++ $srv_p->{pid_file} = undef if !$srv_p->{background}; |
82 |
+ $sa_p->{home_dir_for_helpers} = $sa_p->{userstate_dir}; |
83 |
+ $sa_p->{username} = $srv_p->{user}; |
84 |
+ } |
85 |
|
86 |
diff --git a/mail-filter/spampd/files/spampd.service b/mail-filter/spampd/files/spampd.service |
87 |
new file mode 100644 |
88 |
index 000000000000..78ef5520323c |
89 |
--- /dev/null |
90 |
+++ b/mail-filter/spampd/files/spampd.service |
91 |
@@ -0,0 +1,11 @@ |
92 |
+[Unit] |
93 |
+Description=SpamAssassin Proxy Daemon |
94 |
+Before=mail-transfer-agent.target |
95 |
+After=syslog.target network.target |
96 |
+ |
97 |
+[Service] |
98 |
+ExecStart=/usr/sbin/spampd --nodetach $SPAMPD_OPTS |
99 |
+ExecReload=/bin/kill -HUP $MAINPID |
100 |
+ |
101 |
+[Install] |
102 |
+WantedBy=multi-user.target |
103 |
|
104 |
diff --git a/mail-filter/spampd/files/spampd.service.conf b/mail-filter/spampd/files/spampd.service.conf |
105 |
new file mode 100644 |
106 |
index 000000000000..1c2d9c1154e1 |
107 |
--- /dev/null |
108 |
+++ b/mail-filter/spampd/files/spampd.service.conf |
109 |
@@ -0,0 +1,5 @@ |
110 |
+[Service] |
111 |
+User=mail |
112 |
+Group=mail |
113 |
+Environment="SPAMPD_OPTS=--host=localhost:10025 --relayhost=localhost:10026 --tagall --set-envelope-from" |
114 |
+ |
115 |
|
116 |
diff --git a/mail-filter/spampd/spampd-2.61.ebuild b/mail-filter/spampd/spampd-2.61.ebuild |
117 |
new file mode 100644 |
118 |
index 000000000000..213b260d1f58 |
119 |
--- /dev/null |
120 |
+++ b/mail-filter/spampd/spampd-2.61.ebuild |
121 |
@@ -0,0 +1,46 @@ |
122 |
+# Copyright 1999-2021 Gentoo Authors |
123 |
+# Distributed under the terms of the GNU General Public License v2 |
124 |
+ |
125 |
+EAPI=8 |
126 |
+ |
127 |
+inherit systemd |
128 |
+ |
129 |
+DESCRIPTION="spampd is a program to scan messages for Unsolicited Commercial E-mail content" |
130 |
+HOMEPAGE="http://www.worlddesign.com/index.cfm/rd/mta/spampd.htm" |
131 |
+SRC_URI="https://github.com/mpaperno/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
132 |
+ |
133 |
+LICENSE="GPL-2" |
134 |
+SLOT="0" |
135 |
+KEYWORDS="~amd64 ~ppc ~x86" |
136 |
+IUSE="" |
137 |
+ |
138 |
+RDEPEND="acct-group/mail |
139 |
+ acct-user/mail |
140 |
+ dev-lang/perl |
141 |
+ dev-perl/Net-Server |
142 |
+ mail-filter/spamassassin |
143 |
+ virtual/perl-IO-Socket-IP" |
144 |
+DEPEND="${RDEPEND}" |
145 |
+BDEPEND="" |
146 |
+ |
147 |
+PATCHES=( |
148 |
+ "${FILESDIR}/${P}-no-pid-file.patch" |
149 |
+) |
150 |
+ |
151 |
+src_compile() { |
152 |
+ mv ${PN}.pl ${PN} |
153 |
+ pod2man ${PN}.pod > ${PN}.1 |
154 |
+} |
155 |
+ |
156 |
+src_install() { |
157 |
+ dosbin ${PN} |
158 |
+ |
159 |
+ dodoc changelog.txt |
160 |
+ doman ${PN}.1 |
161 |
+ |
162 |
+ newinitd "${FILESDIR}"/init spampd |
163 |
+ newconfd "${FILESDIR}"/conf spampd |
164 |
+ |
165 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
166 |
+ systemd_install_serviced "${FILESDIR}/${PN}.service.conf" |
167 |
+} |