summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPolarian2023-03-08 11:52:32 +0000
committerPolarian2023-03-08 12:51:31 +0000
commit980c02fd839748f749c793313aa3a1407bd7be39 (patch)
tree1ddc697dfe7963f2eef77d3a55188f92f562f301
parent97239b005f00f5db43dc0420da9faf628c0fe251 (diff)
downloadaur-980c02fd839748f749c793313aa3a1407bd7be39.tar.gz
Apply patch submitted by David Nemec <david@nemec.co>
-rw-r--r--.SRCINFO14
-rw-r--r--0002-set-python2-for-endpointscfg-py.patch9
-rw-r--r--0004-collections-abc.patch113
-rw-r--r--PKGBUILD20
-rw-r--r--google-cloud-cli.sh (renamed from google-cloud-sdk.sh)2
5 files changed, 18 insertions, 140 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f57b4beb044d..27a97ba5cec9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,23 @@
pkgbase = google-cloud-cli
pkgdesc = A set of command-line tools for the Google Cloud Platform. Includes gcloud (with beta and alpha commands), gsutil, and bq.
- pkgver = 417.0.0
+ pkgver = 421.0.0
pkgrel = 1
- url = https://cloud.google.com/sdk/
+ url = https://cloud.google.com/cli/
arch = x86_64
license = Apache
depends = python
optdepends = python2: for dev_appserver.py and endpointscfg support
optdepends = python-crcmod: [gsutil] verify the integrity of GCS object contents
+ provides = google-cloud-sdk
+ conflicts = google-cloud-sdk
options = !strip
options = staticlibs
- source = https://dl.google.com/dl/cloudsdk/release/downloads/for_packagers/linux/google-cloud-cli_417.0.0.orig.tar.gz
- source = google-cloud-sdk.sh
+ source = google-cloud-cli-421.0.0.orig.tar.gz::https://dl.google.com/dl/cloudsdk/release/downloads/for_packagers/linux/google-cloud-cli_421.0.0.orig.tar.gz
+ source = google-cloud-cli.sh
source = 0001-set-python2-for-dev-appserver-py.patch
source = 0003-add-compdef-to-zsh-completion.patch
- sha256sums = a4ab47664fad8cc7d939aa8e774165a826c6d2cd2282fc03af53581211b9070e
- sha256sums = ecd7b3895f6ecf1c6411f385bee3a4b64139976d72069469d323c8a09b97aaea
+ sha256sums = 2980ee1b5451736418882473cdb2fdf9e4aa11e86400ea822bf9017571b94ac2
+ sha256sums = e03ffb8a534b175dc497621a0396bcc29884279daa519e2cb90bd98c61d6530a
sha256sums = 62ec7f56e09168d375823e9e99fcdcfbf40b0fffdd75f35cf91122c5902c82e9
sha256sums = 4694f5191ceea7cf8076861ce5790ba9e809023da278b0f6ed862b9611e5aa93
diff --git a/0002-set-python2-for-endpointscfg-py.patch b/0002-set-python2-for-endpointscfg-py.patch
deleted file mode 100644
index 93e590a6a284..000000000000
--- a/0002-set-python2-for-endpointscfg-py.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-diff -urN --color a/bin/endpointscfg.py b/bin/endpointscfg.py
---- a/bin/endpointscfg.py 2020-01-23 20:12:58.838993348 -0800
-+++ b/bin/endpointscfg.py 2020-01-23 20:13:14.125618291 -0800
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2
- #
- # Copyright 2015 Google Inc. All Rights Reserved.
- #
diff --git a/0004-collections-abc.patch b/0004-collections-abc.patch
deleted file mode 100644
index bfecbe345564..000000000000
--- a/0004-collections-abc.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-diff --git a/lib/third_party/dns/namedict.py b/lib/third_party/dns/namedict.py
-index 37a13104..e2309c1f 100644
---- a/lib/third_party/dns/namedict.py
-+++ b/lib/third_party/dns/namedict.py
-@@ -32,7 +32,14 @@ import dns.name
- from ._compat import xrange
-
-
--class NameDict(collections.MutableMapping):
-+try:
-+ # Python 3.3 and above.
-+ collections_abc = collections.abc
-+except AttributeError:
-+ collections_abc = collections
-+
-+
-+class NameDict(collections_abc.MutableMapping):
- """A dictionary whose keys are dns.name.Name objects.
-
- In addition to being like a regular Python dictionary, this
-diff --git a/lib/third_party/functools32/functools32.py b/lib/third_party/functools32/functools32.py
-index c44551fa..291f81d0 100644
---- a/lib/third_party/functools32/functools32.py
-+++ b/lib/third_party/functools32/functools32.py
-@@ -12,7 +12,7 @@ __all__ = ['update_wrapper', 'wraps', 'WRAPPER_ASSIGNMENTS', 'WRAPPER_UPDATES',
- 'total_ordering', 'cmp_to_key', 'lru_cache', 'reduce', 'partial']
-
- from _functools import partial, reduce
--from collections import MutableMapping, namedtuple
-+from collections import namedtuple
- from .reprlib32 import recursive_repr as _recursive_repr
- from weakref import proxy as _proxy
- import sys as _sys
-@@ -21,6 +21,11 @@ try:
- except ImportError:
- from ._dummy_thread32 import allocate_lock as Lock
-
-+try:
-+ from collections.abc import MutableMapping
-+except ImportError:
-+ from collections import MutableMapping
-+
- ################################################################################
- ### OrderedDict
- ################################################################################
-diff --git a/lib/third_party/ml_sdk/cloud/ml/prediction/prediction_utils.py b/lib/third_party/ml_sdk/cloud/ml/prediction/prediction_utils.py
-index 0439728d..f4a75eda 100644
---- a/lib/third_party/ml_sdk/cloud/ml/prediction/prediction_utils.py
-+++ b/lib/third_party/ml_sdk/cloud/ml/prediction/prediction_utils.py
-@@ -32,6 +32,13 @@ collections_lib = collections
- if sys.version_info > (3, 8):
- collections_lib = collections.abc
-
-+try:
-+ # Python 3.3 and above.
-+ collections_abc = collections.abc
-+except AttributeError:
-+ collections_abc = collections
-+
-+
- # --------------------------
- # prediction.common
- # --------------------------
-diff --git a/platform/gsutil/gslib/vendored/boto/boto/dynamodb/types.py b/platform/gsutil/gslib/vendored/boto/boto/dynamodb/types.py
-index d9aaaa4c..1d50fb0c 100644
---- a/platform/gsutil/gslib/vendored/boto/boto/dynamodb/types.py
-+++ b/platform/gsutil/gslib/vendored/boto/boto/dynamodb/types.py
-@@ -27,11 +27,17 @@ Python types and vice-versa.
- import base64
- from decimal import (Decimal, DecimalException, Context,
- Clamped, Overflow, Inexact, Underflow, Rounded)
--from collections import Mapping
- from boto.dynamodb.exceptions import DynamoDBNumberError
- from boto.compat import filter, map, six, long_type
-
-
-+
-+try:
-+ from collections.abc import Mapping
-+except ImportError:
-+ from collections import Mapping
-+
-+
- DYNAMODB_CONTEXT = Context(
- Emin=-128, Emax=126, rounding=None, prec=38,
- traps=[Clamped, Overflow, Inexact, Rounded, Underflow])
-diff --git a/platform/gsutil/gslib/vendored/boto/boto/mws/connection.py b/platform/gsutil/gslib/vendored/boto/boto/mws/connection.py
-index 687fae74..ae92d087 100644
---- a/platform/gsutil/gslib/vendored/boto/boto/mws/connection.py
-+++ b/platform/gsutil/gslib/vendored/boto/boto/mws/connection.py
-@@ -29,6 +29,13 @@ import boto.mws.response
- from boto.handler import XmlHandler
- from boto.compat import filter, map, six, encodebytes
-
-+try:
-+ # Python 3.3 and above.
-+ collections_abc = collections.abc
-+except AttributeError:
-+ collections_abc = collections
-+
-+
- __all__ = ['MWSConnection']
-
- api_version_path = {
-@@ -109,7 +116,7 @@ def http_body(field):
- def destructure_object(value, into, prefix, members=False):
- if isinstance(value, boto.mws.response.ResponseElement):
- destructure_object(value.__dict__, into, prefix, members=members)
-- elif isinstance(value, collections.Mapping):
-+ elif isinstance(value, collections_abc.Mapping):
- for name in value:
- if name.startswith('_'):
- continue
diff --git a/PKGBUILD b/PKGBUILD
index 9709a0db7b67..1316966b8c88 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,13 +12,15 @@
_extractedName="google-cloud-sdk"
pkgname="google-cloud-cli"
-pkgver=417.0.0
+pkgver=421.0.0
pkgrel=1
pkgdesc="A set of command-line tools for the Google Cloud Platform. Includes gcloud (with beta and alpha commands), gsutil, and bq."
-url="https://cloud.google.com/sdk/"
+url="https://cloud.google.com/cli/"
license=("Apache")
arch=('x86_64')
depends=('python')
+conflicts=('google-cloud-sdk')
+provides=('google-cloud-sdk')
optdepends=(
"python2: for dev_appserver.py and endpointscfg support"
"python-crcmod: [gsutil] verify the integrity of GCS object contents"
@@ -26,18 +28,14 @@ optdepends=(
options=('!strip' 'staticlibs')
source=(
"$pkgname-$pkgver.orig.tar.gz::https://dl.google.com/dl/cloudsdk/release/downloads/for_packagers/linux/${pkgname}_${pkgver}.orig.tar.gz"
- "google-cloud-sdk.sh"
+ "google-cloud-cli.sh"
"0001-set-python2-for-dev-appserver-py.patch"
- #"0002-set-python2-for-endpointscfg-py.patch"
"0003-add-compdef-to-zsh-completion.patch"
- #"0004-collections-abc.patch"
)
-sha256sums=('a4ab47664fad8cc7d939aa8e774165a826c6d2cd2282fc03af53581211b9070e'
- 'ecd7b3895f6ecf1c6411f385bee3a4b64139976d72069469d323c8a09b97aaea'
+sha256sums=('2980ee1b5451736418882473cdb2fdf9e4aa11e86400ea822bf9017571b94ac2'
+ 'e03ffb8a534b175dc497621a0396bcc29884279daa519e2cb90bd98c61d6530a'
'62ec7f56e09168d375823e9e99fcdcfbf40b0fffdd75f35cf91122c5902c82e9'
- #'ff6065ce2e54ac654605bd5fe554313b1d0def2c31ce56ff39429098dd1e39fe'
'4694f5191ceea7cf8076861ce5790ba9e809023da278b0f6ed862b9611e5aa93'
- #'ea39fc4907d8ddf28ebaeed4b7c4547936a602f907c7523fc62488771e0df043'
)
prepare() {
@@ -74,10 +72,10 @@ package() {
find $pkgdir -name '__pycache__' -type d -exec rm -rf {} +
install -D -m 0755 "${srcdir}/${source[1]}" \
- "${pkgdir}/etc/profile.d/google-cloud-sdk.sh"
+ "${pkgdir}/etc/profile.d/google-cloud-cli.sh"
install -D -m 0644 "${pkgdir}/opt/${pkgname}/completion.bash.inc" \
- "${pkgdir}/etc/bash_completion.d/google-cloud-sdk"
+ "${pkgdir}/etc/bash_completion.d/google-cloud-cli"
install -D -m 0644 "${pkgdir}/opt/${pkgname}/completion.zsh.inc" \
"${pkgdir}/usr/share/zsh/site-functions/_gcloud"
diff --git a/google-cloud-sdk.sh b/google-cloud-cli.sh
index b1c4ec5807d0..d014905553af 100644
--- a/google-cloud-sdk.sh
+++ b/google-cloud-cli.sh
@@ -1,4 +1,4 @@
-export CLOUDSDK_ROOT_DIR=/opt/google-cloud-sdk
+export CLOUDSDK_ROOT_DIR=/opt/google-cloud-cli
export CLOUDSDK_PYTHON=/usr/bin/python
export CLOUDSDK_PYTHON_ARGS=-S
export PATH=$CLOUDSDK_ROOT_DIR/bin:$PATH