Commit graph

159 commits

Author SHA1 Message Date
Daan De Meyer 9b112737fa mkosi: Install bpftrace 2024-05-30 09:59:30 +02:00
Daan De Meyer 556659adfe mkosi: Switch back to cloud/KVM kernel packages
Now that we don't need megasas2 anymore, let's switch back to the
KVM/cloud kernel images to save on image size, build times and boot
times.
2024-05-29 15:24:03 +02:00
Daan De Meyer 14aea4a9f5 mkosi: Disable iscsi service and socket
We'll always start these on demand in integration tests that need
them. No need to start them by default.
2024-05-29 14:10:50 +02:00
Daan De Meyer 3c367df7c6 mkosi: Switch from btrfs to ext4
Mounting multiple btrfs filesystems with the same fsid only works
properly from kernel 6.7 onwards. Let's switch to ext4 for now which
does support this.
2024-05-29 14:10:50 +02:00
Daan De Meyer 6448993a4b mkosi: Set EXTRA_CFLAGS on opensuse
The opensuse spec doesn't unconditionally set FORTIFY_SOURCE=2 anymore
so let's drop our workaround.
2024-05-29 11:26:06 +02:00
Luca Boccassi 386dc7d0fd mkosi: explicitly install g++ in opensuse
Not pulled in by default at build time
2024-05-21 19:07:39 +01:00
Yu Watanabe 90fe8cf209 test: install more kernel modules for Fedora image
Otherwise, several tests for networkd are skipped.

Follow-up for #32666.
2024-05-20 18:38:45 +09:00
Daan De Meyer e182c7b4db test: Enable TEST-69-SHUTDOWN for mkosi
In mkosi, we run the test inside the VM instead of outside. To simplify
the implementation we drop the reboot part and only verify that we can
schedule and cancel shutdowns and that the wall messages are sent as
expected.
2024-05-16 18:21:32 +02:00
Daan De Meyer 4ac46561e9 test: Enable TEST-24-CRYPTSETUP for mkosi
Encrypted /var is skipped because meson's limitations make per test
images not really feasible and we can't encrypt /var by default because
it slows down the image build too much.

Co-authored-by: Richard Maw <richard.maw@codethink.co.uk>
2024-05-16 14:46:37 +02:00
Daan De Meyer b13b7978e7 test: Enable TEST-08-INITRD on mkosi 2024-05-15 10:09:53 +02:00
Daan De Meyer 985ea31173
Merge pull request #32666 from DaanDeMeyer/mkosi-network
test: Add TEST-85-NETWORK to run systemd-networkd-tests.py
2024-05-15 07:30:04 +02:00
Daan De Meyer 9e262ef92e test: Enable TEST-54-CREDS on mkosi 2024-05-14 23:19:28 +02:00
Daan De Meyer 16585dbaf4 mkosi: Disable journald rate-limiting 2024-05-14 22:58:28 +02:00
Daan De Meyer 5692f87160 test: Run TEST-64-UDEV-STORAGE with mkosi
We add a configure script for each subtest to add the required
qemu arguments.

Co-authored-by: Richard Maw <richard.maw@codethink.co.uk>
2024-05-14 12:43:28 +02:00
Daan De Meyer eb4c962aa4 test: Ignore configure scripts in minimal images
These are always aimed at the system image so ignore any specified
configure scripts in the minimal images.
2024-05-14 12:43:28 +02:00
Daan De Meyer f6af2976aa TEST-06-SELINUX: Simplify auto-relabeling
Let's ship a .autorelabel file so we can get rid of
firstboot-autorelabel.service.
2024-05-14 12:43:28 +02:00
Daan De Meyer 7a321b5a21 test: Rename testsuite-XX units to match test name
Having these named differently than the test itself mostly creates
unecessary confusion and makes writing logic against the tests harder
so let's rename the testsuite-xx units and scripts to just use the
test name itself.
2024-05-14 12:43:28 +02:00
Daan De Meyer 8f59b036de mkosi: Install dhcp-server on OpenSUSE
Required for systemd-networkd-tests.py.
2024-05-06 20:21:32 +02:00
Daan De Meyer 2c5dc1df1d mkosi: Install python3-psutil
Required to run systemd-networkd-tests.py. Already a dependency of
systemd-tests on Fedora so we don't add it there as it'll be pulled
in via the prepare script.
2024-05-06 18:15:54 +02:00
Daan De Meyer 15526060cc mkosi: Install radvd
Required for networkd integration tests.
2024-05-06 18:15:54 +02:00
Daan De Meyer fdf3820e54 mkosi: Configure coredump to store coredumps in the journal.
Makes it easier to debug coredumps that happen in CI as we can retrieve
them via the journal.
2024-05-06 14:44:43 +02:00
Daan De Meyer 71b7156bd3 mkosi: Add missing SPDX line 2024-05-06 14:44:27 +02:00
Daan De Meyer 21e9282bc2 mkosi: Only look for services in /usr and /etc 2024-05-06 14:40:29 +02:00
Daan De Meyer bda54ae03f mkosi: Skip build if NO_BUILD is set
This allows running the integration tests against the distro's packaged
version of systemd.
2024-05-06 14:40:26 +02:00
Daan De Meyer fc4bac8162 mkosi: Add dependency to system image on minimal-base
The output is included as an extra tree so it should be a dependency,
even if it is pulled in transitively via minimal-0 and minimal-1
already.
2024-05-06 10:56:45 +02:00
Daan De Meyer 13686c0e58 mkosi: Install dbus policy required by TEST-23-UNIT-FILE
Co-authored-by: Richard Maw <richard.maw@codethink.co.uk>
2024-05-06 10:56:45 +02:00
Daan De Meyer 6817910e6f mkosi: Remove /etc/default/keyboard if it exists
Required to make TEST-73-LOCALE pass on Ubuntu.
2024-05-06 10:56:45 +02:00
Daan De Meyer 7cf0efd8ec mkosi: Make sure tmp.mount is not messed with on Debian/Ubuntu
We want /tmp to be a tmpfs so let's hack the debian packaging to
make sure that's the case until the debian packaging is fixed to
make /tmp a tmpfs for UPSTREAM=1 builds.
2024-05-06 10:56:45 +02:00
Daan De Meyer 5cb66ff5a1 mkosi: Install stress
Required for TEST-55-OOMD. Not available on opensuse.
2024-05-06 10:56:45 +02:00
Daan De Meyer 3c3e21fb64 mkosi: Install veritysetup
Only missing on CentOS/Fedora/OpenSUSE as in Arch/Debian/Ubuntu it's
part of the cryptsetup package which we already install.

Required for TEST-58-REPART.
2024-05-06 10:56:45 +02:00
Daan De Meyer a82d897c3d mkosi: Install dig
Required for TEST-75-RESOLVED
2024-05-06 10:56:45 +02:00
Daan De Meyer 2d93e534a3 mkosi: Install knot
Required for TEST-75-RESOLVED
2024-05-06 10:56:45 +02:00
Daan De Meyer efbd22e476 mkosi: Use /etc/nsswitch.conf from repo in mkosi image 2024-05-06 10:56:45 +02:00
Daan De Meyer f09947661c mkosi: Move sbsigntools to CentOS/Fedora shared configuration
sbsigntools was added to EPEL 9.
2024-05-06 10:56:45 +02:00
Daan De Meyer 9bf888faf1 mkosi: Drop glibc-langpack-en from Fedora specific packages
It's already added in the CentOS/Fedora shared configuration.
2024-05-06 10:56:45 +02:00
Daan De Meyer 89255c31a4 mkosi: Install dfuzzer on CentOS/Fedora images
Required for TEST-21-DFUZZER.
2024-05-06 10:56:45 +02:00
Richard Maw e26efe09f3 mkosi: Disable selinux labelling and install policy in initramfs
It is necessary to install the selinux policy in the initramfs
so that userland is entered with the correct label.

SELinuxRelabel defaults to auto, which will skip if the relabelling
command is not installed and will treat failure to relabel as non-fatal.

We can't force it on because root privileges are required if the labels
don't exist on the host system and we would like to be able to
cross-build from other distributions.

Since we are already committed to relabelling on first boot
there is no value in even trying to label.
2024-05-03 12:57:11 +01:00
Richard Maw a56820d16a mkosi: Fix particle profile
The sbsign and ukify part was moved into a finalize script
rather than a postinst.chroot script so was using host tools
instead of just-built.
2024-05-03 13:49:09 +02:00
Daan De Meyer f991c3871b mkosi: Fix %__check_files eval in opensuse build script
Make sure the correct buildroot gets expanded instead of the default
opensuse build root location.

We also remove debug files from the unpackaged files list as they're
handled separately by rpm.
2024-04-30 18:17:11 +02:00
Daan De Meyer 3c9a807ac8 mkosi: Install more locales on CentOS/Fedora
Required for TEST-73-LOCALE.
2024-04-30 17:01:41 +02:00
Daan De Meyer 0d73e224e2 mkosi: Install tpm2-tools in system image
Required for TEST-70-TPM2.
2024-04-30 17:01:41 +02:00
Daan De Meyer 695ebbaf7f mkosi: Override /sbin/init in minimal-base
Required for TEST-13-NSPAWN.
2024-04-30 17:01:41 +02:00
Richard Maw 334e707329 mkosi: Add curl package for journal tests 2024-04-30 17:01:41 +02:00
Daan De Meyer 989d46df8b mkosi: Install locales on debian/ubuntu
Required for TEST-73-LOCALE.
2024-04-30 17:01:41 +02:00
Daan De Meyer a531931cd4 mkosi: Simply remove all the debian patches instead of mounting over them
The build sources are ephemeral anyways, so we can just remove the patches
instead of hiding them.
2024-04-30 17:01:41 +02:00
Daan De Meyer e839cb1cf8 mkosi: Use symlinks instead of bind mounts for Arch
With bind mounts, the directories we bind mount to get recorded as
the meson source and build directories. This means meson will complain
if we later try to run meson install -C /work/build in the virtual
machine or container. If we use symlinks, the directories we symlink to
will be recorded as the meson source and build directories, which means
meson install -C /work/build will work when executed after booting the
VM or container.

I tried to do the same for debian as well but the debian package tooling
changes directory into the build directory and then does meson setup ..
which is completely broken when switching to a symlink.
2024-04-30 17:01:41 +02:00
Daan De Meyer 48e0399bee mkosi: Install minimal-base to /usr/share/testsuite-13-container-template
Required for TEST-13-NSPAWN.
2024-04-30 17:01:41 +02:00
Daan De Meyer a8bc9400a8 mkosi: Remove more files from Arch minimal image 2024-04-30 17:01:41 +02:00
Daan De Meyer c89244842b test: Don't persist journal in mkosi image if we're not debugging tests
If we're not debugging tests, there's no point in persisting the journal,
so let's use the volatile journal storage mode in that case to avoid doing
unnecessary work.

We don't disable journal storage alltogether since various tests check
that stuff is written to the journal.
2024-04-30 15:20:55 +02:00
Daan De Meyer 742b77e1d2 mkosi: Make sure we create an image without /var/log/journal
This allows journald to create the directory itself with the right
chattr settings on first boot.
2024-04-30 11:41:02 +02:00