Commit Graph

79973 Commits

Author SHA1 Message Date
Yu Watanabe
a030f8cc94 meson: bump required minimum version to 0.62.0
The commit 8442ac9c02 set
install_tag option to install_emptydir() calls, but it requires
meson-0.62.0. Hence, after the commit, we cannot build systemd
with older meson anymore. As using install_tag is quite useful
for building systemd package, let's bump the requirement of
meson version to 0.62.0.

Note, the current meson versions of major distributions are:
CentOS 9:  0.63.3
CentOS 10: 1.4.1
Fedora 40: 1.4.1
Fedora 41: 1.5.1
Ubuntu 20.04 LTS (focal): 0.53.2 -- EOL on 2025-04
Ubuntu 22.04 LTS (jammy): 0.61.2 -- EOL on 2027-04
Ubuntu 24.04 LTS (noble): 1.3.2
Ubuntu 24.10 (oracular):  1.5.2
Debian 11 (bullseye): 0.56.2 (1.0.0 in backports) -- EOL on 2024-08
Debian 12 (bookworm): 1.0.1  (1.5.1 in backports)
openSUSE Leap 15.6:  1.6.1
openSUSE Tumbleweed: 1.6.1

As the next version (v258) is not expected to be released before
the end of 2025-04, it is OK to cut the support of Ubuntu 20.04 LTS and
Debian 11. Also, our policy for support of distributions explicitly says
only latest Ubuntu LTS and non-LTS releases are supported.
Hence, we can also cut Ubuntu 22.04, even if it is not EOL.

Follow-up for 8442ac9c02.
Closes #35967.
2025-03-10 02:41:40 +09:00
Piotr Drąg
e645246c8d po: add false positives to POTFILES.skip
Scripts used to detect files that should be in POTFILES.in, like
intltool-update -m used on https://l10n.gnome.org/module/systemd/,
falsely detect these files as containing translations. Avoid this
behavior by putting the files in POTFILES.skip.
2025-03-09 11:38:47 +00:00
Henri Aunin
ef19119780 po: Translated using Weblate (Estonian)
Currently translated at 79.3% (204 of 257 strings)

Co-authored-by: Henri Aunin <contact+fedora@hen.ee>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/et/
Translation: systemd/main
2025-03-09 11:54:56 +09:00
Yu Watanabe
a5ede71f49 mount-setup: two trivial cleanups (#36668) 2025-03-09 09:42:41 +09:00
Yu Watanabe
a22ba8cdd7 core/main: several cleanups (#36669)
Prompted by #36622
2025-03-09 09:40:19 +09:00
H A
989f39e8b0 po: Translated using Weblate (Estonian)
Currently translated at 61.4% (158 of 257 strings)

Co-authored-by: H A <contact+fedora@hen.ee>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/et/
Translation: systemd/main
2025-03-09 08:36:23 +09:00
Mike Yuan
590e0e3bac core/main: correct retval for reexec/switch-root/soft-reboot
For these objectives we ought to execve() at the end, i.e. if we
ever hit the return path something went wrong in do_reexecute().
Let's properly report that via retval.
2025-03-08 20:49:30 +01:00
Mike Yuan
93e19483dc core/main: preemptively check existence of init only if we're switching root
Follow-up for aaa27e2e21

The commit described about system potentially becoming undebuggable
after switching into broken root or whatnot. But notably we can never
activate emergency.target after do_reexecute() failure, since the Manager
has been destructed. Plus, for a normal reexecution the fallback shell logic
triggered on non-existent /sbin/init is kinda useful. Let's hence guard
the extra check behind switch-root.

Also, move the check below /run/nextroot/ detection.
2025-03-08 20:49:30 +01:00
Mike Yuan
550f4718bc core/main: assign mac_init() retval to r
If it fails, we'd submit the errno to supervisor via sd_notify() later.
2025-03-08 20:40:24 +01:00
Mike Yuan
eda75b2cb2 core/main: log about save_env() error 2025-03-08 20:40:24 +01:00
Mike Yuan
0ddf4acab4 core/main: port to log_syntax_parse_error() 2025-03-08 20:40:24 +01:00
Mike Yuan
fafb05451f core: move CrashAction enum def to crash-handler.[ch] 2025-03-08 20:40:23 +01:00
Mike Yuan
568bafca50 core/meson: move efi-random.c out of libcore
It's used only in core/main.c
2025-03-08 20:40:23 +01:00
Mike Yuan
5fe2b509aa core/main: remove unused include 2025-03-08 20:40:23 +01:00
Mike Yuan
b05c495eed mount-setup: tune down log level if usrquota is not supported, apply usrquota when smack is in use too
Follow-up for 8f5131fb9e
2025-03-08 19:16:17 +01:00
Mike Yuan
80b7f60d2e mount-setup: drop outdated comment 2025-03-08 19:16:17 +01:00
Matteo Croce
bd0d22c2a5 network: remove useless loop (#36648)
In route_metric_can_update() the loop iterates over the metrics, but
skips all indices except for RTAX_MTU.

Replace it with a simple compare.
2025-03-08 17:39:09 +01:00
Luca Boccassi
d9208ff9a4 keyutil: support adding content into PKCS#7 signature (#36663)
Support including the data that was signed inside the PKCS#7 signature.
This creates a self-contained file where the signature of the data can
be verified without any other information, since the file contains the
data, signature, and certificate (which contains the public key used for
the signing).

One use case of this is IPE which requires a PKCS#7 signature that is
not "detached", i.e. includes the IPE configuration that has been
signed.

This also slightly adjusts the test case to use the x509 certificate
inside the PKCS#7 signature instead of supplying it externally during
verification.
2025-03-08 01:42:20 +00:00
Dan Streetman
f80bb317f6 keyutil: support adding content into PKCS#7 signature 2025-03-07 18:36:23 -05:00
Lennart Poettering
f09e8ccb0b homed: add key management toolchain (#36513)
if Lennart shall dogfood ParticleOS he needs acceptable tooling for
making his homed home dir accessible from his legacy fedora install, and
from local and remote particleos. Let's add explicit support for
scenarios like this:

1. add high level support for enrolling the account signing key from the
fedora install
2. add high level support for "adopting" a local but foreign .home file
on a system
3. add high level support for "registering" a remote user account on a
different system

(this lacks test cases and some docs, hence marked as wip)
2025-03-07 22:19:33 +01:00
Lennart Poettering
36be5dc81c virt: detect "linux,dummy-virt" devicetree VMs (#36655) 2025-03-07 18:24:24 +01:00
Lennart Poettering
ce306d5401 add a mime type for *.home LUKS home dir files too (#36662) 2025-03-07 18:24:08 +01:00
Lennart Poettering
1ec2d28b6f update TODO 2025-03-07 18:15:13 +01:00
Lennart Poettering
b9f711b66e test: add integration test for the functionality added in this PR 2025-03-07 18:15:10 +01:00
Lennart Poettering
2efffd036e homectl: rearrange --help text with sections
We support so many verbs now, help the user with some structure
2025-03-07 18:15:07 +01:00
Lennart Poettering
0e1ede4b4b homectl: add interface for controlling storage for negative machine ID matches 2025-03-07 18:15:04 +01:00
Lennart Poettering
c7a4216509 homed: re-establish inotify watches on SIGUSR1
Let's define a clean way how we can reestablish file watches in homed.
This is a relevant in case we overmount /home/ as a whole. It's very
useful for our testcase in particular.
2025-03-07 18:15:01 +01:00
Lennart Poettering
c3f54fcd3b homed: suppress warning if quota is not on on /var/ and elsewhere 2025-03-07 18:14:58 +01:00
Lennart Poettering
efe2ce7277 homed: rescan /home/ in more occasions automatically
When unregistering a home there's a chance this "reveals" another home
by the same name in /home/, hence immediately schedule a rescan, the
same way we already schedule it in on remove.

Also, drop the conditionalization when scheduling a rescan during
remove, for the same reasons: a remove might reveal another home, and we
cannot check for that ahead of time. Trying to check is kinda a
pointless optimization anyway, since this is not a frequent operation
and rescanning is not the end of the world.
2025-03-07 18:14:55 +01:00
Lennart Poettering
17f48a8cc7 homectl: making stripping of signatures from user records optional 2025-03-07 18:14:52 +01:00
Lennart Poettering
cc14c14782 homectl: also support registering (rather than creating) home directories via system credentials 2025-03-07 18:14:48 +01:00
Lennart Poettering
e8801cc5b3 homectl: expose "register" verb to register a user record locally 2025-03-07 18:14:45 +01:00
Lennart Poettering
cbf9a1c888 homed: add concept for "adopting" an existing homedir locally
Currently homed scans /home/ via inotify for new .home + .homedir/
popping up to register as local users. Let's also add an explicit way to
request this form of "adoption": a bus call that takes a path and that
makes a home dir activatable locally.

(Usecase: you cross boot between two systems – let's say your traditional
fedora and your ParticleOS – and want to use the same homedir from both:
simply mount the /home dir from the other somewhere, and then hit
"homectl adopt /somewhere/lennart.home" and you have the user locally
too).
2025-03-07 18:14:25 +01:00
Lennart Poettering
ce94761deb user-record: add a concept of inverting per-host matching sections in user record
Sometimes it is useful to apply options on all hosts except some. Add a
simple concept for that.
2025-03-07 18:14:20 +01:00
Lennart Poettering
4f00011b68 homectl: add a 'dry-run' mode for registering/creating users
Since this only covers user creation/registration for now, let's hide it
behind an env var. We might reconsider this eventually and make it a
proper switch one day, but who knows, it after all has this "debug tool"
wiff.
2025-03-07 18:14:14 +01:00
Lennart Poettering
87c81a34eb homectl: also import signing keys at firstboot time 2025-03-07 18:14:09 +01:00
Lennart Poettering
88392a1f60 homectl: add signing key management verbs 2025-03-07 18:14:02 +01:00
Lennart Poettering
f1b6417fea homed: add apis for managing home signing keys
This makes it easier to actually migrate home directories between
systems.
2025-03-07 18:13:40 +01:00
Lennart Poettering
fd0dd2d4bc userdbctl: optionally show user/group data from JSON filerather than from system 2025-03-07 18:13:36 +01:00
Lennart Poettering
6a2097dd78 openssl-util: add helper for converting EVP_PKEY to PEM string
And also give the rverse a bit of love.
2025-03-07 18:13:16 +01:00
Lennart Poettering
7fd5979b83 hostnamectl: show transient hostname before static hostname
The transient one is generally the more relevant one, since it is
typically used to reach this host remotely, and it's what shells show
you. Hence show it first.
2025-03-07 17:12:36 +00:00
Dan Streetman
2d09fd72ea test: run PKCS#7 verification with both internal and external certificates 2025-03-07 11:52:44 -05:00
Lennart Poettering
e33564ff4a mime: add mimetype for luks home dir 2025-03-07 17:27:20 +01:00
Lennart Poettering
ccc51053f5 mime: use 'addon' icon for sysext ddis 2025-03-07 17:27:20 +01:00
Lennart Poettering
dc4cf3e539 rules: tag /dev/tpm0 with "systemd" too
Strictly speaking we don't need to tag these devices, because tpm2-tss
already does so, but given we do this for /dev/tpmrm0, we should
probably do this comprehensively if we rely on this ourselves.

Fixes: #36653
2025-03-07 16:09:32 +01:00
Daan De Meyer
7c94fd1db6 mkosi: Skip other build scripts if we're running clangd 2025-03-07 16:09:03 +01:00
Daan De Meyer
f0efc7ef34 mkosi: Switch to --rerun-build-scripts in mkosi.clangd 2025-03-07 16:09:03 +01:00
Daan De Meyer
65ac4d06e0 mkosi: Disable BuildSourcesEphemeral= (#36646)
None of the package specs leave leftover files in the source directory
anymore, so let's stop using BuildSourcesEphemeral=yes and check in CI
that we don't regress.
2025-03-07 15:55:05 +01:00
Daan De Meyer
2e6a041376 mkosi: Disable BuildSourcesEphemeral=
Let's stop using BuildSourcesEphemeral= and instead make sure we don't
generate any auxiliary files during the mkosi build process.

We achieve this through a combination of trap to remove any new files
we create and bind mounts from /tmp over existing files whenever we need
to modify an existing file.

We also add a CI step to ensure we don't regress
2025-03-07 15:28:53 +01:00
Daan De Meyer
3a16b02873 opensuse: Drop workarounds
None of these should be needed anymore.
2025-03-07 15:28:51 +01:00