summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Honeyman2017-06-20 10:21:10 +0100
committerSteven Honeyman2017-06-20 10:21:10 +0100
commit210bd9b82b5e8c98fb07541a18b63a492200c0b4 (patch)
tree03a03a2915a4ddef35b0bb762d7701e3805a3a29
parent3c2a2985d118eaf5ed9a2eac92c262155bcb5f00 (diff)
downloadaur-210bd9b82b5e8c98fb07541a18b63a492200c0b4.tar.gz
Version update
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD11
-rw-r--r--make_it_compile_against_openssl_1_1_0.patch98
3 files changed, 112 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9fe64f70f8b..c09336e233c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,8 @@
+# Generated by mksrcinfo v8
+# Tue Jun 20 09:20:18 UTC 2017
pkgbase = clamav-light
pkgdesc = ClamAV manual scanner
- pkgver = 0.98.4
+ pkgver = 0.99.2
pkgrel = 1
url = http://www.clamav.net/
arch = i686
@@ -12,8 +14,10 @@ pkgbase = clamav-light
depends = gcc-libs
depends = libltdl
conflicts = clamav
- source = http://downloads.sourceforge.net/clamav/clamav-0.98.4.tar.gz
- md5sums = 6d409eab6c311de05a0a591fccd2ec83
+ source = https://www.clamav.net/downloads/production/clamav-0.99.2.tar.gz
+ source = make_it_compile_against_openssl_1_1_0.patch
+ sha256sums = 167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a
+ sha256sums = 0a8e02a91bc3f2c99bd52dc475592637376baa991fe3f899b7745b840fc586c5
pkgname = clamav-light
diff --git a/PKGBUILD b/PKGBUILD
index 47feddea9da..4fc7d8b173c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=clamav-light
_pkgname=clamav
-pkgver=0.98.4
+pkgver=0.99.2
pkgrel=1
pkgdesc="ClamAV manual scanner"
arch=('i686' 'x86_64')
@@ -11,11 +11,14 @@ license=('GPL')
depends=('bzip2' 'gcc-libs' 'libltdl')
makedepends=('intltool' 'autoconf')
conflicts=('clamav')
-source=(http://downloads.sourceforge.net/$_pkgname/$_pkgname-${pkgver}.tar.gz)
-md5sums=('6d409eab6c311de05a0a591fccd2ec83')
+source=("https://www.clamav.net/downloads/production/${_pkgname}-${pkgver}.tar.gz"
+ 'make_it_compile_against_openssl_1_1_0.patch')
+sha256sums=('167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a'
+ '0a8e02a91bc3f2c99bd52dc475592637376baa991fe3f899b7745b840fc586c5')
prepare() {
cd "$srcdir/$_pkgname-$pkgver"
+ patch -Np1 -i ../make_it_compile_against_openssl_1_1_0.patch
sed -i '/clamsubmit/s/^/#/ ; /^pkgconfig/s/^/#/ ; /^bin_SCRIPTS/s/^/#/ ; s/^SUBDIRS.*/SUBDIRS = libclamav clamscan freshclam docs/' ./Makefile.am
sed -i 's/^man_MANS.*/man_MANS = man\/clamscan.1 man\/freshclam.1 man\/freshclam.conf.5/' ./docs/Makefile.am
autoreconf -fi
@@ -26,7 +29,7 @@ build() {
./configure --prefix=/usr --sysconfdir=/etc --with-dbdir=/var/lib/clamav \
--disable-clamav --enable-dns-fix --with-gnu-ld --without-included-ltdl \
--disable-milter --disable-ipv6 --disable-clamdtop --disable-fanotify \
- --disable-unrar --enable-llvm=no
+ --disable-unrar --enable-llvm=no --disable-zlib-vcheck
make
}
diff --git a/make_it_compile_against_openssl_1_1_0.patch b/make_it_compile_against_openssl_1_1_0.patch
new file mode 100644
index 00000000000..2974fe5f87d
--- /dev/null
+++ b/make_it_compile_against_openssl_1_1_0.patch
@@ -0,0 +1,98 @@
+From 088af365ce4f715b9f1d41754651e01db6ebf39a Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
+Date: Sat, 2 Jul 2016 00:12:01 +0200
+Subject: make it compile against openssl 1.1.0
+
+- SSL_library_init() is no longer a function but a define invoking
+ another function with parameters. Thus a link check against this
+ function will fail. As a fix AC_LINK_IFELSE is used so the header file
+ can be included.
+
+- X509_CRL is opaque and needs an accessor. X509_CRL_get_nextUpdate() is
+ around since OpenSSL 0.9.1c. X509_cmp_current_time() seems to be
+ around since SSLeay 0.8.1b.
+
+BTS: https://bugs.debian.org/828083
+clamav: https://bugzilla.clamav.net/show_bug.cgi?id=11594
+Patch-Name: make_it_compile_against_openssl_1_1_0.patch
+
+Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
+---
+ libclamav/crypto.c | 21 ++++++---------------
+ m4/reorganization/libs/openssl.m4 | 12 +++++++++---
+ 2 files changed, 15 insertions(+), 18 deletions(-)
+
+diff --git a/libclamav/crypto.c b/libclamav/crypto.c
+index c62c65a..4be900f 100644
+--- a/libclamav/crypto.c
++++ b/libclamav/crypto.c
+@@ -1096,7 +1096,6 @@ X509_CRL *cl_load_crl(const char *file)
+ {
+ X509_CRL *x=NULL;
+ FILE *fp;
+- struct tm *tm;
+
+ if (!(file))
+ return NULL;
+@@ -1110,21 +1109,13 @@ X509_CRL *cl_load_crl(const char *file)
+ fclose(fp);
+
+ if ((x)) {
+- tm = cl_ASN1_GetTimeT(x->crl->nextUpdate);
+- if (!(tm)) {
+- X509_CRL_free(x);
+- return NULL;
+- }
++ ASN1_TIME *tme;
+
+-#if !defined(_WIN32)
+- if (timegm(tm) < time(NULL)) {
+- X509_CRL_free(x);
+- free(tm);
+- return NULL;
+- }
+-#endif
+-
+- free(tm);
++ tme = X509_CRL_get_nextUpdate(x);
++ if (!tme || X509_cmp_current_time(tme) < 0) {
++ X509_CRL_free(x);
++ return NULL;
++ }
+ }
+
+ return x;
+diff --git a/m4/reorganization/libs/openssl.m4 b/m4/reorganization/libs/openssl.m4
+index 78e2c23..45ee02d 100644
+--- a/m4/reorganization/libs/openssl.m4
++++ b/m4/reorganization/libs/openssl.m4
+@@ -26,12 +26,13 @@ save_LDFLAGS="$LDFLAGS"
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+
+-SSL_LIBS="-lssl -lcrypto -lz"
++SSL_LIBS="$LIBS -lssl -lcrypto -lz"
++LIBS="$LIBS $SSL_LIBS"
+
+ if test "$LIBSSL_HOME" != "/usr"; then
+ SSL_LDFLAGS="-L$LIBSSL_HOME/lib"
+ SSL_CPPFLAGS="-I$LIBSSL_HOME/include"
+- LDFLAGS="-L$LIBSSL_HOME/lib $SSL_LIBS"
++ LDFLAGS="-L$LIBSSL_HOME/lib"
+ CFLAGS="$SSL_CPPFLAGS"
+ else
+ SSL_LDFLAGS=""
+@@ -41,7 +42,12 @@ fi
+ have_ssl="no"
+ have_crypto="no"
+
+-AC_CHECK_LIB([ssl], [SSL_library_init], [have_ssl="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])], [-lcrypto -lz])
++AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[#include <openssl/ssl.h>]],
++ [[SSL_library_init();]])],
++ [have_ssl="yes";],
++ [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])])
++
+
+ AC_CHECK_LIB([crypto], [EVP_EncryptInit], [have_crypto="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])], [-lcrypto -lz])
+