From ddf15e7d2dda57f747afc738123536d765fd76be Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Sun, 5 Jan 2025 16:27:51 +0100 Subject: [PATCH] Add documentation for distro packaging --- README.md | 5 +++++ doc/DISTRO_PACKAGING.md | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 doc/DISTRO_PACKAGING.md diff --git a/README.md b/README.md index a602af5..cde57c1 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,11 @@ The main design goals of letmein are: For more information about security and reporting vulnerabilities, please see the [security documentation](SECURITY.md) of letmein. + +# Distribution packaging + +If you want to package the software for distribution, please see the [distribution packaging hints](doc/DISTRO_PACKAGING.md). + # License Copyright (c) 2024-2025 Michael Büsch diff --git a/doc/DISTRO_PACKAGING.md b/doc/DISTRO_PACKAGING.md new file mode 100644 index 0000000..80deaa6 --- /dev/null +++ b/doc/DISTRO_PACKAGING.md @@ -0,0 +1,13 @@ +# Recommendations for distribution packaging + +If you want to package the software for distribution, a few adjustments/patches are recommended: + +- If you install default configuration files, you might want to adjust `[NFTABLES] exe = ...` to the absolute path of your `nft` binary. See [the configuration documentation](CONFIGURATION.md#exe) for more details. + +- You probably want to install the systemd units under `/lib/systemd/system/` or similar, instead of `/etc`. + +- The build environment variable `LETMEIN_CONF_PREFIX` sets the prefix for the configuration files. + In a plain `cargo build` this will default to `/` meaning that `/etc/letmein{,d}.conf` will be the place for the configuration files. + If you use the `build.sh` script, the prefix will be set to `/opt/letmein` instead + +- Adjust the install prefix from `/opt` to something else that makes more sense for your distribution.