diff --git a/book/src/installing_client_tools.md b/book/src/installing_client_tools.md index fb84d6301..d086079ab 100644 --- a/book/src/installing_client_tools.md +++ b/book/src/installing_client_tools.md @@ -12,9 +12,11 @@ Kanidm currently is packaged for the following systems: - OpenSUSE Leap 15.4/15.5/15.6 - MacOS - Arch Linux -- NixOS -- Fedora 38 - CentOS Stream 9 +- Debian +- Fedora 38 +- NixOS +- Ubuntu The `kanidm` client has been built and tested from Windows, but is not (yet) packaged routinely. @@ -56,10 +58,6 @@ brew install kanidm [Kanidm on AUR](https://aur.archlinux.org/packages?O=0&K=kanidm) -### NixOS - -[Kanidm in NixOS](https://search.nixos.org/packages?sort=relevance&type=packages&query=kanidm) - ### Fedora / Centos Stream > [!NOTE] @@ -84,6 +82,14 @@ You can then install with: dnf install kanidm-clients ``` +### NixOS + +[Kanidm in NixOS](https://search.nixos.org/packages?sort=relevance&type=packages&query=kanidm) + +### Ubuntu and Debian + +See for nightly-built packages of the current development builds, and how to install them. + ## Tools Container In some cases if your distribution does not have native kanidm-client support, and you can't access @@ -97,9 +103,9 @@ chmod 666 ~/.cache/kanidm_tokens docker pull kanidm/tools:latest docker run --rm -i -t \ --network host \ - -v /etc/kanidm/config:/etc/kanidm/config:ro \ - -v ~/.config/kanidm:/home/kanidm/.config/kanidm:ro \ - -v ~/.cache/kanidm_tokens:/home/kanidm/.cache/kanidm_tokens \ + --mount "type=bind,src=/etc/kanidm/config,target=/etc/kanidm/config" \ + --mount "type=bind,src=$HOME/.config/kanidm,target=/home/kanidm/.config/kanidm" \ + --mount "type=bind,src=$HOME/.cache/kanidm_tokens,target=/home/kanidm/.cache/kanidm_tokens" \ kanidm/tools:latest \ /sbin/kanidm --help ``` diff --git a/platform/debian/interactive_entrypoint.sh b/platform/debian/interactive_entrypoint.sh index 434e5ee81..595b9f643 100755 --- a/platform/debian/interactive_entrypoint.sh +++ b/platform/debian/interactive_entrypoint.sh @@ -1,5 +1,11 @@ #!/bin/bash +if [ -z "${TZ}" ]; then + export TZ="UTC" +fi + +ln -snf "/usr/share/zoneinfo/$TZ" "/etc/localtime" && echo "$TZ" > /etc/timezone + # Install dependencies, for example make! scripts/install_ubuntu_dependencies.sh diff --git a/platform/debian/ubuntu_docker_builder.sh b/platform/debian/ubuntu_docker_builder.sh index ee13c94c5..5a9876285 100755 --- a/platform/debian/ubuntu_docker_builder.sh +++ b/platform/debian/ubuntu_docker_builder.sh @@ -2,6 +2,10 @@ # Starts a ubuntu docker container with the source code mounted +if [ -z "${KANIDM_CONTAINER}" ]; then + KANIDM_CONTAINER="ubuntu:latest" +fi + if [ "$(basename "$(pwd)")" != "kanidm" ]; then echo "Please run this from the root dir of the repo" exit 1 @@ -9,10 +13,14 @@ fi echo "Starting base ubuntu container" echo "Repository is in ~/kanidm/" -docker run --rm -it \ + +# shellcheck disable=SC2068 +# shellcheck disable=SC2086 +docker run --rm -it $KANIDM_BUILDER_OPTIONS \ -e "INSTALL_RUST=1" \ -e "PACKAGING=1" \ + -e "TZ=UTC" \ -v "$(pwd):/root/kanidm/" \ --workdir "/root/kanidm/" \ --entrypoint "/root/kanidm/platform/debian/interactive_entrypoint.sh" \ - ubuntu:latest "$@" + "${KANIDM_CONTAINER}" $@ diff --git a/scripts/install_ubuntu_dependencies.sh b/scripts/install_ubuntu_dependencies.sh index 71aa95192..5cb8f72c3 100755 --- a/scripts/install_ubuntu_dependencies.sh +++ b/scripts/install_ubuntu_dependencies.sh @@ -32,9 +32,6 @@ if [ "${PACKAGING}" -eq 1 ]; then fakeroot \ dh-make \ debmake -fi - -if [ "${PACKAGING}" -eq 1 ]; then export INSTALL_RUST=1 fi @@ -46,6 +43,10 @@ if [ -z "$(which cargo)" ]; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y #shellcheck disable=SC1091 source "$HOME/.cargo/env" + else + echo "#############################################################" + echo "Couldn't find rust and you didn't say to install it..." + echo "#############################################################" fi fi