1 |
commit: 3573c36b138dade9a2b547012bfc79ff4745dc78 |
2 |
Author: Ralph Seichter <github <AT> seichter <DOT> de> |
3 |
AuthorDate: Sun Jan 30 17:42:41 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 31 00:58:17 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3573c36b |
7 |
|
8 |
mail-filter/amavisd-new: Bump to version 2.12.2 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/829582 |
11 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
12 |
Signed-off-by: Ralph Seichter <gentoo <AT> seichter.de> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/24024 |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
mail-filter/amavisd-new/Manifest | 1 + |
17 |
mail-filter/amavisd-new/amavisd-new-2.12.2.ebuild | 186 ++++++++++++++++++++++ |
18 |
2 files changed, 187 insertions(+) |
19 |
|
20 |
diff --git a/mail-filter/amavisd-new/Manifest b/mail-filter/amavisd-new/Manifest |
21 |
index fccc10b76617..5942e382bbb0 100644 |
22 |
--- a/mail-filter/amavisd-new/Manifest |
23 |
+++ b/mail-filter/amavisd-new/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST amavis-v2.12.1.tar.bz2 874339 BLAKE2B 23197298c448bae7bfaed62fda5065f507556737250caddde0d3bdec5fe219ab8834d4cbb1e06f443f2fc00b643d12d96447f58f37198b3ae7b96985f29ef2bf SHA512 8a2cef6ff6e2fa7f5d2e00a433a3f3ec7a15c47e21deadf6a25f50e0e29ad20d8641f474cd5d0dfcd3715458b07f08272f6df35efb2137b7c6a74a460cb91013 |
26 |
+DIST amavis-v2.12.2.tar.bz2 874946 BLAKE2B 0b52cb23e11d0b7b346e53b979b580b76f51ce22516a8e2ef6c6d579f1693a9d175ebd92e9cba74e4bed68b012250808e2f827182dddf5addbbb40f2602294f7 SHA512 8a6ab4441a9ef2ee757c839f656bc16f00dd9213f6cc0bb976d7f2b76793adf023d33a42099f07b0dae13281171db9ba0405028882a86e2230126e8d6a29a4ff |
27 |
|
28 |
diff --git a/mail-filter/amavisd-new/amavisd-new-2.12.2.ebuild b/mail-filter/amavisd-new/amavisd-new-2.12.2.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..f1305667633c |
31 |
--- /dev/null |
32 |
+++ b/mail-filter/amavisd-new/amavisd-new-2.12.2.ebuild |
33 |
@@ -0,0 +1,186 @@ |
34 |
+# Copyright 1999-2022 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+inherit systemd |
40 |
+ |
41 |
+DESCRIPTION="High-performance interface between the MTA and content checkers" |
42 |
+HOMEPAGE="https://gitlab.com/amavis/amavis" |
43 |
+SRC_URI="https://gitlab.com/amavis/amavis/-/archive/v${PV}/amavis-v${PV}.tar.bz2" |
44 |
+ |
45 |
+LICENSE="GPL-2 BSD-2" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" |
48 |
+IUSE="clamav courier dkim ldap mysql postgres qmail razor rspamd rspamd-https snmp spamassassin" |
49 |
+ |
50 |
+MY_RSPAMD_DEPEND="dev-perl/HTTP-Message |
51 |
+ dev-perl/JSON |
52 |
+ dev-perl/LWP-UserAgent-Determined" |
53 |
+DEPEND="acct-user/amavis" |
54 |
+RDEPEND="${DEPEND} |
55 |
+ app-arch/arc |
56 |
+ app-arch/bzip2 |
57 |
+ app-arch/cabextract |
58 |
+ app-arch/cpio |
59 |
+ app-arch/gzip |
60 |
+ app-arch/lha |
61 |
+ app-arch/lrzip |
62 |
+ app-arch/lzop |
63 |
+ app-arch/ncompress |
64 |
+ app-arch/p7zip |
65 |
+ app-arch/pax |
66 |
+ app-arch/arj |
67 |
+ app-arch/unrar |
68 |
+ app-arch/xz-utils |
69 |
+ app-arch/zoo |
70 |
+ dev-lang/perl:* |
71 |
+ dev-perl/Archive-Zip |
72 |
+ dev-perl/BerkeleyDB |
73 |
+ dev-perl/Convert-BinHex |
74 |
+ dev-perl/File-LibMagic |
75 |
+ dev-perl/IO-Socket-SSL |
76 |
+ dev-perl/IO-stringy |
77 |
+ >=dev-perl/Mail-DKIM-0.31 |
78 |
+ >=dev-perl/MailTools-1.58 |
79 |
+ >=dev-perl/MIME-tools-5.415 |
80 |
+ dev-perl/Net-LibIDN |
81 |
+ >=dev-perl/Net-Server-0.91 |
82 |
+ dev-perl/Net-SSLeay |
83 |
+ dev-perl/Unix-Syslog |
84 |
+ net-mail/ripole |
85 |
+ net-mail/tnef |
86 |
+ >=sys-apps/coreutils-5.0-r3 |
87 |
+ >=sys-libs/db-4.4.20 |
88 |
+ virtual/mta |
89 |
+ virtual/perl-Compress-Raw-Zlib |
90 |
+ virtual/perl-Digest-MD5 |
91 |
+ virtual/perl-File-Temp |
92 |
+ virtual/perl-IO-Compress |
93 |
+ virtual/perl-IO-Socket-IP |
94 |
+ virtual/perl-MIME-Base64 |
95 |
+ virtual/perl-Time-HiRes |
96 |
+ clamav? ( app-antivirus/clamav ) |
97 |
+ ldap? ( >=dev-perl/perl-ldap-0.33 ) |
98 |
+ mysql? ( dev-perl/DBD-mysql ) |
99 |
+ postgres? ( dev-perl/DBD-Pg ) |
100 |
+ razor? ( mail-filter/razor ) |
101 |
+ rspamd? ( ${MY_RSPAMD_DEPEND} ) |
102 |
+ rspamd-https? ( ${MY_RSPAMD_DEPEND} |
103 |
+ dev-perl/LWP-Protocol-https |
104 |
+ dev-perl/Net-SSLeay ) |
105 |
+ snmp? ( net-analyzer/net-snmp[perl] ) |
106 |
+ spamassassin? ( mail-filter/spamassassin dev-perl/Image-Info )" |
107 |
+ |
108 |
+AMAVIS_ROOT="/var/lib/amavishome" |
109 |
+S="${WORKDIR}/amavis-v${PV}" |
110 |
+ |
111 |
+src_prepare() { |
112 |
+ if use courier ; then |
113 |
+ eapply -p0 amavisd-new-courier.patch |
114 |
+ fi |
115 |
+ |
116 |
+ if use qmail ; then |
117 |
+ eapply -p0 amavisd-new-qmqpqq.patch |
118 |
+ fi |
119 |
+ |
120 |
+ # We need to fix the daemon_user and daemon_group in amavis-mc even |
121 |
+ # though we're going to run it in the foreground, because it calls |
122 |
+ # "drop_priv" unconditionally and will crash if its user/group |
123 |
+ # doesn't exist. |
124 |
+ sed -i \ |
125 |
+ -e '/daemon/s/vscan/amavis/' \ |
126 |
+ -e "s:'/var/virusmails':\"\$MYHOME/quarantine\":" \ |
127 |
+ "${S}/amavisd.conf" "${S}/amavis-mc" || die "missing conf file" |
128 |
+ |
129 |
+ if ! use dkim ; then |
130 |
+ sed -i -e '/enable_dkim/s/1/0/' "${S}/amavisd.conf" \ |
131 |
+ || die "missing conf file - dkim" |
132 |
+ fi |
133 |
+ |
134 |
+ if ! use spamassassin ; then |
135 |
+ sed -i -e \ |
136 |
+ "/^#[[:space:]]*@bypass_spam_checks_maps[[:space:]]*=[[:space:]]*(1)/s/^#//" \ |
137 |
+ "${S}/amavisd.conf" || die "missing conf file - sa" |
138 |
+ fi |
139 |
+ |
140 |
+ eapply_user |
141 |
+} |
142 |
+ |
143 |
+src_install() { |
144 |
+ dosbin amavisd{,-agent,-nanny,-release,-signer,-status} |
145 |
+ dobin p0f-analyzer.pl amavisd-submit |
146 |
+ |
147 |
+ if use snmp ; then |
148 |
+ dosbin amavisd-snmp-subagent |
149 |
+ newinitd "${FILESDIR}/amavisd-snmp-subagent.initd" \ |
150 |
+ amavisd-snmp-subagent |
151 |
+ dodoc AMAVIS-MIB.txt |
152 |
+ fi |
153 |
+ |
154 |
+ if use ldap ; then |
155 |
+ insinto /etc/openldap/schema |
156 |
+ newins LDAP.schema "${PN}.schema" |
157 |
+ fi |
158 |
+ |
159 |
+ # The config file should be root:amavis so that the amavis user can |
160 |
+ # read (only) it after dropping privileges. And of course he should |
161 |
+ # own everything in his home directory. |
162 |
+ insinto /etc |
163 |
+ insopts -m0640 -g amavis |
164 |
+ doins amavisd.conf |
165 |
+ |
166 |
+ # Implementation detail? Keepdir calls dodir under the hood. |
167 |
+ diropts -o amavis -g amavis |
168 |
+ keepdir "${AMAVIS_ROOT}"/{,db,quarantine,tmp,var} |
169 |
+ |
170 |
+ # BEWARE: |
171 |
+ # |
172 |
+ # Anything below this line is using the mangled insopts/diropts from |
173 |
+ # above! |
174 |
+ # |
175 |
+ |
176 |
+ newinitd "${FILESDIR}/amavisd.initd-r2" amavisd |
177 |
+ |
178 |
+ systemd_newunit "${FILESDIR}/amavisd.service-r1" amavisd.service |
179 |
+ |
180 |
+ dodoc AAAREADME.first INSTALL MANIFEST RELEASE_NOTES TODO \ |
181 |
+ amavisd.conf-default amavisd-custom.conf |
182 |
+ |
183 |
+ docinto README_FILES |
184 |
+ dodoc README_FILES/README* |
185 |
+ dodoc -r README_FILES/*.{html,css} |
186 |
+ docinto README_FILES/images |
187 |
+ dodoc README_FILES/images/*.png |
188 |
+ docinto README_FILES/images/callouts |
189 |
+ dodoc README_FILES/images/callouts/*.png |
190 |
+ |
191 |
+ docinto test-messages |
192 |
+ dodoc test-messages/README |
193 |
+ dodoc test-messages/sample.tar.gz.compl |
194 |
+} |
195 |
+ |
196 |
+pkg_preinst() { |
197 |
+ # TODO: the following is done as root, but should probably be done |
198 |
+ # as the amavis user. |
199 |
+ if use razor ; then |
200 |
+ if [ ! -d "${ROOT}${AMAVIS_ROOT}/.razor" ] ; then |
201 |
+ elog "Setting up initial razor config files..." |
202 |
+ |
203 |
+ razor-admin -create -home="${D}/${AMAVIS_ROOT}/.razor" |
204 |
+ sed -i -e "s:debuglevel\([ ]*\)= .:debuglevel\1= 0:g" \ |
205 |
+ "${D}/${AMAVIS_ROOT}/.razor/razor-agent.conf" || die |
206 |
+ fi |
207 |
+ fi |
208 |
+} |
209 |
+ |
210 |
+pkg_postinst() { |
211 |
+ local d="/var/amavis" |
212 |
+ if [ -d ${d} ]; then |
213 |
+ elog "Existing data found. Please make sure to manually copy it to amavis' new" |
214 |
+ elog "home directory by executing the following command as root from a shell:" |
215 |
+ elog |
216 |
+ elog " cp -a ${d}/* ${d}/.??* ${AMAVIS_ROOT}/ && rm -r ${d}" |
217 |
+ elog |
218 |
+ fi |
219 |
+} |