Accepting request 1000703 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/1000703
OBS-URL: https://build.opensuse.org/package/show/network:ldap/sssd?expand=0&rev=273
This commit is contained in:
Jan Engelhardt 2022-09-01 16:02:29 +00:00 committed by Git OBS Bridge
parent 7aa46d2e68
commit 4d2abd8f93
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Sep 1 13:45:36 UTC 2022 - Stefan Schubert <schubi@suse.com>
- Migration to /usr/etc: Saving user changed configuration files
in /etc and restoring them while an RPM update.
-------------------------------------------------------------------
Fri Aug 26 20:54:33 UTC 2022 - Jan Engelhardt <jengelh@inai.de>

View File

@ -487,6 +487,20 @@ fi
%pre kcm
%service_add_pre sssd-kcm.service sssd-kcm.socket
%if 0%{?suse_version} > 1500
# Prepare for migration to /usr/etc; save any old .rpmsave
for i in logrotate.d/sssd ; 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/sssd ; do
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
done
%endif
%post kcm
%service_add_post sssd-kcm.service sssd-kcm.socket