diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-09-06 12:28:43 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-09-06 12:28:43 +0100 |
commit | 8bf02d8edf7e8947a205e2dca77bee4c4e31739b (patch) | |
tree | 3711c04de0185e8d4835ac527c634e0d4893ad7e /app-antivirus | |
parent | 5d93bae2c1576ab817f482024a6d47592829407b (diff) |
gentoo auto-resync : 06:09:2024 - 12:28:42
Diffstat (limited to 'app-antivirus')
-rw-r--r-- | app-antivirus/Manifest.gz | bin | 884 -> 883 bytes | |||
-rw-r--r-- | app-antivirus/clamav/Manifest | 3 | ||||
-rw-r--r-- | app-antivirus/clamav/clamav-0.103.12.ebuild | 237 | ||||
-rw-r--r-- | app-antivirus/clamav/files/clamav-0.103.12-missing-const.patch | 13 |
4 files changed, 253 insertions, 0 deletions
diff --git a/app-antivirus/Manifest.gz b/app-antivirus/Manifest.gz Binary files differindex 4e24a6b597af..d64a1c861684 100644 --- a/app-antivirus/Manifest.gz +++ b/app-antivirus/Manifest.gz diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest index 84db1485a4e9..cb249108ad26 100644 --- a/app-antivirus/clamav/Manifest +++ b/app-antivirus/clamav/Manifest @@ -2,6 +2,7 @@ AUX clamav-0.102.1-libxml2_pkgconfig.patch 4012 BLAKE2B 4c3e4fc3522d317c57bae942 AUX clamav-0.102.2-fix-curl-detection.patch 844 BLAKE2B a813b1f6003b9cff03fca8d72dbd44d6a4f700e3d60aee83f782a87893a3c6753698ca8715237155185660301dd81dc55bf6a6e3b9095f57b099607182c90bf5 SHA512 27e6aa5ad418eaa32b56ea7bbdab0b5b4cd649e55d34eb094b5f02d7e68d8913f39664ffd6bc4a07faf88f60bdbd15b0c381fbbd6d9c1c62cc36e72e34cabd19 AUX clamav-0.103.0-system-tomsfastmath.patch 3725 BLAKE2B 85640ded83600adfdcc03e8f42e3153c71a8b6c5884ca4cbd79a69121943fd171bc528aed26ded895189293008924cef6762a22001b4ee098fe5f680c7619bf0 SHA512 b67df39bc7d60f6ea9bb06d12413f0e4774185d4f020a68bdfdf8fe1ca669f70a62699b0f1100702af5ec47e460a35625dcaa09cfc6ea6d2f3957de227e87306 AUX clamav-0.103.1-upstream-openrc.patch 18249 BLAKE2B 305db3181a4a22acde5b28cef6c2d01b639be8c5b9e9c77737be1ebcb0553040b6eda117285e3e8b4bf06d2565a5d73225d7ce20ba1f115fd08bc822d779b370 SHA512 89e95057ee2f29bcdf5787f659ffe43b055b599d9bb80bf54794859113d760dad135b5b8d80c23e98f8c6b699dc839d4922c4c3b45edf97296f4eea668e62672 +AUX clamav-0.103.12-missing-const.patch 545 BLAKE2B cce6e4a564faa596f0abc5e88eed9d35879ea31fc0d9d0e56213dbd44d31359627d96f7cc0e91faf9bbdda008783c119608e24b5b309e1a69fedd67cb42849f1 SHA512 47d67699919ae6c85af40fbc836320af67c7baf01763acb1a60c4287a0509d682600406a0fdd2b58ea341e8cea4856125865824b1d6ba775da56e185ac123a41 AUX clamav-1.3.1-onenote-rs.patch 1140 BLAKE2B 63cb32c024be74311ac83d74735278fc2de377face2d0d7b89e3fdef380614298293f5e28679798b9841fd500ac19972949d42b4c3d255f5daef2cea4301bbfe SHA512 74a1a98baf264b9019bf03838b2fe7dbb4da01ba5e23658e546c33d238866bb69e24c09301916da45f548d00f0adddd4a5300f027dbf1ff7f49eaaf5887698d0 AUX clamav-milter.README.gentoo 2284 BLAKE2B 7afc18f3dad57c2d7595257b356943efb3d1af28d55ac8f09f0506430fd0dedf0820906ced666a7237e3af44a9bc1b43fff017c03faad844f96b132ca4c5dde6 SHA512 38eadf2d919a0c48345600ea5a39c90e766b62e8b1ffc7bb01969a8fd93c4545f2030058a470ac7efb75a1d6c74f9930438f58aeff5035e19e38241ed381f7b3 AUX clamav-milter.initd 1164 BLAKE2B 190dee3476f8763dc2498e2099e6afa83c36642298618ad959940771e73c07456e30e6319d649291c82fec49e3712e500a65b167fe91b12bd2758f79f040e1c3 SHA512 d21c60e7d3ee5eee65da18831eed905858a1c7ab4ec02de1c16fa36179d9c1cf517eca8402b872f3d995fa1d59a9b2e79994655ca4570370b40dc810af5e0a3d @@ -59,6 +60,7 @@ DIST cexpr-0.6.0.crate 17966 BLAKE2B cb46f066eb1f4dbac00ec86dc3e562db7ee8ea5ff17 DIST cfg-if-1.0.0.crate 7934 BLAKE2B e99a5589c11d79d77a4537b34ce0a45d37b981c123b79b807cea836c89fc3926d693458893baca2882448d3d44e3f64e06141f6d916b748daa10b8cc1ae16d1b SHA512 0fb16a8882fd30e86b62c5143b1cb18ab564e84e75bd1f28fd12f24ffdc4a42e0d2e012a99abb606c12efe3c11061ff5bf8e24ab053e550ae083f7d90f6576ff DIST chrono-0.4.38.crate 220559 BLAKE2B ab828bfeed56eb737a1797d5e1132cafe87a1e14bf7a1fe4a5098f50e6ceead50ca2e7f041cc2ff63d5f4e41e2853322f6c345bb31ff12a5b412e3e5202f5fea SHA512 858e47e3facebd5383e71898f26b27d92fe4a69027e2cc47da2af59975ead7767355e0b699f4228eabe76a3eff8b2519c7cecf8b60dc3fc60fbf9b28e2f3d4d9 DIST clamav-0.103.11.tar.gz 16550978 BLAKE2B 9fba6d5b41ef07b017be26b7ebd832ca03146a68545f794924332c67429ba27603745e2ad7fc0f58c341c6d9267e5b5265c37525dba9cbb15ab616915ec2d605 SHA512 86241ee8058d9a3ccc13b89bb41aa16cfbeb65717fbcfeea6117b7885e8854f5673c22475e7d33ee4210a15d583e806f252657c07933f072455027f1531427b8 +DIST clamav-0.103.12.tar.gz 16507685 BLAKE2B bc31787625f85867bf21c4555aa2fd2998514986fb571fa4e6cb9fa3fedf61b493c517291b662054edc0bbe8d45649d9c244d943df01950e204baa9e537e3e32 SHA512 0e870a5fd035fbf090359ef7634b1b36e346ff3066b896ff17c2c6ace04f4c17e16181a21fead8b8b2f397de9ea47b928515b717a41996bac4c8efed4d16ec4e DIST clamav-1.0.5.tar.gz 10344955 BLAKE2B 1deceff859c9eec6185f6c83833333d1a030edd1c9dcc6788f669259b4922f332b564a7c6f3fa7f03ebe2051524132becb35cbd67526aac43e95ca3978793517 SHA512 7d46cf5555107d2856430a5f09f5dfd011b597d3dc7e691db3c956867b1314b50fd23008bf45b377d31493a12716c527159d163748d6ae759e97a041780da0d9 DIST clamav-1.0.6.tar.gz 10345779 BLAKE2B fbbef034a7bf6e2b323007a3de2464b60cc0a564551ddd4169a72af0328cfc2485c14395626e8d0258dfbb3bb41bc895d26622ff2dfb5fcd1181e6595da6489b SHA512 907cf51f8e6776a81ec5501026c240266b0eb8f7631fcbbcd0f8514446925dc731d819ae758217f9ed9414ca385b64e67f6de0e5133c04ba7590bd1e4445e09e DIST clamav-1.2.2.tar.gz 10372690 BLAKE2B 47940236e38296ac908be4c5d1c5ce8bbc9ec5c69fa87b2472c941d2de9642e0ab6a59c63038aa706079e8efeb161083db69ad03eaaf27a6d05f4f1a5bb70aff SHA512 32562230f367a230f70dfca5ed5000ee8829a0da7452b0113e9dbaa47ef6b21901001f741b0e52ce52c02fe8f834bd559bcbdf1ea20495bead9c4976c3a4cc92 @@ -398,6 +400,7 @@ DIST windows_x86_64_msvc-0.52.5.crate 827905 BLAKE2B fd5dac198bfbf29878cb461a733 DIST zune-inflate-0.2.42.crate 37288 BLAKE2B 2d60c589607583826570c2877e1deae1a4dcf2c76ef705efc792cbf0f8bef2a1f4c4e75380efa890479b2cf168c34c7054b520aa799ccb20d43ae94526752458 SHA512 ea2c070a3df93c519f4360ee17fd1c51d8c6e194c61b391ab8c40d81c86bc7d2021bf08f97a106710806cdb16797d710b7722197edc9cce25de3c3752549bf09 DIST zune-inflate-0.2.54.crate 37973 BLAKE2B 8bdb532fae0da1d61fc9fc72ea72a9339116e1952e76ba7376f0ba0ea65101b88cd1e4766f516f21028a5ea3459e5590e7a54175a47f136cc572ed9abec2da2f SHA512 0de30f310121c1fed42612b7bcb50631d699195a77c7ce4094729f502e63d1ae38034d6054d95b6825e7e9a2afb7bb614ff123e12736163fee04a46ef1dc56bd EBUILD clamav-0.103.11-r1.ebuild 7160 BLAKE2B 039e690d3bee62d80dd06b048ebafdd61b56a22c4991ff9f53bff9c62ad4ad3897547221bf147ae0c18f4b243dd416ddc5f8fbae4d5c9c300908cf8901d8e168 SHA512 70939f01191a42a339f9da5ae38e541e89539405368cc323de0178f20662b9e5411b75fbc0df6d8eee8efb9b7cb9b27c3b64088def59f69db0fb81a848577187 +EBUILD clamav-0.103.12.ebuild 7206 BLAKE2B 77fbf3f14b385eec802a17c0e018bba145ed1006ad596a221e8d0052736f40e9e86952c896d86e1b9455ce5102c99b5685798a40fcf766f4d97d34d7650175e4 SHA512 020d41366a41ee726ddd26ebcf67183c92249ce7f7ee5fa7203adbd0dafd1def51c530d31d5b682076f03a5003e71f1120abade2534244fdeaa362191bd9e733 EBUILD clamav-1.0.5.ebuild 10254 BLAKE2B 70163494aaf586410bef86470af7fc338bd29997e7722a3f8f45182aabbd980fdc101d3a4b1c1afcdef1b81d8e72425d01cd6117c87bc11b2767aea1c651daae SHA512 5e656d39d1b124a962e0eee80a147d320f26251cfc18e33306e10c7fff602807975020d6520f170a530eb6d1f550d0dd554f9a15e89521507e490d0bf342a963 EBUILD clamav-1.0.6.ebuild 10636 BLAKE2B 659fc4ab830d450abfd320c18f5ee82dc67acf1343e776242a5f9e0f0220d9d80465936b6ff1873718098783e6b40411c7815b3c1805024c9b5516ec36653530 SHA512 e1daa8bbb73c11b27d787897e93c35d32f9f518c1eea860d06dd97bca791dd92e64e5702a4fed22878129be94d13a41b4bb7e39d0d73a6cd40eec40f86be14fa EBUILD clamav-1.2.2.ebuild 10643 BLAKE2B 5567e75bf90956baae79534de15f9398bf4e4b2d3438fc210f27efee8ff2d9738fcf0b8ae56697e3c2a139491b7eb727284dc7d90d1f932aac8c825bd3b7c861 SHA512 cbbe5fc4d5e69f9f0573a341f31cd5845486495df53169f8ac2a035e0725bccda3b27c3de8d61bd38987b9ac1ddc77f650238dee9187547033485578269acd13 diff --git a/app-antivirus/clamav/clamav-0.103.12.ebuild b/app-antivirus/clamav/clamav-0.103.12.ebuild new file mode 100644 index 000000000000..8a29edbb6daa --- /dev/null +++ b/app-antivirus/clamav/clamav-0.103.12.ebuild @@ -0,0 +1,237 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic systemd tmpfiles + +DESCRIPTION="Clam Anti-Virus Scanner" +HOMEPAGE="https://www.clamav.net/" +SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz" + +LICENSE="GPL-2 unRAR" +SLOT="0/lts" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="bzip2 doc clamonacc clamdtop clamsubmit iconv libclamav-only milter metadata-analysis-api selinux systemd test xml" + +REQUIRED_USE="libclamav-only? ( !clamonacc !clamdtop !clamsubmit !milter !metadata-analysis-api )" + +RESTRICT="!test? ( test )" + +# Require acct-{user,group}/clamav at build time so that we can set +# the permissions on /var/lib/clamav in src_install rather than in +# pkg_postinst; calling "chown" on the live filesystem scares me. +CDEPEND="acct-group/clamav + acct-user/clamav + dev-libs/libltdl + dev-libs/libmspack + || ( dev-libs/libpcre2 >dev-libs/libpcre-6 ) + dev-libs/tomsfastmath + >=sys-libs/zlib-1.2.2:= + bzip2? ( app-arch/bzip2 ) + clamdtop? ( sys-libs/ncurses:0 ) + clamsubmit? ( net-misc/curl dev-libs/json-c:= ) + elibc_musl? ( sys-libs/fts-standalone ) + iconv? ( virtual/libiconv ) + !libclamav-only? ( net-misc/curl ) + dev-libs/openssl:0= + milter? ( mail-filter/libmilter:= ) + xml? ( dev-libs/libxml2 )" + +# We need at least autoconf-2.69-r5 because that's the first (patched) +# version of it in Gentoo that supports ./configure --runstatedir. +BDEPEND=">=dev-build/autoconf-2.69-r5 + virtual/pkgconfig" + +DEPEND="${CDEPEND} + metadata-analysis-api? ( dev-libs/json-c:* ) + test? ( dev-libs/check )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-clamav )" + +PATCHES=( + "${FILESDIR}/${PN}-0.102.1-libxml2_pkgconfig.patch" #661328 + "${FILESDIR}/${PN}-0.102.2-fix-curl-detection.patch" #709616 + "${FILESDIR}/${PN}-0.103.0-system-tomsfastmath.patch" # 649394 + "${FILESDIR}/${PN}-0.103.1-upstream-openrc.patch" + "${FILESDIR}/${PN}-0.103.12-missing-const.patch" +) + +src_prepare() { + default + + # Be extra sure that we're using the system copy of tomsfastmath + einfo "removing bundled copy of dev-libs/tomsfastmath" + rm -r libclamav/tomsfastmath || \ + die "failed to remove bundled tomsfastmath" + + AT_NO_RECURSIVE="yes" eautoreconf +} + +src_configure() { + use elibc_musl && append-ldflags -lfts + use ppc64 && append-flags -mminimal-toc + + # according to configure help it should be + # $(use_enable xml) + # but that does not work + # do not add this, since --disable-xml seems to override + # --without-xml + JSONUSE="--without-libjson" + + if use clamsubmit || use metadata-analysis-api; then + # either of those 2 requires libjson. + # clamsubmit will be built as soon as libjson and curl are found + # but we only install the binary if requested + JSONUSE="--with-libjson=${EPREFIX}/usr" + fi + + local myeconfargs=( + $(use_enable bzip2) + $(use_enable clamonacc) + $(use_enable clamdtop) + $(use_enable milter) + $(use_enable test check) + $(use_with xml) + $(use_with iconv) + ${JSONUSE} + $(use_enable libclamav-only) + $(use_with !libclamav-only libcurl) + --enable-ipv6 + --with-system-libmspack + --cache-file="${S}"/config.cache + --disable-experimental + --disable-static + --disable-zlib-vcheck + --enable-id-check + --with-dbdir="${EPREFIX}"/var/lib/clamav + # Don't call --with-zlib=/usr (see bug #699296) + --with-zlib + --disable-llvm + --enable-openrc + --runstatedir=/run + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + + rm -rf "${ED}"/var/lib/clamav || die + + if ! use libclamav-only ; then + if use systemd; then + # The tmpfiles entry is behind USE=systemd because the + # OpenRC service scripts should (and do) ensure that the + # directories they need exist and have the correct + # permissions without the help of tmpfiles. + newtmpfiles "${FILESDIR}/tmpfiles.d/clamav-r1.conf" clamav.conf + systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service" + systemd_dounit "${FILESDIR}/clamd.service" + systemd_newunit "${FILESDIR}/freshclamd.service-r1" \ + "freshclamd.service" + fi + + insinto /etc/logrotate.d + newins "${FILESDIR}/clamd.logrotate" clamd + newins "${FILESDIR}/freshclam.logrotate" freshclam + use milter && \ + newins "${FILESDIR}/clamav-milter.logrotate-r1" clamav-milter + + # Modify /etc/{clamd,freshclam}.conf to be usable out of the box + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s/^#\(PidFile .*\)/\1/" \ + -e "s/^#\(LocalSocket .*\)/\1/" \ + -e "s/^#\(User .*\)/\1/" \ + -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \ + -e "s:^\#\(LogTime\).*:\1 yes:" \ + -e "s/^#\(DatabaseDirectory .*\)/\1/" \ + "${ED}"/etc/clamd.conf.sample || die + + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s/^#\(PidFile .*\)/\1/" \ + -e "s/^#\(DatabaseOwner .*\)/\1/" \ + -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/^#\(DatabaseDirectory .*\)/\1/" \ + "${ED}"/etc/freshclam.conf.sample || die + + if use milter ; then + # Note: only keep the "unix" ClamdSocket and MilterSocket! + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s/^#\(PidFile .*\)/\1/" \ + -e "s/^#\(ClamdSocket unix:.*\)/\1/" \ + -e "s/^#\(User .*\)/\1/" \ + -e "s/^#\(MilterSocket unix:.*\)/\1/" \ + -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 + + local i + for i in clamd freshclam clamav-milter + do + if [[ -f "${ED}"/etc/"${i}".conf.sample ]]; then + mv "${ED}"/etc/"${i}".conf{.sample,} || die + fi + done + + # These both need to be writable by the clamav user. + # TODO: use syslog by default; that's what it's for. + diropts -o clamav -g clamav + keepdir /var/lib/clamav + keepdir /var/log/clamav + fi + + if use doc ; then + local HTML_DOCS=( docs/html/. ) + einstalldocs + + if ! use libclamav-only ; then + doman docs/man/*.[1-8] + fi + fi + + find "${ED}" -name '*.la' -delete || die +} + +src_test() { + if use libclamav-only ; then + ewarn "Test target not available when USE=libclamav-only is set, skipping tests ..." + return 0 + fi + + emake quick-check +} + +pkg_postinst() { + if ! use libclamav-only ; then + if use systemd ; then + tmpfiles_process clamav.conf + fi + fi + + 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 + + local databases=( "${EROOT}"/var/lib/clamav/main.c[lv]d ) + if [[ ! -f "${databases}" ]] ; then + ewarn "You must run freshclam manually to populate the virus database" + ewarn "before starting clamav for the first time." + fi + + ewarn "This version of ClamAV provides separate OpenRC services" + ewarn "for clamd, freshclam, clamav-milter, and clamonacc. The" + ewarn "clamd service now starts only the clamd daemon itself. You" + ewarn "should add freshclam (and perhaps clamav-milter) to any" + ewarn "runlevels that previously contained clamd." +} diff --git a/app-antivirus/clamav/files/clamav-0.103.12-missing-const.patch b/app-antivirus/clamav/files/clamav-0.103.12-missing-const.patch new file mode 100644 index 000000000000..39b98b7f4732 --- /dev/null +++ b/app-antivirus/clamav/files/clamav-0.103.12-missing-const.patch @@ -0,0 +1,13 @@ +diff --git a/libclamav/regex/engine.c b/libclamav/regex/engine.c +index ed359c3..3c25398 100644 +--- a/libclamav/regex/engine.c ++++ b/libclamav/regex/engine.c +@@ -223,7 +223,7 @@ matcher(struct re_guts *g, const char *string, size_t nmatch, + dp = dissect(m, m->coldp, endp, gf, gl); + } else { + if (g->nplus > 0 && m->lastpos == NULL) +- m->lastpos = (char **)cli_malloc((g->nplus+1) * ++ m->lastpos = (const char **)cli_malloc((g->nplus+1) * + sizeof(char *)); + if (g->nplus > 0 && m->lastpos == NULL) { + free(m->pmatch); |