From 35103ea68be91720c95f67ca32b6ac2b35238d62 Mon Sep 17 00:00:00 2001 From: Matt Jolly Date: Mon, 23 Sep 2024 21:43:38 +1000 Subject: app-antivirus/clamav: add 1.4.1-r1 Swap out 1.4.0 for 1.4.0-r1 - noticed an incompatible-pointer-type warning just after pushing. As a side benefit we can drop the old onenote-rs patch in favour of a later revision of upstream's git crate! Signed-off-by: Matt Jolly --- app-antivirus/clamav/Manifest | 2 +- app-antivirus/clamav/clamav-1.4.1-r1.ebuild | 415 +++++++++++++++++++++ app-antivirus/clamav/clamav-1.4.1.ebuild | 413 -------------------- .../clamav/files/clamav-1.3.1-onenote-rs.patch | 30 -- .../clamav/files/clamav-1.4.1-pointer-types.patch | 29 ++ 5 files changed, 445 insertions(+), 444 deletions(-) create mode 100644 app-antivirus/clamav/clamav-1.4.1-r1.ebuild delete mode 100644 app-antivirus/clamav/clamav-1.4.1.ebuild delete mode 100644 app-antivirus/clamav/files/clamav-1.3.1-onenote-rs.patch create mode 100644 app-antivirus/clamav/files/clamav-1.4.1-pointer-types.patch (limited to 'app-antivirus') diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest index 7212a5c955f5..d5636a04acd1 100644 --- a/app-antivirus/clamav/Manifest +++ b/app-antivirus/clamav/Manifest @@ -170,7 +170,7 @@ DIST num_cpus-1.16.0.crate 15713 BLAKE2B 11b432fc7c7496d48918f09ed0954e0f1d08455 DIST once_cell-1.17.0.crate 32736 BLAKE2B 767fc8f362ce5ed7a9eafceb2f0764a2a1c7f4070e22d1e6e2498b3c841c5f761e77fb66a34b899a75d48f1563f6b9b73b90aa9431055d4e0269c47a1b043c1f SHA512 291d87380c0ea17fb3ffc9fdff8620d2ff55601c06ef65b2f0c54254fecd5b488645c6e94c6026b82071893f4d420491ff712399a782e14efa1e323e5c299c46 DIST once_cell-1.18.0.crate 32969 BLAKE2B a08d5beee50a7add28bd9e50b18709e7b34574f0f55f80909d5efb7ac5917e5f30bdcf3fb43ddd0a4f420a427390c7ffe1cc1c7191a3a1d939bc6e3139e6eef7 SHA512 9328968afdf3535b2d9e0113d75afa725259d76994ef2e1948ad7efa4ec8a65bac7cfdc31b749d5cd55ad4e28d2e28ac57b871e3067b89182453c7e2413a13b8 DIST once_cell-1.19.0.crate 33046 BLAKE2B c14b374eaf4ac0f60acc2e02f7bba270a0e8e0a6978d749cd3cb0ab3eb26907e4fbea70dd5132982f90290381ed18ff8a87fd530f1415fabffac864f157ea380 SHA512 4154876afd34a699ee650d1a8a1c5ee5a25f0ebd9388b8bef2564e33629fae68f113d7507488c68abbe7ea1acf9bbc41813cbbf3ef3e464e3f3b9cc7a51d870c -DIST onenote.rs-8b450447e58143004b68dd21c11b710fdb79be92.gh.tar.gz 725441 BLAKE2B e4ad2b41d47db5318f792624d9cc793c9fa1b77cab6811d13d9cfeb7f4239639f4191d5d3207d27549426b9414e04f4aa0e18ed00e221cea49a9e4a5b3423470 SHA512 4a29e1f9a77e7174481b0d9e3cd860dcbe593a2fc28f60823197e52a1067cc1674758c97b13605fb7d58cb35d518941bc117b49458a58a1e887f15981df4e8a0 +DIST onenote.rs-29c08532252b917543ff268284f926f30876bb79.gh.tar.gz 725455 BLAKE2B d89839fe5254895376b7a0d793feb246f2244a277fb97d9753ae661e6cd393765a009e3c957a139c9f3f26cfb989e2ec3b14df4099b81e0969334a885e54e61c SHA512 cbae71d1b28ef7465729d19c70e59ccc8690a21131827d3d627128fbe3a178abcf7c3ddf1fd7e7ede0e024c329c26c77474388e343f8758537faa0d570d4fd15 DIST paste-1.0.14.crate 18157 BLAKE2B 35e8548611c51ee75f4d04926149e5e54870d7073d9b635d550a6fa0f85891f57f326bdbcff3dd8618cf40f8e08cf903ef87d9c034d5921d8b91e1db842cdd7c SHA512 3a793f0e5e773a7f7defc798a4c17ae9a40d715144632ea6cb0a8c785e14c4212046491df016bb9838281f8eaf327a79f01c1e2ac5f26785c028bc880faff9ee DIST peeking_take_while-0.1.2.crate 6697 BLAKE2B 31571604d00872900abcb677a483da93654de523bbdb0331c326dc9a3e531f246e571bebcb983e79dc46e33ed6dd32b978be509841ec0d9f1e7209c06289c22a SHA512 7bf8721987c3e2e1986683dd897746592a909382f02b840b777effec7d8b0a864c1a83b03c73d555e359f22c423168a54b75448a7e7b996b739527ce8c88b721 DIST pin-project-1.0.12.crate 56972 BLAKE2B 1f6b106cd55b9692bb1d671bfd51011d9f89cfe8bbbe030c64e7ea57b6efb0765838b03812708a7aa38c197d3b43328a9d88fdf93abb51f4d1a3061301b74414 SHA512 434ce0a0e16441c7aa6f12dc98584a0e7986e9491eb08d5143e3f64e1f73dfa4db9d0fb2098f16e5a36f3653201aff735437d2d1d366c11160c09534c75fbfe7 diff --git a/app-antivirus/clamav/clamav-1.4.1-r1.ebuild b/app-antivirus/clamav/clamav-1.4.1-r1.ebuild new file mode 100644 index 000000000000..b5509223351b --- /dev/null +++ b/app-antivirus/clamav/clamav-1.4.1-r1.ebuild @@ -0,0 +1,415 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +# Upstream are working on updating clamav's LLVM bytecode interpreter to work +# with later versions of LLVM, but it's not ready yet. See: +# https://github.com/Cisco-Talos/clamav/issues/581 +# This does not impact the ability of the package to build with llvm/clang otherwise. +LLVM_MAX_SLOT=13 +PYTHON_COMPAT=( python3_{11..13} ) + +CRATES=" + adler@1.0.2 + adler32@1.2.0 + aho-corasick@1.1.3 + android-tzdata@0.1.1 + android_system_properties@0.1.5 + autocfg@1.3.0 + base64@0.21.7 + bindgen@0.65.1 + bit_field@0.10.2 + bitflags@1.3.2 + bitflags@2.5.0 + block-buffer@0.10.4 + bumpalo@3.16.0 + bytemuck@1.15.0 + byteorder@1.5.0 + bytes@1.6.0 + bzip2-rs@0.1.2 + cbindgen@0.25.0 + cc@1.0.97 + cexpr@0.6.0 + cfg-if@1.0.0 + chrono@0.4.38 + clang-sys@1.7.0 + color_quant@1.1.0 + core-foundation-sys@0.8.6 + cpufeatures@0.2.12 + crc32fast@1.4.0 + crossbeam-deque@0.8.5 + crossbeam-epoch@0.9.18 + crossbeam-utils@0.8.19 + crunchy@0.2.2 + crypto-common@0.1.6 + delharc@0.6.1 + digest@0.10.7 + either@1.11.0 + encoding_rs@0.8.34 + enum-primitive-derive@0.2.2 + errno@0.3.8 + exr@1.72.0 + fastrand@2.1.0 + fdeflate@0.3.4 + flate2@1.0.30 + flume@0.11.0 + generic-array@0.14.7 + gif@0.13.1 + glob@0.3.1 + half@2.4.1 + hashbrown@0.12.3 + heck@0.4.1 + hex@0.4.3 + hex-literal@0.4.1 + home@0.5.9 + iana-time-zone@0.1.60 + iana-time-zone-haiku@0.1.2 + image@0.24.9 + indexmap@1.9.3 + inflate@0.4.5 + itertools@0.10.5 + itoa@1.0.11 + jpeg-decoder@0.3.1 + js-sys@0.3.69 + lazy_static@1.4.0 + lazycell@1.3.0 + lebe@0.5.2 + libc@0.2.155 + libloading@0.8.3 + linux-raw-sys@0.4.13 + lock_api@0.4.12 + log@0.4.21 + memchr@2.7.2 + minimal-lexical@0.2.1 + miniz_oxide@0.7.2 + nom@7.1.3 + num-complex@0.4.5 + num-integer@0.1.46 + num-traits@0.2.19 + once_cell@1.19.0 + paste@1.0.14 + peeking_take_while@0.1.2 + png@0.17.13 + prettyplease@0.2.19 + primal-check@0.3.3 + proc-macro2@1.0.81 + qoi@0.4.1 + quote@1.0.36 + rayon@1.10.0 + rayon-core@1.12.1 + regex@1.10.4 + regex-automata@0.4.6 + regex-syntax@0.8.3 + rustc-hash@1.1.0 + rustdct@0.7.1 + rustfft@6.2.0 + rustix@0.38.34 + ryu@1.0.17 + scopeguard@1.2.0 + serde@1.0.200 + serde_derive@1.0.200 + serde_json@1.0.116 + sha1@0.10.6 + sha2@0.10.8 + shlex@1.3.0 + simd-adler32@0.3.7 + smallvec@1.13.2 + spin@0.9.8 + strength_reduce@0.2.4 + syn@1.0.109 + syn@2.0.60 + tempfile@3.10.1 + thiserror@1.0.59 + thiserror-impl@1.0.59 + tiff@0.9.1 + tinyvec@1.6.0 + toml@0.5.11 + transpose@0.2.3 + typenum@1.17.0 + unicode-ident@1.0.12 + unicode-segmentation@1.11.0 + uuid@1.8.0 + version_check@0.9.4 + wasm-bindgen@0.2.92 + wasm-bindgen-backend@0.2.92 + wasm-bindgen-macro@0.2.92 + wasm-bindgen-macro-support@0.2.92 + wasm-bindgen-shared@0.2.92 + weezl@0.1.8 + which@4.4.2 + widestring@1.1.0 + windows-core@0.52.0 + windows-sys@0.52.0 + windows-targets@0.52.5 + windows_aarch64_gnullvm@0.52.5 + windows_aarch64_msvc@0.52.5 + windows_i686_gnu@0.52.5 + windows_i686_gnullvm@0.52.5 + windows_i686_msvc@0.52.5 + windows_x86_64_gnu@0.52.5 + windows_x86_64_gnullvm@0.52.5 + windows_x86_64_msvc@0.52.5 + zune-inflate@0.2.54 +" + +# Get the commit from the CLAM-2329-new-from-slice branch +declare -A GIT_CRATES=( + [onenote_parser]="https://github.com/Cisco-Talos/onenote.rs;29c08532252b917543ff268284f926f30876bb79;onenote.rs-%commit%" +) + +inherit cargo cmake flag-o-matic llvm python-any-r1 systemd tmpfiles + +MY_P=${P//_/-} + +DESCRIPTION="Clam Anti-Virus Scanner" +HOMEPAGE="https://www.clamav.net/" +SRC_URI="https://github.com/Cisco-Talos/clamav/archive/refs/tags/${MY_P}.tar.gz + ${CARGO_CRATE_URIS}" +S=${WORKDIR}/clamav-${MY_P} + +LICENSE="Apache-2.0 BSD GPL-2 ISC MIT MPL-2.0 Unicode-DFS-2016 ZLIB" +# 0/sts (short term support) if not an LTS release +SLOT="0/sts" +if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +fi + +IUSE="doc clamonacc +clamapp experimental jit libclamav-only milter rar selinux +system-mspack systemd test" + +REQUIRED_USE="libclamav-only? ( !clamonacc !clamapp !milter ) + clamonacc? ( clamapp ) + milter? ( clamapp ) + test? ( !libclamav-only )" + +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. +COMMON_DEPEND=" + acct-group/clamav + acct-user/clamav + app-arch/bzip2 + dev-libs/json-c:= + dev-libs/libltdl + dev-libs/libpcre2:= + dev-libs/libxml2 + dev-libs/openssl:= + >=sys-libs/zlib-1.2.2:= + virtual/libiconv + !libclamav-only? ( net-misc/curl ) + clamapp? ( sys-libs/ncurses:= net-misc/curl ) + elibc_musl? ( sys-libs/fts-standalone ) + jit? ( \ + "${ED}"/etc/clamav/clamd.conf || die + + sed -e "s:^\(Example\):\# \1:" \ + -e "s:^#\(PidFile\) .*:\1 ${EPREFIX}/run/freshclam.pid:" \ + -e "s/^#\(DatabaseOwner .*\)/\1/" \ + -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \ + -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamav/clamd.conf:" \ + -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \ + -e "s/^#\(DatabaseDirectory .*\)/\1/" \ + "${ED}"/etc/clamav/freshclam.conf.sample > \ + "${ED}"/etc/clamav/freshclam.conf || die + + if use milter ; then + # Note: only keep the "unix" ClamdSocket and MilterSocket! + sed -e "s:^\(Example\):\# \1:" \ + -e "s:^\#\(PidFile\) .*:\1 ${EPREFIX}/run/clamav-milter.pid:" \ + -e "s/^#\(ClamdSocket unix:.*\)/\1/" \ + -e "s/^#\(User .*\)/\1/" \ + -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \ + "${ED}"/etc/clamav/clamav-milter.conf.sample > \ + "${ED}"/etc/clamav/clamav-milter.conf || die + + systemd_newunit "${FILESDIR}/clamav-milter.service-0.104.0" 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 + fi + + if use doc ; then + local HTML_DOCS=( docs/html/. ) + einstalldocs + fi + + # Don't install man pages for utilities we didn't install + if use libclamav-only ; then + rm -r "${ED}"/usr/share/man || die + fi + + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + if ! use libclamav-only ; then + if use systemd ; then + tmpfiles_process clamav-r1.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 + + if ! systemd_is_booted ; then + 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." + else + if [[ -n "${REPLACING_VERSIONS}" ]] && ver_test "${REPLACING_VERSIONS}" -le 1.3.1; then + ewarn "From 1.3.1-r1 the Gentoo-provided systemd services have been" + ewarn "Retired in favour of using the units shipped by upstream." + ewarn "Ensure that any required services are configured and started." + ewarn "clamd@.service has been retired as part of this transition." + fi + fi + + if [[ -z ${REPLACING_VERSIONS} ]] && use clamonacc; then + einfo "'clamonacc' requires additional configuration before it" + einfo "can be enabled, and may not produce any output if not properly" + einfo "configured. Read the appropriate man page if clamonacc is desired." + fi + +} diff --git a/app-antivirus/clamav/clamav-1.4.1.ebuild b/app-antivirus/clamav/clamav-1.4.1.ebuild deleted file mode 100644 index 4dc3275f4755..000000000000 --- a/app-antivirus/clamav/clamav-1.4.1.ebuild +++ /dev/null @@ -1,413 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -# Upstream are working on updating clamav's LLVM bytecode interpreter to work -# with later versions of LLVM, but it's not ready yet. See: -# https://github.com/Cisco-Talos/clamav/issues/581 -# This does not impact the ability of the package to build with llvm/clang otherwise. -LLVM_MAX_SLOT=13 -PYTHON_COMPAT=( python3_{11..13} ) - -CRATES=" - adler@1.0.2 - adler32@1.2.0 - aho-corasick@1.1.3 - android-tzdata@0.1.1 - android_system_properties@0.1.5 - autocfg@1.3.0 - base64@0.21.7 - bindgen@0.65.1 - bit_field@0.10.2 - bitflags@1.3.2 - bitflags@2.5.0 - block-buffer@0.10.4 - bumpalo@3.16.0 - bytemuck@1.15.0 - byteorder@1.5.0 - bytes@1.6.0 - bzip2-rs@0.1.2 - cbindgen@0.25.0 - cc@1.0.97 - cexpr@0.6.0 - cfg-if@1.0.0 - chrono@0.4.38 - clang-sys@1.7.0 - color_quant@1.1.0 - core-foundation-sys@0.8.6 - cpufeatures@0.2.12 - crc32fast@1.4.0 - crossbeam-deque@0.8.5 - crossbeam-epoch@0.9.18 - crossbeam-utils@0.8.19 - crunchy@0.2.2 - crypto-common@0.1.6 - delharc@0.6.1 - digest@0.10.7 - either@1.11.0 - encoding_rs@0.8.34 - enum-primitive-derive@0.2.2 - errno@0.3.8 - exr@1.72.0 - fastrand@2.1.0 - fdeflate@0.3.4 - flate2@1.0.30 - flume@0.11.0 - generic-array@0.14.7 - gif@0.13.1 - glob@0.3.1 - half@2.4.1 - hashbrown@0.12.3 - heck@0.4.1 - hex@0.4.3 - hex-literal@0.4.1 - home@0.5.9 - iana-time-zone@0.1.60 - iana-time-zone-haiku@0.1.2 - image@0.24.9 - indexmap@1.9.3 - inflate@0.4.5 - itertools@0.10.5 - itoa@1.0.11 - jpeg-decoder@0.3.1 - js-sys@0.3.69 - lazy_static@1.4.0 - lazycell@1.3.0 - lebe@0.5.2 - libc@0.2.155 - libloading@0.8.3 - linux-raw-sys@0.4.13 - lock_api@0.4.12 - log@0.4.21 - memchr@2.7.2 - minimal-lexical@0.2.1 - miniz_oxide@0.7.2 - nom@7.1.3 - num-complex@0.4.5 - num-integer@0.1.46 - num-traits@0.2.19 - once_cell@1.19.0 - paste@1.0.14 - peeking_take_while@0.1.2 - png@0.17.13 - prettyplease@0.2.19 - primal-check@0.3.3 - proc-macro2@1.0.81 - qoi@0.4.1 - quote@1.0.36 - rayon@1.10.0 - rayon-core@1.12.1 - regex@1.10.4 - regex-automata@0.4.6 - regex-syntax@0.8.3 - rustc-hash@1.1.0 - rustdct@0.7.1 - rustfft@6.2.0 - rustix@0.38.34 - ryu@1.0.17 - scopeguard@1.2.0 - serde@1.0.200 - serde_derive@1.0.200 - serde_json@1.0.116 - sha1@0.10.6 - sha2@0.10.8 - shlex@1.3.0 - simd-adler32@0.3.7 - smallvec@1.13.2 - spin@0.9.8 - strength_reduce@0.2.4 - syn@1.0.109 - syn@2.0.60 - tempfile@3.10.1 - thiserror@1.0.59 - thiserror-impl@1.0.59 - tiff@0.9.1 - tinyvec@1.6.0 - toml@0.5.11 - transpose@0.2.3 - typenum@1.17.0 - unicode-ident@1.0.12 - unicode-segmentation@1.11.0 - uuid@1.8.0 - version_check@0.9.4 - wasm-bindgen@0.2.92 - wasm-bindgen-backend@0.2.92 - wasm-bindgen-macro@0.2.92 - wasm-bindgen-macro-support@0.2.92 - wasm-bindgen-shared@0.2.92 - weezl@0.1.8 - which@4.4.2 - widestring@1.1.0 - windows-core@0.52.0 - windows-sys@0.52.0 - windows-targets@0.52.5 - windows_aarch64_gnullvm@0.52.5 - windows_aarch64_msvc@0.52.5 - windows_i686_gnu@0.52.5 - windows_i686_gnullvm@0.52.5 - windows_i686_msvc@0.52.5 - windows_x86_64_gnu@0.52.5 - windows_x86_64_gnullvm@0.52.5 - windows_x86_64_msvc@0.52.5 - zune-inflate@0.2.54 -" - -# Get the commit from the CLAM-2329-new-from-slice branch -declare -A GIT_CRATES=( - [onenote_parser]="https://github.com/Cisco-Talos/onenote.rs;8b450447e58143004b68dd21c11b710fdb79be92;onenote.rs-%commit%" -) - -inherit cargo cmake flag-o-matic llvm python-any-r1 systemd tmpfiles - -MY_P=${P//_/-} - -DESCRIPTION="Clam Anti-Virus Scanner" -HOMEPAGE="https://www.clamav.net/" -SRC_URI="https://github.com/Cisco-Talos/clamav/archive/refs/tags/${MY_P}.tar.gz - ${CARGO_CRATE_URIS}" -S=${WORKDIR}/clamav-${MY_P} - -LICENSE="Apache-2.0 BSD GPL-2 ISC MIT MPL-2.0 Unicode-DFS-2016 ZLIB" -# 0/sts (short term support) if not an LTS release -SLOT="0/sts" -if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" -fi - -IUSE="doc clamonacc +clamapp experimental jit libclamav-only milter rar selinux +system-mspack systemd test" - -REQUIRED_USE="libclamav-only? ( !clamonacc !clamapp !milter ) - clamonacc? ( clamapp ) - milter? ( clamapp ) - test? ( !libclamav-only )" - -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. -COMMON_DEPEND=" - acct-group/clamav - acct-user/clamav - app-arch/bzip2 - dev-libs/json-c:= - dev-libs/libltdl - dev-libs/libpcre2:= - dev-libs/libxml2 - dev-libs/openssl:= - >=sys-libs/zlib-1.2.2:= - virtual/libiconv - !libclamav-only? ( net-misc/curl ) - clamapp? ( sys-libs/ncurses:= net-misc/curl ) - elibc_musl? ( sys-libs/fts-standalone ) - jit? ( \ - "${ED}"/etc/clamav/clamd.conf || die - - sed -e "s:^\(Example\):\# \1:" \ - -e "s:^#\(PidFile\) .*:\1 ${EPREFIX}/run/freshclam.pid:" \ - -e "s/^#\(DatabaseOwner .*\)/\1/" \ - -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \ - -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamav/clamd.conf:" \ - -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \ - -e "s/^#\(DatabaseDirectory .*\)/\1/" \ - "${ED}"/etc/clamav/freshclam.conf.sample > \ - "${ED}"/etc/clamav/freshclam.conf || die - - if use milter ; then - # Note: only keep the "unix" ClamdSocket and MilterSocket! - sed -e "s:^\(Example\):\# \1:" \ - -e "s:^\#\(PidFile\) .*:\1 ${EPREFIX}/run/clamav-milter.pid:" \ - -e "s/^#\(ClamdSocket unix:.*\)/\1/" \ - -e "s/^#\(User .*\)/\1/" \ - -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \ - "${ED}"/etc/clamav/clamav-milter.conf.sample > \ - "${ED}"/etc/clamav/clamav-milter.conf || die - - systemd_newunit "${FILESDIR}/clamav-milter.service-0.104.0" 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 - fi - - if use doc ; then - local HTML_DOCS=( docs/html/. ) - einstalldocs - fi - - # Don't install man pages for utilities we didn't install - if use libclamav-only ; then - rm -r "${ED}"/usr/share/man || die - fi - - find "${ED}" -name '*.la' -delete || die -} - -pkg_postinst() { - if ! use libclamav-only ; then - if use systemd ; then - tmpfiles_process clamav-r1.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 - - if ! systemd_is_booted ; then - 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." - else - if [[ -n "${REPLACING_VERSIONS}" ]] && ver_test "${REPLACING_VERSIONS}" -le 1.3.1; then - ewarn "From 1.3.1-r1 the Gentoo-provided systemd services have been" - ewarn "Retired in favour of using the units shipped by upstream." - ewarn "Ensure that any required services are configured and started." - ewarn "clamd@.service has been retired as part of this transition." - fi - fi - - if [[ -z ${REPLACING_VERSIONS} ]] && use clamonacc; then - einfo "'clamonacc' requires additional configuration before it" - einfo "can be enabled, and may not produce any output if not properly" - einfo "configured. Read the appropriate man page if clamonacc is desired." - fi - -} diff --git a/app-antivirus/clamav/files/clamav-1.3.1-onenote-rs.patch b/app-antivirus/clamav/files/clamav-1.3.1-onenote-rs.patch deleted file mode 100644 index d8421a269606..000000000000 --- a/app-antivirus/clamav/files/clamav-1.3.1-onenote-rs.patch +++ /dev/null @@ -1,30 +0,0 @@ -From bc17e5a2e1f324461024f5e3e5776085a6b6df37 Mon Sep 17 00:00:00 2001 -From: Matt Jolly -Date: Mon, 24 Jun 2024 17:34:05 +1000 -Subject: [PATCH] PropertType: Specify type for custom discriminant values - -We use custom discriminant values for enum variants for "PropertType" without specifying the type. -This causes it to default to "isize" which on 64bit platforms is big enough to hold the 32bit constants, -but causes overflow when isize is 32bit. - -This issue was uncovered due to build failures on arm for Gentoo Linux as a dependency of ClamAV. - -Bug: https://bugs.gentoo.org/927214 -Signed-off-by: Matt Jolly -Co-authored-by: Steven Newbury ---- - src/one/property/mod.rs | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/one/property/mod.rs b/src/one/property/mod.rs -index 42841c6..fcc0481 100644 ---- a/src/one/property/mod.rs -+++ b/src/one/property/mod.rs -@@ -23,6 +23,7 @@ mod references; - pub(crate) mod simple; - pub(crate) mod time; - -+#[repr(u32)] - #[derive(Debug, Copy, Clone, PartialEq)] - #[allow(dead_code)] - #[allow(clippy::enum_clike_unportable_variant)] diff --git a/app-antivirus/clamav/files/clamav-1.4.1-pointer-types.patch b/app-antivirus/clamav/files/clamav-1.4.1-pointer-types.patch new file mode 100644 index 000000000000..b6ad930008b6 --- /dev/null +++ b/app-antivirus/clamav/files/clamav-1.4.1-pointer-types.patch @@ -0,0 +1,29 @@ +From 26c465b562f08d4b4c3da688a6a3b051ddc51b01 Mon Sep 17 00:00:00 2001 +From: Matt Jolly +Date: Mon, 23 Sep 2024 21:25:07 +1000 +Subject: [PATCH] Resolve incompatible-pointer-types + +Explicitly cast regex match to `const char **`; we don't modify the +value once it's set like this; we should be safe. + +Signed-off-by: Matt Jolly +--- + libclamav/regex/engine.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libclamav/regex/engine.c b/libclamav/regex/engine.c +index 68a1767fb..38add7d15 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_max_malloc((g->nplus+1) * ++ m->lastpos = (const char **)cli_max_malloc((g->nplus+1) * + sizeof(char *)); + if (g->nplus > 0 && m->lastpos == NULL) { + free(m->pmatch); +-- +2.45.2 + -- cgit v1.2.3-65-gdbad