diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2018-02-06 22:54:31 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2018-02-06 22:54:31 -0500 |
commit | 01607edb5998cee362fb282588208fc54c28ab0f (patch) | |
tree | 299f6f851c12f738b2a04b63338e7c8602f31fa1 /libre/clamav | |
parent | 9c374ed191a54e9d9d9590c69d80ae4367e490ab (diff) | |
download | abslibre-01607edb5998cee362fb282588208fc54c28ab0f.tar.gz abslibre-01607edb5998cee362fb282588208fc54c28ab0f.tar.bz2 abslibre-01607edb5998cee362fb282588208fc54c28ab0f.zip |
clamav-0.99.3-1.parabola1: updating version
Diffstat (limited to 'libre/clamav')
-rw-r--r-- | libre/clamav/PKGBUILD | 100 | ||||
-rw-r--r-- | libre/clamav/clamav.install | 11 | ||||
-rw-r--r-- | libre/clamav/clamav.logrotate (renamed from libre/clamav/logrotate) | 3 | ||||
-rw-r--r-- | libre/clamav/clamav.sysusers | 1 | ||||
-rw-r--r-- | libre/clamav/clamav.tmpfiles | 3 | ||||
-rw-r--r-- | libre/clamav/clamd.conf | 6 | ||||
-rw-r--r-- | libre/clamav/clamd.service | 11 | ||||
-rw-r--r-- | libre/clamav/freshclam.conf | 3 | ||||
-rw-r--r-- | libre/clamav/freshclamd.service | 10 | ||||
-rw-r--r-- | libre/clamav/install | 9 | ||||
-rw-r--r-- | libre/clamav/make_it_compile_against_openssl_1_1_0.patch | 98 | ||||
-rw-r--r-- | libre/clamav/tmpfiles.d | 1 |
12 files changed, 68 insertions, 188 deletions
diff --git a/libre/clamav/PKGBUILD b/libre/clamav/PKGBUILD index 9cb4e81f6..82d1e1d7b 100644 --- a/libre/clamav/PKGBUILD +++ b/libre/clamav/PKGBUILD @@ -8,44 +8,35 @@ _pkgname=clamav-libre pkgname=clamav -pkgver=0.99.2 -pkgrel=7.parabola1 +pkgver=0.99.3 +pkgrel=1.parabola1 pkgdesc='Anti-virus toolkit for Unix, without nonfree decompression engine for RAR archives' -url='http://www.clamav.net/' +url='https://www.clamav.net/' license=('GPL') arch=('i686' 'x86_64' 'armv7h') -makedepends=('libmilter') -depends=('bzip2' 'libltdl' 'libxml2' 'curl' 'pcre') -validpgpkeys=('B964E6D7BC7D7C82CCB8D45840B8EA2364221D53' - 'F79FB2D08751574C5D3FDFFBB3D5342C260429A0') -mksource=("http://www.clamav.net/downloads/production/${pkgname}-${pkgver}.tar.gz"{,.sig}) -source=("https://repo.parabola.nu/other/${_pkgname}/${_pkgname}-${pkgver}.tar.gz" - 'logrotate' - 'tmpfiles.d' - 'clamd.conf' - 'freshclam.conf' - 'clamd.service' - 'freshclamd.service' - 'make_it_compile_against_openssl_1_1_0.patch') -mksha256sums=('167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a' - 'SKIP') -sha256sums=('9cbca11e54c78129c0c9495ff40f42e83c34a430e832fdf86c9408bc397d6d07' - '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=install +install=clamav.install +mksource=(https://www.clamav.net/downloads/production/${pkgname}-${pkgver}.tar.gz{,.sig}) +source=(https://repo.parabola.nu/other/${_pkgname}/${_pkgname}-${pkgver}.tar.gz + clamav.logrotate + clamav.tmpfiles + clamav.sysusers) +mksha256sums=('00fa5292a6e00a3a4035b826267748965d5d2c4943d8ff417d740238263e8e84' + 'SKIP') +sha256sums=('fb59578c5793eac997a0472a85c6bfb1e9680b8b11e82f40ee10dfd48c1c5321' + 'c36e3ddf790fa6ea90169038ae08521a31652a372017e6e38858e28fc63b3f74' + '8e216c7e4763a273a120930787dcc444ea221bb719eed180a9d15b4c1d603a84' + '01a896c3a1cd34b323594403fd82a9e353b5aa848b8462137b621959558199e8') +validpgpkeys=('65ED513993F08DA06F9639A6F13F9E16BCA5BFAD') # Talos (Talos, Cisco Systems Inc.) <research@sourcefire.com> mksource() { - cd "${srcdir}/${pkgname}-${pkgver}" + cd ${pkgname}-${pkgver} msg2 "remove nonfree unRAR utility files from the source" rm -rv libclamunrar @@ -53,28 +44,42 @@ mksource() { } 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: - # the configure script thinks that zlib 1.2.11 is older than 1.2.2 + cd ${pkgname}-${pkgver} + # --disable-zlib-vcheck because the configure script thinks that + # zlib 1.2.11 is older than 1.2.2 # --enable-llvm=no: - # workaround for database update issues + # workaround for database update issues ./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 \ - --disable-zlib-vcheck \ + --enable-zlib-vcheck \ --enable-milter \ + --enable-clamdtop \ --disable-unrar \ --enable-llvm=no @@ -83,17 +88,14 @@ build() { } package() { - cd "${srcdir}/${pkgname}-${pkgver}" - + 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 } diff --git a/libre/clamav/clamav.install b/libre/clamav/clamav.install new file mode 100644 index 000000000..2d1c91310 --- /dev/null +++ b/libre/clamav/clamav.install @@ -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 +} diff --git a/libre/clamav/logrotate b/libre/clamav/clamav.logrotate index 5f6d87d29..d8564b64c 100644 --- a/libre/clamav/logrotate +++ b/libre/clamav/clamav.logrotate @@ -1,4 +1,4 @@ -/var/log/clamav/clamd.log /var/log/clamav/freshclam.log { +/var/log/clamav/clamd.log /var/log/clamav/freshclam.log /var/log/clamav/clamav-milter.log { create 644 clamav clamav sharedscripts missingok @@ -6,5 +6,6 @@ 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/libre/clamav/clamav.sysusers b/libre/clamav/clamav.sysusers new file mode 100644 index 000000000..e20c16b6c --- /dev/null +++ b/libre/clamav/clamav.sysusers @@ -0,0 +1 @@ +u clamav 64 "Clam AntiVirus" - diff --git a/libre/clamav/clamav.tmpfiles b/libre/clamav/clamav.tmpfiles new file mode 100644 index 000000000..38124af3b --- /dev/null +++ b/libre/clamav/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/libre/clamav/clamd.conf b/libre/clamav/clamd.conf deleted file mode 100644 index d231ec9f0..000000000 --- a/libre/clamav/clamd.conf +++ /dev/null @@ -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 diff --git a/libre/clamav/clamd.service b/libre/clamav/clamd.service deleted file mode 100644 index ac9e789ae..000000000 --- a/libre/clamav/clamd.service +++ /dev/null @@ -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 diff --git a/libre/clamav/freshclam.conf b/libre/clamav/freshclam.conf deleted file mode 100644 index db513fd3e..000000000 --- a/libre/clamav/freshclam.conf +++ /dev/null @@ -1,3 +0,0 @@ -UpdateLogFile /var/log/clamav/freshclam.log -DatabaseMirror database.clamav.net -NotifyClamd /etc/clamav/clamd.conf diff --git a/libre/clamav/freshclamd.service b/libre/clamav/freshclamd.service deleted file mode 100644 index a0a72c2e6..000000000 --- a/libre/clamav/freshclamd.service +++ /dev/null @@ -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 diff --git a/libre/clamav/install b/libre/clamav/install deleted file mode 100644 index bfaa56624..000000000 --- a/libre/clamav/install +++ /dev/null @@ -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 -} diff --git a/libre/clamav/make_it_compile_against_openssl_1_1_0.patch b/libre/clamav/make_it_compile_against_openssl_1_1_0.patch deleted file mode 100644 index 2974fe5f8..000000000 --- a/libre/clamav/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]) - diff --git a/libre/clamav/tmpfiles.d b/libre/clamav/tmpfiles.d deleted file mode 100644 index 22d29941e..000000000 --- a/libre/clamav/tmpfiles.d +++ /dev/null @@ -1 +0,0 @@ -d /run/clamav 0755 clamav clamav |