Commit Graph
79938 Commits
Author SHA1 Message Date
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
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
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