---
# 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:
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 }}
/.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/
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)
## 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:
```
[Content]
BuildDirectory=mkosi.builddir
Cache=mkosi.cache
+ExtraTrees=src:/root/src
Packages=
acl
bash-completion
[Host]
Acl=yes
-Netdev=yes
QemuMem=2G
ExtraSearchPaths=build/
KernelCommandLineExtra=systemd.crash_shell
# 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
polkit
popt
python-pefile
+ python-psutil
+ python-pytest
quota-tools
shadow
tpm2-tss
python-jinja
python-lxml
python-pyelftools
- python-pytest
# 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
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
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)
# 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
policykit-1
procps
python3-pefile
+ python3-psutil
+ python3-pytest
quota
xxd
python3-jinja2
python3-lxml
python3-pyelftools
- python3-pytest
xsltproc
# 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
popt
procps-ng
python3dist(pefile)
+ python3dist(psutil)
+ python3dist(pytest)
quota
tpm2-tss
vim-common
pkgconfig(valgrind)
pkgconfig(xencontrol)
pkgconfig(xkbcommon)
- python3dist(docutils)
+ python3-docutils
python3dist(jinja2)
python3dist(lxml)
python3dist(pyelftools)
- python3dist(pytest)
# 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
libxkbcommon0
pam
python3-pefile
+ python3-psutil
+ python3-pytest
shadow
tpm2-0-tss
vim
python3-Jinja2
python3-lxml
python3-pyelftools
- python3-pytest
qrencode-devel
shadow
system-group-obsolete
# 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
policykit-1
procps
python3-pefile
+ python3-psutil
+ python3-pytest
quota
xxd
python3-jinja2
python3-lxml
python3-pyelftools
- python3-pytest
xsltproc
set debuginfod enabled off
set build-id-verbose 0
+set substitute-path ../src /root/src
+++ /dev/null
-#!/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
+++ /dev/null
-# 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
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-
-[Network]
-Private=yes