Skip to content

Releasing ​

For the maintainer. A release is a tag. Pushing the tag runs the CI gates, builds the artefacts in containers and attaches them to a GitHub release. Nothing here needs a secret beyond the token that GitHub Actions provides.

What a release contains ​

ArtefactWhat it is
probeward_<version>_amd64.deb, probeward_<version>_arm64.debThe packages for Debian and Ubuntu, with the static binary, the systemd unit and the documentation.
probeward-<version>-linux-amd64, probeward-<version>-linux-arm64The static musl binaries with the web interface embedded, for hosts without dpkg. The same binary can run as a remote probe.
probeward-probe-<version>-x64.msiThe Windows probe's installer (Windows probes), unsigned.
probeward-<version>-windows-x64.exeThe Windows probe binary on its own, the one inside the MSI.
probeward-<version>-probe-binaries.tar.gzmanifest.json and the binaries for every probe target, to unpack as the core's PROBEWARD_PROBE_BINARIES_DIR so that probes update themselves (updating).
probeward-<version>-image.tar.gzThe container image of deploy/Dockerfile, as docker save writes it (docker load < file).
SHA256SUMSThe checksums of the files above.
SHA256SUMS.cosign.bundleThe cosign signature of SHA256SUMS, added by the release workflow. See Signing.

The version is the workspace version in the root Cargo.toml. The binary prints it with probeward version, and the release recipe fails if that is not the version it was asked to package.

Cutting a release ​

  1. In Cargo.toml change version under [workspace.package], and run cargo check so that Cargo.lock follows. Also set version in ui/package.json if you keep the two together.

  2. In CHANGELOG.md rename [Unreleased] to the new version with the date, add a fresh empty [Unreleased] above it, and fix the comparison links at the bottom. The release workflow uses that section as the text of the release and fails if there is none.

  3. Replace the entry in packaging/deb/changelog.in with a short summary of the release.

  4. Append the release and the last migration it ships to RELEASED_SCHEMA_VERSIONS in crates/probeward-store/src/migrate.rs (("M1", 2) is there today). This is part of cutting a release: the upgrade tests start from every schema listed, and the list is the record of what users may be upgrading from. For the new entry, extend upgrade_from_m1_keeps_a_representative_installation in crates/probeward-store/tests/db/migrations.rs, or add a sibling, so that data written the way that release wrote it survives the upgrade to the newest schema.

  5. Run just ci, then just release-artifacts and just deb-lint on your machine, and install the package in a container (see "Testing a package" below).

  6. Commit, then tag and push:

    sh
    git tag -s v0.2.0 -m "Probeward 0.2.0"      # or an unsigned tag with -a
    git push origin v0.2.0

    A version with a hyphen (0.2.0-rc.1) is published as a pre-release.

The workflow .github/workflows/release.yml then checks that the tag is v plus the version in Cargo.toml and that the changelog has a section for it, runs the same gates as every pull request (ci.yml), builds everything with just release-artifacts, lints the packages and creates the release. If a step fails, nothing is published; fix it, delete the tag and tag again.

How the packages are built ​

just deb runs packaging/build-debs.sh. Only Docker is needed on the host.

  1. packaging/deb/Dockerfile builds the web UI (node:24-alpine, pnpm from the lock file) and the server binary with the UI embedded. The x86-64 binary is built natively on rust:1-alpine for musl, as deploy/Dockerfile does. The ARM64 binary is cross-compiled for aarch64-unknown-linux-musl with cargo-zigbuild, using zig as the C compiler and linker; the zig archive is checked against the checksum published by the zig project.
  2. The same Dockerfile generates THIRD-PARTY-LICENSES.txt: the licence texts of every Rust crate compiled into the binary for the shipped targets, from Cargo.lock with cargo-about (configuration in packaging/licences/about.toml, the allowed licences are those of deny.toml), and the licences of the UI's production dependencies, from pnpm licenses.
  3. packaging/deb/build-deb.sh runs in a debian:13 container, lays out the package tree and calls dpkg-deb. Every file gets the time of the last commit (SOURCE_DATE_EPOCH), gzip runs with -n, and the build path is remapped out of the binary, so the same inputs give the same package.

The result is in dist/. The binaries are in dist/build/<arch>/probeward.

What is pinned and what is not: the Rust crates (Cargo.lock), the UI packages (pnpm-lock.yaml), pnpm, zig, cargo-zigbuild and cargo-about are. The base images (rust:1-alpine, node:24-alpine, debian:13) and the Alpine packages are tags that move. For a build that must be repeated bit for bit later, set RUST_IMAGE, NODE_IMAGE and DEB_IMAGE to image digests (rust@sha256:...) in the environment of just deb. Bit-for-bit reproducibility from an empty cache has not been verified; two builds from the same cache give identical packages.

The Windows probe and its MSI are built by packaging/windows/build.sh in their own containers, as described in Building the Windows probe; just release-artifacts runs it.

The remote probe ​

The same binary runs as a remote probe, and the package ships its unit, probeward-probe.service, with its own environment file /etc/probeward/probeward-probe.env (a conffile, root only, because it holds the pairing token), its own user probeward-probe and state directory /var/lib/probeward-probe. It is never enabled or started by the package. Its binary is the root-owned /usr/bin/probeward, so self-update is off and the probe is updated with the package. Upgrading restarts it only if it was running; apt remove stops it; apt purge deletes its state directory and user without a question. See probes.

Contacts and names in the package ​

  • MAINTAINER in packaging/deb/package.conf is the package's maintainer field, which dpkg shows.
  • Security reports go to security@probeward.app (SECURITY.md); everything else, including code of conduct reports, to hi@probeward.app (CODE_OF_CONDUCT.md).
  • The copyright holder in packaging/deb/build-deb.sh reads "The Probeward contributors". Change it if you want a name there.

Checking the packages ​

sh
just deb-lint        # lintian in a Debian container; warnings and errors fail

The accepted findings are in packaging/deb/lintian-overrides, each with its reason. They are shipped in the package, so a user can see why.

Testing a package ​

A container can run systemd if it is given CAP_SYS_ADMIN and a writable cgroup. This does not need --privileged:

sh
docker run -d --name pw-test --cgroupns=private --cap-add SYS_ADMIN \
    --security-opt apparmor=unconfined --tmpfs /run --tmpfs /tmp \
    -v "$PWD/dist:/dist:ro" --entrypoint /bin/sh <image with systemd> \
    -c 'mount -o remount,rw /sys/fs/cgroup && exec /sbin/init'
docker exec pw-test rm -f /usr/sbin/policy-rc.d     # Debian's image forbids starting services
docker exec pw-test apt-get install -y ./dist/probeward_<version>_amd64.deb

Put a PostgreSQL 18 container on the same network. What to check, in this order: a clean install creates the user and the key (32 bytes, mode 0600) and installs the unit without enabling or starting it; with PROBEWARD_DATABASE_URL set, systemctl enable --now probeward starts it, serves /readyz, and a ping sensor polls; installing the next version over it stops, replaces, migrates and restarts it, and the key is byte for byte the same; apt remove stops it and leaves the key and the configuration; dpkg --purge keeps the key unless asked. For the probe: the core unit stays quiet on a host that does not configure it, the probe unit is neither enabled nor started by installing, pairs when enabled, polls an assigned sensor, comes back after an upgrade, and purge removes its state. The ARM64 package cannot be executed on an x86-64 host. Inspect it with dpkg-deb -I, dpkg-deb -c and file, and run it on real ARM64 hardware before you tell anyone it works.

An older build for an upgrade test: BINARY_AMD64=/path/to/older/probeward packaging/build-debs.sh --arch amd64 --version 0.1.0~old builds a package from a binary you already have.

Signing ​

The release workflow signs SHA256SUMS with cosign, keylessly: the publish job asks GitHub for a short-lived identity token (id-token: write), Sigstore issues a certificate for the workflow's identity, and the signature goes into the public transparency log. The result is SHA256SUMS.cosign.bundle, attached to the release. The signature covers SHA256SUMS, and the checksums cover every artefact, so one signature covers the lot.

Why this and not a key: there is no key to create, store, rotate or lose, no secret in the repository or in GitHub, and nothing new at runtime: cosign is installed in the workflow (sigstore/cosign-installer) and only a person who verifies needs it. The price is that trust rests on GitHub's identity for the workflow and on Sigstore's public services, and that a signature is public (the log entry holds the checksum file's hash and the workflow's identity). If you would rather hold a key, see below.

Verifying a download ​

Download SHA256SUMS and SHA256SUMS.cosign.bundle from the release page, then:

sh
cosign verify-blob \
    --bundle SHA256SUMS.cosign.bundle \
    --certificate-identity "https://github.com/Probeward/probeward/.github/workflows/release.yml@refs/tags/v0.2.0" \
    --certificate-oidc-issuer https://token.actions.githubusercontent.com \
    SHA256SUMS
sha256sum --check --ignore-missing SHA256SUMS

Use the tag of the release you downloaded. Verified OK means the checksum file was produced by that workflow of this repository at that tag; the second command then checks your files against it.

Signing on your own machine ​

just release-artifacts calls packaging/sign-checksums.sh at the end. With no key configured it prints NOT SIGNING and carries on, so a local build is never mistaken for a signed one. To sign with a key you hold, supplied at release time and never committed:

sh
cosign generate-key-pair                       # once; keep cosign.key offline, publish cosign.pub
COSIGN_KEY=/path/to/cosign.key COSIGN_PASSWORD=... just release-artifacts
cosign verify-blob --key cosign.pub --bundle SHA256SUMS.cosign.bundle SHA256SUMS

This was run with a throw-away key: signing worked, and verifying a changed SHA256SUMS failed. The keyless path can only run on GitHub and has not been exercised: the first tagged release (try it with a -rc tag) is its test. Check there that the bundle is attached and cosign verify-blob accepts it.

A GPG key would additionally allow debsigs signatures inside the deb files and a signed apt repository. That is not set up. Build provenance attestation (actions/attest-build-provenance) can be added to the same job with the same token.

The documentation site ​

The pages under docs/ are built into a static site with VitePress (docs/.vitepress/config.mts, with its own docs/package.json and lock file, apart from the UI). .github/workflows/docs.yml builds it on every pull request that touches docs/, and on a push to main it also publishes it on GitHub Pages, at https://probeward.github.io/probeward/. Locally, just docs-dev serves it with live reload and just docs-build builds it into docs/.vitepress/dist. The build fails on a link to a page that does not exist.

Once, before the first deployment, a repository administrator sets Settings, Pages, Source to GitHub Actions. Nothing else needs a secret.

A custom domain. The site is served under /probeward/, the path GitHub Pages gives a project site. The path is read from DOCS_BASE at build time, so a move to a domain of its own is one line: set DOCS_BASE: / in the environment of the build step in docs.yml, and enter the domain under Settings, Pages, Custom domain. Change the site address in README.md and in this section too.

An apt repository ​

Not provided. Users download the .deb from the release page. Adding a repository means choosing a host (GitHub Pages is enough), generating Packages and Release files, and signing them with the key from the previous section.

AGPL-3.0-only