]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Update to latest 27049/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 29 Mar 2023 08:42:23 +0000 (10:42 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 29 Mar 2023 11:27:19 +0000 (13:27 +0200)
- Drop Netdev= as it was removed in mkosi
- Always install python-psutil in the final image (required for networkd tests)
- Always Install python-pytest in the final image (required for ukify tests)
- Use the narrow glob for all centos python packages
- Drop the networkd mkosi config files (the default image can be used instead)
- Use ".conf" as the mkosi config file suffix everywhere
- Copy src/ to /root/src in the final image and set gdb substitute path in
  .gdbinit to make gdb work properly

15 files changed:
.github/workflows/mkosi.yml
.gitignore
docs/HACKING.md
docs/TESTING_WITH_SANITIZERS.md
mkosi.conf.d/10-systemd.conf
mkosi.conf.d/arch/10-arch.conf
mkosi.conf.d/centos/10-centos.conf
mkosi.conf.d/debian/10-debian.conf
mkosi.conf.d/fedora/10-fedora.conf
mkosi.conf.d/opensuse/10-opensuse.conf
mkosi.conf.d/ubuntu/10-ubuntu.conf
mkosi.extra/root/.gdbinit
test/mkosi.build.networkd-test [deleted file]
test/mkosi.default.networkd-test [deleted file]
test/mkosi.nspawn.networkd-test [deleted file]

index 90c3d0782819378ec6f6483d43b3a437169967e6..cec8a432d28d4e2a0e4777faed8ca3744e10e490 100644 (file)
@@ -1,7 +1,7 @@
 ---
 # vi: ts=2 sw=2 et:
 # SPDX-License-Identifier: LGPL-2.1-or-later
-# Simple boot tests that build and boot the mkosi images generated by the mkosi config files in mkosi.default.d/.
+# Simple boot tests that build and boot the mkosi images generated by the mkosi config files in mkosi.conf.d/.
 name: mkosi
 
 on:
@@ -73,11 +73,11 @@ jobs:
 
     steps:
     - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
-    - uses: systemd/mkosi@36638fb37e0ccbb97bbaa573d158dcea3a5f9bde
+    - uses: systemd/mkosi@af1fe54805c84bb09e80bb585399121946fec701
 
     - name: Configure
       run: |
-        tee mkosi.default <<- EOF
+        tee mkosi.conf <<- EOF
         [Distribution]
         Distribution=${{ matrix.distro }}
         Release=${{ matrix.release }}
index 844d67f0a1091ba81ed01161c074e49498d19cf9..1ad0675c4e0d0c1cad621135d8df14dc5bb0253e 100644 (file)
@@ -31,11 +31,10 @@ __pycache__/
 /.mkosi-*
 /mkosi.builddir/
 /mkosi.output/
-/mkosi.default
 /mkosi.installdir/
 /mkosi.secure-boot.*
 # Ignore any mkosi config files with "local" in the name
-/mkosi.default.d/**/*local*.conf
+/mkosi.conf.d/**/*local*.conf
 /tags
 .dir-locals-2.el
 .vscode/
index 265f17e0d59095b64e140ee9cfd329c7bf8aace1..d5c53734300145f31536fd07987708ea203053b6 100644 (file)
@@ -340,7 +340,7 @@ To debug systemd-boot in an IDE such as VSCode we can use a launch configuration
 If you're hacking on the kernel in tandem with systemd, you can clone a kernel repository in mkosi.kernel/ in
 the systemd repository, and mkosi will automatically build that kernel and install it into the final image.
 To prevent the distribution's kernel from being installed (which isn't necessary since we're building our
-own kernel), you can add the following snippets to mkosi.default.d/20-local.conf:
+own kernel), you can add the following snippets to mkosi.conf.d/20-local.conf:
 
 (This snippet is for Fedora, the list of packages will need to be changed for other distributions)
 
index ef98cf0121c63cc05619dd3700d294858fb1cdc5..67b6be46c284db10fd2e011a414b0cead037176d 100644 (file)
@@ -15,7 +15,7 @@ compiler you want to use and which part of the test suite you want to run.
 
 ## mkosi
 
-To build with sanitizers in mkosi, create a file 20-local.conf in mkosi.default.d/ and add the following
+To build with sanitizers in mkosi, create a file 20-local.conf in mkosi.conf.d/ and add the following
 contents:
 
 ```
index 0b364f49f299e9c54e73f42cffc5c8a4d801e65c..bbb3544f1f37d646e590b355de66e6ba0d944e3d 100644 (file)
@@ -13,6 +13,7 @@ OutputDirectory=mkosi.output
 [Content]
 BuildDirectory=mkosi.builddir
 Cache=mkosi.cache
+ExtraTrees=src:/root/src
 Packages=
         acl
         bash-completion
@@ -66,7 +67,6 @@ BuildPackages=
 
 [Host]
 Acl=yes
-Netdev=yes
 QemuMem=2G
 ExtraSearchPaths=build/
 KernelCommandLineExtra=systemd.crash_shell
index e1c75b3996f8d36d4a04d463ee0be3a10d9c4f00..30333cff3a967853c7ef89adbe970219906bf593 100644 (file)
@@ -3,7 +3,7 @@
 # Copyright © 2016 Zeal Jagannatha
 
 # This is a settings file for OS image generation using mkosi (https://github.com/systemd/mkosi).
-# Symlink this file to mkosi.default in the project root directory and invoke "mkosi" to build an OS image.
+# Symlink this file to mkosi.conf in the project root directory and invoke "mkosi" to build an OS image.
 
 [Distribution]
 Distribution=arch
@@ -31,6 +31,8 @@ Packages=
         polkit
         popt
         python-pefile
+        python-psutil
+        python-pytest
         quota-tools
         shadow
         tpm2-tss
@@ -47,4 +49,3 @@ BuildPackages=
         python-jinja
         python-lxml
         python-pyelftools
-        python-pytest
index 2532b35f51ed63379a23b30c5c9899522d400d12..ff26e3611fdedb86c2b418f4992e0206ce305bc6 100644 (file)
@@ -1,11 +1,11 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
 # This is a settings file for OS image generation using mkosi (https://github.com/systemd/mkosi).
-# Symlink this file to mkosi.default in the project root directory and invoke "mkosi" to build an OS image.
+# Symlink this file to mkosi.conf in the project root directory and invoke "mkosi" to build an OS image.
 
-# We use python3*dist() throughout this file because we need to make sure the python3.9dis() packages are
-# installed on CentOS Stream 8. mkosi doesn't support release specific configuration yet so we use the globs
-# to get the necessary packages on both CentOS Stream 8 and CentOS Stream 9.
+# We use python3[.][9]dist() throughout this file because we need to make sure the python3.9dis() packages
+# are installed on CentOS Stream 8. mkosi doesn't support release specific configuration yet so we use the
+# globs to get the necessary packages on both CentOS Stream 8 and CentOS Stream 9.
 
 [Distribution]
 Distribution=centos
@@ -47,6 +47,7 @@ Packages=
         procps-ng
         python3[.][9]dist(pefile)
         python3[.][9]dist(pluggy) # python39-pluggy is a pytest dependency that's not installed for some reason.
+        python3[.][9]dist(psutil)
         python3[.][9]dist(pytest)
         python39
         quota
@@ -101,7 +102,7 @@ BuildPackages=
         pkgconfig(tss2-rc)
         pkgconfig(valgrind)
         pkgconfig(xkbcommon)
-        python3*dist(docutils)
-        python3*dist(jinja2)
-        python3*dist(lxml)
-        python3*dist(pyelftools)
+        python3-docutils
+        python3[.][9]dist(jinja2)
+        python3[.][9]dist(lxml)
+        python3[.][9]dist(pyelftools)
index e9b5775a3733874afd724f398762eafdf52c4c5d..c3e582b8ecf93299e3c04d6e971e68d4c2fb7216 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
 # This is a settings file for OS image generation using mkosi (https://github.com/systemd/mkosi).
-# Symlink this file to mkosi.default in the project root directory and invoke "mkosi" to build an OS image.
+# Symlink this file to mkosi.conf in the project root directory and invoke "mkosi" to build an OS image.
 
 [Distribution]
 Distribution=debian
@@ -40,6 +40,8 @@ Packages=
         policykit-1
         procps
         python3-pefile
+        python3-psutil
+        python3-pytest
         quota
         xxd
 
@@ -92,5 +94,4 @@ BuildPackages=
         python3-jinja2
         python3-lxml
         python3-pyelftools
-        python3-pytest
         xsltproc
index b4c641cd67e6f4b210587004f660df18596bfb93..b263cce673834887a7ad7ca358896888bc36227f 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
 # This is a settings file for OS image generation using mkosi (https://github.com/systemd/mkosi).
-# Symlink this file to mkosi.default in the project root directory and invoke "mkosi" to build an OS image.
+# Symlink this file to mkosi.conf in the project root directory and invoke "mkosi" to build an OS image.
 
 [Distribution]
 Distribution=fedora
@@ -41,6 +41,8 @@ Packages=
         popt
         procps-ng
         python3dist(pefile)
+        python3dist(psutil)
+        python3dist(pytest)
         quota
         tpm2-tss
         vim-common
@@ -90,8 +92,7 @@ BuildPackages=
         pkgconfig(valgrind)
         pkgconfig(xencontrol)
         pkgconfig(xkbcommon)
-        python3dist(docutils)
+        python3-docutils
         python3dist(jinja2)
         python3dist(lxml)
         python3dist(pyelftools)
-        python3dist(pytest)
index ae0486850c896f9b49ee28f2b5bbe53831516cf7..1e03c79cff238f728df5f21320e9463c6598352a 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
 # This is a settings file for OS image generation using mkosi (https://github.com/systemd/mkosi).
-# Symlink this file to mkosi.default in the project root directory and invoke "mkosi" to build an OS image.
+# Symlink this file to mkosi.conf in the project root directory and invoke "mkosi" to build an OS image.
 
 [Distribution]
 Distribution=opensuse
@@ -39,6 +39,8 @@ Packages=
         libxkbcommon0
         pam
         python3-pefile
+        python3-psutil
+        python3-pytest
         shadow
         tpm2-0-tss
         vim
@@ -95,7 +97,6 @@ BuildPackages=
         python3-Jinja2
         python3-lxml
         python3-pyelftools
-        python3-pytest
         qrencode-devel
         shadow
         system-group-obsolete
index ffc1d54456239ef545cb12282fdb297bc398552b..51898475b0b56f5b9a45bd59d3a5bd3d17f64f1a 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
 # This is a settings file for OS image generation using mkosi (https://github.com/systemd/mkosi).
-# Symlink this file to mkosi.default in the project root directory and invoke "mkosi" to build an OS image.
+# Symlink this file to mkosi.conf in the project root directory and invoke "mkosi" to build an OS image.
 
 [Distribution]
 Distribution=ubuntu
@@ -42,6 +42,8 @@ Packages=
         policykit-1
         procps
         python3-pefile
+        python3-psutil
+        python3-pytest
         quota
         xxd
 
@@ -93,5 +95,4 @@ BuildPackages=
         python3-jinja2
         python3-lxml
         python3-pyelftools
-        python3-pytest
         xsltproc
index 522e1fecb658790af77fb9923e5073019e797aee..1a2163e3a54274525036357ab68a826ac24522d6 100644 (file)
@@ -1,2 +1,3 @@
 set debuginfod enabled off
 set build-id-verbose 0
+set substitute-path ../src /root/src
diff --git a/test/mkosi.build.networkd-test b/test/mkosi.build.networkd-test
deleted file mode 100755 (executable)
index 25c935e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: LGPL-2.1-or-later
-set -ex
-
-# First, source in the main build script
-. "$SRCDIR"/mkosi.build
-
-mkdir -p "$DESTDIR"/usr/local/bin
-cp "$SRCDIR"/test/networkd-test.py "$DESTDIR"/usr/local/bin/networkd-test.py
-
-mkdir -p "$DESTDIR"/etc/systemd/system
-cat >"$DESTDIR"/etc/systemd/system/networkd-test.service <<EOF
-[Unit]
-Description=networkd test service
-SuccessAction=exit
-FailureAction=exit
-
-[Service]
-ExecStart=/usr/local/bin/networkd-test.py
-EOF
-
-mkdir -p "$DESTDIR"/etc/systemd/system/multi-user.target.wants/
-ln -s ../networkd-test.service "$DESTDIR"/etc/systemd/system/multi-user.target.wants/
-
-systemctl --root="$DESTDIR" disable systemd-networkd.service
diff --git a/test/mkosi.default.networkd-test b/test/mkosi.default.networkd-test
deleted file mode 100644 (file)
index fe15f39..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-#
-# Puts together an nspawn container and runs networkd-test.py in it, inside a
-# network namespace and everything. Run this with
-#
-#   mkosi -C test --default=mkosi.default.networkd-test boot
-#
-# This will start the test and eventually exit with success in case the test
-# succeeded.
-
-[Distribution]
-Distribution=fedora
-Release=33
-
-[Output]
-Format=raw_btrfs
-Bootable=yes
-OutputDirectory=../mkosi.output
-Output=networkd-test.raw
-
-[Partitions]
-RootSize=3G
-
-[Content]
-BuildPackages=
-        audit-libs-devel
-        bzip2-devel
-        cryptsetup-devel
-        dbus-devel
-        diffutils
-        docbook-style-xsl
-        elfutils-devel
-        gcc
-        gettext
-        git
-        gnutls-devel
-        gperf
-        hostname
-        iptables-devel
-        kmod-devel
-        libacl-devel
-        libblkid-devel
-        libcap-devel
-        libcurl-devel
-        libgcrypt-devel
-        libidn2-devel
-        libmicrohttpd-devel
-        libmount-devel
-        libseccomp-devel
-        libselinux-devel
-        libxkbcommon-devel
-        libxslt
-        lz4
-        lz4-devel
-        meson
-        ninja-build
-        pam-devel
-        pcre2-devel
-        perl(IPC::SysV)
-        perl(Time::HiRes)
-        pkgconfig
-        python3-devel
-        python3-lxml
-        qrencode-devel
-        tree
-
-Packages=
-        dnsmasq
-        iproute
-        libidn2
-        polkit
-        python3
-
-# Share caches with the top-level mkosi
-BuildDirectory=../mkosi/mkosi.builddir
-Cache=../mkosi/mkosi.cache
-
-# Run our own script
-BuildScript=mkosi.build.networkd-test
-
-BuildSources=..
-NSpawnSettings=mkosi.nspawn.networkd-test
diff --git a/test/mkosi.nspawn.networkd-test b/test/mkosi.nspawn.networkd-test
deleted file mode 100644 (file)
index f624f24..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-
-[Network]
-Private=yes