diff --git a/735.patch b/735.patch new file mode 100644 index 0000000..d2c448b --- /dev/null +++ b/735.patch @@ -0,0 +1,28 @@ +From 323926afbf4d1337e1bcdfc07e7d8e64f6289bf1 Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: Dec 07 2017 01:55:04 +0000 +Subject: Fix encoding issue in runroot with python3 + + +This will make sure that the log from the server is correctly decoded, since +sys.stdout only accepts strings, not raw bytes, which is what downloadTaskOutput +returns. + +Signed-off-by: Patrick Uiterwijk + +--- + +diff --git a/plugins/cli/runroot.py b/plugins/cli/runroot.py +index f8d4b50..dc5d737 100644 +--- a/plugins/cli/runroot.py ++++ b/plugins/cli/runroot.py +@@ -90,7 +90,7 @@ def handle_runroot(options, session, args): + if 'runroot.log' in output: + for volume in output['runroot.log']: + log = session.downloadTaskOutput(task_id, 'runroot.log', volume=volume) +- sys.stdout.write(log) ++ sys.stdout.write(log.decode('utf8')) + info = session.getTaskInfo(task_id) + if info is None: + sys.exit(1) + diff --git a/koji.spec b/koji.spec index d266ac7..87354ed 100644 --- a/koji.spec +++ b/koji.spec @@ -26,7 +26,7 @@ Name: koji Version: 1.14.0 -Release: 2%{?dist} +Release: 3%{?dist} # koji.ssl libs (from plague) are GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -38,6 +38,7 @@ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 Patch0: https://pagure.io/koji/pull-request/708.patch Patch1: https://pagure.io/koji/c/5574ad7.patch Patch2: https://pagure.io/koji/c/73ebc0c.patch +Patch3: https://pagure.io/koji/pull-request/735.patch # Not upstreamable Patch100: fedora-config.patch @@ -247,6 +248,7 @@ koji-web is a web UI to the Koji system. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %patch100 -p1 -b .fedoraconfig %build @@ -452,6 +454,9 @@ fi %endif %changelog +* Thu Dec 07 2017 Patrick Uiterwijk - 1.14.0-3 +- Backport py3 runroot encoding patch (PR#735) + * Mon Dec 04 2017 Patrick Uiterwijk - 1.14.0-2 - Backport py3 keytab patch (PR#708) - Backport patches for exit code (issue#696)