Commit 39b678e
feat(distribution): land Phase 2 native apt/yum repos via Cloudflare R2 (#2814)
* feat(distribution): land Phase 2 native apt/yum repos via Cloudflare R2
Closes #2605. apt.wheels.dev and yum.wheels.dev are now live, signed,
and serving from Cloudflare R2 buckets (wheels-apt / wheels-yum) with
custom apex-domain bindings. Verified end-to-end:
curl -fsSL https://apt.wheels.dev/wheels.gpg \
| sudo tee /usr/share/keyrings/wheels.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/wheels.gpg] https://apt.wheels.dev stable main" \
| sudo tee /etc/apt/sources.list.d/wheels.list
sudo apt update && sudo apt install wheels
sudo dnf config-manager --add-repo https://yum.wheels.dev/wheels.repo
sudo dnf install wheels
GPG: signed with key 6872 16C9 32B4 9F03 94E0 9AED 5D89 AF8F 9C9B 8CFB
(`Wheels Distribution <hello@wheels.dev>`), expires 2031-05-25.
InRelease and repomd.xml.asc both verify locally against the published
wheels.gpg.
Architecture deviation from the original Phase 2 sketch: served from
Cloudflare R2 instead of Cloudflare Pages. Pages enforces a 25 MiB
per-file limit; the .deb is 80 MB and the .rpm is 81 MB. R2 has no
object-size limit and supports custom-domain serving, so the URL UX
is identical to what the original sketch promised.
Changes in this commit:
tools/distribution-drafts/apt-repo/
- workflows/wheels-released.yml — R2-backed receiver (sync from R2
→ add new .deb → regen metadata → upload changed tree to R2 via
wrangler r2 object put). Replaces "git commit + push → Pages
auto-deploy" with a direct R2 upload path.
- README.md — Pages → R2 architecture note + updated operational
prereqs (CLOUDFLARE_API_TOKEN with Workers R2 Storage:Edit).
tools/distribution-drafts/yum-repo/
- workflows/wheels-released.yml — R2-backed receiver, parallel
structure to apt.
- scripts/regenerate-yum-metadata.sh — rpm --addsign now reads the
passphrase from a chmod-600 temp file via %__gpg_sign_cmd
override; the previous gpg.conf "pinentry-mode loopback" only
tells gpg "don't pop TTY" but doesn't supply the passphrase, so
CI runs were failing with "cannot open '/dev/tty'".
- README.md — Pages → R2.
tools/distribution-drafts/linux-packages/README.md
- Phase 2 section now reflects R2-backed serving + the secrets
checklist gains CLOUDFLARE_API_TOKEN per bucket repo.
web/sites/guides/src/content/docs/v4-0-1-snapshot/start-here/installing.mdx
web/sites/guides/src/content/docs/v4-0-1-snapshot/command-line-tools/installation.mdx
- Lead with `apt.wheels.dev` / `yum.wheels.dev` sources.list /
.repo setup. The "Trust model during Phase 1" Aside is replaced
with a "GPG signing" Aside that names the fingerprint and
explains the verification chain.
- One-off GH-Release download retained behind a Tip Aside for
air-gapped use.
- Linux upgrade section shrinks to `apt upgrade wheels` /
`dnf upgrade wheels` (one command, no version pinning needed).
Operational state landed in parallel (not in this commit, outside the
repo): GPG key in 1Password at op://Wheels/wheels-linux-repo-signing/;
R2 buckets wheels-apt + wheels-yum on the wheels.dev account with
custom domains apt.wheels.dev / yum.wheels.dev; bucket-repo secrets
(WHEELS_REPO_GPG_PRIVATE_KEY, WHEELS_REPO_GPG_PASSPHRASE,
CLOUDFLARE_API_TOKEN) set on wheels-dev/apt-wheels and
wheels-dev/yum-wheels.
Still outstanding: LINUX_REPO_DISPATCH_TOKEN on wheels-dev/wheels.
The release workflow's dispatch step skips silently when the secret
is unset, so the next release ships without auto-publish but the
backfill path (`gh workflow run wheels-released.yml --repo <bucket>`)
works.
Signed-off-by: Peter Amiri <peter@alurium.com>
* docs: flip remaining install guides to native apt/yum sources
Completes the doc flip for #2605. Earlier commit handled the
v4-0-1-snapshot install pages; this one covers the four files
the first pass missed:
- v4-0-0/start-here/installing.mdx — Linux tab flipped from
"download GH Release + apt install ./file.deb" to "add the
signed apt.wheels.dev source + sudo apt install wheels".
Same for Fedora/RHEL via yum.wheels.dev. Upgrade section
shrinks from "re-run install" to "apt upgrade wheels".
- v4-0-0/command-line-tools/installation.mdx — same flip on
the CLI-installation page. Adds GPG-signing Aside naming the
fingerprint, and keeps the GH-Release download snippet
behind a "Need a one-off download?" Tip for air-gapped use.
- v4-0-0/start-here/release-channels.mdx — Linux per-channel
install snippets and the four "switching channels" snippets
(stable→BE × {apt,dnf}, BE→stable × {apt,dnf}) flipped to
use the native sources. The switch flow becomes 2 commands
(add source + install) instead of 4 (curl + apt install).
- v4-0-1-snapshot/start-here/release-channels.mdx — same
flip as v4-0-0.
Stale text removed:
- "Apt and yum repos at apt.wheels.dev / yum.wheels.dev
are coming" (×2)
- "Native apt/yum repositories ... are on the v4.0.x
roadmap" (×2)
- "Trust model during Phase 1" Asides (×2)
- All "until the native repos are live" hedges
Both v4-0-0 and v4-0-1-snapshot docs now describe the live
architecture accurately. The v4-0-0 docs aren't being
rewritten — they're being corrected: the original sentence
"Native apt/yum is coming" describes a future that's now in
the past.
Signed-off-by: Peter Amiri <peter@alurium.com>
* fix(docs): replace MDX-incompatible <https://...> autolinks with explicit link syntax
The previous commit used GitHub-Flavored Markdown's "autolink" syntax
(<https://apt.wheels.dev>) for bare URLs. MDX treats `<` as the start
of a JSX tag and chokes:
[@mdx-js/rollup] Unexpected character `/` (U+002F) before local name,
expected a character that can start a name, such as a letter, `$`,
or `_`
file: web/sites/guides/src/content/docs/v4-0-0/command-line-tools/installation.mdx:54:73
That broke the `sites/guides` build, which broke the `Refresh visual
baselines` workflow (and would have broken any other build-the-site
job too).
Fix: convert <URL> → [URL](URL) — the explicit Markdown link form —
across all four mdx files I touched in the prior commit. Six total
occurrences (apt.wheels.dev, yum.wheels.dev, two FINGERPRINT URLs ×
two file versions).
Verified by grep: no <https://...> instances remain in
web/sites/guides/src/content/docs/.
Signed-off-by: Peter Amiri <peter@alurium.com>
* fix(distribution): address Reviewer A/B consensus findings (round 1)
Apply the converged findings from the Reviewer A/B exchange on #2814.
- Replace `jq | while` and `find | while` piped loops with process
substitution (`while ... done < <(...)`) in both apt and yum
Sync + Upload steps. Pipe-RHS runs in a subshell where `set -e`
in the parent does not see wrangler's non-zero exit, masking
download/upload failures and producing trimmed indexes that
silently overwrite Packages.gz / repomd.xml on R2.
- Drop `>/dev/null 2>&1` from all wrangler r2 object get/put calls
so a real failure surfaces in the CI log.
- Add `jq -e '.success == true'` guard after the Cloudflare R2 list
curl call in both Sync steps. When the token is invalid/expired
or the API rate-limits, success=false comes back with an empty
result array; without this check the sync succeeds with an empty
local pool and metadata regen would overwrite the live index with
a single-package tree.
- Move the hardcoded `CLOUDFLARE_ACCOUNT_ID` literal out of the
workflow env block to `${{ vars.CLOUDFLARE_ACCOUNT_ID }}`. Account
IDs are not auth credentials, but keeping the workflow templates
account-agnostic avoids handing a public-template harvester a
ready-made API target. Each bucket repo sets the variable via
`gh variable set CLOUDFLARE_ACCOUNT_ID --body '<id>' --repo ...`.
Files touched:
tools/distribution-drafts/apt-repo/workflows/wheels-released.yml
tools/distribution-drafts/yum-repo/workflows/wheels-released.yml
The PR-description claim that v4-0-0 docs are untouched (B's missed
issue, finding 4) is a metadata correction, not a code change — it
will be addressed in the PR description, not this commit.
The CHANGELOG note (A's finding 4) was not part of the consensus
(B refuted the CLAUDE.md-convention framing) and is skipped here.
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Signed-off-by: Peter Amiri <peter@alurium.com>
* docs(yum-script): clarify why rpm --addsign uses stdout-only suppression
Reviewer A's round-2 nit: the `>/dev/null` on the rpm --addsign call
inside regenerate-yum-metadata.sh is intentional (rpm's stdout is
verbose progress chatter), but the rationale wasn't documented in the
script. The round-1 review correctly noted that broadening it to
`>/dev/null 2>&1` would silence stderr too and risk silent signing
failures corrupting the repo.
Add an inline comment that:
- documents what the redirect actually suppresses (stdout progress chatter)
- notes that stderr stays open so a signing failure still surfaces
- explicitly warns a future editor not to broaden it to `2>&1`
Signed-off-by: Peter Amiri <peter@alurium.com>
* fix(web): authenticate sites/packages registry fetches to avoid 403 rate limit
The packages.wheels.dev build (`sites/packages`) enumerates the package
registry by calling the GitHub REST contents API at build time. Those
fetches were unauthenticated, so they shared the 60 req/hour per-IP
unauthenticated cap. Rapid CI activity on a single branch (PR #2814 saw
~6 pushes in an hour) exhausted the cap, and the build aborted
mid-prerender with:
Registry fetch failed: 403 rate limit exceeded —
https://api.github.com/repos/wheels-dev/wheels-packages/contents/packages?ref=main
That surfaced as a "Deploy packages" check failure unrelated to the
PR's actual content.
Fix:
- registry.ts: send `Authorization: Bearer $GITHUB_TOKEN` (falls back to
GH_TOKEN, then unauthenticated) on every registry fetch. Authenticated
requests get 5000 req/hour instead of 60. Local/offline preview builds
with no token keep working unauthenticated.
- web-deploy.yml: pass `GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}` into
the Build step env so the token is present in CI. Other site builds
ignore the var.
- registry.test.ts: add coverage for both the token-present (header sent)
and token-absent (header omitted) paths.
Verified locally: `pnpm --filter @wheels-dev/site-packages test` →
18 passed; `GITHUB_TOKEN=$(gh auth token) pnpm --filter
@wheels-dev/site-packages build` → 7 pages built, registry fetch
succeeded.
Signed-off-by: Peter Amiri <peter@alurium.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[bot] <41898282+claude[bot]@users.noreply.github.com>1 parent 0a6aa5e commit 39b678e
15 files changed
Lines changed: 582 additions & 392 deletions
File tree
- .github/workflows
- tools/distribution-drafts
- apt-repo
- workflows
- linux-packages
- yum-repo
- scripts
- workflows
- web/sites
- guides/src/content/docs
- v4-0-0
- command-line-tools
- start-here
- v4-0-1-snapshot
- command-line-tools
- start-here
- packages/src/lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
104 | | - | |
105 | | - | |
106 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
107 | 113 | | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
| 117 | + | |
| 118 | + | |
111 | 119 | | |
112 | 120 | | |
113 | 121 | | |
| |||
Lines changed: 136 additions & 62 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | | - | |
13 | | - | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | | - | |
16 | | - | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
39 | | - | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | | - | |
43 | | - | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
47 | 60 | | |
48 | 61 | | |
49 | 62 | | |
| |||
52 | 65 | | |
53 | 66 | | |
54 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
55 | 73 | | |
| 74 | + | |
56 | 75 | | |
57 | | - | |
58 | | - | |
| 76 | + | |
| 77 | + | |
59 | 78 | | |
60 | | - | |
61 | | - | |
| 79 | + | |
| 80 | + | |
62 | 81 | | |
63 | 82 | | |
64 | 83 | | |
65 | 84 | | |
66 | 85 | | |
67 | | - | |
68 | 86 | | |
69 | 87 | | |
70 | 88 | | |
71 | 89 | | |
72 | | - | |
73 | 90 | | |
74 | | - | |
75 | | - | |
| 91 | + | |
| 92 | + | |
76 | 93 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
87 | 100 | | |
88 | 101 | | |
89 | 102 | | |
90 | 103 | | |
91 | 104 | | |
92 | | - | |
93 | | - | |
94 | 105 | | |
95 | | - | |
| 106 | + | |
96 | 107 | | |
97 | 108 | | |
98 | | - | |
| 109 | + | |
99 | 110 | | |
100 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
101 | 115 | | |
102 | 116 | | |
103 | 117 | | |
| |||
110 | 124 | | |
111 | 125 | | |
112 | 126 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
118 | 130 | | |
119 | 131 | | |
120 | 132 | | |
| |||
123 | 135 | | |
124 | 136 | | |
125 | 137 | | |
126 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
127 | 184 | | |
128 | 185 | | |
129 | 186 | | |
130 | | - | |
131 | 187 | | |
132 | 188 | | |
133 | 189 | | |
134 | 190 | | |
135 | 191 | | |
136 | 192 | | |
137 | | - | |
138 | | - | |
| 193 | + | |
| 194 | + | |
139 | 195 | | |
140 | 196 | | |
141 | 197 | | |
| |||
144 | 200 | | |
145 | 201 | | |
146 | 202 | | |
147 | | - | |
| 203 | + | |
148 | 204 | | |
149 | | - | |
| 205 | + | |
150 | 206 | | |
151 | 207 | | |
152 | 208 | | |
153 | 209 | | |
154 | 210 | | |
155 | 211 | | |
156 | | - | |
| 212 | + | |
157 | 213 | | |
158 | 214 | | |
159 | 215 | | |
160 | | - | |
161 | 216 | | |
162 | 217 | | |
163 | | - | |
164 | | - | |
165 | | - | |
| 218 | + | |
166 | 219 | | |
167 | 220 | | |
168 | 221 | | |
| |||
173 | 226 | | |
174 | 227 | | |
175 | 228 | | |
176 | | - | |
| 229 | + | |
177 | 230 | | |
178 | | - | |
| 231 | + | |
179 | 232 | | |
180 | | - | |
181 | 233 | | |
182 | 234 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
0 commit comments