URL: https://github.com/freeipa/freeipa/pull/5035 Author: flo-renaud Title: #5035: [Backport][ipa-4-8] rpm-spec: Don't fail on missing /etc/ssh/ssh_config Action: opened
PR body: """ This PR was opened automatically because PR #5026 was pushed to master and backport to ipa-4-8 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/5035/head:pr5035 git checkout pr5035
From 79a27699e3924afa5ad7874f01f79b007ab15cfc Mon Sep 17 00:00:00 2001 From: Stanislav Levin <s...@altlinux.org> Date: Tue, 11 Aug 2020 17:38:28 +0300 Subject: [PATCH] rpm-spec: Don't fail on missing /etc/ssh/ssh_config openssh-clients is not a strict requirement of freeipa-client package and if it's missing then this case should be handled in post scriptlet of freeipa-client package. Otherwise, the remaining part of that scriptlet will not be run at all. Fixes: https://pagure.io/freeipa/issue/8459 Signed-off-by: Stanislav Levin <s...@altlinux.org> --- freeipa.spec.in | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/freeipa.spec.in b/freeipa.spec.in index 0b25a2b1da..b6a19eb30d 100755 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -1053,14 +1053,11 @@ if [ $1 -gt 1 ] ; then fi %{__python3} -c 'from ipaclient.install.client import configure_krb5_snippet; configure_krb5_snippet()' >>/var/log/ipaupgrade.log 2>&1 - fi - - if [ $restore -ge 2 ]; then %{__python3} -c 'from ipaclient.install.client import update_ipa_nssdb; update_ipa_nssdb()' >>/var/log/ipaupgrade.log 2>&1 - fi - - if [ $restore -ge 2 ]; then - sed -E --in-place=.orig 's/^(HostKeyAlgorithms ssh-rsa,ssh-dss)$/# disabled by ipa-client update\n# \1/' /etc/ssh/ssh_config + SSH_CLIENT_SYSTEM_CONF="/etc/ssh/ssh_config" + if [ -f "$SSH_CLIENT_SYSTEM_CONF" ]; then + sed -E --in-place=.orig 's/^(HostKeyAlgorithms ssh-rsa,ssh-dss)$/# disabled by ipa-client update\n# \1/' "$SSH_CLIENT_SYSTEM_CONF" + fi fi fi
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org