]> TLD Linux GIT Repositories - packages/clamav.git/commitdiff
- updated to 0.102.2, partial PLD merge
authorMarcin Krol <hawk@tld-linux.org>
Sun, 5 Apr 2020 15:44:52 +0000 (17:44 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Sun, 5 Apr 2020 15:44:52 +0000 (17:44 +0200)
clamav-add-support-for-system-tomsfastmath.patch [new file with mode: 0644]
clamav-config.patch
clamav-headers.patch [new file with mode: 0644]
clamav.spec
x32.patch [new file with mode: 0644]

diff --git a/clamav-add-support-for-system-tomsfastmath.patch b/clamav-add-support-for-system-tomsfastmath.patch
new file mode 100644 (file)
index 0000000..31a841e
--- /dev/null
@@ -0,0 +1,113 @@
+From 06669d85088f588ceb781f93367bb5428874ed27 Mon Sep 17 00:00:00 2001
+From: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
+Date: Wed, 11 Mar 2015 20:03:15 +0100
+Subject: add support for system tomsfastmath
+
+Patch-Name: add-support-for-system-tomsfastmath.patch
+---
+ configure.ac                           |  2 ++
+ libclamav/Makefile.am                  | 10 ++++++++--
+ libclamav/bignum.h                     |  6 +++++-
+ libclamav/xdp.c                        |  2 +-
+ m4/reorganization/libs/tomsfastmath.m4 | 12 ++++++++++++
+ 5 files changed, 28 insertions(+), 4 deletions(-)
+ create mode 100644 m4/reorganization/libs/tomsfastmath.m4
+
+diff --git a/configure.ac b/configure.ac
+index 9ef4105..a286b44 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -82,6 +82,7 @@ m4_include([m4/reorganization/libs/xml.m4])
+ m4_include([m4/reorganization/libs/json.m4])
+ m4_include([m4/reorganization/libs/pcre.m4])
+ m4_include([m4/reorganization/libs/libmspack.m4])
++m4_include([m4/reorganization/libs/tomsfastmath.m4])
+ if test "x$use_internal_mspack" = "xno"; then
+     mspack_msg="External, $LIBMSPACK_CFLAGS $LIBMSPACK_LIBS"
+@@ -286,6 +287,7 @@ fi
+ CL_MSG_STATUS([yara        ],[$enable_yara],[$enable_yara])
+ CL_MSG_STATUS([fts         ],[yes],[$lfs_fts_msg])
++CL_MSG_STATUS([tomsfastmath],[yes],[$tomsfastmath_msg])
+ # Yep, downgrading the compiler avoids the bug too:
+ # 4.0.x, and 4.1.0 are the known buggy versions
+diff --git a/libclamav/Makefile.am b/libclamav/Makefile.am
+index 43b5154..02596b8 100644
+--- a/libclamav/Makefile.am
++++ b/libclamav/Makefile.am
+@@ -496,8 +496,10 @@ libclamav_la_SOURCES += yara_arena.c \
+       yara_clam.h
+ endif
+-libclamav_la_SOURCES += bignum.h\
+-      bignum_fast.h\
++libclamav_la_SOURCES += bignum.h
++
++if !SYSTEM_TOMSFASTMATH
++libclamav_la_SOURCES += bignum_fast.h\
+         tomsfastmath/addsub/fp_add.c\
+         tomsfastmath/addsub/fp_add_d.c\
+         tomsfastmath/addsub/fp_addmod.c\
+@@ -579,6 +581,10 @@ libclamav_la_SOURCES += bignum.h\
+         tomsfastmath/sqr/fp_sqr_comba_generic.c\
+         tomsfastmath/sqr/fp_sqr_comba_small_set.c\
+       tomsfastmath/sqr/fp_sqrmod.c
++else
++libclamav_la_CFLAGS += $(TOMSFASTMATH_CFLAGS)
++libclamav_la_LIBADD += $(TOMSFASTMATH_LIBS)
++endif
+ .PHONY: version.h.tmp
+ version.c: version.h
+diff --git a/libclamav/bignum.h b/libclamav/bignum.h
+index 9acb17b..56967b1 100644
+--- a/libclamav/bignum.h
++++ b/libclamav/bignum.h
+@@ -1,9 +1,13 @@
+ #ifndef BIGNUM_H_
+ #define BIGNUM_H_
++#if HAVE_SYSTEM_TOMSFASTMATH
++#include <tfm.h>
++#else
+ #define TFM_CHECK
+-
+ #include "bignum_fast.h"
++#endif
++
+ typedef fp_int mp_int;
+ #define mp_cmp fp_cmp
+ #define mp_toradix_n(a,b,c,d) fp_toradix_n(a,b,c,d)
+diff --git a/libclamav/xdp.c b/libclamav/xdp.c
+index 00edfa8..674dc7c 100644
+--- a/libclamav/xdp.c
++++ b/libclamav/xdp.c
+@@ -57,7 +57,7 @@
+ #include "scanners.h"
+ #include "conv.h"
+ #include "xdp.h"
+-#include "bignum_fast.h"
++#include "bignum.h"
+ #include "filetypes.h"
+ static char *dump_xdp(cli_ctx *ctx, const char *start, size_t sz);
+diff --git a/m4/reorganization/libs/tomsfastmath.m4 b/m4/reorganization/libs/tomsfastmath.m4
+new file mode 100644
+index 0000000..2a821a1
+--- /dev/null
++++ b/m4/reorganization/libs/tomsfastmath.m4
+@@ -0,0 +1,12 @@
++dnl Check for system tomsfastmath
++PKG_CHECK_MODULES([TOMSFASTMATH], [tomsfastmath], [have_system_tomsfastmath=yes], [have_system_tomsfastmath=no])
++
++AM_CONDITIONAL([SYSTEM_TOMSFASTMATH], [test "x$have_system_tomsfastmath" = "xyes"])
++
++if test "x$have_system_tomsfastmath" = "xyes"; then
++    AC_DEFINE([HAVE_SYSTEM_TOMSFASTMATH], [1], [link against system-wide tomsfastmath library])
++    tomsfastmath_msg="External, $TOMSFASTMATH_CFLAGS $TOMSFASTMATH_LIBS"
++else
++    AC_DEFINE([HAVE_SYSTEM_TOMSFASTMATH], [0], [don't link against system-wide tomsfastmath library])
++    tomsfastmath_msg="Internal"
++fi
index ee020b547a6bc240395d3f4526b71ddcef0a3e72..5d6c305104a36162d7988deb14b21df0cc67da70 100644 (file)
@@ -141,12 +141,7 @@ diff -ur clamav-0.100.0.orig/etc/freshclam.conf.sample clamav-0.100.0/etc/freshc
  
  # Path to the database directory.
  # WARNING: It must match clamd.conf's directive!
-@@ -31,11 +33,11 @@
- # Enable verbose logging.
- # Default: no
--#LogVerbose yes
-+LogVerbose yes
+@@ -31,7 +33,7 @@
  
  # Use system logger (can work together with UpdateLogFile).
  # Default: no
diff --git a/clamav-headers.patch b/clamav-headers.patch
new file mode 100644 (file)
index 0000000..8b0f354
--- /dev/null
@@ -0,0 +1,64 @@
+--- clamav-0.101.0/Makefile.am~        2018-11-29 14:52:31.000000000 +0100
++++ clamav-0.101.0/Makefile.am 2018-12-07 09:00:16.238721757 +0100
+@@ -34,7 +34,7 @@
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libclamav.pc
+-nodist_include_HEADERS = clamav-types.h clamav-version.h
++pkginclude_HEADERS = clamav-types.h clamav-version.h
+ # don't complain that configuration files and databases are not removed, this is intended
+ distuninstallcheck_listfiles = find . -type f ! -name clamd.conf ! -name freshclam.conf ! -name daily.cvd ! -name main.cvd -print
+--- clamav-0.101.0/libclamav/Makefile.am~      2018-11-29 14:52:31.000000000 +0100
++++ clamav-0.101.0/libclamav/Makefile.am       2018-12-07 09:00:16.312058931 +0100
+@@ -269,7 +269,7 @@
+ libclamav_la_LDFLAGS += -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamav/libclamav.map
+ endif
+-include_HEADERS = clamav.h
++pkginclude_HEADERS = clamav.h
+ libclamav_la_SOURCES = \
+         matcher-ac.c \
+--- clamav-0.101.0/libclamav.pc.in~    2018-11-29 14:52:31.000000000 +0100
++++ clamav-0.101.0/libclamav.pc.in     2018-12-10 11:11:47.748327272 +0100
+@@ -1,7 +1,7 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+-includedir=@includedir@
++includedir=@includedir@/clamav
+ Name: libclamav
+ Description: A GPL virus scanner
+--- clamav-0.101.0/clamav-config.in.orig       2018-11-29 14:52:31.000000000 +0100
++++ clamav-0.101.0/clamav-config.in    2018-12-10 19:32:41.185456107 +0100
+@@ -3,7 +3,7 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-includedir=@includedir@
++includedir=@includedir@/clamav
+ libdir=@libdir@
+ usage()
+@@ -55,7 +55,7 @@
+       ;;
+     --cflags)
+-              echo -I@includedir@ @CFLAGS@
++              echo -I${includedir} @CFLAGS@
+               ;;
+     --libs)
+--- clamav-0.102.0/libfreshclam/Makefile.am~   2019-10-01 19:24:09.000000000 +0200
++++ clamav-0.102.0/libfreshclam/Makefile.am    2019-10-04 09:08:07.702507579 +0200
+@@ -32,7 +32,7 @@
+ EXTRA_DIST = libfreshclam.map
+-include_HEADERS = libfreshclam.h
++pkginclude_HEADERS = libfreshclam.h
+ libfreshclam_la_SOURCES = \
+     $(top_srcdir)/shared/output.c \
index 7116ce7f2a7097076fc956ff64eac7616ba73b24..d396230617b79e4a25f47e155bd2c41f5b6734c3 100644 (file)
 Summary:       An anti-virus utility for Unix
 Summary(pl.UTF-8):     Narzędzie antywirusowe dla Uniksów
 Name:          clamav
-Version:       0.102.1
-Release:       2
+Version:       0.102.2
+Release:       1
 License:       GPL v2+
 Group:         Daemons
 #Source0Download: http://www.clamav.net/download
 Source0:       http://www.clamav.net/downloads/production/%{name}-%{version}.tar.gz
-# Source0-md5: 3d5f5f10a1bea212823050286c8c5b96
+# Source0-md5: ecf5dd2c5c43aeed1c4b458b2e689847
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Source3:       %{name}-milter.init
diff --git a/x32.patch b/x32.patch
new file mode 100644 (file)
index 0000000..74c216e
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,14 @@
+--- clamav-0.100.1/libclamav/bytecode_vm.c~    2018-06-27 21:12:10.000000000 +0200
++++ clamav-0.100.1/libclamav/bytecode_vm.c     2018-07-26 10:48:10.316153596 +0200
+@@ -1248,7 +1248,11 @@ int cli_vm_execute(const struct cli_bc *
+         gettimeofday(&tv1, NULL);
+         tv1.tv_sec -= tv0.tv_sec;
+         tv1.tv_usec -= tv0.tv_usec;
++#ifdef __ILP32__
++        cli_dbgmsg("intepreter bytecode run finished in %lluus, after executing %u opcodes\n",
++#else
+         cli_dbgmsg("interpreter bytecode run finished in %luus, after executing %u opcodes\n",
++#endif
+                    tv1.tv_sec * 1000000 + tv1.tv_usec, pc);
+     }
+     if (stop == CL_EBYTECODE) {