From d83f3c92c6054893efe0826c06f569819422428f Mon Sep 17 00:00:00 2001 From: wangdi Date: Tue, 14 Mar 2023 09:19:23 +0800 Subject: [PATCH 1/2] Add missing requires --- ansible-runner-service.spec | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/ansible-runner-service.spec b/ansible-runner-service.spec index 23478d2..d3907f5 100644 --- a/ansible-runner-service.spec +++ b/ansible-runner-service.spec @@ -1,6 +1,6 @@ Name: ansible-runner-service Version: 1.0.7 -Release: 2 +Release: 3 License: ASL 2.0 Summary: RESTful API for ansible/ansible_runner execution Source0: https://github.com/ansible/%{name}/archive/%{name}-%{version}.tar.gz @@ -8,8 +8,20 @@ Patch0: ovirt_log.patch Patch1: wsgi.patch BuildArch: noarch BuildRequires: systemd python3-devel python3-setuptools -Requires: python3-flask-restful python3-ansible-runner +Requires: ansible +Requires: logrotate +Requires: openssl +Requires: openssh +Requires: openssh-clients Requires: policycoreutils-python-utils +Requires: python3 +Requires: python3-ansible-runner +Requires: python3-pyOpenSSL +Requires: python3-netaddr +Requires: python3-notario +Requires: python3-flask +Requires: python3-flask-restful +Requires: python3-psutil %global _description %{expand: This package provides the Ansible Runner Service source files. Ansible runner service exposes a REST API interface on top of the functionality provided by ansible and ansible_runner. @@ -50,6 +62,9 @@ semanage fcontext -a -t httpd_log_t -s system_u /var/log/ovirt-engine/ansible-ru %doc README.md %changelog +* Tue Mar 14 2023 wangdi - 1.0.7-3 +- Add missing requires + * Tue Aug 23 2022 jiangxinyu - 1.0.7-2 - Add requires to provide the semanage command From 2888fa60bb5683a9f1c9ca2fad596af5e28fb4e9 Mon Sep 17 00:00:00 2001 From: wangdi Date: Tue, 14 Mar 2023 09:24:26 +0800 Subject: [PATCH 2/2] Be compatible with pyyaml 6.x --- ansible-runner-service.spec | 6 +++++- be-compatible-with-pyyaml-6.x.patch | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 be-compatible-with-pyyaml-6.x.patch diff --git a/ansible-runner-service.spec b/ansible-runner-service.spec index d3907f5..5828eb6 100644 --- a/ansible-runner-service.spec +++ b/ansible-runner-service.spec @@ -1,11 +1,12 @@ Name: ansible-runner-service Version: 1.0.7 -Release: 3 +Release: 4 License: ASL 2.0 Summary: RESTful API for ansible/ansible_runner execution Source0: https://github.com/ansible/%{name}/archive/%{name}-%{version}.tar.gz Patch0: ovirt_log.patch Patch1: wsgi.patch +Patch2: be-compatible-with-pyyaml-6.x.patch BuildArch: noarch BuildRequires: systemd python3-devel python3-setuptools Requires: ansible @@ -62,6 +63,9 @@ semanage fcontext -a -t httpd_log_t -s system_u /var/log/ovirt-engine/ansible-ru %doc README.md %changelog +* Tue Mar 14 2023 wangdi - 1.0.7-4 +- Be compatible with pyyaml 6.x + * Tue Mar 14 2023 wangdi - 1.0.7-3 - Add missing requires diff --git a/be-compatible-with-pyyaml-6.x.patch b/be-compatible-with-pyyaml-6.x.patch new file mode 100644 index 0000000..8ece2f8 --- /dev/null +++ b/be-compatible-with-pyyaml-6.x.patch @@ -0,0 +1,25 @@ +From cfb3d7cdb6936afe61018fa2062ae05dcf5b0b2d Mon Sep 17 00:00:00 2001 +From: wangdi +Date: Tue, 14 Mar 2023 09:22:33 +0800 +Subject: [PATCH] be compatible with pyyaml 6.x + +--- + runner_service/configuration.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/runner_service/configuration.py b/runner_service/configuration.py +index d7a5c17..71a1307 100644 +--- a/runner_service/configuration.py ++++ b/runner_service/configuration.py +@@ -106,7 +106,7 @@ class Config(object): + + try: + with open(self.config_file, "r") as _cfg: +- local_config = yaml.load(_cfg.read()) ++ local_config = yaml.safe_load(_cfg.read()) + except yaml.YAMLError as exc: + logger.critical("ERROR: YAML error in configuration " + "file: {}".format(exc)) +-- +2.39.1 +