Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=e50afe5e917f4dad7f77bd4ff0045ea1eec60638
commit e50afe5e917f4dad7f77bd4ff0045ea1eec60638 Author: crazy <[email protected]> Date: Tue Dec 13 21:18:08 2016 +0100 clamav-0.99.2-1-x86_64 * Version bump * reworked the whole FB * llvm is disable since included one is such old and broken and system one is to new * they need <= 3.5 or something.. Use service files provided upstream. * fix db localtion ( never worked since we moved just the files around and deleted /usr/share!!!) * provide minimal config files also use /etc/$pkgname. * fix install file and also try to migrate old config files when found.. * use tarball from upstream website and no more from sf.net since sf.net is out-of-date diff --git a/source/apps-extra/clamav/FrugalBuild b/source/apps-extra/clamav/FrugalBuild index 6771e38..688b5a1 100644 --- a/source/apps-extra/clamav/FrugalBuild +++ b/source/apps-extra/clamav/FrugalBuild @@ -2,46 +2,52 @@ # Maintainer: Janos Kovacs <[email protected]> pkgname=clamav -pkgver=0.98.6 -pkgrel=2 +pkgver=0.99.2 +pkgrel=1 pkgdesc="Clam AntiVirus is a GPL anti-virus toolkit for UNIX" -depends=('gmp>=5.0.1' 'bzip2' 'curl>=7.19.0' 'ncurses>=6.0-3') +depends=('libxml2' 'libtool' 'pcre2' 'curl' 'libsystemd') +url="http://www.clamav.net/" rodepends=('shadow') -_F_archive_grepv="rc" -backup=(etc/{freshclam,clamd}.conf) +_F_archive_grepv="rc\|beta" +backup=(etc/clamav/{freshclam,clamd}.conf) groups=('apps-extra') -archs=('i686' 'x86_64') -Finclude sourceforge -source=($source clamav-0.95-cliopts.patch llvm-glibc.patch clamav.service freshclam.service) -sha1sums=('03cb9a20a08aba9176b1f58d5527d06ec8261f9c' \ - '507c7b8dbda905d8be2c6f94718803451771b153' \ - '79080dd02903aa0463a1e837e8c0afaa9cf4348b' \ - 'f50298cd957cd322c9a47384bbec0076fe059490' \ - 'acc22c8def14d7dea1c781da347f5765196726b9') - -_F_systemd_units=(clamav= freshclam=) -Finclude systemd +archs=('x86_64') +up2date="Flasttar http://www.clamav.net/downloads" +source=(http://www.clamav.net/downloads/production/$pkgname-$pkgver.tar.gz) +sha1sums=('c1a47411834d8527f7b40727aebee63f01d488af') build() { - Fbuild --disable-clamav --sysconfdir=/etc - Fsed '^Example' '# Example' $Fdestdir/etc/{clamd,freshclam}.conf.sample - Fsed '^#LogFile' 'LogFile' $Fdestdir/etc/clamd.conf.sample - Fsed '/tmp/clamd.log' '/var/log/clamd.log' $Fdestdir/etc/clamd.conf.sample - Fsed '^#DatabaseDirectory' 'DatabaseDirectory' $Fdestdir/etc/{clamd,freshclam}.conf.sample - Fsed '/usr/share/clamav' '/var/lib/clamav' $Fdestdir/etc/{clamd,freshclam}.conf.sample - Fsed '/var/log/' '/var/log/clamav/' $Fdestdir/etc/{clamd,freshclam}.conf.sample - Fsed '/var/run/' '/var/run/clamav/' $Fdestdir/etc/{clamd,freshclam}.conf.sample - Frm /usr/share/clamav + Fbuild \ + --disable-clamav \ + --sysconfdir=/etc/clamav \ + --disable-llvm \ + --with-dbdir=/var/lib/clamav \ + --enable-ipv6 + + ######## provide minimal default + Fsed '^Example' '# Example' $Fdestdir/etc/clamav/{clamd,freshclam}.conf.sample + Fsed '^#LogFile' 'LogFile' $Fdestdir/etc/clamav/clamd.conf.sample + Fsed '/tmp/clamd.log' '/var/log/clamd.log' $Fdestdir/etc/clamav/clamd.conf.sample + Fsed '^#DatabaseDirectory' 'DatabaseDirectory' $Fdestdir/etc/clamav/{clamd,freshclam}.conf.sample + Fsed '/usr/share/clamav' '/var/lib/clamav' $Fdestdir/etc/clamav/{clamd,freshclam}.conf.sample + Fsed '/var/log/' '/var/log/clamav/' $Fdestdir/etc/clamav/{clamd,freshclam}.conf.sample + Fsed '/var/run/' '/run/clamav/' $Fdestdir/etc/clamav/{clamd,freshclam}.conf.sample + Fsed '#PidFile' 'PidFile' $Fdestdir/etc/clamav/{clamd,freshclam}.conf.sample + + Fmv /etc/clamav/clamd.conf.sample /etc/clamav/clamd.conf + Fmv /etc/clamav/freshclam.conf.sample /etc/clamav/freshclam.conf + + ######################################################################### + Fmkdir /var/{log,lib}/clamav - chown 26.26 $Fdestdir/var/{log,lib}/clamav || Fdie + Fmkdir run/clamav + Fexec chown 26.26 $Fdestdir/var/{log,lib}/clamav || Fdie + Fexec chown 26.26 $Fdestdir/run/clamav || Fdie Fmkdir /etc/tmpfiles.d cat > $Fdestdir/etc/tmpfiles.d/clamav.conf << EOF d $Flocalstatedir/run/clamav 0755 clamav clamav - EOF - Ffile /lib/systemd/system/clamav.service - Ffile /lib/systemd/system/freshclam.service - Fgenscriptlet } # optimization OK diff --git a/source/apps-extra/clamav/clamav-0.95-cliopts.patch b/source/apps-extra/clamav/clamav-0.95-cliopts.patch deleted file mode 100644 index 40232be..0000000 --- a/source/apps-extra/clamav/clamav-0.95-cliopts.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur clamav-0.98.5/shared/optparser.c clamav-0.98.5.NEW/shared/optparser.c ---- clamav-0.98.5/shared/optparser.c 2014-11-13 23:30:44.000000000 +0100 -+++ clamav-0.98.5.NEW/shared/optparser.c 2014-11-24 11:09:59.060484469 +0100 -@@ -272,7 +272,7 @@ - - { "AllowAllMatchScan", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD, "Permit use of the ALLMATCHSCAN command.", "yes" }, - -- { "Foreground", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no" }, -+ { "Foreground", "nofork", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no" }, - - { "Debug", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM, "Enable debug messages in libclamav.", "no" }, - diff --git a/source/apps-extra/clamav/clamav.install b/source/apps-extra/clamav/clamav.install index 9396fb6..ff430ea 100644 --- a/source/apps-extra/clamav/clamav.install +++ b/source/apps-extra/clamav/clamav.install @@ -15,11 +15,28 @@ pre_remove() rm -fr /var/lib/clamav 2>&1 } -pre_upgrade() + +pre_upgrade() +{ + post_install +} + +post_upgrade() { - if [ `vercmp $2 0.88.7-2` -lt 0 ] ; then - /usr/sbin/chkconfig --del freshclam + + ## move files to new location + if [ -e /etc/freshclam.conf ]; then + if [ -d /etc/clamav ]; then + /usr/bin/mv /etc/freshclam.conf /etc/clamav/freshclam.conf + fi fi + + if [ -e /etc/clamd.conf ]; then + if [ -d /etc/clamav ]; then + /usr/bin/mv /etc/clamd.conf /etc/clamav/clamd.conf + fi + fi + } op=$1 diff --git a/source/apps-extra/clamav/clamav.service b/source/apps-extra/clamav/clamav.service deleted file mode 100644 index 97d0f62..0000000 --- a/source/apps-extra/clamav/clamav.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=clamd scanner daemon -After=syslog.target nss-lookup.target network.target - -[Service] -ExecStart=/usr/sbin/clamd --nofork=yes - -[Install] -WantedBy=multi-user.target diff --git a/source/apps-extra/clamav/freshclam.service b/source/apps-extra/clamav/freshclam.service deleted file mode 100644 index ae6382e..0000000 --- a/source/apps-extra/clamav/freshclam.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=freshclam service -After=syslog.target nss-lookup.target network.target - -[Service] -ExecStart=/usr/bin/freshclam -d --checks=12 --user=clamav -Type=forking - -[Install] -WantedBy=multi-user.target diff --git a/source/apps-extra/clamav/llvm-glibc.patch b/source/apps-extra/clamav/llvm-glibc.patch deleted file mode 100644 index 67dbdd7..0000000 --- a/source/apps-extra/clamav/llvm-glibc.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: clamav-0.97.3/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp -=================================================================== ---- clamav-0.97.3.orig/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp -+++ clamav-0.97.3/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp -@@ -52,6 +52,7 @@ static void runAtExitHandlers() { - #include <sys/stat.h> - #endif - #include <fcntl.h> -+#include <unistd.h> - /* stat functions are redirecting to __xstat with a version number. On x86-64 - * linking with libc_nonshared.a and -Wl,--export-dynamic doesn't make 'stat' - * available as an exported symbol, so we have to add it explicitly. _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
