Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/
Date: Mon, 01 Aug 2022 08:35:12
Message-Id: 1659342879.5665b1f132fb621b9aee5c9bb5b524792f94e9c1.flow@gentoo
1 commit: 5665b1f132fb621b9aee5c9bb5b524792f94e9c1
2 Author: Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift <DOT> com>
3 AuthorDate: Sun Jul 31 13:09:19 2022 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 1 08:34:39 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5665b1f1
7
8 mail-filter/spamassassin: remove 3.4.5-r1 (cleanup)
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep <AT> parallaxshift.com>
12 Closes: https://github.com/gentoo/gentoo/pull/26684
13 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
14
15 mail-filter/spamassassin/Manifest | 1 -
16 .../spamassassin/spamassassin-3.4.5-r1.ebuild | 321 ---------------------
17 2 files changed, 322 deletions(-)
18
19 diff --git a/mail-filter/spamassassin/Manifest b/mail-filter/spamassassin/Manifest
20 index 597871620b1a..694cc4ed4e81 100644
21 --- a/mail-filter/spamassassin/Manifest
22 +++ b/mail-filter/spamassassin/Manifest
23 @@ -1,2 +1 @@
24 -DIST Mail-SpamAssassin-3.4.5.tar.bz2 6167088 BLAKE2B d99c9e40f6735328b5300f010f248d35a8a8dcd3a3692a8db909234b8de3a5e432d004cf09f7ddb8b2ae82144525ce1ab25d89df92b621d8e119e2128e59cce6 SHA512 46096019ef3d2b6dadb7af0d076c22526786cccb669cd4bed131b64fa935863630ca9f3e78277bebba0ed75099be9fbce97a30a6478ed84093896a1ad3d8387a
25 DIST Mail-SpamAssassin-3.4.6.tar.bz2 6166807 BLAKE2B aa25c9e81f570d35e8594ba6d6da70c7b846737513bd4d6d2d410872c58ab7cbe7ade6a109a71bdbb6dbaf7aee8eb48520e7de929b27e83546401f3692aeb0c3 SHA512 bb53ba928917b02071b2e6690a11240e1af503334f292c870a8c49c24b0a58b44c78f827e2f43e71a3ce920481fa0e1e62b78a39452658c57d18f4e11daeb593
26
27 diff --git a/mail-filter/spamassassin/spamassassin-3.4.5-r1.ebuild b/mail-filter/spamassassin/spamassassin-3.4.5-r1.ebuild
28 deleted file mode 100644
29 index fb0dd65e00c3..000000000000
30 --- a/mail-filter/spamassassin/spamassassin-3.4.5-r1.ebuild
31 +++ /dev/null
32 @@ -1,321 +0,0 @@
33 -# Copyright 1999-2021 Gentoo Authors
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI=7
37 -
38 -inherit perl-functions systemd toolchain-funcs
39 -
40 -MY_P="Mail-SpamAssassin-${PV//_/-}"
41 -S="${WORKDIR}/${MY_P}"
42 -DESCRIPTION="An extensible mail filter which can identify and tag spam"
43 -HOMEPAGE="https://spamassassin.apache.org/"
44 -SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
45 -
46 -LICENSE="Apache-2.0 GPL-2"
47 -SLOT="0"
48 -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
49 -IUSE="berkdb cron ipv6 ldap mysql postgres qmail sqlite ssl test"
50 -RESTRICT="!test? ( test )"
51 -
52 -# The Makefile.PL script checks for dependencies, but only fails if a
53 -# required (i.e. not optional) dependency is missing. We therefore
54 -# require most of the optional modules only at runtime.
55 -REQDEPEND="acct-user/spamd
56 - acct-group/spamd
57 - dev-lang/perl:=
58 - dev-perl/HTML-Parser
59 - dev-perl/Net-DNS
60 - dev-perl/NetAddr-IP
61 - virtual/perl-Archive-Tar
62 - virtual/perl-Digest-SHA
63 - virtual/perl-IO-Zlib
64 - virtual/perl-Time-HiRes
65 - ssl? (
66 - dev-libs/openssl:0=
67 - )"
68 -
69 -# SpamAssassin doesn't use libwww-perl except as a fallback for when
70 -# curl/wget are missing, so we depend on one of those instead. Some
71 -# mirrors use https, so we need those utilities to support SSL.
72 -#
73 -# re2c is needed to compile the rules (sa-compile).
74 -#
75 -# We still need the old Digest-SHA1 because razor2 has not been ported
76 -# to Digest-SHA.
77 -OPTDEPEND="app-crypt/gnupg
78 - dev-perl/BSD-Resource
79 - dev-perl/Digest-SHA1
80 - dev-perl/Encode-Detect
81 - || ( dev-perl/GeoIP2 dev-perl/Geo-IP )
82 - dev-perl/HTTP-Date
83 - dev-perl/Mail-DKIM
84 - dev-perl/Mail-SPF
85 - dev-perl/Net-Patricia
86 - dev-perl/Net-CIDR-Lite
87 - dev-util/re2c
88 - || ( net-misc/wget[ssl] net-misc/curl[ssl] )
89 - virtual/perl-MIME-Base64
90 - dev-perl/Pod-Parser
91 - berkdb? ( virtual/perl-DB_File )
92 - ipv6? ( dev-perl/IO-Socket-INET6 )
93 - ldap? ( dev-perl/perl-ldap )
94 - mysql? (
95 - dev-perl/DBI
96 - dev-perl/DBD-mysql
97 - )
98 - postgres? (
99 - dev-perl/DBI
100 - dev-perl/DBD-Pg
101 - )
102 - sqlite? (
103 - dev-perl/DBI
104 - dev-perl/DBD-SQLite
105 - )
106 - ssl? ( dev-perl/IO-Socket-SSL )"
107 -
108 -DEPEND="${REQDEPEND}
109 - test? (
110 - ${OPTDEPEND}
111 - virtual/perl-Test-Harness
112 - )"
113 -RDEPEND="${REQDEPEND} ${OPTDEPEND}"
114 -
115 -PATCHES=(
116 - "${FILESDIR}/mention-geoip.cf-in-init.pre.patch"
117 -)
118 -
119 -# There are a few renames and use-dependent ones in src_istall as well.
120 -DOCS=(
121 - NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes
122 - sql/README.awl procmailrc.example sample-nonspam.txt
123 - sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail
124 - spamd-apache2/README.apache
125 -)
126 -
127 -src_prepare() {
128 - default
129 -
130 - # The sa_compile test does some weird stuff like hopping around in
131 - # the directory tree and calling "make" to create a dist tarball
132 - # from ${S}. It fails, and is more trouble than it's worth...
133 - perl_rm_files t/sa_compile.t
134 -
135 - # The spamc tests (which need the networked spamd daemon) fail for
136 - # irrelevant reasons. It's too hard to disable them (unlike the
137 - # spamd tests themselves -- see src_test), so use a crude
138 - # workaround.
139 - perl_rm_files t/spamc_*.t
140 -
141 - # Some tests need extra dependencies
142 - # e.g. t/sql_based_whitelist.t needs DBD
143 - # This is kinder than REQUIRED_USE for tests which hurts automation
144 - if ! use mysql && ! use postgres && ! use sqlite ; then
145 - perl_rm_files t/sql_based_whitelist.t
146 - fi
147 -
148 - # Disable plugin by default
149 - sed -i -e 's/^loadplugin/\#loadplugin/g' \
150 - "rules/init.pre" \
151 - || die "failed to disable plugins by default"
152 -}
153 -
154 -src_configure() {
155 - # This is how and where the perl-module eclass disables the
156 - # MakeMaker interactive prompt.
157 - export PERL_MM_USE_DEFAULT=1
158 -
159 - # Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
160 - # (just to be sure, nobody knows how it could happen in the first place).
161 - #
162 - # We also set the path to the perl executable explictly. This will be
163 - # used to create the initial shebang line in the scripts (bug 62276).
164 - perl Makefile.PL \
165 - PREFIX="${EPREFIX}/usr" \
166 - INSTALLDIRS=vendor \
167 - SYSCONFDIR="${EPREFIX}/etc" \
168 - DATADIR="${EPREFIX}/usr/share/spamassassin" \
169 - PERL_BIN="${EPREFIX}/usr/bin/perl" \
170 - ENABLE_SSL="$(usex ssl)" \
171 - DESTDIR="${D}" \
172 - || die 'failed to create a Makefile using Makefile.PL'
173 -
174 - # Now configure spamc.
175 - emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
176 -}
177 -
178 -src_compile() {
179 - emake
180 - use qmail && emake spamc/qmail-spamc
181 -}
182 -
183 -src_install () {
184 - default
185 -
186 - # Create the stub dir used by sa-update and friends
187 - keepdir /var/lib/spamassassin
188 -
189 - # Move spamd to sbin where it belongs.
190 - dodir /usr/sbin
191 - mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd || die "move spamd failed"
192 -
193 - if use qmail; then
194 - dobin spamc/qmail-spamc
195 - fi
196 -
197 - dosym mail/spamassassin /etc/spamassassin
198 -
199 - # Add the init and config scripts.
200 - newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
201 - newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
202 -
203 - systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
204 - systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
205 - "${PN}.service"
206 -
207 - use postgres && dodoc sql/*_pg.sql
208 - use mysql && dodoc sql/*_mysql.sql
209 - use qmail && dodoc spamc/README.qmail
210 -
211 - # Rename some files so that they don't clash with others.
212 - newdoc spamd/README README.spamd
213 - newdoc sql/README README.sql
214 - newdoc ldap/README README.ldap
215 -
216 - insinto /etc/mail/spamassassin/
217 - doins "${FILESDIR}"/geoip.cf
218 - insopts -m0400
219 - newins "${FILESDIR}"/secrets.cf secrets.cf.example
220 -
221 - # Create the directory where sa-update stores its GPG key (if you
222 - # choose to import one). If this directory does not exist, the
223 - # import will fail. This is bug 396307. We expect that the import
224 - # will be performed as root, and making the directory accessible
225 - # only to root prevents a warning on the command-line.
226 - diropts -m0700
227 - dodir /etc/mail/spamassassin/sa-update-keys
228 -
229 - if use cron; then
230 - # Install the cron job if they want it.
231 - exeinto /etc/cron.daily
232 - newexe "${FILESDIR}/update-spamassassin-rules-r1.cron" \
233 - update-spamassassin-rules
234 - fi
235 -
236 - # Remove perllocal.pod to avoid file collisions (bug #603338).
237 - perl_delete_localpod
238 -
239 - # The perl-module eclass calls three other functions to clean
240 - # up in src_install. The first fixes references to ${D} in the
241 - # packlist, and is useful to us, too. The other two functions,
242 - # perl_delete_emptybsdir and perl_remove_temppath, don't seem
243 - # to be needed: there are no empty directories, *.bs files, or
244 - # ${D} paths remaining in our installed image.
245 - perl_fix_packlist
246 -}
247 -
248 -src_test() {
249 - # Trick the test suite into skipping the spamd tests. Setting
250 - # SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
251 - # set in SATest.pm.
252 - export SPAMD_HOST=disabled
253 - default
254 -}
255 -
256 -pkg_preinst() {
257 - if use mysql || use postgres ; then
258 - local _awlwarn=0
259 - local _v
260 - for _v in ${REPLACING_VERSIONS}; do
261 - if ver_test "${_v}" -lt "3.4.3"; then
262 - _awlwarn=1
263 - break
264 - fi
265 - done
266 - if [[ ${_awlwarn} == 1 ]] ; then
267 - ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
268 - ewarn 'You will need to manually ALTER your tables for them to'
269 - ewarn 'continue working. See the UPGRADE documentation for'
270 - ewarn 'details.'
271 - ewarn
272 - fi
273 - fi
274 -}
275 -
276 -pkg_postinst() {
277 - elog
278 - elog 'No rules are installed by default. You will need to run sa-update'
279 - elog 'at least once, and most likely configure SpamAssassin before it'
280 - elog 'will work.'
281 -
282 - if ! use cron; then
283 - elog
284 - elog 'You should consider a cron job for sa-update. One is provided'
285 - elog 'for daily updates if you enable the "cron" USE flag.'
286 - fi
287 - elog
288 - elog 'Configuration and update help can be found on the wiki:'
289 - elog
290 - elog ' https://wiki.gentoo.org/wiki/SpamAssassin'
291 - elog
292 -
293 - if use mysql || use postgres ; then
294 - local _v
295 - for _v in ${REPLACING_VERSIONS}; do
296 - if ver_test "${_v}" -lt "3.4.3"; then
297 - ewarn
298 - ewarn 'If you used AWL before 3.4.3, the SQL schema has changed.'
299 - ewarn 'You will need to manually ALTER your tables for them to'
300 - ewarn 'continue working. See the UPGRADE documentation for'
301 - ewarn 'details.'
302 - ewarn
303 -
304 - # show this only once
305 - break
306 - fi
307 - done
308 - fi
309 -
310 - ewarn 'If this version of SpamAssassin causes permissions issues'
311 - ewarn 'with your user configurations or bayes databases, then you'
312 - ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
313 - ewarn 'configuration file, or remove the --username and --groupname'
314 - ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
315 - ewarn 'configuration file.'
316 -
317 - if [[ ! ~spamd -ef "${ROOT}/var/lib/spamd" ]] ; then
318 - ewarn "The spamd user's home folder has been moved to a new location."
319 - elog
320 - elog "The acct-user/spamd package should have relocated it for you,"
321 - elog "but may have failed because your spamd daemon was running."
322 - elog
323 - elog "To fix this:"
324 - elog " - Stop your spamd daemon"
325 - elog " - emerge -1 acct-user/spamd"
326 - elog " - Restart your spamd daemon"
327 - elog " - Remove the old home folder if you want"
328 - elog " rm -rf \"${ROOT}/home/spamd\""
329 - fi
330 - if [[ -e "${ROOT}/home/spamd" ]] ; then
331 - ewarn
332 - ewarn "The spamd user's home folder has been moved to a new location."
333 - elog
334 - elog " Old Home: ${ROOT}/home/spamd"
335 - elog " New Home: ${ROOT}/var/lib/spamd"
336 - elog
337 - elog "You may wish to migrate your data to the new location:"
338 - elog " - Stop your spamd daemon"
339 - elog " - Re-emerge acct-user/spamd to ensure the home folder has been"
340 - elog " updated to the new location, now that the daemon isn't running:"
341 - elog " # emerge -1 acct-user/spamd"
342 - elog " # echo ~spamd"
343 - elog " - Migrate the contents from the old location to the new home"
344 - elog " For example:"
345 - elog " # cp -Rpi \"${ROOT}/home/spamd/\" \"${ROOT}/var/lib/\""
346 - elog " - Remove the old home folder"
347 - elog " # rm -rf \"${ROOT}/home/spamd\""
348 - elog " - Restart your spamd daemon"
349 - elog
350 - elog "If you do not wish to migrate data, you should remove the old"
351 - elog "home folder from your system as it is not used."
352 - fi
353 -}