Commit Graph
80567 Commits
Author SHA1 Message Date
Mike Yuan 40d54c2da0 procfs-util: modernize convert_meminfo_value_to_uint64_bytes() 2025-04-04 15:34:51 +02:00
Mike Yuan 110d0ff1fa procfs-util: use xsprintf() where appropriate 2025-04-04 15:34:51 +02:00
Mike Yuan 77a0d2e3ec core/cgroup: remove legacy hierarchy setup
This also makes pin_cgroupfs_fd actually pin the fs root,
so that we can port all cg_* helpers to operate under
the fd later on.
2025-04-04 15:34:51 +02:00
Mike Yuan be1d96dbc3 core: remove cgroups-agent 2025-04-04 15:34:51 +02:00
Mike Yuan f0f2675e24 mkosi: update debian commit reference
* 4643263123 Add NEWS entry to warn about network connectivity loss due to mDNS, and workaround
* c995755707 Update changelog for 257.4-9 release
* 5e2ba1a045 resolved: break mDNS, remove conflict with avahi
* 6cf6fa39b4 Update changelog for 257.4-8 release
* 5067878f3a reintroduce systemd-resolved, with conflict on avahi-daemon
* 60c0d67e45 d/rules: drop nscd meson option
* 542de2ed44 Install new files for upstream CI
* 1e9b0e30da d/t/boot-and-services: skip gdm3 test in nested LXD run
* 4142fb487b systemd.preinst: fix shellcheck warnings
* 7879441e78 systemd.preinst: do not use systemctl
* 1d5ba16cf0 Update changelog for 257.4-7 release
* ddd3438e04 autopkgtest: re-enable integration tests
* 98698b582f autopkgtest: fix debugging leftover
* f62660777f Backport patches to fix integration tests skipping
* b7308013af autopkgtest: when nested tests-in-lxd skips don't fail outer run
* d5e96c6e56 Update changelog for 257.4-6 release
* 2493e2ffc7 Add Lintian override for 'unknown-field Protected'
* e27ebff834 d/control: fix systemd-boot and systemd-boot-tools descriptions
* 705fff1663 systemd: conflict with dracut on arm64
* 7e92bc39e9 Update changelog for 257.4-5 release
* 7638a4dcc1 autopkgtest: fix unit-tests for upstream CI
* 83a6bbe55a Add missing dh-exec shbang to d/systemd-tests.install
* 11b82593a5 Update changelog for 257.4-4 release
* f221a72abd Drop systemd-nspawn on arm64
* b8ecb66d05 Drop systemd-resolved package
* 560cde98d7 Move leftover resolved files to its own package
* fc2758d02d autopkgtest: drop versioning constraints on tzdata
* b2b7c59141 autopkgtest: remove workaround for 'meson compiile mkosi' and use 'mkosi -f' instead to avoid slow rebuilds
* 17e11869b5 systemd.postinst: add markers for janitor removals
* 581a5994f5 Handle new tmp mount on upgrade in preinst rather than postinst
* 58f6a4f689 d/control: only conflict against opensysusers << 0.7.3-4.1~
* 6dee609537 userdb: fix wildcard matching
* cf722bcd44 systemd-container: use more wildcards to install files
* 2339308f43 userdbd: use wildcard to install units
* a663f671bd Add myself to Uploaders
* 4a5bef9a48 Install new files
* c529659001 Drop systemd-cgroups-agent with upstream profile
* 970061c678 d/rules: add TODO reminder to drop Ubuntu-specific workaround
* 88fc574439 systemd-boot: do case-insensitive parsing of efibootmgr output
* eecb9466e0 Update tzdata-legacy version constraint for new bookworm-p-u tzdata version
* 5d9570efad Update changelog for 257.4-3 release
* 614efde487 Fix versioned breaks/replaces for sd-boot-tools
2025-04-04 14:36:14 +02:00
Mike Yuan 2a010ef8fd cgroup-util: remove now unused cg_kernel_controllers() 2025-04-04 14:36:14 +02:00
Mike Yuan b26a994fb8 nspawn: reject existing cgroupfs mount if cgns is enabled 2025-04-04 14:36:14 +02:00
Mike Yuan 02c4d27b17 nspawn: do not spuriously override cgroup2fs options on host 2025-04-04 14:36:14 +02:00
Mike Yuan 1614ca809e nspawn/meson: drop duplicate condition on ENABLE_NSPAWN
Follow-up for d95818f522

The whole dir is skipped if disabled, so no need for individual
conditions below.
2025-04-04 14:36:13 +02:00
Mike Yuan 6801a9d88a nspawn: drop cgroup v1 handling 2025-04-04 14:36:11 +02: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
Lennart Poettering 198f7badaa gpt-auto-generator: optionally, set up root fs via dissection logic
This introduces root=dissect, which is a lot like root=gpt-auto, but
uses the image dissection logic to find the root partition. It's also
based on the GPT efi var telling us about the root disk, but instead of
just picking some suitable root disk manually it uses the dissection
logic.

This is a big step forward, since it means we can actually make
use of the image policy logic for the root fs too.
2025-04-03 11:08:57 +02:00
Lennart Poettering 1e6f03a45d dissect-image: relax image policy logic a bit
Previously if we found a verity signature partition in an image, and the
image policy required "verity" (but did not allow "signature") we'd
refuse the image. This is of course unnecessarily strict: if "verity" is
allowed, we can make use of the verity data, and ignore the signature
data.

hence, relax the rules here: when we pick up a partition and want to
test it against the policy, always consider all "weaker" uses too, maybe
they are allowed if the "stronger" users isn't.
2025-04-03 11:08:57 +02:00
Lennart Poettering e34c89897a dissect-image: guess verity root hash from the resources we found
When dissecting an image, let's make use of the Verity data even if we
got told no root hash explicitly: we can simply determine it by
concatenating the data partition uuid with the verity partition uuid.

Of course, on first thought this doesn't really add much: if the root
hash is not pinned from somewhere, this does not guarantee trust in
the image.

However, this is very useful for attestation: if we have the root hash
we can measure it before mounting things, even if we don't actually
authenticate it.

Hence, at best this helps us with attestation, at worst it doesn't improve
security but certainly doesn't hurt it.
2025-04-03 11:08:57 +02:00
Lennart Poettering 923eabf085 dissect-image: rework how we determine that we are ready to do verity/verity-sig
Previously, if during early enumeration of the partition table we
figured out we have a verity + verity-sig partition, we determined we are
"ready" to do verity/verity-sig, as reported by the "verity_ready" and
"verity_ready_sig" fields of DissectedImage.

Let's rework this: only determine we are ready in case the VeritySettings
structure is fully populated. Mark verity-sig/verity only as ready once
we actually *load* the verity sig metadata from the special partition.

This is conceptually more correct, as we consider things "ready" only if
we actually have all data for it loaded. It's also preparation for a
later commit that guesses the verity root hash based on what we discover.
2025-04-03 11:08:57 +02:00
Lennart Poettering a8b2302bc1 udev: add dissect_image builtin
Fixes: #33453 #27897 #18035
2025-04-03 11:08:57 +02:00
Lennart Poettering e71f60476b udev-builtin-blkid: skip GPT dissection unless we actually have partition support 2025-04-03 11:08:57 +02:00
Lennart Poettering 5d3243bd46 udev-builtin-blkid: look for ESP/XBOOTLDR only in initrd; afterwards just look at /
So far the gpt-auto symlinks would point to:

   1. the disk the ESP/XBOOTLDR is located on
   2. or to a loopback device whose filename field is set to "rootdisk"
      or "rootdisk.raw"

This makes sense in the initrd. But once we transition to the host this
is quite confusing, since the symlinks might point to a different place
than what we actually ended up transitioning too: the actual backing
device of the root file system might be different from what gpt-auto
found.

Let's clean this up: let's avoid any ambiguities here: let's extend the
rules above with one more rule:

   3. if we left the initrd, we'll make gpt-auto point to the selected
      root file system, if it otherwise would have been a candidate.

Or in other words, the ID_PART_GPT_AUTO_ROOT_DISK=1 udev property now
always makes sense: in the initrd it points to the future root disk, and
on the host to the actual root disk.

Fixes: #34319
2025-04-03 11:08:57 +02:00