diff --git a/clamav-0.100.0-config.patch b/clamav-1.2.0-config.patch similarity index 74% rename from clamav-0.100.0-config.patch rename to clamav-1.2.0-config.patch index c896a0f..282cd1b 100644 --- a/clamav-0.100.0-config.patch +++ b/clamav-1.2.0-config.patch @@ -1,22 +1,22 @@ ---- clamav-0.100.0/etc/clamd.conf.sample.orig 2018-04-04 02:13:58.000000000 +0200 -+++ clamav-0.100.0/etc/clamd.conf.sample 2018-06-23 13:24:55.169343560 +0200 -@@ -4,14 +4,12 @@ +--- clamav-1.2.0/etc/clamd.conf.sample.orig 2023-09-09 19:52:01.009069222 +0200 ++++ clamav-1.2.0/etc/clamd.conf.sample 2023-09-09 19:54:10.143858534 +0200 +@@ -4,14 +4,11 @@ ## -# Comment or remove the line below. -Example - +- # Uncomment this option to enable logging. # LogFile must be writable for the user running daemon. # A full path is required. # Default: disabled -#LogFile /tmp/clamd.log -+#LogFile /var/log/clamav/clamd.log ++LogFile /var/log/clamav/clamd.log # By default the log file is locked for writing - the lock protects against # running clamd multiple times (if want to run another clamd, please -@@ -32,7 +30,7 @@ +@@ -32,7 +29,7 @@ # Log time with each message. # Default: no @@ -25,7 +25,7 @@ # Also log clean files. Useful in debugging but drastically increases the # log size. -@@ -41,7 +39,7 @@ +@@ -41,7 +38,7 @@ # Use system logger (can work together with LogFile). # Default: no @@ -34,25 +34,25 @@ # Specify the type of syslog messages - please refer to 'man syslog' # for facility names. -@@ -71,7 +69,7 @@ - # This option allows you to save a process identifier of the listening - # daemon (main thread). +@@ -74,7 +71,7 @@ + # It is recommended that the directory where this file is stored is + # also owned by root to keep other users from tampering with it. # Default: disabled --#PidFile /var/run/clamd.pid +-#PidFile /run/clamav/clamd.pid +PidFile /run/clamav/clamd.pid # Optional path to the global temporary directory. # Default: system specific (usually /tmp or /var/tmp). -@@ -90,7 +88,7 @@ +@@ -98,7 +95,7 @@ # Path to a local socket file the daemon will listen on. # Default: disabled (must be specified by a user) --#LocalSocket /tmp/clamd.socket +-#LocalSocket /run/clamav/clamd.sock +LocalSocket /run/clamav/clamd.sock + #LocalSocket /tmp/clamd.sock # Sets the group ownership on the unix socket. - # Default: disabled (the primary group of the user running clamd) -@@ -183,11 +181,11 @@ +@@ -191,11 +188,11 @@ # Follow directory symlinks. # Default: no @@ -66,7 +66,7 @@ # Scan files and directories on other filesystems. # Default: yes -@@ -204,7 +202,7 @@ +@@ -224,7 +221,7 @@ # Run as another user (clamd must be started by root for this option to work) # Default: don't drop privileges diff --git a/clamav-0.100.0-freshclam_config.patch b/clamav-1.2.0-freshclam_config.patch similarity index 64% rename from clamav-0.100.0-freshclam_config.patch rename to clamav-1.2.0-freshclam_config.patch index 645f54d..7e03d83 100644 --- a/clamav-0.100.0-freshclam_config.patch +++ b/clamav-1.2.0-freshclam_config.patch @@ -1,12 +1,12 @@ ---- clamav-0.100.0/etc/freshclam.conf.sample.orig 2018-04-04 02:13:58.000000000 +0200 -+++ clamav-0.100.0/etc/freshclam.conf.sample 2018-06-23 13:20:49.022255364 +0200 -@@ -5,16 +5,16 @@ +--- clamav-1.2.0/etc/freshclam.conf.sample.orig 2023-09-09 19:55:29.321772627 +0200 ++++ clamav-1.2.0/etc/freshclam.conf.sample 2023-09-09 19:57:02.079706335 +0200 +@@ -4,17 +4,14 @@ + ## - # Comment or remove the line below. +-# Comment or remove the line below. -Example -+#Example - +- # Path to the database directory. # WARNING: It must match clamd.conf's directive! # Default: hardcoded (depends on installation options) @@ -20,7 +20,7 @@ # Maximum size of the log file. # Value of 0 disables the limit. -@@ -35,7 +35,7 @@ +@@ -35,7 +32,7 @@ # Use system logger (can work together with UpdateLogFile). # Default: no @@ -29,12 +29,12 @@ # Specify the type of syslog messages - please refer to 'man syslog' # for facility names. -@@ -48,7 +48,7 @@ - - # This option allows you to save the process identifier of the daemon +@@ -52,7 +49,7 @@ + # It is recommended that the directory where this file is stored is + # also owned by root to keep other users from tampering with it. # Default: disabled --#PidFile /var/run/freshclam.pid -+PidFile /run/freshclam.pid +-#PidFile /run/clamav/freshclam.pid ++PidFile /run/clamav/freshclam.pid # By default when started freshclam drops privileges and switches to the # "clamav" user. This directive allows you to change the database owner. diff --git a/clamav-clamd.initscript b/clamav-clamd.initscript deleted file mode 100644 index c5b66f6..0000000 --- a/clamav-clamd.initscript +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -# -# clamd -- startup script for the Clam AntiVirus Daemon -# -# chkconfig: 2345 79 30 -# description: Clam AntiVirus Daemon is a TCP/IP or unix domain -# socket protocol server. -# processname: clamd -# pidfile: /run/clamav/clamd.pid -# config: /etc/clamd.conf - -# Source function library. -. /etc/rc.d/init.d/functions - -NAME=clamd -DAEMON=/usr/sbin/$NAME -DAEMONPID=/var/run/clamav/$NAME.pid -DAEMONCONF=/etc/clamd.conf -OPTIONS="-c $DAEMONCONF" - -[ -x $DAEMON ] || exit 0 - -# Source networking configuration. -[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network - -[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME - -# check if the clamv conf file is present -[ -r "$DAEMONCONF" ] || exit 0 - -USER=`grep '^User' $DAEMONCONF | awk '{ print $2}'` -LOGFILE=`grep '^LogFile ' $DAEMONCONF | awk '{ print $2}'` - -case "$1" in - start) - echo -n $"Starting Clam AntiVirus Daemon: " - if [ "${LOGFILE}" ]; then - touch ${LOGFILE} - chown ${USER}:${USER} ${LOGFILE} - fi - daemon --pidfile=$DAEMONPID $DAEMON $OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$NAME - ;; - stop) - echo -n $"Stopping Clam AntiVirus Daemon: " - killproc -p $DAEMONPID $NAME - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$NAME $DAEMONPID - ;; - restart|reload) - $0 stop - sleep 1 - $0 start - ;; - condrestart) - [ -e /var/lock/subsys/$NAME ] && $0 restart - ;; - status) - statusproc $DAEMON - RETVAL=$? - ;; - *) - echo $"Usage: ""/etc/init.d/$NAME {start|stop|status|restart|condrestart}" - exit 1 - ;; -esac - -exit $RETVAL diff --git a/clamav-freshclam.initscript b/clamav-freshclam.initscript deleted file mode 100644 index 7240046..0000000 --- a/clamav-freshclam.initscript +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# -# freshclamd -- startup script for the Clam AntiVirus Database Update Daemon -# -# chkconfig: 2345 80 30 -# description: Clam AntiVirus Database Update Daemon. -# processname: freshclamd -# pidfile: /run/clamav/freshclam.pid -# config: /etc/freshclam.conf -# config: /etc/clamd.conf - -# Source function library. -. /etc/rc.d/init.d/functions - -NAME=freshclam -DAEMON=/usr/bin/$NAME -DAEMONPID=/run/clamav/$NAME.pid -DAEMONCONF=/etc/freshclam.conf -OPTIONS="--config-file=$DAEMONCONF --quiet --daemon --pid=/run/clamav/freshclam.pid" - -CLAMVDCONF=/etc/clamd.conf - -[ -x $DAEMON ] || exit 0 - -[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME - -# check if the clamv conf file is present -[ -r "$DAEMONCONF" ] || exit 0 - -USER=`grep '^User' $CLAMVDCONF | awk '{ print $2}'` -LOGFILE=`grep '^UpdateLogFile ' $DAEMONCONF | awk '{ print $2}'` - -case "$1" in - start) - echo -n $"Starting Clam AntiVirus Update Daemon: " - touch ${LOGFILE}; chown ${USER}:${USER} ${LOGFILE} - daemon --pidfile=$DAEMONPID $DAEMON $OPTIONS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$NAME - ;; - stop) - echo -n $"Stopping Clam AntiVirus Update Daemon: " - killproc -p $DAEMONPID $NAME - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$NAME $DAEMONPID - ;; - restart|reload) - $0 stop - sleep 1 - $0 start - ;; - condrestart) - [ -e /var/lock/subsys/$NAME ] && $0 restart - ;; - status) - statusproc $DAEMON - RETVAL=$? - ;; - *) - echo $"Usage: ""/etc/init.d/$NAME {start|stop|status|restart|condrestart}" - exit 1 - ;; -esac - -exit $RETVAL diff --git a/clamav-tmpfiles b/clamav-tmpfiles new file mode 100644 index 0000000..1e1468e --- /dev/null +++ b/clamav-tmpfiles @@ -0,0 +1 @@ +d /run/clamav 711 clamav clamav diff --git a/clamav.spec b/clamav.spec index 58402a7..8f8ac12 100644 --- a/clamav.spec +++ b/clamav.spec @@ -6,7 +6,7 @@ %define libname lib%{name} Name: clamav -Version: 1.1.1 +Version: 1.2.0 Release: 1mamba Summary: Clam AntiVirus is a GPL anti-virus toolkit for UNIX Group: Applications/Security @@ -15,16 +15,14 @@ Distribution: openmamba Packager: Silvan Calarco URL: https://www.clamav.net/ Source0: http://www.clamav.net/downloads/production/clamav-%{version}.tar.gz -#Source0: http://downloads.sourceforge.net/sourceforge/clamav/clamav-%{version}.tar.gz -Source1: %{name}-clamd.initscript +Source1: clamav-tmpfiles Source2: %{name}-clamd.logrotate -Source3: %{name}-freshclam.initscript Source4: %{name}-freshclam.logrotate #Source5: http://db.local.clamav.net/daily.cvd #Source6: clamav-clamd.service #Source7: clamav-freshclamd.service -Patch0: %{name}-0.100.0-config.patch -Patch1: %{name}-0.100.0-freshclam_config.patch +Patch0: %{name}-1.2.0-config.patch +Patch1: %{name}-1.2.0-freshclam_config.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -116,9 +114,8 @@ touch %{buildroot}%{_var}/log/%{name}/clamd.log touch %{buildroot}%{_var}/log/%{name}/freshclam.log # install needed initscripts and logrotate files -#install -D -m755 %{S:1} %{buildroot}%{_initrddir}/clamd +install -D -m644 %{S:1} %{buildroot}%{_tmpfilesdir}/clamav.conf install -D -m644 %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/clamd -#install -D -m755 %{S:3} %{buildroot}%{_initrddir}/freshclam install -D -m644 %{S:4} %{buildroot}%{_sysconfdir}/logrotate.d/freshclam install -d %{buildroot}%{_var}/lib/%{name} @@ -131,10 +128,10 @@ mv %{buildroot}%{_sysconfdir}/clamav-milter.conf.sample %{buildroot}%{_sysconfdi #install -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/clamd.service #install -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/freshclamd.service -#install -d %{buildroot}%{_prefix}/lib/tmpfiles.d -#cat > %{buildroot}%{_prefix}/lib/tmpfiles.d/clamav.conf << _EOF -#d /run/clamav 711 %{clamav_usr} %{clamav_grp} -#_EOF +install -d %{buildroot}%{_prefix}/lib/tmpfiles.d +cat > %{buildroot}%{_prefix}/lib/tmpfiles.d/clamav.conf << _EOF +d /run/clamav 711 %{clamav_usr} %{clamav_grp} +_EOF %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} @@ -143,6 +140,7 @@ mv %{buildroot}%{_sysconfdir}/clamav-milter.conf.sample %{buildroot}%{_sysconfdi /usr/sbin/groupadd %{clamav_grp} -g %{clamav_gid} &>/dev/null /usr/sbin/useradd %{clamav_usr} -c "Clam AntiVirus" -s /bin/false \ -u %{clamav_uid} -g %{clamav_grp} &>/dev/null +%tmpfiles_create_package clamav %{SOURCE1} : %post @@ -193,11 +191,14 @@ fi %{_bindir}/freshclam %{_bindir}/sigtool %{_sbindir}/clamav-milter +%{_tmpfilesdir}/clamav.conf %{_sbindir}/clamonacc %{_unitdir}/clamav-daemon.service %{_unitdir}/clamav-clamonacc.service %{_unitdir}/clamav-daemon.socket %{_unitdir}/clamav-freshclam.service +%{_unitdir}/clamav-freshclam-once.service +%{_unitdir}/clamav-freshclam-once.timer %dir %attr(0755,%{clamav_usr},%{clamav_grp}) %{_var}/lib/%{name} %dir %attr(0755,%{clamav_usr},%{clamav_grp}) %{_var}/log/%{name} %ghost %attr(0644,%{clamav_usr},%{clamav_grp}) %{_var}/log/%{name}/freshclam.log @@ -250,6 +251,9 @@ fi #% doc BUGS ChangeLog NEWS README %changelog +* Sun Sep 10 2023 Automatic Build System 1.2.0-1mamba +- automatic version update by autodist + * Thu Aug 17 2023 Automatic Build System 1.1.1-1mamba - automatic version update by autodist