From 7b1f29dffd2782c532ba4b9f7c01dcf4879d4d20ce202287078afc21be3a2bdf Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Wed, 23 Jun 2021 19:02:47 +0000 Subject: [PATCH] Accepting request 901581 from home:hpjansson:branches:network - Don't move user-modified ssh_config and sshd_config files to .rpmsave on upgrade. OBS-URL: https://build.opensuse.org/request/show/901581 OBS-URL: https://build.opensuse.org/package/show/network/openssh?expand=0&rev=232 --- openssh.changes | 6 ++++++ openssh.spec | 15 ++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) 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