Accepting request 1000574 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/1000574
OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=674
This commit is contained in:
David Anes 2022-09-12 14:19:14 +00:00 committed by Git OBS Bridge
parent 484c8c353a
commit c81902cbec
2 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Sep 1 06:31:31 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.
-------------------------------------------------------------------
Tue Jun 28 14:39:26 UTC 2022 - Stefan Schubert <schubi@intern>

View File

@ -955,6 +955,12 @@ exit 0
%if "%{flavor}" == ""
%pre
%service_add_pre apache2.service apache2.target
%if 0%{?suse_version} > 1500
# Prepare for migration to /usr/etc; save any old .rpmsave
for i in logrotate.d/apache2 ; do
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||:
done
%endif
exit 0
%post
@ -975,6 +981,12 @@ exit 0
%posttrans
%apache_restart_if_needed
%if 0%{?suse_version} > 1500
# Migration to /usr/etc, restore just created .rpmsave
for i in logrotate.d/apache2 ; do
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
done
%endif
%verifyscript
%verify_permissions -e %{_sbindir}/suexec