Skip to content

build: Homebrew/Scoop/winget manifests and cargo-auditable release builds (WI-1724) - #258

Merged
thedancingdeveloper merged 2 commits into
mainfrom
wi-1724-distribution-r2
Oct 21, 2026
Merged

thedancingdeveloper merged 2 commits into
mainfrom
wi-1724-distribution-r2

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Collaborator

Summary

Rebase of #253 onto current main, superseding it. #253 conflicts with main after #252 (**config:** changelog entry) and #254 (CodeQL made release-only, push-to-main CI runs removed) landed.

Adds Homebrew, Scoop and winget distribution manifests, and builds release binaries with cargo-auditable so dependency data is embedded for cargo audit bin.

The rebase keeps both sides:

User-visible behaviour

Users can install from Homebrew, Scoop and winget. Release binaries carry embedded dependency data, so cargo audit bin works against a published artifact.

Compatibility

None. No native /api/..., SABnzbd-compatible response, config key or on-disk state changes.

Tests

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • cargo check --workspace --all-targets
  • cargo test --manifest-path benchnzb/Cargo.toml --all-targets --locked
  • Frontend npm test -- --watch=false and production build, if apps/rustnzb/frontend changed — not applicable, frontend untouched
  • UI changes checked at 1440px and 390px against DESIGN.md — not applicable, no UI changes

Additional verification on the packaging scripts:

  • shellcheck clean and sh -n clean on ci/tasks/auditable, packaging/distribution/render-windows-manifests.sh, packaging/homebrew/update-formula.sh.
  • render-windows-manifests.sh exercised end to end: valid release writes the Scoop JSON and winget YAML with the right version and hash (uppercase hex for winget), a checksum mismatch exits 1, a bad tag exits 2.
  • All four workflows YAML-parse; generated Scoop JSON and winget YAML parse.
  • Homebrew formula was not checked with ruby -c — Ruby is not installed in this environment.

Note on test runs: two earlier cargo test --workspace attempts hit load-sensitive failures in nzb-web/tests/harness_speed_limit.rs and nzb-dispatch/tests/slice_map.rs while the host load average was 18–27 on 24 cores. Both pass in isolation and serially, and the final full run was green. Neither file is touched by this branch.

Checklist

  • No credentials, NZB URLs, private hostnames or personal paths in the diff, fixtures or logs.
  • Behaviour changes have tests.
  • Docs updated where behaviour or setup changed (docs/RELEASING.md, packaging/README.md).

…itable

Build every standalone release binary and the container image through
cargo-auditable, so the resolved crate list is embedded in the shipped
executable rather than inferred by syft from the build tree.

- ci/tasks/auditable pins v0.7.7 and its tarball SHA-256, installs it once
  per task, and provides the wrapper environment the cross builders
  (cargo zigbuild / cargo xwin) need.
- the Linux, arm64 and Windows build tasks build through it and fail if
  the resulting binary has no .dep-v0 section.
- the Dockerfile installs the same pinned tool and asserts the section.
- release.yml and promote-release.yml re-check both shipped Linux
  binaries before SBOM generation, so a regression cannot quietly produce
  a non-dependency-accurate SBOM.
Add the remaining distribution channels beyond Unraid and AUR, with every
value derived from the release workflow's own assets and checksums. Nothing
is published: CI renders the Windows manifests and uploads them as a workflow
artefact for the operator to review and submit.

- packaging/homebrew/Formula/rustnzb.rb installs the prebuilt Linux tarballs
  (x86_64 default, aarch64 under on_arm); update-formula.sh downloads both
  assets and SHA256SUMS, verifies them, and rewrites version/URL/hashes.
- packaging/scoop/bucket/rustnzb.json extracts the NSIS installer with
  Expand-7zipArchive instead of running it, so no registry entries, service
  or uninstaller are created.
- packaging/winget/.../1.5.0 declares InstallerType nullsoft, machine scope,
  elevatesSelf, the rustnzb command and the .nzb file extension.
- packaging/distribution/render-windows-manifests.sh renders both Windows
  channels from one SHA256SUMS file and writes nothing on a bad or missing
  hash; release.yml runs it as a dry run against the assets it just built.
- cargo-auditable builds are documented in RELEASING.md, with the cosign
  mirror question recorded as an open operator decision.

The Windows installer is not Authenticode-signed, so SmartScreen warns on
first run; winget accepts that, and the docs say so. A macOS formula needs a
macOS artefact, which the release does not produce yet.
@thedancingdeveloper
thedancingdeveloper added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit ebea99c Oct 21, 2026
8 of 9 checks passed
@thedancingdeveloper
thedancingdeveloper deleted the wi-1724-distribution-r2 branch October 21, 2026 01:24
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