Accepting request 902422 from systemsmanagement

OBS-URL: https://build.opensuse.org/request/show/902422
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ansible-runner?expand=0&rev=2
This commit is contained in:
Dominique Leuenberger 2021-06-26 19:25:30 +00:00 committed by Git OBS Bridge
commit 4a236d11ef
5 changed files with 68 additions and 82 deletions

View File

@ -1,62 +0,0 @@
From b02acb4c089d5bcb5ff38b3f2e1d7540da72bf6e Mon Sep 17 00:00:00 2001
From: Thomas Bechtold <tbechtold@suse.com>
Date: Sat, 27 Apr 2019 15:00:38 +0200
Subject: [PATCH] Use the correct python executable for tests
Instead of using "python" which might point to python2, use the python
that is used to run the tests itself (which is sys.executable).
This fixes a build problem on openSUSE where ansible-runner is only
build for python3. Due to that, no "python" executable is there.
---
test/integration/test_runner.py | 3 ++-
test/unit/test_runner.py | 9 +++++----
2 files changed, 7 insertions(+), 5 deletions(-)
Index: ansible-runner-1.3.3/test/unit/test_runner.py
===================================================================
--- ansible-runner-1.3.3.orig/test/unit/test_runner.py
+++ ansible-runner-1.3.3/test/unit/test_runner.py
@@ -8,6 +8,7 @@ import mock
import pexpect
import pytest
import six
+import sys
from ansible_runner import Runner
from ansible_runner.exceptions import CallbackError
@@ -59,7 +60,7 @@ def test_error_code(rc):
# TODO: matt does not like this test
def test_job_timeout(rc):
- rc.command = ['python', '-c', 'import time; time.sleep(5)']
+ rc.command = [sys.executable, '-c', 'import time; time.sleep(5)']
runner = Runner(config=rc)
status, exitcode = runner.run()
assert status == 'timeout'
@@ -67,7 +68,7 @@ def test_job_timeout(rc):
def test_cancel_callback(rc):
- rc.command = ['python', '-c', 'print(input("Password: "))']
+ rc.command = [sys.executable, '-c', 'print(input("Password: "))']
status, exitcode = Runner(config=rc, cancel_callback=lambda: True).run()
assert status == 'canceled'
@@ -76,14 +77,14 @@ def test_cancel_callback_error(rc):
def kaboom():
raise Exception('kaboom')
- rc.command = ['python', '-c', 'print(input("Password: "))']
+ rc.command = [sys.executable, '-c', 'print(input("Password: "))']
with pytest.raises(CallbackError):
Runner(config=rc, cancel_callback=kaboom).run()
@pytest.mark.parametrize('value', ['abc123', six.u('Iñtërnâtiônàlizætiøn')])
def test_env_vars(rc, value):
- rc.command = ['python', '-c', 'import os; print(os.getenv("X_MY_ENV"))']
+ rc.command = [sys.executable, '-c', 'import os; print(os.getenv("X_MY_ENV"))']
rc.env = {'X_MY_ENV': value}
status, exitcode = Runner(config=rc).run()
assert status == 'successful'

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:60f531f1cb9b2b0cb1e8cf8dc9f81186aecda22d01587f35c61a833d0198f220
size 40821

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1bb56f9061c3238d89ec8871bc842f5b8d0e868f892347e8455c98d5b6fa58a1
size 47112

View File

@ -1,3 +1,54 @@
-------------------------------------------------------------------
Sun May 23 17:43:04 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
- Update to version 1.4.7
* Fixed an issue where byte sequences in the output that are not
interpretable as UTF-8 would break the job execution.
* Fixed a bug that broke Ansible playbook execution prior to
version 2.8 of Ansible
* Fix an issue with --process_isoloation_*_ paths parsing cli args
* Switch extravar format so we can support more than just string
types
* Make sure job events folder is created earlier to prevent
errors when using immediately after starting a runner job
* Annotate all runner_on events with start/end/duration times
- Drop 0001-Use-the-correct-python-executable-for-tests.patch
-------------------------------------------------------------------
Thu Feb 20 15:39:49 UTC 2020 - Lars Vogdt <lars@linux-schulserver.de>
- update to 1.4.4:
+ Fix some unicode issues when using command line override on python 2.7
+ Fix an issue with file handles not closing on the pexpect pty
+ Fix missing ssh_key parameter from module interface
+ Fix a bug where the ssh agent process would hang around after
process isolation exit causing a failure to remove temporary directories
1.4.2 (2019-10-04)
+ Reverted ansible-runner --version to print a semantic version number
1.4.1 (2019-10-03)
+ Fixed a bug that prevented ANSIBLE_HOST_KEY_CHECKING from being respected
1.4.0 (2019-09-20)
+ Added changed count to stats data
+ Added initial support for gathering performance statistics using
the system's cgroup interface
+ Fix command line args override missing from module run kwargs
+ Omit inventory argument entirely if no inventory content is supplied
this allows ansible to pick up inventory from implicit locations and ansible.cfg
+ Fix an issue where Runner wouldn't properly clean up process
isolation temporary directories
+ Fix error generated if unsafe parameter is used on vars prompt tasks
+ Fix an issue where additional callback plugins weren't being
used when defined in the environment
+ Fix an issue where Runner would stop returning events after the
playbook finished when using run_async
+ Fix an issue where unicode in task data would cause Runner to fail
+ Fix issues using vaulted data that would cause Runner to fail
+ Fix an issue where artifact-dir was only allowed in ad-hoc mode
- run fdupes
- remove upstreamed patch:
0001-Use-the-correct-python-executable-for-tests.patch
- disable tests again for now
-------------------------------------------------------------------
Tue Jun 4 12:14:09 UTC 2019 - Thomas Bechtold <tbechtold@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-ansible-runner
# spec file for package ansible-runner
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,31 +12,31 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: ansible-runner
Version: 1.3.4
Version: 1.4.7
Release: 0
License: Apache-2.0 and GPL-3.0-or-later
Summary: Package for interfacing with Ansible
Url: https://github.com/ansible/ansible-runner
License: Apache-2.0 AND GPL-3.0-or-later
Group: Development/Languages/Python
URL: https://github.com/ansible/ansible-runner
Source: https://files.pythonhosted.org/packages/source/a/ansible-runner/ansible-runner-%{version}.tar.gz
# PATCH-FIX-UPSTREAM 0001-Use-the-correct-python-executable-for-tests.patch -- https://github.com/ansible/ansible-runner/pull/290
Patch0: 0001-Use-the-correct-python-executable-for-tests.patch
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-setuptools
BuildRequires: python3-pytest
BuildRequires: python3-PyYAML
BuildRequires: python3-mock
BuildRequires: python3-pexpect
BuildRequires: python3-psutil
BuildRequires: python3-PyYAML
BuildRequires: python3-python-daemon
BuildRequires: python3-setuptools
BuildRequires: python3-six
Requires: python3-PyYAML
Requires: python3-pexpect >= 4.5
Requires: python3-psutil
Requires: python3-python-daemon
Requires: python3-PyYAML
Requires: python3-six >= 1.12
BuildArch: noarch
@ -50,8 +50,7 @@ systems that dont want to manage the complexities of the interface on
their own (such as CI/CD platforms, Jenkins, or other automated tooling)
%prep
%setup -q -n ansible-runner-%{version}
%patch0 -p1
%setup -q
%build
%python3_build
@ -60,9 +59,7 @@ their own (such as CI/CD platforms, Jenkins, or other automated tooling)
%python3_install
# dont polute the namespace with tests
rm -r %{buildroot}%{python3_sitelib}/test/
%check
py.test -v test
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files
%doc README.md