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

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