Commit Graph
80574 Commits
Author SHA1 Message Date
Yu Watanabe ef0f8397a5 udev: move inotify watch related functions to udev-watch.c 2025-04-05 07:10:17 +09:00
David C. Manuelda 668d915a4b boot: only link libgcc when compiler is gcc
When compiling in systems which do not have gcc installed
(like a musl+llvm system) the forced linkage "-lgcc" is
stopping it to compile. As when compiler is clang it do not
need to link explicitelly to gcc I've modified meson to only
link to gcc library when compiler is gcc.

Closes: #35162
2025-04-05 07:02:37 +09:00
Matteo Croce 936e298f0e use grep whole-word search
grep supports whole-word search with `-w`, no need to look for a
trailing space.
2025-04-05 05:24:30 +09:00
Beniamino Galvani f7996e2a33 network: add support for HSR netdev
Add support for creating HSR/PRP interfaces. HSR (High-availability Seamless
Redundancy) and PRP (Parallel Redundancy Protocol) are two protocols that
provide seamless failover against failure of any single network component. They
are both implemented by the "hsr" kernel driver.
2025-04-05 05:23:53 +09:00
Luca Boccassi c1b0e39ffd tree-wide: allow building with -Werror=flex-array-member-not-at-end (#36993)
Fixes #36988.
2025-04-04 18:37:54 +01:00
Mike Yuan b157a7e613 core: also stash executor path in Manager
Prompted by b58c240312

Let's not query it over and over again in exec_spawn().
2025-04-05 02:33:00 +09:00
Yu Watanabe c3c905c6c1 TEST-64-UDEV-STORAGE: enable debug logging and set timeout
For debugging the following failure:
```
41/95 systemd:integration-tests / TEST-64-UDEV-STORAGE-mdadm_basic                              TIMEOUT        1800.02s   killed by signal 15 SIGTERM
[   30.902392] TEST-64-UDEV-STORAGE.sh[517]: + sfdisk --wipe=always /dev/md/mdmirpar
[   31.326202] TEST-64-UDEV-STORAGE.sh[517]: + udevadm trigger --settle --parent-match /dev/md/mdmirpar
[  900.971338] kauditd_printk_skb: 10 callbacks suppressed
[  900.971343] audit: type=1130 audit(1743767825.783:146): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-clean comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  900.974057] audit: type=1131 audit(1743767825.786:147): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-clean comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Finishing after writing 68494 entries
qemu-kvm: terminating on signal 15 from pid 131949 (/usr/bin/python3)
```
2025-04-05 02:32:13 +09:00
Yu Watanabe 99d704c6e8 stat-util: drop unnecessary call of xopenat() in xstatfsat() 2025-04-05 00:13:01 +09:00
Yu Watanabe fe30942cda udev-spawn: search executed command in build directory (#36985)
This makes pin_callout_binary() optionally provides the path of the pinned
binary, and makes it used in udev-spawn.c, to allow easy debugging of
program invocations requested by RUN{program} and friends.
2025-04-05 00:11:15 +09:00
Yu Watanabe 7200827885 udev-spawn: search executed command in build directory
This should be useful when debugging RUN{program}= and friends.
2025-04-04 21:10:25 +09:00
Yu Watanabe b58c240312 build-path: make pin_callout_binary() optionally provides the path to the found executable 2025-04-04 21:02:18 +09:00
Yu Watanabe 2c31eda469 build-path: check if found path is executable binary
Otherwise, the path may point to a non-executable, e.g. a directory.
2025-04-04 20:56:11 +09:00
Yu Watanabe ab29e77aa9 meson: enable -Werror=flex-array-member-not-at-end 2025-04-04 20:54:53 +09:00
Yu Watanabe d307410327 ethtool: do not embed struct with flexible array into another struct
To allow compile ethtool-util.c with -Werror=flex-array-member-not-at-end.
2025-04-04 20:54:53 +09:00
Yu Watanabe a8d4be01f4 sbsign: rename WIN_CERTIFICATE -> WIN_CERTIFICATE_HEADER and drop trailing flexible array
To allow building sbsign with -Werror=flex-array-member-not-at-end.
2025-04-04 20:54:53 +09:00
Yu Watanabe b547f3eb92 boot: allow building sd-boot with -Werror=flex-array-member-not-at-end 2025-04-04 20:54:53 +09:00
Yu Watanabe 5b160db520 dhcp: split out DHCP_MESSAGE_HEADER_DEFINITION to allow building test-dhcp-server.c with -Werror=flex-array-member-not-at-end 2025-04-04 20:54:53 +09:00
Antonio Alvarez Feijoo cec81b234c gpt-auto-generator: fix memory leak
Follow-up for 74cfd0921c
2025-04-04 20:02:02 +09:00
Javier Francisco 7dce799f5c po: Translated using Weblate (Spanish)
Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Javier Francisco <fserrador@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/es/
Translation: systemd/main
2025-04-04 13:56:53 +09:00
Daan De Meyer a0ca911d63 mkosi: Fix arch build script version sed expression
Yours truly got rid of the _tag variable in the Arch Linux PKGBUILD
a while ago, so actually adapt the build script to that by changing
the pkgver= variable instead.
2025-04-03 23:15:40 +01:00
Matteo Croce e39062b0ba test logind restart with different classes
Test logind restart with every possible value of XDG_SESSION_CLASS
2025-04-03 23:14:42 +01:00
Daan De Meyer 9d4b82ef0c Two more mkosi updates (#36992) 2025-04-03 18:56:59 +02:00
Daan De Meyer e463d6bf69 mkosi: update fedora commit reference
* 08ce156d74 fmf: Run mkosi genkey before mkosi summary
* 1126a7c6b8 Download commit archives via full sha instead of short one
* cc473d807f fmf: Check out mkosi to some directory in /var/tmp
2025-04-03 16:38:31 +02:00
Daan De Meyer 0298ddb881 docs: Make sure we run mkosi genkey before everything else
Otherwise other commands might fail saying the keys don't exist
yet.
2025-04-03 16:37:56 +02:00
Daan De Meyer b6649f933b timedate: Use timestamp_is_set() more
Aside from just being cleaner, this also solves bogus compiler warnings
we're seeing when building on CentOS Stream 9 (-Wmaybe-uninitialized)
2025-04-03 15:35:11 +02:00
Daan De Meyer 6da246528e mkosi: Point ssh key and certificate to top level dir as well (#36989) 2025-04-03 15:34:44 +02:00
Daan De Meyer 3503f49d98 mkosi: Switch to KernelInitrdModules=
No change in behavior, just switching to the new setting implemented
by @keszybz.
2025-04-03 15:10:00 +02:00
Daan De Meyer 10eee5b7ac mkosi: Pass through NO_SYNC to tools and subimages as well
The tools tree now invokes mkosi.sync, so we have to pass through
NO_SYNC as well.
2025-04-03 15:10:00 +02:00
Daan De Meyer a25a539ee8 mkosi: Point ssh key and certificate to top level dir as well
Follow up for 342d21ef19
2025-04-03 15:09:58 +02:00
Daan De Meyer 8214292fe8 mkosi: Fix ExtraSearchPaths= for build directory
follow up for 342d21ef19
2025-04-03 14:36:11 +02:00
Lennart Poettering 3777c6e65a udev: new "image_dissect" builtin that can be used to generate symlinks based on partition designators (#36631)
This replaces #36209 and implements this via a new builtin, rather than
by shelling out to systemd-dissect.

Replaces: #36209 
Replaces: #28894
Fixes: #34319 
Fixes: #33453 
Fixes: #27897
Fixes: #18035
2025-04-03 13:32:11 +02:00
Lennart Poettering 2caa462504 build-path: make invoke_callout_binary() honour $PATH as last resort
If we cannot find the callout we need in the build dir let's look for it
in $PATH as last resort.

This makes invoke_callout_binary() usable for all binaries we install
into $PATH (as opposed to /usr/lib/systemd), but has no effect
on callout binaries specified with full path.

This is useful, since we soon want to invoke journalctl as a callout.
2025-04-03 19:40:30 +09:00
Yu Watanabe f5729bbb1e generator: two minor tweaks to fsck code (#36970) 2025-04-03 19:19:54 +09:00
Daan De Meyer 0bcbb047a2 mkosi: Move all mkosi configuration into mkosi/ subdirectory (#36954) 2025-04-03 12:18:47 +02:00
Yu Watanabe 23e724f23e two udev blkid builtin tweaks (#36968)
Fixes: #34319
2025-04-03 18:44:56 +09:00
ZIHCO 653b42c853 test: add a new unit test, src/test/test-binfmt-util.c 2025-04-03 18:32:23 +09:00
Lennart Poettering 50270ecee3 update TODO 2025-04-03 11:08:57 +02:00
Lennart Poettering c481605d0d man: document new gpt-auto-generator features 2025-04-03 11:08:57 +02:00
Lennart Poettering e5d2701bc2 gpt-auto-generator: write fsck override unit to "middle" generator dir
We generally let gpt-auto-generator write to the "late" generator dir,
so that the explicit fstab-generator can write to the "middle" one. And
I think we should leave it that way. But we also want to override the
generic systemd-fsck-root.service service potentially, and if we'd do
that in the "late" generator dir, it would be pointless, since that's
ordered *after* the static version hence would never be taken into
consdiration.

Hence clean this up: keep writing to the late dir for everything,
except for the fsck stuff.
2025-04-03 11:08:57 +02:00
Lennart Poettering 96386bb5a7 veritysetup: when we fail to unlock a disk with the root hash signature logic, retry without
Currently, there's no nice way to get a key into the dm-verity kernel
keyring unless recompiling the kernel, or enabling SB or buying into
shim. Neither sounds particularly attractive.

hence provide a reasonable fallback: if unlocking with signed roothash
doesn#t work, just try without. maybe the kernel policy allows this,
maybe not. It's worth a try.
2025-04-03 11:08:57 +02:00
Lennart Poettering bcd904d471 dissect-image: move extension release arguments of verity_dissect_and_mount() into a structure 2025-04-03 11:08:57 +02:00
Lennart Poettering a05b344330 man: document image filters 2025-04-03 11:08:57 +02:00
Lennart Poettering 74cfd0921c gpt-auto-generator: parse systemd.image_filter= from kernel cmdline 2025-04-03 11:08:57 +02:00
Lennart Poettering f02868d296 builtin-dissect_image: add support for image filters 2025-04-03 11:08:57 +02:00
Lennart Poettering 743667e069 dissect-tool: expose image filtering via new --image-filter= parameter 2025-04-03 11:08:57 +02:00
Lennart Poettering f1395724f6 dissect-image: add a concept for "filtering" partitions we dissect
DDIs may contain multiple versions of the same OS, or even multiple
OSes. Hence it makes sense to not just pick the "newest", whatever that
might be, but only partitions associated with specific images, or in a
specific version.

Let's a concept for such filtering: a per-designator glob expression
that can be applied to the partition label string, and can be used for
such filtering.

Usecase: when picking UKI belonging to OS image X in version Y, make
sure we only pick a /usr/ partition belonging to X in version Y, and a
root and home partition belonging to X in any version.

This only adds the basic infrastructure, but doesn't actually expose it
anywhere.
2025-04-03 11:08:57 +02:00
Lennart Poettering fb008a7333 veritysetup: optionally pick up roothash/roothashsig from udev device db entry 2025-04-03 11:08:57 +02:00
Lennart Poettering 0a64b7ba6e gpt-auto-generator: add support for setting up verity partitions automatically
So far the gpt-auto-generator would only cover unprotected and encrypted
partitions. Teach it handling of verity too.
2025-04-03 11:08:57 +02:00
Lennart Poettering 7852e301e0 gpt-auto-generator: add support for mount.usr=dissect
So far, we did not support auto-discovery the /usr/ partition at boot.
Change that: on explicit request (i.e. mount.usr=dissect) automatically
discover the /usr/ partition based on our usual dissection logic.
2025-04-03 11:08:57 +02:00
Lennart Poettering c05a132fef generator: add root=off to explicitly turn search for rootfs off
This is useful when booting into storage target mode, where we do not
want to enter a root fs, we just want to stay forever in the initrd,
and hence there's value in not even generating and jobs to find the
rootfs
2025-04-03 11:08:57 +02:00