Skip to content

feat(packaging): build .deb packages for Debian and Ubuntu - #577

Merged
LeMyst merged 2 commits into
cooklang:mainfrom
LeMyst:ci/deb-packages
Sep 28, 2026
Merged

LeMyst merged 2 commits into
cooklang:mainfrom
LeMyst:ci/deb-packages

Conversation

@LeMyst

@LeMyst LeMyst commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #576.

Stacked on #575 (then #573, #571, #569). Only 2cb2b1c and the fix-up ee977f0 (run the container steps under bash) are new here. It builds on the release workflow as those PRs leave it: pinned actions, per-job permissions, and the missing-artifact check.

What changes

packaging/debian/build-deb.sh, modelled on packaging/fedora:

  • Builds with --no-default-features --features server,import,lsp,sync, the same set as the RPM. There is no self-update, so cook update is absent and apt owns the binary.
  • Packages it with plain dpkg-deb, with no debian/ source tree:
    • /usr/bin/cook;
    • bash/zsh/fish completions, generated by the binary;
    • /usr/share/doc/cookcli/{copyright,README.md}. copyright uses the machine-readable format and includes the MIT text.
  • Depends: comes from dpkg-shlibdeps. With rustls and bundled SQLite that is libc6 (>= 2.34), libgcc-s1 (>= 4.2), so the renamed OpenSSL package on Ubuntu 24.04 / Debian 13 (libssl3t64) is not a concern.
  • DEB_REVISION sets the Debian revision and DEB_MAINTAINER the maintainer. Maintainers may want to set DEB_MAINTAINER: the repo has no contact email, so the default is the issue tracker URL.

Build environment. CI builds in ubuntu:22.04, whose glibc 2.35 is the oldest among the targets. One package per architecture then covers Ubuntu 22.04+ and Debian 12+. Rust comes from rustup, because the distributions' own rustc is too old; dpkg-deb, unlike rpmbuild, does not check build dependencies.

deb.yaml (on demand, and on packaging/debian/** changes):

  • Builds amd64 and arm64.
  • Installs each package on debian:bookworm, debian:trixie, ubuntu:22.04 and ubuntu:24.04, then runs cook --version, checks the three completion files, and checks that cook update is absent.

release.yaml:

  • A new deb_build job, continue-on-error like the other package builds.
  • Artifacts are named cook-deb-{amd64,arm64}, so upload_artifacts checksums the cookcli_<version>-1_<arch>.deb files and attaches them.
  • The missing-artifact check now expects both.

Docs. A "Debian / Ubuntu" section in the README, and packaging/debian/README.md.

Testing

  • I built locally in ubuntu:22.04 exactly as the workflow does. The result: cookcli_0.37.0-1_amd64.deb, 8.7 MB, root-owned files.
  • It installs with apt and runs on Debian 12, Debian 13, Ubuntu 22.04 and Ubuntu 24.04: cookcli 0.37.0 - in food we trust, completions 3/3, cook update absent.
  • arm64 was not built locally; this PR's own Deb check builds and install-tests it.
  • actionlint and zizmor report nothing; shellcheck is clean on build-deb.sh.
  • The release completeness check, run against fake artifact trees, reports the .deb artifacts correctly.

🤖 Generated with Claude Code

myst and others added 2 commits September 28, 2026 23:02
Releases shipped RPMs but nothing for Debian or Ubuntu.

- packaging/debian/build-deb.sh builds the release binary without
  self-update (apt owns it, as dnf does for the RPM), with the same
  features as the RPM, and packages it with dpkg-deb: the binary,
  bash/zsh/fish completions it generates, the copyright file and the
  README. dpkg-shlibdeps fills Depends: — with rustls and bundled
  SQLite, only libc6 (>= 2.34) and libgcc-s1.
- Built in ubuntu:22.04, the oldest glibc among the targets, so one
  package per architecture installs on Ubuntu 22.04+ and Debian 12+.
- deb.yaml builds amd64 and arm64 on demand and on packaging changes,
  then installs and runs each package on Debian 12, Debian 13, Ubuntu
  22.04 and Ubuntu 24.04.
- The release workflow's deb_build job attaches the packages to each
  release, and the completeness check expects them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
In a `container:` job, `run:` steps default to `sh`, which is dash on
Debian and Ubuntu and stops at `set -o pipefail` ("Illegal option"), so
both .deb builds failed before building anything. The Fedora jobs never
hit this: their `sh` is bash.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@LeMyst
LeMyst marked this pull request as ready for review September 28, 2026 21:54
@LeMyst
LeMyst merged commit 7932282 into cooklang:main Sep 28, 2026
20 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.

Ship .deb packages for Debian and Ubuntu with each release

1 participant