diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2020-05-11 21:28:12 +0200 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2020-05-11 21:31:18 +0200 |
commit | eed25c03dfceb8ec7b47c6884dd7282e7f84f610 (patch) | |
tree | d8ed45f100e8a0fec3f20de6baf5ddd5d6c57295 | |
parent | d1d23609fecca93880f94d4786415b064830fd5d (diff) |
-rw-r--r-- | 0001-Use-subprocess.Popen-for-startup-failure-test.patch | 57 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | waypipe.spec | 7 |
3 files changed, 64 insertions, 2 deletions
diff --git a/0001-Use-subprocess.Popen-for-startup-failure-test.patch b/0001-Use-subprocess.Popen-for-startup-failure-test.patch new file mode 100644 index 0000000..d916135 --- /dev/null +++ b/0001-Use-subprocess.Popen-for-startup-failure-test.patch @@ -0,0 +1,57 @@ +From 68e6782cb5ebe9f9a17cc28f23687ec2ebc54af0 Mon Sep 17 00:00:00 2001 +From: Manuel Stoeckl <code@mstoeckl.com> +Date: Thu, 28 Nov 2019 12:01:16 -0500 +Subject: [PATCH] Use subprocess.Popen for startup failure test + +According to the Python documentation, the new usage should be valid +for Python >=3.3, covering a wider range than the >=3.5 for +subprocess.Popen. Also, this change avoids a possible regression +with Python 3.8.0 in which the TimeoutExpired exception no longer +provides a non-None .output field. +--- + test/startup_failure.py | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/test/startup_failure.py b/test/startup_failure.py +index 3d4117a..ae988b2 100755 +--- a/test/startup_failure.py ++++ b/test/startup_failure.py +@@ -53,23 +53,23 @@ def run_test(name, command, env, use_socketpair, expect_success): + pfds = [] + + timed_out = False ++ proc = subprocess.Popen( ++ command, ++ env=env, ++ stdin=subprocess.DEVNULL, ++ stdout=subprocess.PIPE, ++ stderr=subprocess.STDOUT, ++ pass_fds=pfds, ++ ) + try: +- proc = subprocess.run( +- command, +- env=env, +- stdin=subprocess.DEVNULL, +- stdout=subprocess.PIPE, +- stderr=subprocess.STDOUT, +- timeout=0.25, +- pass_fds=pfds, +- ) ++ output, none = proc.communicate(timeout=0.25) + except subprocess.TimeoutExpired as e: +- timed_out = True +- output = e.output + # Program began to wait for a connection ++ proc.kill() ++ output, none = proc.communicate() + retcode = 0 if "client" in command else (0 if expect_success else 1) ++ timed_out = True + else: +- output = proc.stdout + retcode = proc.returncode + + if use_socketpair: +-- +2.26.2 + @@ -1,3 +1,3 @@ # waypipe -The waypipe package
\ No newline at end of file +The waypipe package diff --git a/waypipe.spec b/waypipe.spec index 4b70e1f..11ace51 100644 --- a/waypipe.spec +++ b/waypipe.spec @@ -1,11 +1,12 @@ Name: waypipe Version: 0.6.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Wayland forwarding proxy License: MIT URL: https://gitlab.freedesktop.org/mstoeckl/%{name} Source0: https://gitlab.freedesktop.org/mstoeckl/%{name}/-/archive/v%{version}/%{name}-v%{version}.tar.gz +Patch0: 0001-Use-subprocess.Popen-for-startup-failure-test.patch BuildRequires: gcc BuildRequires: meson @@ -27,6 +28,7 @@ application forwarding similar to "ssh -X" feasible. %prep %setup -q -n %{name}-v%{version} +%patch0 -p1 %build @@ -50,6 +52,9 @@ application forwarding similar to "ssh -X" feasible. %changelog +* Mon May 11 2020 Dominique Martinet <asmadeus@codewreck.org> - 0.6.1-3 +- Fix FTBS (test failure) + * Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild |