1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-20 10:50:12 +03:00

33 Commits

Author SHA1 Message Date
Luca Boccassi
d943cdc28c Revert "bpf: test with GCC BPF compiler on opensuse"
The bpf build is currently broken with the gcc available in suse due
to a conflict with stdint headers definitions in socket-bind-api.bpf.h
after 30897ddf5018da21266e4b8a28a4a925c4681de4

This reverts commit e4086f7dc9c40578047fa26c669ffc4c1191b85c.

(cherry picked from commit 0ea06c5f01518ec61e3376c53c822ba619139abe)
2024-04-25 20:06:35 +02:00
Daan De Meyer
46d7486e16 mkosi: Stop using file provides with CentOS/Fedora
dnf5 does not download filelists metadata by default anymore as this
consists of a pretty big chunk of the repository metadata. Let's make
sure the filelists metadata doesn't have to be downloaded by dnf5 by
removing any usage of file provides from our package lists.

(cherry picked from commit dce5d31c751f48d8aecbbac818c9f0032733338a)
(cherry picked from commit 3587f2dd9ef5bbc2b905e9efc35533979f4a39ac)
2024-02-28 00:15:39 +00:00
Luca Boccassi
a3265422e5 mkosi: install libip4tc2 in debian/ubuntu
It's now a dlopen library and it is installed at build time via
libiptc-dev, but was never added to the running image.

Follow-up for 5b5f8f8b9aef405cdc42771e7876988d5aefb51e

(cherry picked from commit d6bf9b612ca23673b5af104a4c67cb3f8b4da560)
(cherry picked from commit 9c746dc5a467e830d5b224afb8d0e2224aabf5af)
2024-01-24 22:45:52 +00:00
Luca Boccassi
9edc143621 mkosi: update SUSE package list to fix build error
Problem: busybox-diffutils-1.36.1-30.2.noarch conflicts with diffutils provided by diffutils-3.10-1.5.x86_64
 Solution 1: deinstallation of busybox-diffutils-1.36.1-30.2.noarch
 Solution 2: do not install diffutils-3.10-1.5.x86_64
2023-11-30 09:55:50 +00:00
Luca Boccassi
0199f203cb mkosi: install sd-boot on opensuse in base image
Workaround for CI issue, the sd-stub we build is overwritten in the final
image as the package gets pulled there, install it in the base to
work around it for now
2023-07-26 22:02:58 +01:00
Luca Boccassi
febbc24ee0 mkosi: set default-keymap='' on Debian/Ubuntu 2023-07-24 15:43:16 +01:00
Daan De Meyer
3e0718f282 mkosi: Stop using python3.9 on CentOS 8
Let's get rid of all the complexity and just not build ukify on
CentOS Stream 8.
2023-07-14 14:52:08 +02:00
Daan De Meyer
9f89c2d420 mkosi: Update to latest
mkosi's match syntax was changed so we update our config files to
use the new match syntax which mimicks the systemd condition syntax.
2023-06-07 15:59:03 +02:00
Daan De Meyer
cc532533b8 mkosi: Enable more options
We build with support for selinux/apparmor where applicable but
disable them at runtime as even in permissive mode they're horribly
broken.
2023-06-02 17:25:23 +02:00
Daan De Meyer
a47c48cbb2 mkosi: Only lower device timeout instead of all timeouts
We only really care about lowering the device timeout so we get to
a shell faster when the root device doesn't appear so let's only
lower that timeout instead of lowering all default timeouts.
2023-06-02 15:43:28 +02:00
Daan De Meyer
88f7fb16f2 mkosi: Move python3-pytest-flakes to build packages on opensuse 2023-06-02 15:43:28 +02:00
Daan De Meyer
2ee97f56e1 mkosi: Add missing tss2 dependencies 2023-06-02 15:43:28 +02:00
James Hilliard
e4086f7dc9 bpf: test with GCC BPF compiler on opensuse 2023-05-30 13:30:28 +09:00
Luca Boccassi
05c9f9c251 stub: allow loading and verifying cmdline addons
Files placed in /EFI/Linux/UKI.efi.extra.d/ and /loader/addons/ are
opened and verified using the LoadImage protocol, and will thus get
verified via shim/firmware.
If they are valid signed PE files, the .cmdline section will be
extracted and appended. If there are multiple addons in each directory,
they will be parsed in alphanumerical order.

Optionally the .uname sections are also matched if present, so
that they can be used to filter out addons as well if needed, and only
addons that correspond exactly to the UKI being loaded are used.
It is recommended to also always add a .sbat section to addons, so
that they can be mass-revoked with just a policy update.

The files must have a .addon.efi suffix.

Files in the per-UKI directory are parsed, sorted, measured and
appended first. Then, files in the generic directory are processed.
2023-05-24 15:02:36 +01:00
Zbigniew Jędrzejewski-Szmek
fbecfbe224 mkosi: use wildcard to shorten things 2023-05-18 15:23:27 +02:00
Daan De Meyer
47e5e12866 mkosi: Package a erofs usr partition with signed verity
Let's start moving towards a more involved partitioning setup to
test our stuff more when using mkosi.

The root partition is generated on boot with systemd-repart.

CentOS supports neither erofs nor btrfs so we use squashfs and xfs
instead.

We also enable SecureBoot= locally for additional coverage. This
and the use of verity means users need to run `mkosi genkey` once
to generate the keys necessary to do secure boot and verity.
2023-05-13 10:49:17 +02:00
Daan De Meyer
fef33f9498 mkosi: Disable pamconfdir
Let's use the distro's pam config instead of installing the systemd one.
2023-05-11 12:18:50 +02:00
Daan De Meyer
94fe8c87c7 mkosi: Enable systemd-timesyncd by default 2023-05-11 12:18:50 +02:00
Daan De Meyer
949e1fdd52 mkosi: Disable auditd in the preset instead of masking it 2023-05-11 12:18:50 +02:00
Daan De Meyer
4f7582bc0b mkosi: Disable dnf-makecache.service by default 2023-05-11 12:18:50 +02:00
Daan De Meyer
b959570012 mkosi: Make sure we use systemd-networkd-wait-online
Disable the NetworkManager one and pull in the networkd one explicitly.
2023-05-11 12:18:50 +02:00
Daan De Meyer
db7a46ed5f mkosi: Disable create-log-dirs option
We run the build as a regular user and create-log-dirs requires to
run as root so let's disable the option to avoid error noise during
the install phase.
2023-05-11 12:16:47 +02:00
Daan De Meyer
3e9dd3cde0 mkosi: Stop creating test users in prepare scripts
This was added for opensuse to make the tests pass but doesn't seem
to be needed anymore after recent changes so let's drop it.
2023-05-11 12:16:47 +02:00
Daan De Meyer
4bfcb6ba27 mkosi: Don't run slow tests by default
Instead, allow enabling it via an environment variable and do so
in CI.
2023-05-11 12:16:47 +02:00
Yu Watanabe
c093bfe0ad
Merge pull request #27534 from keszybz/deperlify
Rewrite udev-test.pl in Python
2023-05-09 18:06:51 +09:00
Zbigniew Jędrzejewski-Szmek
98e2089f1b mkosi,ci: do not install perl 2023-05-09 08:11:10 +02:00
Zbigniew Jędrzejewski-Szmek
1bcad2de7c mkosi.build: print important build commands
This undoes the effect of 1394a3ec351048bae008627a0775d1f9a6c46294 partially.
We print the fairly verbose output of the build commands, so let's also
print the commands themselves. This makes it much easier to understand what
is going on.

(The style was copied from other scripts where we do 'set -x' for one command.)
2023-05-08 15:04:02 +02:00
Zbigniew Jędrzejewski-Szmek
385fb4e323 mkosi/fedora: silence warning about sysusers config mismatch 2023-05-08 15:04:02 +02:00
Zbigniew Jędrzejewski-Szmek
dede53943f mkosi.build: use bash, use array for configuration options, shellcheckify
With bash, we can use an array for options. This is nice because we can
construct the commandline more easily. The file is now shellcheck-clean.
2023-05-08 15:04:02 +02:00
Zbigniew Jędrzejewski-Szmek
9dfed0d4cc
Merge pull request #27262 from keszybz/ukify-install
Add kernel-install plugin that calls ukify
2023-05-06 13:34:08 +02:00
Zbigniew Jędrzejewski-Szmek
bac18826e9 ci: install pytest-flakes
Some web searches say that it's packaged for those distros and not the others…

v2:
- drop arch. https://aur.archlinux.org/packages/python-pytest-flakes exists,
  but installation fails in CI.
2023-05-05 18:42:37 +02:00
Daan De Meyer
bfb7635544 mkosi: Look for mkosi.kernel/ in the top level directory
Let's make this slightly easier to use by looking for mkosi.kernel/
in the top level directory instead of in mkosi.presets/20-final/.
2023-05-04 15:45:42 +02:00
Daan De Meyer
d052cc8893 mkosi: Switch to use mkosi presets with prebuilt initrds
Instead of building the initrds for the mkosi images with dracut,
let's switch to using mkosi presets to build the initrd with mkosi
as well.

This commit splits up our single image build into three separate
mkosi presets:

1. The "base" preset. This image contains systemd and all its runtime
dependencies. The sole purpose of this image is to serve as a base image
for the initrd and the final image. It's also responsible for building
systemd from source with the build script. The results are installed into
the base image. Note that we install the systemd and udev packages into this
image as well to prevent package managers from overriding the systemd we built
from source with the distro packaged systemd if it's pulled in as a dependency
by another package from the initrd or final profiles.
2. The "initrd" preset. This image provides the initrd. It's trivial and does
nothing more than packaging the base image up as a zstd compressed initramfs and
adds /init and /etc/initrd-release symlinks to the image.
3. The "final" preset. This image builds on top of the base image and adds
a kernel and extra packages that are useful for testing and debugging.

We also split out the optional kernel build into a separate set of config files
that are only included if a kernel to build is actually provided.

Note that this commit doesn't really change anything about how mkosi is used.
The commands remain the same, except that mkosi will now build all the presets
in order. "mkosi summary" will show the summary of all the presets. "mkosi qemu,
boot, shell" will always boot the final preset. With "-f", all presets will be
built and the final one is booted. "-i" makes a cache of each preset.

The only thing to keep in mind is that specifying config via the mkosi CLI will
apply to each of the presets. e.g. any extra packages added with "-p" will be
installed in both the initrd and the final image. To apply local configuration
to a single preset, create a file 00-local.conf in
mkosi.presets/<profile>/mkosi.conf.d and put all the preset specific configuration
in there.
2023-05-01 15:39:50 +02:00