From de3fd449e61eb64215e1101daaacde8a882e99ef Mon Sep 17 00:00:00 2001 From: Miraty Date: Tue, 9 Apr 2024 17:31:14 +0200 Subject: [PATCH] =?UTF-8?q?mkosi=2020=20=E2=86=92=2022?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- mkosi.conf | 2 +- mkosi.finalize => mkosi.finalize.chroot | 5 ----- mkosi.images/sn-arch.conf | 3 +++ mkosi.images/sn-debian.conf | 3 +++ mkosi.postinst => mkosi.postinst.chroot | 5 ----- 6 files changed, 9 insertions(+), 13 deletions(-) rename mkosi.finalize => mkosi.finalize.chroot (79%) rename mkosi.postinst => mkosi.postinst.chroot (88%) diff --git a/README.md b/README.md index f1ef8d4..5939c6f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # ServNest system images generator -This is the sources to build system images of ServNest using mkosi 20. You can then use them with systemd-nspawn. +This is the sources to build system images of ServNest using mkosi 22. You can then use them with systemd-nspawn. This repository also contains configuration files and installation scripts inside `install` that may also be useful for the manual installation process, without mkosi. ## Usage -This generator allows to build images for both Arch Linux and Debian Testing, you can replace `` by either `sn-arch` or `sn-debian` in the following examples. Note that mkosi may require tools that are not available on your distribution. +This generator allows to build images for both Arch Linux and Debian, you can replace `` by either `sn-arch` or `sn-debian` in the following examples. Note that mkosi may require tools that are not available on your distribution. First: - Put the ServNest source code inside `mkosi.extra/srv/servnest/core/` diff --git a/mkosi.conf b/mkosi.conf index 69e3e31..e1b436d 100644 --- a/mkosi.conf +++ b/mkosi.conf @@ -7,8 +7,8 @@ OutputDirectory = /var/lib/machines Autologin = yes Hostname = servnest.test WithDocs = yes -WithNetwork = yes Packages = + iproute2 tor torsocks openssl diff --git a/mkosi.finalize b/mkosi.finalize.chroot similarity index 79% rename from mkosi.finalize rename to mkosi.finalize.chroot index 75e0edf..abf94c8 100755 --- a/mkosi.finalize +++ b/mkosi.finalize.chroot @@ -1,9 +1,4 @@ #!/usr/bin/bash - -if [ "$container" != "mkosi" ]; then - exec mkosi-chroot "$SCRIPT" "$@" -fi - set -euo pipefail source /etc/os-release diff --git a/mkosi.images/sn-arch.conf b/mkosi.images/sn-arch.conf index 4bb8c24..90bfe7b 100644 --- a/mkosi.images/sn-arch.conf +++ b/mkosi.images/sn-arch.conf @@ -1,3 +1,6 @@ +[Output] +ImageId = sn-arch + [Distribution] Distribution = arch diff --git a/mkosi.images/sn-debian.conf b/mkosi.images/sn-debian.conf index 5288811..b4d323a 100644 --- a/mkosi.images/sn-debian.conf +++ b/mkosi.images/sn-debian.conf @@ -1,3 +1,6 @@ +[Output] +ImageId = sn-debian + [Distribution] Distribution = debian Release = bookworm diff --git a/mkosi.postinst b/mkosi.postinst.chroot similarity index 88% rename from mkosi.postinst rename to mkosi.postinst.chroot index 7ef2c5e..3a0adce 100755 --- a/mkosi.postinst +++ b/mkosi.postinst.chroot @@ -1,9 +1,4 @@ #!/usr/bin/bash - -if [ "$container" != "mkosi" ]; then - exec mkosi-chroot "$SCRIPT" "$@" -fi - set -euo pipefail source /etc/os-release