Skip to content

docs(web/guides): fix Linux apt install to dearmor GPG key before writing keyring - #2839

Closed
wheels-bot[bot] wants to merge 1 commit into
developfrom
docs/bot-2838-install-instructions-for-apt-repository-result-in
Closed

docs(web/guides): fix Linux apt install to dearmor GPG key before writing keyring#2839
wheels-bot[bot] wants to merge 1 commit into
developfrom
docs/bot-2838-install-instructions-for-apt-repository-result-in

Conversation

@wheels-bot

@wheels-bot wheels-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

The Debian/Ubuntu install snippets in both the start-here installing guide and the command-line-tools installation reference were piping the ASCII-armored GPG key directly into /usr/share/keyrings/wheels.gpg via tee. apt's signed-by= mechanism requires the keyring file to be in binary (dearmored) format, so this produced an "unsupported filetype" warning and a NO_PUBKEY error on every apt update, making the install fail. The fix is to pipe through sudo gpg --dearmor -o /usr/share/keyrings/wheels.gpg instead of tee.

Four snippets are updated (stable + bleeding-edge in each of the two affected pages). The GPG aside in each page is also updated with a sentence explaining why the dearmor step is required, so the next reader who wonders about it doesn't have to open a bug.

Note for reviewers: The triage also flagged that the apt.wheels.dev package list is currently empty, so apt install wheels still fails even with a working key. That is an ops/publishing-pipeline problem separate from this docs fix. This PR unblocks users who can work around the empty package list (e.g. by installing via the direct .deb asset download) and cleans up the docs ahead of any pipeline fix.

Fixes #2838

Screenshots needed

None — these are shell-snippet changes with no UI.

…ting keyring

apt requires the keyring file at /usr/share/keyrings/ to be in binary format.
The previous snippet piped the ASCII-armored download straight through tee,
causing an "unsupported filetype" warning and a NO_PUBKEY error on apt update.
Swap tee for gpg --dearmor across all four Debian/Ubuntu snippets (stable and
bleeding-edge in both the start-here and command-line-tools installation pages)
and add a brief note in each GPG aside explaining why the dearmor step is needed.

Fixes #2838

Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
@wheels-bot

wheels-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Wheels Bot — Docs proposed

Draft PR: #2839

Pages updated:

  • web/sites/guides/src/content/docs/v4-0-0/start-here/installing.mdx — stable + bleeding-edge Debian/Ubuntu snippets
  • web/sites/guides/src/content/docs/v4-0-0/command-line-tools/installation.mdx — stable + bleeding-edge Debian/Ubuntu snippets
  • CHANGELOG.md — Unreleased Fixed entry

Screenshots needed: none

A human review is required before merge. The PR also carries a note flagging the separate empty-package-list ops issue that blocks installs regardless of the key fix.

@wheels-bot wheels-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wheels Bot — Reviewer A

TL;DR: This PR fixes a real, user-facing breakage: the Linux apt install snippets were piping the ASCII-armored GPG key straight into /usr/share/keyrings/ with tee, but apt's signed-by= mechanism requires a binary (dearmored) keyring, causing apt update to fail with "unsupported filetype." All four affected snippets (stable + bleeding-edge in both installing.mdx and installation.mdx) are corrected consistently, the GPG aside copy explains the reason, and CHANGELOG is updated. The diff is clean. Verdict: ready to merge (human approval required since the bot can't self-approve).

Correctness

The technical fix is correct. gpg --dearmor -o <file> is the canonical pattern for converting an ASCII-armored public key to the binary format required by /usr/share/keyrings/. Using -o instead of piping to tee is also a slight improvement: if curl -f propagates a non-zero exit but the shell lacks pipefail, gpg --dearmor will fail on empty/invalid input and produce a visible error, whereas the original tee would silently write garbage and succeed.

All four snippets are updated symmetrically:

  • web/sites/guides/src/content/docs/v4-0-0/command-line-tools/installation.mdx lines 58 and 75
  • web/sites/guides/src/content/docs/v4-0-0/start-here/installing.mdx lines 180 and 196

The CHANGELOG ### Fixed block is inserted in the correct position (after ### Added, before ### Changed) in the [Unreleased] section.

Commits

docs(web/guides): fix Linux apt install to dearmor GPG key before writing keyring — type docs, unrestricted scope web/guides, sentence-case subject well under 100 characters. Compliant with commitlint.config.js.

Docs

Both prose asides are updated with a clear explanation of why the dearmor step is required. No code changes, so no test coverage is needed and no .ai/wheels/ layer docs are affected.

@wheels-bot

wheels-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Wheels Bot — Reviewer B (round 1)

A's review is technically sound, well-scoped for a pure docs change, and the verdict is consistent with the evidence. No significant issues found. Aligning on approve.

Sycophancy

None detected. A's positive verdict is backed by specific evidence: verified all four snippet changes, confirmed binary-format requirement is the root cause, checked CHANGELOG positioning and commit message compliance against commitlint.config.js.

False positives

None detected. Spot-checked A's claims against the diff:

  • All four tee → gpg --dearmor swaps verified in the diff (installation.mdx lines 58 and 75, installing.mdx lines 180 and 196).
  • Both prose asides updated to explain the binary-format requirement — confirmed in diff.
  • CHANGELOG ### Fixed block lands after ### Added and before ### Changed in the [Unreleased] section — correct.
  • Commit message docs(web/guides): fix Linux apt install to dearmor GPG key before writing keyring — type, scope, subject-case, and length all pass.

One minor imprecision: A says the original tee would "silently write garbage" if curl -f fails. On empty input, tee writes an empty file and exits 0 (not garbage). gpg --dearmor on empty input does surface an error more visibly, so A's directional point stands — but the word choice is slightly off. Not a false positive on the core fix.

Missed issues

DCO: A did not explicitly verify the sign-off trailer. Checked the commit directly — Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> is present. No action needed, but worth flagging that A skipped the check.

No other missed issues. This is a docs-only change: no CFML code touched, no cross-engine compat concerns, no test coverage expected, no .ai/wheels/ updates required.

Verdict alignment

A's COMMENTED state with "ready to merge" is correct — the bot cannot self-approve, and the findings support an approve verdict.

Convergence

Aligned. The fix is technically correct, the diff is clean, and A's verdict is appropriate. No changes needed.

@bpamiri
bpamiri marked this pull request as ready for review June 3, 2026 15:28
bpamiri added a commit that referenced this pull request Jun 3, 2026
…obber on BE publish (#2846)

* fix(distribution): dearmor apt key in docs + stop stable apt index clobber on BE publish

Issue #2838 — the Debian/Ubuntu apt install path was broken two independent ways.

1. Docs (GPG key armor). Every snippet piped the ASCII-armored key served at
   apt.wheels.dev/wheels.gpg straight into /usr/share/keyrings/wheels.gpg with
   `tee`. Modern apt rejects an armored key in a signed-by= keyring
   ("unsupported filetype" -> NO_PUBKEY), so `apt update` failed verification
   and the install never worked. Switched all in-repo snippets to
   `sudo gpg --dearmor -o ...` — install guide, CLI installation reference,
   release-channels guide, the apt.wheels.dev landing page, and the
   tools/distribution-drafts templates — and noted why in each GPG aside.

2. Pipeline (empty stable index). regenerate-apt-metadata.sh rebuilt BOTH
   channels every run while the publish workflow synced only the dispatched
   channel's pool into the runner. A bleeding-edge publish (frequent) scanned
   an empty local pool/stable, emitted an empty Packages, and the unscoped
   `find dists` upload overwrote R2's good stable index — so `apt install
   wheels` returned "Unable to locate package wheels" even though the .deb was
   present in the pool. The regen now honors a CHANNELS env (the workflow
   passes the single dispatched channel) and the upload is scoped to
   dists/<channel>/, so the two channels can no longer clobber each other.

These are the in-repo template copies. The live wheels-dev/apt-wheels repo
carries the running copy and needs the same patch plus a one-off stable
workflow_dispatch to rebuild the now-empty index (handled in a separate PR).

Verified the clobber fix with a stubbed apt-ftparchive harness: the current
script emits an empty dists/stable/Packages on a bleeding-edge run; with
CHANNELS=bleeding-edge it emits none and leaves the stable index untouched.

Supersedes the partial docs-only draft in #2839.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Peter Amiri <peter@alurium.com>

* docs(distribution): address Reviewer A/B consensus findings (round 1)

- web/content/blog/posts/wheels-4-0-2-released.md: swap `sudo tee` for
  `sudo gpg --dearmor -o` in the apt install snippet so the 4.0.2
  release announcement no longer documents the NO_PUBKEY-failing form.
- tools/distribution-drafts/apt-repo/templates/wheels.gpg.placeholder:
  same substitution in the internal bucket-repo minting instructions
  (B's additional missed occurrence).
- CHANGELOG.md: append a parenthetical to the 4.0.2 "Added" entry
  noting the dearmor correction in #2846 (A's nit, lighter form).

Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>

---------

Signed-off-by: Peter Amiri <peter@alurium.com>
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
@bpamiri

bpamiri commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Closing as superseded by #2846, which merged to develop (commit 7ccff95) and already shipped the identical teesudo gpg --dearmor -o fix to both install snippets here, plus the GPG-aside explanations. #2846 went further — it also corrected the release-channels guide, the apt.wheels.dev landing page, and the tools/distribution-drafts/ templates, and fixed the empty-stable-index publish bug that was the second half of #2838.

Evidence this is fully redundant: rebasing this branch on current develop, the snippet changes auto-merge with zero conflict (byte-identical), and the only remaining diff would be a duplicate CHANGELOG entry for #2838 (#2846 already added one). #2838 is closed/completed. Nothing left to merge here. Thanks, wheels-bot 🤖

@bpamiri bpamiri closed this Jun 5, 2026
@bpamiri
bpamiri deleted the docs/bot-2838-install-instructions-for-apt-repository-result-in branch June 5, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install instructions for apt repository result in public key error, failure to install

1 participant