diff --git a/rspamd.changes b/rspamd.changes index 460b3b9..ba0fa99 100644 --- a/rspamd.changes +++ b/rspamd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 14 16:35:33 UTC 2022 - Marcus Rueckert + +- Move cleanup code to %pre because otherwise it doesnt trigger + early enough + ------------------------------------------------------------------- Mon Nov 14 16:21:40 UTC 2022 - Marcus Rueckert diff --git a/rspamd.spec b/rspamd.spec index 155ceb7..0f406d5 100644 --- a/rspamd.spec +++ b/rspamd.spec @@ -274,6 +274,12 @@ echo "# Site-specific additions and overrides for 'usr.bin.rspamd'" > %{buildroo %pre %{_sbindir}/groupadd -r %{rspamd_group} 2>/dev/null || : %{_sbindir}/useradd -g %{rspamd_group} -c "Rmilter user" -s /bin/false -r %{rspamd_user} 2>/dev/null || : +# +# cleanup bad unser files from earlier 3.4 builds +# see https://github.com/rspamd/rspamd/issues/4329 for the details +# +echo "Cleaning up '*.unser' files in /var/lib/rspamd" +find /var/lib/rspamd/ -type f -name '*.unser' -delete -print ||: %if 0%{?suse_version} && %{with systemd} %service_add_pre %{name}.service @@ -293,11 +299,6 @@ echo "# Site-specific additions and overrides for 'usr.bin.rspamd'" > %{buildroo %if 0%{?suse_version} %postun -# -# cleanup bad unser files from earlier 3.4 builds -# see https://github.com/rspamd/rspamd/issues/4329 for the details -# -find /var/lib/rspamd/ -type f -name '*.unser' -delete ||: %if %{with systemd} %service_del_postun %{name}.service %else