diff --git a/vsftpd.changes b/vsftpd.changes index 41968b4..4d5e7a1 100644 --- a/vsftpd.changes +++ b/vsftpd.changes @@ -8,6 +8,12 @@ Fri Sep 16 06:18:26 UTC 2022 - Peter Simons file when installing on a distribution that comes with such an older version of systemd. [bsc#1196918] +------------------------------------------------------------------- +Thu Sep 15 11:00:54 UTC 2022 - Stefan Schubert + +- Migration to /usr/etc: Saving user changed configuration files + in /etc and restoring them while an RPM update. + ------------------------------------------------------------------- Thu Aug 25 08:23:08 UTC 2022 - Peter Simons @@ -1295,3 +1301,4 @@ Mon Oct 22 15:57:40 CEST 2001 - mmj@suse.de - Initial package ------------------------------------------------------------------- +Mon Oct 22 15:57:40 CEST 2001 - diff --git a/vsftpd.spec b/vsftpd.spec index 010b62b..e731094 100644 --- a/vsftpd.spec +++ b/vsftpd.spec @@ -233,6 +233,20 @@ getent passwd ftpsecure >/dev/null || useradd -r -g nobody -s /bin/false -c "Sec %if %{with_systemd} %service_add_pre %{name}.service %{name}.socket %endif +%if 0%{?suse_version} > 1500 +# Prepare for migration to /usr/etc; save any old .rpmsave +for i in logrotate.d/%{name} ; do + test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||: +done +%endif + +%if 0%{?suse_version} > 1500 +%posttrans +# Migration to /usr/etc, restore just created .rpmsave +for i in logrotate.d/%{name} ; do + test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||: +done +%endif %preun %if %{with_systemd}