URL: https://github.com/freeipa/freeipa/pull/5037 Author: stanislavlevin Title: #5037: [Backport][ipa-4-6] rpm-spec: Don't fail on missing /etc/ssh/ssh_config Action: opened
PR body: """ This PR was opened manually because PR #5026 was pushed to master and backport to ipa-4-6 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/5037/head:pr5037 git checkout pr5037
From 586752b32810b323c254a1d4eb287e8aea0a4912 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> Reviewed-By: Rob Crittenden <rcrit...@redhat.com> Reviewed-By: Alexander Bokovoy <aboko...@redhat.com> Signed-off-by: Stanislav Levin <s...@altlinux.org> --- freeipa.spec.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/freeipa.spec.in b/freeipa.spec.in index 8f10f383d2..c76035fad0 100644 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -1316,10 +1316,10 @@ if [ $1 -gt 1 ] ; then if [ $restore -ge 2 ]; then %{python} -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