Skip to content

feat(installer): drop jq - #2

Merged
ShulhaOleh merged 1 commit into
mainfrom
feat/manifest-only-no-jq
Sep 20, 2026
Merged

ShulhaOleh merged 1 commit into
mainfrom
feat/manifest-only-no-jq

Conversation

@ShulhaOleh

Copy link
Copy Markdown
Member

Drop the jq runtime requirement and make the updater manifest the only source of assets.

  • JSON is read by a small POSIX awk reader with a narrow, tested contract (only \" \\ \/ decoded, malformed input fails); curl and the POSIX base are now the only hard requirements
  • .deb/.rpm come from the manifest's linux-*-deb/-rpm keys and are signature-verified like every other asset; the GitHub Releases API discovery and its token plumbing are gone (github_repo is read and ignored)
  • when a pubkey is set and minisign is missing, offer to install it via apt/dnf/zypper/pacman/brew under the existing consent/sudo flow; declining or a failed install keeps the explicit error; dry runs never offer

Tests: 21 cases (reader cross-checked against jq on both live manifests and adversarial fixtures, native selection/signature for deb and rpm, AppImage fallback, minisign accept/decline/fail/no-manager). Passed on Debian 13; Fedora and macOS run in CI.

Replace every jq call with a small POSIX awk reader that flattens JSON
to path/value lines. Its contract is deliberately narrow: only \" \ \/
are decoded, other escapes stay as text, raw control characters and
anything malformed exit 2, so a value can never forge a line or split a
path. curl and the POSIX base are now the only hard requirements.

Native .deb/.rpm packages are taken from the manifest's linux-*-deb/-rpm
keys, which every release of both consumers has carried, and are
therefore verified with the manifest signature like every other asset.
The GitHub Releases API discovery, its token plumbing and the
"verifying via HTTPS only" path are gone; github_repo is read and
ignored.

When a pubkey is configured and minisign is missing, offer to install it
through the detected package manager (apt, dnf, zypper, pacman, brew)
under the existing consent and sudo flow; declining, a failed install or
no known manager leaves the explicit error. Dry runs never offer.

The uninstall manifest is written with printf and read with the same
reader; its shape is unchanged.
@ShulhaOleh ShulhaOleh changed the title feat(installer): drop jq; the manifest is the only asset source feat(installer): drop jq, the manifest is the only asset source Sep 20, 2026
@ShulhaOleh ShulhaOleh changed the title feat(installer): drop jq, the manifest is the only asset source feat(installer): drop jq Sep 20, 2026
@ShulhaOleh
ShulhaOleh merged commit 82abe3b into main Sep 20, 2026
9 of 10 checks passed
@ShulhaOleh
ShulhaOleh deleted the feat/manifest-only-no-jq branch September 20, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant