Commit Graph

79661 Commits

Author SHA1 Message Date
Lennart Poettering
eee056443b udev: modernize udev-builtin-btrfs a bit
Let's in particular log an even if a device name is too long for the
btrfs ioctl structure, instead of truncating it (which could
theoretically reference a different device).
2025-02-26 15:06:06 +01:00
Lennart Poettering
f36b0ec14b notify-recv: several followups, port pid1 over too (#36492) 2025-02-26 15:05:46 +01:00
Mike Yuan
c578bf6e17 Expose chassis asset tag in hostnamed (#36487)
Closes #36442
2025-02-26 14:28:26 +01:00
Antonio Alvarez Feijoo
5d2d0c055b import/pull-tar: fix flag set
There is a typo passing flags to `install_file()`, if `IMPORT_READ_ONLY` is set,
`IMPORT_SYNC` is never checked.
2025-02-26 13:06:31 +00:00
Mike Yuan
5d09689b5c core/manager: port to notify_recv_with_fds() 2025-02-26 13:27:39 +01:00
Mike Yuan
4a5b06c5d1 shared/async: introduce asynchronous_close_many() helper 2025-02-26 13:02:28 +01:00
Mike Yuan
74cd56d31b notify-recv: several followups
Follow-up for 7f6af95dab

- Allocate internal buf on the stack, memdup() only at the end.
  This ensures we're able to handle OOM gracefully, i.e.
  return -EAGAIN on OOM while still emptying socket buffer.
- Do not treat empty notify message as error.
- Raise log level since all callers log loudly anyway.
2025-02-26 13:02:23 +01:00
Markus Kurz
2006e341d3 udev_device_has_tag: fix typo 2025-02-26 20:34:15 +09:00
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
Jelle van der Waa
d0f6d70548 hostnamed: prefer using SD_JSON_BUILD_PAIR_STRING 2025-02-26 11:29:25 +01:00
Jelle van der Waa
7e638ccf59 hostnamed: expose ChassisAssetTag in dbus/varlink
Expose /sys/class/dmi/id/chassis_asset_tag in varlink/dbus commonly used
by companies to track inventory such as laptops.

On desktops and other products the `chassis_asset_tag` can contain
rubbish similar to product_name/product_vendor.

Closes: #36442
2025-02-26 11:29:25 +01:00
Lennart Poettering
9d0df6622a tpm2-setup: two fixes for tmpfile handling (#36521) 2025-02-26 11:19:43 +01:00
Jelle van der Waa
39936a1b89 test: assert that product_serial is preferred over board_serial 2025-02-26 11:18:08 +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