import resource-agents-4.1.1-98.el8_5.2
This commit is contained in:
parent
c9677f5977
commit
559165f198
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,7 +4,6 @@ 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/colorama-0.3.3.tar.gz
|
||||
SOURCES/google-cloud-sdk-241.0.0-linux-x86_64.tar.gz
|
||||
SOURCES/httplib2-0.18.1.tar.gz
|
||||
SOURCES/google-cloud-sdk-360.0.0-linux-x86_64.tar.gz
|
||||
SOURCES/pycryptodome-3.6.4.tar.gz
|
||||
SOURCES/pyroute2-0.4.13.tar.gz
|
||||
|
@ -4,7 +4,6 @@
|
||||
c2a98b9a1562d223a76514f05028488ca000c395 SOURCES/aliyun-python-sdk-ecs-4.9.3.tar.gz
|
||||
f14647a4d37a9a254c4e711b95a7654fc418e41e SOURCES/aliyun-python-sdk-vpc-3.0.2.tar.gz
|
||||
0fe5bd8bca54dd71223778a1e0bcca9af324abb1 SOURCES/colorama-0.3.3.tar.gz
|
||||
876e2b0c0e3031c6e6101745acd08e4e9f53d6a9 SOURCES/google-cloud-sdk-241.0.0-linux-x86_64.tar.gz
|
||||
c5d22ce6660999633154927684eb9b799123e569 SOURCES/httplib2-0.18.1.tar.gz
|
||||
81f039cf075e9c8b70d5af99c189296a9e031de3 SOURCES/google-cloud-sdk-360.0.0-linux-x86_64.tar.gz
|
||||
326a73f58a62ebee00c11a12cfdd838b196e0e8e SOURCES/pycryptodome-3.6.4.tar.gz
|
||||
147149db11104c06d405fd077dcd2aa1c345f109 SOURCES/pyroute2-0.4.13.tar.gz
|
||||
|
@ -10,26 +10,14 @@ diff -uNr a/heartbeat/gcp-vpc-move-ip.in b/heartbeat/gcp-vpc-move-ip.in
|
||||
OCF_RESKEY_configuration_default="default"
|
||||
OCF_RESKEY_vpc_network_default="default"
|
||||
OCF_RESKEY_interface_default="eth0"
|
||||
diff -uNr a/heartbeat/gcp-vpc-move-vip.in b/heartbeat/gcp-vpc-move-vip.in
|
||||
--- a/heartbeat/gcp-vpc-move-vip.in 2020-06-25 13:21:42.090334894 +0200
|
||||
+++ b/heartbeat/gcp-vpc-move-vip.in 2020-06-25 13:14:16.668092817 +0200
|
||||
@@ -28,6 +28,7 @@
|
||||
from ocf import *
|
||||
|
||||
try:
|
||||
+ sys.path.insert(0, '/usr/lib/resource-agents/bundled/gcp/google-cloud-sdk/lib/third_party')
|
||||
import googleapiclient.discovery
|
||||
except ImportError:
|
||||
pass
|
||||
diff -uNr a/heartbeat/gcp-vpc-move-route.in b/heartbeat/gcp-vpc-move-route.in
|
||||
--- a/heartbeat/gcp-vpc-move-route.in 2020-06-25 13:22:03.216301380 +0200
|
||||
+++ b/heartbeat/gcp-vpc-move-route.in 2020-06-25 13:13:19.864183380 +0200
|
||||
@@ -45,6 +45,8 @@
|
||||
--- a/heartbeat/gcp-vpc-move-route.in 2019-04-05 09:20:26.180739624 +0200
|
||||
+++ b/heartbeat/gcp-vpc-move-route.in 2019-04-05 09:22:28.648649593 +0200
|
||||
@@ -45,6 +45,7 @@
|
||||
from ocf import *
|
||||
|
||||
try:
|
||||
+ sys.path.insert(0, '/usr/lib/resource-agents/bundled/gcp')
|
||||
+ sys.path.insert(0, '/usr/lib/resource-agents/bundled/gcp/google-cloud-sdk/lib/third_party')
|
||||
import googleapiclient.discovery
|
||||
import pyroute2
|
||||
except ImportError:
|
||||
try:
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -uNr a/bundled/gcp/google-cloud-sdk/bin/gcloud b/bundled/gcp/google-cloud-sdk/bin/gcloud
|
||||
--- a/bundled/gcp/google-cloud-sdk/bin/gcloud 2018-06-18 14:30:10.000000000 +0200
|
||||
+++ b/bundled/gcp/google-cloud-sdk/bin/gcloud 2018-06-25 13:12:56.057000620 +0200
|
||||
@@ -64,6 +64,8 @@
|
||||
}
|
||||
CLOUDSDK_ROOT_DIR=$(_cloudsdk_root_dir "$0")
|
||||
|
||||
+CLOUDSDK_PYTHON_SITEPACKAGES=1
|
||||
+
|
||||
# if CLOUDSDK_PYTHON is empty
|
||||
if [ -z "$CLOUDSDK_PYTHON" ]; then
|
||||
# if python2 exists then plain python may point to a version != 2
|
@ -1,29 +1,14 @@
|
||||
diff -uNr a/bundled/gcp/google-cloud-sdk/bin/gcloud b/bundled/gcp/google-cloud-sdk/bin/gcloud
|
||||
--- a/bundled/gcp/google-cloud-sdk/bin/gcloud 2019-04-04 12:01:28.838027640 +0200
|
||||
+++ b/bundled/gcp/google-cloud-sdk/bin/gcloud 2019-04-04 12:03:21.577089065 +0200
|
||||
@@ -74,24 +74,7 @@
|
||||
--- a/bundled/gcp/google-cloud-sdk/bin/gcloud 1980-01-01 09:00:00.000000000 +0100
|
||||
+++ b/bundled/gcp/google-cloud-sdk/bin/gcloud 2021-10-14 11:30:17.726138166 +0200
|
||||
@@ -128,6 +128,11 @@
|
||||
fi
|
||||
}
|
||||
|
||||
# if CLOUDSDK_PYTHON is empty
|
||||
if [ -z "$CLOUDSDK_PYTHON" ]; then
|
||||
- # if python2 exists then plain python may point to a version != 2
|
||||
- if _cloudsdk_which python2 >/dev/null; then
|
||||
- CLOUDSDK_PYTHON=python2
|
||||
- elif _cloudsdk_which python2.7 >/dev/null; then
|
||||
- # this is what some OS X versions call their built-in Python
|
||||
- CLOUDSDK_PYTHON=python2.7
|
||||
- elif _cloudsdk_which python >/dev/null; then
|
||||
- # Use unversioned python if it exists.
|
||||
- CLOUDSDK_PYTHON=python
|
||||
- elif _cloudsdk_which python3 >/dev/null; then
|
||||
- # We support python3, but only want to default to it if nothing else is
|
||||
- # found.
|
||||
- CLOUDSDK_PYTHON=python3
|
||||
- else
|
||||
- # This won't work because it wasn't found above, but at this point this
|
||||
- # is our best guess for the error message.
|
||||
- CLOUDSDK_PYTHON=python
|
||||
- fi
|
||||
+if [ -z "$CLOUDSDK_PYTHON" ]; then
|
||||
+ CLOUDSDK_PYTHON="/usr/libexec/platform-python"
|
||||
fi
|
||||
+ CLOUDSDK_PYTHON_SITEPACKAGES=1
|
||||
+fi
|
||||
+
|
||||
setup_cloudsdk_python
|
||||
|
||||
# $PYTHONHOME can interfere with gcloud. Users should use
|
||||
|
@ -0,0 +1,64 @@
|
||||
From fcd2565602146c0b9317d159cecb8935e304c7ce Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Thu, 30 Sep 2021 10:23:17 +0200
|
||||
Subject: [PATCH] gcp-pd-move/gcp-vpc-move-route: dont fail failed resources
|
||||
instantly (caused by OCF_ERR_CONFIGURED)
|
||||
|
||||
---
|
||||
heartbeat/gcp-pd-move.in | 4 ++--
|
||||
heartbeat/gcp-vpc-move-route.in | 6 +++---
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/heartbeat/gcp-pd-move.in b/heartbeat/gcp-pd-move.in
|
||||
index e99cc71f88..cbe703c3c5 100644
|
||||
--- a/heartbeat/gcp-pd-move.in
|
||||
+++ b/heartbeat/gcp-pd-move.in
|
||||
@@ -157,7 +157,7 @@ def populate_vars():
|
||||
CONN = googleapiclient.discovery.build('compute', 'v1')
|
||||
except Exception as e:
|
||||
logger.error('Couldn\'t connect with google api: ' + str(e))
|
||||
- sys.exit(ocf.OCF_ERR_CONFIGURED)
|
||||
+ sys.exit(ocf.OCF_ERR_GENERIC)
|
||||
|
||||
for param in PARAMETERS:
|
||||
value = os.environ.get('OCF_RESKEY_%s' % param, PARAMETERS[param])
|
||||
@@ -172,7 +172,7 @@ def populate_vars():
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
'Couldn\'t get instance name, is this running inside GCE?: ' + str(e))
|
||||
- sys.exit(ocf.OCF_ERR_CONFIGURED)
|
||||
+ sys.exit(ocf.OCF_ERR_GENERIC)
|
||||
|
||||
PROJECT = get_metadata('project/project-id')
|
||||
if PARAMETERS['disk_scope'] in ['detect', 'regional']:
|
||||
diff --git a/heartbeat/gcp-vpc-move-route.in b/heartbeat/gcp-vpc-move-route.in
|
||||
index dac6e4ea8c..6b240c04d0 100644
|
||||
--- a/heartbeat/gcp-vpc-move-route.in
|
||||
+++ b/heartbeat/gcp-vpc-move-route.in
|
||||
@@ -243,7 +243,7 @@ def validate(ctx):
|
||||
ctx.conn = googleapiclient.discovery.build('compute', 'v1', credentials=credentials, cache_discovery=False)
|
||||
except Exception as e:
|
||||
logger.error('Couldn\'t connect with google api: ' + str(e))
|
||||
- sys.exit(OCF_ERR_CONFIGURED)
|
||||
+ sys.exit(OCF_ERR_GENERIC)
|
||||
|
||||
ctx.ip = os.environ.get('OCF_RESKEY_ip')
|
||||
if not ctx.ip:
|
||||
@@ -258,7 +258,7 @@ def validate(ctx):
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
'Instance information not found. Is this a GCE instance ?: %s', str(e))
|
||||
- sys.exit(OCF_ERR_CONFIGURED)
|
||||
+ sys.exit(OCF_ERR_GENERIC)
|
||||
|
||||
ctx.instance_url = '%s/projects/%s/zones/%s/instances/%s' % (
|
||||
GCP_API_URL_PREFIX, ctx.project, ctx.zone, ctx.instance)
|
||||
@@ -273,7 +273,7 @@ def validate(ctx):
|
||||
idxs = ctx.iproute.link_lookup(ifname=ctx.interface)
|
||||
if not idxs:
|
||||
logger.error('Network interface not found')
|
||||
- sys.exit(OCF_ERR_CONFIGURED)
|
||||
+ sys.exit(OCF_ERR_GENERIC)
|
||||
ctx.iface_idx = idxs[0]
|
||||
|
||||
|
@ -0,0 +1,128 @@
|
||||
From 20915c0f10c6b2089189584b7971f2594cd7ed56 Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Wed, 9 Jun 2021 11:13:05 +0200
|
||||
Subject: [PATCH 1/2] gcp-vpc-move-route: add serviceaccount JSON file support
|
||||
|
||||
---
|
||||
heartbeat/gcp-vpc-move-route.in | 30 +++++++++++++++++++++++++++++-
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/heartbeat/gcp-vpc-move-route.in b/heartbeat/gcp-vpc-move-route.in
|
||||
index fd2d2ec59..dac6e4ea8 100644
|
||||
--- a/heartbeat/gcp-vpc-move-route.in
|
||||
+++ b/heartbeat/gcp-vpc-move-route.in
|
||||
@@ -47,6 +47,10 @@ from ocf import *
|
||||
try:
|
||||
import googleapiclient.discovery
|
||||
import pyroute2
|
||||
+ try:
|
||||
+ from google.oauth2.service_account import Credentials as ServiceAccountCredentials
|
||||
+ except ImportError:
|
||||
+ from oauth2client.service_account import ServiceAccountCredentials
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
@@ -132,6 +136,12 @@ Route name
|
||||
<content type="string" default="ra-%s" />
|
||||
</parameter>
|
||||
|
||||
+<parameter name="serviceaccount">
|
||||
+<longdesc lang="en">Path to Service account JSON file</longdesc>
|
||||
+<shortdesc lang="en">Service account JSONfile</shortdesc>
|
||||
+<content type="string" default="" />
|
||||
+</parameter>
|
||||
+
|
||||
<parameter name="stackdriver_logging" unique="0" required="0">
|
||||
<longdesc lang="en">If enabled (set to true), IP failover logs will be posted to stackdriver logging</longdesc>
|
||||
<shortdesc lang="en">Stackdriver-logging support</shortdesc>
|
||||
@@ -212,7 +222,25 @@ def validate(ctx):
|
||||
sys.exit(OCF_ERR_PERM)
|
||||
|
||||
try:
|
||||
- ctx.conn = googleapiclient.discovery.build('compute', 'v1')
|
||||
+ serviceaccount = os.environ.get("OCF_RESKEY_serviceaccount")
|
||||
+ if not serviceaccount:
|
||||
+ try:
|
||||
+ from googleapiclient import _auth
|
||||
+ credentials = _auth.default_credentials();
|
||||
+ except:
|
||||
+ credentials = GoogleCredentials.get_application_default()
|
||||
+ logging.debug("using application default credentials")
|
||||
+ else:
|
||||
+ scope = ['https://www.googleapis.com/auth/cloud-platform']
|
||||
+ logging.debug("using credentials from service account")
|
||||
+ try:
|
||||
+ credentials = ServiceAccountCredentials.from_service_account_file(filename=serviceaccount, scopes=scope)
|
||||
+ except AttributeError:
|
||||
+ credentials = ServiceAccountCredentials.from_json_keyfile_name(serviceaccount, scope)
|
||||
+ except Exception as e:
|
||||
+ logging.error(str(e))
|
||||
+ sys.exit(OCF_ERR_GENERIC)
|
||||
+ ctx.conn = googleapiclient.discovery.build('compute', 'v1', credentials=credentials, cache_discovery=False)
|
||||
except Exception as e:
|
||||
logger.error('Couldn\'t connect with google api: ' + str(e))
|
||||
sys.exit(OCF_ERR_CONFIGURED)
|
||||
|
||||
From 28e0d428db1fdd9d5270a2916bb9b0064115c11c Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Wed, 9 Jun 2021 11:22:09 +0200
|
||||
Subject: [PATCH 2/2] gcp-vpc-move-vip: add serviceaccount JSON file support
|
||||
|
||||
---
|
||||
heartbeat/gcp-vpc-move-vip.in | 28 ++++++++++++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/heartbeat/gcp-vpc-move-vip.in b/heartbeat/gcp-vpc-move-vip.in
|
||||
index c41155511..7e9d61f55 100755
|
||||
--- a/heartbeat/gcp-vpc-move-vip.in
|
||||
+++ b/heartbeat/gcp-vpc-move-vip.in
|
||||
@@ -30,6 +30,10 @@ from ocf import *
|
||||
|
||||
try:
|
||||
import googleapiclient.discovery
|
||||
+ try:
|
||||
+ from google.oauth2.service_account import Credentials as ServiceAccountCredentials
|
||||
+ except ImportError:
|
||||
+ from oauth2client.service_account import ServiceAccountCredentials
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
@@ -87,6 +91,11 @@ METADATA = \
|
||||
<shortdesc lang="en">Project ID</shortdesc>
|
||||
<content type="string" default="default" />
|
||||
</parameter>
|
||||
+ <parameter name="serviceaccount">
|
||||
+ <longdesc lang="en">Path to Service account JSON file</longdesc>
|
||||
+ <shortdesc lang="en">Service account JSONfile</shortdesc>
|
||||
+ <content type="string" default="" />
|
||||
+ </parameter>
|
||||
<parameter name="stackdriver_logging" unique="0" required="0">
|
||||
<longdesc lang="en">If enabled (set to true), IP failover logs will be posted to stackdriver logging</longdesc>
|
||||
<shortdesc lang="en">Stackdriver-logging support</shortdesc>
|
||||
@@ -136,7 +145,26 @@ def get_metadata(metadata_key, params=None, timeout=None):
|
||||
def create_api_connection():
|
||||
for i in range(MAX_RETRIES):
|
||||
try:
|
||||
+ serviceaccount = os.environ.get("OCF_RESKEY_serviceaccount")
|
||||
+ if not serviceaccount:
|
||||
+ try:
|
||||
+ from googleapiclient import _auth
|
||||
+ credentials = _auth.default_credentials();
|
||||
+ except:
|
||||
+ credentials = GoogleCredentials.get_application_default()
|
||||
+ logging.debug("using application default credentials")
|
||||
+ else:
|
||||
+ scope = ['https://www.googleapis.com/auth/cloud-platform']
|
||||
+ logging.debug("using credentials from service account")
|
||||
+ try:
|
||||
+ credentials = ServiceAccountCredentials.from_service_account_file(filename=serviceaccount, scopes=scope)
|
||||
+ except AttributeError:
|
||||
+ credentials = ServiceAccountCredentials.from_json_keyfile_name(serviceaccount, scope)
|
||||
+ except Exception as e:
|
||||
+ logging.error(str(e))
|
||||
+ sys.exit(OCF_ERR_GENERIC)
|
||||
return googleapiclient.discovery.build('compute', 'v1',
|
||||
+ credentials=credentials,
|
||||
cache_discovery=False)
|
||||
except Exception as e:
|
||||
logger.error('Couldn\'t connect with google api: ' + str(e))
|
@ -27,12 +27,8 @@
|
||||
## google cloud
|
||||
# google-cloud-sdk bundle
|
||||
%global googlecloudsdk google-cloud-sdk
|
||||
%global googlecloudsdk_version 241.0.0
|
||||
%global googlecloudsdk_version 360.0.0
|
||||
%global googlecloudsdk_dir %{bundled_lib_dir}/gcp/%{googlecloudsdk}
|
||||
# python-httplib2 bundle
|
||||
%global httplib2 httplib2
|
||||
%global httplib2_version 0.18.1
|
||||
%global httplib2_dir %{bundled_lib_dir}/gcp/%{httplib2}
|
||||
# python-pyroute2 bundle
|
||||
%global pyroute2 pyroute2
|
||||
%global pyroute2_version 0.4.13
|
||||
@ -70,7 +66,7 @@
|
||||
Name: resource-agents
|
||||
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||
Version: 4.1.1
|
||||
Release: 98%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||
Release: 98%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.2
|
||||
License: GPLv2+ and LGPLv2+
|
||||
URL: https://github.com/ClusterLabs/resource-agents
|
||||
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
|
||||
@ -80,14 +76,13 @@ Group: Productivity/Clustering/HA
|
||||
%endif
|
||||
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
|
||||
Source1: %{googlecloudsdk}-%{googlecloudsdk_version}-linux-x86_64.tar.gz
|
||||
Source2: %{httplib2}-%{httplib2_version}.tar.gz
|
||||
Source3: %{pyroute2}-%{pyroute2_version}.tar.gz
|
||||
Source4: %{colorama}-%{colorama_version}.tar.gz
|
||||
Source5: %{pycryptodome}-%{pycryptodome_version}.tar.gz
|
||||
Source6: %{aliyunsdkcore}-%{aliyunsdkcore_version}.tar.gz
|
||||
Source7: %{aliyunsdkecs}-%{aliyunsdkecs_version}.tar.gz
|
||||
Source8: %{aliyunsdkvpc}-%{aliyunsdkvpc_version}.tar.gz
|
||||
Source9: %{aliyuncli}-%{aliyuncli_version}.tar.gz
|
||||
Source2: %{pyroute2}-%{pyroute2_version}.tar.gz
|
||||
Source3: %{colorama}-%{colorama_version}.tar.gz
|
||||
Source4: %{pycryptodome}-%{pycryptodome_version}.tar.gz
|
||||
Source5: %{aliyunsdkcore}-%{aliyunsdkcore_version}.tar.gz
|
||||
Source6: %{aliyunsdkecs}-%{aliyunsdkecs_version}.tar.gz
|
||||
Source7: %{aliyunsdkvpc}-%{aliyunsdkvpc_version}.tar.gz
|
||||
Source8: %{aliyuncli}-%{aliyuncli_version}.tar.gz
|
||||
Patch0: nova-compute-wait-NovaEvacuate.patch
|
||||
Patch1: LVM-volume_group_check_only.patch
|
||||
Patch2: bz1552330-vdo-vol.patch
|
||||
@ -283,18 +278,19 @@ Patch191: bz1969968-lvmlockd-remove-with_cmirrord.patch
|
||||
Patch192: bz1972035-LVM-activate-fix-drop-in.patch
|
||||
Patch193: bz1972743-podman-fix-container-creation-race.patch
|
||||
Patch194: bz1509319-storage-mon-new-ra.patch
|
||||
Patch195: bz2008955-gcp-pd-move-gcp-vpc-move-route-dont-fail-due-to-incorrect-rc.patch
|
||||
Patch196: bz2011839-gcp-vpc-move-route-gcp-vpc-move-vip-add-serviceaccount-file-support.patch
|
||||
|
||||
# bundle patches
|
||||
Patch1000: 7-gcp-bundled.patch
|
||||
Patch1001: 8-google-cloud-sdk-fixes.patch
|
||||
Patch1002: 9-google-cloud-sdk-oauth2client-python-rsa-to-cryptography.patch
|
||||
Patch1003: 10-gcloud-support-info.patch
|
||||
Patch1004: bz1691456-gcloud-dont-detect-python2.patch
|
||||
Patch1005: aliyun-vpc-move-ip-4-bundled.patch
|
||||
Patch1006: python3-syntax-fixes.patch
|
||||
Patch1007: aliyuncli-python3-fixes.patch
|
||||
Patch1008: bz1935422-python-pygments-fix-CVE-2021-20270.patch
|
||||
Patch1009: bz1943464-python-pygments-fix-CVE-2021-27291.patch
|
||||
Patch1001: 9-google-cloud-sdk-oauth2client-python-rsa-to-cryptography.patch
|
||||
Patch1002: 10-gcloud-support-info.patch
|
||||
Patch1003: bz1691456-gcloud-dont-detect-python2.patch
|
||||
Patch1004: aliyun-vpc-move-ip-4-bundled.patch
|
||||
Patch1005: python3-syntax-fixes.patch
|
||||
Patch1006: aliyuncli-python3-fixes.patch
|
||||
Patch1007: bz1935422-python-pygments-fix-CVE-2021-20270.patch
|
||||
Patch1008: bz1943464-python-pygments-fix-CVE-2021-27291.patch
|
||||
|
||||
Obsoletes: heartbeat-resources <= %{version}
|
||||
Provides: heartbeat-resources = %{version}
|
||||
@ -650,6 +646,8 @@ exit 1
|
||||
%patch192 -p1
|
||||
%patch193 -p1
|
||||
%patch194 -p1 -F2
|
||||
%patch195 -p1 -F1
|
||||
%patch196 -p1 -F2
|
||||
|
||||
chmod 755 heartbeat/nova-compute-wait
|
||||
chmod 755 heartbeat/NovaEvacuate
|
||||
@ -662,31 +660,20 @@ mkdir -p %{bundled_lib_dir}/aliyun
|
||||
# google-cloud-sdk bundle
|
||||
%ifarch x86_64
|
||||
tar -xzf %SOURCE1 -C %{bundled_lib_dir}/gcp
|
||||
## upgrade httplib2 to fix CVE-2020-11078
|
||||
pushd %{googlecloudsdk_dir}
|
||||
rm -rf lib/third_party/httplib2
|
||||
popd
|
||||
|
||||
# python-httplib2 bundle
|
||||
tar -xzf %SOURCE2 -C %{bundled_lib_dir}
|
||||
mv %{bundled_lib_dir}/%{httplib2}-%{httplib2_version} %{httplib2_dir}
|
||||
|
||||
# gcp*: append bundled-directory to search path, gcloud-ra
|
||||
%patch1000 -p1
|
||||
# google-cloud-sdk fixes
|
||||
%patch1001 -p1
|
||||
# replace python-rsa with python-cryptography
|
||||
%patch1002 -p1
|
||||
%patch1001 -p1
|
||||
# gcloud support info
|
||||
%patch1003 -p1
|
||||
%patch1002 -p1
|
||||
# gcloud remove python 2 detection
|
||||
%patch1004 -p1
|
||||
%patch1003 -p1
|
||||
# rename gcloud
|
||||
mv %{googlecloudsdk_dir}/bin/gcloud %{googlecloudsdk_dir}/bin/gcloud-ra
|
||||
# keep googleapiclient
|
||||
mv %{googlecloudsdk_dir}/platform/bq/third_party/googleapiclient %{googlecloudsdk_dir}/lib/third_party
|
||||
# only keep gcloud
|
||||
rm -rf %{googlecloudsdk_dir}/bin/{bootstrapping,bq,dev_appserver.py,docker-credential-gcloud,endpointscfg.py,git-credential-gcloud.sh,gsutil,java_dev_appserver.sh} %{googlecloudsdk_dir}/{completion.*,deb,install.*,path.*,platform,properties,RELEASE_NOTES,rpm,VERSION}
|
||||
rm -rf %{googlecloudsdk_dir}/bin/{anthoscli,bootstrapping,bq,dev_appserver.py,docker-credential-gcloud,endpointscfg.py,git-credential-gcloud.sh,gsutil,java_dev_appserver.sh} %{googlecloudsdk_dir}/{completion.*,deb,install.*,path.*,platform,properties,RELEASE_NOTES,rpm,VERSION}
|
||||
# remove Python 2 code
|
||||
rm -rf %{googlecloudsdk_dir}/lib/third_party/*/python2
|
||||
# remove python-rsa
|
||||
@ -699,7 +686,7 @@ rm -rf %{googlecloudsdk_dir}/lib/third_party/dateutil
|
||||
cp %{googlecloudsdk_dir}/README %{googlecloudsdk}_README
|
||||
cp %{googlecloudsdk_dir}/lib/third_party/argparse/README.txt %{googlecloudsdk}_argparse_README.txt
|
||||
cp %{googlecloudsdk_dir}/LICENSE %{googlecloudsdk}_LICENSE
|
||||
cp %{httplib2_dir}/LICENSE %{googlecloudsdk}_httplib2_LICENSE
|
||||
cp %{googlecloudsdk_dir}/lib/third_party/httplib2/LICENSE %{googlecloudsdk}_httplib2_LICENSE
|
||||
cp %{googlecloudsdk_dir}/lib/third_party/contextlib2/LICENSE %{googlecloudsdk}_contextlib2_LICENSE
|
||||
cp %{googlecloudsdk_dir}/lib/third_party/concurrent/LICENSE %{googlecloudsdk}_concurrent_LICENSE
|
||||
cp %{googlecloudsdk_dir}/lib/third_party/yaml/LICENSE %{googlecloudsdk}_yaml_LICENSE
|
||||
@ -742,7 +729,7 @@ cp %{googlecloudsdk_dir}/lib/third_party/apitools/LICENSE %{googlecloudsdk}_apit
|
||||
cp %{googlecloudsdk_dir}/lib/third_party/containerregistry/LICENSE %{googlecloudsdk}_containerregistry_LICENSE
|
||||
|
||||
# python-pyroute2 bundle
|
||||
tar -xzf %SOURCE3 -C %{bundled_lib_dir}/gcp
|
||||
tar -xzf %SOURCE2 -C %{bundled_lib_dir}/gcp
|
||||
mv %{bundled_lib_dir}/gcp/%{pyroute2}-%{pyroute2_version} %{pyroute2_dir}
|
||||
cp %{pyroute2_dir}/README.md %{pyroute2}_README.md
|
||||
cp %{pyroute2_dir}/README.license.md %{pyroute2}_README.license.md
|
||||
@ -750,7 +737,7 @@ cp %{pyroute2_dir}/LICENSE.Apache.v2 %{pyroute2}_LICENSE.Apache.v2
|
||||
cp %{pyroute2_dir}/LICENSE.GPL.v2 %{pyroute2}_LICENSE.GPL.v2
|
||||
|
||||
# python-colorama bundle
|
||||
tar -xzf %SOURCE4 -C %{bundled_lib_dir}/aliyun
|
||||
tar -xzf %SOURCE3 -C %{bundled_lib_dir}/aliyun
|
||||
mv %{bundled_lib_dir}/aliyun/%{colorama}-%{colorama_version} %{colorama_dir}
|
||||
cp %{colorama_dir}/LICENSE.txt %{colorama}_LICENSE.txt
|
||||
cp %{colorama_dir}/README.rst %{colorama}_README.rst
|
||||
@ -761,42 +748,42 @@ rm -rf *.egg-info
|
||||
popd
|
||||
|
||||
# python-pycryptodome bundle
|
||||
tar -xzf %SOURCE5 -C %{bundled_lib_dir}/aliyun
|
||||
tar -xzf %SOURCE4 -C %{bundled_lib_dir}/aliyun
|
||||
mv %{bundled_lib_dir}/aliyun/%{pycryptodome}-%{pycryptodome_version} %{pycryptodome_dir}
|
||||
cp %{pycryptodome_dir}/README.rst %{pycryptodome}_README.rst
|
||||
cp %{pycryptodome_dir}/LICENSE.rst %{pycryptodome}_LICENSE.rst
|
||||
|
||||
# python-aliyun-sdk-core bundle
|
||||
tar -xzf %SOURCE6 -C %{bundled_lib_dir}/aliyun
|
||||
tar -xzf %SOURCE5 -C %{bundled_lib_dir}/aliyun
|
||||
mv %{bundled_lib_dir}/aliyun/%{aliyunsdkcore}-%{aliyunsdkcore_version} %{aliyunsdkcore_dir}
|
||||
cp %{aliyunsdkcore_dir}/README.rst %{aliyunsdkcore}_README.rst
|
||||
|
||||
# python-aliyun-sdk-ecs bundle
|
||||
tar -xzf %SOURCE7 -C %{bundled_lib_dir}/aliyun
|
||||
tar -xzf %SOURCE6 -C %{bundled_lib_dir}/aliyun
|
||||
mv %{bundled_lib_dir}/aliyun/%{aliyunsdkecs}-%{aliyunsdkecs_version} %{aliyunsdkecs_dir}
|
||||
cp %{aliyunsdkecs_dir}/README.rst %{aliyunsdkecs}_README.rst
|
||||
|
||||
# python-aliyun-sdk-vpc bundle
|
||||
tar -xzf %SOURCE8 -C %{bundled_lib_dir}/aliyun
|
||||
tar -xzf %SOURCE7 -C %{bundled_lib_dir}/aliyun
|
||||
mv %{bundled_lib_dir}/aliyun/%{aliyunsdkvpc}-%{aliyunsdkvpc_version} %{aliyunsdkvpc_dir}
|
||||
cp %{aliyunsdkvpc_dir}/README.rst %{aliyunsdkvpc}_README.rst
|
||||
|
||||
# aliyuncli bundle
|
||||
tar -xzf %SOURCE9 -C %{bundled_lib_dir}/aliyun
|
||||
tar -xzf %SOURCE8 -C %{bundled_lib_dir}/aliyun
|
||||
mv %{bundled_lib_dir}/aliyun/%{aliyuncli}-%{aliyuncli_version} %{aliyuncli_dir}
|
||||
cp %{aliyuncli_dir}/README.rst %{aliyuncli}_README.rst
|
||||
cp %{aliyuncli_dir}/LICENSE %{aliyuncli}_LICENSE
|
||||
# aliyun*: use bundled libraries
|
||||
%patch1005 -p1
|
||||
%patch1004 -p1
|
||||
|
||||
# aliyun Python 3 fixes
|
||||
%patch1005 -p1
|
||||
%patch1006 -p1
|
||||
%patch1007 -p1
|
||||
|
||||
# fix CVE's in python-pygments
|
||||
pushd %{googlecloudsdk_dir}/lib/third_party
|
||||
%patch1007 -p1 -F2
|
||||
%patch1008 -p1 -F2
|
||||
%patch1009 -p1 -F2
|
||||
popd
|
||||
%endif
|
||||
|
||||
@ -846,12 +833,7 @@ JFLAGS="$(echo '%{_smp_mflags}')"
|
||||
|
||||
make $JFLAGS
|
||||
|
||||
# python-httplib2 bundle
|
||||
%ifarch x86_64
|
||||
pushd %{httplib2_dir}
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
|
||||
# python-pyroute2 bundle
|
||||
pushd %{pyroute2_dir}
|
||||
%{__python3} setup.py build
|
||||
@ -904,11 +886,6 @@ mkdir %{buildroot}/%{_bindir}
|
||||
ln -s /usr/lib/%{name}/%{googlecloudsdk_dir}/bin/gcloud-ra %{buildroot}/%{_bindir}
|
||||
popd
|
||||
|
||||
# python-httplib2 bundle
|
||||
pushd %{httplib2_dir}
|
||||
%{__python3} setup.py install -O1 --skip-build --root %{buildroot} --install-lib /usr/lib/%{name}/%{googlecloudsdk_dir}/lib/third_party
|
||||
popd
|
||||
|
||||
# python-pyroute2 bundle
|
||||
pushd %{pyroute2_dir}
|
||||
%{__python3} setup.py install -O1 --skip-build --root %{buildroot} --install-lib /usr/lib/%{name}/%{bundled_lib_dir}/gcp
|
||||
@ -1231,6 +1208,15 @@ ccs_update_schema > /dev/null 2>&1 ||:
|
||||
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
|
||||
|
||||
%changelog
|
||||
* Thu Oct 14 2021 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.1.1-98.2
|
||||
- gcp-vpc-move-route/gcp-vpc-move-vip: add serviceaccount JSON file
|
||||
support
|
||||
- gcp-pd-move/gcp-vpc-move-route: dont fail with configuration rc
|
||||
when it might be a network hickup
|
||||
|
||||
Resolves: rhbz#2011839
|
||||
Resolves: rhbz#2008955
|
||||
|
||||
* Mon Aug 30 2021 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.1.1-98
|
||||
- storage-mon: new resource agent
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user