Skip to content

Replace deprecated apt-key with gpg --dearmor for gcloud install#9538

Merged
vorporeal merged 1 commit intowarpdotdev:masterfrom
landkirk:landon/fix-apt-key-gcloud-install
Apr 30, 2026
Merged

Replace deprecated apt-key with gpg --dearmor for gcloud install#9538
vorporeal merged 1 commit intowarpdotdev:masterfrom
landkirk:landon/fix-apt-key-gcloud-install

Conversation

@landkirk
Copy link
Copy Markdown
Contributor

@landkirk landkirk commented Apr 30, 2026

Description

Fixes #9534.

script/linux/install_test_deps:32 registered Google Cloud SDK's apt
signing key via apt-key, which was removed from apt in 2.9.17
(2024-12) and is no longer present on Ubuntu 25.04+ and
Debian 13+. On those distros script/linux/bootstrap failed for any
contributor who didn't already have gcloud installed, with a confusing
sudo: 'apt-key': command not found / curl: Failed writing body pair.

Replaced the apt-key invocation with gpg --dearmor, which is the
documented replacement and works on every Debian-family release back to
Debian 9 / Ubuntu 16.04 — the same lower bound that the existing
signed-by=/usr/share/keyrings/cloud.google.gpg directive on the next
line already imposes. Also switched curl -f to curl -fsSL, the
standard quiet-but-fail-on-error flag set, and added --yes so a stale
keyring left from a partial previous bootstrap is overwritten cleanly.

-    curl -f https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
+    curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor --yes -o /usr/share/keyrings/cloud.google.gpg

This is a strict superset of the previous behavior — it works everywhere
the old command worked and additionally on apt 3.0+ where apt-key is
gone.

Testing

Manually ran the patched line on Ubuntu 25.10 (apt 3.1.6, no apt-key
binary): it produces /usr/share/keyrings/cloud.google.gpg and the
subsequent apt-get update / apt-get install google-cloud-cli
succeed. Re-ran a second time to confirm --yes overwrites the existing
keyring without prompting. No automated regression test added — this is
a one-line bootstrap script change whose failure mode is environmental
(absence of apt-key on the host) and CI runs on a distro where the
bug doesn't reproduce.

Server API dependencies

No server API dependencies.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX:

Co-Authored-By: Warp agent@warp.dev

@cla-bot cla-bot Bot added the cla-signed label Apr 30, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Apr 30, 2026

@landkirk

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @vorporeal.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR replaces the deprecated apt-key call in the Linux test dependency installer with gpg --dearmor, allowing Google Cloud SDK apt key setup to work on newer Debian/Ubuntu releases where apt-key is unavailable.

Concerns

  • No blocking concerns found in the changed line.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested a review from vorporeal April 30, 2026 03:38
@vorporeal vorporeal merged commit 2113a0a into warpdotdev:master Apr 30, 2026
28 checks passed
@captainsafia captainsafia added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Apr 30, 2026 — with Warp Dev Github Integration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux bootstrap fails on apt 3.0+ (Ubuntu 25.04+ / Debian 13+): script/linux/install_test_deps uses removed apt-key

3 participants