Commit Graph
79650 Commits
Author SHA1 Message Date
Lennart Poettering 94adab1e4e udev,sd-device: always use synthetic UUID when triggering uevent (#36514)
This drops support of kernels older than 4.13.
2025-02-26 11:59:42 +01:00
Lennart Poettering 9d0df6622a tpm2-setup: two fixes for tmpfile handling (#36521) 2025-02-26 11:19:43 +01:00
Yu Watanabe 2c051721ec sd-device: always pass random UUID on triggering uevent
Then, this makes sd_device_trigger() a simple wrapper of
sd_device_trigger_with_uuid().
2025-02-26 18:07:51 +09:00
Yu Watanabe fde9f2bc48 udevadm-trigger: drop support of kernels order than 4.13
Now our kernel baseline is 5.4, hence we can always write action string
with a synthetic UUID.
2025-02-26 18:07:51 +09:00
Yu Watanabe 0e1c87b4aa udev-builtin-uaccess: modernize code
No functional change, just refactoring.
2025-02-26 18:07:51 +09:00
Yu Watanabe df7cef0940 udev-util: drop unnecessary inclusion of missing_threads.h
Follow-up for a3df693799.
2025-02-26 18:07:51 +09:00
Lennart Poettering d5de148996 doc: add document explaining the 3 key components of the boot and how we find the rootfs
After the network boot PR got merged we can use some more high-level
docs I guess.
2025-02-26 09:55:43 +01:00
Lennart Poettering d10d5a0508 tpm2-setup: remove redundant fflush_and_check()
The immediately following flink_tmpfile() does that anyway, hence no
need to do so explicitly beforehand.

(Also the log message was wrong: it says "sync" but here we "flush",
which is a much weaker operation)
2025-02-26 09:13:37 +01:00
Lennart Poettering f4e5a73000 tpm2-setup: add missing O_CLOEXEC at two places 2025-02-26 09:13:26 +01:00
Andreas Stührk b66291444b copy: Invoke hardlink context cleanup before restoring timestamps
When hardlink recreation is requested, it creates temporary files that
will be deleted once the context is destroyed. The deletion
(potentially) updates the directory's timestamps, so it's crucial that
the deletion happens before the directory timestamps are restored when
`COPY_RESTORE_DIRECTORY_TIMESTAMPS` is requested.
2025-02-26 09:07:26 +01:00
Lennart Poettering 441dce159b timesync: several trivial cleanups (#36506) 2025-02-26 09:02:50 +01:00
Lennart Poettering 593143fd47 sd-bus: sort enumerated child objects (#36507)
Fixes #8008.
2025-02-26 09:02:36 +01:00
Lennart Poettering a556bb6053 make integritysetup/veritysetup more alike cryptsetup when it comes to remote operation (#36501)
Let's address some asymmetries here.
2025-02-25 23:20:56 +01:00
Lennart Poettering 74615506e2 systemd-boot: some refactorings (#36510)
Clean up systemd-boot a bit. Mostly makes handling of some menu entry
types less magic and more uniform. Doesn't really change behaviour in
any ways, except that we now condition things such as boot counting,
random seed management and entry selection saving carefully on the entry
type.
2025-02-25 23:20:34 +01:00
Luca Boccassi 6321ec2dfa packit: Switch to meson.version for the current version (#36509) 2025-02-25 21:07:56 +00:00
Lennart Poettering 810708f4b8 integritysetup: add remote-integritysetup.target to match remote-{crypt|verity}setup.target
Let's make the three subsystems more alike, and add remote-*setup.traget
for all three, enable them all three in the presets, and make them
behave in a similar fashion.
2025-02-25 21:40:05 +01:00
Lennart Poettering 65ced7578e preset: enable remote verity targets too
Let's make cryptsetup and veritysetup more symmetric, and enable the
remote target for the latter the same way we enable the remote target
for the former by default.
2025-02-25 21:38:39 +01:00
Lennart Poettering 395ac1c448 boot: split out call that adds reboot/poweroff/firmware entries 2025-02-25 21:15:10 +01:00
Lennart Poettering 612bc71210 boot: make secure boot enrollment less special
This is the last entry type that has special handling: with this in
place we now always invoke entry handlers the very same way. via the
.call() method of the BootEntry structure.
2025-02-25 21:15:10 +01:00
Lennart Poettering fb09163a01 boot: move check if secure boot enrollment applies to a single place
Let's check if sb enrollment applies at a single place: inside the
discovery function, and let's not bother with additional checks later.
2025-02-25 21:15:10 +01:00
Lennart Poettering fb6cf4bbb7 boot: make regular entries less special
Let's try to always invoke entries via the call() method of BootEntry
objects, to stick to a single uniform way to do so.
2025-02-25 21:15:10 +01:00
Lennart Poettering d870ae47b7 boot: only save entry for some entry types
Much like the previous one, let's also condition the entry selection
saving on entry types.
2025-02-25 21:14:27 +01:00
Lennart Poettering ae5e7f17d0 boot: only do random seed management for some entry types
Similar to the previous commits, let's carefully condition random seed
management (which might be slow, and simply pointless for various entry
types) on the entry type.
2025-02-25 21:14:27 +01:00
Lennart Poettering 729f3c21c5 boot: only do boot counting management for some menu entries
Let's do boot counting only for some menu entry types, and carefully
list which types those are.
2025-02-25 21:14:27 +01:00
Lennart Poettering 4801e16401 boot: make .call() method of BootEntry more complete
Let's pass some context information to the .call() methods so that it's
sufficient to implement the handlers for all entry types with them.

(This commit doesn't port the various entry types over though, that
happens in later commits.)
2025-02-25 21:14:27 +01:00
Lennart Poettering 95086da39f boot: split out line editor
let's make this beast of boot.c a bit more digestable
2025-02-25 21:08:38 +01:00
Daan De Meyer 6a55862516 packit: Switch to meson.version for the current version 2025-02-25 19:30:47 +01:00
Daan De Meyer 89a5ea6583 mkosi: update fedora commit reference
* 9b6884d2e1 Stop using version_no_tilde for github archives
* 5671cf6132 List the fallback Source0 first
2025-02-25 19:30:42 +01:00
Lennart Poettering 33ab1b5b7e meson: add more space for sections
I ran into the limit with ParticleOS, with 6 profiles, hence I think the
current default value is a bit low. let's bump it 4x, to 120. This is
still a lot lower than 500 or so which Debian uses downstream.

We can look into raising this further should we collide with this again,
but for now, let's try 120 and see how it goes in practice.
2025-02-26 00:33:55 +09:00
Yu Watanabe ed3a95b2fb test-bus-object: check if enumerated objects are sorted 2025-02-25 23:41:20 +09:00
Yu Watanabe 31cdcca8dc sd-bus: sort enumerated child objects
Fixes #8008.
2025-02-25 23:41:20 +09:00
Lennart Poettering b7908e1cb7 update TODO 2025-02-25 14:32:23 +01:00
Daan De Meyer 54b67a669f mkosi: Enable History= option (#36500)
This option makes mkosi "remember" all the CLI options specified on the
command line when building an image. This means they don't need to be
specified again when booting the image afterwards or doing any other
operation on the image with "mkosi xxx".

As an example of how this is useful, currently, when running "mkosi -d
opensuse -f" to build an opensuse image and then running "mkosi sandbox
-- meson test -C build TEST-86-MULTI-UKI-PROFILE", running the test will
try to add virtiofs mounts of the fedora~rawhide build directory on my
machine instead of the opensuse one. With the History= option enabled,
it will use the opensuse tumbleweed directory as expected.
2025-02-25 12:44:41 +01:00
Daan De Meyer 75cf5b0d3a mkosi: Enable History= option
This option makes mkosi "remember" all the CLI options specified on
the command line when building an image. This means they don't need
to be specified again when booting the image afterwards or doing any
other operation on the image with "mkosi xxx".

As an example of how this is useful, currently, when running "mkosi
-d opensuse -f" to build an opensuse image and then running "mkosi
sandbox -- meson test -C build TEST-86-MULTI-UKI-PROFILE", running
the test will try to add virtiofs mounts of the fedora~rawhide build
directory on my machine instead of the opensuse one. With the History=
option enabled, it will use the opensuse tumbleweed directory as expected.

We stop setting --extra-search-path and --output-dir in the integration test
wrapper as these are settings that are "remembered" by enabling the History=
option.
2025-02-25 10:59:50 +01:00
Daan De Meyer 890e1ad318 test: Do not add integration tests if want_tests == 'false' 2025-02-25 10:59:50 +01:00
Daan De Meyer a5bfd056c1 bootctl-install: Use i2d_PKCS7() instead of i2d_PKCS7_SIGNED()
For a detached signature, these are equivalent so let's use i2d_PKCS7()
like we do everywhere else.
2025-02-25 09:49:53 +00:00
Daan De Meyer ba29de84cf TEST-64-UDEV-STORAGE: Stop using mkosi configure scripts
Now that we have mkosi sandbox, meson runs with the mkosi tools tree
mounted (if one is used at all), so we can implement all the qemu feature
checks in meson itself, removing the need for mkosi configure scripts.
2025-02-25 10:13:50 +01:00
Daan De Meyer 2db2cb3034 TEST-53-ISSUE-16347: Implement rtc via custom argument
Let's get rid of the configure script for this use case by just
implementing the necessary logic in integration-test-wrapper.py.
We need to get rid of our usage of configure scripts to allow enabling
the History= setting.
2025-02-25 10:13:48 +01:00
Daan De Meyer 4b8edc68f9 mkosi: Update to latest 2025-02-25 10:13:36 +01:00
Yu Watanabe d83bfdd5b0 timesync: add short comment for boolean argument 2025-02-25 13:45:07 +09:00
Yu Watanabe 9c999b53b9 timesync: drop meaningless boolean flag
The boolean flag is always true, as manager_save_time_and_rearm() is
called unconditionally.

Follow-up for 33e82f3ef3.
2025-02-25 13:39:46 +09:00
Yu Watanabe 2960a8cfe8 timesync: use event_reset_time_relative()
No functional change, just refactoring.
2025-02-25 13:29:34 +09:00
Yu Watanabe 1930f5afe6 fuzz: decompress_startswith() may return zero (#36490)
Also, disables fuzz-compress on oss-fuzz.
Fixes #36472.
2025-02-25 11:05:06 +09:00
Luca Boccassi 323213cfea repart: when using erofs and log level is not debug, use --quiet
mkfs.erofs is extremely verbose and will log every single file added
to the filesystem, which is a lot of them when building a rootfs.
2025-02-24 14:55:25 +00:00
Dan StreetmanandLuca Boccassi af69ea714d systemd-keyutil: add verb to conver PKCS#1 to PKCS#7
Add verb that takes a PKCS#1 signature (plain rsa) as input and a
certificates, and outputs a PKCS#7 binary detached signature (p7s),
which is what the kernel dm-verity driver expects.

Co-authored-by: Luca Boccassi <bluca@debian.org>
2025-02-23 14:14:09 +00:00
Daan De Meyer 012fd82d43 fstab-util: port use of setmntent() and friends to libmount (#36489) 2025-02-23 12:21:19 +01:00
Mike Yuan 19e1a908b5 sd-event: pidfdize sd_event_source_send_child_signal()
Follow-up for c6cc7efcd3

The documentation has been updated, but apparently I forgot
to update the function itself...

Also, actually pass flags to pidfd_send_signal(). Previously
it was spuriously ignored.
2025-02-23 12:16:58 +01:00
Yu Watanabe 0656b3a083 fuzz: tentatively disable fuzz-compress on oss-fuzz
It does not work on oss-fuzz for some reasons. See #11018.
2025-02-23 05:37:05 +09:00
Yu Watanabe 339f2f2eeb fuzz: decompress_startswith() may return zero
Fixes #36472.
2025-02-23 05:04:49 +09:00
Yu Watanabe 8e0037fb3b sd-event: always operate on child source via pidfd (#36480) 2025-02-23 04:41:28 +09:00