Date: Friday, January 26, 2018 @ 18:38:41 Author: anthraxx Revision: 315479
upgpkg: clamav 0.99.3-1 Added: clamav/trunk/clamav.install clamav/trunk/clamav.logrotate clamav/trunk/clamav.sysusers clamav/trunk/clamav.tmpfiles Modified: clamav/trunk/PKGBUILD Deleted: clamav/trunk/clamd.conf clamav/trunk/clamd.service clamav/trunk/freshclam.conf clamav/trunk/freshclamd.service clamav/trunk/install clamav/trunk/logrotate clamav/trunk/make_it_compile_against_openssl_1_1_0.patch clamav/trunk/tmpfiles.d ---------------------------------------------+ PKGBUILD | 118 +++++++++++++------------- clamav.install | 11 ++ clamav.logrotate | 11 ++ clamav.sysusers | 1 clamav.tmpfiles | 3 clamd.conf | 6 - clamd.service | 11 -- freshclam.conf | 3 freshclamd.service | 10 -- install | 9 - logrotate | 10 -- make_it_compile_against_openssl_1_1_0.patch | 98 --------------------- tmpfiles.d | 1 13 files changed, 88 insertions(+), 204 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-01-26 18:06:00 UTC (rev 315478) +++ PKGBUILD 2018-01-26 18:38:41 UTC (rev 315479) @@ -1,78 +1,84 @@ -# $Id$ +# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> # Contributor: Dale Blount <[email protected]> # Contributor: Gregor Ibic <[email protected]> -# Maintainer: Gaetan Bisson <[email protected]> +# Contributor: Gaetan Bisson <[email protected]> pkgname=clamav -pkgver=0.99.2 -pkgrel=7 +pkgver=0.99.3 +pkgrel=1 pkgdesc='Anti-virus toolkit for Unix' -url='http://www.clamav.net/' +url='https://www.clamav.net/' license=('GPL') arch=('x86_64') -makedepends=('libmilter') -depends=('bzip2' 'libltdl' 'libxml2' 'curl' 'pcre') -validpgpkeys=('B964E6D7BC7D7C82CCB8D45840B8EA2364221D53' - 'F79FB2D08751574C5D3FDFFBB3D5342C260429A0') -source=("http://www.clamav.net/downloads/production/${pkgname}-${pkgver}.tar.gz"{,.sig} - 'logrotate' - 'tmpfiles.d' - 'clamd.conf' - 'freshclam.conf' - 'clamd.service' - 'freshclamd.service' - 'make_it_compile_against_openssl_1_1_0.patch') -sha256sums=('167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a' - 'SKIP' - 'ce4b9b8c300614641af600c9a73b52a00ee8e47ccc9f91b2428a113b0ecff21b' - '0a61abee3b9bba94126afe3344e7d8e82da5120ca6dbd2b413b10f75da5b0b0d' - 'afdb95f93f7e11e163d368caccd5f6814206c6f0d74816b4f712c0267b50572a' - '127b39e13525ffb4242198cfb76f99d4d517e5f2fd9fa8dcad3f31fc9f82f952' - 'e376ab0cefeefa5ac5f1cd611718452ea8646198e854aca3cc0026f5ffe58fb4' - 'dd5ff6c79ee360da5f2221c4d9110a2a8886d86293f6c93c16bf74fdb126593c' - '0a8e02a91bc3f2c99bd52dc475592637376baa991fe3f899b7745b840fc586c5') - +makedepends=('libmilter' 'systemd') +depends=('bzip2' 'libltdl' 'libxml2' 'curl' 'pcre' 'libsystemd') backup=('etc/clamav/clamd.conf' 'etc/clamav/freshclam.conf' + 'etc/clamav/clamav-milter.conf' 'etc/logrotate.d/clamav') +install=clamav.install +source=(https://www.clamav.net/downloads/production/${pkgname}-${pkgver}.tar.gz{,.sig} + clamav.logrotate + clamav.tmpfiles + clamav.sysusers) +sha256sums=('00fa5292a6e00a3a4035b826267748965d5d2c4943d8ff417d740238263e8e84' + 'SKIP' + 'c36e3ddf790fa6ea90169038ae08521a31652a372017e6e38858e28fc63b3f74' + '8e216c7e4763a273a120930787dcc444ea221bb719eed180a9d15b4c1d603a84' + '01a896c3a1cd34b323594403fd82a9e353b5aa848b8462137b621959558199e8') +validpgpkeys=('65ED513993F08DA06F9639A6F13F9E16BCA5BFAD') # Talos (Talos, Cisco Systems Inc.) <[email protected]> -install=install - prepare() { - cd "${srcdir}/${pkgname}-${pkgver}" - patch -Np1 -i ../make_it_compile_against_openssl_1_1_0.patch - 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 + autoreconf -fiv } build() { - cd "${srcdir}/${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 \ - --disable-clamav \ - --disable-llvm \ - --disable-zlib-vcheck \ - --enable-milter + 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 \ + --disable-rpath \ + --disable-clamav \ + --disable-llvm \ + --enable-zlib-vcheck \ + --enable-milter \ + --enable-clamdtop - sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool - make + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + make } package() { - cd "${srcdir}/${pkgname}-${pkgver}" - make DESTDIR="${pkgdir}" install + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install - install -Dm644 ../clamd.conf "${pkgdir}"/etc/clamav/clamd.conf - install -Dm644 ../freshclam.conf "${pkgdir}"/etc/clamav/freshclam.conf - install -Dm644 ../freshclamd.service "${pkgdir}"/usr/lib/systemd/system/freshclamd.service - install -Dm644 ../clamd.service "${pkgdir}"/usr/lib/systemd/system/clamd.service - install -Dm644 ../tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/clamav.conf - install -Dm644 ../logrotate "${pkgdir}"/etc/logrotate.d/clamav + mv "${pkgdir}"/etc/clamav/freshclam.conf{.sample,} + mv "${pkgdir}"/etc/clamav/clamd.conf{.sample,} + mv "${pkgdir}"/etc/clamav/clamav-milter.conf{.sample,} - install -d -o 64 -g 64 "${pkgdir}"/var/log/clamav - install -d -o 64 -g 64 "${pkgdir}"/var/lib/clamav + 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 } + +# vim: ts=2 sw=2 et: Added: clamav.install =================================================================== --- clamav.install (rev 0) +++ clamav.install 2018-01-26 18:38:41 UTC (rev 315479) @@ -0,0 +1,11 @@ +post_upgrade() { + if (( $(vercmp $2 0.99.3) <= 0 )); then + cat << EOF + +===> WARNING: ClamAV service files have been renamed: + -> clamav-daemon.service + -> clamav-freshclam.service + +EOF + fi +} Added: clamav.logrotate =================================================================== --- clamav.logrotate (rev 0) +++ clamav.logrotate 2018-01-26 18:38:41 UTC (rev 315479) @@ -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 +} Added: clamav.sysusers =================================================================== --- clamav.sysusers (rev 0) +++ clamav.sysusers 2018-01-26 18:38:41 UTC (rev 315479) @@ -0,0 +1 @@ +u clamav 64 "Clam AntiVirus" - Added: clamav.tmpfiles =================================================================== --- clamav.tmpfiles (rev 0) +++ clamav.tmpfiles 2018-01-26 18:38:41 UTC (rev 315479) @@ -0,0 +1,3 @@ +d /run/clamav 0755 clamav clamav +d /var/log/clamav 0755 clamav clamav +d /var/lib/clamav 0755 clamav clamav Deleted: clamd.conf =================================================================== --- clamd.conf 2018-01-26 18:06:00 UTC (rev 315478) +++ clamd.conf 2018-01-26 18:38:41 UTC (rev 315479) @@ -1,6 +0,0 @@ -LogFile /var/log/clamav/clamd.log -LogTime yes -PidFile /run/clamav/clamd.pid -TemporaryDirectory /tmp -LocalSocket /var/lib/clamav/clamd.sock -User clamav Deleted: clamd.service =================================================================== --- clamd.service 2018-01-26 18:06:00 UTC (rev 315478) +++ clamd.service 2018-01-26 18:38:41 UTC (rev 315479) @@ -1,11 +0,0 @@ -[Unit] -Description=clamav daemon -After=network.target - -[Service] -Type=forking -PIDFile=/run/clamav/clamd.pid -ExecStart=/usr/bin/clamd - -[Install] -WantedBy=multi-user.target Deleted: freshclam.conf =================================================================== --- freshclam.conf 2018-01-26 18:06:00 UTC (rev 315478) +++ freshclam.conf 2018-01-26 18:38:41 UTC (rev 315479) @@ -1,3 +0,0 @@ -UpdateLogFile /var/log/clamav/freshclam.log -DatabaseMirror database.clamav.net -NotifyClamd /etc/clamav/clamd.conf Deleted: freshclamd.service =================================================================== --- freshclamd.service 2018-01-26 18:06:00 UTC (rev 315478) +++ freshclamd.service 2018-01-26 18:38:41 UTC (rev 315479) @@ -1,10 +0,0 @@ -[Unit] -Description=clamav updater - -[Service] -Type=forking -PIDFile=/run/clamav/freshclam.pid -ExecStart=/usr/bin/freshclam -d -p /run/clamav/freshclam.pid - -[Install] -WantedBy=multi-user.target Deleted: install =================================================================== --- install 2018-01-26 18:06:00 UTC (rev 315478) +++ install 2018-01-26 18:38:41 UTC (rev 315479) @@ -1,9 +0,0 @@ -post_upgrade() { - systemd-tmpfiles --create clamav.conf -} - -post_install() { - getent group clamav &>/dev/null || groupadd -r -g 64 clamav >/dev/null - getent passwd clamav &>/dev/null || useradd -r -u 64 -g clamav -d /dev/null -s /bin/false -c "Clam AntiVirus" clamav >/dev/null - post_upgrade -} Deleted: logrotate =================================================================== --- logrotate 2018-01-26 18:06:00 UTC (rev 315478) +++ logrotate 2018-01-26 18:38:41 UTC (rev 315479) @@ -1,10 +0,0 @@ -/var/log/clamav/clamd.log /var/log/clamav/freshclam.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 - endscript -} Deleted: make_it_compile_against_openssl_1_1_0.patch =================================================================== --- make_it_compile_against_openssl_1_1_0.patch 2018-01-26 18:06:00 UTC (rev 315478) +++ make_it_compile_against_openssl_1_1_0.patch 2018-01-26 18:38:41 UTC (rev 315479) @@ -1,98 +0,0 @@ -From 088af365ce4f715b9f1d41754651e01db6ebf39a Mon Sep 17 00:00:00 2001 -From: Sebastian Andrzej Siewior <[email protected]> -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 <[email protected]> ---- - 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]) - Deleted: tmpfiles.d =================================================================== --- tmpfiles.d 2018-01-26 18:06:00 UTC (rev 315478) +++ tmpfiles.d 2018-01-26 18:38:41 UTC (rev 315479) @@ -1 +0,0 @@ -d /run/clamav 0755 clamav clamav
