[packages/clamav] - updated to 0.98.3 - clamav-notify-error patch applied upstream - am-nosilentrules patch is AC spec

kiesiu kiesiu at pld-linux.org
Fri May 9 11:49:46 CEST 2014


commit e335899e19b7a6ed560cbe9f57c9391b7209c4b8
Author: Łukasz Kieś <kiesiu at pld-linux.org>
Date:   Fri May 9 11:47:25 2014 +0200

    - updated to 0.98.3
    - clamav-notify-error patch applied upstream
    - am-nosilentrules patch is AC specific
    - ported all autotools patches to new building system - NFY; rel. 0.1

 ac2.68.patch              | 68 +++++++++++++++++++----------------
 am-nosilentrules.patch    |  4 +--
 clamav-nolibs.patch       |  9 +++--
 clamav-notify-error.patch | 91 -----------------------------------------------
 clamav.spec               | 20 ++++++-----
 5 files changed, 56 insertions(+), 136 deletions(-)
---
diff --git a/clamav.spec b/clamav.spec
index e95c530..332efad 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -13,12 +13,12 @@
 Summary:	An anti-virus utility for Unix
 Summary(pl.UTF-8):	Narzędzie antywirusowe dla Uniksów
 Name:		clamav
-Version:	0.98.1
-Release:	2
+Version:	0.98.3
+Release:	0.1
 License:	GPL v2+
 Group:		Daemons
 Source0:	http://downloads.sourceforge.net/clamav/%{name}-%{version}.tar.gz
-# Source0-md5:	b1ec7b19dea8385954515ef1d63576d8
+# Source0-md5:	b649d35ee85d4d6075a98173dd255c17
 Source1:	%{name}.init
 Source2:	%{name}.sysconfig
 Source3:	%{name}-milter.init
@@ -30,22 +30,25 @@ Source10:	%{name}.tmpfiles
 Source11:	clamd.service
 Patch0:		%{name}-pld_config.patch
 Patch1:		%{name}-nolibs.patch
+%if "%{pld_release}" == "ac"
 Patch2:		am-nosilentrules.patch
+%endif
 Patch3:		ac2.68.patch
-Patch4:		%{name}-notify-error.patch
 URL:		http://www.clamav.net/
 BuildRequires:	autoconf
 BuildRequires:	automake
 BuildRequires:	bzip2-devel
+BuildRequires:	curl-devel
 BuildRequires:	gmp-devel
 BuildRequires:	libltdl-devel
 %{?with_milter:BuildRequires:	libmilter-devel}
 BuildRequires:	libstdc++-devel
 BuildRequires:	libtool
-BuildRequires:	llvm-devel
 %{?with_milter:BuildRequires:	libwrap-devel}
+BuildRequires:	llvm-devel
 %{?with_llvm:BuildRequires:	llvm-devel}
 BuildRequires:	ncurses-devel
+BuildRequires:	openssl-devel
 BuildRequires:	rpm >= 4.4.9-56
 BuildRequires:	rpmbuild(macros) >= 1.647
 BuildRequires:	zlib-devel
@@ -162,9 +165,10 @@ Biblioteki statyczne clamav.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%if "%{pld_release}" == "ac"
 %patch2 -p1
+%endif
 %patch3 -p1
-%patch4 -p1
 
 %build
 %{__libtoolize}
@@ -215,9 +219,9 @@ cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
 
 install -p %{SOURCE8} $RPM_BUILD_ROOT%{_sbindir}
 
-install %{SOURCE10} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
+cp -p %{SOURCE10} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
-install %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}
+cp -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}
 
 # NOTE: clamd uses sane rights to it's clamd.pid file
 # So better keep it dir
diff --git a/ac2.68.patch b/ac2.68.patch
index 44362ec..70718e8 100644
--- a/ac2.68.patch
+++ b/ac2.68.patch
@@ -1,25 +1,33 @@
-diff -ur clamav-0.97.5/configure.ac clamav-0.97.5-am/configure.ac
---- clamav-0.97.5/configure.ac	2012-06-28 11:10:46.795377403 +0200
-+++ clamav-0.97.5-am/configure.ac	2012-06-28 11:01:44.658245193 +0200
-@@ -54,6 +54,8 @@
- AC_PROG_INSTALL
- AC_PROG_LN_S
- AC_PROG_MAKE_SET
-+AM_PROG_AR
-+AM_PROG_CC_C_O
+diff -uNr clamav-0.98.3/configure.ac clamav-0.98.3-ac2.68/configure.ac
+--- clamav-0.98.3/configure.ac	2014-05-06 20:42:41.000000000 +0200
++++ clamav-0.98.3-ac2.68/configure.ac	2014-05-09 10:51:30.508280355 +0200
+@@ -42,12 +42,12 @@
+ AC_DEFINE([PACKAGE], PACKAGE_NAME, [Name of package])
+ 
+ m4_include([m4/reorganization/version.m4])
++m4_include([m4/reorganization/build_tools.m4])
  
  LT_CONFIG_LTDL_DIR([libltdl])
  LT_INIT([dlopen disable-static])
-@@ -469,7 +471,7 @@
+ LTDL_INIT([recursive])
  
- if test "$enable_check_ut" != "no" ; then
- 	AC_LIB_FIND([check],[check.h],
--			AC_LANG_PROGRAM([#include <check.h>],[srunner_create(0)]),
-+			[AC_LANG_PROGRAM([#include <check.h>],[srunner_create(0)])],
- 			[CHECK_CPPFLAGS="$INCCHECK"; CHECK_LIBS="$LTLIBCHECK"],
- 			[])
- fi
-@@ -1549,8 +1551,8 @@
+-m4_include([m4/reorganization/build_tools.m4])
+ m4_include([m4/reorganization/headers.m4])
+ 
+ AC_CONFIG_FILES([libltdl/Makefile])
+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
+@@ -1,3 +1,5 @@
++AM_PROG_AR
++AM_PROG_CC_C_O
+ 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
  
  AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
@@ -30,7 +38,7 @@ diff -ur clamav-0.97.5/configure.ac clamav-0.97.5-am/configure.ac
  	    [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
  	     CURSES_INCLUDE="<ncurses/ncurses.h>"],
  	    [])
-@@ -1558,8 +1560,8 @@
+@@ -15,8 +15,8 @@
  if test "X$HAVE_LIBNCURSES" != "Xyes"; then
      HAVE_LIBNCURSES=
      AC_LIB_FIND([ncurses], [ncurses.h],
@@ -41,7 +49,7 @@ diff -ur clamav-0.97.5/configure.ac clamav-0.97.5-am/configure.ac
  	    [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
  	     CURSES_INCLUDE="<ncurses.h>"],
  	    [])
-@@ -1567,8 +1569,8 @@
+@@ -24,8 +24,8 @@
  
  if test "X$HAVE_LIBNCURSES" != "Xyes"; then
      AC_LIB_FIND([pdcurses],[curses.h],
@@ -52,15 +60,15 @@ diff -ur clamav-0.97.5/configure.ac clamav-0.97.5-am/configure.ac
  			    [CURSES_CPPFLAGS="$INCPDCURSES";
  			     CURSES_LIBS="$LTLIBPDCURSES";
  			     CURSES_INCLUDE="<curses.h>"],
-
---- clamav-0.98/configure.ac~	2013-10-14 20:17:59.000000000 +0200
-+++ clamav-0.98/configure.ac	2013-10-14 20:19:05.824615211 +0200
-@@ -34,7 +34,7 @@
+diff -uNr clamav-0.98.3/m4/reorganization/code_checks/unit_tests.m4 clamav-0.98.3-ac2.68/m4/reorganization/code_checks/unit_tests.m4
+--- clamav-0.98.3/m4/reorganization/code_checks/unit_tests.m4	2014-05-06 20:39:56.000000000 +0200
++++ clamav-0.98.3-ac2.68/m4/reorganization/code_checks/unit_tests.m4	2014-05-09 10:51:06.963907781 +0200
+@@ -12,7 +12,7 @@
+ esac
  
- dnl -Wall and -Werror here are NOT CFLAGS, they refer to automake warnings
- dnl enable stealth builds and psychedelic tests
--AM_INIT_AUTOMAKE([1.10 -Wall -Wportability -Wno-override -Werror std-options foreign dist-bzip2 no-define tar-ustar])
-+AM_INIT_AUTOMAKE([1.10 -Wall -Wportability -Wno-override std-options foreign dist-bzip2 no-define tar-ustar])
+ 	AC_LIB_FIND([check],[check.h],
+-			AC_LANG_PROGRAM([#include <check.h>],[srunner_create(0)]),
++			[AC_LANG_PROGRAM([#include <check.h>],[srunner_create(0)])],
+ 			[CHECK_CPPFLAGS="$INCCHECK"; CHECK_LIBS="$LTLIBCHECK $LDFLAGS"],
+ 			[])
  
- dnl we told automake to not define these, since we want to include
- dnl the date in the version
diff --git a/am-nosilentrules.patch b/am-nosilentrules.patch
index 8ef38bf..418a5d0 100644
--- a/am-nosilentrules.patch
+++ b/am-nosilentrules.patch
@@ -4,9 +4,9 @@
  
  dnl -Wall and -Werror here are NOT CFLAGS, they refer to automake warnings
  dnl enable stealth builds and psychedelic tests
--AM_INIT_AUTOMAKE([1.11 -Wall -Wportability -Wno-override -Werror std-options foreign dist-bzip2 no-define color-tests parallel-tests tar-ustar])
+-AM_INIT_AUTOMAKE([1.11 -Wall -Wportability -Wno-override std-options foreign dist-bzip2 no-define color-tests parallel-tests tar-ustar])
 -AM_SILENT_RULES([yes])
-+AM_INIT_AUTOMAKE([1.10 -Wall -Wportability -Wno-override -Werror std-options foreign dist-bzip2 no-define tar-ustar])
++AM_INIT_AUTOMAKE([1.10 -Wall -Wportability -Wno-override std-options foreign dist-bzip2 no-define tar-ustar])
  
  dnl we told automake to not define these, since we want to include
  dnl the date in the version
diff --git a/clamav-nolibs.patch b/clamav-nolibs.patch
index 0d037c4..6196a05 100644
--- a/clamav-nolibs.patch
+++ b/clamav-nolibs.patch
@@ -1,8 +1,7 @@
---- clamav-0.96.1/configure.ac~	2010-05-19 14:23:09.000000000 +0200
-+++ clamav-0.96.1/configure.ac	2010-05-20 09:28:22.297294559 +0200
-@@ -430,8 +430,12 @@
- AC_SUBST([BUILD_CONFIGURE_FLAGS], [$build_configure_args])
- 
+diff -uNr clamav-0.98.3/m4/reorganization/code_checks/functions.m4 clamav-0.98.3.nolibs/m4/reorganization/code_checks/functions.m4
+--- clamav-0.98.3/m4/reorganization/code_checks/functions.m4	2014-05-06 20:39:56.000000000 +0200
++++ clamav-0.98.3.nolibs/m4/reorganization/code_checks/functions.m4	2014-05-09 10:38:20.376934561 +0200
+@@ -1,6 +1,10 @@
  AX_CHECK_UNAME_SYSCALL
 +AC_CHECK_FUNC(socket,, [
  AC_CHECK_LIB([socket], [bind], [LIBS="$LIBS -lsocket"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsocket"; CLAMD_LIBS="$CLAMD_LIBS -lsocket"])
diff --git a/clamav-notify-error.patch b/clamav-notify-error.patch
deleted file mode 100644
index 380a56f..0000000
--- a/clamav-notify-error.patch
+++ /dev/null
@@ -1,91 +0,0 @@
---- clamav-0.98.1/freshclam/notify.c.org	2014-03-15 12:30:42.386370064 +0100
-+++ clamav-0.98.1/freshclam/notify.c	2014-03-15 12:37:47.097443450 +0100
-@@ -82,8 +82,8 @@
- 
-         if ((sockd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
-         {
--            perror ("socket()");
--            logg ("^Clamd was NOT notified: Can't create socket endpoint for %s\n", opt->strarg);
-+            logg ("^Clamd was NOT notified: Can't create socket endpoint for %s: %s\n",
-+                opt->strarg, strerror(errno));
-             optfree (opts);
-             return -1;
-         }
-@@ -92,9 +92,9 @@
-             (sockd, (struct sockaddr *) &server,
-              sizeof (struct sockaddr_un)) < 0)
-         {
--            perror ("connect()");
-+            logg ("^Clamd was NOT notified: Can't connect to clamd through %s: %s\n",
-+                opt->strarg, strerror(errno));
-             closesocket (sockd);
--            logg ("^Clamd was NOT notified: Can't connect to clamd through %s\n", opt->strarg);
-             optfree (opts);
-             return -11;
-         }
-@@ -137,8 +137,7 @@
- 
-         if ((sockd = socket (res->ai_family, SOCK_STREAM, 0)) < 0)
-         {
--            perror ("socket()");
--            logg ("!%s: Can't create TCP socket\n", option);
-+            logg ("!%s: Can't create TCP socket: %s\n", option, strerror(errno));
-             optfree (opts);
-             freeaddrinfo (res);
-             return -1;
-@@ -146,10 +145,9 @@
- 
-         if (connect (sockd, res->ai_addr, res->ai_addrlen) == -1)
-         {
--            perror ("connect()");
-+            logg ("!%s: Can't connect to clamd on %s:%s: %s\n", option,
-+                  addr ? addr : "localhost", port, strerror(errno));
-             closesocket (sockd);
--            logg ("!%s: Can't connect to clamd on %s:%s\n", option,
--                  addr ? addr : "localhost", port);
-             optfree (opts);
-             freeaddrinfo (res);
-             return -1;
-@@ -160,8 +158,7 @@
- 
-         if ((sockd = socket (AF_INET, SOCK_STREAM, 0)) < 0)
-         {
--            perror ("socket()");
--            logg ("!%s: Can't create TCP socket\n", option);
-+            logg ("!%s: Can't create TCP socket: %s\n", option, strerror(errno));
-             optfree (opts);
-             return -1;
-         }
-@@ -173,8 +170,8 @@
-         {
-             if ((he = gethostbyname (opt->strarg)) == 0)
-             {
--                perror ("gethostbyname()");
--                logg ("^Clamd was NOT notified: Can't resolve hostname '%s'\n", opt->strarg);
-+                logg ("^Clamd was NOT notified: Can't resolve hostname '%s': %s\n",
-+                    opt->strarg, strerror(errno));
-                 optfree (opts);
-                 closesocket (sockd);
-                 return -1;
-@@ -189,9 +186,9 @@
-             (sockd, (struct sockaddr *) &server2,
-              sizeof (struct sockaddr_in)) < 0)
-         {
--            perror ("connect()");
-+            logg ("^Clamd was NOT notified: Can't connect to clamd on %s:%d: %s\n",
-+                inet_ntoa (server2.sin_addr), ntohs (server2.sin_port), strerror(errno));
-             closesocket (sockd);
--            logg ("^Clamd was NOT notified: Can't connect to clamd on %s:%d\n", inet_ntoa (server2.sin_addr), ntohs (server2.sin_port));
-             optfree (opts);
-             return -1;
-         }
-@@ -222,8 +219,7 @@
- 
-     if (sendln (sockd, "RELOAD", 7) < 0)
-     {
--        perror ("send()");
--        logg ("!NotifyClamd: Could not write to clamd socket\n");
-+        logg ("!NotifyClamd: Could not write to clamd socket: %s\n", strerror(errno));
-         closesocket (sockd);
-         return 1;
-     }
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list