Package Details: google-cloud-cli-bq 569.0.0-1

Git Clone URL: https://aur.archlinux.org/google-cloud-cli.git (read-only, click to copy)
Package Base: google-cloud-cli
Description: BigQuery Command Line Tool
Upstream URL: https://cloud.google.com/cli/
Keywords: cloud gcloud gcp google sdk
Licenses: Apache-2.0
Provides: google-cloud-cli-bq
Submitter: PolarianDev
Maintainer: jvybihal
Last Packager: jvybihal
Votes: 200
Popularity: 3.02
First Submitted: 2023-03-08 09:33 (UTC)
Last Updated: 2026-05-21 17:15 (UTC)

Pinned Comments

jvybihal commented on 2025-06-30 06:37 (UTC)

I did a split of the package to 3 packages: google-cloud-cli, google-cloud-cli-bq, google-cloud-cli-gsutil. There is also package containing the bundled python for those who want it or as a dependency to the gsutil (current version 5.24 does not work with python 3.13 out-of-the-box, although 5.25 which is already available on github should). I am also testing to include other "components".

If there will be interest, it's also possible to split the manpages to another package. So for those who don't want them, the install time can get faster and size significantly smaller.

I have tried not to break anyones installation, so please try to install the 3 mentioned packages and it should work the same as before.

You don't need bundled python for the gcloud to work, and I would advice to use gsutil only if yo really have to. The prefered way is to use gcloud storage anyway.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 .. 34 Next › Last »

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,

Traneptora commented on 2025-04-30 20:34 (UTC)

For some reason this package takes an exceptionally long time to build and install for me. On "Copying source files needed for debug symbols..." it takes several minutes. Is this true for anyone else?

jvybihal commented on 2025-03-27 11:11 (UTC) (edited on 2025-03-27 11:11 (UTC) by jvybihal)

In the last commit I have addressed last commments here. Hopefuly without breaking anyones workflow. You should not need to adjust PATH anymore, and bundled python is used by default now (adjustable).

tetamusha commented on 2025-03-24 22:04 (UTC)

For those struggling with the error Error: gsutil requires Python version 3.8-3.12, but a different version is installed. even though you are using a compatible Python version, one solution is to edit or comment out the declaration of CLOUDSDK_PYTHON on /etc/profile.d/google-cloud-cli.sh to use whatever Python executable you point to or is active on your environment.