From 93ac5ce2303915d7efc19e751f55de2af42ec0c4 Mon Sep 17 00:00:00 2001 From: ensc Date: Jan 01 2008 13:19:16 +0000 Subject: merged with F-8 --- diff --git a/.cvsignore b/.cvsignore index cdd308b..f6ee3be 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ -clamav-0.92.clean.tar.gz +clamav-*.tar.gz* +clamav-*.*.rpm diff --git a/README.fedora b/README.fedora new file mode 100644 index 0000000..b9f572e --- /dev/null +++ b/README.fedora @@ -0,0 +1,5 @@ +Add + + INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav.sock, F=, T=S:4m;R:4m')dnl + +to your sendmail.mc. diff --git a/clamav-0.90rc3-private.patch b/clamav-0.90rc3-private.patch deleted file mode 100644 index 66b662e..0000000 --- a/clamav-0.90rc3-private.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- clamav-0.90rc3/libclamav.pc.in.private 2004-07-14 13:35:38.000000000 +0200 -+++ clamav-0.90rc3/libclamav.pc.in 2007-02-04 12:24:35.000000000 +0100 -@@ -6,6 +6,6 @@ - Name: libclamav - Description: A GPL virus scanner - Version: @LIBCLAMAV_VERSION@ --Libs: -L${libdir} -lclamav @LIBCLAMAV_LIBS@ --Cflags: -I${includedir} @CFLAGS@ -- -+Libs: -L${libdir} -lclamav -+Libs.private: -L${libdir} -lclamav @LIBCLAMAV_LIBS@ -+Cflags: -I${includedir} ---- clamav-0.90rc3/clamav-config.in.private 2004-06-06 03:50:08.000000000 +0200 -+++ clamav-0.90rc3/clamav-config.in 2007-02-04 12:25:27.000000000 +0100 -@@ -55,11 +55,11 @@ - ;; - - --cflags) -- echo -I@includedir@ @CFLAGS@ -+ echo -I@includedir@ - ;; - - --libs) -- echo -L@libdir@ @LIBCLAMAV_LIBS@ -+ echo -L@libdir@ -lclamav - ;; - - *) diff --git a/clamav-0.91.2-open.patch b/clamav-0.91.2-open.patch deleted file mode 100644 index b933e46..0000000 --- a/clamav-0.91.2-open.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- clamav-0.91.2/clamd/dazukoio_compat12.c.open 2007-03-06 14:38:06.000000000 +0100 -+++ clamav-0.91.2/clamd/dazukoio_compat12.c 2007-08-25 12:36:30.000000000 +0200 -@@ -89,7 +89,7 @@ int dazukoRegister_TS_compat12(struct da - if (dazuko->device < 0) - { - -- dazuko->device = open("/dev/dazuko", 0); -+ dazuko->device = open("/dev/dazuko", O_RDONLY); - if (dazuko->device < 0) - return -1; - ---- clamav-0.91.2/shared/misc.c.open 2007-03-31 21:27:31.000000000 +0200 -+++ clamav-0.91.2/shared/misc.c 2007-08-25 12:36:30.000000000 +0200 -@@ -165,7 +165,7 @@ int filecopy(const char *src, const char - if((s = open(src, O_RDONLY|O_BINARY)) == -1) - return -1; - -- if((d = open(dest, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY)) == -1) { -+ if((d = open(dest, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY, 0600)) == -1) { - close(s); - return -1; - } diff --git a/clamav-0.92-nounrar.patch b/clamav-0.92-nounrar.patch deleted file mode 100644 index b63921e..0000000 --- a/clamav-0.92-nounrar.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff -up clamav-0.92/Makefile.in.BAD clamav-0.92/Makefile.in ---- clamav-0.92/Makefile.in.BAD 2007-12-21 12:39:00.000000000 -0500 -+++ clamav-0.92/Makefile.in 2007-12-21 12:39:11.000000000 -0500 -@@ -242,7 +242,7 @@ target_os = @target_os@ - target_vendor = @target_vendor@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = libclamunrar libclamunrar_iface libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter -+SUBDIRS = libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter - EXTRA_DIST = FAQ contrib test examples BUGS shared libclamav.pc.in UPGRADE COPYING.nsis COPYING.unrar COPYING.LGPL - bin_SCRIPTS = clamav-config - pkgconfigdir = $(libdir)/pkgconfig -diff -up clamav-0.92/configure.in.BAD clamav-0.92/configure.in ---- clamav-0.92/configure.in.BAD 2007-12-21 12:37:51.000000000 -0500 -+++ clamav-0.92/configure.in 2007-12-21 12:38:00.000000000 -0500 -@@ -1214,8 +1214,6 @@ AC_MSG_RESULT($have_signed_rightshift_ex - AC_C_FPU_BIGENDIAN - - AC_OUTPUT([ --libclamunrar/Makefile --libclamunrar_iface/Makefile - libclamav/Makefile - clamscan/Makefile - database/Makefile -diff -up clamav-0.92/Makefile.am.BAD clamav-0.92/Makefile.am ---- clamav-0.92/Makefile.am.BAD 2007-12-21 12:38:39.000000000 -0500 -+++ clamav-0.92/Makefile.am 2007-12-21 12:38:47.000000000 -0500 -@@ -16,7 +16,7 @@ - # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - # MA 02110-1301, USA. - --SUBDIRS = libclamunrar libclamunrar_iface libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter -+SUBDIRS = libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter - EXTRA_DIST = FAQ contrib test examples BUGS shared libclamav.pc.in UPGRADE COPYING.nsis COPYING.unrar COPYING.LGPL - - bin_SCRIPTS=clamav-config -diff -up clamav-0.92/configure.BAD clamav-0.92/configure ---- clamav-0.92/configure.BAD 2007-12-21 12:45:38.000000000 -0500 -+++ clamav-0.92/configure 2007-12-21 12:46:05.000000000 -0500 -@@ -26397,7 +26397,7 @@ echo "$as_me: WARNING: Unable to determi - esac - - --ac_config_files="$ac_config_files libclamunrar/Makefile libclamunrar_iface/Makefile libclamav/Makefile clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamdscan/Makefile clamav-milter/Makefile freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile Makefile clamav-config libclamav.pc docs/man/clamav-milter.8 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1" -+ac_config_files="$ac_config_files libclamav/Makefile clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamdscan/Makefile clamav-milter/Makefile freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile Makefile clamav-config libclamav.pc docs/man/clamav-milter.8 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1" - - cat >confcache <<\_ACEOF - # This file is a shell script that caches the results of configure -@@ -27013,8 +27013,6 @@ do - case $ac_config_target in - "clamav-config.h") CONFIG_HEADERS="$CONFIG_HEADERS clamav-config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; -- "libclamunrar/Makefile") CONFIG_FILES="$CONFIG_FILES libclamunrar/Makefile" ;; -- "libclamunrar_iface/Makefile") CONFIG_FILES="$CONFIG_FILES libclamunrar_iface/Makefile" ;; - "libclamav/Makefile") CONFIG_FILES="$CONFIG_FILES libclamav/Makefile" ;; - "clamscan/Makefile") CONFIG_FILES="$CONFIG_FILES clamscan/Makefile" ;; - "database/Makefile") CONFIG_FILES="$CONFIG_FILES database/Makefile" ;; diff --git a/clamav-0.92-private.patch b/clamav-0.92-private.patch new file mode 100644 index 0000000..bab2948 --- /dev/null +++ b/clamav-0.92-private.patch @@ -0,0 +1,29 @@ +--- clamav-0.92/libclamav.pc.in.private ++++ clamav-0.92/libclamav.pc.in +@@ -6,6 +6,6 @@ includedir=@includedir@ + Name: libclamav + Description: A GPL virus scanner + Version: @LIBCLAMAV_VERSION@ +-Libs: -L${libdir} -lclamav @LIBCLAMAV_LIBS@ +-Cflags: -I${includedir} @CFLAGS@ +- ++Libs: -L${libdir} -lclamav ++Libs.private: -L${libdir} -lclamav @LIBCLAMAV_LIBS@ ++Cflags: -I${includedir} +--- clamav-0.92/clamav-config.in.private ++++ clamav-0.92/clamav-config.in +@@ -54,12 +54,8 @@ while test $# -gt 0; do + usage 0 + ;; + +- --cflags) +- echo -I@includedir@ @CFLAGS@ +- ;; +- +- --libs) +- echo -L@libdir@ @LIBCLAMAV_LIBS@ ++ (--cflags|--libs) ++ ${PKG_CONFIG:-pkg-config} "$1" libclamav + ;; + + *) diff --git a/clamav-notify-servers b/clamav-notify-servers index 22d57a6..f115e89 100644 --- a/clamav-notify-servers +++ b/clamav-notify-servers @@ -1,16 +1,16 @@ #! /bin/bash # Copyright (C) 2004 Enrico Scholz -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/clamav.spec b/clamav.spec index 0e049d1..71c14f3 100644 --- a/clamav.spec +++ b/clamav.spec @@ -1,7 +1,8 @@ -## $Id: clamav.spec,v 1.61 2007/12/21 18:06:29 spot Exp $ +## $Id: clamav.spec,v 1.62 2007/12/21 18:11:32 spot Exp $ ## Fedora Extras specific customization below... -%bcond_without fedora +%bcond_without fedora +%bcond_with unrar ## %global username clamav @@ -18,19 +19,13 @@ Summary: End-user tools for the Clam Antivirus scanner Name: clamav Version: 0.92 -Release: %release_func 3 +Release: %release_func 4 -License: GPLv2 +License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2} Group: Applications/File URL: http://www.clamav.net -# Unfortunately, clamav includes support for RAR v3, derived from GPL -# incompatible unrar from RARlabs. We have to pull this code out. -# All that is needed to make the clean tarball is: rm -rf libclamunrar* -# Note that you also need patch26. -Source0: clamav-%{version}.clean.tar.gz -# Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz -# No sense in using this file for the time being. -# Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz.sig +Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz +Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz.sig Source1: clamd-wrapper Source2: clamd.sysconfig Source3: clamd.logrotate @@ -40,9 +35,8 @@ Source7: clamd.SERVICE.init Source8: clamav-notify-servers Patch21: clamav-0.70-path.patch Patch22: clamav-0.80-initoff.patch -Patch24: clamav-0.90rc3-private.patch +Patch24: clamav-0.92-private.patch Patch25: clamav-0.92-open.patch -Patch26: clamav-0.92-nounrar.patch BuildRoot: %_tmppath/%name-%version-%release-root Requires: clamav-lib = %version-%release Requires: data(clamav) @@ -73,6 +67,7 @@ Source100: clamd-gen Requires: clamav-lib = %version-%release Requires: clamav-filesystem = %version-%release Requires(pre): %_libdir/pkgconfig +Requires: pkgconfig %package data Summary: Virus signature data for the Clam Antivirus scanner @@ -122,6 +117,7 @@ Requires(postun): %_initrddir Summary: Sendmail-milter for the Clam Antivirus scanner Group: System Environment/Daemons Requires: init(clamav-milter) +Source300: README.fedora BuildRequires: sendmail-devel BuildRequires: fedora-usermgmt-devel Provides: user(%milteruser) @@ -215,12 +211,7 @@ SysV initscripts template for the clamav server %description milter -This package contains files which are needed to run the clamav-milter. It -can be activated by adding - -| INPUT_MAIL_FILTER(`clamav', `S=local:%milterstatedir/clamav.sock, F=, T=S:4m;R:4m')dnl - -to your sendmail.mc. +This package contains files which are needed to run the clamav-milter. %description milter-sysv The SysV initscripts for clamav-milter. @@ -235,7 +226,9 @@ The SysV initscripts for clamav-milter. %patch22 -p1 -b .initoff %patch24 -p1 -b .private %patch25 -p1 -b .open -%patch26 -p1 -b .nounrar + +install -p -m0644 %SOURCE300 clamav-milter/ + perl -pi -e 's!^(#?LogFile ).*!\1/var/log/clamd.!g; s!^#?(LocalSocket ).*!\1/var/run/clamd./clamd.sock!g; @@ -254,12 +247,16 @@ CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -std export LDFLAGS='-Wl,--as-needed' # HACK: remove me, when configure uses $LIBS instead of $LDFLAGS for milter check export LIBS='-lmilter -lpthread' -%configure --disable-clamav --with-dbdir=/var/lib/clamav \ - --enable-milter --disable-static --disable-unrar -sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool -# No rpath -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +%configure --disable-clamav --with-dbdir=/var/lib/clamav \ + --enable-milter --disable-static --disable-rpath \ + %{!?with_unrar:--disable-unrar} + +# build with --as-needed and disable rpath +sed -i \ + -e 's! -shared ! -Wl,--as-needed\0!g' \ + -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ + -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ + libtool make %{?_smp_mflags} @@ -291,15 +288,20 @@ install -d -m755 \ ${RPM_BUILD_ROOT}%milterstatedir \ ${RPM_BUILD_ROOT}%pkgdatadir/template \ ${RPM_BUILD_ROOT}%_initrddir \ - ${RPM_BUILD_ROOT}%homedir/daily.inc + ${RPM_BUILD_ROOT}%homedir/{main,daily}.inc rm -f ${RPM_BUILD_ROOT}%_sysconfdir/clamd.conf \ ${RPM_BUILD_ROOT}%_libdir/*.la -for i in COPYING daily.{db,fp,hdb,info,ndb,pdb,zmd}; do - touch ${RPM_BUILD_ROOT}%homedir/daily.inc/$i + +for i in cfg db fp hdb info mdb mdu ndb ndu pdb wdb zmd; do + touch ${RPM_BUILD_ROOT}%homedir/daily.inc/daily.$i + touch ${RPM_BUILD_ROOT}%homedir/main.inc/main.$i done +touch ${RPM_BUILD_ROOT}%homedir/daily.inc/COPYING +touch ${RPM_BUILD_ROOT}%homedir/main.inc/COPYING + ## prepare the server-files mkdir _doc_server @@ -470,14 +472,8 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || : %ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog -%ghost %attr(0664,%username,%username) %homedir/daily.inc/COPYING -%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.db -%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.fp -%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.hdb -%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.info -%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.ndb -%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.pdb -%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.zmd +%ghost %attr(0664,%username,%username) %homedir/daily.inc/* +%ghost %attr(0664,%username,%username) %homedir/main.inc/* ## ----------------------- @@ -503,7 +499,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || : %files milter %defattr(-,root,root,-) -%doc clamav-milter/INSTALL +%doc clamav-milter/INSTALL clamav-milter/README.fedora %_sbindir/*milter* %_mandir/man8/clamav-milter* %config(noreplace) %verify(not mtime) %_sysconfdir/clamd.d/milter.conf @@ -519,6 +515,16 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || : %changelog +* Mon Dec 31 2007 Enrico Scholz - 0.92-4 +- added a README.fedora to the milter package (#240610) +- ship original sources again; unrar is now licensed correctly (no more + stolen code put under GPL). Nevertheless, this license is not GPL + compatible, and to allow libclamav to be used by GPL applications, + unrar is disabled by a ./configure switch. +- use pkg-config in clamav-config to emulate --cflags and --libs + operations (fixes partly multilib issues) +- registered some more auto-updated files and marked them as %%ghost + * Fri Dec 21 2007 Tom "spot" Callaway - 0.92-3 - updated to 0.92 (SECURITY): - CVE-2007-6335 MEW PE File Integer Overflow Vulnerability diff --git a/clamd-gen b/clamd-gen index 46739ba..ac5dae2 100755 --- a/clamd-gen +++ b/clamd-gen @@ -1,16 +1,16 @@ #! /bin/bash # Copyright (C) 2004 Enrico Scholz -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -19,7 +19,7 @@ function showHelp() { echo \ $"Usage: clamd-gen --service= --version= --release= - --license= --username=>USERNAME> + --license= --username=>USERNAME> " exit 0 } @@ -227,7 +227,7 @@ function rpm.genFiles %dir %minitsvcdir %config(noreplace) %verify(not mtime) %minitsvcdir/params %config %minitsvcdir/run - %minitsvcdir/respawn + %minitsvcdir/respawn %endif EOF } diff --git a/clamd-wrapper b/clamd-wrapper index 372005f..c32e34e 100644 --- a/clamd-wrapper +++ b/clamd-wrapper @@ -28,7 +28,7 @@ CLAMD_CONFIGFILE=/etc/clamd.d/${CLAMD_SERVICE}.conf CLAMD_OPTIONS= ## backward-compatibility check... for i in /var/run/clamd.${CLAMD_SERVICE}/clamd.sock \ - /var/run/clamav.${CLAMD_SERVICE}/clamd.sock; do + /var/run/clamav.${CLAMD_SERVICE}/clamd.sock; do CLAMD_SOCKET=$i test ! -e "$i" || break done diff --git a/freshclam-sleep b/freshclam-sleep index 2cb6bb2..7bdcf78 100755 --- a/freshclam-sleep +++ b/freshclam-sleep @@ -1,15 +1,15 @@ #! /bin/bash # Copyright (C) 2005 Enrico Scholz -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -33,7 +33,7 @@ case $FRESHCLAM_DELAY in (disabled-warn) echo $"\ WARNING: update of clamav database is disabled; please see - '$f' + '$f' for information how to enable the periodic update resp. how to turn off this message." >&2 exit 1 diff --git a/lastver b/lastver index 021c263..ca6156a 100644 --- a/lastver +++ b/lastver @@ -1 +1 @@ -0.91.2 +0.92 diff --git a/sources b/sources index 10dd892..6999f43 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -554d44a5b2265808750553d2e4d0d6fb clamav-0.92.clean.tar.gz +e500651858a9187a87025c8a5c23969c clamav-0.92.tar.gz +5ac3264d9b01b7dce93f646e247b2621 clamav-0.92.tar.gz.sig diff --git a/verinfo b/verinfo index 2d35ad0..a4a0b38 100644 --- a/verinfo +++ b/verinfo @@ -1,2 +1,2 @@ http://prdownloads.sourceforge.net/sourceforge/clamav/ -clamav-(.*?)\.tar\. +clamav-([0-9.-]*?)\.tar\.