[packages/clamav] - updated to 0.103.0 - updated ac2.68,add-support-for-system-tomsfastmath patches - drop libtool hac

qboosh qboosh at pld-linux.org
Mon Nov 23 21:48:37 CET 2020


commit 8cdcf5e041a72942ef3a97a6a3381162c9f0f0d9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Nov 23 21:48:51 2020 +0100

    - updated to 0.103.0
    - updated ac2.68,add-support-for-system-tomsfastmath patches
    - drop libtool hack

 ac2.68.patch                                     | 42 ++++++++++++++----
 clamav-add-support-for-system-tomsfastmath.patch | 25 +++++------
 clamav.spec                                      | 56 ++++++++++++++----------
 3 files changed, 79 insertions(+), 44 deletions(-)
---
diff --git a/clamav.spec b/clamav.spec
index 6b10e95..abafb81 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -11,6 +11,7 @@
 %endif
 %bcond_without	system_libmspack	# system libmspack library
 %bcond_with	system_llvm		# system LLVM (< 3.7)
+%bcond_without	static_libs		# static libraries
 
 %ifarch x32
 %undefine with_llvm
@@ -18,13 +19,13 @@
 Summary:	An anti-virus utility for Unix
 Summary(pl.UTF-8):	Narzędzie antywirusowe dla Uniksów
 Name:		clamav
-Version:	0.102.2
-Release:	2
+Version:	0.103.0
+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:	ecf5dd2c5c43aeed1c4b458b2e689847
+# Source0-md5:	453a389e0147b5df8fae5601b390d7db
 Source1:	%{name}.init
 Source2:	%{name}.sysconfig
 Source3:	%{name}-milter.init
@@ -47,23 +48,23 @@ Patch5:		%{name}-add-support-for-system-tomsfastmath.patch
 Patch6:		%{name}-headers.patch
 URL:		http://www.clamav.net/
 BuildRequires:	autoconf >= 2.59
-BuildRequires:	automake >= 1:1.11
-BuildRequires:	bzip2-devel
+BuildRequires:	automake >= 1:1.11.1
+BuildRequires:	bzip2-devel >= 1.0.5
 BuildRequires:	check-devel
-BuildRequires:	curl-devel
+BuildRequires:	curl-devel >= 7.40
 BuildRequires:	gmp-devel
 BuildRequires:	json-c-devel
 BuildRequires:	libltdl-devel
 %{?with_milter:BuildRequires:	libmilter-devel}
 %{?with_system_libmspack:BuildRequires:	libmspack-devel}
 BuildRequires:	libstdc++-devel >= 5:3.4
-BuildRequires:	libtool
+BuildRequires:	libtool >= 2:2
 %{?with_milter:BuildRequires:	libwrap-devel}
 BuildRequires:	libxml2-devel >= 2
 %{?with_llvm:%{?with_system_llvm:BuildRequires:	llvm-devel < 3.7}}
 BuildRequires:	ncurses-devel
 BuildRequires:	openssl-devel >= 0.9.8
-BuildRequires:	pcre2-8-devel
+BuildRequires:	pcre2-8-devel >= 10.30
 BuildRequires:	pkgconfig >= 1:0.16
 BuildRequires:	rpm >= 4.4.9-56
 BuildRequires:	rpmbuild(macros) >= 1.647
@@ -151,6 +152,9 @@ Lista podstawowych możliwości:
 Summary:	Shared libraries for clamav
 Summary(pl.UTF-8):	Biblioteki dzielone clamav
 Group:		Libraries
+Requires:	bzip2-libs >= 1.0.5
+Requires:	curl-libs >= 7.40
+Requires:	pcre2-8 >= 10.30
 Requires:	zlib >= 1.2.2
 
 %description libs
@@ -179,10 +183,11 @@ Summary:	clamav - Development header files and libraries
 Summary(pl.UTF-8):	clamav - Pliki nagłówkowe i biblioteki dla programistów
 Group:		Development/Libraries
 Requires:	%{name}-libs = %{epoch}:%{version}-%{release}
-Requires:	bzip2-devel
-Requires:	curl-devel
+Requires:	bzip2-devel >= 1.0.5
+Requires:	curl-devel >= 7.40
 Requires:	gmp-devel
 Requires:	openssl-devel >= 0.9.8
+Requires:	pcre2-8-devel >= 10.30
 Requires:	zlib-devel >= 1.2.2
 
 %description devel
@@ -229,10 +234,12 @@ export CXXFLAGS="%{rpmcxxflags} -std=gnu++98"
 %{__automake}
 %configure \
 	--disable-clamav \
+	--enable-clamonacc \
 	--enable-clamdtop \
 	%{?with_llvm:--enable-llvm %{!?with_system_llvm:--with-system-llvm=no}} \
 	%{?with_milter:--enable-milter} \
 	--disable-silent-rules \
+	%{?with_static_libs:--enable-static} \
 	--disable-zlib-vcheck \
 	--with-dbdir=/var/lib/%{name} \
 	--with-ltdl-include=%{_includedir} \
@@ -240,8 +247,7 @@ export CXXFLAGS="%{rpmcxxflags} -std=gnu++98"
 	--with-no-cache \
 	%{?with_system_libmspack:--with-system-libmspack}
 
-%{__make} \
-	LIBTOOL=%{_bindir}/libtool
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -251,7 +257,6 @@ install -d $RPM_BUILD_ROOT/etc/{cron.d,logrotate.d,rc.d/init.d,sysconfig} \
 	$RPM_BUILD_ROOT%{systemdunitdir}
 
 %{__make} install \
-	LIBTOOL=%{_bindir}/libtool \
 	DESTDIR=$RPM_BUILD_ROOT
 %{!?with_milter:rm -f $RPM_BUILD_ROOT%{_mandir}/man8/clamav-milter.8*}
 
@@ -380,16 +385,17 @@ fi
 %attr(755,root,root) %{_bindir}/clambc
 %attr(755,root,root) %{_bindir}/clamdscan
 %attr(755,root,root) %{_bindir}/clamdtop
-%attr(755,root,root) %{_bindir}/clamonacc
 %attr(755,root,root) %{_bindir}/clamscan
 %attr(755,root,root) %{_bindir}/clamsubmit
 %attr(755,root,root) %{_bindir}/freshclam
 %attr(755,root,root) %{_bindir}/sigtool
 %attr(755,root,root) %{_bindir}/clamconf
-%attr(755,root,root) %{_sbindir}/clamd
 %attr(755,root,root) %{_sbindir}/clamav-cron-updatedb
 %attr(755,root,root) %{_sbindir}/clamav-post-updatedb
+%attr(755,root,root) %{_sbindir}/clamd
+%attr(755,root,root) %{_sbindir}/clamonacc
 %{systemdtmpfilesdir}/%{name}.conf
+%{systemdunitdir}/clamav-clamonacc.service
 %{systemdunitdir}/clamav-daemon.service
 %{systemdunitdir}/clamav-daemon.socket
 %{systemdunitdir}/clamav-freshclam.service
@@ -407,10 +413,18 @@ fi
 %attr(754,root,root) /etc/rc.d/init.d/clamd
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/clamd
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/clamav
-%{_mandir}/man1/*
-%{_mandir}/man5/clamd*
-%{_mandir}/man5/freshclam*
-%{_mandir}/man8/clamd*
+%{_mandir}/man1/clambc.1*
+%{_mandir}/man1/clamconf.1*
+%{_mandir}/man1/clamdscan.1*
+%{_mandir}/man1/clamdtop.1*
+%{_mandir}/man1/clamscan.1*
+%{_mandir}/man1/clamsubmit.1*
+%{_mandir}/man1/freshclam.1*
+%{_mandir}/man1/sigtool.1*
+%{_mandir}/man5/clamd.conf.5*
+%{_mandir}/man5/freshclam.conf.5*
+%{_mandir}/man8/clamd.8*
+%{_mandir}/man8/clamonacc.8*
 
 %if %{with milter}
 %files milter
@@ -419,10 +433,8 @@ fi
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/clamav-milter.conf
 %attr(754,root,root) /etc/rc.d/init.d/clamav-milter
 #%attr(755,root,root) %{_sysconfdir}/cron.daily/clamav-milter
-#%attr(755,root,root) %{_sysconfdir}/log.d/scripts/services/clamav-milter
-#%{_sysconfdir}/log.d/conf/services/clamav-milter.conf
 %attr(755,root,root) %{_sbindir}/clamav-milter
-%{_mandir}/man5/clamav-milter*
+%{_mandir}/man5/clamav-milter.conf.5*
 %{_mandir}/man8/clamav-milter.8*
 %attr(700,clamav,clamav) /var/spool/clamav
 %endif
diff --git a/ac2.68.patch b/ac2.68.patch
index a352068..a2dd5a9 100644
--- a/ac2.68.patch
+++ b/ac2.68.patch
@@ -17,6 +17,15 @@ diff -uNr clamav-0.98.3/configure.ac clamav-0.98.3-ac2.68/configure.ac
  m4_include([m4/reorganization/headers.m4])
  
  AC_CONFIG_FILES([libltdl/Makefile])
+@@ -396,7 +396,7 @@
+     ])
+ fi
+ 
+-if test "x$clamonacc-curl" = "xdeprecated"; then
++if test "x$clamonacc_curl" = "xdeprecated"; then
+     AC_MSG_WARN([m4_normalize([
+ ****** your libcurl (e.g. libcurl-devel) is older than the recommended version. Installing ClamAV with clamonacc requires libcurl 7.40 or higher to use fdpassing.
+ ****** fdpassing with clamonacc will be disabled on your system.
 diff -uNr clamav-0.98.3/m4/reorganization/build_tools.m4 clamav-0.98.3-ac2.68/m4/reorganization/build_tools.m4
 --- clamav-0.98.3/m4/reorganization/build_tools.m4	2014-05-06 20:39:56.000000000 +0200
 +++ clamav-0.98.3-ac2.68/m4/reorganization/build_tools.m4	2014-05-09 10:53:30.800262620 +0200
@@ -26,13 +35,12 @@ diff -uNr clamav-0.98.3/m4/reorganization/build_tools.m4 clamav-0.98.3-ac2.68/m4
  AC_PROG_CC
  AC_PROG_INSTALL
  AC_PROG_LN_S
-diff -uNr clamav-0.98.3/m4/reorganization/clamdtop.m4 clamav-0.98.3-ac2.68/m4/reorganization/clamdtop.m4
---- clamav-0.98.3/m4/reorganization/clamdtop.m4	2014-05-06 20:39:56.000000000 +0200
-+++ clamav-0.98.3-ac2.68/m4/reorganization/clamdtop.m4	2014-05-09 10:51:06.963907781 +0200
-@@ -6,8 +6,8 @@
- if test "$enable_clamdtop" != "no"; then
+--- clamav-0.103.0/m4/reorganization/clamdtop.m4.orig	2020-09-13 02:27:10.000000000 +0200
++++ clamav-0.103.0/m4/reorganization/clamdtop.m4	2020-11-23 06:28:37.380116770 +0100
+@@ -13,8 +13,8 @@
  
- AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
+ if test "X$HAVE_LIBNCURSES" != "Xyes"; then
+     AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
 -	    AC_LANG_PROGRAM([#include <ncurses/ncurses.h>],
 -			    [initscr(); KEY_RESIZE;]),
 +	    [AC_LANG_PROGRAM([#include <ncurses/ncurses.h>],
@@ -40,7 +48,7 @@ diff -uNr clamav-0.98.3/m4/reorganization/clamdtop.m4 clamav-0.98.3-ac2.68/m4/re
  	    [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
  	     CURSES_INCLUDE="<ncurses/ncurses.h>"],
  	    [])
-@@ -15,8 +15,8 @@
+@@ -23,8 +23,8 @@
  if test "X$HAVE_LIBNCURSES" != "Xyes"; then
      HAVE_LIBNCURSES=
      AC_LIB_FIND([ncurses], [ncurses.h],
@@ -51,7 +59,7 @@ diff -uNr clamav-0.98.3/m4/reorganization/clamdtop.m4 clamav-0.98.3-ac2.68/m4/re
  	    [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
  	     CURSES_INCLUDE="<ncurses.h>"],
  	    [])
-@@ -24,8 +24,8 @@
+@@ -32,8 +32,8 @@
  
  if test "X$HAVE_LIBNCURSES" != "Xyes"; then
      AC_LIB_FIND([pdcurses],[curses.h],
@@ -74,3 +82,21 @@ diff -uNr clamav-0.98.3/m4/reorganization/code_checks/unit_tests.m4 clamav-0.98.
  			[CHECK_CPPFLAGS="$INCCHECK"; CHECK_LIBS="$LTLIBCHECK $LDFLAGS"],
  			[])
  
+--- clamav-0.103.0/m4/reorganization/libs/curl.m4.orig	2020-09-13 02:27:10.000000000 +0200
++++ clamav-0.103.0/m4/reorganization/libs/curl.m4	2020-11-23 20:23:04.812211547 +0100
+@@ -64,12 +64,12 @@
+     dnl end of section
+ 
+     AM_COND_IF([BUILD_CLAMONACC],
+-        $enable_clamonacc="yes"
++        enable_clamonacc="yes"
+ 
+-        clamonacc_curl = "current"
++        clamonacc_curl="current"
+         dnl if version less than to (7.40 0x072800)
+         [if test $curl_version -lt 468992; then
+-          clamonacc_curl = "deprecated" 
++          clamonacc_curl="deprecated" 
+         fi]
+     )
+ 
diff --git a/clamav-add-support-for-system-tomsfastmath.patch b/clamav-add-support-for-system-tomsfastmath.patch
index 31a841e..8dca9c1 100644
--- a/clamav-add-support-for-system-tomsfastmath.patch
+++ b/clamav-add-support-for-system-tomsfastmath.patch
@@ -33,33 +33,30 @@ index 9ef4105..a286b44 100644
  
  # 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 \
+--- clamav-0.103.0/libclamav/Makefile.am.orig	2020-09-13 02:27:09.000000000 +0200
++++ clamav-0.103.0/libclamav/Makefile.am	2020-11-23 06:32:13.715611447 +0100
+@@ -588,7 +588,10 @@
  	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\
++libclamav_la_SOURCES += \
+ 	bignum_fast.h\
+ 	tomsfastmath/addsub/fp_add.c\
+ 	tomsfastmath/addsub/fp_add_d.c\
+@@ -671,6 +674,10 @@
+ 	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
+ .PHONY2: version.h.tmp
  version.c: version.h
 diff --git a/libclamav/bignum.h b/libclamav/bignum.h
 index 9acb17b..56967b1 100644
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/clamav.git/commitdiff/8cdcf5e041a72942ef3a97a6a3381162c9f0f0d9



More information about the pld-cvs-commit mailing list