chore(governance): ship binaries to Pandora's Box Generic Packages (DEV-357) #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/governance-alignment-DEV-357"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Brings
umbratoNiceGuyIT/governancespec for a Pandora's Box public desktop GUI/CLI (see DEV-357). Per BUILD.md's decision tree, a repo with no service container ships distributable binaries to the Forgejo Generic Packages registry rather than an OCI runtime image. Completes the in-progress alignment branch.What changed
Version stamping (3-part, governance CI.md).
crates/umbra-buildnow emitsUMBRA_VERSION(git describe --tags --always --dirty, CI override, orCARGO_PKG_VERSIONfallback) alongsideUMBRA_GIT_HASH(short=12) andUMBRA_BUILD_DATE. The banners inumbra-cli,umbra-gui, andumbra-hid/src/version.rsreadenv!("UMBRA_VERSION").umbra --versionnow printsumbra <version> (<git-hash> built <date>).Windows portability. The hidapi backend feature is now target-conditional.
[workspace.dependencies]carries no backend feature (per-target features cannot live there); each consuming crate selectslinux-static-hidrawundercfg(target_os = "linux")andwindows-nativeundercfg(windows). The udev module already hadcfg(unix)/cfg(not(unix))stubs.Build tooling ->
oci-build/.Dockerfile.binary-linux(fromrust-builder-glibc, since hidapi links libudev/libusb and eframe links X11/Wayland/GL/fontconfig) andDockerfile.binary-windows(fromrust-builder-glibc-windows, mingw cross-compile) each build--workspace --lockedand exportumbra+umbra-guifrom aFROM scratch AS binarystage. Adds the sharedget-tags.nu. The root runtime-imageDockerfileis removed.Workflows.
build-binary-linux.ymlandbuild-binary-windows.ymlpublish both binaries per tag via nuhttp delete/http put, step-scopedFORGEJO_TOKEN,PACKAGE_OWNER: github.repository_owner(resolves topandoras-box).create-release.ymlmatches the governance template.check.ymlaligns to the CI.md Check template.CARGO_BUILD_JOBSis capped atnproc/2because the two binary workflows run as siblings on one runner.Housekeeping. justfile gains
build-binary-linux/build-binary-windows(replacing the oldbuild-dockerrecipes) and repointscheck-docker;Cargo.tomlrepositorypoints at this repo; addsLICENSE.md(GPL-2.0-or-later, faithful to the OpenRazer fork origin) andCLAUDE.md;.dockerignoredrops the stale root-Dockerfileexclusion.Verification
Local (this host):
cargo build --locked --workspace,cargo clippy --workspace --all-targets --no-deps -- --deny warnings,cargo fmt --all --check, andcargo test --workspace(19 + 1 doc-test) all green.Cargo.lockunchanged under--locked.umbra --versionprints the 3-part banner.The Windows mingw cross-compile and the Linux binary Docker build are verified by CI only (no Docker/mingw on the local host). Per the DEV-357 assumption, if the eframe/glow mingw build cannot compile, the Windows workflow is reported red rather than blocking the Linux deliverable.
Out of scope
README.mdstill has upstream-fork leftovers (cd rust, a.github/workflows/rust.ymlreference, and a "Cross-compilation: not provided" note that now contradicts the Windows workflow). Not touched here; flag for a follow-up if desired.Bring umbra to NiceGuyIT/governance spec for a Pandora's Box public desktop GUI/CLI: Docker is the build tool, the deliverable is a distributable binary published to the `pandoras-box` Forgejo Generic Packages registry, not an OCI runtime image. 3-part version stamp (governance CI.md "Version stamping"): `crates/umbra-build` now emits `UMBRA_VERSION` (`git describe --tags --always --dirty`, CI override, or `CARGO_PKG_VERSION` fallback) alongside the existing `UMBRA_GIT_HASH` (short=12) and `UMBRA_BUILD_DATE`. The banners in umbra-cli, umbra-gui, and umbra-hid/src/version.rs read `env!("UMBRA_VERSION")`, so `umbra --version` prints all three parts. Windows portability: the hidapi backend feature is now target-conditional. `[workspace.dependencies]` carries no backend feature (per-target features are not expressible there); each consuming crate declares hidapi under `[target.'cfg(target_os = "linux")']` (linux-static-hidraw) and `[target.'cfg(windows)']` (windows-native). Build tooling moves to oci-build/: `Dockerfile.binary-linux` (rust-builder-glibc) and `Dockerfile.binary-windows` (rust-builder-glibc-windows mingw cross-compile) each build `--workspace --locked` and export `umbra` + `umbra-gui` from a `FROM scratch AS binary` stage; plus the shared `get-tags.nu`. The root runtime-image Dockerfile is removed. Workflows: `build-binary-linux.yml` and `build-binary-windows.yml` publish both binaries per tag via nu `http delete`/`http put` with step-scoped `FORGEJO_TOKEN` and `PACKAGE_OWNER: github.repository_owner`; `create-release.yml` matches the governance template; `check.yml` aligns to the CI.md Check template (checkout@v5, toolchain step, Swatinem/rust-cache@v2). CARGO_BUILD_JOBS is capped at nproc/2 since the two binary workflows run as siblings. justfile gains `build-binary-linux` / `build-binary-windows` (replacing the old build-docker recipes), repoints `check-docker` at the builder stage, and threads UMBRA_VERSION through every build arg. Cargo.toml `repository` points at this repo. Adds LICENSE.md (GPL-2.0-or-later, faithful to the OpenRazer fork origin) and CLAUDE.md. Signed-off-by: David Randall <David@NiceGuyIT.biz> #DEV-357