mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 12:37:00 +01:00
Ubuntu/Debian buildy scripty tweaky things (#2928)
* updating container builder * tweaking dependency script * closes #2749 - updates the book for install
This commit is contained in:
parent
01deb706fa
commit
38b0a6f8af
|
@ -12,9 +12,11 @@ Kanidm currently is packaged for the following systems:
|
||||||
- OpenSUSE Leap 15.4/15.5/15.6
|
- OpenSUSE Leap 15.4/15.5/15.6
|
||||||
- MacOS
|
- MacOS
|
||||||
- Arch Linux
|
- Arch Linux
|
||||||
- NixOS
|
|
||||||
- Fedora 38
|
|
||||||
- CentOS Stream 9
|
- CentOS Stream 9
|
||||||
|
- Debian
|
||||||
|
- Fedora 38
|
||||||
|
- NixOS
|
||||||
|
- Ubuntu
|
||||||
|
|
||||||
The `kanidm` client has been built and tested from Windows, but is not (yet) packaged routinely.
|
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)
|
[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
|
### Fedora / Centos Stream
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
|
@ -84,6 +82,14 @@ You can then install with:
|
||||||
dnf install kanidm-clients
|
dnf install kanidm-clients
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### NixOS
|
||||||
|
|
||||||
|
[Kanidm in NixOS](https://search.nixos.org/packages?sort=relevance&type=packages&query=kanidm)
|
||||||
|
|
||||||
|
### Ubuntu and Debian
|
||||||
|
|
||||||
|
See <https://kanidm.github.io/kanidm_ppa/> for nightly-built packages of the current development builds, and how to install them.
|
||||||
|
|
||||||
## Tools Container
|
## Tools Container
|
||||||
|
|
||||||
In some cases if your distribution does not have native kanidm-client support, and you can't access
|
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 pull kanidm/tools:latest
|
||||||
docker run --rm -i -t \
|
docker run --rm -i -t \
|
||||||
--network host \
|
--network host \
|
||||||
-v /etc/kanidm/config:/etc/kanidm/config:ro \
|
--mount "type=bind,src=/etc/kanidm/config,target=/etc/kanidm/config" \
|
||||||
-v ~/.config/kanidm:/home/kanidm/.config/kanidm:ro \
|
--mount "type=bind,src=$HOME/.config/kanidm,target=/home/kanidm/.config/kanidm" \
|
||||||
-v ~/.cache/kanidm_tokens:/home/kanidm/.cache/kanidm_tokens \
|
--mount "type=bind,src=$HOME/.cache/kanidm_tokens,target=/home/kanidm/.cache/kanidm_tokens" \
|
||||||
kanidm/tools:latest \
|
kanidm/tools:latest \
|
||||||
/sbin/kanidm --help
|
/sbin/kanidm --help
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
#!/bin/bash
|
#!/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!
|
# Install dependencies, for example make!
|
||||||
scripts/install_ubuntu_dependencies.sh
|
scripts/install_ubuntu_dependencies.sh
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
# Starts a ubuntu docker container with the source code mounted
|
# 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
|
if [ "$(basename "$(pwd)")" != "kanidm" ]; then
|
||||||
echo "Please run this from the root dir of the repo"
|
echo "Please run this from the root dir of the repo"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -9,10 +13,14 @@ fi
|
||||||
|
|
||||||
echo "Starting base ubuntu container"
|
echo "Starting base ubuntu container"
|
||||||
echo "Repository is in ~/kanidm/"
|
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 "INSTALL_RUST=1" \
|
||||||
-e "PACKAGING=1" \
|
-e "PACKAGING=1" \
|
||||||
|
-e "TZ=UTC" \
|
||||||
-v "$(pwd):/root/kanidm/" \
|
-v "$(pwd):/root/kanidm/" \
|
||||||
--workdir "/root/kanidm/" \
|
--workdir "/root/kanidm/" \
|
||||||
--entrypoint "/root/kanidm/platform/debian/interactive_entrypoint.sh" \
|
--entrypoint "/root/kanidm/platform/debian/interactive_entrypoint.sh" \
|
||||||
ubuntu:latest "$@"
|
"${KANIDM_CONTAINER}" $@
|
||||||
|
|
|
@ -32,9 +32,6 @@ if [ "${PACKAGING}" -eq 1 ]; then
|
||||||
fakeroot \
|
fakeroot \
|
||||||
dh-make \
|
dh-make \
|
||||||
debmake
|
debmake
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${PACKAGING}" -eq 1 ]; then
|
|
||||||
export INSTALL_RUST=1
|
export INSTALL_RUST=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -46,6 +43,10 @@ if [ -z "$(which cargo)" ]; then
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
#shellcheck disable=SC1091
|
#shellcheck disable=SC1091
|
||||||
source "$HOME/.cargo/env"
|
source "$HOME/.cargo/env"
|
||||||
|
else
|
||||||
|
echo "#############################################################"
|
||||||
|
echo "Couldn't find rust and you didn't say to install it..."
|
||||||
|
echo "#############################################################"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue