summaryrefslogtreecommitdiff
path: root/app-antivirus
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-05-29 03:22:09 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-05-29 03:22:09 +0100
commitd4bd6695641f6d2ec7ff8681913d304e995902f5 (patch)
tree6ec8d4c38152bb4f2bb4b93277236ebd9fbbd21d /app-antivirus
parent22910f5d14da606bd7f06e19a2f61c5d1a8fc94b (diff)
gentoo resync : 29.05.2018
Diffstat (limited to 'app-antivirus')
-rw-r--r--app-antivirus/Manifest.gzbin732 -> 732 bytes
-rw-r--r--app-antivirus/clamav/Manifest16
-rw-r--r--app-antivirus/clamav/clamav-0.99.2-r1.ebuild158
-rw-r--r--app-antivirus/clamav/clamav-0.99.2-r3.ebuild159
-rw-r--r--app-antivirus/clamav/clamav-0.99.3-r1.ebuild159
-rw-r--r--app-antivirus/clamav/clamav-0.99.3-r2.ebuild160
-rw-r--r--app-antivirus/clamav/clamav-0.99.4-r1.ebuild2
-rw-r--r--app-antivirus/clamav/clamav-0.99.4.ebuild156
-rw-r--r--app-antivirus/clamav/files/clamav-0.99-zlib.patch22
-rw-r--r--app-antivirus/clamav/files/clamav-0.99.2-bytecode_api.patch50
-rw-r--r--app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch84
-rw-r--r--app-antivirus/clamav/files/clamav-0.99.2-pcre2-compile-erroffset.patch12
-rw-r--r--app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch23
-rw-r--r--app-antivirus/clamav/files/clamav-0.99.3-VMSF_DELTA-fix-CVE-2012-6706.patch186
-rw-r--r--app-antivirus/clamav/files/clamav-0.99.3-fix-fd-leaks-in-cli_scanscript.patch132
15 files changed, 2 insertions, 1317 deletions
diff --git a/app-antivirus/Manifest.gz b/app-antivirus/Manifest.gz
index a962fd800202..5d55bdbd961f 100644
--- a/app-antivirus/Manifest.gz
+++ b/app-antivirus/Manifest.gz
Binary files differ
diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest
index a9b47e38e184..d5dff6050725 100644
--- a/app-antivirus/clamav/Manifest
+++ b/app-antivirus/clamav/Manifest
@@ -1,11 +1,4 @@
AUX clamav-0.100.0_autotools.patch 369 BLAKE2B ee30a0fe90e4553b64a67d1e0646a9d6c5ee33858e657905e0d71da9c4b14176469f1b2960dd04b25d46823fd239b252490c172a51d64eae589894423b8aafb0 SHA512 d872a162040ba10476f463b9e0e77edea81f022a4c0d53d7a6d09ca5753036a5236cf7182f518515f659888a203b07366873b757cf5af15c3dee74bbad6b2d02
-AUX clamav-0.99-zlib.patch 805 BLAKE2B e99dbd3231caec1007917651b25d781c5b8df74b4988951e4e1418eaff506ef688d4e21ccc14506772ba63f5cfa59d497e4dda8bb321f9003042b3be182e7dc0 SHA512 42ca7fddcf0b8dbe4cbaf0076271df0806806e5e5d4c33e65b643d063ca7744f147abc379dd7475692d15e22cd991a286769013bfbf843158072140d3f3dc310
-AUX clamav-0.99.2-bytecode_api.patch 1531 BLAKE2B 50a70cf6e6cf206ec5e427e3b724c2a7ec6188b5aed21a2531278961b63f1b2aa4f684698de0d00c7a04349be920b7051ed121866ed21ab7f6cbac86c8cf86d9 SHA512 05d5d9ce0aa64a178a1dfce0e37e2648f42a31a78b89c6d54203899a8334d0ef5a0f1484803932e9a09745bed3f11865c9ccedf175e7e09fcb4f3d621aa6f029
-AUX clamav-0.99.2-gcc-6.patch 4476 BLAKE2B 9ef285f83665cb9cd41f1fe94a64805fc6413c66909be2ae93efb9e342beda0fbd7db81691506c8aa1cbf9bde4e0e74efbdadc0ba2e459479ada35266638ad7e SHA512 b30ed8b888af3697294c1a2aa96a335b3b1035f4f76e3bcf6c243dca7bdc5921a9bb182fbfd5e0e7f1bb9dce93b2312927e28f78edae466d31200a2be50f3a85
-AUX clamav-0.99.2-pcre2-compile-erroffset.patch 540 BLAKE2B 77ad84cedb05329024226fffed554fce3005a678471117c9a9db54221d6d7458e6318b5b150c70e7f64cf16ad47d2093e40a67de0e9af024eb9bf6ed73b6c9f3 SHA512 6f2dd207accbc409c7e7155e3c04cf50255d4b6683ada24a559c23375ec4fa333f93118a25c8275cd8d6be7f950200c3730fd8174cc4a0450fe2160f2b86b536
-AUX clamav-0.99.2-tinfo.patch 656 BLAKE2B be926db8e63458f0ef9d6d5b6f26058c2100881997cd97b03cf2f893f0d0ef2b18ebc25e1f38f2a1df5aef3a7f647eb1cec66c0cc173175976048ca5ad57e782 SHA512 33e375e8f4e74f284e9d14adaa8ef095bdb67b2f62e4b7c5e9c38a3c5f955106173e402859fabf44ada40ae08cceb3fca79322f8854f47d850816064641f4451
-AUX clamav-0.99.3-VMSF_DELTA-fix-CVE-2012-6706.patch 7631 BLAKE2B eb5ecde76d6cf748d3877ff18489c6b544b57a4a44375f3679d3ff8d45b99879af12840100e0eafc8461833eb6bb40ae4b26bf745cb28be9431b21a8ee5143c1 SHA512 11a4d299d719e43f22e7065d91785d4782d95ba0a167d43480b2409cbdd6ba3ba5c8552cee72c65a7bff0943fc24ac58cf6acc79ae364a7c42a8ab1a1fa6ebaf
-AUX clamav-0.99.3-fix-fd-leaks-in-cli_scanscript.patch 3554 BLAKE2B 36ce8580da5abc310caa29ae87478b811f2db9403cb79b01efb9394b3d19ced2be3dbf66a1ad2ea06c660156a03879ba3dbca4329569e349d7a70c12f034d237 SHA512 e0dfecff8adb1e30f4c7a20271fd8731ebbb20449a532d70977f7491d8539fc8ed74f851f6903f6265a2e660f9471341e68cc0651e5f94356179ff1f328ada0c
AUX clamav-0.99.4-fix-newer-zlib.patch 1721 BLAKE2B 5595696cb0fe1efbcf85d64fa2b9f9bd760ab38467a3d3c2996272d2e533b633d9a4d176096786a4ce666638902698be239d25762a61dec956100f6e33b3f9de SHA512 0b87152c6ecbdafabdb6fdef0e53c12c7651c8c47baa3c46497e19a7a220f4e1f9c1a79c99fb15399848d264ede38b3cddd3a369797a761069b370f367aa723d
AUX clamav-0.99.4-pcre2-compile-erroffset.patch 510 BLAKE2B 888f5c0cf1205b5ca22ff5f445f194c9e62dd511fcf8a784be6592f700e0db6f7a36b00c88b73c5484cad2075822eb5c1e0c0f62c8ee12d6bac2d1b845a9aca5 SHA512 f03962fc47b10d729437f22374c17b773ee0f519cf537b1d7885ec6dbc1efd36d00372314faaabdf5400b85e781ab5b14e69b929c844b34520801e064d383dc2
AUX clamav-milter.README.gentoo 2284 BLAKE2B 7afc18f3dad57c2d7595257b356943efb3d1af28d55ac8f09f0506430fd0dedf0820906ced666a7237e3af44a9bc1b43fff017c03faad844f96b132ca4c5dde6 SHA512 38eadf2d919a0c48345600ea5a39c90e766b62e8b1ffc7bb01969a8fd93c4545f2030058a470ac7efb75a1d6c74f9930438f58aeff5035e19e38241ed381f7b3
@@ -20,14 +13,7 @@ AUX clamd_at.service 228 BLAKE2B 85181b02329a86495d0737308417dd873424da0bb1cd376
AUX freshclamd.service 191 BLAKE2B 5b517bf15d008454052bd0f7d5a10fb89284a5b64d1cd11570981ca07d70d4dbab6739175ef7434c5c16625fc4f342d21fe6c67970ebac9e64dc8c08732ab68e SHA512 aaf78e763d2aa9c17fc95edb1550547b6681a91fd239a86535e5193d36ff0e152c51c3a3957542f80d5b170805f296159958ac347886981ddd324bec4237da92
AUX tmpfiles.d/clamav.conf 33 BLAKE2B 447c5ad4ad79bc70fc386833fa763451d30bf30f1ae26434039a3926ca5aae9734e0152c83b5b9aa5bed87b17c1b685c4ea9f41c9cb6b3197b1e78e800b71fd9 SHA512 eabe5a94c2679b82ea3e29272eb448b47e60b271381d3e97f3970b1a9e086d61662aff2d29887950a911025294aa7cea8bfd9003d257963566b251bcaeb5f6b2
DIST clamav-0.100.0.tar.gz 16036757 BLAKE2B c51edfb05726e16e2ff1ef1fee9f174af5a0d65396f847a4f6e1246d5844b92eb70896fc598d2c73719b1315ff3c41aca503823431e0918d52f56d29399dd796 SHA512 57e1da86a32fdfb66887c4aeed03008bc070ce3cb6b881db411332f2f2e640b73dca84d990f5886526b3d6bd0c2770c7dcce5b4e7cf48323824c362452593549
-DIST clamav-0.99.2.tar.gz 16067497 BLAKE2B 4155e3125ccc45cc6828033f207b6b8d3514253dfb8156428ad4096c0901d5a8500f9dd253b8f40afdc49a6039b647627868f75d51829ab7bd247ada5f3b8383 SHA512 7744ba8a344b163cf98e9737cddfd25d2120b34ee9c4518380e028c9ec3cd50127b198b0dfa9fde30f5ce9aab0c0e6384712fbc11287e77d16ce052fd7b6ac44
-DIST clamav-0.99.3.tar.gz 16082645 BLAKE2B 3be06e563f17a07e4c7e95eb3efbb61e80858bcb3dffc584f13ec30dc2ef9c5257aec78605f1c03e183b4b7ed5b08343a25b579b2b12e54458694eff624aa01e SHA512 0d3c75d571ed4aa4937ef2b743a39a9a144f5adfd6f56f71046e5a8387b8ed7c3c4d9a4196aa85750f9ec4dc545720fdd659289d0cce086ab13a7cc505a0ab3e
DIST clamav-0.99.4.tar.gz 16083015 BLAKE2B 3c2e7d11ee05fe846f75c3fb6501b5fd809a2e58f8e69c82e493e32fcbc87ca0e5b5f7ab83a0d7e251a5dc8e84aed1475c87c1248b393fa04b6924a2ab32b9bf SHA512 778d5ef510d8d4bdfac5dc33d92469ed4283c414b3d42da6e1a0b13ed70e37755d5c837622dc336bc728ba1f8bf5485fc8a8d3a67a90e9aaa9e4dc71ece0691d
EBUILD clamav-0.100.0.ebuild 5290 BLAKE2B 12205593f8c86aa98a2392dd22681dc0adc3606358778090b9ccf9ad09475bf456f29f6451a86640c518995109043ff308631607a40a6c3c7ada381872a1c964 SHA512 79e6747939af3ab9b52dfff633e0df9bc3932a478b0d17e5892f8b3b09477ab474eaf23f4431cab1d7ca03ff153d4ae3f8b199f8ed91cadc4f93fea92935538d
-EBUILD clamav-0.99.2-r1.ebuild 5127 BLAKE2B 2080e66c0ca3c55535d4faee04228169df1b6e8aa87db55b79172fd626e5a078ad3344c44d77a1134da13588bfbbf576091648141d9cd05b97a9d7bc44601e90 SHA512 2ea3c877a47c1fceed4661fc6ea5e037e4e78fffe8241444e39ab30a2268aac3b21c1922836f449550c55f315b2649169efe6aa4a8446068762c9120dcf12ba0
-EBUILD clamav-0.99.2-r3.ebuild 5184 BLAKE2B 0d4ba1b9b8267fa8ef1727c3bc79a8c5ac3c76ae4ee14e10468a117314c1f01d50cc145f2e39509108ea89dd6c1b96ff11eb55fa2f69cd2a5819415c2ee3fe3a SHA512 6d38505706417b50aa6f654cf32eb963bdbf4b76f2a1858ea72431aec884fceaec3a2e098bbf1f6d3a4a36f066d1cdc8a3ef8acf8ce98d3e9cbb934bf1f65ee0
-EBUILD clamav-0.99.3-r1.ebuild 5240 BLAKE2B acf2728a1698b609396e35ccd4521d1c11fdb9121dd1961e932c5b28431bb1064fcc27c1da7050ea47bea7c464ecc4f3bb6b564581246f062e613544fda99c19 SHA512 3957d4890ad9198104b83dda84f3cab117b051d699d2f69773f7d380fb62e32ac916b11d02fffba93fef791cf03092300807a57c9a4528f4e5dc034e0eb275e2
-EBUILD clamav-0.99.3-r2.ebuild 5308 BLAKE2B 1cae0424c1f22be7e50afebb0f67d76d08a9b9a4b82a490da6bb33011916517f376d850da9751471b6cbc233283e50f823fbb42ba3331fdd79b5db587596db4f SHA512 0b394b27a3261a71a6220ef608d4eef9093c337b6ec3025454f93fb307be77716d4bd4315d9a6f956b2860719ffbf7f30609e1a288dc5b0611a748d4dd375cce
-EBUILD clamav-0.99.4-r1.ebuild 5168 BLAKE2B 8a2a60bb3aeb74958deeda3f613e52dda630467680d48314608a76a153b331dd4d06c8a0f02fdbe7bd47926c949ecdd2274238437000a862310bd74c7dd717ed SHA512 7c0fe218c3a089c45ec4f734e222b8fb503d8102520713d589863cb22f427cbb5e93174297bb902070f042527bf2955ca36a68505f4ce6e4783ea60185d681b4
-EBUILD clamav-0.99.4.ebuild 5064 BLAKE2B 71a3469c4a9d332af2a992e6678d86a812fd4900737967e0017bd37525fc54201b4313b6d21c35fe60f1b67cf6ddf3ffcaefd97163346a8b24fb807a589ebee9 SHA512 686e984a9e949cc1a16cbab25098bdff84f296a8aa553bd29056692939ad29d46e628cb7aff56f5369c6695fd4f85970de4c5bf92426dae65e5418f72d52d99b
+EBUILD clamav-0.99.4-r1.ebuild 5167 BLAKE2B 952f9313405c6e8b57734244ce7bb3221149b5a84215b70b80e180ef195e227c287f32699046c9954ff35185ab38c9461be7457c273a64a9ed98db88408159a5 SHA512 7fb514f40822222ef259c97d41f8371d851399527c62eec9ae1b0095d5754218d6dd8d921ca5037588112f713a107d40a0b4636c98b159acee9a4fd902e54f83
MISC metadata.xml 822 BLAKE2B fc73a9b45c1a80d590d4ce93f4c704ce2df3ec270cb292ad5552b2452e737cff45ceb2cf14d7c061f9a2ad2104081cacf36d4c19ccbddadd40579236da5b5939 SHA512 3cf072b3463e721584f5b608ced29f528f56119f17fa6879de3f0950ca4678ffdd32527a317d8740f4c288af440940fe35d876b3b9b1224cf804ce3808ef3add
diff --git a/app-antivirus/clamav/clamav-0.99.2-r1.ebuild b/app-antivirus/clamav/clamav-0.99.2-r1.ebuild
deleted file mode 100644
index 6f2079c18eb5..000000000000
--- a/app-antivirus/clamav/clamav-0.99.2-r1.ebuild
+++ /dev/null
@@ -1,158 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools eutils flag-o-matic user systemd
-
-DESCRIPTION="Clam Anti-Virus Scanner"
-HOMEPAGE="https://www.clamav.net/"
-SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs uclibc"
-
-CDEPEND="bzip2? ( app-arch/bzip2 )
- clamdtop? ( sys-libs/ncurses:0 )
- iconv? ( virtual/libiconv )
- metadata-analysis-api? ( dev-libs/json-c:= )
- milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
- dev-libs/libtommath
- >=sys-libs/zlib-1.2.2
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- sys-devel/libtool
- || ( dev-libs/libpcre2 >dev-libs/libpcre-6 )
- !!<app-antivirus/clamav-0.99"
-# hard block clamav < 0.99 due to linking problems Bug #567680
-# openssl is now *required* see this link as to why
-# https://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
-DEPEND="${CDEPEND}
- virtual/pkgconfig"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-clamav )"
-
-DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
-PATCHES=(
- "${FILESDIR}"/${P}-gcc-6.patch
- "${FILESDIR}"/${P}-tinfo.patch
- "${FILESDIR}"/${PN}-0.99-zlib.patch
- "${FILESDIR}"/${P}-bytecode_api.patch
-)
-
-pkg_setup() {
- enewgroup clamav
- enewuser clamav -1 -1 /dev/null clamav
-}
-
-src_prepare() {
- default
-
- eautoconf
-}
-
-src_configure() {
- use ppc64 && append-flags -mminimal-toc
- use uclibc && export ac_cv_type_error_t=yes
-
- econf \
- $(use_enable bzip2) \
- $(use_enable clamdtop) \
- $(use_enable ipv6) \
- $(use_enable milter) \
- $(use_enable static-libs static) \
- $(use_with iconv) \
- $(use_with metadata-analysis-api libjson /usr) \
- --cache-file="${S}"/config.cache \
- --disable-experimental \
- --disable-gcc-vcheck \
- --disable-zlib-vcheck \
- --enable-id-check \
- --with-dbdir="${EPREFIX}"/var/lib/clamav \
- --with-system-tommath \
- --with-zlib="${EPREFIX}"/usr
-}
-
-src_install() {
- default
-
- rm -rf "${ED}"/var/lib/clamav
- newinitd "${FILESDIR}"/clamd.initd-r6 clamd
- newconfd "${FILESDIR}"/clamd.conf-r1 clamd
-
- systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
- systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
- systemd_dounit "${FILESDIR}/clamd.service"
- systemd_dounit "${FILESDIR}/freshclamd.service"
-
- keepdir /var/lib/clamav
- fowners clamav:clamav /var/lib/clamav
- keepdir /var/log/clamav
- fowners clamav:clamav /var/log/clamav
-
- dodir /etc/logrotate.d
- insinto /etc/logrotate.d
- newins "${FILESDIR}"/clamav.logrotate clamav
-
- # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
- -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
- -e "s:.*\(User\) .*:\1 clamav:" \
- -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
- -e "s:^\#\(LogTime\).*:\1 yes:" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- "${ED}"/etc/clamd.conf.sample || die
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
- -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
- -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
- -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
- -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- "${ED}"/etc/freshclam.conf.sample || die
-
- if use milter ; then
- # MilterSocket one to include ' /' because there is a 2nd line for
- # inet: which we want to leave
- dodoc "${FILESDIR}"/clamav-milter.README.gentoo
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
- -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
- -e "s:.*\(User\) .*:\1 clamav:" \
- -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
- "${ED}"/etc/clamav-milter.conf.sample || die
- cat >> "${ED}"/etc/conf.d/clamd <<-EOF
- MILTER_NICELEVEL=19
- START_MILTER=no
- EOF
-
- systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
- fi
-
- for i in clamd freshclam clamav-milter
- do
- [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
- done
-
- prune_libtool_files --all
-}
-
-src_test() {
- emake quick-check
-}
-
-pkg_postinst() {
- if use milter ; then
- elog "For simple instructions how to setup the clamav-milter read the"
- elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
- fi
- if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
- ewarn "You must run freshclam manually to populate the virus database files"
- ewarn "before starting clamav for the first time.\n"
- fi
-}
diff --git a/app-antivirus/clamav/clamav-0.99.2-r3.ebuild b/app-antivirus/clamav/clamav-0.99.2-r3.ebuild
deleted file mode 100644
index c5980d53cd4a..000000000000
--- a/app-antivirus/clamav/clamav-0.99.2-r3.ebuild
+++ /dev/null
@@ -1,159 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools eutils flag-o-matic user systemd
-
-DESCRIPTION="Clam Anti-Virus Scanner"
-HOMEPAGE="https://www.clamav.net/"
-SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs uclibc"
-
-CDEPEND="bzip2? ( app-arch/bzip2 )
- clamdtop? ( sys-libs/ncurses:0 )
- iconv? ( virtual/libiconv )
- metadata-analysis-api? ( dev-libs/json-c:= )
- milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
- dev-libs/libtommath
- >=sys-libs/zlib-1.2.2
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- sys-devel/libtool
- || ( dev-libs/libpcre2 >dev-libs/libpcre-6 )
- !!<app-antivirus/clamav-0.99"
-# hard block clamav < 0.99 due to linking problems Bug #567680
-# openssl is now *required* see this link as to why
-# https://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
-DEPEND="${CDEPEND}
- virtual/pkgconfig"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-clamav )"
-
-DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
-PATCHES=(
- "${FILESDIR}"/${P}-gcc-6.patch
- "${FILESDIR}"/${P}-tinfo.patch
- "${FILESDIR}"/${PN}-0.99-zlib.patch
- "${FILESDIR}"/${P}-bytecode_api.patch
- "${FILESDIR}"/${P}-pcre2-compile-erroffset.patch
-)
-
-pkg_setup() {
- enewgroup clamav
- enewuser clamav -1 -1 /dev/null clamav
-}
-
-src_prepare() {
- default
-
- eautoconf
-}
-
-src_configure() {
- use ppc64 && append-flags -mminimal-toc
- use uclibc && export ac_cv_type_error_t=yes
-
- econf \
- $(use_enable bzip2) \
- $(use_enable clamdtop) \
- $(use_enable ipv6) \
- $(use_enable milter) \
- $(use_enable static-libs static) \
- $(use_with iconv) \
- $(use_with metadata-analysis-api libjson /usr) \
- --cache-file="${S}"/config.cache \
- --disable-experimental \
- --disable-gcc-vcheck \
- --disable-zlib-vcheck \
- --enable-id-check \
- --with-dbdir="${EPREFIX}"/var/lib/clamav \
- --with-system-tommath \
- --with-zlib="${EPREFIX}"/usr
-}
-
-src_install() {
- default
-
- rm -rf "${ED}"/var/lib/clamav
- newinitd "${FILESDIR}"/clamd.initd-r6 clamd
- newconfd "${FILESDIR}"/clamd.conf-r1 clamd
-
- systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
- systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
- systemd_dounit "${FILESDIR}/clamd.service"
- systemd_dounit "${FILESDIR}/freshclamd.service"
-
- keepdir /var/lib/clamav
- fowners clamav:clamav /var/lib/clamav
- keepdir /var/log/clamav
- fowners clamav:clamav /var/log/clamav
-
- dodir /etc/logrotate.d
- insinto /etc/logrotate.d
- newins "${FILESDIR}"/clamav.logrotate clamav
-
- # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
- -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
- -e "s:.*\(User\) .*:\1 clamav:" \
- -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
- -e "s:^\#\(LogTime\).*:\1 yes:" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- "${ED}"/etc/clamd.conf.sample || die
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
- -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
- -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
- -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
- -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- "${ED}"/etc/freshclam.conf.sample || die
-
- if use milter ; then
- # MilterSocket one to include ' /' because there is a 2nd line for
- # inet: which we want to leave
- dodoc "${FILESDIR}"/clamav-milter.README.gentoo
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
- -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
- -e "s:.*\(User\) .*:\1 clamav:" \
- -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
- "${ED}"/etc/clamav-milter.conf.sample || die
- cat >> "${ED}"/etc/conf.d/clamd <<-EOF
- MILTER_NICELEVEL=19
- START_MILTER=no
- EOF
-
- systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
- fi
-
- for i in clamd freshclam clamav-milter
- do
- [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
- done
-
- prune_libtool_files --all
-}
-
-src_test() {
- emake quick-check
-}
-
-pkg_postinst() {
- if use milter ; then
- elog "For simple instructions how to setup the clamav-milter read the"
- elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
- fi
- if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
- ewarn "You must run freshclam manually to populate the virus database files"
- ewarn "before starting clamav for the first time.\n"
- fi
-}
diff --git a/app-antivirus/clamav/clamav-0.99.3-r1.ebuild b/app-antivirus/clamav/clamav-0.99.3-r1.ebuild
deleted file mode 100644
index fdd1c903ae13..000000000000
--- a/app-antivirus/clamav/clamav-0.99.3-r1.ebuild
+++ /dev/null
@@ -1,159 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools eutils flag-o-matic user systemd
-
-DESCRIPTION="Clam Anti-Virus Scanner"
-HOMEPAGE="https://www.clamav.net/"
-SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ~ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs uclibc"
-
-CDEPEND="bzip2? ( app-arch/bzip2 )
- clamdtop? ( sys-libs/ncurses:0 )
- iconv? ( virtual/libiconv )
- metadata-analysis-api? ( dev-libs/json-c:= )
- milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
- dev-libs/libtommath
- >=sys-libs/zlib-1.2.2:=
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- sys-devel/libtool
- || ( dev-libs/libpcre2 >dev-libs/libpcre-6 )
- !!<app-antivirus/clamav-0.99"
-# hard block clamav < 0.99 due to linking problems Bug #567680
-# openssl is now *required* see this link as to why
-# https://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
-DEPEND="${CDEPEND}
- virtual/pkgconfig"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-clamav )"
-
-DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
-PATCHES=(
- "${FILESDIR}"/${PN}-0.99.2-gcc-6.patch
- "${FILESDIR}"/${PN}-0.99.2-tinfo.patch
- "${FILESDIR}"/${PN}-0.99.2-bytecode_api.patch
- "${FILESDIR}"/${PN}-0.99.2-pcre2-compile-erroffset.patch
- "${FILESDIR}"/${PN}-0.99.3-fix-fd-leaks-in-cli_scanscript.patch
-)
-
-pkg_setup() {
- enewgroup clamav
- enewuser clamav -1 -1 /dev/null clamav
-}
-
-src_prepare() {
- default
-
- eautoconf
-}
-
-src_configure() {
- use ppc64 && append-flags -mminimal-toc
- use uclibc && export ac_cv_type_error_t=yes
-
- econf \
- $(use_enable bzip2) \
- $(use_enable clamdtop) \
- $(use_enable ipv6) \
- $(use_enable milter) \
- $(use_enable static-libs static) \
- $(use_with iconv) \
- $(use_with metadata-analysis-api libjson /usr) \
- --cache-file="${S}"/config.cache \
- --disable-experimental \
- --disable-gcc-vcheck \
- --disable-zlib-vcheck \
- --enable-id-check \
- --with-dbdir="${EPREFIX}"/var/lib/clamav \
- --with-system-tommath \
- --with-zlib="${EPREFIX}"/usr
-}
-
-src_install() {
- default
-
- rm -rf "${ED}"/var/lib/clamav
- newinitd "${FILESDIR}"/clamd.initd-r6 clamd
- newconfd "${FILESDIR}"/clamd.conf-r1 clamd
-
- systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
- systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
- systemd_dounit "${FILESDIR}/clamd.service"
- systemd_dounit "${FILESDIR}/freshclamd.service"
-
- keepdir /var/lib/clamav
- fowners clamav:clamav /var/lib/clamav
- keepdir /var/log/clamav
- fowners clamav:clamav /var/log/clamav
-
- dodir /etc/logrotate.d
- insinto /etc/logrotate.d
- newins "${FILESDIR}"/clamav.logrotate clamav
-
- # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
- -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
- -e "s:.*\(User\) .*:\1 clamav:" \
- -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
- -e "s:^\#\(LogTime\).*:\1 yes:" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- "${ED}"/etc/clamd.conf.sample || die
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
- -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
- -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
- -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
- -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- "${ED}"/etc/freshclam.conf.sample || die
-
- if use milter ; then
- # MilterSocket one to include ' /' because there is a 2nd line for
- # inet: which we want to leave
- dodoc "${FILESDIR}"/clamav-milter.README.gentoo
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
- -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
- -e "s:.*\(User\) .*:\1 clamav:" \
- -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
- "${ED}"/etc/clamav-milter.conf.sample || die
- cat >> "${ED}"/etc/conf.d/clamd <<-EOF
- MILTER_NICELEVEL=19
- START_MILTER=no
- EOF
-
- systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
- fi
-
- for i in clamd freshclam clamav-milter
- do
- [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
- done
-
- prune_libtool_files --all
-}
-
-src_test() {
- emake quick-check
-}
-
-pkg_postinst() {
- if use milter ; then
- elog "For simple instructions how to setup the clamav-milter read the"
- elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
- fi
- if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
- ewarn "You must run freshclam manually to populate the virus database files"
- ewarn "before starting clamav for the first time.\n"
- fi
-}
diff --git a/app-antivirus/clamav/clamav-0.99.3-r2.ebuild b/app-antivirus/clamav/clamav-0.99.3-r2.ebuild
deleted file mode 100644
index 2a03bb2ce1c9..000000000000
--- a/app-antivirus/clamav/clamav-0.99.3-r2.ebuild
+++ /dev/null
@@ -1,160 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools eutils flag-o-matic user systemd
-
-DESCRIPTION="Clam Anti-Virus Scanner"
-HOMEPAGE="https://www.clamav.net/"
-SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs uclibc"
-
-CDEPEND="bzip2? ( app-arch/bzip2 )
- clamdtop? ( sys-libs/ncurses:0 )
- iconv? ( virtual/libiconv )
- metadata-analysis-api? ( dev-libs/json-c:= )
- milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
- dev-libs/libtommath
- >=sys-libs/zlib-1.2.2:=
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- sys-devel/libtool
- || ( dev-libs/libpcre2 >dev-libs/libpcre-6 )
- !!<app-antivirus/clamav-0.99"
-# hard block clamav < 0.99 due to linking problems Bug #567680
-# openssl is now *required* see this link as to why
-# https://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
-DEPEND="${CDEPEND}
- virtual/pkgconfig"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-clamav )"
-
-DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
-PATCHES=(
- "${FILESDIR}"/${PN}-0.99.2-gcc-6.patch
- "${FILESDIR}"/${PN}-0.99.2-tinfo.patch
- "${FILESDIR}"/${PN}-0.99.2-bytecode_api.patch
- "${FILESDIR}"/${PN}-0.99.2-pcre2-compile-erroffset.patch
- "${FILESDIR}"/${PN}-0.99.3-fix-fd-leaks-in-cli_scanscript.patch
- "${FILESDIR}"/${PN}-0.99.3-VMSF_DELTA-fix-CVE-2012-6706.patch
-)
-
-pkg_setup() {
- enewgroup clamav
- enewuser clamav -1 -1 /dev/null clamav
-}
-
-src_prepare() {
- default
-
- eautoconf
-}
-
-src_configure() {
- use ppc64 && append-flags -mminimal-toc
- use uclibc && export ac_cv_type_error_t=yes
-
- econf \
- $(use_enable bzip2) \
- $(use_enable clamdtop) \
- $(use_enable ipv6) \
- $(use_enable milter) \
- $(use_enable static-libs static) \
- $(use_with iconv) \
- $(use_with metadata-analysis-api libjson /usr) \
- --cache-file="${S}"/config.cache \
- --disable-experimental \
- --disable-gcc-vcheck \
- --disable-zlib-vcheck \
- --enable-id-check \
- --with-dbdir="${EPREFIX}"/var/lib/clamav \
- --with-system-tommath \
- --with-zlib="${EPREFIX}"/usr
-}
-
-src_install() {
- default
-
- rm -rf "${ED}"/var/lib/clamav
- newinitd "${FILESDIR}"/clamd.initd-r6 clamd
- newconfd "${FILESDIR}"/clamd.conf-r1 clamd
-
- systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
- systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
- systemd_dounit "${FILESDIR}/clamd.service"
- systemd_dounit "${FILESDIR}/freshclamd.service"
-
- keepdir /var/lib/clamav
- fowners clamav:clamav /var/lib/clamav
- keepdir /var/log/clamav
- fowners clamav:clamav /var/log/clamav
-
- dodir /etc/logrotate.d
- insinto /etc/logrotate.d
- newins "${FILESDIR}"/clamav.logrotate clamav
-
- # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
- -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
- -e "s:.*\(User\) .*:\1 clamav:" \
- -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
- -e "s:^\#\(LogTime\).*:\1 yes:" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- "${ED}"/etc/clamd.conf.sample || die
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
- -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
- -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
- -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
- -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- "${ED}"/etc/freshclam.conf.sample || die
-
- if use milter ; then
- # MilterSocket one to include ' /' because there is a 2nd line for
- # inet: which we want to leave
- dodoc "${FILESDIR}"/clamav-milter.README.gentoo
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
- -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
- -e "s:.*\(User\) .*:\1 clamav:" \
- -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
- "${ED}"/etc/clamav-milter.conf.sample || die
- cat >> "${ED}"/etc/conf.d/clamd <<-EOF
- MILTER_NICELEVEL=19
- START_MILTER=no
- EOF
-
- systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
- fi
-
- for i in clamd freshclam clamav-milter
- do
- [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
- done
-
- prune_libtool_files --all
-}
-
-src_test() {
- emake quick-check
-}
-
-pkg_postinst() {
- if use milter ; then
- elog "For simple instructions how to setup the clamav-milter read the"
- elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
- fi
- if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
- ewarn "You must run freshclam manually to populate the virus database files"
- ewarn "before starting clamav for the first time.\n"
- fi
-}
diff --git a/app-antivirus/clamav/clamav-0.99.4-r1.ebuild b/app-antivirus/clamav/clamav-0.99.4-r1.ebuild
index 2805c9920141..79549d3b99a3 100644
--- a/app-antivirus/clamav/clamav-0.99.4-r1.ebuild
+++ b/app-antivirus/clamav/clamav-0.99.4-r1.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="alpha amd64 ~arm hppa ia64 ~ppc ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs test uclibc"
CDEPEND="bzip2? ( app-arch/bzip2 )
diff --git a/app-antivirus/clamav/clamav-0.99.4.ebuild b/app-antivirus/clamav/clamav-0.99.4.ebuild
deleted file mode 100644
index 1e031d13e8ff..000000000000
--- a/app-antivirus/clamav/clamav-0.99.4.ebuild
+++ /dev/null
@@ -1,156 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools eutils flag-o-matic user systemd
-
-DESCRIPTION="Clam Anti-Virus Scanner"
-HOMEPAGE="https://www.clamav.net/"
-SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs uclibc"
-
-CDEPEND="bzip2? ( app-arch/bzip2 )
- clamdtop? ( sys-libs/ncurses:0 )
- iconv? ( virtual/libiconv )
- metadata-analysis-api? ( dev-libs/json-c:= )
- milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
- dev-libs/libtommath
- >=sys-libs/zlib-1.2.2:=
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- sys-devel/libtool
- || ( dev-libs/libpcre2 >dev-libs/libpcre-6 )
- !!<app-antivirus/clamav-0.99"
-# hard block clamav < 0.99 due to linking problems Bug #567680
-# openssl is now *required* see this link as to why
-# https://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
-DEPEND="${CDEPEND}
- virtual/pkgconfig"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-clamav )"
-
-DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
-PATCHES=(
- "${FILESDIR}/${P}-pcre2-compile-erroffset.patch"
-)
-
-pkg_setup() {
- enewgroup clamav
- enewuser clamav -1 -1 /dev/null clamav
-}
-
-src_prepare() {
- default
-
- eautoconf
-}
-
-src_configure() {
- use ppc64 && append-flags -mminimal-toc
- use uclibc && export ac_cv_type_error_t=yes
-
- econf \
- $(use_enable bzip2) \
- $(use_enable clamdtop) \
- $(use_enable ipv6) \
- $(use_enable milter) \
- $(use_enable static-libs static) \
- $(use_with iconv) \
- $(use_with metadata-analysis-api libjson /usr) \
- --cache-file="${S}"/config.cache \
- --disable-experimental \
- --disable-gcc-vcheck \
- --disable-zlib-vcheck \
- --enable-id-check \
- --with-dbdir="${EPREFIX}"/var/lib/clamav \
- --with-system-tommath \
- --with-zlib="${EPREFIX}"/usr \
- --disable-llvm
-}
-
-src_install() {
- default
-
- rm -rf "${ED}"/var/lib/clamav
- newinitd "${FILESDIR}"/clamd.initd-r6 clamd
- newconfd "${FILESDIR}"/clamd.conf-r1 clamd
-
- systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
- systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
- systemd_dounit "${FILESDIR}/clamd.service"
- systemd_dounit "${FILESDIR}/freshclamd.service"
-
- keepdir /var/lib/clamav
- fowners clamav:clamav /var/lib/clamav
- keepdir /var/log/clamav
- fowners clamav:clamav /var/log/clamav
-
- dodir /etc/logrotate.d
- insinto /etc/logrotate.d
- newins "${FILESDIR}"/clamav.logrotate clamav
-
- # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
- -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
- -e "s:.*\(User\) .*:\1 clamav:" \
- -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
- -e "s:^\#\(LogTime\).*:\1 yes:" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- "${ED}"/etc/clamd.conf.sample || die
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
- -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
- -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
- -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
- -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- "${ED}"/etc/freshclam.conf.sample || die
-
- if use milter ; then
- # MilterSocket one to include ' /' because there is a 2nd line for
- # inet: which we want to leave
- dodoc "${FILESDIR}"/clamav-milter.README.gentoo
- sed -i -e "s:^\(Example\):\# \1:" \
- -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
- -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
- -e "s:.*\(User\) .*:\1 clamav:" \
- -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
- -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
- -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
- "${ED}"/etc/clamav-milter.conf.sample || die
- cat >> "${ED}"/etc/conf.d/clamd <<-EOF
- MILTER_NICELEVEL=19
- START_MILTER=no
- EOF
-
- systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
- fi
-
- for i in clamd freshclam clamav-milter
- do
- [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
- done
-
- prune_libtool_files --all
-}
-
-src_test() {
- emake quick-check
-}
-
-pkg_postinst() {
- if use milter ; then
- elog "For simple instructions how to setup the clamav-milter read the"
- elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
- fi
- if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
- ewarn "You must run freshclam manually to populate the virus database files"
- ewarn "before starting clamav for the first time.\n"
- fi
-}
diff --git a/app-antivirus/clamav/files/clamav-0.99-zlib.patch b/app-antivirus/clamav/files/clamav-0.99-zlib.patch
deleted file mode 100644
index 8d1f4e615379..000000000000
--- a/app-antivirus/clamav/files/clamav-0.99-zlib.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-commit f0bcd186190fe6e67b3f0eaaceb7a99aa6a98865
-Author: Steven Morgan <stevmorg@cisco.com>
-Date: Thu Jan 5 12:30:35 2017 -0500
-
- bb111711 - fix zlib version check - patch by Daniel J. Luke.
-
-diff --git a/m4/reorganization/libs/libz.m4 b/m4/reorganization/libs/libz.m4
-index b5c7414..f7b67ca 100644
---- a/m4/reorganization/libs/libz.m4
-+++ b/m4/reorganization/libs/libz.m4
-@@ -29,9 +29,9 @@ then
- AC_MSG_ERROR([Please install zlib and zlib-devel packages])
- else
-
-- vuln=`grep "ZLIB_VERSION \"1.2.0" $ZLIB_HOME/include/zlib.h`
-+ vuln=`grep "ZLIB_VERSION \"1.2.0\"" $ZLIB_HOME/include/zlib.h`
- if test -z "$vuln"; then
-- vuln=`grep "ZLIB_VERSION \"1.2.1" $ZLIB_HOME/include/zlib.h`
-+ vuln=`grep "ZLIB_VERSION \"1.2.1\"" $ZLIB_HOME/include/zlib.h`
- fi
-
- if test -n "$vuln"; then
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-bytecode_api.patch b/app-antivirus/clamav/files/clamav-0.99.2-bytecode_api.patch
deleted file mode 100644
index d6cd5264ed7d..000000000000
--- a/app-antivirus/clamav/files/clamav-0.99.2-bytecode_api.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Description: fix compatibility with zlib 1.2.9 and newer
-Author: Marc Deslauriers <marc.deslauriers@canonical.com>
-Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/1692073
-
---- a/libclamav/bytecode_api.c 2017-08-08 15:20:06.651685637 -0400
-+++ b/libclamav/bytecode_api.c 2017-08-15 15:45:14.645714766 -0400
-@@ -811,8 +811,20 @@ int32_t cli_bcapi_inflate_init(struct cl
- cli_dbgmsg("bytecode api: inflate_init: invalid buffers!\n");
- return -1;
- }
-- memset(&stream, 0, sizeof(stream));
-- ret = inflateInit2(&stream, windowBits);
-+
-+ b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n);
-+ if (!b) {
-+ return -1;
-+ }
-+ ctx->inflates = b;
-+ ctx->ninflates = n;
-+ b = &b[n-1];
-+
-+ b->from = from;
-+ b->to = to;
-+ b->needSync = 0;
-+ memset(&b->stream, 0, sizeof(stream));
-+ ret = inflateInit2(&b->stream, windowBits);
- switch (ret) {
- case Z_MEM_ERROR:
- cli_dbgmsg("bytecode api: inflateInit2: out of memory!\n");
-@@ -829,20 +841,6 @@ int32_t cli_bcapi_inflate_init(struct cl
- cli_dbgmsg("bytecode api: inflateInit2: unknown error %d\n", ret);
- return -1;
- }
--
-- b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n);
-- if (!b) {
-- inflateEnd(&stream);
-- return -1;
-- }
-- ctx->inflates = b;
-- ctx->ninflates = n;
-- b = &b[n-1];
--
-- b->from = from;
-- b->to = to;
-- b->needSync = 0;
-- memcpy(&b->stream, &stream, sizeof(stream));
- return n-1;
- }
-
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch b/app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch
deleted file mode 100644
index 2031edbd3822..000000000000
--- a/app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-diff --git a/libclamav/c++/llvm/include/llvm/ADT/StringMap.h b/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
-index 59ff6aa..1325394 100644
---- a/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
-+++ b/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
-@@ -169,3 +169,3 @@ public:
- KeyLength+1;
-- unsigned Alignment = alignof<StringMapEntry>();
-+ unsigned Alignment = alignOf<StringMapEntry>();
-
-diff --git a/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h b/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
-index 88044c7..86b0f40 100644
---- a/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
-+++ b/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
-@@ -417,3 +417,3 @@ namespace llvm {
- ileAllocator.Allocate(sizeof(IndexListEntry),
-- alignof<IndexListEntry>()));
-+ alignOf<IndexListEntry>()));
-
-diff --git a/libclamav/c++/llvm/include/llvm/Support/AlignOf.h b/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
-index 6a7a1a6..979e597 100644
---- a/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
-+++ b/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
-@@ -51,8 +51,8 @@ struct AlignOf {
-
--/// alignof - A templated function that returns the mininum alignment of
-+/// alignOf - A templated function that returns the mininum alignment of
- /// of a type. This provides no extra functionality beyond the AlignOf
- /// class besides some cosmetic cleanliness. Example usage:
--/// alignof<int>() returns the alignment of an int.
-+/// alignOf<int>() returns the alignment of an int.
- template <typename T>
--static inline unsigned alignof() { return AlignOf<T>::Alignment; }
-+static inline unsigned alignOf() { return AlignOf<T>::Alignment; }
-
-diff --git a/libclamav/c++/llvm/include/llvm/Support/Allocator.h b/libclamav/c++/llvm/include/llvm/Support/Allocator.h
-index 4a7251f..17caf5e 100644
---- a/libclamav/c++/llvm/include/llvm/Support/Allocator.h
-+++ b/libclamav/c++/llvm/include/llvm/Support/Allocator.h
-@@ -203,3 +203,3 @@ public:
- for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) {
-- Ptr = Allocator.AlignPtr(Ptr, alignof<T>());
-+ Ptr = Allocator.AlignPtr(Ptr, alignOf<T>());
- if (Ptr + sizeof(T) <= End)
-diff --git a/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp b/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp
-index b892d85..dc72346 100644
---- a/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp
-+++ b/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp
-@@ -495,3 +495,3 @@ void SCEVUnknown::print(raw_ostream &OS) const {
- if (isAlignOf(AllocTy)) {
-- OS << "alignof(" << *AllocTy << ")";
-+ OS << "alignOf(" << *AllocTy << ")";
- return;
-diff --git a/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp b/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
-index 824021c..757ca50 100644
---- a/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
-+++ b/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
-@@ -569,3 +569,3 @@ void Emitter<CodeEmitter>::emitMemModRMByte(const MachineInstr &MI,
- // Calculate what the SS field value should be...
-- static const unsigned SSTable[] = { ~0, 0, 1, ~0, 2, ~0, ~0, ~0, 3 };
-+ static const unsigned SSTable[] = { ~0u, 0u, 1u, ~0u, 2u, ~0u, ~0u, ~0u, 3u };
- unsigned SS = SSTable[Scale.getImm()];
-diff --git a/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp b/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
-index 9564fe0..b2b7986 100644
---- a/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
-+++ b/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
-@@ -332,3 +332,3 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op,
- // Calculate what the SS field value should be...
-- static const unsigned SSTable[] = { ~0, 0, 1, ~0, 2, ~0, ~0, ~0, 3 };
-+ static const unsigned SSTable[] = { ~0u, 0u, 1u, ~0u, 2u, ~0u, ~0u, ~0u, 3u };
- unsigned SS = SSTable[Scale.getImm()];
-diff --git a/libclamav/mpool.c b/libclamav/mpool.c
-index cd38e15..b5e537d 100644
---- a/libclamav/mpool.c
-+++ b/libclamav/mpool.c
-@@ -417,3 +417,3 @@ static size_t from_bits(unsigned int bits) {
-
--static inline unsigned int alignof(size_t size)
-+static inline unsigned int alignOf(size_t size)
- {
-@@ -609,3 +609,3 @@ static void* allocate_aligned(struct MPMAP *mpm, size_t size, unsigned align, co
- void *mpool_malloc(struct MP *mp, size_t size) {
-- size_t align = alignof(size);
-+ size_t align = alignOf(size);
- size_t i, needed = align_increase(size+FRAG_OVERHEAD, align);
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-pcre2-compile-erroffset.patch b/app-antivirus/clamav/files/clamav-0.99.2-pcre2-compile-erroffset.patch
deleted file mode 100644
index 1ee55171afbb..000000000000
--- a/app-antivirus/clamav/files/clamav-0.99.2-pcre2-compile-erroffset.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- clamav-0.99.2/libclamav/regex_pcre.c~ 2017-11-28 14:40:56.484208243 +0100
-+++ clamav-0.99.2/libclamav/regex_pcre.c 2017-11-28 14:41:07.301207800 +0100
-@@ -112,7 +112,8 @@ int cli_pcre_addoptions(struct cli_pcre_
- #if USING_PCRE2
- int cli_pcre_compile(struct cli_pcre_data *pd, long long unsigned match_limit, long long unsigned match_limit_recursion, unsigned int options, int opt_override)
- {
-- int errornum, erroffset;
-+ int errornum;
-+ size_t erroffset;
- pcre2_general_context *gctx;
- pcre2_compile_context *cctx;
-
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch b/app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch
deleted file mode 100644
index 4593d16836e1..000000000000
--- a/app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/m4/reorganization/clamdtop.m4
-+++ b/m4/reorganization/clamdtop.m4
-@@ -4,12 +4,20 @@
-
- if test "$enable_clamdtop" != "no"; then
-
-+PKG_CHECK_MODULES([CURSES],[ncurses],
-+ [HAVE_LIBNCURSES=yes; CURSES_INCLUDE="<ncurses.h>"],
-+ [HAVE_LIBNCURSES=no],
-+)
-+
-+if test "X$HAVE_LIBNCURSES" != "Xyes"; then
-+ HAVE_LIBNCURSES=
- AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
- AC_LANG_PROGRAM([#include <ncurses/ncurses.h>],
- [initscr(); KEY_RESIZE;]),
- [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
- CURSES_INCLUDE="<ncurses/ncurses.h>"],
- [])
-+fi
-
- if test "X$HAVE_LIBNCURSES" != "Xyes"; then
- HAVE_LIBNCURSES=
diff --git a/app-antivirus/clamav/files/clamav-0.99.3-VMSF_DELTA-fix-CVE-2012-6706.patch b/app-antivirus/clamav/files/clamav-0.99.3-VMSF_DELTA-fix-CVE-2012-6706.patch
deleted file mode 100644
index 90facf6eae06..000000000000
--- a/app-antivirus/clamav/files/clamav-0.99.3-VMSF_DELTA-fix-CVE-2012-6706.patch
+++ /dev/null
@@ -1,186 +0,0 @@
-Apply proposed changes to fix RAR VMSF_DELTA Filter Signedness error (CVE-2012-6706)
-
-Cherry picked from commit a7d8447bd9a4d5ae1fa970c1849c8caeb5f1a805 [Link 1] and
-d4699442bce76574573dc564e7f2177d679b88bd [Link 2].
-
-Link 1: https://github.com/Cisco-Talos/clamav-devel/commit/a7d8447bd9a4d5ae1fa970c1849c8caeb5f1a805
-Link 2: https://github.com/Cisco-Talos/clamav-devel/commit/d4699442bce76574573dc564e7f2177d679b88bd
-
---- a/libclamunrar/unrarvm.c
-+++ b/libclamunrar/unrarvm.c
-@@ -213,17 +213,20 @@ void rarvm_addbits(rarvm_input_t *rarvm_input, int bits)
-
- unsigned int rarvm_getbits(rarvm_input_t *rarvm_input)
- {
-- unsigned int bit_field;
-+ unsigned int bit_field = 0;
-
-- if (rarvm_input->in_addr+2 < rarvm_input->buf_size) {
-+ if (rarvm_input->in_addr < rarvm_input->buf_size) {
- bit_field = (unsigned int) rarvm_input->in_buf[rarvm_input->in_addr] << 16;
-- bit_field |= (unsigned int) rarvm_input->in_buf[rarvm_input->in_addr+1] << 8;
-- bit_field |= (unsigned int) rarvm_input->in_buf[rarvm_input->in_addr+2];
-- bit_field >>= (8-rarvm_input->in_bit);
--
-- return (bit_field & 0xffff);
-+ if (rarvm_input->in_addr+1 < rarvm_input->buf_size) {
-+ bit_field |= (unsigned int) rarvm_input->in_buf[rarvm_input->in_addr+1] << 8;
-+ if (rarvm_input->in_addr+2 < rarvm_input->buf_size) {
-+ bit_field |= (unsigned int) rarvm_input->in_buf[rarvm_input->in_addr+2];
-+ }
-+ }
- }
-- return 0;
-+ bit_field >>= (8-rarvm_input->in_bit);
-+
-+ return (bit_field & 0xffff);
- }
-
- unsigned int rarvm_read_data(rarvm_input_t *rarvm_input)
-@@ -311,10 +314,10 @@ static unsigned int *rarvm_get_operand(rarvm_data_t *rarvm_data,
- }
- }
-
--static unsigned int filter_itanium_getbits(unsigned char *data, int bit_pos, int bit_count)
-+static unsigned int filter_itanium_getbits(unsigned char *data, unsigned int bit_pos, unsigned int bit_count)
- {
-- int in_addr=bit_pos/8;
-- int in_bit=bit_pos&7;
-+ unsigned int in_addr=bit_pos/8;
-+ unsigned int in_bit=bit_pos&7;
- unsigned int bit_field=(unsigned int)data[in_addr++];
- bit_field|=(unsigned int)data[in_addr++] << 8;
- bit_field|=(unsigned int)data[in_addr++] << 16;
-@@ -323,10 +326,10 @@ static unsigned int filter_itanium_getbits(unsigned char *data, int bit_pos, int
- return(bit_field & (0xffffffff>>(32-bit_count)));
- }
-
--static void filter_itanium_setbits(unsigned char *data, unsigned int bit_field, int bit_pos, int bit_count)
-+static void filter_itanium_setbits(unsigned char *data, unsigned int bit_field, unsigned int bit_pos, unsigned int bit_count)
- {
-- int i, in_addr=bit_pos/8;
-- int in_bit=bit_pos&7;
-+ unsigned int i, in_addr=bit_pos/8;
-+ unsigned int in_bit=bit_pos&7;
- unsigned int and_mask=0xffffffff>>(32-bit_count);
- and_mask=~(and_mask<<in_bit);
-
-@@ -343,11 +346,12 @@ static void filter_itanium_setbits(unsigned char *data, unsigned int bit_field,
- static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_filters_t filter_type)
- {
- unsigned char *data, cmp_byte2, cur_byte, *src_data, *dest_data;
-- int i, j, data_size, channels, src_pos, dest_pos, border, width, PosR;
-- int op_type, cur_channel, byte_count, start_pos, pa, pb, pc;
-+ unsigned int i, j, data_size, channels, src_pos, dest_pos, border, width, PosR;
-+ unsigned int op_type, cur_channel, byte_count, start_pos;
-+ int pa, pb, pc;
- unsigned int file_offset, cur_pos, predicted;
-- int32_t offset, addr;
-- const int file_size=0x1000000;
-+ uint32_t offset, addr;
-+ const unsigned int file_size=0x1000000;
-
- switch(filter_type) {
- case VMSF_E8:
-@@ -356,7 +360,7 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- data_size = rarvm_data->R[4];
- file_offset = rarvm_data->R[6];
-
-- if (((unsigned int)data_size >= VM_GLOBALMEMADDR) || (data_size < 4)) {
-+ if ((data_size > VM_GLOBALMEMADDR) || (data_size < 4)) {
- break;
- }
-
-@@ -367,12 +371,14 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- if (cur_byte==0xe8 || cur_byte==cmp_byte2) {
- offset = cur_pos+file_offset;
- addr = GET_VALUE(FALSE, data);
-- if (addr < 0) {
-- if (addr+offset >=0 ) {
-+ // We check 0x80000000 bit instead of '< 0' comparison
-+ // not assuming int32 presence or uint size and endianness.
-+ if ((addr & 0x80000000)!=0) { // addr<0
-+ if (((addr+offset) & 0x80000000)==0) { // addr+offset>=0
- SET_VALUE(FALSE, data, addr+file_size);
- }
- } else {
-- if (addr<file_size) {
-+ if (((addr-file_size) & 0x80000000)!=0) { // addr<file_size
- SET_VALUE(FALSE, data, addr-offset);
- }
- }
-@@ -386,7 +392,7 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- data_size = rarvm_data->R[4];
- file_offset = rarvm_data->R[6];
-
-- if (((unsigned int)data_size >= VM_GLOBALMEMADDR) || (data_size < 21)) {
-+ if ((data_size > VM_GLOBALMEMADDR) || (data_size < 21)) {
- break;
- }
-
-@@ -429,7 +435,7 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- border = data_size*2;
-
- SET_VALUE(FALSE, &rarvm_data->mem[VM_GLOBALMEMADDR+0x20], data_size);
-- if ((unsigned int)data_size >= VM_GLOBALMEMADDR/2) {
-+ if (data_size > VM_GLOBALMEMADDR/2 || channels > 1024 || channels == 0) {
- break;
- }
- for (cur_channel=0 ; cur_channel < channels ; cur_channel++) {
-@@ -440,7 +446,7 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- }
- break;
- case VMSF_RGB: {
-- const int channels=3;
-+ const unsigned int channels=3;
- data_size = rarvm_data->R[4];
- width = rarvm_data->R[0] - 3;
- PosR = rarvm_data->R[1];
-@@ -448,15 +454,14 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- dest_data = src_data + data_size;
-
- SET_VALUE(FALSE, &rarvm_data->mem[VM_GLOBALMEMADDR+0x20], data_size);
-- if ((unsigned int)data_size >= VM_GLOBALMEMADDR/2) {
-+ if (data_size > VM_GLOBALMEMADDR/2 || data_size < 3 || width > data_size || PosR > 2) {
- break;
- }
- for (cur_channel=0 ; cur_channel < channels; cur_channel++) {
- unsigned int prev_byte = 0;
- for (i=cur_channel ; i<data_size ; i+=channels) {
-- int upper_pos=i-width;
-- if (upper_pos >= 3) {
-- unsigned char *upper_data = dest_data+upper_pos;
-+ if (i >= width+3) {
-+ unsigned char *upper_data = dest_data+i-width;
- unsigned int upper_byte = *upper_data;
- unsigned int upper_left_byte = *(upper_data-3);
- predicted = prev_byte+upper_byte-upper_left_byte;
-@@ -486,13 +491,14 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- break;
- }
- case VMSF_AUDIO: {
-- int channels=rarvm_data->R[0];
-+ unsigned int channels=rarvm_data->R[0];
- data_size = rarvm_data->R[4];
- src_data = rarvm_data->mem;
- dest_data = src_data + data_size;
-
- SET_VALUE(FALSE, &rarvm_data->mem[VM_GLOBALMEMADDR+0x20], data_size);
-- if ((unsigned int)data_size >= VM_GLOBALMEMADDR/2) {
-+ // In fact, audio channels never exceed 4.
-+ if (data_size > VM_GLOBALMEMADDR/2 || channels > 128 || channels == 0) {
- break;
- }
- for (cur_channel=0 ; cur_channel < channels ; cur_channel++) {
-@@ -553,7 +559,7 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- data_size = rarvm_data->R[4];
- src_pos = 0;
- dest_pos = data_size;
-- if ((unsigned int)data_size >= VM_GLOBALMEMADDR/2) {
-+ if (data_size > VM_GLOBALMEMADDR/2) {
- break;
- }
- while (src_pos < data_size) {
---
-2.16.2
-
diff --git a/app-antivirus/clamav/files/clamav-0.99.3-fix-fd-leaks-in-cli_scanscript.patch b/app-antivirus/clamav/files/clamav-0.99.3-fix-fd-leaks-in-cli_scanscript.patch
deleted file mode 100644
index a457a71758c6..000000000000
--- a/app-antivirus/clamav/files/clamav-0.99.3-fix-fd-leaks-in-cli_scanscript.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-Author: Manuel Mausz <manuel-clamav@mausz.at>
-
-http://lists.clamav.net/pipermail/clamav-users/2018-January/005687.html
-
---- clamav-0.99.3/libclamav/scanners.c.orig 2018-01-26 14:35:23.299386703 +0100
-+++ clamav-0.99.3/libclamav/scanners.c 2018-01-26 14:47:44.422451335 +0100
-@@ -1342,39 +1342,35 @@
- return CL_CLEAN;
- }
-
-- /* dump to disk only if explicitly asked to
-- * or if necessary to check relative offsets,
-- * otherwise we can process just in-memory */
-- if(ctx->engine->keeptmp || (troot && troot->ac_reloff_num > 0)) {
-- if((ret = cli_gentempfd(ctx->engine->tmpdir, &tmpname, &ofd))) {
-- cli_dbgmsg("cli_scanscript: Can't generate temporary file/descriptor\n");
-- return ret;
-- }
-- if (ctx->engine->keeptmp)
-- cli_dbgmsg("cli_scanscript: saving normalized file to %s\n", tmpname);
-- }
--
- if(!(normalized = cli_malloc(SCANBUFF + maxpatlen))) {
- cli_dbgmsg("cli_scanscript: Unable to malloc %u bytes\n", SCANBUFF);
-- free(tmpname);
- return CL_EMEM;
- }
--
- text_normalize_init(&state, normalized, SCANBUFF + maxpatlen);
-- ret = CL_CLEAN;
--
-
- if ((ret = cli_ac_initdata(&tmdata, troot?troot->ac_partsigs:0, troot?troot->ac_lsigs:0, troot?troot->ac_reloff_num:0, CLI_DEFAULT_AC_TRACKLEN))) {
-- free(tmpname);
-+ free(normalized);
- return ret;
- }
-
- if ((ret = cli_ac_initdata(&gmdata, groot->ac_partsigs, groot->ac_lsigs, groot->ac_reloff_num, CLI_DEFAULT_AC_TRACKLEN))) {
- cli_ac_freedata(&tmdata);
-- free(tmpname);
-+ free(normalized);
- return ret;
- }
-
-+ /* dump to disk only if explicitly asked to
-+ * or if necessary to check relative offsets,
-+ * otherwise we can process just in-memory */
-+ if(ctx->engine->keeptmp || (troot && troot->ac_reloff_num > 0)) {
-+ if((ret = cli_gentempfd(ctx->engine->tmpdir, &tmpname, &ofd))) {
-+ cli_dbgmsg("cli_scanscript: Can't generate temporary file/descriptor\n");
-+ goto done;
-+ }
-+ if (ctx->engine->keeptmp)
-+ cli_dbgmsg("cli_scanscript: saving normalized file to %s\n", tmpname);
-+ }
-+
- mdata[0] = &tmdata;
- mdata[1] = &gmdata;
-
-@@ -1388,9 +1384,8 @@
-
- if (write(ofd, state.out, state.out_pos) == -1) {
- cli_errmsg("cli_scanscript: can't write to file %s\n",tmpname);
-- close(ofd);
-- free(tmpname);
-- return CL_EWRITE;
-+ ret = CL_EWRITE;
-+ goto done;
- }
- text_normalize_reset(&state);
- }
-@@ -1409,11 +1404,6 @@
- funmap(*ctx->fmap);
- }
- *ctx->fmap = map;
--
-- /* If we aren't keeping temps, delete the normalized file after scan. */
-- if(!(ctx->engine->keeptmp))
-- if (cli_unlink(tmpname)) ret = CL_EUNLINK;
--
- } else {
- /* Since the above is moderately costly all in all,
- * do the old stuff if there's no relative offsets. */
-@@ -1421,11 +1411,8 @@
- if (troot) {
- cli_targetinfo(&info, 7, map);
- ret = cli_ac_caloff(troot, &tmdata, &info);
-- if (ret) {
-- cli_ac_freedata(&tmdata);
-- free(tmpname);
-- return ret;
-- }
-+ if (ret)
-+ goto done;
- }
-
- while(1) {
-@@ -1466,13 +1453,6 @@
-
- }
-
-- if(ctx->engine->keeptmp) {
-- free(tmpname);
-- if (ofd >= 0)
-- close(ofd);
-- }
-- free(normalized);
--
- if(ret != CL_VIRUS || SCAN_ALL) {
- if ((ret = cli_exp_eval(ctx, troot, &tmdata, NULL, NULL)) == CL_VIRUS)
- viruses_found++;
-@@ -1481,9 +1461,19 @@
- viruses_found++;
- }
-
-+done:
-+ free(normalized);
- cli_ac_freedata(&tmdata);
- cli_ac_freedata(&gmdata);
-
-+ if (ofd != -1)
-+ close(ofd);
-+ if (tmpname != NULL) {
-+ if (!ctx->engine->keeptmp)
-+ if (cli_unlink(tmpname)) ret = CL_EUNLINK;
-+ free(tmpname);
-+ }
-+
- if (SCAN_ALL && viruses_found)
- return CL_VIRUS;
-