提交 8be7c4fb 编写于 作者: C Cleber Rosa

YAML to Mux plugin: use downstream versions in the SPEC file only

Commit c60f0ae8 fixed a CVE warning that GitHub sent notifications
about.  While so, it was attempted to fulfill the downstream (Fedora
and EPEL) dependencies in the same patch, keeping users of Python 2
with possibly vulnerable versions.

The matching of versions that ship in the Fedora and EPEL distros are
really best done in the SPEC file.  Finally, this was motivated by the
fact that the simple Python version check was not enough because
PyYAML>=4.2b2 is not available on Fedora 28, even though it contains
Python 3.

Reference: https://trello.com/c/3UMFOyzQ/1484-pyyaml-requirement-not-fulfilled-on-f28Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 47fff314
......@@ -13,18 +13,9 @@
# Copyright: Red Hat Inc. 2017
# Author: Cleber Rosa <crosa@redhat.com>
import sys
from setuptools import setup, find_packages
INSTALL_REQUIREMENTS = ['avocado-framework']
if sys.version_info[0] == 2:
INSTALL_REQUIREMENTS.append('PyYAML>=3.10')
else:
INSTALL_REQUIREMENTS.append('PyYAML>=4.2b2')
setup(name='avocado-framework-plugin-varianter-yaml-to-mux',
description='Avocado Varianter plugin to parse YAML file into variants',
version=open("VERSION", "r").read().strip(),
......@@ -33,7 +24,7 @@ setup(name='avocado-framework-plugin-varianter-yaml-to-mux',
url='http://avocado-framework.github.io/',
packages=find_packages(exclude=('tests*',)),
include_package_data=True,
install_requires=INSTALL_REQUIREMENTS,
install_requires=('avocado-framework', 'PyYAML>=4.2b2'),
test_suite='tests',
entry_points={
"avocado.plugins.cli": [
......
......@@ -214,6 +214,10 @@ sed -e "s/'libvirt-python'//" -i optional_plugins/runner_vm/setup.py
%build
%if 0%{?rhel} == 7
sed -e "s/'six>=1.10.0'/'six>=1.9.0'/" -i setup.py
sed -e "s/'PyYAML>=4.2b2'/'PyYAML>=3.10'/" -i optional_plugins/varianter_yaml_to_mux/setup.py
%endif
%if 0%{?fedora} && 0%{?fedora} < 29
sed -e "s/'PyYAML>=4.2b2'/'PyYAML>=3.12'/" -i optional_plugins/varianter_yaml_to_mux/setup.py
%endif
%py2_build
%if %{with_python3}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册