Let newer .cld files take precedence over the shipped .cvd files by removing them

This commit is contained in:
Orion Poplawski 2023-02-20 15:19:03 -07:00
parent fa96639809
commit 6e8f97c2ff
1 changed files with 9 additions and 0 deletions

View File

@ -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 || \