- Shell 100%
| .forgejo/workflows | ||
| bin | ||
| etc | ||
| template | ||
| README.md | ||
deb/ci: the gate and the tools of the git.pop.coop/deb packages
Every repository in git.pop.coop/deb is one Debian source package in the
Debian Python Team layout (git-buildpackage: debian/master or
debian/<suite>, upstream, pristine-tar). This repository holds what they
share.
| Path | What it is |
|---|---|
bin/deb-ci |
the CI gate: source package from the committed HEAD and the pristine-tar tarball, sbuild in the clean chroot tarball, lintian (errors and warnings fail), autopkgtest against trixie when the package declares tests, and a second build whose .deb files must be byte-identical |
bin/deb-ci-chroot |
creates or refreshes the chroot tarball ~/.cache/sbuild/trixie-amd64.tar.zst (trixie, trixie-updates, trixie-security, main) without root |
bin/deb-import-pypi |
imports an upstream sdist from PyPI into the upstream and pristine-tar branches after checking it against the sha256 PyPI publishes |
etc/sbuild.conf |
the sbuild settings deb-ci relies on, read after the runner's own configuration so they always win |
template/ |
files every package repository starts with: the Forgejo workflow, debian/gbp.conf, debian/salsa-ci.yml, debian/source/ |
No Docker anywhere: sbuild and autopkgtest run in unshare mode, as an
ordinary user, on the runner keel-deb-runner (label keel-deb).
Running the gate by hand
On a Debian 13 machine with sbuild mmdebstrap uidmap lintian autopkgtest git-buildpackage pristine-tar devscripts zstd python3-packaging and a subordinate uid range
for the user:
bin/deb-ci-chroot
bin/deb-ci /path/to/python-foo
Exit codes of deb-ci: 0 pass; 1 unexpected error; 2 usage or environment
(no chroot tarball, unreadable configuration); 3 source package; 4 build,
lintian or autopkgtest; 5 the rebuild differs.
What the gate does and does not prove
- The chroot is the tarball, never a substitute. sbuild's default is to
ignore a tarball older than 7 days and bootstrap a new chroot from the
changelog's distribution, which is
unstable: builds would silently move to sid.etc/sbuild.confswitches that off anddeb-cinames the tarball by absolute path. Refreshing it isdeb-ci-chroot's job, run weekly on the runner;deb-ciprints the tarball's age on every run. - The autopkgtest release is fixed to trixie. The changelog says
unstable, which is what Salsa expects, and sbuild's%rwould pass that on.DEB_CI_RELEASEchanges it for every step at once. - The verdicts are read from the build log. Lintian must report
passorinfo; a skipped or uninstallable lintian fails the gate. When the package hasdebian/tests/controlor aTestsuitefield, autopkgtest must reportpass, orno testswhen only superficial tests ran (such as the import test ofautopkgtest-pkg-python), and its per-test lines must show at least onePASSand nothing skipped, flaky or failed. The unshare backend cannot run tests that needisolation-containerorisolation-machine, so those count as skipped. - The identical rebuild catches nondeterminism, not every reproducibility bug. Both builds use the same chroot, build path, locale and timezone; only the time differs. Varying the environment (reprotest) is future work.
- Only committed content is built.
deb-cibuilds HEAD in a private clone, where upstream.gitattributes(export-subst, eol, filters) cannot change a byte of the upstream files.
Importing a new upstream version
The CI of a pull request sees only the base repository's upstream and
pristine-tar branches. Import the new version with deb-import-pypi, push
upstream, pristine-tar and the upstream/<version> tag to the base
repository first (they carry the verified tarball, not packaging), then open
the pull request for the debian/* branch.
Versions
- Not in Debian:
<upstream>-0+keel1. It sorts below-1, so a later Debian upload replaces it, and it carries the+keelNsuffix that the Keel archive tooling requires. - Backport of a package in sid:
<sid version>~bpo13+keel1, with the changelog distributiontrixie(the Keel archive's codename, not Debian'strixie-backports). - Package names are Debian's, never Keel's.
Security of the runner
The runner executes jobs directly on its host, as the user keel-deb-runner,
and a pull request's workflow file comes from the pull request itself. Anyone
whose pull request runs can therefore run commands as that user: read the
runner's registration and replace the chroot tarball that later builds use.
Until jobs from untrusted pull requests need an approval, or run on a
throwaway machine, only members of the organization should open pull requests
whose CI runs. The package repositories pin nothing of this repository yet:
their workflow clones deb/ci main, so a change here reaches every package
at once, and goes through the same review.