Gentoo Archives: gentoo-commits

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