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: Tue, 04 Dec 2018 07:27:27
Message-Id: 1543908420.285e45bc8a11ad2b72b8ea9b45b0c83cfdc7aa53.lordvan@gentoo
1 commit: 285e45bc8a11ad2b72b8ea9b45b0c83cfdc7aa53
2 Author: Thomas Raschbacher <lordvan <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 4 07:27:00 2018 +0000
4 Commit: Thomas Raschbacher <lordvan <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 4 07:27:00 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=285e45bc
7
8 app-antivirus/clamav: version bump
9
10 Signed-off-by: Thomas Raschbacher <lordvan <AT> gentoo.org>
11 Package-Manager: Portage-2.3.50, Repoman-2.3.11
12
13 app-antivirus/clamav/Manifest | 1 +
14 app-antivirus/clamav/clamav-0.101.0.ebuild | 173 +++++++++++++++++++++++++++++
15 2 files changed, 174 insertions(+)
16
17 diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest
18 index 822d139f6b7..697b992aa80 100644
19 --- a/app-antivirus/clamav/Manifest
20 +++ b/app-antivirus/clamav/Manifest
21 @@ -1,4 +1,5 @@
22 DIST clamav-0.100.0.tar.gz 16036757 BLAKE2B c51edfb05726e16e2ff1ef1fee9f174af5a0d65396f847a4f6e1246d5844b92eb70896fc598d2c73719b1315ff3c41aca503823431e0918d52f56d29399dd796 SHA512 57e1da86a32fdfb66887c4aeed03008bc070ce3cb6b881db411332f2f2e640b73dca84d990f5886526b3d6bd0c2770c7dcce5b4e7cf48323824c362452593549
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.99.4.tar.gz 16083015 BLAKE2B 3c2e7d11ee05fe846f75c3fb6501b5fd809a2e58f8e69c82e493e32fcbc87ca0e5b5f7ab83a0d7e251a5dc8e84aed1475c87c1248b393fa04b6924a2ab32b9bf SHA512 778d5ef510d8d4bdfac5dc33d92469ed4283c414b3d42da6e1a0b13ed70e37755d5c837622dc336bc728ba1f8bf5485fc8a8d3a67a90e9aaa9e4dc71ece0691d
27
28 diff --git a/app-antivirus/clamav/clamav-0.101.0.ebuild b/app-antivirus/clamav/clamav-0.101.0.ebuild
29 new file mode 100644
30 index 00000000000..ac686da8a56
31 --- /dev/null
32 +++ b/app-antivirus/clamav/clamav-0.101.0.ebuild
33 @@ -0,0 +1,173 @@
34 +# Copyright 1999-2018 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 + !!<app-antivirus/clamav-0.99"
63 +# hard block clamav < 0.99 due to linking problems Bug #567680
64 +# openssl is now *required* see this link as to why
65 +# https://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
66 +DEPEND="${CDEPEND}
67 + virtual/pkgconfig
68 + test? ( dev-libs/check )"
69 +RDEPEND="${CDEPEND}
70 + selinux? ( sec-policy/selinux-clamav )"
71 +
72 +DOCS=( docs/UserManual.md docs/UserManual )
73 +HTML_DOCS=( docs/html )
74 +
75 +#PATCHES=(
76 +# "${FILESDIR}/clamav-0.100.0_autotools.patch"
77 +#)
78 +
79 +pkg_setup() {
80 + enewgroup clamav
81 + enewuser clamav -1 -1 /dev/null clamav
82 +}
83 +
84 +#src_prepare() {
85 +# default
86 +#
87 +# eautoconf
88 +#}
89 +
90 +src_configure() {
91 + use ppc64 && append-flags -mminimal-toc
92 + use uclibc && export ac_cv_type_error_t=yes
93 +
94 + # according to configure help it should be
95 + # $(use_enable xml)
96 + # but that does not work
97 + # do not add this, since --disable-xml seems to override
98 + # --without-xml
99 +
100 + econf \
101 + $(use_enable bzip2) \
102 + $(use_enable clamdtop) \
103 + $(use_enable ipv6) \
104 + $(use_enable milter) \
105 + $(use_enable static-libs static) \
106 + $(use_enable test check) \
107 + $(use_with xml) \
108 + $(use_with iconv) \
109 + $(use_with metadata-analysis-api libjson /usr) \
110 + --with-system-libmspack \
111 + --cache-file="${S}"/config.cache \
112 + --disable-experimental \
113 + --disable-gcc-vcheck \
114 + --disable-zlib-vcheck \
115 + --enable-id-check \
116 + --with-dbdir="${EPREFIX}"/var/lib/clamav \
117 + --with-zlib="${EPREFIX}"/usr \
118 + --disable-llvm
119 +}
120 +
121 +src_install() {
122 + default
123 +
124 + rm -rf "${ED}"/var/lib/clamav
125 + newinitd "${FILESDIR}"/clamd.initd-r6 clamd
126 + newconfd "${FILESDIR}"/clamd.conf-r1 clamd
127 +
128 + systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
129 + systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
130 + systemd_dounit "${FILESDIR}/clamd.service"
131 + systemd_dounit "${FILESDIR}/freshclamd.service"
132 +
133 + keepdir /var/lib/clamav
134 + fowners clamav:clamav /var/lib/clamav
135 + keepdir /var/log/clamav
136 + fowners clamav:clamav /var/log/clamav
137 +
138 + dodir /etc/logrotate.d
139 + insinto /etc/logrotate.d
140 + newins "${FILESDIR}"/clamav.logrotate clamav
141 +
142 + # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
143 + sed -i -e "s:^\(Example\):\# \1:" \
144 + -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
145 + -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
146 + -e "s:.*\(User\) .*:\1 clamav:" \
147 + -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
148 + -e "s:^\#\(LogTime\).*:\1 yes:" \
149 + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
150 + "${ED}"/etc/clamd.conf.sample || die
151 + sed -i -e "s:^\(Example\):\# \1:" \
152 + -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
153 + -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
154 + -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
155 + -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
156 + -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
157 + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
158 + "${ED}"/etc/freshclam.conf.sample || die
159 +
160 + if use milter ; then
161 + # MilterSocket one to include ' /' because there is a 2nd line for
162 + # inet: which we want to leave
163 + ##dodoc "${FILESDIR}"/clamav-milter.README.gentoo
164 + sed -i -e "s:^\(Example\):\# \1:" \
165 + -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
166 + -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
167 + -e "s:.*\(User\) .*:\1 clamav:" \
168 + -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
169 + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
170 + -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
171 + "${ED}"/etc/clamav-milter.conf.sample || die
172 + cat >> "${ED}"/etc/conf.d/clamd <<-EOF
173 + MILTER_NICELEVEL=19
174 + START_MILTER=no
175 + EOF
176 +
177 + systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
178 + fi
179 +
180 + if use doc; then
181 + einstalldocs
182 + doman docs/man/*.[1-8]
183 + fi
184 +
185 + for i in clamd freshclam clamav-milter
186 + do
187 + [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
188 + done
189 +
190 + prune_libtool_files --all
191 +}
192 +
193 +src_test() {
194 + emake quick-check
195 +}
196 +
197 +pkg_postinst() {
198 + if use milter ; then
199 + elog "For simple instructions how to setup the clamav-milter read the"
200 + elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
201 + fi
202 + if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
203 + ewarn "You must run freshclam manually to populate the virus database files"
204 + ewarn "before starting clamav for the first time.\n"
205 + fi
206 +}