summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Denhartog2020-02-03 07:41:40 -0800
committerBenjamin Denhartog2020-02-03 07:48:02 -0800
commit47722e55c566616c1d1ed0e96964d4945a87048f (patch)
treeddaadd132dddc850d62fd9b9670738fc56e89122
parent050416808756911e27915d3c4b87349e96c8eb95 (diff)
downloadaur-47722e55c566616c1d1ed0e96964d4945a87048f.tar.gz
fix(google-cloud-sdk): add patch file for SyntaxWarning in ipaddress
Internally, `google-cloud-sdk` depends on a third party library called `ipaddress`. The version of `ipaddress` that is bundled with `google-cloud-sdk` is outdated, and is missing a modulus (%) when formatting a string. The upstream project accepted a patch for this in October 2019 [0], so it appears that the version bundled within `google-cloud-sdk` needs to be updated. To that effect, an issue has been reported [1]; the patch file added by this commit can be removed when it has been resolved. closes sudoforge/pkgbuilds#15 [0]: https://github.com/phihag/ipaddress/pull/48 [1]: https://issuetracker.google.com/issues/148752648
-rw-r--r--.SRCINFO4
-rw-r--r--0004-fix-ipaddress-syntaxwarning.patch12
-rw-r--r--PKGBUILD6
3 files changed, 19 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d8e8d5562511..931937c9dce0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = google-cloud-sdk
pkgdesc = A set of command-line tools for the Google Cloud Platform. Includes gcloud (with beta and alpha commands), gsutil, and bq.
pkgver = 278.0.0
- pkgrel = 1
+ pkgrel = 2
url = https://cloud.google.com/sdk/
arch = x86_64
license = Apache
@@ -15,11 +15,13 @@ pkgbase = google-cloud-sdk
source = 0001-fix-console-io-syntax-warning.patch
source = 0002-set-python2-for-dev-appserver-py.patch
source = 0003-set-python2-for-endpointscfg-py.patch
+ source = 0004-fix-ipaddress-syntaxwarning.patch
sha256sums = 38ee4f7000627d6be1fa553b68a42d3979a2986bfa5e9770a71840098bbeb625
sha256sums = a54f88947a2593fae4aa8f65e42de4ad735583ae743735305c0f36710a794295
sha256sums = b3faeb3af2922510048d12063fa215610f12879f5cc9f8b78786c7d9f2957c70
sha256sums = 62ec7f56e09168d375823e9e99fcdcfbf40b0fffdd75f35cf91122c5902c82e9
sha256sums = ff6065ce2e54ac654605bd5fe554313b1d0def2c31ce56ff39429098dd1e39fe
+ sha256sums = a23fe05f0438591b78b4baf1129f0601fe0cae8ceaa8f45eae675776317bbc9c
pkgname = google-cloud-sdk
diff --git a/0004-fix-ipaddress-syntaxwarning.patch b/0004-fix-ipaddress-syntaxwarning.patch
new file mode 100644
index 000000000000..0d1fee3e8fb2
--- /dev/null
+++ b/0004-fix-ipaddress-syntaxwarning.patch
@@ -0,0 +1,12 @@
+diff -urN --color a/lib/third_party/ipaddress/__init__.py b/lib/third_party/ipaddress/__init__.py
+--- a/lib/third_party/ipaddress/__init__.py 2020-02-03 07:22:51.006100908 -0800
++++ b/lib/third_party/ipaddress/__init__.py 2020-02-03 07:23:33.229413663 -0800
+@@ -1103,7 +1103,7 @@
+ try:
+ # Always false if one is v4 and the other is v6.
+ if a._version != b._version:
+- raise TypeError("%s and %s are not of the same version" (a, b))
++ raise TypeError("%s and %s are not of the same version" % (a, b))
+ return (b.network_address <= a.network_address and
+ b.broadcast_address >= a.broadcast_address)
+ except AttributeError:
diff --git a/PKGBUILD b/PKGBUILD
index d5f19fa9f678..6fe03bb08bb1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
pkgname="google-cloud-sdk"
pkgver=278.0.0
-pkgrel=1
+pkgrel=2
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/"
license=("Apache")
@@ -23,12 +23,14 @@ source=(
"0001-fix-console-io-syntax-warning.patch"
"0002-set-python2-for-dev-appserver-py.patch"
"0003-set-python2-for-endpointscfg-py.patch"
+ "0004-fix-ipaddress-syntaxwarning.patch"
)
sha256sums=('38ee4f7000627d6be1fa553b68a42d3979a2986bfa5e9770a71840098bbeb625'
'a54f88947a2593fae4aa8f65e42de4ad735583ae743735305c0f36710a794295'
'b3faeb3af2922510048d12063fa215610f12879f5cc9f8b78786c7d9f2957c70'
'62ec7f56e09168d375823e9e99fcdcfbf40b0fffdd75f35cf91122c5902c82e9'
- 'ff6065ce2e54ac654605bd5fe554313b1d0def2c31ce56ff39429098dd1e39fe')
+ 'ff6065ce2e54ac654605bd5fe554313b1d0def2c31ce56ff39429098dd1e39fe'
+ 'a23fe05f0438591b78b4baf1129f0601fe0cae8ceaa8f45eae675776317bbc9c')
prepare() {
cd "$pkgname"