Hi everyone,

Attached is a patch which tries to workaround a DNF bug [1] which prevents us
from running CI on Fedora Rawhide.

It seems to work, however Fedora Rawhide repos seem to have some other issue
at the moment, which manifests in dependency installation failures [2],
including standalone builds of SSSD.

Nick

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1269665
[2] 
http://sssd-ci.duckdns.org/logs/job/30/10/fedora_rawhide/ci-build-debug/ci-mock-build.log
>From a5efaa7c010c472cb31c0028dd6166a5d8e04d2e Mon Sep 17 00:00:00 2001
From: Nikolai Kondrashov <[email protected]>
Date: Mon, 12 Oct 2015 09:48:38 +0300
Subject: [PATCH] CI: Run mock under PTY to workaround DNF bug

Run mock on a pseudo-TTY with the help of "unbuffer" from the "expect"
package to workaround a bug in DNF.
---
 contrib/ci/deps.sh | 4 ++++
 contrib/ci/run     | 7 +++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/contrib/ci/deps.sh b/contrib/ci/deps.sh
index c9a8a63..284027c 100644
--- a/contrib/ci/deps.sh
+++ b/contrib/ci/deps.sh
@@ -23,6 +23,10 @@ declare -r _DEPS_SH=
 
 # Dependency list
 declare -a DEPS_LIST=(
+    # "Expect" is needed for "unbuffer", used in a workaround of
+    # https://bugzilla.redhat.com/show_bug.cgi?id=1269665
+    # TODO Remove "expect" when the above is fixed
+    expect
     lcov
     valgrind
 )
diff --git a/contrib/ci/run b/contrib/ci/run
index a65ad8d..09bc8dd 100755
--- a/contrib/ci/run
+++ b/contrib/ci/run
@@ -126,12 +126,15 @@ function stage()
 # Args: [mock_arg...]
 function mock_privileged()
 {
+    # Run mock with "unbuffer" to imitate a PTY to workaround
+    # https://bugzilla.redhat.com/show_bug.cgi?id=1269665
+    # TODO Remove "unbuffer" when the above is fixed
     if memberof mock; then
-        mock "$@"
+        unbuffer mock "$@"
     else
         declare prompt=$'Not a "mock" group member.\n'
         prompt+="To run mock enter sudo password for $USER: "
-        sudo -p "$prompt" mock "$@"
+        sudo -p "$prompt" unbuffer mock "$@"
     fi
 }
 
-- 
2.6.1

_______________________________________________
sssd-devel mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to