summaryrefslogtreecommitdiff
path: root/app-antivirus/clamav
diff options
context:
space:
mode:
Diffstat (limited to 'app-antivirus/clamav')
-rw-r--r--app-antivirus/clamav/Manifest4
-rw-r--r--app-antivirus/clamav/clamav-0.99.2-r2.ebuild159
-rw-r--r--app-antivirus/clamav/files/clamav-0.99.2-pcre2-compile-erroffset.patch12
3 files changed, 174 insertions, 1 deletions
diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest
index 7412d579de10..9acf76fe40e2 100644
--- a/app-antivirus/clamav/Manifest
+++ b/app-antivirus/clamav/Manifest
@@ -1,6 +1,7 @@
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-milter.README.gentoo 1124 BLAKE2B 41713f9ddd22b39748e812a03d5746d48b44f0506bd6e46886fd64233aedad0a7c4b2f8f7a3b0b1d14f831521c423ed5909eb9d9bc419540684fba065c3b9927 SHA512 1c6160e48eddd28f83ec5f24757f788781cef55789d1934dfccc12c7c5e5635a226d26b0983cab7344c142f5a2f1db172640b1d0e6c840a6fa83abed9be1211a
AUX clamav-milter.service 284 BLAKE2B 7fbdce10ffa1d85aa671616f17ad45683177916269b434283582ecb53000f7a9a8978119e6a8170ddad8f7c0f14f09398fd7b893aad5d718083b002f6371ff21 SHA512 442148ac3c42ecbb893de5c6edde337b72a745d20f6c5ffa33131f9a0b2daadcffac39b686ada986a5ab500ea7b9153c448abc1b819e15fef488da1812bb0cee
@@ -14,13 +15,14 @@ AUX clamd_at.service 190 BLAKE2B 6d29a2412622a66cf2c0484934a737c0d3c5b3946d1806f
AUX freshclamd.service 191 BLAKE2B 5b517bf15d008454052bd0f7d5a10fb89284a5b64d1cd11570981ca07d70d4dbab6739175ef7434c5c16625fc4f342d21fe6c67970ebac9e64dc8c08732ab68e SHA512 aaf78e763d2aa9c17fc95edb1550547b6681a91fd239a86535e5193d36ff0e152c51c3a3957542f80d5b170805f296159958ac347886981ddd324bec4237da92
AUX tmpfiles.d/clamav.conf 33 BLAKE2B 447c5ad4ad79bc70fc386833fa763451d30bf30f1ae26434039a3926ca5aae9734e0152c83b5b9aa5bed87b17c1b685c4ea9f41c9cb6b3197b1e78e800b71fd9 SHA512 eabe5a94c2679b82ea3e29272eb448b47e60b271381d3e97f3970b1a9e086d61662aff2d29887950a911025294aa7cea8bfd9003d257963566b251bcaeb5f6b2
DIST clamav-0.98.7.tar.gz 15118851 BLAKE2B 5fffd1896645b5e77f26819eb16e1d9e9cbb8a71d5627aa31ce009b37172fe5c9fff77d6646940c8065c856cf1a74737ffafc79d4e288b8d1202620fe568d1bc SHA512 acf01961472c13ccb219420cc3fa3c3e6f8a733edef371dbc04ce5867900aa1535e956ec8ad50d31c8f872a0a1d79fcccac944cd86e29ecdfa4af18f7fd5afb9
-DIST clamav-0.99.1.tar.gz 15990867 SHA256 e144689122d3f91293808c82cbb06b7d3ac9eca7ae29564c5d148ffe7b25d58a SHA512 9beb5c0ebff2aef741bb27811c1f10a7cd5da354ff67272ee8994d87c95e272a5983105af0fe1a734e1fa99f112dc4dddd9d82074a0df6715814817f85a45f4f WHIRLPOOL e2afd7b7d377c1a1af802e780839bb21bcd318035ac858b6cb11545db3673d3f74ba3159b837238982248720379f98ab51e279a8636bbea89331136891e88e5d
+DIST clamav-0.99.1.tar.gz 15990867 BLAKE2B 3b5d046c0b4e965ff26bea3b6b416e261ce86c449d092fd1debf52e4df5e5448039f7769f94d5817c9754100d296a0eb37ca5289f3cb5af8e58be9e93ef59a18 SHA512 9beb5c0ebff2aef741bb27811c1f10a7cd5da354ff67272ee8994d87c95e272a5983105af0fe1a734e1fa99f112dc4dddd9d82074a0df6715814817f85a45f4f
DIST clamav-0.99.2.tar.gz 16067497 BLAKE2B 4155e3125ccc45cc6828033f207b6b8d3514253dfb8156428ad4096c0901d5a8500f9dd253b8f40afdc49a6039b647627868f75d51829ab7bd247ada5f3b8383 SHA512 7744ba8a344b163cf98e9737cddfd25d2120b34ee9c4518380e028c9ec3cd50127b198b0dfa9fde30f5ce9aab0c0e6384712fbc11287e77d16ce052fd7b6ac44
DIST clamav-0.99.tar.gz 15968038 BLAKE2B d3690f08215b8d870e8fb11b11eea6bb92a2eb4b7edddb037ed2f0e8c823a6c5856a3824716cd04f02ec985188ccd36ae41c5077df09ed1948281012dd28ef8c SHA512 328e66fa412ba61f5e44c839b254c7a84d2ce7821fda6cf29e4ee9532c06e45bdec62f202ca561223e984fff170bfd8280e5cc8e306c09a3017b17e7db3bbf56
EBUILD clamav-0.98.7-r1.ebuild 4690 BLAKE2B b026aa7cd04fb464702fa0a339492cb6d3689df4f581ff6b4fd0f2f5aa1c6d2659841f379d2e819954895460c130a5157447f195240661cc5c2b841602c07173 SHA512 9fbf9f8d7915192590878794cf65903cb82a6e6485c5bcc683b65eba7d7f6df84d32a88b5d347d10b6101765d948b49e3d7de6f2464e660529aedbb36998c1ae
EBUILD clamav-0.98.7.ebuild 4619 BLAKE2B c4de637f4fa70fec01c169a76b76c723672f41af4a185f0ace60e5ae7027ee01899643d18928f49c145296a0262a20bbea22da8329bbe8b398ceb1aa2e26e563 SHA512 d9284478227cca2739493a3d3b36fa32ce55065252646b9efde32579cc28e15a29f735403c749e1f2090a64563d0513bb492160a10e560b5d677528fe714e6b4
EBUILD clamav-0.99.1.ebuild 4903 BLAKE2B 2027abb648b5f2c5674104b93c2e21cdd6a28ff675e39ef14558e5df511300bd6f53c8403275fdd54dbf118d18228964f2224c94622bd024dc595fe74afed322 SHA512 709c6ecfb5bc7b16b2f91872b00c332e0ba5b1471fa087afd4b919270c414d853f58bcc63959bcc72b793443dc1d6435490f457e1e49d6de60595f61fee7ebc8
EBUILD clamav-0.99.2-r1.ebuild 5123 BLAKE2B eb88dae6a1f1a40eccdfe072ce602264e3c59eeda4bbbf91387aaef113784ad5ece9eb6684991f4d70d3348dc1594597e36a639b317324f0f2ca7f1e229041bd SHA512 ed25b297bd128bce316a3e6d4a0f2996e2ad704412b534d57094744e6ce1625e289cb52b4348fe494e21d86b209bd16140b80fe9b132c467751a34e6aee997c0
+EBUILD clamav-0.99.2-r2.ebuild 5180 BLAKE2B af872202b14fdd427c39ae69700599e254f215fbdcab89ec1655aa3b80c53793465d5a017511a652e32d42463c995aecbb355744e7b5dc55b52d2cad9c7063d8 SHA512 9b39cdc150fd75ef9f3bff5c8d0b0695ba3ca7dcaff9e869667f34ed944f66ba914ea929ad442184383b0b1329e66d98a213248faf271c4e926c56baa65ab07c
EBUILD clamav-0.99.2.ebuild 5009 BLAKE2B dd41f2bc6a8db4e3b8f13ad88cb0eb4940af9582572fd6e316d187e8b0623662245ff099ee086fb6dfdbf0acb656d207363c1eacc2c8be84968c24adc0442084 SHA512 4d129d4bdbc8af11f73784a3539a7e8f2332b77954268390f6e4c7fff493549344e6bd4144123e808a1e3760f5ee08dcb840a5218606464a8662198ecbac5cc0
EBUILD clamav-0.99.ebuild 4915 BLAKE2B 1bb2240f6e4145c4f0d45349aaacacfecab3a66bdd67b8d1fabf59c304b248bd458bf89085b06cf48c80d5d6c25ccd3e1a7397db83708c79d35dda181eee3237 SHA512 916034c7a2114ef083ae138b9f486dcf0b9d29e994ee6a5c7707dc17ee2b3633219fcff20c8af84c4bd1a8d4b4ca565d5285c4a880c435131da2062d198150b2
MISC metadata.xml 740 BLAKE2B 2cc1cd27896d7a032b476bbbe6a1b176c95657de5267cc77f6fc1ce1758603d9cf0caa0f3a614bc4a366695a089833474c30afc607ba1dee2caaff1dfc9e6c48 SHA512 baff0fa3285a5bfd17b408dc88ad573df07ec4de5e2827d352465347c5ebceb466172c4f369dac5680c927cad3a887a60721358e43b26e8cd7eaf3cebcaba832
diff --git a/app-antivirus/clamav/clamav-0.99.2-r2.ebuild b/app-antivirus/clamav/clamav-0.99.2-r2.ebuild
new file mode 100644
index 000000000000..136dd3847d54
--- /dev/null
+++ b/app-antivirus/clamav/clamav-0.99.2-r2.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 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="http://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
+# http://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/files/clamav-0.99.2-pcre2-compile-erroffset.patch b/app-antivirus/clamav/files/clamav-0.99.2-pcre2-compile-erroffset.patch
new file mode 100644
index 000000000000..1ee55171afbb
--- /dev/null
+++ b/app-antivirus/clamav/files/clamav-0.99.2-pcre2-compile-erroffset.patch
@@ -0,0 +1,12 @@
+--- 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;
+