Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/
Date: Fri, 29 Mar 2019 21:39:19
Message-Id: 1553895530.c12ddccad01d344a1b5b5ed9d5b2a0f3be9a8717.bman@gentoo
1 commit: c12ddccad01d344a1b5b5ed9d5b2a0f3be9a8717
2 Author: Aaron Bauman <bman <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 29 21:38:50 2019 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 29 21:38:50 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c12ddcca
7
8 app-antivirus/clamav: drop vulnerable
9
10 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
11
12 app-antivirus/clamav/Manifest | 2 -
13 app-antivirus/clamav/clamav-0.100.0.ebuild | 165 ---------------------------
14 app-antivirus/clamav/clamav-0.99.4-r1.ebuild | 157 -------------------------
15 app-antivirus/clamav/clamav-0.99.4-r2.ebuild | 157 -------------------------
16 4 files changed, 481 deletions(-)
17
18 diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest
19 index c47d7ddaf4f..f4cc2f425fb 100644
20 --- a/app-antivirus/clamav/Manifest
21 +++ b/app-antivirus/clamav/Manifest
22 @@ -1,7 +1,5 @@
23 -DIST clamav-0.100.0.tar.gz 16036757 BLAKE2B c51edfb05726e16e2ff1ef1fee9f174af5a0d65396f847a4f6e1246d5844b92eb70896fc598d2c73719b1315ff3c41aca503823431e0918d52f56d29399dd796 SHA512 57e1da86a32fdfb66887c4aeed03008bc070ce3cb6b881db411332f2f2e640b73dca84d990f5886526b3d6bd0c2770c7dcce5b4e7cf48323824c362452593549
24 DIST clamav-0.100.1.tar.gz 16154415 BLAKE2B df4ddde28b0b263765f4a571a407390b30aa6fe58d07e1b8fe427e70141219fb3d7c5addfbf30a350c6c08324dee1ec3dd80319306df7578ed87138c6513b99d SHA512 13a4e050e030ac3d1cc07b12bdd56c455e266e0b205a4c9bc9f18e53f6d8913a66eed2296abf857f395227ab0ed5c7bc90bc357bcb314dc9e18a9c6177dcc5b2
25 DIST clamav-0.100.2.tar.gz 15926420 BLAKE2B 0a64a08b6cdad94f55852041df06b5517bcfa3bacb5871c694bf51692c4698ffd39f09c92fe2af167fcf2b27806a7175a9b649e6d6d5ffc65755509e3574d374 SHA512 70b51eafb11dc727188e7d4554b8095a9e0406e76b78778fede94f8a4c78146034478197217039384eb1fd15532e822cfa6b51707e431e9397ec21d5e393a60c
26 DIST clamav-0.101.0.tar.gz 21686531 BLAKE2B ea3ae1e5b31d6b10600eac8f0ea93c9460f0e337de7a3f43345c26e0efb0b3f664d1f640b723795eac6491f959492202a249222b561917072811df86314ea9d8 SHA512 faf6186b51b332eca67684bfe72f473a910577093964338278656ab67c61d28f66f7f501f4db5e1bb37112d66ad4433d792c50af70aceefd5bcbc5dab7ac7aa0
27 DIST clamav-0.101.1.tar.gz 21691396 BLAKE2B e9a63ba90bef5504aac1020293f26cf957323677ed229543f0e7784b80e11837683e72432890f3109b040a2ba08029383892a6f40f64050d3caa3fe94c0571aa SHA512 eb72fe21a9485d2906aec7f9a3dc955bbe4bb0fa812d622bc9c6c5c019eb2238a7370cb5dc1ba3886764269a925f7dcbe93255c77920bb489af4f3f81680d4c8
28 DIST clamav-0.101.2.tar.gz 21722932 BLAKE2B 5c2960e678510a6f829fc9333e05a45a57a704e13eb407e0f890dd5553a1f9644eb3b1122c677755237b8c682127319d447a508087bc9130d14cd2cfec92896a SHA512 f9ea4589a8081acf7b6d454d1a068da05ae6574a9070a08f9438935795cb6dc084ffb9222b11fb1623f31962f859e6536a2f5bd1de29ef6b9b314efa5edc8c7e
29 -DIST clamav-0.99.4.tar.gz 16083015 BLAKE2B 3c2e7d11ee05fe846f75c3fb6501b5fd809a2e58f8e69c82e493e32fcbc87ca0e5b5f7ab83a0d7e251a5dc8e84aed1475c87c1248b393fa04b6924a2ab32b9bf SHA512 778d5ef510d8d4bdfac5dc33d92469ed4283c414b3d42da6e1a0b13ed70e37755d5c837622dc336bc728ba1f8bf5485fc8a8d3a67a90e9aaa9e4dc71ece0691d
30
31 diff --git a/app-antivirus/clamav/clamav-0.100.0.ebuild b/app-antivirus/clamav/clamav-0.100.0.ebuild
32 deleted file mode 100644
33 index baf3b3b8f34..00000000000
34 --- a/app-antivirus/clamav/clamav-0.100.0.ebuild
35 +++ /dev/null
36 @@ -1,165 +0,0 @@
37 -# Copyright 1999-2018 Gentoo Authors
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=6
41 -
42 -inherit autotools eutils flag-o-matic user systemd
43 -
44 -DESCRIPTION="Clam Anti-Virus Scanner"
45 -HOMEPAGE="https://www.clamav.net/"
46 -SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
47 -
48 -LICENSE="GPL-2"
49 -SLOT="0"
50 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
51 -IUSE="bzip2 doc clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs system-libmspack test uclibc"
52 -
53 -CDEPEND="bzip2? ( app-arch/bzip2 )
54 - clamdtop? ( sys-libs/ncurses:0 )
55 - iconv? ( virtual/libiconv )
56 - metadata-analysis-api? ( dev-libs/json-c:= )
57 - milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
58 - >=sys-libs/zlib-1.2.2:=
59 - !libressl? ( dev-libs/openssl:0= )
60 - libressl? ( dev-libs/libressl:0= )
61 - sys-devel/libtool
62 - || ( dev-libs/libpcre2 >dev-libs/libpcre-6 )
63 - system-libmspack? ( dev-libs/libmspack )
64 - !!<app-antivirus/clamav-0.99"
65 -# hard block clamav < 0.99 due to linking problems Bug #567680
66 -# openssl is now *required* see this link as to why
67 -# https://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
68 -DEPEND="${CDEPEND}
69 - virtual/pkgconfig
70 - test? ( dev-libs/check )"
71 -RDEPEND="${CDEPEND}
72 - selinux? ( sec-policy/selinux-clamav )"
73 -
74 -DOCS=( docs/clamdoc.pdf docs/phishsigs_howto.pdf docs/signatures.pdf )
75 -HTML_DOCS=( docs/html )
76 -
77 -PATCHES=(
78 - "${FILESDIR}/${P}_autotools.patch"
79 -)
80 -
81 -pkg_setup() {
82 - enewgroup clamav
83 - enewuser clamav -1 -1 /dev/null clamav
84 -}
85 -
86 -src_prepare() {
87 - default
88 -
89 - eautoconf
90 -}
91 -
92 -src_configure() {
93 - use ppc64 && append-flags -mminimal-toc
94 - use uclibc && export ac_cv_type_error_t=yes
95 -
96 - econf \
97 - $(use_enable bzip2) \
98 - $(use_enable clamdtop) \
99 - $(use_enable ipv6) \
100 - $(use_enable milter) \
101 - $(use_enable static-libs static) \
102 - $(use_enable test check) \
103 - $(use_with iconv) \
104 - $(use_with metadata-analysis-api libjson /usr) \
105 - $(use_with system-libmspack) \
106 - --cache-file="${S}"/config.cache \
107 - --disable-experimental \
108 - --disable-gcc-vcheck \
109 - --disable-zlib-vcheck \
110 - --enable-id-check \
111 - --with-dbdir="${EPREFIX}"/var/lib/clamav \
112 - --with-zlib="${EPREFIX}"/usr \
113 - --disable-llvm
114 -}
115 -
116 -src_install() {
117 - default
118 -
119 - rm -rf "${ED}"/var/lib/clamav
120 - newinitd "${FILESDIR}"/clamd.initd-r6 clamd
121 - newconfd "${FILESDIR}"/clamd.conf-r1 clamd
122 -
123 - systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
124 - systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
125 - systemd_dounit "${FILESDIR}/clamd.service"
126 - systemd_dounit "${FILESDIR}/freshclamd.service"
127 -
128 - keepdir /var/lib/clamav
129 - fowners clamav:clamav /var/lib/clamav
130 - keepdir /var/log/clamav
131 - fowners clamav:clamav /var/log/clamav
132 -
133 - dodir /etc/logrotate.d
134 - insinto /etc/logrotate.d
135 - newins "${FILESDIR}"/clamav.logrotate clamav
136 -
137 - # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
138 - sed -i -e "s:^\(Example\):\# \1:" \
139 - -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
140 - -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
141 - -e "s:.*\(User\) .*:\1 clamav:" \
142 - -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
143 - -e "s:^\#\(LogTime\).*:\1 yes:" \
144 - -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
145 - "${ED}"/etc/clamd.conf.sample || die
146 - sed -i -e "s:^\(Example\):\# \1:" \
147 - -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
148 - -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
149 - -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
150 - -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
151 - -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
152 - -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
153 - "${ED}"/etc/freshclam.conf.sample || die
154 -
155 - if use milter ; then
156 - # MilterSocket one to include ' /' because there is a 2nd line for
157 - # inet: which we want to leave
158 - ##dodoc "${FILESDIR}"/clamav-milter.README.gentoo
159 - sed -i -e "s:^\(Example\):\# \1:" \
160 - -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
161 - -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
162 - -e "s:.*\(User\) .*:\1 clamav:" \
163 - -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
164 - -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
165 - -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
166 - "${ED}"/etc/clamav-milter.conf.sample || die
167 - cat >> "${ED}"/etc/conf.d/clamd <<-EOF
168 - MILTER_NICELEVEL=19
169 - START_MILTER=no
170 - EOF
171 -
172 - systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
173 - fi
174 -
175 - if use doc; then
176 - einstalldocs
177 - doman docs/man/*.[1-8]
178 - fi
179 -
180 - for i in clamd freshclam clamav-milter
181 - do
182 - [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
183 - done
184 -
185 - prune_libtool_files --all
186 -}
187 -
188 -src_test() {
189 - emake quick-check
190 -}
191 -
192 -pkg_postinst() {
193 - if use milter ; then
194 - elog "For simple instructions how to setup the clamav-milter read the"
195 - elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
196 - fi
197 - if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
198 - ewarn "You must run freshclam manually to populate the virus database files"
199 - ewarn "before starting clamav for the first time.\n"
200 - fi
201 -}
202
203 diff --git a/app-antivirus/clamav/clamav-0.99.4-r1.ebuild b/app-antivirus/clamav/clamav-0.99.4-r1.ebuild
204 deleted file mode 100644
205 index 9e65d1d592f..00000000000
206 --- a/app-antivirus/clamav/clamav-0.99.4-r1.ebuild
207 +++ /dev/null
208 @@ -1,157 +0,0 @@
209 -# Copyright 1999-2018 Gentoo Authors
210 -# Distributed under the terms of the GNU General Public License v2
211 -
212 -EAPI=6
213 -
214 -inherit autotools eutils flag-o-matic user systemd
215 -
216 -DESCRIPTION="Clam Anti-Virus Scanner"
217 -HOMEPAGE="https://www.clamav.net/"
218 -SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
219 -
220 -LICENSE="GPL-2"
221 -SLOT="0"
222 -KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
223 -IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs test uclibc"
224 -
225 -CDEPEND="bzip2? ( app-arch/bzip2 )
226 - clamdtop? ( sys-libs/ncurses:0 )
227 - iconv? ( virtual/libiconv )
228 - metadata-analysis-api? ( dev-libs/json-c:= )
229 - milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
230 - >=sys-libs/zlib-1.2.2:=
231 - !libressl? ( dev-libs/openssl:0= )
232 - libressl? ( dev-libs/libressl:0= )
233 - sys-devel/libtool
234 - || ( dev-libs/libpcre2 >dev-libs/libpcre-6 )
235 - !!<app-antivirus/clamav-0.99"
236 -# hard block clamav < 0.99 due to linking problems Bug #567680
237 -# openssl is now *required* see this link as to why
238 -# https://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
239 -DEPEND="${CDEPEND}
240 - virtual/pkgconfig
241 - test? ( dev-libs/check )"
242 -RDEPEND="${CDEPEND}
243 - selinux? ( sec-policy/selinux-clamav )"
244 -
245 -DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
246 -PATCHES=(
247 - "${FILESDIR}"/${PN}-0.99.4-fix-newer-zlib.patch
248 - "${FILESDIR}/${P}-pcre2-compile-erroffset.patch"
249 -)
250 -
251 -pkg_setup() {
252 - enewgroup clamav
253 - enewuser clamav -1 -1 /dev/null clamav
254 -}
255 -
256 -src_prepare() {
257 - default
258 -
259 - eautoconf
260 -}
261 -
262 -src_configure() {
263 - use ppc64 && append-flags -mminimal-toc
264 - use uclibc && export ac_cv_type_error_t=yes
265 -
266 - econf \
267 - $(use_enable bzip2) \
268 - $(use_enable clamdtop) \
269 - $(use_enable ipv6) \
270 - $(use_enable milter) \
271 - $(use_enable static-libs static) \
272 - $(use_enable test check) \
273 - $(use_with iconv) \
274 - $(use_with metadata-analysis-api libjson /usr) \
275 - --cache-file="${S}"/config.cache \
276 - --disable-experimental \
277 - --disable-gcc-vcheck \
278 - --disable-zlib-vcheck \
279 - --enable-id-check \
280 - --with-dbdir="${EPREFIX}"/var/lib/clamav \
281 - --with-zlib="${EPREFIX}"/usr \
282 - --disable-llvm
283 -}
284 -
285 -src_install() {
286 - default
287 -
288 - rm -rf "${ED}"/var/lib/clamav
289 - newinitd "${FILESDIR}"/clamd.initd-r6 clamd
290 - newconfd "${FILESDIR}"/clamd.conf-r1 clamd
291 -
292 - systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
293 - systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
294 - systemd_dounit "${FILESDIR}/clamd.service"
295 - systemd_dounit "${FILESDIR}/freshclamd.service"
296 -
297 - keepdir /var/lib/clamav
298 - fowners clamav:clamav /var/lib/clamav
299 - keepdir /var/log/clamav
300 - fowners clamav:clamav /var/log/clamav
301 -
302 - dodir /etc/logrotate.d
303 - insinto /etc/logrotate.d
304 - newins "${FILESDIR}"/clamav.logrotate clamav
305 -
306 - # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
307 - sed -i -e "s:^\(Example\):\# \1:" \
308 - -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
309 - -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
310 - -e "s:.*\(User\) .*:\1 clamav:" \
311 - -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
312 - -e "s:^\#\(LogTime\).*:\1 yes:" \
313 - -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
314 - "${ED}"/etc/clamd.conf.sample || die
315 - sed -i -e "s:^\(Example\):\# \1:" \
316 - -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
317 - -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
318 - -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
319 - -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
320 - -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
321 - -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
322 - "${ED}"/etc/freshclam.conf.sample || die
323 -
324 - if use milter ; then
325 - # MilterSocket one to include ' /' because there is a 2nd line for
326 - # inet: which we want to leave
327 - dodoc "${FILESDIR}"/clamav-milter.README.gentoo
328 - sed -i -e "s:^\(Example\):\# \1:" \
329 - -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
330 - -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
331 - -e "s:.*\(User\) .*:\1 clamav:" \
332 - -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
333 - -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
334 - -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
335 - "${ED}"/etc/clamav-milter.conf.sample || die
336 - cat >> "${ED}"/etc/conf.d/clamd <<-EOF
337 - MILTER_NICELEVEL=19
338 - START_MILTER=no
339 - EOF
340 -
341 - systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
342 - fi
343 -
344 - for i in clamd freshclam clamav-milter
345 - do
346 - [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
347 - done
348 -
349 - prune_libtool_files --all
350 -}
351 -
352 -src_test() {
353 - emake quick-check
354 -}
355 -
356 -pkg_postinst() {
357 - if use milter ; then
358 - elog "For simple instructions how to setup the clamav-milter read the"
359 - elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
360 - fi
361 - if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
362 - ewarn "You must run freshclam manually to populate the virus database files"
363 - ewarn "before starting clamav for the first time.\n"
364 - fi
365 -}
366
367 diff --git a/app-antivirus/clamav/clamav-0.99.4-r2.ebuild b/app-antivirus/clamav/clamav-0.99.4-r2.ebuild
368 deleted file mode 100644
369 index 9e65d1d592f..00000000000
370 --- a/app-antivirus/clamav/clamav-0.99.4-r2.ebuild
371 +++ /dev/null
372 @@ -1,157 +0,0 @@
373 -# Copyright 1999-2018 Gentoo Authors
374 -# Distributed under the terms of the GNU General Public License v2
375 -
376 -EAPI=6
377 -
378 -inherit autotools eutils flag-o-matic user systemd
379 -
380 -DESCRIPTION="Clam Anti-Virus Scanner"
381 -HOMEPAGE="https://www.clamav.net/"
382 -SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
383 -
384 -LICENSE="GPL-2"
385 -SLOT="0"
386 -KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
387 -IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs test uclibc"
388 -
389 -CDEPEND="bzip2? ( app-arch/bzip2 )
390 - clamdtop? ( sys-libs/ncurses:0 )
391 - iconv? ( virtual/libiconv )
392 - metadata-analysis-api? ( dev-libs/json-c:= )
393 - milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
394 - >=sys-libs/zlib-1.2.2:=
395 - !libressl? ( dev-libs/openssl:0= )
396 - libressl? ( dev-libs/libressl:0= )
397 - sys-devel/libtool
398 - || ( dev-libs/libpcre2 >dev-libs/libpcre-6 )
399 - !!<app-antivirus/clamav-0.99"
400 -# hard block clamav < 0.99 due to linking problems Bug #567680
401 -# openssl is now *required* see this link as to why
402 -# https://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
403 -DEPEND="${CDEPEND}
404 - virtual/pkgconfig
405 - test? ( dev-libs/check )"
406 -RDEPEND="${CDEPEND}
407 - selinux? ( sec-policy/selinux-clamav )"
408 -
409 -DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
410 -PATCHES=(
411 - "${FILESDIR}"/${PN}-0.99.4-fix-newer-zlib.patch
412 - "${FILESDIR}/${P}-pcre2-compile-erroffset.patch"
413 -)
414 -
415 -pkg_setup() {
416 - enewgroup clamav
417 - enewuser clamav -1 -1 /dev/null clamav
418 -}
419 -
420 -src_prepare() {
421 - default
422 -
423 - eautoconf
424 -}
425 -
426 -src_configure() {
427 - use ppc64 && append-flags -mminimal-toc
428 - use uclibc && export ac_cv_type_error_t=yes
429 -
430 - econf \
431 - $(use_enable bzip2) \
432 - $(use_enable clamdtop) \
433 - $(use_enable ipv6) \
434 - $(use_enable milter) \
435 - $(use_enable static-libs static) \
436 - $(use_enable test check) \
437 - $(use_with iconv) \
438 - $(use_with metadata-analysis-api libjson /usr) \
439 - --cache-file="${S}"/config.cache \
440 - --disable-experimental \
441 - --disable-gcc-vcheck \
442 - --disable-zlib-vcheck \
443 - --enable-id-check \
444 - --with-dbdir="${EPREFIX}"/var/lib/clamav \
445 - --with-zlib="${EPREFIX}"/usr \
446 - --disable-llvm
447 -}
448 -
449 -src_install() {
450 - default
451 -
452 - rm -rf "${ED}"/var/lib/clamav
453 - newinitd "${FILESDIR}"/clamd.initd-r6 clamd
454 - newconfd "${FILESDIR}"/clamd.conf-r1 clamd
455 -
456 - systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
457 - systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
458 - systemd_dounit "${FILESDIR}/clamd.service"
459 - systemd_dounit "${FILESDIR}/freshclamd.service"
460 -
461 - keepdir /var/lib/clamav
462 - fowners clamav:clamav /var/lib/clamav
463 - keepdir /var/log/clamav
464 - fowners clamav:clamav /var/log/clamav
465 -
466 - dodir /etc/logrotate.d
467 - insinto /etc/logrotate.d
468 - newins "${FILESDIR}"/clamav.logrotate clamav
469 -
470 - # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
471 - sed -i -e "s:^\(Example\):\# \1:" \
472 - -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
473 - -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
474 - -e "s:.*\(User\) .*:\1 clamav:" \
475 - -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
476 - -e "s:^\#\(LogTime\).*:\1 yes:" \
477 - -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
478 - "${ED}"/etc/clamd.conf.sample || die
479 - sed -i -e "s:^\(Example\):\# \1:" \
480 - -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
481 - -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
482 - -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
483 - -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
484 - -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
485 - -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
486 - "${ED}"/etc/freshclam.conf.sample || die
487 -
488 - if use milter ; then
489 - # MilterSocket one to include ' /' because there is a 2nd line for
490 - # inet: which we want to leave
491 - dodoc "${FILESDIR}"/clamav-milter.README.gentoo
492 - sed -i -e "s:^\(Example\):\# \1:" \
493 - -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
494 - -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
495 - -e "s:.*\(User\) .*:\1 clamav:" \
496 - -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
497 - -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
498 - -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
499 - "${ED}"/etc/clamav-milter.conf.sample || die
500 - cat >> "${ED}"/etc/conf.d/clamd <<-EOF
501 - MILTER_NICELEVEL=19
502 - START_MILTER=no
503 - EOF
504 -
505 - systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
506 - fi
507 -
508 - for i in clamd freshclam clamav-milter
509 - do
510 - [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
511 - done
512 -
513 - prune_libtool_files --all
514 -}
515 -
516 -src_test() {
517 - emake quick-check
518 -}
519 -
520 -pkg_postinst() {
521 - if use milter ; then
522 - elog "For simple instructions how to setup the clamav-milter read the"
523 - elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
524 - fi
525 - if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
526 - ewarn "You must run freshclam manually to populate the virus database files"
527 - ewarn "before starting clamav for the first time.\n"
528 - fi
529 -}