This repo holds packaging automation that builds debs from kanidm/kanidm and feeds them into kanidm/kanidm_ppa.
- Changes in how packages are defined and what they depend on live in
kanidm/kanidm. This includes run-time dependencies. - Changes in build-time dependencies and signing need to be addressed in this repository.
- Changes in dev instructions & user facing repo instructions need go into the book that lives in
kanidm/kanidm. - Changes in the public signing key need to be addressed in both
kanidm/kanidm_ppa& this repo.
For instructions how to use this repo for manual builds, see the book at: https://kanidm.github.io/kanidm/stable/packaging/debian_ubuntu_packaging.html
For the user facing (less detailed) guidance, see: https://kanidm.github.io/kanidm_ppa/.
The intent is to always have available the latest patch releases of the two latest minor
releases. In practice this means that if 1.10.3 is the latest release,
we carry 1.10.3 & 1.9.4, but not 1.8.6. This is slightly more lenient than the upstream
Kanidm support policy which defines a time-limit for the previous minor release. However,
temporarily we may drop a known-vulnerable version from distribution if a patched version is
not available due to the stricter support policy.
To avoid surprises, stay with the latest Kanidm release. The old one is there to give you more runway to upgrade and an opportunity to downgrade if facing issues, not to stay on old releases.
We provide the following packages:
kanidm: The cli client.kanidm-unixd: The unix integration daemon.libpam-kanidm: Support library for integration ofkanidm-unixdwith PAM.libnss-kanidm: Support library for integration ofkanidm-unixdwith NSS.kanidmd: The main Kanidm server daemon.
While kanidmd is provided as a package, it is recommended to instead use a container based deployment.
For details see: https://kanidm.github.io/kanidm/stable/preparing_for_your_deployment.html
We package for Debian & Ubuntu. Packages for one or the other are likely to also be compatible with their derivatives but this is not supported or tested for.
The overarching goal is to have enough coverage to support those who upgrade their OS "within a reasonable timeframe" while keeping our build matrix size stable and small enough so that release builds do not take more than an hour on average and that the built repo stays under the artifact size limits.
For both the intent is to support their latest two stable releases, and one interim release if available. We do not align to distribution release or end of life dates, but whenever a new release of Kanidm is cut, the support matrix is updated to reflect this policy. We do not provide a crossover period where both the latest stable and previous oldest stable are available at the same time, as you always have an oldstable available. With interim releases you're already living dangerously and expected to move to the next rapidly. The new interim release may work with the cronological previous release, but there are no guarantees.
stable&oldstableare supported.- We do not support
unstable,testingorlts. - At time of writing this means
trixie&bookwormare supported whilebullseyeis not. - For definitions, see: https://www.debian.org/releases
- The two latest LTS releases, and the latest interim release are supported.
- The Ubuntu release schedule always has three LTS releases supported, but we do not include the third.
- At time of writing this means
resolute,nobleandquestingare supported, whilejammyis not. - For definitions, see: https://releases.ubuntu.com/
To cut a new release after upstream does, perform the following steps:
-
Modify
.github/workflows/create-apt-repo.yml:- Update the matrix category map to bump versions, prefer a tag
ref. If a newminorversion has been released, remove the oldest one so only two are always present. - Check the matrix os map for any distros where a new stable or interim may have been released and perform changes as per the distro support policy above. See Modifying distro support for necessary steps.
- Update the matrix category map to bump versions, prefer a tag
-
Create a PR:
- Commit your changes into a new branch and push to your fork.
On GitHub, open a new PR in
Draftstate against the main repo. - Get a project contributor to check your PR and run GitHub Actions
for your PR. In the meanwhile you can run them in your fork by either
merging to the
mainbranch or dispatching the workflow manually. - The workflow fanout is large and some steps can fail due to network issues. GitHub Actions allows retrying failing steps from the workflow overview which is significantly faster than a full re-run. This may also happen with the final build after merge and needs watching out for.
- Commit your changes into a new branch and push to your fork.
On GitHub, open a new PR in
-
Run conformance testing:
- Once GitHub Actions has successfully run through the workflow,
open the summary of the workflow run and at the very bottom
in the artifacts section you will find a download link for
kanidm_ppa_snapshot.zip. Download the archive and place it into your working copy astesting/kanidm_ppa_snapshot.zip - Follow the testing guidance to run through all permutations: Testing procedure. Using the "easy way" guidance with the help of Mise is highly encouraged for the sake of consistency, it's easy to otherwise miss a portion of testing. Please note that you need to repeat the test suite on both x86_64 and arm64. Using real non-emulated hardware is highly encouraged for performance reasons. A native hardware run can easily take 40 minutes, but emulated you'll be at it for hours.
- Once GitHub Actions has successfully run through the workflow,
open the summary of the workflow run and at the very bottom
in the artifacts section you will find a download link for
-
Troubleshoot any issues identified during testing, or declare victory:
- If any trouble was found, update your PR with details. Issues are usually either across all tests of a version, or isolated to a newer generation of distros.
- Once all tests pass, mark the PR ready for review.
-
Once published, install the updated packages on a real system.
- You still have a bit of time to quickly fix your mistake if something wasn't caught in testing.
- Probably a good idea to be vocal about any late found issues in the Kanidm community channel, see: Kanidm Community.
-
In
.github/workflows/create-apt-repo.yml:- Modify the matrix os map for any new distro versions and subsequent drops. In
practice this means any of:
- Swap in a new
stable, dropoldstableand demote previousstabletooldstable. - Switch out an
interimfor the latest available interim release.
- Swap in a new
- Update the PPA csv data under the
Create Aptly repostep to match.
- Modify the matrix os map for any new distro versions and subsequent drops. In
practice this means any of:
-
Update the testing harness:
- Modify
testing/lib/targets.shto remove old distro cloud image references and add new ones. - Modify
testing/scripts/run-all.shto update the test sets. Check the lines starting withtargets=. There are three sets to potentially modify for stable, oldstable & interim. Order matters.
- Modify
We rely on a handful of external "non-official" Github Actions for the release CI. They may occasionally require updates, but due to the general state of supply chain security we want to be deliberate about updates. To facilitate this the repo contains a still overly simple updatecli config which allows locally bumping versions and tying them to current latest release hashes. Any bumping should be accompanied by a cursory review of what's changed, but that may at times be quite hard due to the use of js minification. Do your best.
Example dependency update invocation:
GITHUB_TOKEN="$(gh auth token)" updatecli pipeline apply- The changes will be done in your currently checked out copy which allows local diffing & manual commit.
- Ignore the warnings caused by the matrix sharding, ideally these would somehow be skipped or silenced since it's a false positive due to our use of vanilla images.