1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-27 07:22:31 +03:00
Commit Graph

30 Commits

Author SHA1 Message Date
Daan De Meyer
139b6fb16f mkosi: Make sure persistent journal storage is enabled
We ship with empty /var, so /var/log/journal does not exist, which
means journald does not do persistent logging. Let's fix that by
setting the config to explicitly enable persistent logging.
2023-05-22 22:19:41 +02:00
Zbigniew Jędrzejewski-Szmek
fbecfbe224 mkosi: use wildcard to shorten things 2023-05-18 15:23:27 +02:00
Daan De Meyer
1fb59099f6 mkosi: Drop squashfs dropin
This accidentally got pulled into a commit even though it was only
for local testing, let's drop it again so we correctly use erofs
when building local images.
2023-05-15 15:41:53 +02:00
Daan De Meyer
3dca0b3661 mkosi: Install tmux in the final image
We currently have to resort to SSH to get more than one interactive
terminal in a mkosi qemu VM. Let's increase our options by installing
tmux in the final image, which can multiplex the serial console into
many unique terminal sessions.
2023-05-15 11:45:58 +01: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
724683c27f mkosi: Store /etc under /usr/share/factory/mkosi
If we're making a /usr only image, we still want to populate /etc
fully on first boot. To make that possible, let's copy /etc to
/usr/share/factory/mkosi in a finalize script, which runs after
all changes to the image have been made. Let's also add a tmpfiles
snippet that merges /usr/share/factory/mkosi with /etc on boot to
populate /etc.
2023-05-13 09:17:15 +02:00
Daan De Meyer
104afc7300 mkosi: Use zstd compression on non-centos distros
Just because centos doesn't support it doesn't mean we can't use it
on the other distros.
2023-05-12 11:38:02 +02:00
Daan De Meyer
33ad6163ba mkosi: Only build initrd if Bootable= is enabled or set to "auto"
With this change, Bootable= can be set to "no" for a faster build
intended for booting in systemd-nspawn but not qemu.
2023-05-12 11:38:02 +02:00
Daan De Meyer
a84cc71e7a mkosi: Use initrd symlink without format/compression
This way, we can change the compression (and even the output format)
in the future without having to modify the final preset.
2023-05-12 11:38:02 +02:00
Daan De Meyer
1d07c3de79 mkosi: Install apt in Debian/Ubuntu images 2023-05-11 12:18:50 +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
b811b9addf mkosi: Add back accidentally removed .gdbinit file 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
4decc7a514 mkosi: Replace root password setting with a credential 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 1394a3ec35 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
64ff6ad494 mkosi: Use kernel-kvmsmall package on opensuse
Let's save on image size by using the kernel build for KVM from
opensuse.
2023-05-03 20:49:41 +01: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