From 4e2cb1319eca7556d8f26ea986e1ef2f2f545510b6f9fcea38268dde04eaf978 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 21 Apr 2008 16:37:35 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/clamav?expand=0&rev=14 --- clamav-0.92.1.tar.bz2 | 3 -- clamav-0.93.tar.bz2 | 3 ++ clamav-rcclamd | 21 ++++------ clamav.changes | 20 +++++++++ clamav.spec | 94 +++++++++++++++++++++++++++++++++---------- 5 files changed, 103 insertions(+), 38 deletions(-) delete mode 100644 clamav-0.92.1.tar.bz2 create mode 100644 clamav-0.93.tar.bz2 diff --git a/clamav-0.92.1.tar.bz2 b/clamav-0.92.1.tar.bz2 deleted file mode 100644 index f79ccb8..0000000 --- a/clamav-0.92.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c694084f662d294ed18820e460a60d65774711f5dd383af18324a8e2e77705f -size 14869157 diff --git a/clamav-0.93.tar.bz2 b/clamav-0.93.tar.bz2 new file mode 100644 index 0000000..12f7f8b --- /dev/null +++ b/clamav-0.93.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28b86fee72b0b666f7fff497255f01c4fc6b914709491a5d081775274d0c4387 +size 15862333 diff --git a/clamav-rcclamd b/clamav-rcclamd index 00faad9..f77c8ad 100644 --- a/clamav-rcclamd +++ b/clamav-rcclamd @@ -149,21 +149,16 @@ rc_reset case "$1" in start) - echo -n "Starting Clam AntiVirus daemon " - # Check if there is a virus definition file - if ! test -f $CLAMD_DBDIR/main.cvd -o -d $CLAMD_DBDIR/main.inc ; then - echo "" - echo " Virus definitions are missing from $CLAMD_DB." - echo " Either install the clamav-db package or run freshclam " - echo -n " to get the virus definitions." - rc_failed 6 - else - ## Start daemon with startproc(8). If this fails - ## the return value is set appropriately by startproc. + echo -n "Starting Clam AntiVirus daemon " + if ! test -f $CLAMD_DBDIR/main.cvd -o -f $CLAMD_DBDIR/main.cld ; then + rc_failed + rc_status -v + echo " ClamAV Virus definition files are missing from $CLAMD_DBDIR." + echo " Either install the clamav-db package or run freshclam." + else startproc -p $CLAMD_PIDFILE $CLAMD_BIN + rc_status -v fi - # Remember status and be verbose - rc_status -v ;; stop) echo -n "Shutting down Clam AntiVirus daemon " diff --git a/clamav.changes b/clamav.changes index 7838047..e896e0e 100644 --- a/clamav.changes +++ b/clamav.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Fri Apr 18 19:04:35 CEST 2008 - max@suse.de + +- Convert the database to the new format instead of running + freshclam to re-fetch it (bnc#380787). +- Added main.cld and daily.cld as %ghost +- Refined the logic in %post of clamav-db as to when the dist + files need to get copied over. + +------------------------------------------------------------------- +Tue Apr 15 13:07:00 CEST 2008 - max@suse.de + +- Security update 0.93 (bnc#350987, bnc#368963). +- CVE-2007-6595: symlink attack on temporary files +- CVE-2007-6596: recognize Base64 UUEncoded archives +- CVE-2008-1100: Buffer overflow in the cli_scanpe function. +- Remove bogus dependencies from libclamav.pc (bnc#196236) +- Run freshclam on update before restarting clamd to convert the + database into the new format. + ------------------------------------------------------------------- Wed Feb 13 12:12:56 CET 2008 - max@suse.de diff --git a/clamav.spec b/clamav.spec index 4978afb..9010f6d 100644 --- a/clamav.spec +++ b/clamav.spec @@ -1,5 +1,5 @@ # -# spec file for package clamav (Version 0.92.1) +# spec file for package clamav (Version 0.93) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -19,19 +19,18 @@ BuildRequires: bc gmp-devel pkgconfig zlib-devel BuildRequires: pwdutils %endif %if 0%{?suse_version} >= 0910 -BuildRequires: tcpd-devel +BuildRequires: sed sendmail sendmail-devel tcpd-devel %endif -BuildRequires: sendmail sendmail-devel Summary: Antivirus Toolkit -Version: 0.92.1 +Version: 0.93 Release: 1 License: GPL v2 or later Group: Productivity/Security Url: http://www.clamav.net Requires: latex2html-pngicons -PreReq: %insserv_prereq %fillup_prereq Obsoletes: clamav-db < 0.88.3 -PreReq: %_sbindir/groupadd %_sbindir/useradd /usr/bin/awk /bin/sed +PreReq: %_sbindir/groupadd %_sbindir/useradd /usr/bin/awk /bin/sed /bin/tar +PreReq: %insserv_prereq %fillup_prereq Source0: %{name}-%{version}.tar.bz2 Source1: clamav-rcclamd Source2: clamav-rcfreshclam @@ -59,9 +58,10 @@ Authors: Nigel Horne %package db +License: BSD 3-Clause; GPL v2 or later; LGPL v2.1 or later; Public Domain, Freeware; X11/MIT Group: Productivity/Security Summary: Virus Database for ClamAV -PreReq: clamav sed /bin/cp +PreReq: clamav sed /bin/cp /usr/bin/awk /bin/rm %description db This package contains a snapshot of the virus description database for @@ -81,10 +81,10 @@ Authors: %patch3 %build -%if %suse_version >= 1010 -SP="-fstack-protector" +%if 0%{?suse_version} >= 1010 +CFLAGS="-fstack-protector" %endif -export CFLAGS="%optflags -fno-strict-aliasing $SP" +export CFLAGS="%optflags -fno-strict-aliasing $CFLAGS" ./configure \ --prefix=%_prefix \ --libdir=%_libdir \ @@ -97,8 +97,10 @@ export CFLAGS="%optflags -fno-strict-aliasing $SP" --with-group=vscan \ --with-tcpwrappers \ --with-libcurl \ - --disable-zlib-vcheck \ - --enable-milter +%if 0%{?suse_version} >= 0910 + --enable-milter \ +%endif + --disable-zlib-vcheck make %{?jobs:-j%jobs} # SLES8 does not support %check %if 0%{?suse_version} > 810 || 0%{!?suse_version:1} @@ -125,10 +127,15 @@ for f in %buildroot/var/lib/clamav/*.cvd; do mv $f $f.dist touch $f done +touch %buildroot/var/lib/clamav/{main,daily}.cld mkdir -p %buildroot/var/spool/amavis -%if 0%{?suse_version:%suse_version} > 1020 +%if 0%{?suse_version} > 1020 rm %buildroot/%_libdir/*.la %endif +%if 0%{?suse_version} > 0810 +# Remove bogus dependencies from libclamav.pc +sed -i 's/^Libs: .*/Libs: -lclamav/' %buildroot%_libdir/pkgconfig/libclamav.pc +%endif %clean rm -rf %buildroot @@ -149,6 +156,7 @@ rm -rf %buildroot %dir %attr(700,vscan,root) /var/spool/amavis %dir /var/lib/clamav %ghost /var/lib/clamav/*.pid +%ghost /var/lib/clamav/*.cld %ghost /var/lib/clamav/*.cvd /var/adm/fillup-templates/* @@ -163,12 +171,11 @@ rm -rf %buildroot %_sbindir/usermod vscan -g vscan 2> /dev/null || : %post -%run_ldconfig +/sbin/ldconfig %{?fillup_only:%fillup_only -n clamav-milter} # merge config files on update test "0$1" -lt 2 && exit 0 -# The old default to run clamd in foreground mode was wrong -OVERRIDE="Foreground no" +umask 022 for f in /etc/clamd.conf /etc/freshclam.conf; do if test -e $f.rpmnew; then echo "Merging $f and $f.rpmnew" @@ -181,6 +188,30 @@ for f in /etc/clamd.conf /etc/freshclam.conf; do fi fi done +# convert virus database file format when updating from < 0.93 +DBDIR=$(awk '/^[[:space:]]*DatabaseDirectory/{print $NF}' /etc/clamd.conf) +cd ${DBDIR:=/var/lib/clamav} +umask 022 +TMPFILE=$PWD/tmp.$$ +for type in main daily; do + rm -f $TMPFILE + if test ! -f $type.cvd -a ! -f $type.cld -a -d $type.inc; then + cd $type.inc + test -f COPYING -a -f $type.info -a -f $type.db \ + -a -f $type.hdb -a -f $type.mdb -a -f $type.ndb \ + -a -f $type.zmd -a -f $type.fp || continue + awk 'NR==1{printf $0; for (i=length($0); i<512; i++) printf " "}' \ + $type.info > $TMPFILE || continue + tar -c -f- COPYING $type.info $type.db $type.hdb $type.mdb \ + $type.ndb $type.zmd $type.fp >> $TMPFILE || continue + cd .. + if test -f $TMPFILE; then + chown --reference $type.inc $TMPFILE 2>/dev/null + mv $TMPFILE $type.cld + fi + fi +done +rm -f $TMPFILE %triggerpostun -- %name < 0.88.3 # Move clamav.conf to clamd.conf when updating from an old version @@ -200,7 +231,7 @@ fi %stop_on_removal clamd freshclam %postun -%run_ldconfig +/sbin/ldconfig %restart_on_update clamd freshclam %insserv_cleanup @@ -214,15 +245,34 @@ getversion() { echo 0 fi } -cd /var/lib/clamav -for distfile in {main,daily}.cvd.dist; do - datafile=${distfile%.dist} - if test $(getversion $distfile) -gt $(getversion $datafile); then - cp -a $distfile $datafile +DBDIR=$(awk '/^[[:space:]]*DatabaseDirectory/{print $NF}' /etc/clamd.conf) +cd ${DBDIR:=/var/lib/clamav} +for f in main daily; do + vdist=$(getversion $f.cvd.dist) + vcvd=$(getversion $f.cvd) + vcld=$(getversion $f.cld) + v=$((vcld > vcvd ? vcld : vcvd)) + if test $vdist -gt $v; then + cp -a $f.cvd.dist $f.cvd + rm -f $f.cld fi done %changelog +* Fri Apr 18 2008 max@suse.de +- Convert the database to the new format instead of running + freshclam to re-fetch it (bnc#380787). +- Added main.cld and daily.cld as %%ghost +- Refined the logic in %%post of clamav-db as to when the dist + files need to get copied over. +* Tue Apr 15 2008 max@suse.de +- Security update 0.93 (bnc#350987, bnc#368963). +- CVE-2007-6595: symlink attack on temporary files +- CVE-2007-6596: recognize Base64 UUEncoded archives +- CVE-2008-1100: Buffer overflow in the cli_scanpe function. +- Remove bogus dependencies from libclamav.pc (bnc#196236) +- Run freshclam on update before restarting clamd to convert the + database into the new format. * Wed Feb 13 2008 max@suse.de - Security update 0.92.1: (bnc#361374) * CVE-2008-0318: libclamav PE File Integer Overflow Vulnerability