From bc9c8634eddc4237736a2c6b5ed92c6e3ce26d6ff7756cbbd655a30229eed32e Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Tue, 4 Feb 2014 14:37:44 +0000 Subject: [PATCH] - Improve handling of /var/run/clamav. OBS-URL: https://build.opensuse.org/package/show/security/clamav?expand=0&rev=89 --- clamav.changes | 5 +++++ clamav.spec | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/clamav.changes b/clamav.changes index 57098d4..64cdca5 100644 --- a/clamav.changes +++ b/clamav.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 4 14:19:01 UTC 2014 - max@suse.com + +- Improve handling of /var/run/clamav. + Fri Jan 24 15:40:03 UTC 2014 - max@suse.com - Version 0.98.1: diff --git a/clamav.spec b/clamav.spec index 4854206..a1249ac 100644 --- a/clamav.spec +++ b/clamav.spec @@ -16,6 +16,8 @@ # +%{!?_tmpfilesdir:%global _tmpfilesdir /usr/lib/tmpfiles.d} + Name: clamav BuildRequires: ncurses-devel BuildRequires: sed @@ -134,8 +136,8 @@ install -m755 %SOURCE5 %buildroot/etc/init.d/clamav-milter ln -s /etc/init.d/clamav-milter %buildroot%_sbindir/rcclamav-milter install -m755 %SOURCE3 %buildroot%_sbindir/updateclamconf install -d -m755 %buildroot/var/{lib,run}/clamav -install -d -m755 %buildroot/usr/lib/tmpfiles.d -install -m644 %SOURCE6 %buildroot/usr/lib/tmpfiles.d/clamav.conf +install -d -m755 %buildroot/%_tmpfilesdir +install -m644 %SOURCE6 %buildroot%_tmpfilesdir/clamav.conf mkdir -p %buildroot/var/spool/amavis %if 0%{?suse_version} > 1020 rm %buildroot/%_libdir/*.la @@ -161,8 +163,7 @@ VALGRIND_GENSUP=1 make check %defattr(-,root,root,-) %config(noreplace) %_sysconfdir/*.conf %config %attr(744,root,root)/etc/init.d/* -%dir /usr/lib/tmpfiles.d -/usr/lib/tmpfiles.d/clamav.conf +%_tmpfilesdir %doc AUTHORS BUGS ChangeLog COPYING FAQ NEWS README UPGRADE %doc docs/*.pdf docs/html %doc %_mandir/*/* @@ -174,7 +175,7 @@ VALGRIND_GENSUP=1 make check %defattr(-,vscan,vscan) %dir %attr(750,vscan,vscan) /var/spool/amavis %dir /var/lib/clamav -%dir %attr(755,vscan,vscan) /var/run/clamav +%ghost %dir %attr(755,vscan,vscan) /var/run/clamav %pre %_sbindir/groupadd -r vscan 2> /dev/null || : @@ -198,6 +199,7 @@ for f in /etc/clamd.conf /etc/freshclam.conf /etc/clamav-milter.conf; do fi fi done +systemd-tmpfiles --create %_tmpfilesdir/clamav.conf %preun %stop_on_removal clamd freshclam