diff --git a/openssh.changes b/openssh.changes index e0b50c9..56c8b87 100644 --- a/openssh.changes +++ b/openssh.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 23 18:32:20 UTC 2021 - Hans Petter Jansson + +- Don't move user-modified ssh_config and sshd_config files to + .rpmsave on upgrade. + ------------------------------------------------------------------- Tue May 18 17:16:33 UTC 2021 - Thorsten Kukuk diff --git a/openssh.spec b/openssh.spec index c600d0f..a8430bd 100644 --- a/openssh.spec +++ b/openssh.spec @@ -364,8 +364,9 @@ done %pre server -f sshd.pre %if %{defined _distconfdir} -# move outdated pam.d/*.rpmsave file away +# Prepare for migration to /usr/etc. test -f /etc/pam.d/sshd.rpmsave && mv -v /etc/pam.d/sshd.rpmsave /etc/pam.d/sshd.rpmsave.old ||: +test -f /etc/ssh/sshd_config.rpmsave && mv -v /etc/ssh/sshd_config.rpmsave /etc/ssh/sshd_config.rpmsave.old ||: %endif %service_add_pre sshd.service @@ -391,8 +392,20 @@ fi %posttrans server # Migration to /usr/etc. test -f /etc/pam.d/sshd.rpmsave && mv -v /etc/pam.d/sshd.rpmsave /etc/pam.d/sshd ||: +test -f /etc/ssh/sshd_config.rpmsave && mv -v /etc/ssh/sshd_config.rpmsave /etc/ssh/sshd_config ||: %endif +%if %{defined _distconfdir} +%pre clients +# Prepare for migration to /usr/etc. +test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ssh/ssh_config.rpmsave.old ||: +%endif + +%if %{defined _distconfdir} +%posttrans clients +# Migration to /usr/etc. +test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ssh/ssh_config ||: +%endif %triggerin -n openssh-fips -- %{name} = %{version}-%{release} %restart_on_update sshd