From 390576486d61cfe1f4c0c3eb0f9bbb117041c46cb467e2d40c9778c1136a47a0 Mon Sep 17 00:00:00 2001 From: Peter Wullinger Date: Wed, 7 Sep 2022 06:59:43 +0000 Subject: [PATCH] Accepting request 1000599 from home:schubi2 - Migration to /usr/etc: Saving user changed configuration files in /etc and restoring them while an RPM update. OBS-URL: https://build.opensuse.org/request/show/1000599 OBS-URL: https://build.opensuse.org/package/show/server:mail/exim?expand=0&rev=264 --- exim.changes | 6 ++++++ exim.spec | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/exim.changes b/exim.changes index 1f706f2..7d8cf74 100644 --- a/exim.changes +++ b/exim.changes @@ -3,6 +3,12 @@ Tue Sep 6 09:19:57 UTC 2022 - Ludwig Nussel - Own /var/spool/mail (boo#1179574) +------------------------------------------------------------------- +Thu Sep 1 07:43:11 UTC 2022 - Stefan Schubert + +- Migration to /usr/etc: Saving user changed configuration files + in /etc and restoring them while an RPM update. + ------------------------------------------------------------------- Wed Jun 29 14:20:50 UTC 2022 - Stefan Schubert diff --git a/exim.spec b/exim.spec index 460b743..53aed49 100644 --- a/exim.spec +++ b/exim.spec @@ -414,6 +414,20 @@ end %if 0%{?suse_version} > 1220 %service_add_pre exim.service %endif +%if 0%{?suse_version} > 1500 +# Prepare for migration to /usr/etc; save any old .rpmsave +for i in logrotate.d/exim ; 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/exim ; do + test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||: +done +%endif %post %if 0%{?suse_version} < 1131