From 87325daaabfa7ee95249226d67574ee69c6d4305fce754b3e9984c65f1298567 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 21 Jul 2016 14:03:06 +0000 Subject: [PATCH] Accepting request 412543 from home:faweiss:branches:security OBS-URL: https://build.opensuse.org/request/show/412543 OBS-URL: https://build.opensuse.org/package/show/security/clamav?expand=0&rev=135 --- clamav-tmpfiles.conf | 4 ++-- clamav.changes | 8 ++++++++ clamav.spec | 14 ++++++++++---- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/clamav-tmpfiles.conf b/clamav-tmpfiles.conf index 626e50e..9004877 100644 --- a/clamav-tmpfiles.conf +++ b/clamav-tmpfiles.conf @@ -1,2 +1,2 @@ -# clamav needs a directory in /var/run: -d /var/run/clamav 0755 vscan vscan - +# clamav needs a directory in /run: +d /run/clamav 0755 vscan vscan - diff --git a/clamav.changes b/clamav.changes index d7f539d..ba8684f 100644 --- a/clamav.changes +++ b/clamav.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jun 30 13:42:20 UTC 2016 - fweiss@suse.com + +- Added BuildRequires systemd-rpm-macros +- Added %ghost entry for /run/clamav +- Use /run instead of /var/run because it is a symlink nowadays + (clamav-tmpfiles.conf) + ------------------------------------------------------------------- Thu Jun 23 07:30:49 UTC 2016 - fweiss@suse.com diff --git a/clamav.spec b/clamav.spec index de1a0fc..eb94b40 100644 --- a/clamav.spec +++ b/clamav.spec @@ -57,6 +57,7 @@ Source9: service.clamav-milter Patch1: clamav-conf.patch Patch3: clamav-gcc47.patch BuildRequires: systemd +BuildRequires: systemd-rpm-macros %systemd_requires %description @@ -102,8 +103,9 @@ make V=1 %{?jobs:-j%jobs} %makeinstall install -d -m755 %buildroot/var/lib/clamav install -d -m755 %buildroot/%_tmpfilesdir -install -m644 %SOURCE6 %buildroot%_tmpfilesdir/clamav.conf +install -m644 %{S:6} %buildroot%_tmpfilesdir/clamav.conf mkdir -p %buildroot/var/spool/amavis +mkdir -p -m 0755 %buildroot/run/clamav rm %buildroot/%_libdir/*.la # Remove bogus dependencies from libclamav.pc sed -i 's/^Libs: .*/Libs: -lclamav/' %buildroot%_libdir/pkgconfig/libclamav.pc @@ -117,9 +119,12 @@ popd # Systemd... install -d -m 0755 %buildroot/%{_unitdir} -install -m 0644 %{SOURCE7} %buildroot/%{_unitdir}/clamd.service -install -m 0644 %{SOURCE8} %buildroot/%{_unitdir}/freshclam.service -install -m 0644 %{SOURCE9} %buildroot/%{_unitdir}/clamav-milter.service +install -m 0644 %{S:7} %buildroot/%{_unitdir}/clamd.service +install -m 0644 %{S:8} %buildroot/%{_unitdir}/freshclam.service +install -m 0644 %{S:9} %buildroot/%{_unitdir}/clamav-milter.service +rm -f %buildroot/%{_unitdir}/clamav-daemon.service +rm -f %buildroot/%{_unitdir}/clamav-daemon.socket +rm -f %buildroot/%{_unitdir}/clamav-freshclam.service # this is broken if system does not have systemd so don't # use it at all on systems without mandatory systemd for srvname in clamd freshclam clamav-milter;do @@ -152,6 +157,7 @@ VALGRIND_GENSUP=1 make check %defattr(-,vscan,vscan) %dir %attr(750,vscan,vscan) /var/spool/amavis %dir /var/lib/clamav +%ghost %attr(755,vscan,vscan) /run/clamav %pre %_sbindir/groupadd -r vscan 2> /dev/null || :