Commit Graph

80273 Commits

Author SHA1 Message Date
Erik Larsson
c88adbc01d networkd: add support for setting vlan_tunnel on bridge ports 2025-03-24 17:15:19 +09:00
Luca Boccassi
2e3efb1884 some dbus property fixes (#36830) 2025-03-22 15:54:16 +00:00
Lennart Poettering
ed13622bc8 core: not sure why but TTYRows/TTYColumns property is 16bit towards outside, 32bit inside, handle that properly 2025-03-22 12:51:25 +01:00
Lennart Poettering
0b0cb6f33d core: fix C type handler for ExitCode property 2025-03-22 12:47:48 +01:00
Daan De Meyer
fefcb935cd mkosi: Hide patches on debian instead of removing them 2025-03-21 22:36:27 +01:00
Daan De Meyer
07a6e1db06 fetch-distro: Fetch before we switch branches
Otherwise the branch we're switching to might not exist yet.
2025-03-21 21:21:37 +00:00
Daan De Meyer
655b0365e6 packit: Load fmf metadata from rpm spec repository (#36825) 2025-03-21 17:28:43 +01:00
Daan De Meyer
4d938fa865 packit: Load fmf metadata from rpm spec repository
Maintaining the fmf metadata and script upstream makes it painful
to reuse downstream so let's move the metadata and testing script
downstream and load it upstream instead.
2025-03-21 16:30:31 +01:00
Daan De Meyer
04b8dd76bd mkosi: update fedora commit reference
* 2ecfbec1a4 Support specifying extra mkosi repositories to the test script
* f5b47b1302 Use old setup sysusers files on Fedora < 43
* 2da5793357 Merge #196 `Migrate fmf metadata and test script from the upstream repository`
* e346d9f33e Limit sdubby dependency to Fedora
2025-03-21 16:30:12 +01:00
Daan De Meyer
3ffcbb6b9a mkosi: Log in mkosi.sync when we don't check out commit 2025-03-21 15:24:04 +01:00
Jose Ortuno
f1d8fb3d1d po: Translated using Weblate (Spanish)
Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Jose Ortuno <jose_ortuno@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/es/
Translation: systemd/main
2025-03-21 13:41:56 +00:00
Daan De Meyer
f37df8c563 test: Check that the journal file was actually created (#36821)
If the test fails in the mkosi setup logic the journal file will never
be created so let's add some checks.
2025-03-21 14:31:20 +01:00
Yu Watanabe
90670111a9 udev: make udevadm and friends not warn about unknown settings
Without this change, when e.g. event_timeout= is specified in udev.conf,
udevadm and friends which loads udev.conf warn about unknown key:
===
$ udevadm info /sys/class/net/lo
/run/udev/udev.conf.d/test-17.conf:1: Unknown key 'event_timeout', ignoring.
/run/udev/udev.conf.d/test-17.conf:2: Unknown key 'timeout_signal', ignoring.
===

Follow-up for 07f5e35fe7 (v256).
2025-03-21 12:51:39 +00:00
Daan De Meyer
1fda095113 test: Check that the journal file was actually created
If the test fails in the mkosi setup logic the journal file will never
be created so let's add some checks.
2025-03-21 13:34:41 +01:00
Daan De Meyer
02a21805af packit: Remove --depth=1 from git clone
We need the full history to be able to checkout the right commit
afterwards.
2025-03-21 13:34:41 +01:00
Daan De Meyer
69369fd322 bootctl: adjust feature message (#36372) 2025-03-21 11:17:00 +01:00
Yu Watanabe
513f4d675a analyze: propagate error code returned by _from_string()
Follow-up for a483c39fc2.
Addresses https://github.com/systemd/systemd/pull/36468#discussion_r2005765024.
2025-03-21 10:31:46 +09:00
Yu Watanabe
3cb0551ecb edit-util: don't leave custom editor args around if we shall fall back (#36813)
Also, let's complain loudly if the editor acquired from envvar is not
present.

Fixes #36796
2025-03-21 08:48:05 +09:00
Yu Watanabe
786f60eb5d man: fix typo
Follow-up for 6fd253753c.
2025-03-21 08:35:36 +09:00
Matteo Croce
dcde1e903a match glibc in ConditionVersion
Extend ConditionVersion= to allow matching against glibc version,
as proposed in https://github.com/systemd/systemd/pull/36468#issuecomment-2674600909
2025-03-21 06:57:28 +09:00
Jose Ortuno
966f872880 po: Translated using Weblate (Spanish)
Currently translated at 97.2% (250 of 257 strings)

Co-authored-by: Jose Ortuno <jose_ortuno@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/es/
Translation: systemd/main
2025-03-21 06:46:21 +09:00
Mike Yuan
551d4c91e8 core/meson: libcore doesn't depend on PAM
It's only used by sd-executor.
2025-03-20 21:34:31 +00:00
Lennart Poettering
112a9de6c4 Add --root for systemd-update-done and other small fixups (#36803) 2025-03-20 18:19:17 +01:00
Mike Yuan
d2e49d9389 edit-util: don't leave custom editor args around if we shall fall back
Also, let's complain loudly if the editor acquired from envvar
is not present.

Fixes #36796
2025-03-20 17:31:54 +01:00
Mike Yuan
b062cf19f4 memory-util: make mempcpy_typesafe nestable 2025-03-20 17:31:54 +01:00
Zbigniew Jędrzejewski-Szmek
ace814f0a8 update-done: create /etc and /var if they didn't exist
Previously, we would fail. But this doesn't seem useful: we may want to
mark the update as done even if /etc/ or /var/ no updates were necessary
and there was no need to create /etc/ or /var/ yet.
2025-03-20 15:57:14 +01:00
Zbigniew Jędrzejewski-Szmek
2ff40c758e update-done: add --root= arg
The idea is to use this when building an image to mark the image as not
needing updates after the reboot. In general it is impossible to say if
any of the early boot update services can be safely skipped, except when
the creator of the image knows all the contents there and has made sure
that all the updates have been processed. (This is in fact what happens
in a typical package-based installation: the packages have scriptlets which
implement the changes during or after the installation process.)

With this patch, the image build process can do 'systemd-update-done --root=…'
at the appropriate point to avoid triggering of ldconfig.service,
systemd-hwdb-update.service, etc.

I didn't write --image=, because it doesn't seem immediately useful. The
approach with --root is most useful when we're building the image "offline",
which means that we have a directory we're working on.
2025-03-20 15:57:14 +01:00
Zbigniew Jędrzejewski-Szmek
20f7f0a891 update-done: add basic argument parsing and --help
We certainly want to reject calls with any args specified. Previously
we would just silently ignore any args.
2025-03-20 15:15:48 +01:00
hsu zangmen
0ffd176bf7 po: Translated using Weblate (Chinese (Traditional) (zh_TW))
Currently translated at 88.7% (228 of 257 strings)

Co-authored-by: hsu zangmen <chzang55@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_TW/
Translation: systemd/main
2025-03-20 22:51:41 +09:00
Zbigniew Jędrzejewski-Szmek
bca9a6e2be update-done: split out run() 2025-03-20 14:36:20 +01:00
Zbigniew Jędrzejewski-Szmek
04db1a6aec update-done: adjust comments
The man page was right, but the comment in the generated file was wrong. The
timestamp is *not* the timestamp when the update is being done. While at it,
say to what directory the message applies. This makes it easier for a casual
reader to figure out what is happening.

Also rename the function to better reflect what it does.

Inspired by https://github.com/systemd/systemd/issues/36045.
2025-03-20 14:36:20 +01:00
Lennart Poettering
6fd253753c vmspawn: allow TPM state to be persistent + rework runtime dir logic
When using vmspawn on particleos image we really want that the TPM state
is retained between invocation, since the encryption key is locked to
the TPM after all. Hence let's support that.

This adds --tpm-state= which can be used to configure a path to store
the TPM state in. It can also be used to force tpm state to be transient
or to let vmpsawn pick the path automatically.

While we are at it, let's also revamp the runtime dir handling in
vmspawn: let's no longer place the sockets the auxiliary services listen
on within their own runtime directories. Instead, just drop the runtime
directories for them entirely (since neither virtiofsd, nor swtpm
actually use them). Also, let systemd clean up the sockets
automatically.
2025-03-20 14:30:00 +01:00
Erik Larsson
6e529860ba networkd: add support for externally managed vxlan devices
With this a vxlan interface can be created which is managed by
for example a EVPN control plane.
2025-03-20 20:29:47 +09:00
Lennart Poettering
9d37b8f690 namespace: use EBADF where appropriate 2025-03-20 12:26:06 +01:00
Daan De Meyer
a0063ac988 packit: Enable use_target_repo_for_fmf_url option (#36794)
Currently this is picked up from the main branch of the fork which is
suboptimal. The packit folks implemented this new option for us which
should fix the problem.
2025-03-20 09:24:41 +01:00
Daan De Meyer
314ea2ec7b fmf: Use mkosi -f together with ToolsTreePackageDirectories=
There's no need to build various systemd tools from source again to
build the mkosi image when we can just install the packages that were
already built from source into the tools tree so let's do that to avoid
unnecessary compiling.
2025-03-20 09:24:07 +01:00
Daan De Meyer
f5cf72b566 fmf: Drop -f from subsequent mkosi sandbox calls
Only required for the first call to mkosi sandbox, after that we can
assume the tools tree has already been built.
2025-03-20 09:24:07 +01:00
Daan De Meyer
1f3bf2a9a2 fmf: Allow overriding the mkosi distribution and release used 2025-03-20 09:24:07 +01:00
Daan De Meyer
a3b8fee46e fmf: Download rpms manually instead of going via repositories
This both makes the script more independent, and allows us to add support
for CBS (CentOS Community Build System) at the same time.
2025-03-20 09:24:03 +01:00
Yu Watanabe
db4b4e0cd3 core: Make DelegateNamespaces= work for user managers with CAP_SYS_ADMIN (#36771)
Currently DelegateNamespaces= only works for services spawned by the
system manager. User managers will always unshare the user namespace
first even if they're running with CAP_SYS_ADMIN.

Let's add support for DelegateNamespaces= for user managers if they're
running with CAP_SYS_ADMIN. By default, we'll still delegate all
namespaces
for user managers, but this can now be overridden by explicitly passing
DelegateNamespaces=.

If a user manager is running without CAP_SYS_ADMIN, the user manager is
still always unshared first just like before.
2025-03-20 06:28:18 +09:00
Lennart Poettering
b0fe8df5a9 Several fixlets for Coverity (#36791) 2025-03-19 22:27:00 +01:00
Yu Watanabe
bb8c74d7f2 Introduce ConditionVersion (#36468)
Add a new condition which can check against systemd version.

        $ systemctl --version
        systemd 258 (258~devel-g53ca5f6)

        $ systemd-analyze condition 'ConditionVersion=systemd>255'
        test.service: ConditionVersion=>255 succeeded.

        $ systemd-analyze condition 'ConditionVersion=systemd>260'
        test.service: ConditionVersion=>260 failed.

        $ systemd-analyze condition 'ConditionVersion=systemd>=258'
        test.service: ConditionVersion=>=258 succeeded.

        $ systemd-analyze condition 'ConditionVersion=systemd>=257.1'
        test.service: ConditionVersion=>=257.1 succeeded.

        $ uname -r
        6.12.13-200.fc41.aarch64

        $ systemd-analyze condition 'ConditionVersion=kernel > 4.4'
        test.service: ConditionVersion=kernel > 4.4 succeeded.

        $ systemd-analyze condition 'ConditionVersion=kernel > 6.20'
        test.service: ConditionVersion=kernel > 6.20 failed.

        $ systemd-analyze condition 'ConditionVersion=kernel < 9.0'
        test.service: ConditionVersion=kernel < 9.0 succeeded.
2025-03-20 06:15:35 +09:00
Lennart Poettering
bb160976b0 cgroup: whenever we migrate a PID to a unit, explicitly drop unit from empty notification queue
A unit might be pending in the empty queue still when we add a PID to
the cgroup. At that point, let's explicitly remove the unit from that
queue.

Fixes: #36781
2025-03-19 21:40:33 +01:00
Lennart Poettering
0015502168 tpm2-util: return better errors if we try to unlock a tpm key on the wrong tpm
Let's improve error handling in case one tries to unlock a TPM2 locked
volume on a different machine via TPM than it was originally enrolled
on. Let's recognize this case and print a clearer error message.
2025-03-19 21:27:54 +01:00
Daan De Meyer
0e0f4cc60c various verity generator tweaks (#36802) 2025-03-19 19:26:03 +01:00
Lennart Poettering
f21090d217 generator: skip fsck early for non-blockdev file systems, or file systems that are always read-only 2025-03-19 18:18:43 +01:00
Lennart Poettering
179dcf924f sd-event: make pidfd copy in event_add_child_pidref()
So far we'd directly use the pidfd passed into event_add_child_pidref(),
hoping it would not be closed by the caller before we are done. This was
violated by vmspawn however.

Let's make this safe, and simply duplicate the fd, and make us
independent of the caller.
2025-03-19 18:14:24 +01:00
Lennart Poettering
bed546d187 veritysetup-generator: repeat format string arguments a bit less 2025-03-19 16:32:02 +01:00
Lennart Poettering
64f8df2f31 veritysetup-generator: specify source for generator_open_unit_file() 2025-03-19 16:32:02 +01:00
Lennart Poettering
eedd0b9886 veritysetup-generator: exit on first error 2025-03-19 16:32:02 +01:00