diff --git a/clamav.spec b/clamav.spec index 1f5088b..3c4bad5 100644 --- a/clamav.spec +++ b/clamav.spec @@ -400,6 +400,15 @@ rm %{buildroot}%{_unitdir}/clamav-daemon.* %systemd_postun_with_restart clamav-clamonacc.service +%post data +# Let newer .cld files take precedence over the shipped .cvd files +for f in %{homedir}/*.cld +do + cvd=${f/.cld/.cvd} + [ -f $f -a $f -nt $cvd ] && rm -f $cvd || : +done + + %pre filesystem getent group %{updateuser} >/dev/null || groupadd -r %{updateuser} getent passwd %{updateuser} >/dev/null || \