Blame SOURCES/0010-ipa-client-install-output-a-warning-if-sudo-is-not-p_rhbz#1939371.patch

ccffd0
From 061e0b63ef3a72ba3261b42ec5f2ce290070c613 Mon Sep 17 00:00:00 2001
ccffd0
From: =?UTF-8?q?Fran=C3=A7ois=20Cami?= <fcami@redhat.com>
ccffd0
Date: Mon, 15 Mar 2021 16:55:08 +0100
ccffd0
Subject: [PATCH] ipa-client-install: output a warning if sudo is not present
ccffd0
 (2)
ccffd0
MIME-Version: 1.0
ccffd0
Content-Type: text/plain; charset=UTF-8
ccffd0
Content-Transfer-Encoding: 8bit
ccffd0
ccffd0
Fixes: https://pagure.io/freeipa/issue/8530
ccffd0
Signed-off-by: François Cami <fcami@redhat.com>
ccffd0
Reviewed-By: Armando Neto <abiagion@redhat.com>
ccffd0
---
ccffd0
 ipaclient/install/client.py | 2 +-
ccffd0
 1 file changed, 1 insertion(+), 1 deletion(-)
ccffd0
ccffd0
diff --git a/ipaclient/install/client.py b/ipaclient/install/client.py
ccffd0
index 0e478fa26..9bdfbddaf 100644
ccffd0
--- a/ipaclient/install/client.py
ccffd0
+++ b/ipaclient/install/client.py
ccffd0
@@ -2205,7 +2205,7 @@ def install_check(options):
ccffd0
     # available.
ccffd0
     if options.conf_sudo:
ccffd0
         try:
ccffd0
-            subprocess.Popen(['sudo -V'])
ccffd0
+            subprocess.Popen(['sudo', '-V'])
ccffd0
         except FileNotFoundError:
ccffd0
             logger.info(
ccffd0
                 "The sudo binary does not seem to be present on this "
ccffd0
-- 
ccffd0
2.30.2
ccffd0
ccffd0
From 4b917833fdd62cce2fd72809fd5c963194efba3e Mon Sep 17 00:00:00 2001
ccffd0
From: =?UTF-8?q?Fran=C3=A7ois=20Cami?= <fcami@redhat.com>
ccffd0
Date: Mon, 15 Mar 2021 17:00:05 +0100
ccffd0
Subject: [PATCH] ipatests: check for the "no sudo present" string absence
ccffd0
MIME-Version: 1.0
ccffd0
Content-Type: text/plain; charset=UTF-8
ccffd0
Content-Transfer-Encoding: 8bit
ccffd0
ccffd0
When sudo is installed, no warning should be output about sudo not
ccffd0
being available (obviously). Check that the relevant string is
ccffd0
not present.
ccffd0
ccffd0
Fixes: https://pagure.io/freeipa/issue/8530
ccffd0
Signed-off-by: François Cami <fcami@redhat.com>
ccffd0
Reviewed-By: Armando Neto <abiagion@redhat.com>
ccffd0
---
ccffd0
 ipatests/test_integration/test_installation.py | 2 ++
ccffd0
 1 file changed, 2 insertions(+)
ccffd0
ccffd0
diff --git a/ipatests/test_integration/test_installation.py b/ipatests/test_integration/test_installation.py
ccffd0
index a50a59f1a..a5ff17a0d 100644
ccffd0
--- a/ipatests/test_integration/test_installation.py
ccffd0
+++ b/ipatests/test_integration/test_installation.py
ccffd0
@@ -1620,3 +1620,5 @@ class TestInstallWithoutSudo(IntegrationTest):
ccffd0
         tasks.install_packages(self.clients[0], ['sudo'])
ccffd0
         for pkg in ('sudo', 'libsss_sudo'):
ccffd0
             assert tasks.is_package_installed(self.clients[0], pkg)
ccffd0
+        result = tasks.install_client(self.master, self.clients[0])
ccffd0
+        assert self.no_sudo_str not in result.stderr_text
ccffd0
-- 
ccffd0
2.30.2
ccffd0