!19 Be compatible with pyyaml 6.x

From: @jxy_git 
Reviewed-by: @wm-wm-wm 
Signed-off-by: @wm-wm-wm
This commit is contained in:
openeuler-ci-bot 2023-05-24 08:17:51 +00:00 committed by Gitee
commit e20c9a5f86
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 44 additions and 2 deletions

View File

@ -1,15 +1,29 @@
Name: ansible-runner-service Name: ansible-runner-service
Version: 1.0.7 Version: 1.0.7
Release: 3 Release: 4
License: ASL 2.0 License: ASL 2.0
Summary: RESTful API for ansible/ansible_runner execution Summary: RESTful API for ansible/ansible_runner execution
Source0: https://github.com/ansible/%{name}/archive/%{name}-%{version}.tar.gz Source0: https://github.com/ansible/%{name}/archive/%{name}-%{version}.tar.gz
Patch0: ovirt_log.patch Patch0: ovirt_log.patch
Patch1: wsgi.patch Patch1: wsgi.patch
Patch2: be-compatible-with-pyyaml-6.x.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: systemd python3-devel python3-setuptools 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: 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: %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. 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 +64,9 @@ semanage fcontext -a -t httpd_log_t -s system_u /var/log/ovirt-engine/ansible-ru
%doc README.md %doc README.md
%changelog %changelog
* Wed May 24 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 1.0.7-4
- Be compatible with pyyaml 6.x
* Thu Jul 28 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 1.0.7-3 * Thu Jul 28 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 1.0.7-3
- Add requires to provide the semanage command - Add requires to provide the semanage command

View File

@ -0,0 +1,25 @@
From cfb3d7cdb6936afe61018fa2062ae05dcf5b0b2d Mon Sep 17 00:00:00 2001
From: wangdi <wangdi@kylinos.cn>
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