Great to see the install time drop from many minutes to just a few seconds with the debug flag change. Thank you!
Search Criteria
Package Details: google-cloud-cli 526.0.1-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/google-cloud-cli.git (read-only, click to copy) |
---|---|
Package Base: | google-cloud-cli |
Description: | A set of command-line tools for the Google Cloud Platform. Includes gcloud (with beta and alpha commands), gsutil, and bq. |
Upstream URL: | https://cloud.google.com/cli/ |
Keywords: | cloud gcloud gcp google sdk |
Licenses: | Apache-2.0 |
Conflicts: | google-cloud-sdk |
Provides: | google-cloud-sdk |
Replaces: | google-cloud-sdk |
Submitter: | PolarianDev |
Maintainer: | jvybihal |
Last Packager: | jvybihal |
Votes: | 191 |
Popularity: | 0.83 |
First Submitted: | 2023-03-08 09:33 (UTC) |
Last Updated: | 2025-06-12 09:00 (UTC) |
Dependencies (2)
- python (python37AUR)
- python-crcmod (optional) – [gsutil] verify the integrity of GCS object contents
Required by (14)
- apollo-neo-env-manager-dev (optional)
- arkade-bin (requires google-cloud-sdk) (optional)
- gcsfuse (requires google-cloud-sdk) (optional)
- gcsfuse-bin (requires google-cloud-sdk) (optional)
- google-cloud-cli-firestore-emulator
- google-cloud-cli-gke-gcloud-auth-plugin
- google-cloud-sdk-app-engine-java (requires google-cloud-sdk)
- google-cloud-sdk-app-engine-python (requires google-cloud-sdk)
- google-cloud-sdk-app-engine-python-extras (requires google-cloud-sdk)
- google-cloud-sdk-datastore-emulator (requires google-cloud-sdk)
- k3sup-bin (requires google-cloud-sdk) (optional)
- porter-bin (requires google-cloud-sdk) (optional)
- repman (optional)
- repman-git (optional)
Sources (5)
ScottE commented on 2025-06-09 16:21 (UTC)
jvybihal commented on 2025-06-09 06:47 (UTC)
I was not aware, that archlinux enabled debug
option as default. I have !debug
in my makepkg.conf for ages and it seems pretty reasonable to me not to want to build debug packages as default. Seems to be discussed here. Thanks for the suggestion @baltazar, I have added it to PKGBUILD as it perfectly reasonable.
baltazar commented on 2025-06-07 10:27 (UTC)
Hi! I suggest adding !debug to the options array, as this option is what's slowing down this build unnecessarily. (makepkg looks for source files to copy for several minutes but it doesn't even find any)
svalee commented on 2025-05-27 01:41 (UTC)
/etc/profile.d/google-cloud-cli.sh seems to be right
export CLOUDSDK_ROOT_DIR=/opt/google-cloud-cli
export GOOGLE_CLOUD_SDK_HOME=$CLOUDSDK_ROOT_DIR
# CLOUDSDK_ROOT_DIR # installation root dir
# CLOUDSDK_PYTHON # python interpreter path
# CLOUDSDK_GSUTIL_PYTHON # python interpreter path for gsutil
# CLOUDSDK_PYTHON_ARGS # python interpreter arguments
# CLOUDSDK_PYTHON_SITEPACKAGES # use python site packages
# CLOUDSDK_BQ_PYTHON # python interpreter for bq
# CLOUDSDK_ENCODING # python io encoding for gcloud
export CLOUDSDK_PYTHON=/opt/google-cloud-cli/platform/bundledpythonunix/bin/python3
export CLOUDSDK_GSUTIL_PYTHON=/opt/google-cloud-cli/platform/bundledpythonunix/bin/python3
export CLOUDSDK_BQ_PYTHON=/opt/google-cloud-cli/platform/bundledpythonunix/bin/python3
but the envs are wrong, I'll have a look further on my side, thanks
printenv | grep CLOUDSDK
CLOUDSDK_PYTHON_ARGS=-S -W ignore
CLOUDSDK_ROOT_DIR=/opt/google-cloud-cli
CLOUDSDK_PYTHON=/usr/bin/python
jvybihal commented on 2025-05-26 05:07 (UTC)
@svalee: verify your profile file /etc/profile.d/google-cloud-cli.sh
or any custom change in your shell environment.
I you want to use bundled python, it should look similar to this:
$ printenv | grep CLOUDSDK
CLOUDSDK_ROOT_DIR=/opt/google-cloud-cli
CLOUDSDK_PYTHON=/opt/google-cloud-cli/platform/bundledpythonunix/bin/python3
CLOUDSDK_PYTHON_SITEPACKAGES=1
CLOUDSDK_GSUTIL_PYTHON=/opt/google-cloud-cli/platform/bundledpythonunix/bin/python3
CLOUDSDK_BQ_PYTHON=/opt/google-cloud-cli/platform/bundledpythonunix/bin/python3
$ gsutil version
gsutil version: 5.34
svalee commented on 2025-05-26 04:25 (UTC) (edited on 2025-05-26 04:26 (UTC) by svalee)
I did a clean build but still having a python3.8 issues using gsutil. Am I doing something wrong?
==> Binaries are now linked to /usr/bin/, no need to adjust PATH anymore
==> NOTE: Bundled Python 3.12 is currently enforced by adjusted profile file.
==> gcloud is not (yet) fully compatible with python >=3.13
If you want to use another python version, switch _force_budled_python
in PKGBUILD and/or adjust /etc/profile.d/google-cloud-cli.sh accordingly.
Optional dependencies for google-cloud-cli
python-crcmod: [gsutil] verify the integrity of GCS object contents
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
gsutil -h
Error: gsutil requires Python version 3.8-3.12, but a different version is installed.
You are currently running Python 3.13
Follow the steps below to resolve this issue:
1. Switch to Python 3.8-3.12 using your Python version manager or install an appropriate version.
2. If you are unsure how to manage Python versions, visit [https://cloud.google.com/storage/docs/gsutil_install#specifications] for detailed instructions.
tobbik commented on 2025-05-08 23:01 (UTC)
No problem @jvybihal. I currently daily driving a Thinkpad x13s with archlinux and using gcloud in my job. I'll let you know if stuff fails.
jvybihal commented on 2025-05-07 08:55 (UTC)
Thanks @tobbik, I have added your changes. I do not have aarch64 myself, so I was not inclined to add that and test it. But if there is a demand I see no reason to avoid it.
tobbik commented on 2025-05-05 16:39 (UTC)
I don't know if there is an appetite for this, but I'm using this on an aarch64 machine and reworked the PKGBUILD so it can support both architectures. The changes are minimal and straight forward and shouldn't be hard to maintain:
# Maintainer: Josef Vybíhal <josef.vybihal@gmail.com>
# Contributor: Polarian <polarian@polarian.dev>
# Contributor: Benjamin Denhartog <ben@sudoforge.com>
# Contributor: Mansour Behabadi <mansour@oxplot.com>
# Contributor: Troy Engel <troyengel+arch@gmail.com>
# Contributor: Geoff Hill <geoff@geoffhill.org>
# Contributor: Sebastien Bariteau <numkem@numkem.org>
# Contributor: Justin Dray <justin@dray.be>
# shellcheck disable=SC2034
# Release Notes: https://cloud.google.com/sdk/docs/release-notes
# Cloud Storage Bucket: https://console.cloud.google.com/storage/browser/cloud-sdk-release/for_packagers/linux
# deb pool:
# - https://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-amd64/Packages
# - https://packages.cloud.google.com/apt/pool/cloud-sdk/google-cloud-cli_516.0.0-0_amd64_e19fae4ce840c378a624e2cbdba2aa87.deb
_extractedName="google-cloud-sdk"
pkgname="google-cloud-cli"
pkgver=520.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/cli/"
license=('Apache-2.0')
arch=('x86_64' 'aarch64')
depends=('python')
optdepends=(
"python-crcmod: [gsutil] verify the integrity of GCS object contents"
)
options=('!strip' 'staticlibs' !zipman)
# Python 3.13 is not officialy supported yet, force use of bundled 3.12
export _force_budled_python=true
# TODO:
# - packages for components
source=(
"$pkgname.sh"
"$pkgname.install"
"0003-add-compdef-to-zsh-completion.patch"
)
source_x86_64=($pkgname-$pkgver.orig_x86_64.tar.gz::https://dl.google.com/dl/cloudsdk/release/downloads/for_packagers/linux/${pkgname}_${pkgver}.orig_amd64.tar.gz)
source_aarch64=($pkgname-$pkgver.orig_aarch64.tar.gz::https://dl.google.com/dl/cloudsdk/release/downloads/for_packagers/linux/${pkgname}_${pkgver}.orig_aarch64.tar.gz)
install=$pkgname.install
# Conflict the old package name to force migration
conflicts=('google-cloud-sdk')
provides=('google-cloud-sdk')
replaces=('google-cloud-sdk')
sha256sums=('6e88b535c020b0f28c986fdb66918f8c07e4d337e813b77ec2068068f03457f8'
'fdba342aecce102b85fd96f21205d7ee2f8043b4bb56cabf363375785e3d423c'
'c19dbe916e6fd18d9b17b3309ee60c5d389035c5520822d2c14c045d8b853924')
sha256sums_x86_64=('8e467fe2a022e7ca2a54ce00368a6a7e7ad96f48b0a2724b48a869162a0ce400')
sha256sums_aarch64=('c6e9fb262dcb8ec032f63d20f690fd0e42b936f195865a8ce88ad7fb32438f06')
backup=(etc/profile.d/google-cloud-cli.sh)
prepare() {
cd "${_extractedName}"
for f in "${source[@]}"; do
[[ "$f" =~ \.patch$ ]] && \
( \
patch -p1 -i "${srcdir}/${f}" > /dev/null 2>&1 ||\
( \
echo "failed to apply patch: $(basename ${f})" && \
exit 1 \
) \
)
done
}
package() {
_install_path="${pkgdir}/opt/${pkgname}"
_bundled_py_bin="${_install_path:${#pkgdir}}/platform/bundledpythonunix/bin/python3"
mkdir "${pkgdir}/opt"
cp -r "${_extractedName}" "${_install_path}"
# The Google code uses a _TraceAction() method which spams the screen even
# in "quiet" mode, we're throwing away output on purpose to keep it clean
# ref: lib/googlecloudsdk/core/platforms_install.py
"${_install_path}/install.sh" \
--quiet \
--usage-reporting false \
--path-update false \
--bash-completion false \
> /dev/null 2>&1
find $pkgdir -name '__pycache__' -type d -exec rm -rf {} +
install -D -m 0755 "${srcdir}/${source[1]}" \
"${pkgdir}/etc/profile.d/google-cloud-cli.sh"
if [ "$_force_budled_python" = true ]; then
{ echo "export CLOUDSDK_PYTHON=${_bundled_py_bin}"
echo "export CLOUDSDK_GSUTIL_PYTHON=${_bundled_py_bin}"
echo "export CLOUDSDK_BQ_PYTHON=${_bundled_py_bin}"
} >> "${pkgdir}/etc/profile.d/google-cloud-cli.sh"
fi
install -d -m 0755 \
"${pkgdir}/etc/bash_completion.d" \
"${pkgdir}/usr/share/zsh/site-functions" \
ln -rsT "${_install_path}/completion.bash.inc" \
"${pkgdir}/etc/bash_completion.d/google-cloud-cli"
for cmd in gcloud gsutil bq; do
ln -rsT "${_install_path}/completion.zsh.inc" \
"${pkgdir}/usr/share/zsh/site-functions/_${cmd}"
done
mkdir -p "${pkgdir}/usr/bin"
for bin in gcloud \
gcloud-crc32c \
gsutil \
docker-credential-gcloud \
git-credential-gcloud.sh \
bq; do
ln -rsT "${_install_path}/bin/${bin}" \
"${pkgdir}/usr/bin/${bin}"
done
mkdir -p "${pkgdir}/usr/share"
mv -f "${pkgdir}/opt/${pkgname}/help/man" "${pkgdir}/usr/share/"
}
lexlapax commented on 2025-05-03 05:15 (UTC)
yes. it does take several minutes for me as well,
Pinned Comments