From fd5e7f3d2fcb643e8e2875ead10e5cdb833034aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 5 May 2022 23:35:30 +0100 Subject: [PATCH] Update to 0.103.6 --- clamav-check.patch | 12 --------- clamav-clamonacc-service.patch | 7 +++-- clamav.spec | 13 +++++----- sources | 4 +-- update_clamav.sh | 47 ++++++++++++++++++++++++++++------ 5 files changed, 50 insertions(+), 33 deletions(-) delete mode 100644 clamav-check.patch diff --git a/clamav-check.patch b/clamav-check.patch deleted file mode 100644 index e3d37a4..0000000 --- a/clamav-check.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up clamav-0.103.0/unit_tests/check_jsnorm.c.check clamav-0.103.0/unit_tests/check_jsnorm.c ---- clamav-0.103.0/unit_tests/check_jsnorm.c.check 2020-09-12 18:27:10.000000000 -0600 -+++ clamav-0.103.0/unit_tests/check_jsnorm.c 2020-09-17 22:15:26.199957518 -0600 -@@ -247,7 +247,7 @@ static void tokenizer_test(const char *i - fd = open(filename, O_RDONLY); - if (fd < 0) { - jstest_teardown(); -- ck_assert_msg("failed to open output file: %s", filename); -+ ck_assert_msg(0, "failed to open output file: %s", filename); - } - - diff_file_mem(fd, expected, len); diff --git a/clamav-clamonacc-service.patch b/clamav-clamonacc-service.patch index 12439f9..c72e806 100644 --- a/clamav-clamonacc-service.patch +++ b/clamav-clamonacc-service.patch @@ -1,6 +1,5 @@ -diff -up clamav-0.103.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service clamav-0.103.0/clamonacc/clamav-clamonacc.service.in ---- clamav-0.103.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service 2020-09-12 18:27:09.000000000 -0600 -+++ clamav-0.103.0/clamonacc/clamav-clamonacc.service.in 2020-09-18 19:49:35.400152760 -0600 +--- ./clamonacc/clamav-clamonacc.service.in.clamonacc-service 2022-05-05 22:36:27.572671129 +0100 ++++ ./clamonacc/clamav-clamonacc.service.in 2022-05-05 22:43:05.204324524 +0100 @@ -4,14 +4,12 @@ [Unit] Description=ClamAV On-Access Scanner @@ -13,7 +12,7 @@ diff -up clamav-0.103.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service Type=simple User=root -ExecStartPre=/bin/bash -c "while [ ! -S /run/clamav/clamd.ctl ]; do sleep 1; done" --ExecStart=@prefix@/sbin/clamonacc -F --config-file=@APP_CONFIG_DIRECTORY@/clamd.conf --log=/var/log/clamav/clamonacc.log --move=/root/quarantine +-ExecStart=@prefix@/sbin/clamonacc -F --log=/var/log/clamav/clamonacc.log --move=/root/quarantine +ExecStart=@prefix@/sbin/clamonacc -F --config-file=/etc/clamd.d/scan.conf [Install] diff --git a/clamav.spec b/clamav.spec index 8ee81f7..8c05fe0 100644 --- a/clamav.spec +++ b/clamav.spec @@ -33,8 +33,8 @@ Summary: End-user tools for the Clam Antivirus scanner Name: clamav -Version: 0.103.5 -Release: 3%{?dist} +Version: 0.103.6 +Release: 1%{?dist} License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2} URL: https://www.clamav.net/ %if %{with unrar} @@ -56,7 +56,7 @@ Source5: clamd-README #http://database.clamav.net/main.cvd Source10: main-62.cvd #http://database.clamav.net/daily.cvd -Source11: daily-26420.cvd +Source11: daily-26532.cvd #http://database.clamav.net/bytecode.cvd Source12: bytecode-333.cvd #for update @@ -79,9 +79,6 @@ Patch0: clamav-stats-deprecation.patch Patch1: clamav-default_confs.patch # Fix pkg-config flags for static linking, multilib Patch2: clamav-0.99-private.patch -# Fix ck_assert_msg() call -# https://github.com/Cisco-Talos/clamav-devel/pull/138 -Patch4: clamav-check.patch # Modify clamav-clamonacc.service for Fedora compatibility Patch5: clamav-clamonacc-service.patch @@ -252,7 +249,6 @@ This package contains files which are needed to run the clamav-milter. %endif %patch1 -p1 -b .default_confs %patch2 -p1 -b .private -%patch4 -p1 -b .check %patch5 -p1 -b .clamonacc-service %patch6 -p1 -b .freshclam-service @@ -580,6 +576,9 @@ test -e %{freshclamlog} || { %changelog +* Thu May 05 2022 Sérgio Basto - 0.103.6-1 +- Update to 0.103.6 + * Tue Mar 01 2022 Sérgio Basto - 0.103.5-3 - Fix for dnf update clamav-update (#2059618) diff --git a/sources b/sources index c04039f..97be8dd 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (clamav-0.103.5-norar.tar.xz) = 90a725c3372dd309cd561934030a50fddd451f1e8d5ab525939e381d6f525a8f46cca40948c59ac0ab884a25bfb17dc526c5726419e8b7eb0c4f1aef47793317 +SHA512 (clamav-0.103.6-norar.tar.xz) = 2d89b5269e497a8607c0a0a84b6119df006ca77b333608887feae5d93e9a9fc34952490a96d9fd19f8e18eeb9e45f1597daeeb18021cd6009b1218d1d6ea91eb SHA512 (main-62.cvd) = b52e5d9ecacbd9b11c3b0cc460388746fccb353a7520522ed15ee25f645a432bed5be7e6b38512f134f085eb9be76a1e26c19de8b09491d4ec46da8c5afc318e -SHA512 (daily-26420.cvd) = c368cc0b9c6e9c1b401f184840178515e37619aaae088edc0bf8d5e403c5c1f49768b987de37fc2e17cd3254f2d1d4e32e4dfb4443889aec512e634775b65423 +SHA512 (daily-26532.cvd) = 548b0c524a8406aaa7bd77fcd7ee7136190c690aa4b80e3c067a9779ec448b888014428a42bbd0bf67c090543f83266a25cd7a5164f26aced009b35ab6698db7 SHA512 (bytecode-333.cvd) = 895c41266b9bc332f3a00c9267907251ad32abe3a5bff7584285e087430fe0dd7343e4ac0245308f3734d971d6ecb5656fd9ce6caf0fa24f9da7a41a96bc4d07 diff --git a/update_clamav.sh b/update_clamav.sh index 460e040..89eeb15 100755 --- a/update_clamav.sh +++ b/update_clamav.sh @@ -1,4 +1,5 @@ -VERSION=0.103.5 +VERSION=0.103.6 +REPOS="f36 f35 f34 epel9 epel8 epel7" if [ -z "$1" ] then @@ -11,26 +12,40 @@ NAME=clamav TARBALL_CLEAN=${NAME}-${VERSION}-norar.tar.xz TARBALL=${NAME}-${VERSION}.tar.gz +echo "Usage: $0 stage" +echo "stage 0: prepare sources" +echo "stage 1: get cvd (not working at all) the donwload needs to be done manually" +echo "stage 2: upload sources and ask for scratch build" +echo "stage 3: push and build on rawhide" +echo "stage 4: build on others branches" +echo "" + if test $stage -le 0 then echo STAGE 0 +echo Press enter to prepare sources or n to skip ; read dummy; +if [[ "$dummy" != "n" ]]; then wget -c https://www.clamav.net/downloads/production/${TARBALL} wget -c https://www.clamav.net/downloads/production/${TARBALL}.sig gpg --verify ${TARBALL}.sig ${TARBALL} zcat ${TARBALL} | tar --delete -f - '*/libclamunrar/*' | xz -c > ${TARBALL_CLEAN} fi +fi -echo Press enter convert cvd into spec or n to skip ; read dummy; -if [[ "$dummy" != "n" ]]; then # WIP clouflare don't allow wget we need download with browser #wget https://database.clamav.net/main.cvd #wget https://database.clamav.net/daily.cvd #wget https://database.clamav.net/bytecode.cvd - main_ver=$(file main.cvd | sed -e 's/.*version /main-/;s/,.*/.cvd/') daily_ver=$(file daily.cvd | sed -e 's/.*version /daily-/;s/,.*/.cvd/') bytecode_ver=$(file bytecode.cvd | sed -e 's/.*version /bytecode-/;s/,.*/.cvd/') +if test $stage -le 1 +then +echo STAGE 1 +echo Press enter convert cvd into spec or n to skip ; read dummy; +if [[ "$dummy" != "n" ]]; then + cp -f main.cvd $main_ver cp -f daily.cvd $daily_ver cp -f bytecode.cvd $bytecode_ver @@ -39,7 +54,11 @@ sed -i "s|^Source10: .*|Source10: $main_ver|" clamav.spec sed -i "s|^Source11: .*|Source11: $daily_ver|" clamav.spec sed -i "s|^Source12: .*|Source12: $bytecode_ver|" clamav.spec fi +fi +if test $stage -le 2 +then +echo STAGE 2 rpmdev-bumpspec -n $VERSION -c "Update to $VERSION" clamav.spec echo fedpkg new-sources ${TARBALL_CLEAN} $main_ver $daily_ver $bytecode_ver echo Press enter scratch-build or n to skip ; read dummy; @@ -47,16 +66,28 @@ if [[ "$dummy" != "n" ]]; then #fkinit -u sergiomb fedpkg scratch-build --srpm fi -echo Press enter to upload sources and commit ; read dummy; +echo Press enter to upload sources and commit or n to skip; read dummy; +if [[ "$dummy" != "n" ]]; then fedpkg new-sources ${TARBALL_CLEAN} $(spectool -l clamav.spec | grep -P "Source10|Source11|Source12" | sed 's/.* //') fedpkg ci -c && git show +fi +fi -echo Press enter to build rawhide; read dummy; +if test $stage -le 3 +then +echo STAGE 3 +echo Press enter to build rawhide or n to skip; read dummy; +if [[ "$dummy" != "n" ]]; then git push && fedpkg build --nowait +fi +fi -for repo in "f35 f34 epel8 epel7" ; do -echo Press enter to build on branch $repo; read dummy; +echo STAGE 4 +for repo in $REPOS ; do +echo Press enter to build on branch $repo or n to skip; read dummy; +if [[ "$dummy" != "n" ]]; then git checkout $repo && git merge rawhide && fedpkg push && fedpkg build --nowait; git checkout rawhide +fi done exit