diff --git a/.gitignore b/.gitignore index c07be39..f6ee443 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ +<<<<<<< HEAD clamav-0.95.1-norar.tar.bz2 +======= +clamav-0.95.3-norar.tar.bz2 +/clamav-0.97-clean.tar.bz2 +>>>>>>> el6 diff --git a/clamav-0.92-open.patch b/clamav-0.92-open.patch deleted file mode 100644 index 040fc20..0000000 --- a/clamav-0.92-open.patch +++ /dev/null @@ -1,11 +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; - diff --git a/clamav-0.92-private.patch b/clamav-0.92-private.patch deleted file mode 100644 index bab2948..0000000 --- a/clamav-0.92-private.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- 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-0.95-cliopts.patch b/clamav-0.95-cliopts.patch deleted file mode 100644 index 90d173f..0000000 --- a/clamav-0.95-cliopts.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: clamav-0.95rc1/shared/optparser.c -=================================================================== ---- clamav-0.95rc1.orig/shared/optparser.c -+++ clamav-0.95rc1/shared/optparser.c -@@ -211,7 +211,7 @@ const struct clam_option clam_options[] - - { "ExitOnOOM", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD, "Stop the daemon when libclamav reports an out of memory condition.", "yes" }, - -- { "Foreground", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no" }, -+ { "Foreground", "nofork", 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no" }, - - { "Debug", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM, "Enable debug messages in libclamav.", "no" }, - diff --git a/clamav-0.95rc1-umask.patch b/clamav-0.95rc1-umask.patch deleted file mode 100644 index 8a46216..0000000 --- a/clamav-0.95rc1-umask.patch +++ /dev/null @@ -1,39 +0,0 @@ -Index: clamav-0.95rc1/clamav-milter/clamav-milter.c -=================================================================== ---- clamav-0.95rc1.orig/clamav-milter/clamav-milter.c -+++ clamav-0.95rc1/clamav-milter/clamav-milter.c -@@ -287,7 +287,7 @@ int main(int argc, char **argv) { - - if((opt = optget(opts, "PidFile"))->enabled) { - FILE *fd; -- mode_t old_umask = umask(0006); -+ mode_t old_umask = umask(0022); - - if((fd = fopen(opt->strarg, "w")) == NULL) { - logg("!Can't save PID in file %s\n", opt->strarg); -Index: clamav-0.95rc1/shared/output.c -=================================================================== ---- clamav-0.95rc1.orig/shared/output.c -+++ clamav-0.95rc1/shared/output.c -@@ -250,7 +250,7 @@ int logg(const char *str, ...) - #endif - if(logg_file) { - if(!logg_fp) { -- old_umask = umask(0037); -+ old_umask = umask(0077); - if((logg_fp = fopen(logg_file, "at")) == NULL) { - umask(old_umask); - #ifdef CL_THREAD_SAFE -Index: clamav-0.95rc1/freshclam/freshclam.c -=================================================================== ---- clamav-0.95rc1.orig/freshclam/freshclam.c -+++ clamav-0.95rc1/freshclam/freshclam.c -@@ -102,7 +102,7 @@ static void writepid(const char *pidfile - { - FILE *fd; - int old_umask; -- old_umask = umask(0006); -+ old_umask = umask(0022); - if((fd = fopen(pidfile, "w")) == NULL) { - logg("!Can't save PID to file %s: %s\n", pidfile, strerror(errno)); - } else { diff --git a/clamav-0.97-clean.tar.bz2 b/clamav-0.97-clean.tar.bz2 new file mode 100644 index 0000000..9d39f27 Binary files /dev/null and b/clamav-0.97-clean.tar.bz2 differ diff --git a/clamav-milter.init b/clamav-milter.init new file mode 100644 index 0000000..62a2f91 --- /dev/null +++ b/clamav-milter.init @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Startup script for the Clamav Milter Daemon +# +# chkconfig: 2345 77 23 +# description: clamav-milter is a daemon which hooks into sendmail \ +# and routes email messages to clamav. +# processname: clamav-milter +# pidfile: /var/run/clamav/clamav-milter.pid +# config: /etc/sysconfig/clamav-milter + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +[ -x /usr/sbin/clamav-milter ] || exit 0 + +# Local clamav-milter config +CLAMAV_FLAGS= +test -f /etc/sysconfig/clamav-milter && . /etc/sysconfig/clamav-milter + +# See how we were called. +case "$1" in + start) + echo -n "Starting Clamav Milter Daemon: " + daemon clamav-milter $CLAMAV_FLAGS $SOCKET_ADDRESS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamav-milter + ;; + stop) + echo -n "Stopping Clamav Milter Daemon: " + killproc clamav-milter + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamav-milter + ;; + status) + status clamav-milter + RETVAL=$? + ;; + restart|reload) + $0 stop + $0 start + RETVAL=$? + ;; + condrestart) + [ -e /var/lock/subsys/clamd ] && restart + RETVAL=$? + ;; + *) + echo "Usage: clamav-milter {start|stop|status|restart|reload|condrestart}" + exit 1 +esac + +exit $RETVAL diff --git a/clamav-milter.sysv b/clamav-milter.sysv deleted file mode 100644 index 7c06c60..0000000 --- a/clamav-milter.sysv +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/sh -# -# clamav-milter This script starts and stops the clamav-milter daemon -# -# chkconfig: - 79 40 -# -# description: clamav-milter is a daemon which hooks into sendmail and routes \ -# email messages for virus scanning with ClamAV -# processname: clamav-milter -# pidfile: /var/lock/subsys/clamav-milter - -# Source function library. -. /etc/rc.d/init.d/functions - -# Source networking configuration. -. /etc/sysconfig/network - -# Local clamav-milter config -CLAMAV_FLAGS= -test -f /etc/sysconfig/clamav-milter && . /etc/sysconfig/clamav-milter - -# Check that networking is up. -[ ${NETWORKING} = "no" ] && exit 0 - -PATH=$PATH:/usr/bin:/usr/local/sbin:/usr/local/bin - -RETVAL=0 - -# Clamav-milter must have write access to the pid file, /var/run is not suitable -default_pidfile= -[ -d /var/run/clamav-milter ] && default_pidfile=/var/run/clamav-milter/clamav-milter.pid -[ -d /var/clamav ] && default_pidfile=/var/clamav/clamav-milter.pid -pidfile=${PIDFILE:-$default_pidfile} - -lockfile=/var/lock/subsys/clamav-milter - -start() { - echo -n "Starting clamav-milter: " - # Don't allow files larger than 25M to be created, to limit DoS - # Needs to be large enough to extract the signature files - ulimit -f 25600 - if [ ! -z $pidfile ]; then - CLAMAV_PID=--pidfile=${pidfile} - PID=`pidofproc -p ${pidfile} clamav-milter` - else - CLAMAV_PID= - PID=`pidofproc clamav-milter` - fi - [ -n "$PID" ] && echo " already running!" && return 1 - LANG= daemon clamav-milter $CLAMAV_PID ${CLAMAV_FLAGS} - RETVAL=$? - [ ! -z $pidfile -a -f $pidfile ] && sed -i -e 's/-//' $pidfile - echo - test $RETVAL -eq 0 && touch ${lockfile} - return $RETVAL -} - -stop() { - echo -n "Shutting down clamav-milter: " - if [ ! -z $pidfile ]; then - killproc -p ${pidfile} clamav-milter - else - killproc clamav-milter - fi - RETVAL=$? - echo - test $RETVAL -eq 0 && rm -f ${lockfile} ${pidfile} -} - -restart() { - stop - start -} - -# See how we were called. -case "$1" in - start) - # Start daemon. - start - ;; - stop) - # Stop daemon. - stop - ;; - restart|reload) - restart - ;; - condrestart) - test -f ${lockfile} && restart || : - ;; - status) - if [ ! -z $pidfile ]; then - status -p ${pidfile} clamav-milter - else - status clamav-milter - fi - ;; - *) - echo "Usage: $0 {start|stop|reload|restart|condrestart|status}" - exit 1 -esac - -exit $? diff --git a/clamav-notify-servers b/clamav-notify-servers deleted file mode 100644 index 22d57a6..0000000 --- a/clamav-notify-servers +++ /dev/null @@ -1,38 +0,0 @@ -#! /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. - -# Usage: clamav-notify-servers - -CFGFILE=/etc/sysconfig/clamav-servers -BASE=/var/lock/subsys/clamd. -INITRDDIR=/etc/init.d - -ok=1 - -f=/usr/sbin/clamav-notify-servers.local -test ! -e "$f" || . "$f" - -for i in ${BASE}*; do - test -e "$i" || continue - - srv=${INITRDDIR}/clamd.${i##${BASE}} - test -e "$srv" || continue - - "$srv" reload || ok= -done >/dev/null - -test "$ok" diff --git a/clamav-update.cron b/clamav-update.cron deleted file mode 100644 index 3f1b005..0000000 --- a/clamav-update.cron +++ /dev/null @@ -1,6 +0,0 @@ -## Adjust this line... -MAILTO=root,postmaster,webmaster,clamav - -## It is ok to execute it as root; freshclam drops privileges and becomes -## user 'clamav' as soon as possible -0 */3 * * * root /usr/share/clamav/freshclam-sleep diff --git a/clamav-update.logrotate b/clamav-update.logrotate deleted file mode 100644 index 0de6062..0000000 --- a/clamav-update.logrotate +++ /dev/null @@ -1,4 +0,0 @@ -/var/log/freshclam.log { - monthly - notifempty -} diff --git a/clamav.init b/clamav.init new file mode 100755 index 0000000..0e001fb --- /dev/null +++ b/clamav.init @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Startup script for the Clam AntiVirus Daemon +# +# chkconfig: 2345 61 39 +# description: Clam AntiVirus Daemon is a TCP/IP or socket protocol \ +# server. +# processname: clamd +# pidfile: /var/run/clamav/clamd.pid +# config: /etc/clamav.conf + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +[ -x /usr/sbin/clamd ] || exit 0 + +# See how we were called. +case "$1" in + start) + echo -n "Starting Clam AntiVirus Daemon: " + daemon clamd + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd + ;; + stop) + echo -n "Stopping Clam AntiVirus Daemon: " + killproc clamd + rm -f /var/clamav/clamd.socket + rm -f /var/run/clamav/clamav.pid + RETVAL=$? + echo +### heres the fix... we gotta remove the stale files on restart + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamd + ;; + status) + status clamd + RETVAL=$? + ;; + restart|reload) + $0 stop + $0 start + RETVAL=$? + ;; + condrestart) + [ -e /var/lock/subsys/clamd ] && restart + RETVAL=$? + ;; + *) + echo "Usage: clamd {start|stop|status|restart|reload|condrestart}" + exit 1 +esac + +exit $RETVAL + diff --git a/clamav.spec b/clamav.spec index 3f5dea1..6e138d3 100644 --- a/clamav.spec +++ b/clamav.spec @@ -1,901 +1,579 @@ -## Fedora Extras specific customization below... -# %bcond_without fedora -## +### FIXME: Sysv script does not have condrestart option (redo sysv script) +### FIXME: amavisd-new requires clamd to run as user vscan, solution needed +### REMINDER: Look and sync with Petr Kristof's work -%global username clamav -%global homedir %_var/lib/clamav -%global freshclamlog %_var/log/freshclam.log -%global milterlog %_var/log/clamd.milter -%global milteruser clamilt -%global milterstatedir %_var/run/clamav-milter -%global pkgdatadir %_datadir/%name +Summary: Anti-virus software +Name: clamav +Version: 0.97 +Release: 1%{?dist} +License: GPLv2 +Group: Applications/System +URL: http://www.clamav.net/ +# Upstream source includes libunrar that is not distributable. +#Source: http://downloads.sourceforge.net/clamav/clamav-%{version}.tar.gz +Source0: clamav-0.97-clean.tar.bz2 +Source1: clamav.init +Source2: clamav-milter.init +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -%{!?release_func:%global release_func() %1%{?dist}} - -Summary: End-user tools for the Clam Antivirus scanner -Name: clamav -Version: 0.95.1 -Release: %release_func 1 - -License: 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. -# tarball was created by -# make clean-sources [TARBALL=] [VERSION=] -Source0: %name-%version-norar.tar.bz2 -# 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 -Source1: clamd-wrapper -Source2: clamd.sysconfig -Source3: clamd.logrotate -Source5: clamd-README -Source6: clamav-update.logrotate -Source7: clamd.SERVICE.init -Source8: clamav-notify-servers -Patch24: clamav-0.92-private.patch -Patch25: clamav-0.92-open.patch -Patch26: clamav-0.95-cliopts.patch -Patch27: clamav-0.95rc1-umask.patch -BuildRoot: %_tmppath/%name-%version-%release-root -Requires: clamav-lib = %version-%release -Requires: data(clamav) -BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel -BuildRequires: ncurses-devel -BuildRequires: %_includedir/tcpd.h -BuildRequires: bc - -%package filesystem -Summary: Filesystem structure for clamav -Group: Applications/File -Provides: user(clamav) -Provides: group(clamav) -# Prevent version mix -Conflicts: %name < %version-%release -Conflicts: %name > %version-%release -BuildRequires: fedora-usermgmt-devel -%{?FE_USERADD_REQ} - -%package lib -Summary: Dynamic libraries for the Clam Antivirus scanner -Group: System Environment/Libraries -Requires: data(clamav) - -%package devel -Summary: Header files and libraries for the Clam Antivirus scanner -Group: Development/Libraries -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 -Group: Applications/File -Requires(pre): clamav-filesystem = %version-%release -Requires(postun): clamav-filesystem = %version-%release -Provides: data(clamav) = full -Conflicts: data(clamav) < full -Conflicts: data(clamav) > full - -%package data-empty -Summary: Empty data package for the Clam Antivirus scanner -Group: Applications/File -Provides: data(clamav) = empty -Conflicts: data(clamav) < empty -Conflicts: data(clamav) > empty - -%package update -Summary: Auto-updater for the Clam Antivirus scanner data-files -Group: Applications/File -Source200: freshclam-sleep -Source201: freshclam.sysconfig -Source202: clamav-update.cron -Requires: clamav-filesystem = %version-%release -Requires(pre): /etc/cron.d -Requires(postun): /etc/cron.d -Requires(post): %__chown %__chmod -Requires(post): group(clamav) - -%package server -Summary: Clam Antivirus scanner server -Group: System Environment/Daemons -Requires: init(clamav-server) -Requires: data(clamav) -Requires: clamav-filesystem = %version-%release -Requires: clamav-lib = %version-%release - -%package server-sysv -Summary: SysV initscripts for clamav server -Group: System Environment/Daemons -Provides: init(clamav-server) = sysv -Requires: clamav-server = %version-%release -Requires(pre): %_initrddir -Requires(postun): %_initrddir - -%package milter -Summary: Sendmail-milter for the Clam Antivirus scanner -Group: System Environment/Daemons -Requires: init(clamav-milter) -BuildRequires: sendmail-devel -BuildRequires: fedora-usermgmt-devel -Provides: user(%milteruser) -Provides: group(%milteruser) -Requires: sendmail -Requires(post): coreutils -%{?FE_USERADD_REQ} - -%package milter-sysv -Summary: SysV initscripts for the clamav sendmail-milter -Group: System Environment/Daemons -Source320: clamav-milter.sysv -Provides: init(clamav-milter) = sysv -Requires: clamav-milter = %version-%release -Requires(post): user(%milteruser) clamav-milter -Requires(preun): user(%milteruser) clamav-milter -Requires(pre): %_initrddir -Requires(postun): %_initrddir initscripts -Requires(post): chkconfig -Requires(preun): chkconfig initscripts +BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel +%{!?_without_milter:BuildRequires: sendmail-devel >= 8.12} +Requires: clamav-db = %{version}-%{release} +Requires(pre): shadow-utils +### Fedora Extras introduced them differently :( +Obsoletes: libclamav < %{version}-%{release} +Obsoletes: clamav-lib < %{version}-%{release} +Obsoletes: clamav-filesystem < %{version}-%{release} +Provides: libclamav %description -Clam AntiVirus is an anti-virus toolkit for UNIX. The main purpose of this -software is the integration with mail servers (attachment scanning). The -package provides a flexible and scalable multi-threaded daemon, a command -line scanner, and a tool for automatic updating via Internet. The programs -are based on a shared library distributed with the Clam AntiVirus package, -which you can use with your own software. The virus database is based on -the virus database from OpenAntiVirus, but contains additional signatures -(including signatures for popular polymorphic viruses, too) and is KEPT UP -TO DATE. +Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The main purpose of +this software is the integration with mail servers (attachment scanning). +The package provides a flexible and scalable multi-threaded daemon, a +command line scanner, and a tool for automatic updating via Internet. -%description filesystem -This package provides the filesystem structure and contains the -user-creation scripts required by clamav. +The programs are based on a shared library distributed with the Clam +AntiVirus package, which you can use with your own software. Most +importantly, the virus database is kept up to date -%description lib -This package contains dynamic libraries shared between applications -using the Clam Antivirus scanner. +%package -n clamd +Summary: The Clam AntiVirus Daemon +Group: System Environment/Daemons +Requires: clamav = %{version}-%{release} -%description devel -This package contains headerfiles and libraries which are needed to -build applications using clamav. +### Fedora Extras introduced them differently :( +Obsoletes: clamav-server <= %{version}-%{release} +Obsoletes: clamav-server-sysv <= %{version}-%{release} -%description data -This package contains the virus-database needed by clamav. This -database should be updated regularly; the 'clamav-update' package -ships a corresponding cron-job. This package and the -'clamav-data-empty' package are mutually exclusive. - -Use -data when you want a working (but perhaps outdated) virus scanner -immediately after package installation. - -Use -data-empty when you are updating the virus database regulary and -do not want to download a >5MB sized rpm-package with outdated virus -definitions. - - -%description data-empty -This is an empty package to fulfill inter-package dependencies of the -clamav suite. This package and the 'clamav-data' package are mutually -exclusive. - -Use -data when you want a working (but perhaps outdated) virus scanner -immediately after package installation. - -Use -data-empty when you are updating the virus database regulary and -do not want to download a >5MB sized rpm-package with outdated virus -definitions. - - -%description update -This package contains programs which can be used to update the clamav -anti-virus database automatically. It uses the freshclam(1) utility for -this task. To activate it, uncomment the entry in /etc/cron.d/clamav-update. - -%description server -ATTENTION: most users do not need this package; the main package has -everything (or depends on it) which is needed to scan for virii on -workstations. - -This package contains files which are needed to execute the clamd-daemon. -This daemon does not provide a system-wide service. Instead of, an instance -of this daemon should be started for each service requiring it. - -See the README file how this can be done with a minimum of effort. - - -%description server-sysv -SysV initscripts template for the clamav server +%description -n clamd +The Clam AntiVirus Daemon +%package milter +Summary: The Clam AntiVirus sendmail-milter Daemon +Group: Applications/System +Requires: clamd = %{version}-%{release} +Requires: sendmail +Obsoletes: clamav-milter-sysv <= %{version}-%{release} %description milter -This package contains files which are needed to run the clamav-milter. It -can be activated by adding +The Clam AntiVirus sendmail-milter Daemon -| INPUT_MAIL_FILTER(`clamav', `S=local:%milterstatedir/clamav.sock, F=, T=S:4m;R:4m')dnl +%package db +Summary: Virus database for %{name} +Group: Applications/Databases +### Remove circular dependency +#Requires: clamav = %{version}-%{release} -to your sendmail.mc. +### Fedora Extras introduced them differently :( +Obsoletes: clamav-update <= %{version}-%{release} +Obsoletes: clamav-data <= %{version}-%{release} -%description milter-sysv -The SysV initscripts for clamav-milter. +%description db +The actual virus database for %{name} +%package devel +Summary: Header files, libraries and development documentation for %{name} +Group: Development/Libraries +Requires: clamav = %{version}-%{release} -## ------------------------------------------------------------ +### Fedora Extras introduced them differently :( +Obsoletes: libclamav-static-devel <= %{version}-%{release} +Obsoletes: libclamav-devel <= %{version}-%{release} +Provides: libclamav-static-devel, libclamav-devel + +%description devel +This package contains the header files, static libraries and development +documentation for %{name}. If you like to develop programs using %{name}, +you will need to install %{name}-devel. %prep %setup -q -%patch24 -p1 -b .private -%patch25 -p1 -b .open -%patch26 -p1 -b .cliopts -%patch27 -p1 -b .umask +%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g;' libtool configure -mkdir -p libclamunrar{,_iface} -touch libclamunrar/{Makefile.in,all,install} +%{__perl} -pi.orig -e ' + s|\@DBDIR\@|\$(localstatedir)/clamav|g; + s|\@DBINST\@|\$(localstatedir)/clamav|g; + s|\@CFGDIR\@|\$(sysconfdir)|g; + s|\@CFGINST\@|\$(sysconfdir)|g; + s|^\@INSTALL_CLAMAV_CONF_TRUE\@|\t|g; + s|^\@INSTALL_FRESHCLAM_CONF_TRUE\@|\t|g; + ' database/Makefile.in etc/Makefile.in -sed -ri \ - -e 's!^(#?LogFile ).*!\1/var/log/clamd.!g' \ - -e 's!^(#?LocalSocket ).*!\1/var/run/clamd./clamd.sock!g' \ - -e 's!^(#?PidFile ).*!\1/var/run/clamd./clamd.pid!g' \ - -e 's!^#?(User ).*!\1!g' \ - -e 's!^#?(AllowSupplementaryGroups|LogSyslog).*!\1 yes!g' \ - -e 's! /usr/local/share/clamav,! %homedir,!g' \ - etc/clamd.conf +%{__perl} -pi.orig -e ' + s|^(Example)|#$1|; + s|^#(LogFile) .+$|$1 %{_localstatedir}/log/clamav/clamd.log|; + s|^#(LogFileMaxSize) .*|$1 0|; + s|^#(LogTime)|$1|; + s|^#(LogSyslog)|$1|; + s|^#(PidFile) .+$|$1 %{_localstatedir}/run/clamav/clamd.pid|; + s|^#(TemporaryDirectory) .+$|$1 %{_localstatedir}/tmp|; + s|^#(DatabaseDirectory) .+$|$1 %{_localstatedir}/clamav|; + s|^#(LocalSocket) .+$|$1 %{_localstatedir}/run/clamav/clamd.sock|; + s|^#(FixStaleSocket)|$1|; + s|^#(TCPSocket) .+$|$1 3310|; + s|^#(TCPAddr) .+$|$1 127.0.0.1|; + s|^#(MaxConnectionQueueLength) .+$|$1 30|; + s|^#(StreamSaveToDisk)|$1|; + s|^#(MaxThreads) .+$|$1 50|; + s|^#(ReadTimeout) .+$|$1 300|; + s|^#(User) .+$|$1 clam|; + s|^#(AllowSupplementaryGroups).*$|$1 yes|; + s|^#(ScanPE) .+$|$1 yes|; + s|^#(ScanELF) .+$|$1 yes|; + s|^#(DetectBrokenExecutables)|$1|; + s|^#(ScanOLE2) .+$|$1 yes|; + s|^#(ScanMail)|$1|; + s|^#(ScanArchive) .+$|$1 yes|; + s|^#(ArchiveMaxCompressionRatio) .+|$1 300|; + s|^#(ArchiveBlockEncrypted)|$1|; + s|^#(ArchiveBlockMax)|$1|; + ' etc/clamd.conf -sed -ri -e 's!^#(UpdateLogFile )!\1!g;' etc/freshclam.conf +%{__perl} -pi.orig -e ' + s|^(Example)|#$1|; + s|^#(DatabaseDirectory) .+$|$1 %{_localstatedir}/clamav|; + s|^#(UpdateLogFile) .+$|$1 %{_localstatedir}/log/clamav/freshclam.log|; + s|^#(LogSyslog)|$1|; + s|^#(DatabaseOwner) .+$|$1 clam|; + s|^(Checks) .+$|$1 24|; + s|^#(NotifyClamd) .+$|$1 %{_sysconfdir}/clamd.conf|; + ' etc/freshclam.conf - -## ------------------------------------------------------------ - -%build -CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -std=gnu99" -export LDFLAGS='-Wl,--as-needed' -# HACK: remove me, when configure uses $LIBS instead of $LDFLAGS for milter check -export LIBS='-lmilter -lpthread' -# IPv6 check is buggy and does not work when there are no IPv6 interface on build machine -export have_cv_ipv6=yes -%configure --disable-clamav --with-dbdir=/var/lib/clamav \ - --enable-milter --disable-static \ - --disable-rpath --disable-unrar - -# build with --as-needed and disable rpath -sed -i \ - -e 's! -shared ! -Wl,--as-needed\0!g' \ - -e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!\"\/lib \/usr\/lib !/\"/%_lib /usr/%_lib !g' \ - libtool - - -make %{?_smp_mflags} - - -## ------------------------------------------------------------ - -%install -rm -rf "$RPM_BUILD_ROOT" _doc* -make DESTDIR="$RPM_BUILD_ROOT" install - -function smartsubst() { - local tmp - local regexp=$1 - shift - - tmp=$(mktemp /tmp/%name-subst.XXXXXX) - for i; do - sed -e "$regexp" "$i" >$tmp - cmp -s $tmp "$i" || cat $tmp >"$i" - rm -f $tmp - done +cat <clamd.logrotate +%{_localstatedir}/log/clamav/clamd.log { + missingok + notifempty + create 644 clam clam + postrotate + killall -HUP clamd 2>/dev/null || : + endscript } - - -install -d -m755 \ - ${RPM_BUILD_ROOT}%_sysconfdir/{clamd.d,cron.d,logrotate.d,sysconfig} \ - ${RPM_BUILD_ROOT}%_var/log \ - ${RPM_BUILD_ROOT}%milterstatedir \ - ${RPM_BUILD_ROOT}%pkgdatadir/template \ - ${RPM_BUILD_ROOT}%_initrddir \ - ${RPM_BUILD_ROOT}%homedir - -rm -f ${RPM_BUILD_ROOT}%_sysconfdir/clamd.conf \ - ${RPM_BUILD_ROOT}%_libdir/*.la - - -touch ${RPM_BUILD_ROOT}%homedir/daily.cld -touch ${RPM_BUILD_ROOT}%homedir/main.cld - - -## prepare the server-files -mkdir _doc_server -install -m644 -p %SOURCE2 _doc_server/clamd.sysconfig -install -m644 -p %SOURCE3 _doc_server/clamd.logrotate -install -m755 -p %SOURCE7 _doc_server/clamd.init -install -m644 -p %SOURCE5 _doc_server/README -install -m644 -p etc/clamd.conf _doc_server/clamd.conf - -install -m644 -p %SOURCE1 $RPM_BUILD_ROOT%pkgdatadir -install -m755 -p %SOURCE100 $RPM_BUILD_ROOT%pkgdatadir -cp -pa _doc_server/* $RPM_BUILD_ROOT%pkgdatadir/template -ln -s %pkgdatadir/clamd-wrapper $RPM_BUILD_ROOT%_initrddir/clamd-wrapper - -smartsubst 's!/usr/share/clamav!%pkgdatadir!g' $RPM_BUILD_ROOT%pkgdatadir/clamd-wrapper - - -## prepare the update-files -install -m644 -p %SOURCE6 ${RPM_BUILD_ROOT}%_sysconfdir/logrotate.d/clamav-update -install -m755 -p %SOURCE8 ${RPM_BUILD_ROOT}%_sbindir/clamav-notify-servers -touch ${RPM_BUILD_ROOT}%freshclamlog - -install -p -m0755 %SOURCE200 $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep -install -p -m0644 %SOURCE201 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/freshclam -install -p -m0600 %SOURCE202 $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update - -smartsubst 's!webmaster,clamav!webmaster,%username!g; - s!/usr/share/clamav!%pkgdatadir!g; - s!/usr/bin!%_bindir!g; - s!/usr/sbin!%_sbindir!g;' \ - $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update \ - $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep - - -#### The milter stuff -function subst() { - sed -e 's!!milter!g;s!!%milteruser!g;'"$3" "$1" >"$RPM_BUILD_ROOT$2" -} - - -subst etc/clamd.conf /etc/clamd.d/milter.conf \ - 's!^##*\(\(LogFile\|LocalSocket\|PidFile\|User\)\s\|\(StreamSaveToDisk\|ScanMail\)$\)!\1!;' - - -cat <$RPM_BUILD_ROOT%_sysconfdir/sysconfig/clamav-milter -CLAMAV_FLAGS='-lo -c /etc/clamd.d/milter.conf local:%milterstatedir/clamav.sock' EOF -install -p -m 755 %SOURCE320 $RPM_BUILD_ROOT%_initrddir/clamav-milter -rm -f $RPM_BUILD_ROOT%_sysconfdir/clamav-milter.conf -touch $RPM_BUILD_ROOT%milterstatedir/clamav.sock $RPM_BUILD_ROOT%milterlog - - -## ------------------------------------------------------------ - -%clean -rm -rf "$RPM_BUILD_ROOT" - -## ------------------------------------------------------------ - -%pre filesystem -%__fe_groupadd 4 -r %username &>/dev/null || : -%__fe_useradd 4 -r -s /sbin/nologin -d %homedir -M \ - -c 'Clamav database update user' -g %username %username &>/dev/null || : - -%postun filesystem -%__fe_userdel %username &>/dev/null || : -%__fe_groupdel %username &>/dev/null || : - - -%post update -test -e %freshclamlog || { - touch %freshclamlog - %__chmod 0664 %freshclamlog - %__chown root:%username %freshclamlog +cat <freshclam.logrotate +%{_localstatedir}/log/clamav/freshclam.log { + missingok + notifempty + create 644 clam clam } +EOF -%pre milter -%__fe_groupadd 5 -r %milteruser &>/dev/null || : -%__fe_useradd 5 -r -s /sbin/nologin -d %milterstatedir -M \ - -c 'Clamav Milter User' -g %milteruser %milteruser &>/dev/null || : +cat <<'EOF' >freshclam.cron +#!/bin/sh + +### A simple update script for the clamav virus database. +### This could as well be replaced by a SysV script. + +### fix log file if needed +LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log" +if [ ! -f "$LOG_FILE" ]; then + touch "$LOG_FILE" + chmod 644 "$LOG_FILE" + chown clam.clam "$LOG_FILE" +fi + +%{_bindir}/freshclam \ + --quiet \ + --datadir="%{_localstatedir}/clamav" \ + --log="$LOG_FILE" \ + --log-verbose \ + --daemon-notify="%{_sysconfdir}/clamd.conf" +EOF + +%{__cat} <clamav-milter.sysconfig +### Simple config file for clamav-milter, you should +### read the documentation and tweak it as you wish. + +CLAMAV_FLAGS=" + --config-file=%{_sysconfdir}/clamd.conf + --force-scan + --local + --max-children=10 + --noreject + --outgoing + --quiet +" +SOCKET_ADDRESS="local:%{_localstatedir}/clamav/clmilter.socket" +EOF + +%build +%configure \ + --program-prefix="%{?_program_prefix}" \ +%{!?_without_milter:--enable-milter} \ + --disable-clamav \ + --disable-static \ + --disable-zlib-vcheck \ + --disable-unrar \ + --enable-id-check \ + --enable-dns \ + --with-dbdir="%{_localstatedir}/clamav" \ + --with-group="clam" \ + --with-libcurl \ + --with-user="clam" +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} +make install DESTDIR="%{buildroot}" + +install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamd +install -Dp -m0755 freshclam.cron %{buildroot}%{_sysconfdir}/cron.daily/freshclam +install -Dp -m0644 freshclam.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/freshclam +install -Dp -m0644 clamd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav + +%if %{!?_without_milter:1}0 +install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter +install -Dp -m0644 clamav-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter +%else +rm %{buildroot}%{_mandir}/man8/clamav-milter.8* +%endif + +install -d -m0755 %{buildroot}%{_localstatedir}/log/clamav/ +touch %{buildroot}%{_localstatedir}/log/clamav/freshclam.log +touch %{buildroot}%{_localstatedir}/log/clamav/clamd.log + +install -d -m0755 %{buildroot}%{_localstatedir}/run/clamav/ + +%post +/sbin/ldconfig + +ZONES="/usr/share/zoneinfo/zone.tab" +CONFIG="/etc/sysconfig/clock" + +if [ -r "$CONFIG" -a -r "$ZONES" ]; then + source "$CONFIG" + export CODE="$(grep -E "\b$ZONE\b" "$ZONES" | head -1 | cut -f1 | tr [A-Z] [a-z])" +fi + +if [ -z "$CODE" ]; then + export CODE="local" +fi + +%{__perl} -pi -e ' + s|^(DatabaseMirror) database\.clamav\.net$|$1 db.$ENV{"CODE"}.clamav.net\n$1 db.local.clamav.net|; + s|^(DatabaseMirror) db\.\.clamav\.net$|$1 db.$ENV{"CODE"}.clamav.net\n$1 db.local.clamav.net|; + ' %{_sysconfdir}/freshclam.conf{,.rpmnew} &>/dev/null || : + +%postun -p /sbin/ldconfig + +%pre +getent group clam >/dev/null || groupadd -r clam +getent passwd clam >/dev/null || \ +useradd -r -g clam -d /var/clamav -s /sbin/nologin \ + -c "Clam Anti Virus Checker" clam +exit 0 + +%pre -n clamd +getent group clam >/dev/null || groupadd -r clam +getent passwd clam >/dev/null || \ +useradd -r -g clam -d /var/clamav -s /sbin/nologin \ + -c "Clam Anti Virus Checker" clam +exit 0 + +%post -n clamd +/sbin/chkconfig --add clamd + +%preun -n clamd +if [ $1 -eq 0 ]; then + /sbin/service clamd stop &>/dev/null || : + /sbin/chkconfig --del clamd +fi + +%postun -n clamd +/sbin/service clamd condrestart &>/dev/null || : %post milter -test -e %milterlog || { - touch %milterlog - chmod 0620 %milterlog - chown root:%milteruser %milterlog -} - -%postun milter -%__fe_userdel %milteruser &>/dev/null || : -%__fe_groupdel %milteruser &>/dev/null || : - - -%post milter-sysv /sbin/chkconfig --add clamav-milter -%preun milter-sysv -test "$1" != 0 || %_initrddir/clamav-milter stop &>/dev/null || : -test "$1" != 0 || /sbin/chkconfig --del clamav-milter +%preun milter +if [ $1 -eq 0 ]; then + /sbin/service clamav-milter stop &>/dev/null || : + /sbin/chkconfig --del clamav-milter +fi -%postun milter-sysv -test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || : +%postun milter +/sbin/service clamav-milter condrestart &>/dev/null || : +%pre db +getent group clam >/dev/null || groupadd -r clam +getent passwd clam >/dev/null || \ +useradd -r -g clam -d /var/clamav -s /sbin/nologin \ + -c "Clam Anti Virus Checker" clam +exit 0 -%post lib -p /sbin/ldconfig -%postun lib -p /sbin/ldconfig - +%clean +rm -rf %{buildroot} %files -%defattr(-,root,root,-) -%doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README UPGRADE -%doc docs/*.pdf -%_bindir/* -%_mandir/man[15]/* -%exclude %_bindir/clamav-config -%exclude %_bindir/freshclam -%exclude %_mandir/*/freshclam* +%defattr(-, root, root, 0755) +%doc AUTHORS BUGS ChangeLog COPYING FAQ INSTALL NEWS README test/ +%doc docs/*.pdf etc/freshclam.conf +%doc %{_mandir}/man1/sigtool.1* +%doc %{_mandir}/man1/clamscan.1* +%doc %{_mandir}/man1/freshclam.1* +%doc %{_mandir}/man5/freshclam.conf.5* +%config(noreplace) %{_sysconfdir}/freshclam.conf +%{_bindir}/clamscan +%{_bindir}/freshclam +%{_bindir}/sigtool +%{_bindir}/clambc +%{_libdir}/libclamav.so.* -## ----------------------- +%files -n clamd +%defattr(-, root, root, 0755) +%doc etc/clamd.conf +%doc %{_mandir}/man1/clamdscan.1* +%doc %{_mandir}/man1/clamconf.1* +%doc %{_mandir}/man1/clamdtop.1* +%doc %{_mandir}/man5/clamd.conf.5* +%doc %{_mandir}/man8/clamd.8* +%config(noreplace) %{_sysconfdir}/clamd.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/clamav +%config %{_initrddir}/clamd +%{_sbindir}/clamd +%{_bindir}/clamconf +%{_bindir}/clamdscan -%files lib -%defattr(-,root,root,-) -%_libdir/*.so.* +%defattr(0644, clam, clam, 0755) +%{_localstatedir}/run/clamav/ +%dir %{_localstatedir}/clamav/ +%dir %{_localstatedir}/log/clamav/ +%ghost %{_localstatedir}/log/clamav/clamd.log +%exclude %{_localstatedir}/clamav/* -## ----------------------- +%if %{!?_without_milter:1}0 +%files milter +%defattr(-, root, root, 0755) +%doc %{_mandir}/man5/clamav-milter.conf.5* +%doc %{_mandir}/man8/clamav-milter.8* +%config(noreplace) %{_sysconfdir}/sysconfig/clamav-milter +%config %{_initrddir}/clamav-milter +%{_sbindir}/clamav-milter +%config(noreplace) %{_sysconfdir}/clamav-milter.conf +%endif + +%files db +%defattr(-, root, root, 0755) +%config(noreplace) %{_sysconfdir}/cron.daily/freshclam +%config(noreplace) %{_sysconfdir}/logrotate.d/freshclam + +%defattr(0644, clam, clam, 0755) +%config(noreplace) %verify(user group mode) %{_localstatedir}/clamav/ +%dir %{_localstatedir}/log/clamav/ +%ghost %{_localstatedir}/log/clamav/freshclam.log %files devel -%defattr(-,root,root,-) -%_includedir/* -%_libdir/*.so -%pkgdatadir/template -%pkgdatadir/clamd-gen -%_libdir/pkgconfig/* -%_bindir/clamav-config - -## ----------------------- - -%files filesystem -%attr(-,%username,%username) %dir %homedir -%attr(-,root,root) %dir %pkgdatadir - -## ----------------------- - -%files data -%defattr(-,%username,%username,-) -# use %%config to keep files which were updated by 'freshclam' -# already. Without this tag, they would be overridden with older -# versions whenever a new -data package is installed. -%config %verify(not size md5 mtime) %homedir/*.cvd - - -%files data-empty -%defattr(-,%username,%username,-) -%ghost %attr(0664,%username,%username) %homedir/*.cvd - - -## ----------------------- - -%files update -%defattr(-,root,root,-) -%_bindir/freshclam -%_mandir/*/freshclam* -%pkgdatadir/freshclam-sleep -%config(noreplace) %verify(not mtime) %_sysconfdir/freshclam.conf -%config(noreplace) %verify(not mtime) %_sysconfdir/logrotate.d/* -%config(noreplace) %_sysconfdir/cron.d/* -%config(noreplace) %_sysconfdir/sysconfig/freshclam - -%ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog -%ghost %attr(0664,%username,%username) %homedir/*.cld - - -## ----------------------- - -%files server -%defattr(-,root,root,-) -%doc _doc_server/* -%_mandir/man[58]/clamd* -%_sbindir/* -%pkgdatadir/clamd-wrapper -%dir %_sysconfdir/clamd.d - -%exclude %_sbindir/*milter* -%exclude %_mandir/man8/clamav-milter* - - -%files server-sysv -%defattr(-,root,root,-) -%_initrddir/clamd-wrapper - - -## ----------------------- - -%files milter -%defattr(-,root,root,-) -%_sbindir/*milter* -%_mandir/man8/clamav-milter* -%config(noreplace) %verify(not mtime) %_sysconfdir/clamd.d/milter.conf -%ghost %attr(0620,root,%milteruser) %verify(not size md5 mtime) %milterlog -%attr(0710,%milteruser,%milteruser) %dir %milterstatedir -%ghost %milterstatedir/* - - -%files milter-sysv -%defattr(-,root,root,-) -%config %_initrddir/clamav-milter -%config(noreplace) %verify(not mtime) %_sysconfdir/sysconfig/clamav-milter - +%defattr(-, root, root, 0755) +%{_bindir}/clamav-config +%{_includedir}/clamav.h +%{_libdir}/libclamav.so +%{_libdir}/pkgconfig/libclamav.pc +#%{_libdir}/libclamav.a +%exclude %{_libdir}/libclamav.la %changelog -* Fri Apr 10 2009 Robert Scheck - 0.95.1-1 -- Upgrade to 0.95.1 (#495036, #495039) and enabled IPv6 support -- Fixed typo in SysV initscript which removes 'touch' file (#473513) -- Added build requirement to ncurses-devel for clamdtop - -* Tue Dec 02 2008 Robert Scheck - 0.94.2-1 -- Upgrade to 0.94.2 (#474002) - -* Wed Nov 05 2008 Robert Scheck - 0.94.1-1 -- Upgrade to 0.94.1 - -* Sun Oct 26 2008 Robert Scheck - 0.94-1 -- Upgrade to 0.94 (SECURITY), fixes #461461: -- CVE-2008-1389 Invalid memory access in the CHM unpacker -- CVE-2008-3912 Out-of-memory NULL pointer dereference in mbox/msg -- CVE-2008-3913 Memory leak in code path in freshclam's manager.c -- CVE-2008-3914 Multiple file descriptor leaks on the code paths - -* Mon Jul 14 2008 Robert Scheck - 0.93.3-1 -- Upgrade to 0.93.3 (SECURITY), rediffed -initoff patch: -- CVE-2008-2713 Out-of-bounds read on petite files -- Put pid instead of pgrp into pid file of clamav-milter (#452359) - -* Wed Jun 18 2008 Robert Scheck - 0.93.1-1 -- Upgrade to 0.93.1 (SECURITY), rediffed -path patch: -- CVE-2008-2713 Invalid Memory Access Denial Of Service Vulnerability - -* Mon Apr 14 2008 Robert Scheck - 0.93-1 -- Upgrade to 0.93 (SECURITY): -- CVE-2008-1100 Upack processing buffer overflow (#442360) -- Removed *.inc directories; got replaced by *.cld containers - -* Thu Feb 14 2008 Robert Scheck - 0.92.1-1 -- Upgrade to 0.92.1 (SECURITY): -- CVE-2008-0318 Integer overflow in libclamav (#432623) - -* Fri Dec 21 2007 Tom "spot" Callaway - 0.92-4 -- EPEL fixes - -* Fri Dec 21 2007 Tom "spot" Callaway - 0.92-3 -- updated to 0.92 (SECURITY): -- CVE-2007-6335 MEW PE File Integer Overflow Vulnerability - -* Mon Oct 29 2007 Tom "spot" Callaway - 0.91.2-3 -- remove RAR decompression code from source tarball because of - legal problems (resolves 334371) -- correct license tag - -* Mon Sep 24 2007 Jesse Keating - 0.91.2-2 -- Bump release for upgrade path. - -* Sat Aug 25 2007 Enrico Scholz - 0.91.2-1 -- updated to 0.91.2 (SECURITY): -- CVE-2007-4510 DOS in RTF parser -- DOS in html normalizer -- arbitrary command execution by special crafted recipients in - clamav-milter's black-hole mode -- fixed an open(2) issue - -* Tue Jul 17 2007 Enrico Scholz - 0.91.1-0 -- updated to 0.91.1 - -* Thu Jul 12 2007 Enrico Scholz - 0.91-1 -- updated to 0.91 - -* Thu May 31 2007 Enrico Scholz - 0.90.3-1 -- updated to 0.90.3 -- BR tcpd.h instead of tcp_wrappers(-devel) to make it build both - in FC6- and F7+ - -* Fri Apr 13 2007 Enrico Scholz - 0.90.2-1 -- [SECURITY] updated to 0.90.2; fixes CVE-2007-1745, CVE-2007-1997 - -* Fri Mar 2 2007 Enrico Scholz - 0.90.1-2 -- BR 'tcp_wrappers-devel' instead of plain 'tcp_wrappers' - -* Fri Mar 2 2007 Enrico Scholz - 0.90.1-1 -- updated to 0.90.1 -- updated %%doc list - -* Sun Feb 18 2007 Enrico Scholz - 0.90-1 -- updated to final 0.90 -- removed -visibility patch since fixed upstream - -* Sun Feb 4 2007 Enrico Scholz - 0.90-0.3.rc3 -- build with -Wl,-as-needed and cleaned up pkgconfig file -- removed old hack which forced installation of freshclam.conf; related - check was removed upstream -- removed static library -- removed %%changelog entries from before 2004 - -* Sat Feb 3 2007 Enrico Scholz - 0.90-0.2.rc3 -- updated to 0.90rc3 -- splitted mandatory parts from the data-file into a separate -filesystem - subpackage -- added a -data-empty subpackage to allow a setup where database is - updated per cron-job and user does not want to download the large - -data package with outdated virus definitations (#214949) -- %%ghost'ed the files downloaded by freshclam - -* Tue Dec 12 2006 Enrico Scholz - 0.88.7-1 -- updated to 0.88.7 - -* Sun Nov 5 2006 Enrico Scholz - 0.88.6-1 -- updated to 0.88.6 - -* Wed Oct 18 2006 Enrico Scholz - 0.88.5-1 -- updated to 0.88.5 (SECURITY); fixes CVE-2006-4182, CVE-2006-5295 -- added patch to set '__attribute__ ((visibility("hidden")))' for - exported MD5_*() functions (fixes #202043) - -* Thu Oct 05 2006 Christian Iseli 0.88.4-4 - - rebuilt for unwind info generation, broken in gcc-4.1.1-21 - -* Thu Sep 21 2006 Enrico Scholz - 0.88.4-3 -- splitted SysV initscripts of -milter and -server into own subpackages - -* Fri Sep 15 2006 Enrico Scholz - 0.88.4-2 -- rebuilt - -* Tue Aug 8 2006 Enrico Scholz - 0.88.4-1 -- updated to 0.88.4 (SECURITY) - -* Wed Jul 12 2006 Enrico Scholz -- removed the clamdscan(1) manpage from the -server subpackage - -* Sat Jul 8 2006 Enrico Scholz -- removed a superfluous '}' -- removed some code which was relevant for FC-3 only - -* Sat Jul 8 2006 Enrico Scholz - 0.88.3-1 -- updated to 0.88.3 -- updated to new fedora-usermgmt macros - -* Tue May 16 2006 Enrico Scholz - 0.88.2-2 -- cleanups: removed unneeded curlies, use plain command instead of - %%__XXX macro, whitespace cleanup, removed unneeded versioned - dependencies -- added a 'Requires(post): group(clamav)' dependencies for -update and - added the corresponding Provides: to -data -- removed the %%_without_milter conditional; you won't gain anything - when milter would be disabled at buildtime - -* Sun Apr 30 2006 Enrico Scholz - 0.88.2-1 -- updated to 0.88.2 (SECURITY) -- rediffed patches; most issues handled by 0.88.1-2 are fixed in - 0.88.2 - -* Mon Apr 24 2006 Enrico Scholz - 0.88.1-2 -- added patch which fixes some classes of compiler warnings; at least - the using of implicitly declared functions was reported to cause - segfaults on AMD64 (brought to my attention by Marc Perkel) -- added patch which fixes wrong usage of strncpy(3) in unrarlib.c - -* Thu Apr 06 2006 Enrico Scholz - 0.88.1-1 -- updated to 0.88.1 (SECURITY) - -* Sat Feb 18 2006 Enrico Scholz - 0.88-2 -- rebuilt for FC5 - -* Tue Jan 10 2006 Enrico Scholz - 0.88-1 -- updated to 0.88 -- added pseudo-versions for the 'init(...)' provides as a first step - for the support of alternative initmethods - -* Tue Nov 15 2005 Enrico Scholz - 0.87.1-2 -- moved 'freshclam.conf.5' man page into the -update subpackage (#173221) -- ship 'clamd.conf.5' man page in the -server subpackage *too*. The - same file is contained in multiple packages now, but this man-page - can not be removed from the base package because it also applies to - 'clamdscan' there (#173221). - -* Fri Nov 4 2005 Enrico Scholz - 0.87.1-1 -- updated to 0.87.1 - -* Sat Sep 17 2005 Enrico Scholz - 0.87-1 -- updated to 0.87 (SECURITY) -- removed -timeout patch; it is solved upstream -- reverted the -exim changes; they add yet more complexity, their - functionality can go into an own package and they contained flaws - -* Fri Sep 9 2005 David Woodhouse - 0.86.2-5 -- Add clamav-exim configuration package - -* Fri Jul 29 2005 Enrico Scholz - 0.86.2-4 -- [milter] create the milter-logfile in the %%post scriptlet -- [milter] reverted the change of the default child_timeout value; it - was set to 5 minutes in 0.86.2 which conflicts with the internal - mode where a timeout must not be set. So, the clamav-milter would - not run with the default configuration - -* Thu Jul 28 2005 Enrico Scholz - 0.86.2-3 -- Fixed calculation of sleep duration; on some systems/IPs, `hostid` - results in a negative number which is retained by the bash - modulo-operation. So the sleep may get a negative number of seconds - being interpreted as an option. This version makes sure that the - module-operations returns a non-negative value. [BZ #164494, James - Wilkinson] -- added support for a /usr/sbin/clamav-notify-servers.local hook; this - file will be executed (source'd) before all other actions and can - abort the entire processing by invoking 'exit' - -* Mon Jul 25 2005 Enrico Scholz - 0.86.2-2 -- updated to 0.86.2 (SECURITY) -- changed the freshclam updating mechanism (again); now, it consists - of a crontab which does not need to be changed and a helper script - (freshclam-sleep). This helper script is configured by - /etc/sysconfig/freshclam - -* Sat Jun 25 2005 Enrico Scholz - 0.86.1-2 -- updated to 0.86.1 -- fixed randomization in %%post scriptlet: hour should be a range but - not a single number - -* Tue Jun 21 2005 Enrico Scholz - 0.86-1 -- updated to 0.86 -- randomize freshclam startup times in -update's %%post script (suggested - by Stephen Smoogen); this requires some more Requires(post): also - -* Wed May 18 2005 Warren Togami - 0.85.1-4 -- fix dist tagging the way Enrico wants it - -* Tue May 17 2005 Oliver Falk - 0.85.1-2 -- Rebuild - -* Tue May 17 2005 Oliver Falk - 0.85.1-1 -- Update - -* Sat May 14 2005 Enrico Scholz - 0.85-0 -- updated to 0.85 - -* Sun May 1 2005 Enrico Scholz - 0.84-0 -- updated to 0.84 - -* Fri Apr 7 2005 Michael Schwendt -- rebuilt - -* Tue Feb 15 2005 Enrico Scholz - 0:0.83-1 -- updated to 0.83 - -* Tue Feb 8 2005 Enrico Scholz - 0:0.82-1 -- updated to 0.82 -- minor spec cleanups - -* Fri Jan 28 2005 Enrico Scholz - 0:0.81-0.fdr.2 -- build the package with '--disable-zlib-vcheck' because RH is unable to - apply a fix for a 5 month old and solved security issue. Please fill - your comments at https://bugzilla.redhat.com/beta/show_bug.cgi?id=131385 -- added 'BuildRequires: bc' (should work without also, but ./configure - gives out ugly warnings else) - -* Fri Jan 28 2005 Enrico Scholz - 0:0.81-0.fdr.1 -- updated to 0.81 -- do not ship the 'clamd.milter' daemon anymore; clamav-milter supports - an internal mode now which is enabled by default -- updated -milter %%description - -* Thu Jan 20 2005 Enrico Scholz - 0:0.80-0.fdr.2 -- s!cron.d/clamav!cron.d/clamav-update! in the %%description of the -update - subpackage (https://bugzilla.fedora.us/show_bug.cgi?id=1715#c39) - -* Wed Nov 3 2004 Enrico Scholz - 0:0.80-0.fdr.1 -- updated to 0.80 -- removed DMS, FreeBSD-HOWTO and localized docs as it is not shipped anymore -- buildrequire 'curl-devel' -- renamed clamav.conf to clamd.conf (upstream change) -- updated -initoff patch - -* Tue Sep 14 2004 Enrico Scholz - 0:0.75.1-0.fdr.1 -- updated to 0.75.1 -- use %%configure, the problems with the architecture specification - seem to have passed (probably because of an autoconf update) -- set mode 0600 for the cron-script (required by vixie-cron) -- made the cronjob a spambot and send mail about deactivated freshclam - service to nearly everybody... (root, postmaster, webmaster) -- other fixes in the notification cronjob - -* Fri Jul 23 2004 Enrico Scholz - 0:0.75-0.fdr.1 -- updated to 0.75 - -* Thu Jul 15 2004 Enrico Scholz - 0:0.74-0.fdr.2 -- moved /usr/bin/clamav-config from main into -devel - -* Wed Jun 30 2004 Enrico Scholz - 0:0.74-0.fdr.1 -- updated to 0.74 - -* Mon Jun 14 2004 Enrico Scholz - 0:0.73-0.fdr.1 -- updated to 0.73 -- added pkgconfig file - -* Fri Jun 11 2004 Enrico Scholz - 0:0.72-0.fdr.3 -- notify the user about a deactivated clamav-update service -- added clamd-gen script which generates template spec-files for - services using clamd -- copied template configuration files to %pkgdatadir/template (needed - for clamd-gen) -- moved the clamd-wrapper from %_initrddir to %{pkgdatadir}; a symlink - will be provided for compatibility reasons -- conditionalized building of the -milter subpackage ('--without - milter' switch) to enable builds on RH73 (bug #1715, comment #5/#7) - -* Fri Jun 4 2004 Enrico Scholz - 0:0.72-0.fdr.2 -- removed 'BuildRequires: dietlibc'; it was a leftover from the - pre-use-signal era (before 0.70) (bug #1716) - -* Thu Jun 3 2004 Enrico Scholz - 0:0.72-0.fdr.1 -- updated to 0.72 - -* Thu May 20 2004 Enrico Scholz - 0:0.71-0.fdr.2 -- removed the randomization in the cronjob; it seems to be impossible - to use the mod-operator (%%) there. Instead of, the user has to - replace some placeholders... - -* Wed May 19 2004 Enrico Scholz - 0:0.71-0.fdr.1 -- updated to 0.71 - -* Fri May 7 2004 Enrico Scholz - 0:0.70-0.fdr.1.1 -- quote 'EOF' to delay $RANDOM expansion - -* Tue Apr 27 2004 Enrico Scholz - 0:0.70-0.fdr.2 -- updated GECOS entry for the 'clamav' user to describe its purpose - more accurately -- use explicit '-m755' when creating directories with install - -* Tue Apr 20 2004 Enrico Scholz - 0:0.70-0.fdr.1 -- updated to 0.70; rediffed some patches -- updated logrotate script to use signals and documented the steps - which are needed to make it work -- adapted initscript to use signals instead of sockwrite -- removed sockwrite; signals can now be used to reload the database -- added logfile to the -milter subpackage - -* Tue Apr 20 2004 Enrico Scholz - 0:0.68-0.fdr.2.1 -- tagged some Requires:, since clamav-server is required in the milter-%%post* scriptlets - -* Sat Mar 20 2004 Enrico Scholz - 0:0.68-0.fdr.2 -- split the double Requires(...,...): statements; see - https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=118773 -- require the recent fedora-usermgmt package (0.7) which fixes similar - ordering issues - -* Thu Mar 18 2004 Enrico Scholz - 0:0.68-0.fdr.1 -- updated to 0.68 (using the -1 version) -- ship milter-files in the -milter instead of the -server subpackage - -* Tue Feb 24 2004 Enrico Scholz - 0:0.67-0.fdr.3 -- fixed ':' vs. '.' in chown - -* Tue Feb 17 2004 Enrico Scholz - 0:0.67-0.fdr.2 -- randomize freshclam startup to prevent server peaks - -* Mon Feb 16 2004 Enrico Scholz - 0:0.67-0.fdr.1 -- updated to 0.67 (using the -1 version) - -* Wed Feb 11 2004 Enrico Scholz - 0:0.66-0.fdr.2 -- updated to 0.66; important, packaging-relevant changes are - freshclam: - * $http_proxy is not supported anymore; you have to configure it in - /etc/freshclam.conf - * the logfile has been renamed to /var/log/freshclam.log -- removed %%check section; buildroot check is implemented in local - testsuite already -- added some %%verify(not mtime) modifiers to avoid unnecessary .rpmnew - files -- added some directory-Requires: -- activated milter-package and made it work -- added patch to disable clamav-milter service by default -- renamed /var/run/clamav. to /var/run/clamd.; this - makes things more consistently but can break backward compatibility. The - initscript should deal with the old version too, but I would not bet on - it... -- updated some descriptions -- fixed the update-mechanism; now it happens in two stages: at first, - the files will be downloaded as user 'clamav' and then, root initiates - the daemon-reload. - -* Mon Feb 9 2004 Enrico Scholz - 0:0.65-0.fdr.5 -- added security fix for - http://www.securityfocus.com/archive/1/353194/2004-02-06/2004-02-12/1 +* Tue Feb 08 2011 Kevin Fenzi - 0.97-1 +- Update to 0.97 +- Fix up for current guidelines. + +* Fri Nov 23 2007 Kevin Fenzi - 0.91.2-3 +- Change username to get upgrades from fedora versions working. + +* Thu Nov 22 2007 Kevin Fenzi - 0.91.2-2 +- Initial changes for EPEL version. + +* Tue Aug 21 2007 Dag Wieers - 0.91.2-1 +- Updated to release 0.91.2. + +* Tue Jul 17 2007 Dag Wieers - 0.91.1-1 +- Updated to release 0.91.1. + +* Wed Jul 11 2007 Dag Wieers - 0.91-1 +- Updated to release 0.91. + +* Thu May 31 2007 Dag Wieers - 0.90.3-1 +- Updated to release 0.90.3. + +* Fri Apr 27 2007 Dag Wieers - 0.90.2-2 +- Added clamav-milter support for EL2.1 now that it comes with a newer sendmail. (Tom G. Christensen) + +* Sun Apr 15 2007 Dag Wieers - 0.90.2-1 +- Updated to release 0.90.2. + +* Fri Mar 09 2007 Dag Wieers - 0.90.1-4 +- Removed circular dependency. + +* Thu Mar 08 2007 Dag Wieers - 0.90.1-3 +- Cleaned up default options to clamav-milter. (Adam T. Bowen) +- Removed -b/--bounce as it is no longer recognized. (Gerald Teschl) + +* Mon Mar 05 2007 Dag Wieers - 0.90.1-2 +- Removed the erroneous --dont-clean-log from the clamav-milter sysconfig. (Gerald Teschl) + +* Fri Mar 02 2007 Dag Wieers - 0.90.1-1 +- Updated to release 0.90.1. + +* Tue Feb 20 2007 Dag Wieers - 0.90-3 +- Do the right thing... + +* Mon Feb 19 2007 Dag Wieers - 0.90-2 +- The tarball was re-rolled before public release. Sigh. + +* Tue Feb 13 2007 Dag Wieers - 0.90-1 +- Updated to release 0.90. + +* Tue Dec 12 2006 Dag Wieers - 0.88.7-1 +- Updated to release 0.88.7. + +* Sun Nov 05 2006 Dag Wieers - 0.88.6-1 +- Updated to release 0.88.6. +- Added condrestart to sysv scripts. (Tsai Li Ming) + +* Sat Oct 28 2006 Dag Wieers - 0.88.5-2 +- Added missing clamav dependency to clamav-db. + +* Sun Oct 15 2006 Dag Wieers - 0.88.5-1 +- Updated to release 0.88.5. + +* Mon Aug 07 2006 Dag Wieers - 0.88.4-1 +- Updated to release 0.88.4. + +* Mon Aug 07 2006 Dag Wieers - 0.88.3-2 +- Incorporated UPX heap overflow fix. + +* Sat Jul 01 2006 Dag Wieers - 0.88.3-1 +- Updated to release 0.88.3. + +* Sun Apr 30 2006 Dag Wieers - 0.88.2-1 +- Updated to release 0.88.2. + +* Tue Apr 04 2006 Dag Wieers - 0.88.1-1 +- Updated to release 0.88.1. + +* Mon Jan 09 2006 Dag Wieers - 0.88-1 +- Updated to release 0.88. + +* Sun Nov 13 2005 Dries Verachtert - 0.87.1-1 +- Updated to release 0.87.1. + +* Sat Sep 17 2005 Dag Wieers - 0.87-1 +- Updated to release 0.87. + +* Mon Jul 25 2005 Dag Wieers - 0.86.2-1 +- Updated to release 0.86.2. + +* Mon Jul 11 2005 Dag Wieers - 0.86.1-1 +- Updated to release 0.86.1. + +* Mon May 16 2005 Dag Wieers - 0.85.1-1 +- Updated to release 0.85.1. + +* Fri Apr 29 2005 Dag Wieers - 0.84-1 +- Updated to release 0.84. + +* Mon Feb 14 2005 Dag Wieers - 0.83-1 +- Updated to release 0.83. + +* Thu Feb 10 2005 Dag Wieers - 0.82-2 +- Fix for false positive on RIFF files. (Roger Jochem) + +* Mon Feb 07 2005 Dag Wieers - 0.82-1 +- Updated to release 0.82. + +* Thu Jan 27 2005 Dag Wieers - 0.81-1 +- Improved logrotate scripts. (Filippo Grassilli) +- Updated to release 0.81. + +* Wed Dec 01 2004 Dag Wieers - 0.80-2 +- Added %%dir /var/clamav/log. (Adam Bowns) +- Changed logrotate script to use clamd.log. (Stuart Schneider) +- Added curl dependency. (Petr Kristof) +- Synchronized some options from Petr. (Petr Kristof) +- Fixed another clamav.conf reference. (Michael Best) + +* Mon Nov 01 2004 Dag Wieers - 0.80-1 +- Updated package description. (Arvin Troels) +- Incorporated fixes from Jima. (Jima) +- Config clamav.conf renamed to clamd.conf. +- Removed obsolete patch. +- Added macros for building without milter. +- Updated to release 0.80. + +* Fri Jul 30 2004 Dag Wieers - 0.75.1-1 +- Added obsoletes for fedora.us. +- Updated to release 0.75.1. + +* Mon Jul 26 2004 Dag Wieers - 0.75-2 +- Fixed a problem where $CODE was empty. + +* Fri Jul 23 2004 Dag Wieers - 0.75-1 +- Updated to release 0.75. + +* Wed Jun 30 2004 Dag Wieers - 0.74-1 +- Updated to release 0.74. + +* Tue Jun 15 2004 Dag Wieers - 0.73-1 +- Updated to release 0.73. + +* Thu Jun 03 2004 Dag Wieers - 0.72-1 +- Updated to release 0.72. + +* Thu May 20 2004 Dag Wieers - 0.71-1 +- Updated to release 0.71. + +* Sun May 02 2004 Dag Wieers - 0.70-2 +- Fixed the installation check for conf files. (Richard Soderberg, Udo Ruecker) +- Changed the init-order of the sysv scripts. (Will McCutcheon) +- Changes to the default configuration files. + +* Sat Mar 17 2004 Dag Wieers - 0.70-1 +- Updated to release 0.70. + +* Tue Mar 16 2004 Dag Wieers - 0.68-1 +- Updated to release 0.68. + +* Fri Mar 12 2004 Dag Wieers - 0.67.1-1 +- Updated to release 0.67-1. +- Added clamdwatch and trashcan to clamd. + +* Mon Mar 08 2004 Dag Wieers - 0.67-1 +- Personalized SPEC file. + +* Mon Aug 22 2003 Matthias Saou/Che +- Added "--without milter" build option. (Matthias Saou) +- Fixed freshclam cron (Matthias Saou) +- Built the new package. (Che) + +* Tue Jun 24 2003 Che +- clamav-milter introduced. +- a few more smaller fixes. + +* Sun Jun 22 2003 Che +- version upgrade + +* Mon Jun 16 2003 Che +- rh9 build +- various fixes +- got rid of rpm-helper prereq + +* Fri Mar 24 2003 Che +- some cleanups and fixes +- new patch added + +* Fri Nov 22 2002 Che +- fixed a config patch issue + +* Fri Nov 22 2002 Che +- version upgrade and some fixes + +* Sat Nov 02 2002 Che +- version upgrade + +* Wed Oct 24 2002 Che +- some important changes for lsb compliance + +* Wed Oct 23 2002 Che +- initial rpm release diff --git a/clamd-README b/clamd-README deleted file mode 100644 index e62b487..0000000 --- a/clamd-README +++ /dev/null @@ -1,58 +0,0 @@ -To create individual clamd-instance take the following files and -modify/copy them in the suggested way: - -clamd.conf: - * set LogFile, PidFile, LocalSocket and User to suitable values - * place this file into /etc/clamd.d with an unique service-name; - e.g. as /etc/clamd.d/.conf - - To make logfile rotation work properly, the LogFile should be - writable for the assigned User. Recommended way to reach this, is - to: - * make it owned by the User's *group* - * assign at least 0620 (u+rw,g+w) permissions - - A suitable command might be - | # touch - | # chgrp - | # chmod 0620 - - NEVER use 'clamav' as the user since he can modify the database. - This is the user who is running the application; e.g. for mimedefang - (http://www.roaringpenguin.com/mimedefang), the user might be - 'defang'.Theoretically, distinct users could be used, but it must be - made sure that the application-user can write into the socket-file, - and that the clamd-user can access the files asked by the - application to be checked. - - -clamd.logrotate: - * set the correct value for the logfile - * place it into /etc/logrotate.d - -clamd.sysconfig: - * set the name of the config-file and the local socket - * copy it to /etc/sysconfig/clamd. - -clamd.init: - * set the service-name - * place it into /etc/init.d/ with an unique name and activate it - (e.g. with /sbin/chkconfig clamd. on) - -Additionally, a symlink must be set to clamd in a way like - | # ln -s clamd /usr/sbin/clamd. -and the directory for the socket file must be created (see 'LocalSocket' -in clamd.conf) - | # mkdir -p /var/run/clamd. - - -This directory must be writable by the 'User' chosen in the config-file. - - - -[Disclaimer: - this file and the script/configfiles are not part of the official - clamav package. - - Please send complaints and comments to - mailto:enrico.scholz@informatik.tu-chemnitz.de!] diff --git a/clamd-gen b/clamd-gen deleted file mode 100755 index 46739ba..0000000 --- a/clamd-gen +++ /dev/null @@ -1,269 +0,0 @@ -#! /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. - -function showHelp() -{ - echo \ -$"Usage: clamd-gen --service= --version= --release= - --license= --username=>USERNAME> -" - exit 0 -} - -function rpm.generatePreamble() -{ - cat < sysv -Requires: clamav-server-sysv -Requires(post): %name = %epoch:%version-%release -Requires(post): diffutils mktemp %__chkconfig -Requires(preun): %__chkconfig -Requires(pre): %_initrddir -Requires(postun): %_initrddir - -%package minit -Summary: minit initscripts for a %service clamav-server -Group: System Environment/Daemons -Provides: init(%name) = minit -Conflicts: init(%name) < minit -Conflicts: init(%name) > minit -Requires(post): %name = %epoch:%version-%release -Requires(post): diffutils mktemp -Requires(pre): minit-setup -Requires(postun): minit-setup -Requires(triggers): minit-tools - - -%description -Basic setup for a clamav server for '%service'. - - -%description sysv -Basic setup for a clamav server for '%service'. - -This package contains initscripts for SysV based systems. - - -%description minit -Basic setup for a clamav server for '%service'. - -This package contains initscripts for minit based systems. - -EOF -} - - -function rpm.genBody() -{ - cat <<"XEOFX" -%prep -%build - -%install -rm -rf $RPM_BUILD_ROOT -%__install -d -m755 $RPM_BUILD_ROOT{%minitsvcdir,%_sbindir,%rundir,/var/log} - -d=/usr/share/clamav/template - -function subst -{ - src=$d/$1 - dst=$RPM_BUILD_ROOT$2 - - %__install -d -m755 $(dirname "$dst") - sed -e 's!^\(#?LogFile \).*!\1%logfile!g; - s!^#?\(LocalSocket \).*!\1%rundir/clamd.sock!g; - s!^#?\(PidFile \).*!\1%rundir/clamd.pid!g; - s!!%service!g; - s!!%username!g;' "$src" >"$dst" - chmod --reference "$src" "$dst" -} - -subst clamd.conf %conffile -subst clamd.logrotate %_sysconfdir/logrotate.d/clamd.%service - -%if 0%{!?_without_sysv:1} -subst clamd.sysconfig %_sysconfdir/sysconfig/clamd.%service -subst clamd.init %_initrddir/clamd.%service -%endif - -ln -s clamd $RPM_BUILD_ROOT%_sbindir/clamd.%service - -touch $RPM_BUILD_ROOT%logfile -touch $RPM_BUILD_ROOT%rundir/clamd.sock - -%if 0%{!?_without_minit:1} -ln -s %_sbindir/clamd.%service $RPM_BUILD_ROOT%minitsvcdir/run -touch $RPM_BUILD_ROOT%minitsvcdir/respawn -cat <$RPM_BUILD_ROOT%minitsvcdir/params --c -%conffile -EOF -%endif - -%clean -rm -rf $RPM_BUILD_ROOT - - -%triggerin minit -- %baseservice -minit-svc add services/clamd.%service services/%baseservice/ - -%triggerun minit -- %baseservice -test "$1" != 0 -a "$2" != 0 || \ - minit-svc del services/clamd.%service services/%baseservice/ - - -%post minit -d=$(mktemp /tmp/clamd.%service.XXXXXX) -sed -e 's!^#Foreground!Foreground!' "%conffile" >"$d" -grep -q '^Foreground' $d || echo 'Foreground' >>$d -cmp -s "$d" %conffile || cat "$d" >"%conffile" -rm -f "$d" - -%post sysv -d=$(mktemp /tmp/clamd.%service.XXXXXX) -sed -e 's!^Foreground!#Foreground!' "%conffile" >"$d" -cmp -s "$d" %conffile || cat "$d" >"%conffile" -rm -f "$d" - -%__chkconfig --add %name - - -%preun sysv -test "$1" != 0 || %__chkconfig --del %name - -XEOFX -} - - -function rpm.genFiles -{ - cat <<"EOF" -%files -%defattr(-,root,root,-) -%doc -%config(noreplace) %verify(not size md5 mtime) %attr(0620,root,%username) %logfile -%config(noreplace) %verify(not mtime) %conffile -%config(noreplace) %verify(not mtime) %_sysconfdir/logrotate.d/clamd.%service -%_sbindir/clamd.%service -%dir %attr(0700,%username,root) %rundir -%ghost %rundir/clamd.sock - - -%if 0%{!?_without_sysv:1} -%files sysv -%defattr(-,root,root,-) -%config %verify(not mtime) %_initrddir/clamd.%service -%config(noreplace) %verify(not mtime) %_sysconfdir/sysconfig/clamd.%service -%endif - - -%if 0%{!?_without_minit:1} -%files minit -%defattr(-,root,root,-) -%dir %minitsvcdir -%config(noreplace) %verify(not mtime) %minitsvcdir/params -%config %minitsvcdir/run - %minitsvcdir/respawn -%endif -EOF -} - - -SERVICE= -VERSION= -RELEASE= -LICENSE= -USERNAME= -tmp=$(getopt -o '' --long service:,version:,release:,license:,username:,help -n "$0" -- "$@") || exit 1 -eval set -- "$tmp" - -while true; do - case "$1" in - (--help) showHelp $0;; - (--service) SERVICE=$2; shift;; - (--version) VERSION=$2; shift;; - (--release) RELEASE=$2; shift;; - (--license) LICENSE=$2; shift;; - (--username) USERNAME=$2; shift;; - (--) shift; break;; - esac - shift -done - -for i in SERVICE VERSION RELEASE LICENSE USERNAME; do - eval tmp=\$${i} - test "$tmp" || { - echo $"No value for $i specified; assuming @${i}@" >&2; - eval $i=@${i}@; - } -done - - -rpm.generatePreamble -rpm.generateHeader -rpm.genBody -rpm.genFiles diff --git a/clamd.SERVICE.init b/clamd.SERVICE.init deleted file mode 100644 index 9681351..0000000 --- a/clamd.SERVICE.init +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# -# chkconfig: - 75 25 -# description: The clamd server running for - -CLAMD_SERVICE= -. /usr/share/clamav/clamd-wrapper diff --git a/clamd.logrotate b/clamd.logrotate deleted file mode 100644 index 0b0b531..0000000 --- a/clamd.logrotate +++ /dev/null @@ -1,9 +0,0 @@ -/var/log/clamd. { - monthly - notifempty - missingok - - postrotate - killall -HUP clamd. 2>/dev/null || : - endscript -} diff --git a/clamd.sysconfig b/clamd.sysconfig deleted file mode 100644 index 4933e7e..0000000 --- a/clamd.sysconfig +++ /dev/null @@ -1,3 +0,0 @@ -#CLAMD_CONFIGFILE=/etc/clamd.d/.conf -#CLAMD_SOCKET=/var/run/clamd./clamd.sock -#CLAMD_OPTIONS= diff --git a/freshclam-sleep b/freshclam-sleep deleted file mode 100755 index 2cb6bb2..0000000 --- a/freshclam-sleep +++ /dev/null @@ -1,57 +0,0 @@ -#! /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. - - -FRESHCLAM_MOD=$[ 3*60 ] # 3 hours - -f=/etc/sysconfig/freshclam -test ! -e "$f" || . "$f" - - -case x"$1" in - (xnow) FRESHCLAM_DELAY=0;; - (x|xrandom) : ${FRESHCLAM_DELAY:=$[ 0x`hostid` ]};; - (*) FRESHCLAM_DELAY=$1;; -esac - -set -e - -case $FRESHCLAM_DELAY in - (disabled-warn) - echo $"\ -WARNING: update of clamav database is disabled; please see - '$f' - for information how to enable the periodic update resp. how to turn - off this message." >&2 - exit 1 - ;; - - (disabled) - exit 0 - ;; - - (*) - let FRESHCLAM_MOD*=60 - sleep $[ (FRESHCLAM_DELAY % FRESHCLAM_MOD + FRESHCLAM_MOD) % FRESHCLAM_MOD ] - ;; -esac - - -/usr/bin/freshclam --quiet && { - test -x /usr/sbin/clamav-notify-servers && \ - exec /usr/sbin/clamav-notify-servers || \ - : -} diff --git a/freshclam.sysconfig b/freshclam.sysconfig deleted file mode 100644 index 94035f8..0000000 --- a/freshclam.sysconfig +++ /dev/null @@ -1,24 +0,0 @@ -## When changing the periodicity of freshclam runs in the crontab, -## this value must be adjusted also. Its value is the timespan between -## two subsequent freshclam runs in minutes. E.g. for the default -## -## | 0 */3 * * * ... -## -## crontab line, the value is 180 (minutes). -# FRESHCLAM_MOD= - -## A predefined value for the delay in seconds. By default, the value is -## calculated by the 'hostid' program. This predefined value guarantees -## constant timespans of 3 hours between two subsequent freshclam runs. -## -## This option accepts two special values: -## 'disabled-warn' ... disables the automatic freshclam update and -## gives out a warning -## 'disabled' ... disables the automatic freshclam silently -# FRESHCLAM_DELAY= - - -### !!!!! REMOVE ME !!!!!! -### REMOVE ME: By default, the freshclam update is disabled to avoid -### REMOVE ME: network access without prior activation -FRESHCLAM_DELAY=disabled-warn # REMOVE ME diff --git a/sources b/sources index acd143c..70d67b2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0ddd9f341dd0299a6bc5398ee26f4ebf clamav-0.95.1-norar.tar.bz2 +44e7df79718d104db0666d5db3f08682 clamav-0.97-clean.tar.bz2