Skip to content

feat(apt): build the ivicli Debian packages and install them with apt before a release - #290

Merged
ShortArrow merged 1 commit into
mainfrom
feat/deb-packages
Oct 19, 2026
Merged

ShortArrow merged 1 commit into
mainfrom
feat/deb-packages

Conversation

@ShortArrow

@ShortArrow ShortArrow commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

ADR 0052 §2–§4: ivi-cli builds its Debian packages, checks that apt installs them, and attaches them to each stable release, where the registry in ShortArrow/pkg will index them. Depends on ShortArrow/pkg#1, which names shortarrow-archive-keyring.

The package

packaging/apt/build-deb.sh packs the self-contained single-file publish, so the package needs no .NET runtime. The binary goes under /usr/lib/ivicli, and /usr/bin/ivicli is a symlink to it. Depends lists the native libraries the runtime loads, as ADR 0052 §2 gives them, and the registry's keyring package, so a rotated key reaches every machine that has ivicli. The script refuses a version containing -, because Debian would sort 0.4.1-beta.1 after 0.4.1.

That keyring package exists only in the registry. Until the registry is live, a .deb taken from a release does not install on its own; the CHANGELOG entry says so.

The install test

packaging/apt/install-test.sh signs a throwaway repository with a key generated for the run, next to a stand-in shortarrow-archive-keyring that carries that key. It then installs both with apt-get install --no-install-recommends in fresh debian:bookworm and ubuntu:24.04 containers and checks ivicli --version. A runtime library missing from Depends shows up as a binary that does not start. A library that is loaded only on first use, such as OpenSSL, is not exercised.

Pull requests run it on amd64 and arm64 when the packaging, src/, the version, the SDK pin or these workflows change. In release.yml, the new deb job runs it before anything is published: pack, docker, the NativeAOT manifest and release all wait for it, and the .deb files join the release assets and SHA256SUMS. A pre-release tag builds no package.

How it was checked

In this PR's CI, both architectures installed the package in both containers, and ivicli --version reported 0.4.1. Run locally, the test failed when it was given a version the package does not have. Locally, build-deb.sh also stopped on a pre-release version. The release job itself runs only on a tag. It uses the same two scripts on the artifacts the publish job already uploads.

@ShortArrow
ShortArrow marked this pull request as ready for review October 19, 2026 23:34
@ShortArrow
ShortArrow merged commit 37162e5 into main Oct 19, 2026
23 checks passed
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