forked from unom/punktfunk
ureq 3 already pulls 0.23, so the tree compiled both minors purely because our two direct declarations named the older one. The API we use — `Engine`, `engine::general_purpose::STANDARD`, `encode`/`decode` — is unchanged in 0.23; no source edits. Both are declared `default-features = false, features = ["std"]` rather than taking the defaults. 0.23 added `simd-unsafe` (hand-written AVX2/NEON engines) as a DEFAULT-ON feature, and ureq declares base64 with default features off, so today that code is not in the tree. Accepting the defaults here would unify the feature on and quietly add an unsafe SIMD engine to every artifact as a side effect of a currency bump. Whether to enable it is a perf question deserving a measurement and its own commit; this one changes versions, not exposure. `std` covers every call site (encode to `String`, decode to `Vec`). base64 0.22 does NOT leave the tree: `rcgen` -> `pem` 3.0.6 is now its sole remaining consumer, and it stays one after the rcgen 0.14 bump later in this batch — 0.14 still depends on `pem` "3.0.2", which resolves to the same 3.0.6, which still uses base64 0.22. Clearing that last copy is upstream's move (a `pem` release on 0.23), not ours. Verified on CachyOS (rustc 1.96.0): cargo clippy -p punktfunk-host -p pf-update-check --locked --all-targets -- -D warnings OK cargo clippy -p punktfunk-host -p pf-update-check --locked -- -D warnings OK (shipping build) cargo test -p punktfunk-host --bins --locked 501 passed, 0 failed, 2 ignored cargo test -p pf-update-check --locked 32 passed, 0 failed cargo fmt --all --check clean
51 lines
2.7 KiB
TOML
51 lines
2.7 KiB
TOML
# The update-CHECK core, shared by the host and the Linux client (planning:
|
|
# host-update-from-web-console.md §3). It exists because both products answer the same
|
|
# question — "does a newer build exist for this box's channel?" — from the same signed
|
|
# manifest, and a trust rule that lives in two places is a trust rule that will diverge.
|
|
#
|
|
# Deliberately check-only: no apply legs, no package managers, no privileged anything. The
|
|
# host keeps its Windows/Linux apply code; the client keeps its own. What is shared here is
|
|
# exactly the part where being wrong is a security bug: signature verification, manifest
|
|
# validation, and the version comparison that decides whether to tell a user to update.
|
|
[package]
|
|
name = "pf-update-check"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
authors.workspace = true
|
|
repository.workspace = true
|
|
description = "Signed update-manifest fetch + verification, install-kind detection and version comparison, shared by the punktfunk host and client."
|
|
publish = false
|
|
|
|
[dependencies]
|
|
anyhow = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
# Ed25519 over the exact manifest bytes — the same primitive the plugin-store index uses, on the
|
|
# workspace's one crypto backend. aws-lc-rs's API is ring-compatible, so the call sites are
|
|
# unchanged apart from the crate name.
|
|
#
|
|
# `prebuilt-nasm` is what lets aws-lc-sys build on Windows x86_64 without NASM installed. rustls
|
|
# enables it for its own dependents, but a build that selects THIS crate without one that turns on
|
|
# rustls's `aws_lc_rs` feature — `cargo test -p pf-update-check` is exactly that, since its only
|
|
# rustls comes from ureq's ring-flavoured dependency — would get no enabler and fail on the CI
|
|
# runner. Naming it here makes the crate build standalone instead of relying on who else is in
|
|
# the selection.
|
|
aws-lc-rs = { version = "1", features = ["prebuilt-nasm"] }
|
|
# Feature selection matched to ureq's (and punktfunk-host's) on purpose — 0.23's default-on
|
|
# `simd-unsafe` engine stays off, so a currency bump doesn't quietly add unsafe SIMD to the tree.
|
|
base64 = { version = "0.23", default-features = false, features = ["std"] }
|
|
# Small, sync, bundles webpki roots — no system cert store dependency, which matters on the
|
|
# Deck (Decky's embedded Python has no usable roots either; see clients/decky/main.py).
|
|
# ⚠ `rustls-no-provider`, NEVER the default `rustls` feature — that one pulls `_ring`, which would
|
|
# put the ring backend back into a tree that has deliberately moved to aws-lc-rs.
|
|
ureq = { version = "3", default-features = false, features = [
|
|
"rustls-no-provider",
|
|
"rustls-webpki-roots",
|
|
"gzip",
|
|
] }
|
|
|
|
[lints]
|
|
workspace = true
|