From fd47d25311da3b37a59db8d51f7a594c6824c7f4 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 13 Jun 2016 11:36:38 -0600 Subject: [PATCH] Update to 0.99.2 - Drop cliopts patch fixed upstream, use upstream's "--forground" option name - Fix main.cvd (fedora #1325482, epel #1325717) - Own bytecode.cld (#1176252) and mirrors.dat, ship bytecode.cvd - Update daily.cvd - Fixup Requires(pre) usage (#1319151) --- .gitignore | 1 + clamav-0.98.5-cliopts.patch | 11 -------- clamav-milter.systemd | 2 +- clamav-milter.sysv | 2 +- clamav-milter.upstart | 2 +- clamav.spec | 53 +++++++++++++++++++++++-------------- clamd.scan.upstart | 2 +- clamd@.service | 2 +- sources | 7 ++--- 9 files changed, 43 insertions(+), 39 deletions(-) delete mode 100644 clamav-0.98.5-cliopts.patch diff --git a/.gitignore b/.gitignore index 7a759e6..d05b921 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /clamav-*-norar.tar.xz /main*.cvd /daily*.cvd +/bytecode-278.cvd diff --git a/clamav-0.98.5-cliopts.patch b/clamav-0.98.5-cliopts.patch deleted file mode 100644 index 58eb83a..0000000 --- a/clamav-0.98.5-cliopts.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- clamav-0.98.5/shared/optparser.c 2014-11-13 23:30:44.000000000 +0100 -+++ clamav-0.98.5/shared/optparser.c.cliopts 2014-11-19 11:44:52.357577022 +0100 -@@ -272,7 +272,7 @@ - - { "AllowAllMatchScan", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD, "Permit use of the ALLMATCHSCAN command.", "yes" }, - -- { "Foreground", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no" }, -+ { "Foreground", "nofork", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no" }, - - { "Debug", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM, "Enable debug messages in libclamav.", "no" }, - diff --git a/clamav-milter.systemd b/clamav-milter.systemd index 15aaa47..0934a71 100644 --- a/clamav-milter.systemd +++ b/clamav-milter.systemd @@ -6,7 +6,7 @@ Before = postfix.service [Service] Type = simple -ExecStart = /usr/sbin/clamav-milter -c /etc/mail/clamav-milter.conf --nofork=yes +ExecStart = /usr/sbin/clamav-milter -c /etc/mail/clamav-milter.conf --foreground=yes Restart = on-failure User=clamilt diff --git a/clamav-milter.sysv b/clamav-milter.sysv index dd9458f..3e37ae0 100644 --- a/clamav-milter.sysv +++ b/clamav-milter.sysv @@ -21,7 +21,7 @@ start() { [ -x $exec ] || exit 5 [ -f $config ] || exit 6 echo -n $"Starting $prog: " - daemon --pidfile=${pidfile} $exec $OPTS --nofork=no --pid=${pidfile} + daemon --pidfile=${pidfile} $exec $OPTS --foreground=no --pid=${pidfile} retval=$? echo [ $retval -eq 0 ] && touch $lockfile diff --git a/clamav-milter.upstart b/clamav-milter.upstart index 02d7080..1a10b8e 100644 --- a/clamav-milter.upstart +++ b/clamav-milter.upstart @@ -11,4 +11,4 @@ stop on runlevel [!345] respawn -exec /usr/sbin/clamav-milter -c /etc/mail/clamav-milter.conf --nofork=yes +exec /usr/sbin/clamav-milter -c /etc/mail/clamav-milter.conf --foreground=yes diff --git a/clamav.spec b/clamav.spec index 10973b7..4a51bba 100644 --- a/clamav.spec +++ b/clamav.spec @@ -57,7 +57,7 @@ Requires(postun): /bin/systemctl\ Summary: End-user tools for the Clam Antivirus scanner Name: clamav -Version: 0.99.1 +Version: 0.99.2 Release: 1%{?dist} License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2} Group: Applications/File @@ -75,10 +75,10 @@ Source0: %name-%version%{?prerelease}-norar.tar.xz # To download the *.cvd, go to http://www.clamav.net and use the links # there (I renamed the files to add the -version suffix for verifying). Source10: http://db.local.clamav.net/main-57.cvd -Source11: http://db.local.clamav.net/daily-21478.cvd +Source11: http://db.local.clamav.net/daily-21723.cvd +%{?with_bytecode:Source12: http://db.local.clamav.net/bytecode-278.cvd} Patch24: clamav-0.99-private.patch -Patch26: clamav-0.98.5-cliopts.patch Patch27: clamav-0.98-umask.patch # https://bugzilla.redhat.com/attachment.cgi?id=403775&action=diff&context=patch&collapsed=&headers=1&format=raw Patch29: clamav-0.99.1-jitoff.patch @@ -104,7 +104,7 @@ Provides: group(%username) = 4 # Prevent version mix Conflicts: %name < %version-%release Conflicts: %name > %version-%release -Requires(pre): shadow-utils +Requires(pre): shadow-utils %{?noarch} %package lib @@ -123,8 +123,8 @@ Requires: openssl-devel %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 +Requires: clamav-filesystem = %version-%release +Requires: clamav-filesystem = %version-%release Provides: data(clamav) = full Conflicts: data(clamav) < full Conflicts: data(clamav) > full @@ -147,8 +147,7 @@ Source202: clamav-update.crond Source203: clamav-update.logrotate Requires: clamav-filesystem = %version-%release Requires: crontabs -Requires(pre): /etc/cron.d -Requires(postun): /etc/cron.d +Requires: /etc/cron.d Requires(post): %__chown %__chmod Requires(post): group(%username) @@ -171,8 +170,7 @@ 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 +Requires: %_initrddir Provides: clamav-server-sysv = %version-%release Obsoletes: clamav-server-sysv < %version-%release Source520: clamd-wrapper @@ -206,8 +204,8 @@ Group: System Environment/Daemons Provides: init(clamav-scanner) = sysv Requires: clamav-server-sysvinit = %version-%release Requires: clamav-scanner = %version-%release -Requires(pre): %_initrddir -Requires(postun): %_initrddir initscripts +Requires: %_initrddir +Requires(postun): initscripts Requires(post): chkconfig Requires(preun): chkconfig initscripts %{?noarch} @@ -220,7 +218,7 @@ Group: System Environment/Daemons Source410: clamd.scan.upstart Provides: init(clamav-scanner) = upstart Requires: clamav-scanner = %version-%release -Requires(pre): /etc/init +Requires: /etc/init Requires(post): /usr/bin/killall Requires(preun): /sbin/initctl %{?noarch} @@ -244,7 +242,7 @@ BuildRequires: sendmail-devel Provides: user(%milteruser) = 5 Provides: group(%milteruser) = 5 Requires(post): coreutils -Requires(pre): shadow-utils +Requires(pre): shadow-utils Provides: milter(clamav) = sendmail Provides: milter(clamav) = postfix @@ -264,8 +262,8 @@ Provides: init(clamav-milter) = sysvinit 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: %_initrddir +Requires(postun): initscripts Requires(post): chkconfig Requires(preun): chkconfig initscripts Provides: clamav-milter-sysv = %version-%release @@ -280,7 +278,7 @@ Group: System Environment/Daemons Source310: clamav-milter.upstart Provides: init(clamav-milter) = upstart Requires: clamav-milter = %version-%release -Requires(pre): /etc/init +Requires: /etc/init Requires(post): /usr/bin/killall Requires(preun): /sbin/initctl %{?noarch} @@ -407,7 +405,6 @@ The systemd initscripts for clamav-scanner. %setup -q -n %{name}-%{version}%{?prerelease} %apply -n24 -p1 -b .private -%apply -n26 -p1 -b .cliopts %apply -n27 -p1 -b .umask %apply -n29 -p1 -b .jitoff %apply -n30 -p1 @@ -505,11 +502,13 @@ rm -f $RPM_BUILD_ROOT%_sysconfdir/clamd.conf.sample \ $RPM_BUILD_ROOT%_libdir/*.la -touch $RPM_BUILD_ROOT%homedir/daily.cld -touch $RPM_BUILD_ROOT%homedir/main.cld +%{?with_bytecode:touch $RPM_BUILD_ROOT%homedir/bytecode.cld} +touch $RPM_BUILD_ROOT%homedir/{daily,main}.cld +touch $RPM_BUILD_ROOT%homedir/mirrors.dat install -D -m 0644 -p %SOURCE10 $RPM_BUILD_ROOT%homedir/main.cvd install -D -m 0644 -p %SOURCE11 $RPM_BUILD_ROOT%homedir/daily.cvd +%{?with_bytecode:install -D -m 0644 -p %SOURCE12 $RPM_BUILD_ROOT%homedir/bytecode.cvd} ## prepare the server-files install -D -m 0644 -p %SOURCE2 _doc_server/clamd.sysconfig @@ -597,6 +596,11 @@ touch $RPM_BUILD_ROOT{%milterstatedir/clamav-milter.{socket,pid},%milterlog} %{!?with_sysv: rm -rf $RPM_BUILD_ROOT%_var/run/*/*.pid} %{!?with_tmpfiles: rm -rf $RPM_BUILD_ROOT%_tmpfilesdir} +%if 0%{?with_systemd:1} +# TODO: Evaluate using upstream's unit files +rm $RPM_BUILD_ROOT%_unitdir/clamav-{daemon,freshclam}.* +%endif + %if 0%{?with_sysv:1} # keep clamd-wrapper in every case because it might be needed by other # packages @@ -792,6 +796,7 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || : %ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog %ghost %attr(0664,%username,%username) %homedir/*.cld +%ghost %attr(0664,%username,%username) %homedir/mirrors.dat ## ----------------------- @@ -881,6 +886,14 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || : %changelog +* Mon Jun 13 2016 Orion Poplawski - 0.99.2-1 +- Update to 0.99.2 +- Drop cliopts patch fixed upstream, use upstream's "--forground" option name +- Fix main.cvd (fedora #1325482, epel #1325717) +- Own bytecode.cld (#1176252) and mirrors.dat, ship bytecode.cvd +- Update daily.cvd +- Fixup Requires(pre) usage (#1319151) + * Tue Mar 29 2016 Robert Scheck - 0.99.1-1 - Upgrade to 0.99.1 and updated main.cvd and daily.cvd (#1314115) - Complain about antivirus_use_jit rather clamd_use_jit (#1295473) diff --git a/clamd.scan.upstart b/clamd.scan.upstart index cb20b29..54482e6 100644 --- a/clamd.scan.upstart +++ b/clamd.scan.upstart @@ -11,4 +11,4 @@ stop on runlevel [!345] respawn -exec /usr/sbin/clamd -c /etc/clamd.d/scan.conf --nofork=yes +exec /usr/sbin/clamd -c /etc/clamd.d/scan.conf --foreground=yes diff --git a/clamd@.service b/clamd@.service index 4393665..6854ece 100644 --- a/clamd@.service +++ b/clamd@.service @@ -4,6 +4,6 @@ After = syslog.target nss-lookup.target network.target [Service] Type = simple -ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf --nofork=yes +ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf --foreground=yes Restart = on-failure PrivateTmp = true diff --git a/sources b/sources index 5c908ad..c84a945 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ -6bf23527691890664c66e62e7bee44ff clamav-0.99.1-norar.tar.xz -85b8dd2229ba4a0ddd8bf048fe2b2078 main-57.cvd -b82f2fc713069d378d79b8e4e3db0b74 daily-21478.cvd +a4517adbd9c72a3fec3fbb1384dd3234 clamav-0.99.2-norar.tar.xz +d71fbb44799945970f2c2b75e40ec105 daily-21723.cvd +f13ead862171f50019c15c946d25e91f main-57.cvd +c545b6a9775ccb72a293d259335589be bytecode-278.cvd