From 5ef8c3ede298cca3ea00c79d6205b1d7bed35313 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Feb 11 2022 05:26:58 +0000 Subject: import fence-agents-4.2.1-86.el8 --- diff --git a/.fence-agents.metadata b/.fence-agents.metadata index 6af41af..a89b55a 100644 --- a/.fence-agents.metadata +++ b/.fence-agents.metadata @@ -4,13 +4,16 @@ a8c40a3ae9d4c159382a58db3153d83e5521c51e SOURCES/PyYAML-6.0.tar.gz 0a56f6d9ed2014a363486d33b63eca094379be06 SOURCES/aliyun-python-sdk-core-2.13.1.tar.gz c2a98b9a1562d223a76514f05028488ca000c395 SOURCES/aliyun-python-sdk-ecs-4.9.3.tar.gz f14647a4d37a9a254c4e711b95a7654fc418e41e SOURCES/aliyun-python-sdk-vpc-3.0.2.tar.gz +2512ff4ef016cad0b916006f6acf2a309f908c4d SOURCES/botocore-1.23.46.tar.gz 0d12f48faa727f0979e9ad5c4c80dfa32b73caff SOURCES/cachetools-4.2.4.tar.gz b13e22d55867e2ca5f92e5289cfdc21ba6e343aa SOURCES/certifi-2021.10.8.tar.gz +2384f6cfba4685d901262e073a4455d4cf76d102 SOURCES/chardet-4.0.0.tar.gz 865df92e66e5dc7b940144cbad8115c07dc8784f SOURCES/charset-normalizer-2.0.7.tar.gz e2561df8e7ff9113dab118a651371dd88dab0142 SOURCES/fence-agents-4.2.1.tar.gz f4e578dc0ed68d6667d7b36cdfc2647d55e9858f SOURCES/google-auth-2.3.0.tar.gz 74ec77d2e2ef6b2ef8503e6e398faa6f3ba298ae SOURCES/httplib2-0.19.1-py3-none-any.whl 08c0449533fc94462f78652dea209099754d9ee4 SOURCES/idna-3.3.tar.gz +356c48dfea2214dd9e7e2b222a99dddfe9c0d05c SOURCES/jmespath-0.10.0.tar.gz d06a9547b1a87e9c51b0a7c708189d993f2e3d89 SOURCES/kubernetes-12.0.1.tar.gz f6efa66f6106b069b5c0e0cf8cc677e4e96c91ca SOURCES/oauthlib-3.1.1.tar.gz 570d69d8c108ebb8aee562389d13b07dfb61ce25 SOURCES/openshift-0.12.1.tar.gz diff --git a/.gitignore b/.gitignore index 2c48960..21e220e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,13 +4,16 @@ SOURCES/PyYAML-6.0.tar.gz SOURCES/aliyun-python-sdk-core-2.13.1.tar.gz SOURCES/aliyun-python-sdk-ecs-4.9.3.tar.gz SOURCES/aliyun-python-sdk-vpc-3.0.2.tar.gz +SOURCES/botocore-1.23.46.tar.gz SOURCES/cachetools-4.2.4.tar.gz SOURCES/certifi-2021.10.8.tar.gz +SOURCES/chardet-4.0.0.tar.gz SOURCES/charset-normalizer-2.0.7.tar.gz SOURCES/fence-agents-4.2.1.tar.gz SOURCES/google-auth-2.3.0.tar.gz SOURCES/httplib2-0.19.1-py3-none-any.whl SOURCES/idna-3.3.tar.gz +SOURCES/jmespath-0.10.0.tar.gz SOURCES/kubernetes-12.0.1.tar.gz SOURCES/oauthlib-3.1.1.tar.gz SOURCES/openshift-0.12.1.tar.gz diff --git a/SOURCES/bz2048857-fence_aws-botocore-bundled.patch b/SOURCES/bz2048857-fence_aws-botocore-bundled.patch new file mode 100644 index 0000000..7e31da1 --- /dev/null +++ b/SOURCES/bz2048857-fence_aws-botocore-bundled.patch @@ -0,0 +1,11 @@ +--- a/agents/aws/fence_aws.py 2022-02-09 10:51:19.579385154 +0100 ++++ b/agents/aws/fence_aws.py 2022-02-09 10:51:47.148478185 +0100 +@@ -7,6 +7,8 @@ + from fencing import * + from fencing import fail, fail_usage, run_delay, EC_STATUS, SyslogLibHandler + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled/aws') ++ + import requests + import boto3 + from requests import HTTPError diff --git a/SPECS/fence-agents.spec b/SPECS/fence-agents.spec index deb2991..42760c5 100644 --- a/SPECS/fence-agents.spec +++ b/SPECS/fence-agents.spec @@ -25,6 +25,14 @@ %global aliyunsdkvpc aliyun-python-sdk-vpc %global aliyunsdkvpc_version 3.0.2 %global aliyunsdkvpc_dir %{bundled_lib_dir}/aliyun/%{aliyunsdkvpc} +# aws +%global botocore botocore +%global botocore_version 1.23.46 +%global chardet chardet +%global chardet_version 4.0.0 +## for pip install only +%global jmespath jmespath +%global jmespath_version 0.10.0 # google cloud %global httplib2 httplib2 %global httplib2_version 0.19.1 @@ -79,7 +87,7 @@ Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") Version: 4.2.1 -Release: 85%{?alphatag:.%{alphatag}}%{?dist} +Release: 86%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: https://github.com/ClusterLabs/fence-agents @@ -92,40 +100,44 @@ Source4: %{aliyunsdkvpc}-%{aliyunsdkvpc_version}.tar.gz # google cloud Source5: %{httplib2}-%{httplib2_version}-py3-none-any.whl Source6: pyparsing-2.4.7-py2.py3-none-any.whl +# aws +Source7: %{botocore}-%{botocore_version}.tar.gz +Source8: %{jmespath}-%{jmespath_version}.tar.gz +Source9: %{chardet}-%{chardet_version}.tar.gz # kubevirt ## pip download --no-binary :all: openshift "ruamel.yaml.clib>=0.1.2" ### BEGIN -Source7: %{openshift}-%{openshift_version}.tar.gz -Source8: %{ruamelyamlclib}-%{ruamelyamlclib_version}.tar.gz -Source9: %{kubernetes}-%{kubernetes_version}.tar.gz -Source10: %{certifi}-%{certifi_version}.tar.gz -Source11: %{googleauth}-%{googleauth_version}.tar.gz -Source12: %{cachetools}-%{cachetools_version}.tar.gz -Source13: %{pyasn1modules}-%{pyasn1modules_version}.tar.gz -Source14: %{pyasn1}-%{pyasn1_version}.tar.gz -Source15: python-%{dateutil}-%{dateutil_version}.tar.gz -Source16: %{pyyaml}-%{pyyaml_version}.tar.gz +Source10: %{openshift}-%{openshift_version}.tar.gz +Source11: %{ruamelyamlclib}-%{ruamelyamlclib_version}.tar.gz +Source12: %{kubernetes}-%{kubernetes_version}.tar.gz +Source13: %{certifi}-%{certifi_version}.tar.gz +Source14: %{googleauth}-%{googleauth_version}.tar.gz +Source15: %{cachetools}-%{cachetools_version}.tar.gz +Source16: %{pyasn1modules}-%{pyasn1modules_version}.tar.gz +Source17: %{pyasn1}-%{pyasn1_version}.tar.gz +Source18: python-%{dateutil}-%{dateutil_version}.tar.gz +Source19: %{pyyaml}-%{pyyaml_version}.tar.gz ## rsa is dependency for "pip install", ## but gets removed to use cryptography lib instead -Source17: rsa-4.7.2.tar.gz -Source18: %{six}-%{six_version}.tar.gz -Source19: %{urllib3}-%{urllib3_version}.tar.gz -Source20: %{websocketclient}-%{websocketclient_version}.tar.gz -Source21: %{jinja2}-%{jinja2_version}.tar.gz -Source22: %{markupsafe}-%{markupsafe_version}.tar.gz -Source23: python-%{stringutils}-%{stringutils_version}.tar.gz -Source24: %{requests}-%{requests_version}.tar.gz -Source25: %{chrstnormalizer}-%{chrstnormalizer_version}.tar.gz -Source26: %{idna}-%{idna_version}.tar.gz -Source27: %{reqstsoauthlib}-%{reqstsoauthlib_version}.tar.gz -Source28: %{oauthlib}-%{oauthlib_version}.tar.gz -Source29: %{ruamelyaml}-%{ruamelyaml_version}.tar.gz -Source30: %{setuptools}-%{setuptools_version}.tar.gz +Source20: rsa-4.7.2.tar.gz +Source21: %{six}-%{six_version}.tar.gz +Source22: %{urllib3}-%{urllib3_version}.tar.gz +Source23: %{websocketclient}-%{websocketclient_version}.tar.gz +Source24: %{jinja2}-%{jinja2_version}.tar.gz +Source25: %{markupsafe}-%{markupsafe_version}.tar.gz +Source26: python-%{stringutils}-%{stringutils_version}.tar.gz +Source27: %{requests}-%{requests_version}.tar.gz +Source28: %{chrstnormalizer}-%{chrstnormalizer_version}.tar.gz +Source29: %{idna}-%{idna_version}.tar.gz +Source30: %{reqstsoauthlib}-%{reqstsoauthlib_version}.tar.gz +Source31: %{oauthlib}-%{oauthlib_version}.tar.gz +Source32: %{ruamelyaml}-%{ruamelyaml_version}.tar.gz +Source33: %{setuptools}-%{setuptools_version}.tar.gz ## required for installation -Source31: setuptools_scm-6.3.2.tar.gz -Source32: packaging-21.2-py3-none-any.whl -Source33: pyparsing-3.0.1.tar.gz -Source34: tomli-1.0.1.tar.gz +Source34: setuptools_scm-6.3.2.tar.gz +Source35: packaging-21.2-py3-none-any.whl +Source36: pyparsing-3.0.1.tar.gz +Source37: tomli-1.0.1.tar.gz ### END Patch0: fence_impilan-fence_ilo_ssh-add-ilo5-support.patch @@ -236,9 +248,10 @@ Patch104: bz1977588-3-fence_kubevirt-fix-status.patch Patch105: bz1977588-4-fence_kubevirt-power-timeout-40s.patch Patch106: bz1963163-fence_zvmip-add-ssl-tls-support.patch Patch107: bz1977588-5-fence_kubevirt-get-namespace-from-context.patch +Patch108: bz2048857-fence_aws-botocore-bundled.patch %if 0%{?fedora} || 0%{?rhel} > 7 -%global supportedagents amt_ws apc apc_snmp bladecenter brocade cisco_mds cisco_ucs compute drac5 eaton_snmp emerson eps evacuate hds_cb hpblade ibmblade ibm_powervs ibm_vpc ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular ipdu ipmilan kdump kubevirt lpar mpath redfish rhevm rsa rsb sbd scsi vmware_rest vmware_soap wti +%global supportedagents amt_ws apc apc_snmp bladecenter brocade cisco_mds cisco_ucs compute drac5 eaton_snmp emerson eps evacuate hds_cb hpblade ibmblade ibm_powervs ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular ipdu ipmilan kdump kubevirt lpar mpath redfish rhevm rsa rsb sbd scsi vmware_rest vmware_soap wti %ifarch x86_64 %global testagents virsh heuristics_ping aliyun aws azure_arm gce %endif @@ -305,10 +318,6 @@ BuildRequires: python3-devel BuildRequires: python3-pexpect python3-pycurl python3-requests BuildRequires: python3-suds openwsman-python3 python3-boto3 BuildRequires: python3-google-api-client python3-pip python3-wheel python3-jinja2 -# google cloud -%ifarch x86_64 -BuildRequires: python3-pip -%endif # turn off the brp-python-bytecompile script # (for F28+ or equivalent, the latter is the preferred form) @@ -425,6 +434,7 @@ BuildRequires: python3-pip %patch105 -p1 %patch106 -p1 %patch107 -p1 +%patch108 -p1 # prevent compilation of something that won't get used anyway sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac @@ -515,8 +525,17 @@ popd %{__python3} -m pip install --target %{buildroot}/usr/lib/fence-agents/%{bundled_lib_dir}/google --no-index --find-links %{_sourcedir} httplib2 %endif -# kubevirt +# aws/kubevirt %{__python3} -m pip install --user --no-index --find-links %{_sourcedir} setuptools-scm + +# aws +%ifarch x86_64 +%{__python3} -m pip install --user --no-index --find-links %{_sourcedir} jmespath +%{__python3} -m pip install --target %{buildroot}/usr/lib/fence-agents/%{bundled_lib_dir}/aws --no-index --find-links %{_sourcedir} botocore +%{__python3} -m pip install --target %{buildroot}/usr/lib/fence-agents/%{bundled_lib_dir}/aws --no-index --find-links %{_sourcedir} requests +%endif + +# kubevirt %{__python3} -m pip install --target %{buildroot}/usr/lib/fence-agents/%{bundled_lib_dir}/kubevirt --no-index --find-links %{_sourcedir} openshift rm -rf %{buildroot}/usr/lib/fence-agents/%{bundled_lib_dir}/kubevirt/rsa* @@ -669,7 +688,14 @@ License: GPLv2+ and LGPLv2+ Group: System Environment/Base Summary: Fence agent for Amazon AWS Requires: fence-agents-common >= %{version}-%{release} -Requires: python3-boto3 +Requires: python3-boto3 python3-jmespath +Provides: bundled(python3-%{botocore}) = %{botocore_version} +Provides: bundled(python3-%{urllib3}) = %{urllib3_version} +Provides: bundled(python3-%{requests}) = %{requests_version} +Provides: bundled(python3-%{certifi}) = %{certifi_version} +Provides: bundled(python3-%{chrstnormalizer}) = %{chrstnormalizer_version} +Provides: bundled(python3-%{idna}) = %{idna_version} +Provides: bundled(python3-%{chardet}) = %{chardet_version} Obsoletes: %{name} < %{version}-%{release} BuildArch: noarch %description aws @@ -677,6 +703,8 @@ Fence agent for Amazon AWS instances. %files aws %{_sbindir}/fence_aws %{_mandir}/man8/fence_aws.8* +# bundled libraries +/usr/lib/fence-agents/%{bundled_lib_dir}/aws %endif %ifarch x86_64 @@ -1358,8 +1386,12 @@ Fence agent for IBM z/VM over IP. %endif %changelog +* Wed Feb 9 2022 Oyvind Albrigtsen - 4.2.1-86 +- fence_aws: upgrade botocore to fix IMDSv2 support + Resolves: rhbz#2048857 + * Wed Jan 19 2022 Oyvind Albrigtsen - 4.2.1-85 -- fence_ibm_powervs: new fence agents +- fence_ibm_powervs: new fence agent Resolves: rhbz#1874862 * Mon Jan 17 2022 Oyvind Albrigtsen - 4.2.1-84