Commit Graph

100 Commits

Author SHA1 Message Date
Daan De Meyer
7a18a538ef mkosi: Stop installing devel packages
These aren't required for tests and pull in a bunch of dependencies,
so let's not install them into the final image.
2025-10-24 12:59:11 +01:00
Thomas Blume
4c7e30c4e0 test: add policy packages for TEST-06-SELINUX in openSUSE 2025-10-24 12:58:32 +01:00
Luca Boccassi
d62ab43fd0 mkosi: update debian commit reference to 5650452e6b0b430f44d3d48b7322c2b3c8b9477f
* 5650452e6b Install new files for upstream build
* 607afcd060 salsa: disable arm64/ppc64el again
* b1bb6d4849 systemd-tests: drop unused overrides
* b3790a36ca getty-static: add missing Documentation=
* 1cea27caba Backport patch to fix autopkgtest with new util-linux due to file move
* 2e74a7f969 Update changelog for 258.1-1 release
* 9250e242b9 Make /run/lock world writable by default
2025-10-22 20:06:44 +02:00
Luca Boccassi
dc567bc406 mkosi: install new knot-keymgr in Fedora rawhide
52aa1c6b27

TEST-75-RESOLVED.sh[116]: + keymgr . generate algorithm=ECDSAP256SHA256 ksk=yes zsk=yes
TEST-75-RESOLVED.sh[454]: /usr/lib/systemd/tests/testdata/units/TEST-75-RESOLVED.sh: line 153: keymgr: command not found
2025-10-17 18:35:29 +01:00
Luca Boccassi
39175477bd mkosi: provide detached verity signatures too for minimal images
Useful for manual testing in the VM
2025-10-16 15:50:45 +01:00
Luca Boccassi
2a5e68e27d test: install bsdextrautils in debian minimal img
'rev' moved to bsdextrautils and TEST-50-DISSECT uses it, so it now
fails:

[   83.534905] bash[3581]: +++ grep '^now' /proc/timer_list
[   83.535479] bash[3582]: +++ cut '-d ' -f3
[   83.535774] bash[3583]: +++ rev
[   83.535774] bash[3583]: bash: line 1: rev: command not found
2025-10-15 22:54:51 +01:00
Frantisek Sumsal
f50e6fd897 mkosi: explicitly pull in libz1 on OpenSUSE
Otherwise it pulls in libz-ng-compat1 which isn't 100% compatible with
libz1, and more importantly it requires an ldconfig drop-in in /etc/
(/etc/ld.so.conf.d/zlib-ng-compat-x86_64.conf) which breaks hermetic-usr
and TEST-07-PID1:

systemd[5582]: /usr/lib/systemd/systemd: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
2025-10-14 17:29:58 +01:00
Yu Watanabe
d526ab8a9a mkosi: avoid infinite reboot on failure
If systemd-pcrphase-initrd.service and friends failed for some reasons,
the test VM will reboot infinitely and the test will timeout. Let's
propagate the failure to the host and fail the test earlier in that case.
2025-10-13 10:29:38 +02:00
Frantisek Sumsal
4d8e8d44ab mkosi: install test dependencies for EnterNamespace= test
The test for the EnterNamespace= feature [0] has been both broken and
disabled since the migration to the mkosi framework, as it's missing the
libdw.pc file for pkg-config, so the test is skipped completely, and
it's also missing gcc to actually build the test binary.

[0] Part of TEST-87-AUX-UTILS-VM.coredump.sh
2025-10-11 22:37:33 +02:00
Luca Boccassi
29c639887a mkosi: update debian commit reference to e50fce1d4b2a9f1bb990027de8e86603f3b42301
* e50fce1d4b Fix installation of new manpages
* 8b45d3d793 Install new files for upstream build
* a401468f75 autopkgest: install bsdutils and bsdextrautils for unit tests
* 587584577e Explicitly disable bpf-framework for stage1 builds
* 209a8475d9 systemd: recommend login package
2025-10-05 22:11:40 +01:00
Luca Boccassi
6602a5f720 mkosi: pull in new knot package for TEST-75-RESOLVED
5728s TEST-75-RESOLVED.sh[439]: /usr/lib/systemd/tests/testdata/units/TEST-75-RESOLVED.sh: line 154: keymgr: command not found

The command was split out into a new package
2025-10-05 17:20:29 +01:00
Luca Boccassi
d5eb732724 mkosi: pull in bsdutils for script, used by various integration tests
4971s TEST-74-AUX-UTILS.sh[1212]: + script -ec 'networkctl edit --runtime "$NETWORK_NAME"' /dev/null
4971s TEST-74-AUX-UTILS.sh[1269]: .//usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.networkctl.sh: line 55: script: command not found

Currently works due to a transitive dependency somewhere else
that is being dropped, pull it in directly given the tool is
used by the tests
2025-09-25 15:11:17 +01:00
Luca Boccassi
2183d881b9 mkosi: update debian commit reference to 49dd9371a0c0dd08c7847c5885722eab88ac279f
* 49dd9371a0 d/rules: Ubuntu moved vmlinux.h too
* c81ce364eb Install new files for upstream build
* 35abaf33bc Override more Lintian warnings about appstream
* a3d3690c45 Override Lintian warning for appstream-metadata-missing-modalias-provide
* 1bcda1fd90 Override Lintian warning for binaries-have-file-conflict
* c597c00ffc Drop versioned conflicts added for bullseye upgrades
* 9cd845af25 Override lintian warnings for conflicts-with-version
* 359da95d09 Override Lintian warning for spare-manual-page
* 3ef8c31cb2 Override Lintian warning for groff-message
* dbe51582a9 Update changelog for 258-1 release
* ffd971a27d autopkgtest: ensure /usr/sbin is in the PATH for unit-tests job
* f086b8e881 autopkgtest: enable debug logs for unit-tests job
* 02142b9eae autopkgest: install dosfstools for test-loop-block
* 0319d890bd salsa-ci: enable ppc64el builds
* 645b1fa318 autopkgtest: use -20 instead of -22 for zstd compression
* b8dc9b0ce7 salsa-ci: switch to recommended entry point yml
* 152a2b3140 autopkgtest: set default_device_timeout_sec=240
* 6d46436878 autopkgtest: manually compress logs on failure
* c6c70bbb0c Update changelog for 258~rc4-1 release
* 2695112df7 Update changelog for 258~rc3-1 release
* 2c293cb2be systemd-boot: update version for rm_conffile
2025-09-24 00:38:40 +01:00
Daan De Meyer
db35a83fe9 mkosi: Add stress-ng to sanitizer wrapper programs 2025-09-19 13:54:54 +02:00
Yu Watanabe
97eeecaa3c mkosi: support the case /sbin/init is an absolute symbolic link
In that case, the link points to the host file, thus we cannot update
the file.
2025-09-17 22:21:11 +09:00
Yu Watanabe
f8d5efc703 mkosi: drop man package from global config
Some distributions does not have man package, but named man-db or so,
and most distribution specific mkosi.conf files already have them.
Let's drop man from the global config.
2025-09-17 22:21:11 +09:00
val4oss
8fe3bd54be mkosi conf opensuse: ukify from systemd-ukify
* openSUSE tumbleweed moves ukify tool from systemd-experimental to
  systemd-ukify.

Signed-off-by: val4oss <github.widget541@passmail.net>
2025-09-16 17:10:46 +02:00
val4oss
be285a9918 mkosi: update opensuse commit reference to 7d9cf5c934705c175766eaa688baa503da84e06a
* 7d9cf5c9347 Update systemd to version 257.9 / rev 456 via SR 1303345
* 439d743e5d6 Update systemd to version 257.7 / rev 455 via SR 1297651
* 4f72c6a6279 Update systemd to version 257.7 / rev 454 via SR 1296831
* 3b0afa5c6d1 Update systemd to version 257.7 / rev 453 via SR 1294979
* d0eccd20f5a Update systemd to version 257.7 / rev 452 via SR 1292221
* f9d183f8c57 Update systemd to version 257.7 / rev 451 via SR 1291008
* cbd6908247d Update systemd to version 257.7 / rev 450 via SR 1289968
* 6e5c00f9f92 Update systemd to version 257.6 / rev 449 via SR 1286997

Signed-off-by: val4oss <github.widget541@passmail.net>
2025-09-16 17:10:46 +02:00
val4oss
6becea2859 mkosi conf opensuse: add libtss2-tcti-device0 dep
* Add the TPM recommended package for opensuse mkosi conf to fix the
  TEST-70-TPM failure.

Signed-off-by: val4oss <github.widget541@passmail.net>
2025-09-12 10:34:02 +01:00
Luca Boccassi
b7d3b45017 mkosi: pass through more toolchain flags 2025-09-12 10:31:32 +01:00
Daan De Meyer
b21f52b6d1 mkosi: Install libcap-progs in main and minimal image
Let's make sure tools like capsh are available on OpenSUSE images
as well.
2025-09-05 08:24:39 +02:00
val4oss
0c7764f2a7 mkosi conf opensuse: add systemd-journal-remote
* Add the missing package for mkosi opensuse conf, otherwise TEST-04-JOURNAL
  fails with "/usr/lib/systemd/systemd-journal-remote: No such file or
  directory"

Signed-off-by: val4oss <github.widget541@passmail.net>
2025-09-04 17:32:18 +01:00
Luca Boccassi
c4d9f9c9f6 mkosi: update mkosi commit reference to d45142e329550abc9c6fc63c1f1f86e5286d3d67
* 786b8fe1c8 Return false from want_efi() for UKI outputs
* fac86dbc93 mkosi-tools: add qemu/pipewire packages for gui profile for debian
* 3bb98f0e6e Add ncdu to tools tree packages
* 1332b32cb4 config: Fix type for devicetree setting
* eff03569ee initrd: Add intel_pmc_ssram_telemetry module by default
* e04305b030 Make Bootable= determine whether we build a UKI for esp images
* 7252146429 mkosi-obs: use --force also for unzstd
* f58e31e228 mkosi-obs: do not fail if there are no bootloaders in the ESP
* fac3bd4bf1 rhel: Look up entitlement keys and certificates in sandbox
* da814d9634 opensuse: Add support for RISC-V for Tumbleweed
* b1d66c88d0 fedora: Rework rawhide GPG key logic
* b9360f25df Include {sys,conf}ext info in metadata file
* 94c6db6148 Set MakeInitrd=yes in documentation for building custom initrd
* d134013ca8 mkosi-tools: add grub2-common to openSUSE tools tree
* c97d345395 mkosi-tools: virtiofsd is only available on a subset of architectures on debian/ubuntu
2025-09-03 14:27:59 +01:00
Daan De Meyer
1207ba48d7 mkosi: Relax separate branch check in mkosi.sync
There's no guarantee that $GIT_BRANCH is always the same across
stable release branches and main. But we still need to make sure
we switch commits if we're switching between main and release branches.

To make this work, let's not check if the current HEAD commit is an
ancestor of the currently configured origin branch. Instead, let's
check if any of the origin branches contains the current HEAD commit.
This still makes sure that we won't switch commits if we're working
on a local branch while making sure that we do switch commits if we're
switching between main and stable release branches with different
git branches configured for the packaging repo checkout.
2025-09-03 12:11:48 +02:00
Luca Boccassi
490aa05ca1 chase: invert CHASE_NO_AUTOFS and only set it where needed
Since c5de7b14ae
file searching implies a new mount api syscall by default,
to trigger automounts.

This is problematic in NSS plugins, as they are dlopen'ed inside
processes by glibc, for two reasons.

First of all, potentially searching on a networked filesystem
automount could lead to nasty surprises, such as the process
responsible for setting up the network filesystem trying to
search on that same filesystem.

More importantly, the new mount api syscall was never part of
the filesystem seccomp filter that we provide by default, and
given mounting/remounting/bind mounting is one of the possible
ways to bypass sandboxing it is very likely not allowed when
custom filters are used in sandboxed processes, if they don't
need to do these operations otherwise.
The filesystem seccomp mask we provide has been updated, however
this only takes effect on the next restart of a service. When
systemd is upgraded via a package upgrade, the new nss plugin is
installed and will be immediately dlopen'ed by glibc when needed,
without waiting for the process to restart, which means the existing
seccomp filter applies, causing the filter to trigger.
Given it's not really possible for any arbitrary program to
predict which NSS modules glibc will load, given programs do not
configure that and instead nsswitch is set up by the sysadmin,
it's impossible to handle at each process level. It's also not
possible to know when it will be triggered, given the plugin
is not linked in each binary tools like need-restart cannot
even pre-emptively restart services that may be affected.

This means in practice, upgrading from systemd << v258 to >= v258
requires a reboot to avoid either subtle or catastrophic system
failures.

By avoiding to trigger automounts in nss-systemd we can avoid
both issues.

userdb drop-ins are searched for in:

/etc/userdb/
/run/userdb/
/run/host/userdb/
/usr/local/lib/userdb/
/usr/lib/userdb/

none of which are supported as automounts anyway.

Note that this happens only when the userdbd service is not running,
as otherwise nss-systemd will go through the varlink IPC, rather than
doing the searches in-process.

So invert CHASE_NO_AUTOFS to CHASE_AUTOFS and set it in the places where
we do want to trigger automounts, like looking for the ESP.

Follow-up for c5de7b14ae
Fixes https://github.com/systemd/systemd/issues/38565
2025-08-19 16:48:13 +02:00
Luca Boccassi
b1cd38e893 test: also edit /etc/os-release if it's not a symlink when patching /usr/lib/os-release (#38628)
mkosi patches up /etc/os-release to add local IDs and fixup certain
issues, so when tests patch /usr/lib/ on the fly, copy to the version in
/etc/ too to avoid test failures when querying

6370s 10/98 systemd:integration-tests / TEST-07-PID1 FAIL 31.03s exit
status 1
6370s 25/98 systemd:integration-tests / TEST-29-PORTABLE FAIL 12.76s
exit status 1
6370s 33/98 systemd:integration-tests / TEST-43-PRIVATEUSER-UNPRIV FAIL
6.57s exit status 1
6370s 37/98 systemd:integration-tests / TEST-50-DISSECT FAIL 16.97s exit
status 1

This is particularly an issue when running these tests on debian unstable,
where mkosi has to fixup os-release to make it valid and avoid further
breakages:

https://github.com/systemd/mkosi/blob/main/mkosi/distributions/debian.py#L234
2025-08-19 12:32:00 +01:00
Luca Boccassi
f89480a0a7 mkosi: update mkosi commit reference to 5598b7f5793b6f63db5afaa39504a763fbaeb5cb
* 5598b7f579 fedora: be more persistent when guessing what rawhide could be
* cdd2d1570e Use apt-ftparchive instead of reprepro
* eeb4ce6302 fix dead/404 link
* 30a487d183 mkosi-tools: Drop systemd-boot-efi package
* ad4b4d2cbe Add debug logging for version reported by systemd tools
* 95f5c77fb7 mkosi-tools: move systemd-boot package to conf file matching older releases
* 7da22f33e0 README: clarify that companion tools can also be enabled from the git repo
* ec3fe91532 Drop microsecond resolution for datetime.now()
* 9f7a53b687 mkosi-initrd: install raid rule with 70 prefix
* 32c3ff4677 ci: give a hint about possible fixes for failing reuse lints
* 489c5e9ecc build(deps): bump github/codeql-action from 3.29.2 to 3.29.5
2025-08-16 12:13:20 +01:00
Luca Boccassi
ec9b149bb2 mkosi: update debian commit reference to 8ba719208ff28f36bc240328725eb10008838c39
* 8ba719208f systemd-boot: install kernel hooks to /usr/share/
* c4d6093398 Update changelog for 258~rc2-2 release
* b21987b0f9 More NEWS updates about sysv support
* cd7d07f66b NEWS: fixlets and adjustments
* 34ef04cb45 Stop installing /var/lib/systemd in the package
* 08b77c5b7c Update changelog for 258~rc2-1 release
* 48b3ec2b9a systemd-container: update lintian overrides for more false positives
* 31547d827b systemd-boot: make efibootmgr a dependency
* 88a7261c00 d/t/control: prefer systemd-boot-tools if available
* 478ea8945f systemd-boot: fix registering/removing uncompressed kernels
* b072f60375 NEWS: fix typo
* 985a3c8d56 systemd-boot: register interest in systemd-boot-signed trigger
* f13b262bf6 d/rules: set debugoptimized for upstream builds
* 615f8851e8 Install usr/share/factory files and restore nsswitch.conf/pam.d/issue on factory reset
* 61792528f2 Update changelog for 258~rc1-1 release
* 116371a1df d/copyright: update paths
* 41437c9c54 Add a few more conflicts to packages providing the same files
* 0e5eea70fd Fix Lintian warning debian-news-entry-uses-asterisk
* 60595acb01 Update Lintian overrides
* b8662ba796 Update symbols file for 258~rc1
* 58553602ca NEWS: note removal of telinit/runlevel
* d78ade0842 Drop all workarounds that are obsolete after trixie
* 7ef47f9f6b Drop world-writable /run/lock debianism
* 9d6d3a4154 NEWS: note cgroupv1 removal
* ef2ef6f35d Enable sd-vmspawn
* ac2aec3b68 Add and remove files for 258~rc1
* 06582be4e6 d/watch: remove restriction to v257.x series
* 88ccb1552a salsa-ci: enable arm64 build
2025-08-16 12:11:46 +01:00
Luca Boccassi
57aeb4a403 mkosi: install util-linux-script on F44
Once F41 is EOL we can just move this to the main list and
stop doing this dance every 6 months
2025-08-14 18:18:27 +01:00
Luca Boccassi
208ba34a43 test: add coverage for kernel keyring in TEST-50-DISSECT
Use the kernel keyring to verify images in the dissect test.
The userspace keyring is still covered by the DDI and mountfsd tests.
2025-08-11 10:59:51 +01:00
Franck Bui
1f05d6a0de mkosi: include ip in the main image
It's needed by TEST-85-NETWORK.
2025-08-07 15:34:01 +01:00
Yu Watanabe
1afcf37a73 mkosi: update mkosi commit reference to 655baf24474a6f0732ec1b82a71c2f6fe4eeeb49
* 655baf2447 mkosi-initrd: move udev rules files for dm and md
* dec7c3e754 mkosi-vm: Drop tpm_tis change
* 021e3af926 shim: fix log message of installed binary
* 07c24a7d42 mkosi-initrd/vm: ensure TPM2 core modules are installed in the initrd
2025-08-01 16:12:58 +01:00
Luca Boccassi
5ae58ac2b9 test: add a secureboot test with an addon 2025-07-28 23:11:04 +01:00
Luca Boccassi
5ba50a7f2c mkosi: enable secure boot and autoenroll by default
With GHA now fixed, just always enable SB so that we get extra
coverage
2025-07-28 23:11:04 +01:00
Luca Boccassi
8631b0f8b9 mkosi: update mkosi commit reference to cb1a3c90490922441548d09b09c7b76426e4bc20
* cb1a3c9049 FirmwareVariables: allow generating during image build
* 6104923534 env: export $EFI_ARCHITECTURE in hook scripts on EFI arches
* fef33f96a2 mkosi-tools: ukify moved to systemd-ukify in openSUSE
* ec4475a846 ensure builds with cache over device boundaries
* 7be5159f24 Change UnifiedKernelImages to enum and accept signed/unsigned
* 071ac4a575 mkosi-vm: install systemd-boot-efi-signed where available
* 1865be628e opensuse: Install OpenSUSE-release if another release package is not installed
* 0381b17819 qemu: Disable hpet for x86 VMs
* 4f63700eb3 mkosi-tools: install systemd-boot-tools for bootctl
* 1230ed333b man: remove duplicate 'the' in FirmwareVariables description
2025-07-28 23:11:04 +01:00
Yu Watanabe
48bc6f47ea mkosi: update debian commit reference to 61144ff7a6747bd3cc6340fbac38a8e15e9a239b
* 61144ff7a6 Install new quota manpages for upstream build
* a50c51d8c8 systemd-boot: fix initramfs post-update hook for uncompressed kernels
2025-07-16 05:50:01 +09:00
Yu Watanabe
d48387623b mkosi: patch filelists by opensuse 2025-07-16 05:49:34 +09:00
Luca Boccassi
7ebbe57ece Kill several SysV compat functionalities (v258) (#38178) 2025-07-15 01:21:13 +01:00
DaanDeMeyer
e19e17df57 mkosi: Disable systemd-timesyncd by default
It causes quite a bit of debug log noise by repeated DNS lookups so
let's disable it by default to avoid log noise.
2025-07-14 14:51:52 +02:00
Yu Watanabe
f12cc0d3be mkosi: update debian commit reference to a8ad8e30e70c0b82ecb8fe016f2dde3a084236f0
* a8ad8e30e7 Stop installing legacy sysv tools/units for upstream builds
* 9856b1b1bd Install new files for upstream build
* b68bfb52d4 Update changelog for 257.7-2 release
* 3bd5f6d2e0 systemd-boot-tools: change architecture to linux-any
* 057ce29542 Move bootctl zsh completion file too to new package
* b47be01659 Revert "Revert installing systemd-networkd-varlink.socket"
* 71a425dd3b ukify: recommend sbsigntool | pesign for signing
* 54f67475ee Revert installing systemd-networkd-varlink.socket
2025-07-13 05:49:09 +09:00
Yu Watanabe
c3116558ad mkosi: drop SysV compat files from packages
These workarounds can be dropped when the downstream .spec or filelists
are updated.
2025-07-13 05:49:09 +09:00
DaanDeMeyer
08197abb15 mkosi: Fix installation conditions for rpmautospec-rpm-macros
rpmautospec-rpm-macros is only in EPEL 9 so let's gate it properly
on that by splitting up the epel packages config file into two.

erofs-utils is in EPEL 9 and in CentOS Stream 10.
2025-07-11 09:48:29 +02:00
DaanDeMeyer
e05ba0662b mkosi: Drop epel-next repository for CentOS
It does not exist for CentOS Stream 10, it's only relevant for CentOS
Stream 9 in some corner cases which don't apply to us, so let's not enable
it to avoid complexity instead of only enabling it for CentOS Stream 9.

Follow up for 3800adc9e5
2025-07-11 08:54:40 +02:00
DaanDeMeyer
7f76ff2821 tree-wide: Use "mkosi box" instead of "mkosi sandbox"
The box verb was added as a synonym for sandbox. sandbox still works,
but let's switch to box as it's shorter.
2025-07-10 16:24:34 +02:00
DaanDeMeyer
a4488ae6ae mkosi: Drop unnecessary [Match] sections
These are already satisfied in every path that includes pkgenv.conf.
2025-07-10 16:24:34 +02:00
DaanDeMeyer
3800adc9e5 mkosi: Simplify centos/fedora configuration
Both EPEL 9 and 10 now have the packages we need except for dhcp-server
so let's get rid of the EPEL conditionals and simply skip the tests that
require dhcp-server on CentOS.

While we're at it, make sure we use the new Architecture=uefi match in
mkosi to simplify the uefi checks.
2025-07-10 16:24:34 +02:00
DaanDeMeyer
24a14e9050 mkosi: update mkosi commit reference to 184472f0f1f831ca29953546ec01fd941ff763a6
* 184472f0f1 mkosi-tools: make sure p11-kit dir exists when configuring module
* 9fb807884e mkosi-tools: Explicitly install p11-kit
* 9131877d60 Support matching against architectures with uefi support
* f1eab5a783 Rename sandbox verb to box
* d609f55d98 Fix /var/tmp directory cleanup
* 4997b9495c build(deps): bump github/codeql-action from 3.28.18 to 3.29.2
2025-07-10 16:24:34 +02:00
Andres Beltran
c777c05125 test: add test for quotas on Exec directories 2025-07-07 17:31:05 +00:00
Luca Boccassi
7c6e78a6bc mkosi: update debian commit reference to cc380fbc8af2e17165623d16630b7fc3ab4291d0
* cc380fbc8a Install new files for upstream build
* 45f81ec53e Install new files for upstream build
* 105837d0ba Update changelog for 257.7-1 release
* bb17074bfd systemd-boot: reduce harmless noise on cleanup
* 363898fe05 systemd-boot: remove fb too on removal
2025-07-04 20:17:51 +02:00
Luca Boccassi
5d9881b89c mkosi: libclang-rt-dev is not available on s390x
Doesn't seem intentional, so use a regex for now:
https://bugs.debian.org/1108683
2025-07-03 22:54:43 +01:00