diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-08-03 15:33:40 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-08-03 17:03:05 +0200 |
commit | 0f4259bcf273a03c42aeaa2f71fd5c61e2edc0ce (patch) | |
tree | 17eee7642e7eb623c77aea07e878510f0dddfaab | |
parent | Merge pull request #28632 from DaanDeMeyer/repart-synthesize (diff) | |
download | systemd-0f4259bcf273a03c42aeaa2f71fd5c61e2edc0ce.tar.xz systemd-0f4259bcf273a03c42aeaa2f71fd5c61e2edc0ce.zip |
mkosi: Update to latest
We modify all our scripts to execute in the image instead of on the
hosts. In the future we can adapt them to run on the host.
-rw-r--r-- | .github/workflows/mkosi.yml | 2 | ||||
-rwxr-xr-x | mkosi.presets/00-base/mkosi.build | 4 | ||||
-rwxr-xr-x | mkosi.presets/10-initrd/mkosi.postinst | 4 | ||||
-rwxr-xr-x | mkosi.presets/20-final/mkosi.kernel.build | 4 | ||||
-rwxr-xr-x | mkosi.presets/20-final/mkosi.postinst | 4 |
5 files changed, 17 insertions, 1 deletions
diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml index 13da4e4073..2d0c9de742 100644 --- a/.github/workflows/mkosi.yml +++ b/.github/workflows/mkosi.yml @@ -76,7 +76,7 @@ jobs: steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - - uses: systemd/mkosi@c6dd95b6eae0386579071cbf44fd838ce28b7237 + - uses: systemd/mkosi@1c09cb53e5f3fdb35919d525e8c3e6132344ae98 - name: Configure run: | diff --git a/mkosi.presets/00-base/mkosi.build b/mkosi.presets/00-base/mkosi.build index da2b600fae..f3de7bc6f5 100755 --- a/mkosi.presets/00-base/mkosi.build +++ b/mkosi.presets/00-base/mkosi.build @@ -5,6 +5,10 @@ set -e # This is a build script for OS image generation using mkosi (https://github.com/systemd/mkosi). # Simply invoke "mkosi" in the project directory to build an OS image. +if [ "${container:-}" != "mkosi" ]; then + exec mkosi-chroot "$SCRIPT" "$@" +fi + # If mkosi.builddir/ exists mkosi will set $BUILDDIR to it, let's then use it # as out-of-tree build dir. Otherwise, let's make up our own builddir. [ -z "$BUILDDIR" ] && BUILDDIR="$PWD"/build diff --git a/mkosi.presets/10-initrd/mkosi.postinst b/mkosi.presets/10-initrd/mkosi.postinst index 79cce30022..6782ddd5fa 100755 --- a/mkosi.presets/10-initrd/mkosi.postinst +++ b/mkosi.presets/10-initrd/mkosi.postinst @@ -2,6 +2,10 @@ # SPDX-License-Identifier: LGPL-2.1-or-later set -e +if [ "${container:-}" != "mkosi" ]; then + exec mkosi-chroot "$SCRIPT" "$@" +fi + # OpenSUSE insists on blacklisting erofs by default because its supposedly a legacy filesystem. # See https://github.com/openSUSE/suse-module-tools/pull/71 rm -f /usr/lib/modprobe.d/60-blacklist_fs-erofs.conf diff --git a/mkosi.presets/20-final/mkosi.kernel.build b/mkosi.presets/20-final/mkosi.kernel.build index c99d365d8b..64cc48863f 100755 --- a/mkosi.presets/20-final/mkosi.kernel.build +++ b/mkosi.presets/20-final/mkosi.kernel.build @@ -2,6 +2,10 @@ # SPDX-License-Identifier: LGPL-2.1-or-later set -e +if [ "${container:-}" != "mkosi" ]; then + exec mkosi-chroot "$SCRIPT" "$@" +fi + if [ -d "$SRCDIR"/mkosi.kernel/ ]; then SRCDIR="$SRCDIR/mkosi.kernel" BUILDDIR="$BUILDDIR/mkosi.kernel" diff --git a/mkosi.presets/20-final/mkosi.postinst b/mkosi.presets/20-final/mkosi.postinst index b9a26c3163..2fd4536137 100755 --- a/mkosi.presets/20-final/mkosi.postinst +++ b/mkosi.presets/20-final/mkosi.postinst @@ -6,6 +6,10 @@ if [ "$1" = "build" ]; then exit 0 fi +if [ "${container:-}" != "mkosi" ]; then + exec mkosi-chroot "$SCRIPT" "$@" +fi + if [ -n "$SANITIZERS" ]; then LD_PRELOAD=$(ldd /usr/lib/systemd/systemd | grep libasan.so | awk '{print $3}') |