1 |
commit: 1259a46e77e330738303cf3d703156301c35961e |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 2 13:50:45 2022 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 2 13:50:45 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1259a46e |
7 |
|
8 |
app-antivirus/clamav: remove vulnerable v0.103.4. |
9 |
|
10 |
Bug: https://bugs.gentoo.org/831083 |
11 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
12 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
13 |
|
14 |
app-antivirus/clamav/Manifest | 1 - |
15 |
app-antivirus/clamav/clamav-0.103.4.ebuild | 239 ----------------------------- |
16 |
2 files changed, 240 deletions(-) |
17 |
|
18 |
diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest |
19 |
index d27ad4a65c88..25346f721b8b 100644 |
20 |
--- a/app-antivirus/clamav/Manifest |
21 |
+++ b/app-antivirus/clamav/Manifest |
22 |
@@ -1,3 +1,2 @@ |
23 |
-DIST clamav-0.103.4.tar.gz 16425023 BLAKE2B beca05941ce462bd98473a5ac72b36e63afeef5dea3e591fd8c9426c2077e550139b198ea7d0d12ac2be311d18c0170b94255c07df3e9a0defd3646ba4879bc7 SHA512 422a8cb98d355be098b0a0c575e4f08cf964e992d10ee02e7600eb9db6dfa943efbd988489f268e81e4d2ef29cfe582b236688ea209d6d2e46467f3c08eb475e |
24 |
DIST clamav-0.103.5.tar.gz 16434316 BLAKE2B c5a21b72419a8cd731656d8a8bbc79c5850895f1d8cc56cb5d19eabe2356a5dfcf88e7dc9553071a24b2719bae07cf1a941da3dbed69da8ac4ae3b8897ab32fe SHA512 242423b507eacbbd31dbae6dd0325dff87da25bb8072f2cee7a5e7cab4b8eb5ee6196c759570c1d75986a2777f0f79f92cfbd6250a30ae5b53390c75b238c29a |
25 |
DIST clamav-0.104.2.tar.gz 11950409 BLAKE2B 7d7eb9d22ca519f7ad0c171b6cab4b59cb52787a897ab31b9567166be2223f9ea89e79f42f1e4e0caf32fcb4b008f5ce755fa136566f85fe1de7808b436f80fa SHA512 8c89a05dec6650677125177434cc49ec2298701525508cdda52358e8f98086d80892287f6267f8b7fda0aef2ca361616cb584c3059f3b066bfde65f7f1ba2df5 |
26 |
|
27 |
diff --git a/app-antivirus/clamav/clamav-0.103.4.ebuild b/app-antivirus/clamav/clamav-0.103.4.ebuild |
28 |
deleted file mode 100644 |
29 |
index 93554122c91a..000000000000 |
30 |
--- a/app-antivirus/clamav/clamav-0.103.4.ebuild |
31 |
+++ /dev/null |
32 |
@@ -1,239 +0,0 @@ |
33 |
-# Copyright 1999-2022 Gentoo Authors |
34 |
-# Distributed under the terms of the GNU General Public License v2 |
35 |
- |
36 |
-EAPI=7 |
37 |
- |
38 |
-inherit autotools flag-o-matic systemd tmpfiles |
39 |
- |
40 |
-DESCRIPTION="Clam Anti-Virus Scanner" |
41 |
-HOMEPAGE="https://www.clamav.net/" |
42 |
-SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz" |
43 |
- |
44 |
-LICENSE="GPL-2" |
45 |
-SLOT="0" |
46 |
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" |
47 |
-IUSE="bzip2 doc clamonacc clamdtop clamsubmit iconv ipv6 libclamav-only milter metadata-analysis-api selinux systemd test xml" |
48 |
- |
49 |
-REQUIRED_USE="libclamav-only? ( !clamonacc !clamdtop !clamsubmit !milter !metadata-analysis-api )" |
50 |
- |
51 |
-RESTRICT="!test? ( test )" |
52 |
- |
53 |
-# Require acct-{user,group}/clamav at build time so that we can set |
54 |
-# the permissions on /var/lib/clamav in src_install rather than in |
55 |
-# pkg_postinst; calling "chown" on the live filesystem scares me. |
56 |
-CDEPEND="acct-group/clamav |
57 |
- acct-user/clamav |
58 |
- dev-libs/libltdl |
59 |
- dev-libs/libmspack |
60 |
- || ( dev-libs/libpcre2 >dev-libs/libpcre-6 ) |
61 |
- dev-libs/tomsfastmath |
62 |
- >=sys-libs/zlib-1.2.2:= |
63 |
- bzip2? ( app-arch/bzip2 ) |
64 |
- clamdtop? ( sys-libs/ncurses:0 ) |
65 |
- clamsubmit? ( net-misc/curl dev-libs/json-c:= ) |
66 |
- elibc_musl? ( sys-libs/fts-standalone ) |
67 |
- iconv? ( virtual/libiconv ) |
68 |
- !libclamav-only? ( net-misc/curl ) |
69 |
- dev-libs/openssl:0= |
70 |
- milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) ) |
71 |
- xml? ( dev-libs/libxml2 )" |
72 |
- |
73 |
-# We need at least autoconf-2.69-r5 because that's the first (patched) |
74 |
-# version of it in Gentoo that supports ./configure --runstatedir. |
75 |
-BDEPEND=">=sys-devel/autoconf-2.69-r5 |
76 |
- virtual/pkgconfig" |
77 |
- |
78 |
-DEPEND="${CDEPEND} |
79 |
- metadata-analysis-api? ( dev-libs/json-c:* ) |
80 |
- test? ( dev-libs/check )" |
81 |
-RDEPEND="${CDEPEND} |
82 |
- selinux? ( sec-policy/selinux-clamav )" |
83 |
- |
84 |
-PATCHES=( |
85 |
- "${FILESDIR}/${PN}-0.102.1-libxml2_pkgconfig.patch" #661328 |
86 |
- "${FILESDIR}/${PN}-0.102.2-fix-curl-detection.patch" #709616 |
87 |
- "${FILESDIR}/${PN}-0.103.0-system-tomsfastmath.patch" # 649394 |
88 |
- "${FILESDIR}/${PN}-0.103.1-upstream-openrc.patch" |
89 |
-) |
90 |
- |
91 |
-src_prepare() { |
92 |
- default |
93 |
- |
94 |
- # Be extra sure that we're using the system copy of tomsfastmath |
95 |
- einfo "removing bundled copy of dev-libs/tomsfastmath" |
96 |
- rm -r libclamav/tomsfastmath || \ |
97 |
- die "failed to remove bundled tomsfastmath" |
98 |
- |
99 |
- AT_NO_RECURSIVE="yes" eautoreconf |
100 |
-} |
101 |
- |
102 |
-src_configure() { |
103 |
- use elibc_musl && append-ldflags -lfts |
104 |
- use ppc64 && append-flags -mminimal-toc |
105 |
- |
106 |
- # according to configure help it should be |
107 |
- # $(use_enable xml) |
108 |
- # but that does not work |
109 |
- # do not add this, since --disable-xml seems to override |
110 |
- # --without-xml |
111 |
- JSONUSE="--without-libjson" |
112 |
- |
113 |
- if use clamsubmit || use metadata-analysis-api; then |
114 |
- # either of those 2 requires libjson. |
115 |
- # clamsubmit will be built as soon as libjson and curl are found |
116 |
- # but we only install the binary if requested |
117 |
- JSONUSE="--with-libjson=${EPREFIX}/usr" |
118 |
- fi |
119 |
- |
120 |
- local myeconfargs=( |
121 |
- $(use_enable bzip2) |
122 |
- $(use_enable clamonacc) |
123 |
- $(use_enable clamdtop) |
124 |
- $(use_enable ipv6) |
125 |
- $(use_enable milter) |
126 |
- $(use_enable test check) |
127 |
- $(use_with xml) |
128 |
- $(use_with iconv) |
129 |
- ${JSONUSE} |
130 |
- $(use_enable libclamav-only) |
131 |
- $(use_with !libclamav-only libcurl) |
132 |
- --with-system-libmspack |
133 |
- --cache-file="${S}"/config.cache |
134 |
- --disable-experimental |
135 |
- --disable-static |
136 |
- --disable-zlib-vcheck |
137 |
- --enable-id-check |
138 |
- --with-dbdir="${EPREFIX}"/var/lib/clamav |
139 |
- # Don't call --with-zlib=/usr (see bug #699296) |
140 |
- --with-zlib |
141 |
- --disable-llvm |
142 |
- --enable-openrc |
143 |
- --runstatedir=/run |
144 |
- ) |
145 |
- econf "${myeconfargs[@]}" |
146 |
-} |
147 |
- |
148 |
-src_install() { |
149 |
- default |
150 |
- |
151 |
- rm -rf "${ED}"/var/lib/clamav || die |
152 |
- |
153 |
- if ! use libclamav-only ; then |
154 |
- if use systemd; then |
155 |
- # The tmpfiles entry is behind USE=systemd because the |
156 |
- # upstream OpenRC service files should (and do) ensure that |
157 |
- # the directories they need exist and have the correct |
158 |
- # permissions without the help of opentmpfiles. There are |
159 |
- # years-old root exploits in opentmpfiles, the design is |
160 |
- # fundamentally flawed, and the maintainer is not up to |
161 |
- # the task of fixing it. |
162 |
- dotmpfiles "${FILESDIR}/tmpfiles.d/clamav.conf" |
163 |
- systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service" |
164 |
- systemd_dounit "${FILESDIR}/clamd.service" |
165 |
- systemd_newunit "${FILESDIR}/freshclamd.service-r1" \ |
166 |
- "freshclamd.service" |
167 |
- fi |
168 |
- |
169 |
- insinto /etc/logrotate.d |
170 |
- newins "${FILESDIR}/clamd.logrotate" clamd |
171 |
- newins "${FILESDIR}/freshclam.logrotate" freshclam |
172 |
- use milter && \ |
173 |
- newins "${FILESDIR}/clamav-milter.logrotate-r1" clamav-milter |
174 |
- |
175 |
- # Modify /etc/{clamd,freshclam}.conf to be usable out of the box |
176 |
- sed -i -e "s:^\(Example\):\# \1:" \ |
177 |
- -e "s/^#\(PidFile .*\)/\1/" \ |
178 |
- -e "s/^#\(LocalSocket .*\)/\1/" \ |
179 |
- -e "s/^#\(User .*\)/\1/" \ |
180 |
- -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \ |
181 |
- -e "s:^\#\(LogTime\).*:\1 yes:" \ |
182 |
- -e "s/^#\(DatabaseDirectory .*\)/\1/" \ |
183 |
- "${ED}"/etc/clamd.conf.sample || die |
184 |
- |
185 |
- sed -i -e "s:^\(Example\):\# \1:" \ |
186 |
- -e "s/^#\(PidFile .*\)/\1/" \ |
187 |
- -e "s/^#\(DatabaseOwner .*\)/\1/" \ |
188 |
- -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \ |
189 |
- -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \ |
190 |
- -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \ |
191 |
- -e "s/^#\(DatabaseDirectory .*\)/\1/" \ |
192 |
- "${ED}"/etc/freshclam.conf.sample || die |
193 |
- |
194 |
- if use milter ; then |
195 |
- # Note: only keep the "unix" ClamdSocket and MilterSocket! |
196 |
- sed -i -e "s:^\(Example\):\# \1:" \ |
197 |
- -e "s/^#\(PidFile .*\)/\1/" \ |
198 |
- -e "s/^#\(ClamdSocket unix:.*\)/\1/" \ |
199 |
- -e "s/^#\(User .*\)/\1/" \ |
200 |
- -e "s/^#\(MilterSocket unix:.*\)/\1/" \ |
201 |
- -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \ |
202 |
- "${ED}"/etc/clamav-milter.conf.sample || die |
203 |
- |
204 |
- cat >> "${ED}"/etc/conf.d/clamd <<-EOF |
205 |
- MILTER_NICELEVEL=19 |
206 |
- START_MILTER=no |
207 |
- EOF |
208 |
- |
209 |
- systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service |
210 |
- fi |
211 |
- |
212 |
- local i |
213 |
- for i in clamd freshclam clamav-milter |
214 |
- do |
215 |
- if [[ -f "${ED}"/etc/"${i}".conf.sample ]]; then |
216 |
- mv "${ED}"/etc/"${i}".conf{.sample,} || die |
217 |
- fi |
218 |
- done |
219 |
- |
220 |
- # These both need to be writable by the clamav user. |
221 |
- # TODO: use syslog by default; that's what it's for. |
222 |
- diropts -o clamav -g clamav |
223 |
- keepdir /var/lib/clamav |
224 |
- keepdir /var/log/clamav |
225 |
- fi |
226 |
- |
227 |
- if use doc ; then |
228 |
- local HTML_DOCS=( docs/html/. ) |
229 |
- einstalldocs |
230 |
- |
231 |
- if ! use libclamav-only ; then |
232 |
- doman docs/man/*.[1-8] |
233 |
- fi |
234 |
- fi |
235 |
- |
236 |
- find "${ED}" -name '*.la' -delete || die |
237 |
-} |
238 |
- |
239 |
-src_test() { |
240 |
- if use libclamav-only ; then |
241 |
- ewarn "Test target not available when USE=libclamav-only is set, skipping tests ..." |
242 |
- return 0 |
243 |
- fi |
244 |
- |
245 |
- emake quick-check |
246 |
-} |
247 |
- |
248 |
-pkg_postinst() { |
249 |
- if ! use libclamav-only ; then |
250 |
- if use systemd ; then |
251 |
- tmpfiles_process clamav.conf |
252 |
- fi |
253 |
- fi |
254 |
- |
255 |
- if use milter ; then |
256 |
- elog "For simple instructions how to setup the clamav-milter read the" |
257 |
- elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}" |
258 |
- fi |
259 |
- |
260 |
- local databases=( "${EROOT}"/var/lib/clamav/main.c[lv]d ) |
261 |
- if [[ ! -f "${databases}" ]] ; then |
262 |
- ewarn "You must run freshclam manually to populate the virus database" |
263 |
- ewarn "before starting clamav for the first time." |
264 |
- fi |
265 |
- |
266 |
- ewarn "This version of ClamAV provides separate OpenRC services" |
267 |
- ewarn "for clamd, freshclam, clamav-milter, and clamonacc. The" |
268 |
- ewarn "clamd service now starts only the clamd daemon itself. You" |
269 |
- ewarn "should add freshclam (and perhaps clamav-milter) to any" |
270 |
- ewarn "runlevels that previously contained clamd." |
271 |
-} |