1 |
commit: e358b025b6215c284de6047b54dca1e9b981126a |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 6 00:13:31 2020 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 6 00:16:37 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e358b025 |
7 |
|
8 |
app-antivirus/clamav: new security release v0.102.2. |
9 |
|
10 |
Bug: https://bugs.gentoo.org/708424 |
11 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
12 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
13 |
|
14 |
app-antivirus/clamav/Manifest | 1 + |
15 |
app-antivirus/clamav/clamav-0.102.2.ebuild | 198 +++++++++++++++++++++++++++++ |
16 |
2 files changed, 199 insertions(+) |
17 |
|
18 |
diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest |
19 |
index 89dd2dc3cf2..40240b43ba8 100644 |
20 |
--- a/app-antivirus/clamav/Manifest |
21 |
+++ b/app-antivirus/clamav/Manifest |
22 |
@@ -1,3 +1,4 @@ |
23 |
DIST clamav-0.101.2.tar.gz 21722932 BLAKE2B 5c2960e678510a6f829fc9333e05a45a57a704e13eb407e0f890dd5553a1f9644eb3b1122c677755237b8c682127319d447a508087bc9130d14cd2cfec92896a SHA512 f9ea4589a8081acf7b6d454d1a068da05ae6574a9070a08f9438935795cb6dc084ffb9222b11fb1623f31962f859e6536a2f5bd1de29ef6b9b314efa5edc8c7e |
24 |
DIST clamav-0.101.4.tar.gz 21408145 BLAKE2B 5eba85dcf203f56cbd943e479e660469dcc1972819674f5624207f4123ec74207b664cba3c9b0318665d261176da338f3c3fba9c938eeb626ce75174d525a43f SHA512 fae914a95b674fa6bdea044abec702401146590ca0aaaea1245deb1c4770641a794f60ff7b448b24d8c1923150cb7ba230848974837257c3a8ab20ea1e2f86d3 |
25 |
DIST clamav-0.102.1.tar.gz 13215586 BLAKE2B 653e5506ed0b19c154038e960184abf2773a8a12a775dda81ce4f69fe7e58c457c39d85e24ce43bda9f09f43766c81af69d5462e7459077b0e4886f73a2a5ba2 SHA512 2d0cd2dece771ab8228771f9a95eb0342e756083a0107b2bef31bd2f5f46c36aa692e15d7eb2ea321f535ea4e18c8df043c8663ae350d40fbe1bdb4d073dcb90 |
26 |
+DIST clamav-0.102.2.tar.gz 13227538 BLAKE2B 09d18f507a439f1dd63ebc038b129e0ead75bb344bfad2b5bd36e2c0c76af01f42fcacc60ff40b5676cb5fb7b38b90747452654a5d104b9b7b5e2d5a06b3dc2d SHA512 7db53e0e2b4d6b0e4cf5048d3c9dfbcabcffd680c3a2b718c763b9599b0c1c14e56bae70c54c251ee9e8fd1acd3134657196dbaad2d23a16bad76a088c6fc41f |
27 |
|
28 |
diff --git a/app-antivirus/clamav/clamav-0.102.2.ebuild b/app-antivirus/clamav/clamav-0.102.2.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..ddb5ab7c097 |
31 |
--- /dev/null |
32 |
+++ b/app-antivirus/clamav/clamav-0.102.2.ebuild |
33 |
@@ -0,0 +1,198 @@ |
34 |
+# Copyright 1999-2020 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 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" |
48 |
+IUSE="bzip2 doc clamdtop clamsubmit iconv ipv6 libclamav-only libressl milter metadata-analysis-api selinux static-libs test uclibc xml" |
49 |
+RESTRICT="!test? ( test )" |
50 |
+ |
51 |
+# Require acct-{user,group}/clamav at build time so that we can set |
52 |
+# the permissions on /var/lib/clamav in src_install rather than in |
53 |
+# pkg_postinst; calling "chown" on the live filesystem scares me. |
54 |
+CDEPEND="acct-group/clamav |
55 |
+ acct-user/clamav |
56 |
+ bzip2? ( app-arch/bzip2 ) |
57 |
+ clamdtop? ( sys-libs/ncurses:0 ) |
58 |
+ iconv? ( virtual/libiconv ) |
59 |
+ metadata-analysis-api? ( dev-libs/json-c:= ) |
60 |
+ milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) ) |
61 |
+ >=sys-libs/zlib-1.2.2:= |
62 |
+ !libressl? ( dev-libs/openssl:0= ) |
63 |
+ libressl? ( dev-libs/libressl:0= ) |
64 |
+ dev-libs/libltdl |
65 |
+ || ( dev-libs/libpcre2 >dev-libs/libpcre-6 ) |
66 |
+ dev-libs/libmspack |
67 |
+ xml? ( dev-libs/libxml2 ) |
68 |
+ elibc_musl? ( sys-libs/fts-standalone ) |
69 |
+ !libclamav-only? ( net-misc/curl ) |
70 |
+ clamsubmit? ( net-misc/curl dev-libs/json-c:= )" |
71 |
+REQUIRED_USE=" |
72 |
+ libclamav-only? ( !clamsubmit ) |
73 |
+ clamsubmit? ( !libclamav-only ) |
74 |
+" |
75 |
+ |
76 |
+DEPEND="${CDEPEND} |
77 |
+ virtual/pkgconfig |
78 |
+ test? ( dev-libs/check )" |
79 |
+RDEPEND="${CDEPEND} |
80 |
+ selinux? ( sec-policy/selinux-clamav )" |
81 |
+ |
82 |
+HTML_DOCS=( docs/html/. ) |
83 |
+ |
84 |
+PATCHES=( |
85 |
+ "${FILESDIR}/${PN}-0.101.2-tinfo.patch" #670729 |
86 |
+ "${FILESDIR}/${PN}-0.102.1-libxml2_pkgconfig.patch" #661328 |
87 |
+) |
88 |
+ |
89 |
+src_prepare() { |
90 |
+ default |
91 |
+ eautoconf |
92 |
+} |
93 |
+ |
94 |
+src_configure() { |
95 |
+ use elibc_musl && append-ldflags -lfts |
96 |
+ use ppc64 && append-flags -mminimal-toc |
97 |
+ use uclibc && export ac_cv_type_error_t=yes |
98 |
+ |
99 |
+ # according to configure help it should be |
100 |
+ # $(use_enable xml) |
101 |
+ # but that does not work |
102 |
+ # do not add this, since --disable-xml seems to override |
103 |
+ # --without-xml |
104 |
+ JSONUSE="--without-libjson" |
105 |
+ |
106 |
+ if use clamsubmit || use metadata-analysis-api; then |
107 |
+ # either of those 2 requires libjson. |
108 |
+ # clamsubmit will be built as soon as libjson and curl are found |
109 |
+ # but we only install the binary if requested |
110 |
+ JSONUSE="--with-libjson=${EPREFIX}/usr" |
111 |
+ fi |
112 |
+ |
113 |
+ local myeconfargs=( |
114 |
+ $(use_enable bzip2) |
115 |
+ $(use_enable clamdtop) |
116 |
+ $(use_enable ipv6) |
117 |
+ $(use_enable milter) |
118 |
+ $(use_enable static-libs static) |
119 |
+ $(use_enable test check) |
120 |
+ $(use_with xml) |
121 |
+ $(use_with iconv) |
122 |
+ ${JSONUSE} |
123 |
+ $(use_enable libclamav-only) |
124 |
+ $(use_with !libclamav-only libcurl) |
125 |
+ --with-system-libmspack |
126 |
+ --cache-file="${S}"/config.cache |
127 |
+ --disable-experimental |
128 |
+ --disable-zlib-vcheck |
129 |
+ --enable-id-check |
130 |
+ --with-dbdir="${EPREFIX}"/var/lib/clamav |
131 |
+ # Don't call --with-zlib=/usr (see bug #699296) |
132 |
+ --with-zlib |
133 |
+ --disable-llvm |
134 |
+ ) |
135 |
+ econf "${myeconfargs[@]}" |
136 |
+} |
137 |
+ |
138 |
+src_install() { |
139 |
+ default |
140 |
+ |
141 |
+ rm -rf "${ED}"/var/lib/clamav || die |
142 |
+ newinitd "${FILESDIR}"/clamd.initd-r6 clamd |
143 |
+ newconfd "${FILESDIR}"/clamd.conf-r1 clamd |
144 |
+ |
145 |
+ systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf" |
146 |
+ systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service" |
147 |
+ systemd_dounit "${FILESDIR}/clamd.service" |
148 |
+ systemd_dounit "${FILESDIR}/freshclamd.service" |
149 |
+ |
150 |
+ insinto /etc/logrotate.d |
151 |
+ newins "${FILESDIR}"/clamav.logrotate clamav |
152 |
+ |
153 |
+ # Modify /etc/{clamd,freshclam}.conf to be usable out of the box |
154 |
+ sed -i -e "s:^\(Example\):\# \1:" \ |
155 |
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \ |
156 |
+ -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \ |
157 |
+ -e "s:.*\(User\) .*:\1 clamav:" \ |
158 |
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \ |
159 |
+ -e "s:^\#\(LogTime\).*:\1 yes:" \ |
160 |
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ |
161 |
+ -e "s:^\#\(DatabaseDirectory\).*:\1 /var/lib/clamav:" \ |
162 |
+ "${ED}"/etc/clamd.conf.sample || die |
163 |
+ sed -i -e "s:^\(Example\):\# \1:" \ |
164 |
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \ |
165 |
+ -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \ |
166 |
+ -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \ |
167 |
+ -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \ |
168 |
+ -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \ |
169 |
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ |
170 |
+ -e "s:^\#\(DatabaseDirectory\).*:\1 /var/lib/clamav:" \ |
171 |
+ "${ED}"/etc/freshclam.conf.sample || die |
172 |
+ |
173 |
+ if use milter ; then |
174 |
+ # MilterSocket one to include ' /' because there is a 2nd line for |
175 |
+ # inet: which we want to leave |
176 |
+ ##dodoc "${FILESDIR}"/clamav-milter.README.gentoo |
177 |
+ sed -i -e "s:^\(Example\):\# \1:" \ |
178 |
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \ |
179 |
+ -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \ |
180 |
+ -e "s:.*\(User\) .*:\1 clamav:" \ |
181 |
+ -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \ |
182 |
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ |
183 |
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \ |
184 |
+ "${ED}"/etc/clamav-milter.conf.sample || die |
185 |
+ cat >> "${ED}"/etc/conf.d/clamd <<-EOF |
186 |
+ MILTER_NICELEVEL=19 |
187 |
+ START_MILTER=no |
188 |
+ EOF |
189 |
+ |
190 |
+ systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service |
191 |
+ fi |
192 |
+ |
193 |
+ if use doc; then |
194 |
+ einstalldocs |
195 |
+ doman docs/man/*.[1-8] |
196 |
+ fi |
197 |
+ |
198 |
+ for i in clamd freshclam clamav-milter |
199 |
+ do |
200 |
+ if [[ -f "${D}"/etc/"${i}".conf.sample ]]; then |
201 |
+ mv "${D}"/etc/"${i}".conf{.sample,} || die |
202 |
+ fi |
203 |
+ done |
204 |
+ |
205 |
+ prune_libtool_files --all |
206 |
+ |
207 |
+ # These both need to be writable by the clamav user. |
208 |
+ # TODO: use syslog by default; that's what it's for. |
209 |
+ diropts -o clamav -g clamav |
210 |
+ keepdir /var/lib/clamav |
211 |
+ keepdir /var/log/clamav |
212 |
+} |
213 |
+ |
214 |
+src_test() { |
215 |
+ emake quick-check |
216 |
+} |
217 |
+ |
218 |
+pkg_postinst() { |
219 |
+ if use milter ; then |
220 |
+ elog "For simple instructions how to setup the clamav-milter read the" |
221 |
+ elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}" |
222 |
+ fi |
223 |
+ local databases=( "${ROOT}"var/lib/clamav/main.c[lv]d ) |
224 |
+ if [[ ! -f "${databases}" ]] ; then |
225 |
+ ewarn "You must run freshclam manually to populate the virus database" |
226 |
+ ewarn "before starting clamav for the first time." |
227 |
+ fi |
228 |
+ elog "For instructions on how to use clamonacc, see" |
229 |
+ elog |
230 |
+ elog " https://www.clamav.net/documents/on-access-scanning" |
231 |
+} |