diff options
author | GoliathLabs | 2020-06-13 19:09:56 +0200 |
---|---|---|
committer | GoliathLabs | 2020-06-13 19:09:56 +0200 |
commit | 57ae52d651e22a21024dc8d3a7427bca7fa8370c (patch) | |
tree | a719d37d1be0090e96c6ea7c16edaab70dc84cb6 | |
parent | 210bd9b82b5e8c98fb07541a18b63a492200c0b4 (diff) | |
download | aur-57ae52d651e22a21024dc8d3a7427bca7fa8370c.tar.gz |
Updated: 0.102.3
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | PKGBUILD | 109 | ||||
-rw-r--r-- | clamav.logrotate | 11 | ||||
-rw-r--r-- | clamav.sysusers | 1 | ||||
-rw-r--r-- | clamav.tmpfiles | 3 | ||||
-rw-r--r-- | make_it_compile_against_openssl_1_1_0.patch | 98 |
6 files changed, 116 insertions, 143 deletions
@@ -1,23 +1,38 @@ -# Generated by mksrcinfo v8 -# Tue Jun 20 09:20:18 UTC 2017 pkgbase = clamav-light - pkgdesc = ClamAV manual scanner - pkgver = 0.99.2 + pkgdesc = Anti-virus toolkit for Unix + pkgver = 0.102.3 pkgrel = 1 - url = http://www.clamav.net/ + url = https://www.clamav.net/ arch = i686 arch = x86_64 license = GPL - makedepends = intltool - makedepends = autoconf + checkdepends = check + makedepends = libmilter + makedepends = systemd depends = bzip2 depends = gcc-libs depends = libltdl + depends = systemd-libs + provides = libclamav.so + provides = libclamunrar.so + provides = libclamunrar_iface.so + provides = clamav conflicts = clamav - 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 + backup = etc/clamav/clamd.conf + backup = etc/clamav/freshclam.conf + backup = etc/clamav/clamav-milter.conf + backup = etc/logrotate.d/clamav + source = https://www.clamav.net/downloads/production/clamav-0.102.3.tar.gz + source = https://www.clamav.net/downloads/production/clamav-0.102.3.tar.gz.sig + source = clamav.logrotate + source = clamav.tmpfiles + source = clamav.sysusers + validpgpkeys = 65ED513993F08DA06F9639A6F13F9E16BCA5BFAD + sha512sums = d239718814b303fb0f1655d9bdaf3675d888eea57e786d927eafabb7b6f58cd7f5fb7dc149511c2af6f800dcc919f2e1d6954110d45b9e16619c632e8d2b37f2 + sha512sums = SKIP + sha512sums = 9cb168c1c16bb43c99900d7ef34456e3f3b593d4d1943c875a0306bc86fd3872cb78e9e1413dcba93579e01b96d466c9eea1975e24190193663b7986c4525d48 + sha512sums = c5443634399bd87fe0d0192518538ffdb7296a8437b5b0160a0fbd58696b01285de3237e3feb552c0095c49e576832dec2e2b2107eef2be42424ed7edd13cd19 + sha512sums = b984836f6c34d97b90d81fa5d17361a2e3f8c0cc709e3350a4d25cf088dc04f7bf2504359980c8be489c96b1b8798c60e6da533069d3378d49d4f50f929a2c90 pkgname = clamav-light @@ -1,48 +1,89 @@ -# Maintainer: Steven Honeyman <stevenhoneyman at gmail com> +# Maintainer: Felix Golatofski <contact@xdfr.de> +# Contributor: Steven Honeyman <stevenhoneyman at gmail com> -pkgname=clamav-light _pkgname=clamav -pkgver=0.99.2 +pkgname=$_pkgname-light +pkgver=0.102.3 pkgrel=1 -pkgdesc="ClamAV manual scanner" -arch=('i686' 'x86_64') -url="http://www.clamav.net/" +pkgdesc='Anti-virus toolkit for Unix' +url='https://www.clamav.net/' license=('GPL') -depends=('bzip2' 'gcc-libs' 'libltdl') -makedepends=('intltool' 'autoconf') +arch=('i686' 'x86_64') +depends=('bzip2' 'gcc-libs' 'libltdl' 'systemd-libs') +makedepends=('libmilter' 'systemd') +checkdepends=('check') +backup=('etc/clamav/clamd.conf' + 'etc/clamav/freshclam.conf' + 'etc/clamav/clamav-milter.conf' + 'etc/logrotate.d/clamav') conflicts=('clamav') -source=("https://www.clamav.net/downloads/production/${_pkgname}-${pkgver}.tar.gz" - 'make_it_compile_against_openssl_1_1_0.patch') -sha256sums=('167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a' - '0a8e02a91bc3f2c99bd52dc475592637376baa991fe3f899b7745b840fc586c5') +provides=(libclamav.so libclamunrar.so libclamunrar_iface.so clamav) +source=(https://www.clamav.net/downloads/production/${_pkgname}-${pkgver}.tar.gz{,.sig} + clamav.logrotate + clamav.tmpfiles + clamav.sysusers) +sha512sums=('d239718814b303fb0f1655d9bdaf3675d888eea57e786d927eafabb7b6f58cd7f5fb7dc149511c2af6f800dcc919f2e1d6954110d45b9e16619c632e8d2b37f2' + 'SKIP' + '9cb168c1c16bb43c99900d7ef34456e3f3b593d4d1943c875a0306bc86fd3872cb78e9e1413dcba93579e01b96d466c9eea1975e24190193663b7986c4525d48' + 'c5443634399bd87fe0d0192518538ffdb7296a8437b5b0160a0fbd58696b01285de3237e3feb552c0095c49e576832dec2e2b2107eef2be42424ed7edd13cd19' + 'b984836f6c34d97b90d81fa5d17361a2e3f8c0cc709e3350a4d25cf088dc04f7bf2504359980c8be489c96b1b8798c60e6da533069d3378d49d4f50f929a2c90') +validpgpkeys=('65ED513993F08DA06F9639A6F13F9E16BCA5BFAD') # Talos (Talos, Cisco Systems Inc.) <research@sourcefire.com> 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 + cd ${_pkgname}-${pkgver} + sed -E 's|^(Example)$|#\1|' -i etc/{clamd,freshclam,clamav-milter}.conf.sample + sed -E 's|#(User) .+|\1 clamav|' -i etc/{clamd,freshclam,clamav-milter}.conf.sample + sed -E 's|#(LogFile) .+|\1 /var/log/clamav/clamd.log|' -i etc/clamd.conf.sample + sed -E 's|#(LogTime) .+|\1 yes|' -i etc/clamd.conf.sample etc/clamav-milter.conf.sample + sed -E 's|#(PidFile) .+|\1 /run/clamav/clamd.pid|' -i etc/clamd.conf.sample + sed -E 's|#(TemporaryDirectory) .+|\1 /tmp|' -i etc/{clamd,clamav-milter}.conf.sample + sed -E 's|#(LocalSocket) .+|\1 /run/clamav/clamd.ctl|' -i etc/clamd.conf.sample + sed -E 's|#(UpdateLogFile) .+|\1 /var/log/clamav/freshclam.log|' -i etc/freshclam.conf.sample + sed -E 's|#(DatabaseMirror) .+|\1 database.clamav.net|' -i etc/freshclam.conf.sample + sed -E 's|#(NotifyClamd) .+|\1 /etc/clamav/clamd.conf|' -i etc/freshclam.conf.sample + sed -E 's|#(PidFile) .+|\1 /run/clamav/freshclam.pid|' -i etc/freshclam.conf.sample + sed -E 's|#(LogFile) .+|\1 /var/log/clamav/clamav-milter.log|' -i etc/clamav-milter.conf.sample + sed -E 's|#(PidFile) .+|\1 /run/clamav/clamav-milter.pid|' -i etc/clamav-milter.conf.sample + sed -E "s|(\\[Unit\\])|\\1\\nWants=network-online.target\\nAfter=network-online.target|" -i freshclam/clamav-freshclam.service.in + autoreconf -fiv } - build() { - cd "$srcdir/$_pkgname-$pkgver" - ./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-zlib-vcheck - make + cd ${_pkgname}-${pkgver} + # --disable-zlib-vcheck because the configure script thinks that + # zlib 1.2.11 is older than 1.2.2 + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc/clamav \ + --with-dbdir=/var/lib/clamav \ + --with-user=clamav \ + --with-group=clamav \ + --with-system-libmspack \ + --disable-rpath \ + --disable-clamav \ + --disable-llvm \ + --disable-zlib-vcheck \ + --enable-milter \ + --disable-clamdtop + + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + make +} + +check() { + cd ${_pkgname}-${pkgver} + make check } package() { - cd "$srcdir/clamav-$pkgver" - mkdir -p -m755 "$pkgdir/etc" - mkdir -p -m777 "$pkgdir/var/lib/clamav" - make DESTDIR="$pkgdir" install-strip + cd ${_pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + + mv "${pkgdir}"/etc/clamav/freshclam.conf{.sample,} + mv "${pkgdir}"/etc/clamav/clamd.conf{.sample,} + mv "${pkgdir}"/etc/clamav/clamav-milter.conf{.sample,} - # config file for freshclam - echo "IyBmcmVzaGNsYW0gY29uZmlnIGZpbGUgKGNsYW1B - VikKCkRhdGFiYXNlRGlyZWN0b3J5IC92YXIvbGli - L2NsYW1hdgpEYXRhYmFzZU1pcnJvciBkYXRhYmFz - ZS5jbGFtYXYubmV0CkZvcmVncm91bmQgeWVzClRl - c3REYXRhYmFzZXMgeWVzCg==" | tr -d " " | base64 -d >"$pkgdir/etc/freshclam.conf" + install -Dm 644 ../clamav.sysusers "${pkgdir}"/usr/lib/sysusers.d/clamav.conf + install -Dm 644 ../clamav.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/clamav.conf + install -Dm 644 ../clamav.logrotate "${pkgdir}"/etc/logrotate.d/clamav } diff --git a/clamav.logrotate b/clamav.logrotate new file mode 100644 index 000000000000..d8564b64cf39 --- /dev/null +++ b/clamav.logrotate @@ -0,0 +1,11 @@ +/var/log/clamav/clamd.log /var/log/clamav/freshclam.log /var/log/clamav/clamav-milter.log { + create 644 clamav clamav + sharedscripts + missingok + notifempty + postrotate + /bin/kill -HUP `cat /run/clamav/clamd.pid 2>/dev/null` 2> /dev/null || true + /bin/kill -HUP `cat /run/clamav/freshclam.pid 2>/dev/null` 2> /dev/null || true + /bin/kill -HUP `cat /run/clamav/clamav-milter.pid 2>/dev/null` 2> /dev/null || true + endscript +} diff --git a/clamav.sysusers b/clamav.sysusers new file mode 100644 index 000000000000..e20c16b6c607 --- /dev/null +++ b/clamav.sysusers @@ -0,0 +1 @@ +u clamav 64 "Clam AntiVirus" - diff --git a/clamav.tmpfiles b/clamav.tmpfiles new file mode 100644 index 000000000000..38124af3bda7 --- /dev/null +++ b/clamav.tmpfiles @@ -0,0 +1,3 @@ +d /run/clamav 0755 clamav clamav +d /var/log/clamav 0755 clamav clamav +d /var/lib/clamav 0755 clamav clamav diff --git a/make_it_compile_against_openssl_1_1_0.patch b/make_it_compile_against_openssl_1_1_0.patch deleted file mode 100644 index 2974fe5f87d0..000000000000 --- a/make_it_compile_against_openssl_1_1_0.patch +++ /dev/null @@ -1,98 +0,0 @@ -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]) - |