Gentoo Archives: gentoo-commits

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