From cc36fe7228317e2afefc7148c7c8e831511bb7f5 Mon Sep 17 00:00:00 2001 From: alexvonme <163657928+alexvonme@users.noreply.github.com> Date: Sat, 23 Mar 2024 23:54:52 +0100 Subject: [PATCH] fix(docs): packaging section improved (#2677) * fix(docs): packaging section improved * Update ppa_packages.md --- book/src/SUMMARY.md | 7 +++- book/src/packaging/community_packages.md | 8 ++++ .../debian_ubuntu_packaging.md | 0 .../{developers => packaging}/packaging.md | 8 +--- book/src/packaging/ppa_packages.md | 40 +++++++++++++++++++ 5 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 book/src/packaging/community_packages.md rename book/src/{developers => packaging}/debian_ubuntu_packaging.md (100%) rename book/src/{developers => packaging}/packaging.md (53%) create mode 100644 book/src/packaging/ppa_packages.md diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index d4dca6f43..5aa500908 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -86,5 +86,8 @@ - [Python Module](developers/python_module.md) - [RADIUS Module Development](developers/radius.md) - [Release Checklist](developers/release_checklist.md) -- [Packaging](developers/packaging.md) - - [Debian/Ubuntu](developers/debian_ubuntu_packaging.md) +- [Packaging](packaging/packaging.md) + - [Debian/Ubuntu Packaging](packaging/debian_ubuntu_packaging.md) + - [PPA Packages](packaging/ppa_packages.md) + - [Community Packages](packaging/community_packages.md) + diff --git a/book/src/packaging/community_packages.md b/book/src/packaging/community_packages.md new file mode 100644 index 000000000..6d2aa987b --- /dev/null +++ b/book/src/packaging/community_packages.md @@ -0,0 +1,8 @@ +# Community Packages + +There are several community maintained packages that you may use in your system. However, they are not officially supported and may not function identically. + + +- [Arch Linux](https://aur.archlinux.org/packages?O=0&K=kanidm) +- [OpenSUSE](https://software.opensuse.org/search?baseproject=ALL&q=kanidm) +- [NixOS](https://search.nixos.org/packages?sort=relevance&type=packages&query=kanidm) \ No newline at end of file diff --git a/book/src/developers/debian_ubuntu_packaging.md b/book/src/packaging/debian_ubuntu_packaging.md similarity index 100% rename from book/src/developers/debian_ubuntu_packaging.md rename to book/src/packaging/debian_ubuntu_packaging.md diff --git a/book/src/developers/packaging.md b/book/src/packaging/packaging.md similarity index 53% rename from book/src/developers/packaging.md rename to book/src/packaging/packaging.md index 6acd76904..5478b0276 100644 --- a/book/src/developers/packaging.md +++ b/book/src/packaging/packaging.md @@ -1,10 +1,6 @@ # Packaging -Packages are known to exist for the following distributions: - -- [Arch Linux](https://aur.archlinux.org/packages?O=0&K=kanidm) -- [OpenSUSE](https://software.opensuse.org/search?baseproject=ALL&q=kanidm) -- [NixOS](https://search.nixos.org/packages?sort=relevance&type=packages&query=kanidm) +This chapter presents the alternative packages and how to build your own. To ease packaging for your distribution, the `Makefile` has targets for sets of binary outputs. @@ -13,4 +9,4 @@ To ease packaging for your distribution, the `Makefile` has targets for sets of | `release/kanidm` | Kanidm's CLI | | `release/kanidmd` | The server daemon | | `release/kanidm-ssh` | SSH-related utilities | -| `release/kanidm-unixd` | UNIX tools, PAM/NSS modules | +| `release/kanidm-unixd` | UNIX tools, PAM/NSS modules | \ No newline at end of file diff --git a/book/src/packaging/ppa_packages.md b/book/src/packaging/ppa_packages.md new file mode 100644 index 000000000..e80b0fe76 --- /dev/null +++ b/book/src/packaging/ppa_packages.md @@ -0,0 +1,40 @@ +# PPA Packages + +This pulls the packages from the Kanidm [debs releases](https://github.com/kanidm/kanidm/releases/tag/debs) and makes a package archive for “nightly” packages. Packages are distributed for the latest LTS versions, Ubuntu 22.04 & Debian 12. + +Please note that while the commands below should also work on other Ubuntu-based distributions, we cannot ensure their compatibility with PPA. Pop OS for example, would require an altered setup in line with their [instructions](https://support.system76.com/articles/ppa-third-party/). + +## Adding it to your system + +Set pipefail so that failures are caught. +```bash +set -o pipefail +``` +Make sure you have a “trusted GPG” directory. +```bash +sudo mkdir -p /etc/apt/trusted.gpg.d/ +``` +Download the Kanidm PPA GPG public key. +```bash +curl -s --compressed "https://kanidm.github.io/kanidm_ppa/KEY.gpg" \ + | gpg --dearmor \ + | sudo tee /etc/apt/trusted.gpg.d/kanidm_ppa.gpg >/dev/null +``` +Add the Kanidm PPA to your local APT configuration, with autodetection of Ubuntu vs. Debian. +```bash +sudo curl -s --compressed "https://kanidm.github.io/kanidm_ppa/kanidm_ppa.list" \ + | grep $( ( . /etc/os-release && echo $ID) ) \ + | sudo tee /etc/apt/sources.list.d/kanidm_ppa.list +``` +Update your local package cache. +```bash +sudo apt update +``` + +## Listing Packages + +Use `apt-cache` to list the packages available: + +```bash +apt-cache search kanidm +```