Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/
Date: Wed, 27 Mar 2019 09:12:52
Message-Id: 1553677749.1a832e1ae5b286daff513d4271233b0a365f31f5.whissi@gentoo
1 commit: 1a832e1ae5b286daff513d4271233b0a365f31f5
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 27 09:09:09 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 27 09:09:09 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a832e1a
7
8 app-antivirus/clamav: bump to v0.101.2
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 app-antivirus/clamav/Manifest | 1 +
14 app-antivirus/clamav/clamav-0.101.2.ebuild | 175 +++++++++++++++++++++++++++++
15 2 files changed, 176 insertions(+)
16
17 diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest
18 index c2f4070173a..c47d7ddaf4f 100644
19 --- a/app-antivirus/clamav/Manifest
20 +++ b/app-antivirus/clamav/Manifest
21 @@ -3,4 +3,5 @@ DIST clamav-0.100.1.tar.gz 16154415 BLAKE2B df4ddde28b0b263765f4a571a407390b30aa
22 DIST clamav-0.100.2.tar.gz 15926420 BLAKE2B 0a64a08b6cdad94f55852041df06b5517bcfa3bacb5871c694bf51692c4698ffd39f09c92fe2af167fcf2b27806a7175a9b649e6d6d5ffc65755509e3574d374 SHA512 70b51eafb11dc727188e7d4554b8095a9e0406e76b78778fede94f8a4c78146034478197217039384eb1fd15532e822cfa6b51707e431e9397ec21d5e393a60c
23 DIST clamav-0.101.0.tar.gz 21686531 BLAKE2B ea3ae1e5b31d6b10600eac8f0ea93c9460f0e337de7a3f43345c26e0efb0b3f664d1f640b723795eac6491f959492202a249222b561917072811df86314ea9d8 SHA512 faf6186b51b332eca67684bfe72f473a910577093964338278656ab67c61d28f66f7f501f4db5e1bb37112d66ad4433d792c50af70aceefd5bcbc5dab7ac7aa0
24 DIST clamav-0.101.1.tar.gz 21691396 BLAKE2B e9a63ba90bef5504aac1020293f26cf957323677ed229543f0e7784b80e11837683e72432890f3109b040a2ba08029383892a6f40f64050d3caa3fe94c0571aa SHA512 eb72fe21a9485d2906aec7f9a3dc955bbe4bb0fa812d622bc9c6c5c019eb2238a7370cb5dc1ba3886764269a925f7dcbe93255c77920bb489af4f3f81680d4c8
25 +DIST clamav-0.101.2.tar.gz 21722932 BLAKE2B 5c2960e678510a6f829fc9333e05a45a57a704e13eb407e0f890dd5553a1f9644eb3b1122c677755237b8c682127319d447a508087bc9130d14cd2cfec92896a SHA512 f9ea4589a8081acf7b6d454d1a068da05ae6574a9070a08f9438935795cb6dc084ffb9222b11fb1623f31962f859e6536a2f5bd1de29ef6b9b314efa5edc8c7e
26 DIST clamav-0.99.4.tar.gz 16083015 BLAKE2B 3c2e7d11ee05fe846f75c3fb6501b5fd809a2e58f8e69c82e493e32fcbc87ca0e5b5f7ab83a0d7e251a5dc8e84aed1475c87c1248b393fa04b6924a2ab32b9bf SHA512 778d5ef510d8d4bdfac5dc33d92469ed4283c414b3d42da6e1a0b13ed70e37755d5c837622dc336bc728ba1f8bf5485fc8a8d3a67a90e9aaa9e4dc71ece0691d
27
28 diff --git a/app-antivirus/clamav/clamav-0.101.2.ebuild b/app-antivirus/clamav/clamav-0.101.2.ebuild
29 new file mode 100644
30 index 00000000000..63e3af208b0
31 --- /dev/null
32 +++ b/app-antivirus/clamav/clamav-0.101.2.ebuild
33 @@ -0,0 +1,175 @@
34 +# Copyright 1999-2019 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +inherit autotools eutils flag-o-matic user systemd
40 +
41 +DESCRIPTION="Clam Anti-Virus Scanner"
42 +HOMEPAGE="https://www.clamav.net/"
43 +SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
44 +
45 +LICENSE="GPL-2"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
48 +IUSE="bzip2 doc clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs test uclibc xml"
49 +
50 +CDEPEND="bzip2? ( app-arch/bzip2 )
51 + clamdtop? ( sys-libs/ncurses:0 )
52 + iconv? ( virtual/libiconv )
53 + metadata-analysis-api? ( dev-libs/json-c:= )
54 + milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
55 + >=sys-libs/zlib-1.2.2:=
56 + !libressl? ( dev-libs/openssl:0= )
57 + libressl? ( dev-libs/libressl:0= )
58 + sys-devel/libtool
59 + || ( dev-libs/libpcre2 >dev-libs/libpcre-6 )
60 + dev-libs/libmspack
61 + xml? ( dev-libs/libxml2 )
62 + elibc_musl? ( sys-libs/fts-standalone )
63 + !!<app-antivirus/clamav-0.99"
64 +# hard block clamav < 0.99 due to linking problems Bug #567680
65 +# openssl is now *required* see this link as to why
66 +# https://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
67 +DEPEND="${CDEPEND}
68 + virtual/pkgconfig
69 + test? ( dev-libs/check )"
70 +RDEPEND="${CDEPEND}
71 + selinux? ( sec-policy/selinux-clamav )"
72 +
73 +DOCS=( docs/UserManual.md docs/UserManual )
74 +HTML_DOCS=( docs/html )
75 +
76 +#PATCHES=(
77 +# "${FILESDIR}/clamav-0.100.0_autotools.patch"
78 +#)
79 +
80 +pkg_setup() {
81 + enewgroup clamav
82 + enewuser clamav -1 -1 /dev/null clamav
83 +}
84 +
85 +#src_prepare() {
86 +# default
87 +#
88 +# eautoconf
89 +#}
90 +
91 +src_configure() {
92 + use elibc_musl && append-ldflags -lfts
93 + use ppc64 && append-flags -mminimal-toc
94 + use uclibc && export ac_cv_type_error_t=yes
95 +
96 + # according to configure help it should be
97 + # $(use_enable xml)
98 + # but that does not work
99 + # do not add this, since --disable-xml seems to override
100 + # --without-xml
101 +
102 + econf \
103 + $(use_enable bzip2) \
104 + $(use_enable clamdtop) \
105 + $(use_enable ipv6) \
106 + $(use_enable milter) \
107 + $(use_enable static-libs static) \
108 + $(use_enable test check) \
109 + $(use_with xml) \
110 + $(use_with iconv) \
111 + $(use_with metadata-analysis-api libjson /usr) \
112 + --with-system-libmspack \
113 + --cache-file="${S}"/config.cache \
114 + --disable-experimental \
115 + --disable-gcc-vcheck \
116 + --disable-zlib-vcheck \
117 + --enable-id-check \
118 + --with-dbdir="${EPREFIX}"/var/lib/clamav \
119 + --with-zlib="${EPREFIX}"/usr \
120 + --disable-llvm
121 +}
122 +
123 +src_install() {
124 + default
125 +
126 + rm -rf "${ED}"/var/lib/clamav
127 + newinitd "${FILESDIR}"/clamd.initd-r6 clamd
128 + newconfd "${FILESDIR}"/clamd.conf-r1 clamd
129 +
130 + systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
131 + systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
132 + systemd_dounit "${FILESDIR}/clamd.service"
133 + systemd_dounit "${FILESDIR}/freshclamd.service"
134 +
135 + keepdir /var/lib/clamav
136 + fowners clamav:clamav /var/lib/clamav
137 + keepdir /var/log/clamav
138 + fowners clamav:clamav /var/log/clamav
139 +
140 + dodir /etc/logrotate.d
141 + insinto /etc/logrotate.d
142 + newins "${FILESDIR}"/clamav.logrotate clamav
143 +
144 + # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
145 + sed -i -e "s:^\(Example\):\# \1:" \
146 + -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
147 + -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
148 + -e "s:.*\(User\) .*:\1 clamav:" \
149 + -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
150 + -e "s:^\#\(LogTime\).*:\1 yes:" \
151 + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
152 + "${ED}"/etc/clamd.conf.sample || die
153 + sed -i -e "s:^\(Example\):\# \1:" \
154 + -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
155 + -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
156 + -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
157 + -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
158 + -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
159 + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
160 + "${ED}"/etc/freshclam.conf.sample || die
161 +
162 + if use milter ; then
163 + # MilterSocket one to include ' /' because there is a 2nd line for
164 + # inet: which we want to leave
165 + ##dodoc "${FILESDIR}"/clamav-milter.README.gentoo
166 + sed -i -e "s:^\(Example\):\# \1:" \
167 + -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
168 + -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
169 + -e "s:.*\(User\) .*:\1 clamav:" \
170 + -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
171 + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
172 + -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
173 + "${ED}"/etc/clamav-milter.conf.sample || die
174 + cat >> "${ED}"/etc/conf.d/clamd <<-EOF
175 + MILTER_NICELEVEL=19
176 + START_MILTER=no
177 + EOF
178 +
179 + systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
180 + fi
181 +
182 + if use doc; then
183 + einstalldocs
184 + doman docs/man/*.[1-8]
185 + fi
186 +
187 + for i in clamd freshclam clamav-milter
188 + do
189 + [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
190 + done
191 +
192 + prune_libtool_files --all
193 +}
194 +
195 +src_test() {
196 + emake quick-check
197 +}
198 +
199 +pkg_postinst() {
200 + if use milter ; then
201 + elog "For simple instructions how to setup the clamav-milter read the"
202 + elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
203 + fi
204 + if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
205 + ewarn "You must run freshclam manually to populate the virus database files"
206 + ewarn "before starting clamav for the first time.\n"
207 + fi
208 +}