#30 WIP: Update to 1.3.1
Opened 16 days ago by orion. Modified 15 days ago
rpms/ orion/clamav 1.3  into  rawhide

file removed
-18
@@ -1,18 +0,0 @@ 

- diff -up clamav-1.0.0/CMakeLists.txt.rpath clamav-1.0.0/CMakeLists.txt

- --- clamav-1.0.0/CMakeLists.txt.rpath	2023-01-15 22:04:58.217120124 -0700

- +++ clamav-1.0.0/CMakeLists.txt	2023-01-15 22:05:57.121818812 -0700

- @@ -180,14 +180,6 @@ endif()

-  

-  include(GNUInstallDirs)

-  

- -if (NOT DEFINED CMAKE_INSTALL_RPATH)

- -    if(CMAKE_INSTALL_FULL_LIBDIR)

- -        set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")

- -    else()

- -        set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")

- -    endif()

- -endif()

- -

-  if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")

-    set(USING_CLANG ON)

-  else()

file modified
+16 -14
@@ -1,4 +1,4 @@ 

- #global prerelease  -rc2

+ #global prerelease  -rc

  

  %global _hardened_build 1

  
@@ -25,7 +25,7 @@ 

  

  Summary:    End-user tools for the Clam Antivirus scanner

  Name:       clamav

- Version:    1.0.6

+ Version:    1.3.1

  Release:    1%{?dist}

  License:    %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}

  URL:        https://www.clamav.net/
@@ -65,15 +65,10 @@ 

  #for scanner-systemd/server-systemd

  Source530:  clamd@.service

  

- # Accept RUSTFLAGS

- # https://github.com/Cisco-Talos/clamav/pull/835

- Patch0:     clamav-rustflags.patch

  # Change default config locations for Fedora

  Patch1:     clamav-default_confs.patch

  # Fix pkg-config flags for static linking, multilib

  Patch2:     clamav-private.patch

- # Remove rpath

- Patch3:     clamav-rpath.patch

  # Modify clamav-clamonacc.service for Fedora compatibility

  Patch5:     clamav-clamonacc-service.patch

  # Allow freshclam service to run if cron.d file is present
@@ -273,18 +268,18 @@ 

  # EL8 and earlier do not have the Rust cargo dependencies that are

  # defined by the generate_buildrequires stage in EL9 and later, so the

  # vendored packages included in the ClamAV sources suffice.

- sed -i -e '/cbindgen/s/version = *"0.20"/version = "0.24"/' -e '/^bindgen *=/s/= .*/= "0.63"/' libclamav_rust/Cargo.toml

  %cargo_prep

  cd libclamav_rust

- rm -r .cargo

+ sed -i -e '/^base64 *=/s/= .*/= "0.21"/' Cargo.toml

+ sed -i -e '/^bindgen *=/s/= .*/= "0.69"/' Cargo.toml

+ sed -i -e '/^cbindgen *=/s/= *".*"/= "0.26"/' Cargo.toml

+ sed -i -e '/^onenote_parser *=/s/= *.*/= "0.3.1"/' Cargo.toml

  %cargo_prep

  cd ..

  %endif

  

- %patch -P0 -p1 -b .rustflags

  %patch -P1 -p1 -b .default_confs

  %patch -P2 -p1 -b .private

- %patch -P3 -p1 -b .rpath

  %patch -P5 -p1 -b .clamonacc-service

  %patch -P6 -p1 -b .freshclam-service

  %patch -P7 -p1 -b .big-endian
@@ -320,6 +315,7 @@ 

      -DCMAKE_INSTALL_DOCDIR=%{_pkgdocdir} \

      -DCLAMAV_USER=%{updateuser} -DCLAMAV_GROUP=%{updateuser} \

      -DDATABASE_DIRECTORY=%{homedir} \

+     -DDO_NOT_SET_RPATH=ON \

      %{!?with_clamonacc:-DENABLE_CLAMONACC=OFF} \

      %{?with_llvm:-DBYTECODE_RUNTIME=llvm -D LLVM_FIND_VERSION="3.6.0"} \

      %{!?with_unrar:-DENABLE_UNRAR=OFF}
@@ -532,16 +528,17 @@ 

  

  

  %files lib

- %{_libdir}/libclamav.so.11*

+ %{_libdir}/libclamav.so.12*

  %{_libdir}/libclammspack.so.0*

  %if %{with unrar}

- %{_libdir}/libclamunrar*.so.11*

+ %{_libdir}/libclamunrar*.so.12*

  %endif

  

  

  %files devel

  %{_includedir}/*

  %{_libdir}/*.so

+ %{_libdir}/libclamav_rust.a

  %{_libdir}/pkgconfig/*

  %{_bindir}/clamav-config

  
@@ -568,9 +565,11 @@ 

  

  %files freshclam

  %{_bindir}/freshclam

- %{_libdir}/libfreshclam.so.2*

+ %{_libdir}/libfreshclam.so.3*

  %{_mandir}/*/freshclam*

  %{_unitdir}/clamav-freshclam.service

+ %{_unitdir}/clamav-freshclam-once.service

+ %{_unitdir}/clamav-freshclam-once.timer

  %config(noreplace) %verify(not mtime)    %{_sysconfdir}/freshclam.conf

  %ghost %attr(0644,%{updateuser},%{updateuser}) %{homedir}/bytecode.cld

  %ghost %attr(0644,%{updateuser},%{updateuser}) %{homedir}/bytecode.cvd
@@ -601,6 +600,9 @@ 

  

  

  %changelog

+ * Fri Apr 26 2024 Orion Poplawski <orion@nwra.com> - 1.3.1-1

+ - Update to 1.3.1

+ 

  * Fri Apr 26 2024 Orion Poplawski <orion@nwra.com> - 1.0.6-1

  - Update to 1.0.6

  

@@ -1,25 +1,7 @@ 

- From 5a7b1cdfadc980fb1c4fa32e6275e7c96a963110 Mon Sep 17 00:00:00 2001

- From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>

- Date: Fri, 6 Jan 2023 21:42:30 +0100

- Subject: libclamav/pe: Use endian wrapper in more places.

- 

- A few user of VirtualAddress and Size in cli_exe_info::pe_image_data_dir

- don't use the endian wrapper while other places do. This leads to

- testsuite failures on big endian machines.

- 

- Use the endian wrapper in all places across pe.c for the two members.

- 

- Patch-Name: libclamav-pe-Use-endian-wrapper-in-more-places.patch

- Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>

- ---

-  libclamav/pe.c | 18 +++++++++---------

-  1 file changed, 9 insertions(+), 9 deletions(-)

- 

- diff --git a/libclamav/pe.c b/libclamav/pe.c

- index f5dcea9..19cd2d4 100644

- --- a/libclamav/pe.c

- +++ b/libclamav/pe.c

- @@ -2422,22 +2422,22 @@ static cl_error_t hash_imptbl(cli_ctx *ctx, unsigned char **digest, uint32_t *im

+ diff -up clamav-1.1.0-rc/libclamav/pe.c.big-endian clamav-1.1.0-rc/libclamav/pe.c

+ --- clamav-1.1.0-rc/libclamav/pe.c.big-endian	2023-03-30 13:21:27.000000000 -0600

+ +++ clamav-1.1.0-rc/libclamav/pe.c	2023-04-02 21:32:06.173149296 -0600

+ @@ -2422,22 +2422,22 @@ static cl_error_t hash_imptbl(cli_ctx *c

   

       /* If the PE doesn't have an import table then skip it. This is an

        * uncommon case but can happen. */
@@ -46,7 +28,7 @@ 

       if (impdes == NULL) {

           cli_dbgmsg("scan_pe: failed to acquire fmap buffer\n");

           status = CL_EREAD;

- @@ -2447,7 +2447,7 @@ static cl_error_t hash_imptbl(cli_ctx *ctx, unsigned char **digest, uint32_t *im

+ @@ -2447,7 +2447,7 @@ static cl_error_t hash_imptbl(cli_ctx *c

   

       /* Safety: We can trust peinfo->dirs[1].Size only because `fmap_need_off()` (above)

        * would have failed if the size exceeds the end of the fmap. */
@@ -55,7 +37,7 @@ 

   

       if (genhash[CLI_HASH_MD5]) {

           hashctx[CLI_HASH_MD5] = cl_hash_init("md5");

- @@ -2546,7 +2546,7 @@ static cl_error_t hash_imptbl(cli_ctx *ctx, unsigned char **digest, uint32_t *im

+ @@ -2546,7 +2546,7 @@ static cl_error_t hash_imptbl(cli_ctx *c

   

   done:

       if (needed_impoff) {
@@ -73,7 +55,7 @@ 

               struct swizz_stats *stats = cli_calloc(1, sizeof(*stats));

               unsigned int m            = 1000;

               ret                       = CL_CLEAN;

- @@ -5292,13 +5292,13 @@ cl_error_t cli_peheader(fmap_t *map, struct cli_exe_info *peinfo, uint32_t opts,

+ @@ -5300,13 +5300,13 @@ cl_error_t cli_peheader(fmap_t *map, str

           cli_dbgmsg("EntryPoint offset: 0x%x (%d)\n", peinfo->ep, peinfo->ep);

       }

   
@@ -81,7 +63,7 @@ 

  +    if (is_dll || peinfo->ndatadirs < 3 || !EC32(peinfo->dirs[2].Size))

           peinfo->res_addr = 0;

       else

-          peinfo->res_addr = EC32(peinfo->dirs[2].VirtualAddress);

+          peinfo->res_addr = peinfo->dirs[2].VirtualAddress;

   

       while (opts & CLI_PEHEADER_OPT_EXTRACT_VINFO &&

  -           peinfo->ndatadirs >= 3 && peinfo->dirs[2].Size) {

file modified
+1 -1
@@ -1,4 +1,4 @@ 

- SHA512 (clamav-1.0.6-norar.tar.xz) = 8e056ec657f379a5de3cd62dfb90dfc9bac5814497ee8e917484b4203f04d5765b23691415b11eafbd084d1e55c6c864b7424e82a760993765194360d0acb609

+ SHA512 (clamav-1.3.1-norar.tar.xz) = f1e4efd4604711b1cd0fee638c2a149e688d95d43fc967458c5496ac5a1ec419310821499fb8d5c9294f11d122946393fbcfd41c9c9e79436a31720890065cd1

  SHA512 (main-62.cvd) = b52e5d9ecacbd9b11c3b0cc460388746fccb353a7520522ed15ee25f645a432bed5be7e6b38512f134f085eb9be76a1e26c19de8b09491d4ec46da8c5afc318e

  SHA512 (daily-27256.cvd) = cafb9ee0228662b512614d75f8d13585ce55ffb3aafca809cca247adf5e8bb21f39c2beb29ca6030b7a4df3e0ece835601396fe26c40564f6bc5e9b693b4b700

  SHA512 (bytecode-335.cvd) = 9177c0533658b21584de0623ff9b7c70b2ec92ce9f6fecf98a881902c98025930430415715e9914ce7c0c6fb91aad532b4c907677c3010a0da47583b7ad24d4f

file modified
+2 -2
@@ -1,5 +1,5 @@ 

- VERSION=1.0.6

- REPOS="f40 f39 f38 epel9"

+ VERSION=1.3.1

+ REPOS="n"

  

  if [ -z "$1" ]

  then

This is waiting on the rust dependencies reviews, but otherwise should be ready once they are available.

rebased onto 4c9d223

15 days ago