Commit Graph

79925 Commits

Author SHA1 Message Date
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
Lennart Poettering
f63a4ef4a0 update TODO 2025-03-07 14:59:29 +01:00
Lennart Poettering
60cc2d54e0 pid1: lower log level if BPF LSM is not available
Currently, if you boot PID 1 in a container you always see a complaint
that BPF LSM won't work. That's fine, and log worthy, but probably not
above debug level. After all this is a really common case, and we should
gracefully adopt to our execution environment.
2025-03-07 13:25:04 +00:00
Daan De Meyer
b9ad203e05 mkosi: update fedora commit reference
* 38b41a729e Clean up debuginfo files as well in %clean
* 7bc5883654 Fix missing question mark
* d22561d59e Also drop auxiliary files related to sysusers compat
* e825459f2d Change python-zstd depenedency to python-zstandard
* 0a3907745e Version 257.4
* 1bdfa29ce2 Neuter sysusers macros
2025-03-07 13:38:00 +01:00
Luca Boccassi
ab943600e9 load-fragment: Fix config_parse_namespace_flags() for DelegateNamespaces= (#36633)
Boolean values have to be handled separately for RestrictNamespaces=
because
they get stored in a field with reverse meaning (which namespaces are
retained),
so let's check which field we're parsing and set the proper value
accordingly.
2025-03-07 11:58:13 +00:00
Daan De Meyer
666062c07a core: Debug log if we cannot change the controlling terminal 2025-03-07 10:37:26 +01:00
Luca Boccassi
cb26206f2f hostnamectl: show image info in hostnamectl (#36638)
On image-based systems these properties are quite fundamental, hence
show them in the hostnamed output.
2025-03-06 22:36:20 +00:00
Lennart Poettering
10b8d65f3f dissect: accept --usr-hash=… too, similar to --root-hash=…
This addresses an omission, given that we have both kinds of hashes
these days.
2025-03-06 23:35:31 +01:00
Дамјан Георгиевски
299b70f85a add vsock-mux/* in ssh config drop-in
https://github.com/systemd/systemd/pull/32941
added support for firecracker/cloud-hypervisor and
their unix-domain socket to AF_VSOCK multiplex.

but I forgot to add the pattern in the ssh config drop-in.
fix it now!
2025-03-06 22:34:34 +00:00
Daan De Meyer
cbcaf9f47e TEST-13-NSPAWN: Set TERM=dumb when calling machinectl shell
We only consider something not a tty if it's not connected to a tty
and not connected to /dev/null, so let's use the environment variable
instead to tell machinectl shell that it shouldn't do any of its TTY
stuff.
2025-03-06 22:33:54 +00:00
Lennart Poettering
4efd46c44b terminal-util: during terminal reset clear from beginning of line to end of screen
tianocore does some weird shit with its terminal emulation and regular
fills half the terminal with grey background and then invokes us with
this not cleared up. Hence let us clear this up for it: as part of the
ansi sequence based reset let's position the cursor explicitly at the
beginning of the current line, and erase everything till the end of the
screen. This makes boot output in tianocore vms much much cleaner.

Note that this does *not* erase any terminal output *before* the cursor
position where we take over, because that typically contains valuable
information still we should not erase.
2025-03-06 22:32:32 +00:00
Lennart Poettering
4d44670dc6 update TODO 2025-03-06 23:11:20 +01:00
Lennart Poettering
457f4cfbba update TODO 2025-03-06 22:32:30 +01:00
Lennart Poettering
8ef9ceb7e5 Factory reset followup (#36621)
@poettering hrm, there's still one thing unclear to me: we currently
have no way for canceling factory reset via IPC. And adding that to
varlink service solely doesn't seem feasible either, since the state
departs from the active state of `factory-reset.target` and it would
become impossible to re-request it without restarting
`factory-reset.target` _and all dependencies_, which feels
unmaintainable.
2025-03-06 17:43:04 +01:00
Lennart Poettering
e0a634d520 docs: mention when /var/ has to be writable
In light of https://github.com/systemd/systemd/issues/36635 let's
clarify things a bit regarding writability of /var/.
2025-03-06 17:26:27 +01:00
Lennart Poettering
f37df1b60e hostnamectl: add usual ansi underlining to --help text 2025-03-06 16:26:17 +01:00
Lennart Poettering
bc60034f43 hostnamectl: show image info in hostnamectl
On image-based systems these properties are quite fundamental, hence
show them in the hostnamed output.
2025-03-06 15:28:07 +01:00
Daan De Meyer
e533610375 portable: Set DelegateNamespaces=no for all portable profiles
We don't want to delegate any namespaces to portable services, so
let's explicitly set DelegateNamespaces=no in the portable profiles.
2025-03-06 14:30:07 +01:00
Daan De Meyer
11b982053b load-fragment: Fix config_parse_namespace_flags() for DelegateNamespaces=
Boolean values have to be handled separately for RestrictNamespaces= because
they get stored in a field with reverse meaning (which namespaces are retained),
so let's check which field we're parsing and set the proper value accordingly.
2025-03-06 14:30:05 +01:00
Lennart Poettering
bc0763551f sysext,sysupdate: resolve incompatibilities (#36617)
Fixes #24562.
Fixes #34445.
Replaces #36311.
2025-03-06 14:05:35 +01:00
Lennart Poettering
729620b846 udev-builtin-blkid: ignore root partitions with name "_empty"
This is how sysupdate marks empty partitions, hence ignore that.

Kinda a follow-up for 54ae0edc4a
2025-03-06 14:05:14 +01:00
Yu Watanabe
5c9feb2d6e tree-wide: drop unnecessary break in default branch 2025-03-06 11:42:20 +01:00
Lennart Poettering
c65f40b1a1 update TODO 2025-03-06 11:30:06 +01:00
Lennart Poettering
399c7187f7 gpt-auto: image policy fixes (#36629)
Let's make sure we can define a proper image policy on ParticleOS
images.
2025-03-06 11:27:35 +01:00
Lennart Poettering
de4144cfc3 sysupdate: don't get confused by sysext on /usr/
Fixes: #24562
2025-03-06 10:27:55 +01:00
Lennart Poettering
02d0848df3 sysext: export backing devnum in metadata dir 2025-03-06 10:27:55 +01:00
Lennart Poettering
42c589eae5 sysext: execute merge even if no extensions are installed as long as --mutable= is on
This way we can make an immutable OS mutable, without any extensions or
so.

Fixes: #34445
2025-03-06 10:27:51 +01:00
Lennart Poettering
6d6538fb3f gpt-auto-generator: do not apply image policy on the root fs and /usr/ fs
At the moment the gpt-auto generator does its things we already
transitioned into the host OS, i.e. the root fs and /usr/ are mounted.
Hence suppress image policy checks for those two partitions.

This actually matters, because the root hash/usr hash is taken into
consideration for the image policy checks, but we don't have that in
gpt-auto and hence would refuse operation claiming policy conflicts
event though we never actually operate on the root fs via the dissection
logic.
2025-03-06 09:42:18 +01:00
Lennart Poettering
87bffa1eae gpt-auto-generator: move around in_initrd() tests
The partition enumeration only runs on the main system, and we test that
early, hence no point in repeating this in functions further down the
call chain. But let's keep it in place as assert()s, just in case.

Also, move the top-level in_initrd() into add_mounts(), so that the
tests are nicely encapsulated in the code they protect.
2025-03-06 09:42:15 +01:00
Lennart Poettering
e706cadce5 image-policy: add image_policy_ignore_designators() helper
This new helper patches a provide image policy, setting the policy for
specified designators to "ignore".

This is useful for contexts where we only want to mount some subset of
the available partitions, and hence don't care about the parts of the
policy that cover the others. Specifically this is useful in
systemd-gpt-auto-generator, which runs at a moment the root file system
is already established, and hence the policy for the root file system
can be ignored, the facts are already established.
2025-03-06 09:41:46 +01:00
Luca Boccassi
c0af4859d0 mkosi: update debian commit reference
* dfdab6b205 Install new files
* e00bee5b4a Install new files
2025-03-06 08:59:25 +09:00
Daan De Meyer
ba6a152000 mkosi: update fedora commit reference
* 4ab2a9e539 Drop old self-Obsoletes and provides
* ec182495e7 Drop libbpf versioned dependency version to 1.4.7
* 1f8d2b0ebd Make self-obsoletes for the sysusers split conditional
* 0d95af264f Include epoch in versioned libbpf dependency
* 8230f501b6 Make sure we pull in libbpf >= 1.5.0 if libbpf is installed
2025-03-06 08:59:10 +09:00
Daan De Meyer
4435dd7c72 mkosi: Don't install dnf anymore on Fedora
We have dnf5 on Fedora, no need to install dnf there anymore
2025-03-05 21:36:22 +00:00
Lennart Poettering
3568c47664 dissect: show basic image data even when can't enter the file systems 2025-03-05 21:21:36 +01:00
Mike Yuan
911de19c72 hibernate-resume-config: log louder on invalid kernel version/os-release id
Prompted by 45623d4ad6

We do make use of the os-release ids to determine whether to initial resume
if they're present, hence log at warning level if invalid. While at it,
raise the level for the kernel version too, which is generally interesting
to the user if something goes wrong.
2025-03-05 17:18:21 +01:00
Mike Yuan
97be702ffc factory-reset-tool: error out if we can't cancel pending reset
First of all, it seems very unlikely that we'd be in the pending state
if not booted via EFI in the first place. Moreover, the operation didn't
work out, hence let's not spurious report success.
2025-03-05 17:17:21 +01:00
Yu Watanabe
050094e65c tpm2-clear: fix typo
Follow-up for 73e53d2ee4.
2025-03-06 01:09:15 +09:00
Yu Watanabe
c07fdf7b94 factory-reset: fix typo
Follow-up for 41d9ed93d9.
2025-03-06 01:07:42 +09:00
Mike Yuan
f1d790a18b tpm2-clear: make it clear that we default to true for systemd.tpm2_allow_clear 2025-03-05 17:04:00 +01:00
Mike Yuan
5c7b3335db tpm2-clear: make getenv() failure fatal, correct one log level
This operation is destructive, and we bail if the proc_cmdline_get_bool()
call below fails already. Better be safe than sorry.
2025-03-05 17:03:59 +01:00
Mike Yuan
ab4c84b0e9 tpm2-clear: use plain DEFINE_MAIN_FUNCTION
We don't return any positive exit status.
2025-03-05 17:03:59 +01:00
Mike Yuan
28ac3309d7 units/meson: remove unneeded linebreak 2025-03-05 17:03:59 +01:00
Mike Yuan
651b44bdda units: refuse manual operations on factory-reset-now.target and friends
It is strictly mandatory that this is done during initial
transaction, and not later when the system is already running.
Hence let's refuse manual start for all of the involved units.
Additionally, refuse manual stop for systemd-factory-reset-complete.service,
as it flags the factory reset completion through
/run/systemd/factory-reset-complete, which never gets removed
for the whole boot.
2025-03-05 17:03:59 +01:00
Thorsten Kukuk
54cd851bd9 sysupdate: fix features and vaccum if all features are disabled
If all transfer definitions are features and disabled, a wrong error
is reported that there are no transfer definitions.
This breaks the features and vaccum verb, as they work on disabled
features, too.
2025-03-06 00:53:27 +09:00
Lennart Poettering
c22948f6c2 factory-reset: rework infrastructure, make it work with gpt-auto, and add support for resetting TPM as part of factory reset (#36512) 2025-03-05 15:25:36 +01:00
Yu Watanabe
b690298d7a sd-varlink: fix typo
Follow-up for 837849561b.
2025-03-05 23:17:36 +09:00
Yu Watanabe
7ae2ea52ac TODO: fix typo
Follow-up for 31ec0d8a2e.
2025-03-05 23:17:36 +09:00