Commit graph

73410 commits

Author SHA1 Message Date
Daan De Meyer 9a4f925b57 TEST-75-RESOLVED: Move knot configuration to /usr/lib/systemd/tests/testdata
This allows the logic to install the configuration to be done inside
the test itself which allows it to be shared with mkosi.
2024-05-06 10:56:55 +02:00
Daan De Meyer ae25df53bf TEST-21-DFUZZER: Give higher priority
This test takes a long time to run. Let's make sure it is started
first to avoid it being the only test running for a long time at the
end.
2024-05-06 10:56:55 +02:00
Daan De Meyer ca72b8f6f8 TEST-21-DFUZZER: Bump timeout to 1h 2024-05-06 10:56:55 +02:00
Richard Maw 7afb533711 TEST-21-DFUZZER: Skip test if dfuzzer is not installed 2024-05-06 10:56:55 +02:00
Daan De Meyer e3ab65cff3 test: Fix udev storage test name 2024-05-06 10:56:55 +02:00
Daan De Meyer 15faee5309 test: Add missing TEST-69-SHUTDOWN to list 2024-05-06 10:56:54 +02:00
Daan De Meyer 3beefac9eb test: Remove flaky test comments
These two tests don't seem to fail in CI, so let's remove the comments
about flakyness.
2024-05-06 10:56:54 +02:00
Daan De Meyer d91bb1cbf0 test: Always shutdown on test success in mkosi
When we want to get an interactive shell in a test that fails because
of a race condition, we might need to run the test a few times with
--repeat before it fails. However, currently, when -i is used, the VM
needs to be shut down manually each time before the next run can start.

Let's always shut down the VM if the test succeeds so that --repeat can
be used with -i to run the test until it fails and then get an interactive
shell in the VM.
2024-05-06 10:56:54 +02:00
Daan De Meyer 0596237e0e test: Use MESON_TEST_ITERATION if available
This allows running the same test multiple times concurrently with
meson's --repeat option. Proposed upstream but not yet merged:
https://github.com/mesonbuild/meson/pull/13177.
2024-05-06 10:56:54 +02:00
Daan De Meyer 3cb61e0d1c test: Pass through test matching environment variables to the mkosi VM 2024-05-06 10:56:54 +02:00
Daan De Meyer 38db5eff34 test: Only set environment variable if integration tests are enabled.
If we set it to '0' if integration tests are not enabled then we can't
enable them from the command line since environment from meson takes
priority over environment variables from the command line.

We also rename the related variables to avoid conflicts with the
existing integration_tests variable.
2024-05-06 10:56:54 +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 ffda3c3de9 mkosi: Disable ext4's orphan_file feature for centos images
Not supported by e2fsck from centos. We also disable building repart
from source in CI as running it from the build directory means repart
will run mkfs.ext4 from the host which doesn't know about the orphan_file
feature causing it to fail.
2024-05-06 10:56:45 +02:00
Daan De Meyer 81af7ac925 mkosi: Enable udev debug logging in CI
It's very useful to debug race conditions with loop devices, so let's
enable the logging now that it goes to the journal and not to the
console.
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
Daan De Meyer 1c329956e5 mkosi: Insist on KVM, VSOCK and TPM by default
By default mkosi will not run VMs with these features if they're not
available, but since various stuff in systemd makes use of these, let's
fail loudly if any of these are not available by default in systemd.

Users can still override these defaults locally if they wish.
2024-05-06 10:56:45 +02:00
Daan De Meyer 86e249f326 mkosi: Update to latest 2024-05-06 10:56:45 +02:00
Daan De Meyer bdade5f597 test: Formatting fixes 2024-05-06 10:56:43 +02:00
Daan De Meyer 54d0507223 meson: Add missing spdx line 2024-05-05 14:49:21 +02:00
Daan De Meyer ea07a6d45d meson: Test installation fixes
Let's use the new follow_symlinks flag instead on newer meson to.
We also switch back to copying symlinks instead of following them
and add an exclude for 25-default.link which becomes dangling when
installed and recreate it manually instead.
2024-05-05 14:49:21 +02:00
Daan De Meyer f779fd1f8f meson: Set up git submodule update on post checkout as well 2024-05-05 14:49:21 +02:00
Daan De Meyer 69e02d94f5 meson: Remove --debug from mkosi arguments
The exit status issue for which we introduced this was fixed so
let's remove --debug again to make the meson output less verbose.
2024-05-05 14:49:21 +02:00
Luca Boccassi 72007bbc9b
Merge pull request #32588 from CodethinkLabs/mkosi-selinux
Add TEST-06-SELINUX to mkosi integration tests
2024-05-04 20:48:55 +02:00
Thayne McCombs 7df0297ac5
man/run0: Describe environment variables set (#32622)
* man/run0: Describe environment variables set
2024-05-04 12:06:16 +01:00
Frantisek Sumsal 568d97953b test: replace Europe/Kiev with Europe/Kyiv
As the former is deprecated and might not be available (i.e. on Ubuntu
Noble it's only available after installing the tzdata-legacy package).
2024-05-04 12:52:49 +02:00
Daan De Meyer 2c93e5f002 journal: Serialize __MONOTONIC_TIMESTAMP metadata field as well
Otherwise the forwarded journals won't have any monotonic timestamps.
2024-05-03 20:24:50 +02:00
Richard Maw ab9d60250e test: Enable TEST-06-SELINUX testing with mkosi 2024-05-03 12:57:11 +01: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 a2a734e737 test: Integrate custom selinux relabelling unit with firstboot 2024-05-03 12:57:11 +01:00
Richard Maw 049b456d9a test: Skip TEST-06-SELINUX early if not on fedora/centos
Other distributions may be able to install selinux
but they are not expected to use it.

The distribution is tested rather than whether selinux is enabled
because it is expected to work on CentOS and Fedora
and we want it to fail noisily.
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
dependabot[bot] 85e23ef431 build(deps): bump pkg/debian from 9a5adf2 to f550017
Bumps pkg/debian from `9a5adf2` to `f550017`.

---
updated-dependencies:
- dependency-name: pkg/debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-03 12:32:04 +02:00
anphir 78a529caa5 man: improve documentation about using resource-control options
According to the documentation in systemd.resource-control(5),
resource-control options may be used in mount, scope, service,
slice, socket and swap units.
While e.g. systemd.service(5) includes that information,
documentation for some other units does not.

The most problematic example is systemd.slice(5).
Its documentation states a slice unit may only contain [Install]
and [Unit] sections, while actually it may contain also a [Slice]
section with options from systemd.resource-control(5).
units/user/app.slice is an example of a slice unit having a [Slice]
section.
2024-05-03 11:36:56 +02:00
Luca Boccassi 0fee0c0780 test: drop --tpm2-public-key= from TEST-70
Fixes test failure

Follow-up for 03e3b2672b
2024-05-03 10:16:46 +02:00
Lennart Poettering d4ffb37bb1 nspawn, vmspawn, run0: add env var for turning off background tinting
Some people are just sad, sad lost souls who don't like even the tiniest
ray of color in their life. Let's add an env var knob for allowing them
to turn the background tinting off, to drive the last bit of color from
their life so that they can stay in their grey grey life.
2024-05-02 23:33:39 +02:00
Yu Watanabe 61628287bd journal: explicitly sync namespaced journals before stopping socket units
Otherwise, if a service unit that requests LogNamespace= stopped before
systemd-journald@.service is started, logs generated by the service will be
lost, as systemd-journald@.socket is stopped and
systemd-journald@.service will never started.

To prevent the issue, let's introduce another implicit dependency to
a oneshot service that explicitly synchronizes a namespaced journal file
when the log namespace is not needed anymore.

Fixes #32604.
2024-05-02 19:41:01 +02:00
Sam Leonard 5cd6605737 vmspawn,man: move the varlistentry for -D into a variablelist
This is so that systemd.directives picks up the -D argument as being
supported by vmspawn.
2024-05-02 19:31:42 +02:00
Lennart Poettering 61ab5ddcdc tree-wide: fix type confusion around parsing JSON booleans
Sometimes we store them in a tristate, sometimes in C stdbool booleans.
Sometimes we fucked up picking the right parsing function however. Fix
that.
2024-05-02 19:31:08 +02:00
Sam Leonard 5535a9484e news: refer to ForwardToSocket instead of ForwardAddress 2024-05-02 18:59:08 +02:00
Lennart Poettering 84bdf71592 update TODO 2024-05-02 18:16:59 +02:00