gnu: clamav: Update to 0.101.1.
* gnu/packages/antivirus.scm (clamav): Update to 0.101.1. [source]: Delete bundled tomsfastmath outright. [native-inputs]: Remove bison and flex. [inputs]: Switch to pcre2. * gnu/packages/patches/clamav-system-tomsfastmath.patch: Update.
This commit is contained in:
parent
545383fd04
commit
fcab568dea
2 changed files with 65 additions and 56 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2016, 2017, 2018 Eric Bavier <bavier@member.fsf.org>
|
;;; Copyright © 2016, 2017, 2018 Eric Bavier <bavier@member.fsf.org>
|
||||||
;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
|
;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
|
||||||
|
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
|
@ -43,45 +44,43 @@
|
||||||
(define-public clamav
|
(define-public clamav
|
||||||
(package
|
(package
|
||||||
(name "clamav")
|
(name "clamav")
|
||||||
(version "0.100.2")
|
(version "0.101.1")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://www.clamav.net/downloads/production/"
|
(uri (string-append "https://www.clamav.net/downloads/production/"
|
||||||
"clamav-" version ".tar.gz"))
|
"clamav-" version ".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1mkd41sxbjkfjinpx5b9kb85q529gj2s3d0klysssqhysh64ybja"))
|
"01mq3z04fjbq5iq8wfwfim72iv3dn04d3ishc5lkhxpmnalqydps"))
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet
|
(snippet
|
||||||
'(begin
|
'(begin
|
||||||
(for-each delete-file-recursively
|
(for-each delete-file-recursively
|
||||||
'("win32" ;unnecessary
|
'("win32" ; unnecessary
|
||||||
"libclamav/c++/llvm" ;use system llvm
|
"libclamav/c++/llvm" ; use system llvm
|
||||||
"libclamunrar")))) ;non-free license
|
"libclamav/tomsfastmath" ; use system tomsfastmath
|
||||||
|
"libclamunrar")))) ; non-free license
|
||||||
(patches
|
(patches
|
||||||
(search-patches "clamav-system-tomsfastmath.patch"
|
(search-patches "clamav-system-tomsfastmath.patch"
|
||||||
"clamav-config-llvm-libs.patch"))))
|
"clamav-config-llvm-libs.patch"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("bison" ,bison)
|
`(("autoconf" ,autoconf)
|
||||||
("check" ,check) ;for tests
|
|
||||||
("flex" ,flex)
|
|
||||||
("pkg-config" ,pkg-config)
|
|
||||||
;; The tomsfastmath patch touches configure.ac and Makefile.am
|
|
||||||
("autoconf" ,autoconf)
|
|
||||||
("automake" ,automake)
|
("automake" ,automake)
|
||||||
("libtool" ,libtool)))
|
("check" ,check) ; for tests
|
||||||
|
("libtool" ,libtool)
|
||||||
|
("pkg-config" ,pkg-config)))
|
||||||
(inputs
|
(inputs
|
||||||
`(("bzip2" ,bzip2)
|
`(("bzip2" ,bzip2)
|
||||||
("libcurl" ,curl)
|
("libcurl" ,curl)
|
||||||
("libjson" ,json-c)
|
("libjson" ,json-c)
|
||||||
("libltdl" ,libltdl)
|
("libltdl" ,libltdl)
|
||||||
("libmspack" ,libmspack)
|
("libmspack" ,libmspack)
|
||||||
("llvm" ,llvm-3.6) ;requires <3.7, for JIT/verifier
|
("llvm" ,llvm-3.6) ; requires <3.7, for JIT/verifier
|
||||||
("ncurses" ,ncurses)
|
("ncurses" ,ncurses)
|
||||||
("openssl" ,libressl)
|
("openssl" ,libressl)
|
||||||
("pcre" ,pcre "bin") ;for pcre-config
|
("pcre2" ,pcre2)
|
||||||
("sasl" ,cyrus-sasl) ;for linking curl with libtool
|
("sasl" ,cyrus-sasl) ; for linking curl with libtool
|
||||||
("tomsfastmath" ,tomsfastmath)
|
("tomsfastmath" ,tomsfastmath)
|
||||||
("xml" ,libxml2)
|
("xml" ,libxml2)
|
||||||
("zlib" ,zlib)))
|
("zlib" ,zlib)))
|
||||||
|
|
@ -99,7 +98,7 @@
|
||||||
(with "xml")
|
(with "xml")
|
||||||
(with "openssl")
|
(with "openssl")
|
||||||
(with "libjson")
|
(with "libjson")
|
||||||
(with "pcre")
|
(with "pcre2")
|
||||||
(with "zlib")
|
(with "zlib")
|
||||||
(with "libcurl")
|
(with "libcurl")
|
||||||
;; For sanity, specifying --enable-* flags turns
|
;; For sanity, specifying --enable-* flags turns
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
|
From: Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
|
Date: Sun, 24 Feb 2019 15:50:37 +0100
|
||||||
|
Subject: gnu: clamav: Add support for system tomsfastmath.
|
||||||
|
|
||||||
|
Adjusted from the original for clamav 0.101.1:
|
||||||
|
|
||||||
From 756ff89526b5ffaa7a4f49b1bbecf2ecbd6f85f9 Mon Sep 17 00:00:00 2001
|
From 756ff89526b5ffaa7a4f49b1bbecf2ecbd6f85f9 Mon Sep 17 00:00:00 2001
|
||||||
From: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
|
From: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
|
||||||
Date: Wed, 11 Mar 2015 20:03:15 +0100
|
Date: Wed, 11 Mar 2015 20:03:15 +0100
|
||||||
|
|
@ -13,17 +19,17 @@ Patch-Name: add-support-for-system-tomsfastmath.patch
|
||||||
5 files changed, 28 insertions(+), 4 deletions(-)
|
5 files changed, 28 insertions(+), 4 deletions(-)
|
||||||
create mode 100644 m4/reorganization/libs/tomsfastmath.m4
|
create mode 100644 m4/reorganization/libs/tomsfastmath.m4
|
||||||
|
|
||||||
--- a/configure.ac
|
--- a/configure.ac 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac 2019-02-24 15:47:14.076992864 +0100
|
||||||
@@ -82,6 +82,7 @@ m4_include([m4/reorganization/libs/xml.m
|
@@ -89,6 +89,7 @@
|
||||||
m4_include([m4/reorganization/libs/openssl.m4])
|
|
||||||
m4_include([m4/reorganization/libs/json.m4])
|
m4_include([m4/reorganization/libs/json.m4])
|
||||||
m4_include([m4/reorganization/libs/pcre.m4])
|
m4_include([m4/reorganization/libs/pcre.m4])
|
||||||
|
m4_include([m4/reorganization/libs/libmspack.m4])
|
||||||
+m4_include([m4/reorganization/libs/tomsfastmath.m4])
|
+m4_include([m4/reorganization/libs/tomsfastmath.m4])
|
||||||
|
|
||||||
AM_MAINTAINER_MODE
|
if test "x$use_internal_mspack" = "xno"; then
|
||||||
m4_include([m4/reorganization/libs/libz.m4])
|
mspack_msg="External, $LIBMSPACK_CFLAGS $LIBMSPACK_LIBS"
|
||||||
@@ -285,6 +286,7 @@ else
|
@@ -297,6 +298,7 @@
|
||||||
fi
|
fi
|
||||||
CL_MSG_STATUS([yara ],[$enable_yara],[$enable_yara])
|
CL_MSG_STATUS([yara ],[$enable_yara],[$enable_yara])
|
||||||
CL_MSG_STATUS([fts ],[yes],[$lfs_fts_msg])
|
CL_MSG_STATUS([fts ],[yes],[$lfs_fts_msg])
|
||||||
|
|
@ -31,34 +37,9 @@ Patch-Name: add-support-for-system-tomsfastmath.patch
|
||||||
|
|
||||||
|
|
||||||
# Yep, downgrading the compiler avoids the bug too:
|
# Yep, downgrading the compiler avoids the bug too:
|
||||||
--- a/libclamav/Makefile.am
|
diff -Naur clamav-0.101.1/libclamav/bignum.h clamav-0.101.1b/libclamav/bignum.h
|
||||||
+++ b/libclamav/Makefile.am
|
--- a/libclamav/bignum.h 1970-01-01 01:00:00.000000000 +0100
|
||||||
@@ -496,8 +496,10 @@ libclamav_la_SOURCES += yara_arena.c \
|
+++ b/libclamav/bignum.h 2019-02-24 15:46:36.216998323 +0100
|
||||||
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
|
|
||||||
--- a/libclamav/bignum.h
|
|
||||||
+++ b/libclamav/bignum.h
|
|
||||||
@@ -1,9 +1,13 @@
|
@@ -1,9 +1,13 @@
|
||||||
#ifndef BIGNUM_H_
|
#ifndef BIGNUM_H_
|
||||||
#define BIGNUM_H_
|
#define BIGNUM_H_
|
||||||
|
|
@ -74,9 +55,37 @@ Patch-Name: add-support-for-system-tomsfastmath.patch
|
||||||
typedef fp_int mp_int;
|
typedef fp_int mp_int;
|
||||||
#define mp_cmp fp_cmp
|
#define mp_cmp fp_cmp
|
||||||
#define mp_toradix_n(a,b,c,d) fp_toradix_n(a,b,c,d)
|
#define mp_toradix_n(a,b,c,d) fp_toradix_n(a,b,c,d)
|
||||||
--- a/libclamav/xdp.c
|
diff -Naur clamav-0.101.1/libclamav/Makefile.am clamav-0.101.1b/libclamav/Makefile.am
|
||||||
+++ b/libclamav/xdp.c
|
--- a/libclamav/Makefile.am 1970-01-01 01:00:00.000000000 +0100
|
||||||
@@ -57,7 +57,7 @@
|
+++ b/libclamav/Makefile.am 2019-02-24 15:46:36.216998323 +0100
|
||||||
|
@@ -597,8 +597,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\
|
||||||
|
@@ -680,6 +682,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
|
||||||
|
version.c: version.h
|
||||||
|
diff -Naur clamav-0.101.1/libclamav/xdp.c clamav-0.101.1b/libclamav/xdp.c
|
||||||
|
--- a/libclamav/xdp.c 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ b/libclamav/xdp.c 2019-02-24 15:46:36.216998323 +0100
|
||||||
|
@@ -52,7 +52,7 @@
|
||||||
#include "scanners.h"
|
#include "scanners.h"
|
||||||
#include "conv.h"
|
#include "conv.h"
|
||||||
#include "xdp.h"
|
#include "xdp.h"
|
||||||
|
|
@ -85,8 +94,9 @@ Patch-Name: add-support-for-system-tomsfastmath.patch
|
||||||
#include "filetypes.h"
|
#include "filetypes.h"
|
||||||
|
|
||||||
static char *dump_xdp(cli_ctx *ctx, const char *start, size_t sz);
|
static char *dump_xdp(cli_ctx *ctx, const char *start, size_t sz);
|
||||||
--- /dev/null
|
diff -Naur clamav-0.101.1/m4/reorganization/libs/tomsfastmath.m4 clamav-0.101.1b/m4/reorganization/libs/tomsfastmath.m4
|
||||||
+++ b/m4/reorganization/libs/tomsfastmath.m4
|
--- a/m4/reorganization/libs/tomsfastmath.m4 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ b/m4/reorganization/libs/tomsfastmath.m4 2019-02-24 15:46:36.216998323 +0100
|
||||||
@@ -0,0 +1,12 @@
|
@@ -0,0 +1,12 @@
|
||||||
+dnl Check for system tomsfastmath
|
+dnl Check for system tomsfastmath
|
||||||
+PKG_CHECK_MODULES([TOMSFASTMATH], [tomsfastmath], [have_system_tomsfastmath=yes], [have_system_tomsfastmath=no])
|
+PKG_CHECK_MODULES([TOMSFASTMATH], [tomsfastmath], [have_system_tomsfastmath=yes], [have_system_tomsfastmath=no])
|
||||||
|
|
|
||||||
Reference in a new issue