Commit Graph
86604 Commits
Author SHA1 Message Date
David Santamaría Rogado be9dd0da40 hwdb: fix typos 2026-02-20 06:38:53 +09:00
Daan De Meyer e6be5fb720 ssh-proxy: Support ssh machine/xxx for nspawn containers 2026-02-19 21:32:29 +01:00
David Santamaría Rogado 3b51529cbf hwdb: sensor: hp use board product name as hp-wmi
Doing it made also to include the 14t-fh000, the product name initial
units of the omnibook ultra flip 14 had, this is intended.

Order the entries by product name.

Follow up: fadb0b53f7.
2026-02-20 04:54:53 +09:00
Daan De Meyer 59a83c37bf ci: Simplify musl build setup
No need to setup symlink farms, we can just use the host's /usr/include
now.
2026-02-19 20:04:06 +01:00
Daan De Meyer 5ab8bba2b0 meson: Explicitly check for musl for gshadow and nss
This allows building with musl on glibc systems as follows:

env \
    CC=musl-gcc \
    CXX=musl-gcc \
    CFLAGS="-idirafter /usr/include" \
    CXXFLAGS="-idirafter /usr/include" \
        meson setup --auto-features=disabled -Dlibc=musl musl
2026-02-19 20:04:06 +01:00
Nandakumar Raghavan fd6506eb9a repart: return 1 from probe_sector_size_prefer_ioctl() on block device success
probe_sector_size() returns 1 when it successfully determines the sector size,
0 when falling back to the default. blockdev_get_sector_size() returns 0 on
success. probe_sector_size_prefer_ioctl() was passing blockdev_get_sector_size()
return value through directly, so caller is checking r > 0 to detect a
successfully probed sector size never saw it for block devices.

In context_load_partition_table(), this caused fs_secsz to stay at 4096 bytes
even on 512-byte sector block devices, making verity hash partition sizes wrong
unless --sector-size=512 was passed explicitly.

Fix by returning 1 on success from the block device path to match probe_sector_size()
convention.
2026-02-19 17:43:56 +01:00
Yu Watanabe 551227e3a0 Python modernization followups (#40755) 2026-02-20 01:33:07 +09:00
Yu Watanabe e819c31c05 NEWS: move and extend entry for PTP device permission
Follow-up for 1e6854e112.
2026-02-20 01:25:25 +09:00
Yu Watanabe 5329f4bf76 man: fix typo
Follow-up for 6b22ac31af.
2026-02-20 01:18:59 +09:00
Yu Watanabe e94c410e51 man: fix typo
Follow-up for eb581ff6d9.
2026-02-20 01:18:54 +09:00
Yu Watanabe fcf5f1db94 mstack: fix typo
Follow-up for 8343032a86.
2026-02-20 01:14:30 +09:00
Yu Watanabe 5d01b27ffc import: fix typo
Follow-up for a9f6ba0496.
2026-02-20 01:13:02 +09:00
Yu Watanabe 9bc3c2e54a TODO: fix typo
Follow-up for 3bbada87e2.
2026-02-20 01:11:30 +09:00
Lennart Poettering 0036d62e6e importd: add support for downloading OCI images (#39621)
This adds the ability to download OCI images via importd. 

Not a fan of the OCI format tbh, in particular its security properties
are a bit sad. But I guess it exists and is very popular, hence we might
as well add support for it, even if it comes at much weaker security
properties than DDIs.

Fixes #36447
2026-02-19 16:43:11 +01:00
Lennart Poettering d911ca8454 Bring Bash profile for reporting context via Operating System Commands (OSC) into compliance with specifications (#40696)
This script fails to comply with the spec it's designed to implement,
[UAPI.15 OSC 3008: Hierarchical Context
Signalling](https://uapi-group.org/specifications/specs/osc_context/),
and fails the correctly utilize the specs provided by
[POSIX.1-2024](https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/mindex.html)
and [man 1
bash](https://www.man7.org/linux/man-pages//man1/bash.1.html); improve
compliance.

Changes are made in small atomic commits, with more detailed
descriptions of the work done in each message.
2026-02-19 15:50:24 +01:00
Zbigniew Jędrzejewski-Szmek a6b328fd95 elf2efi: modernize typing annotations
We still need Union and Optional as long as compat with Python 3.9
is needed.
2026-02-19 15:34:10 +01:00
Zbigniew Jędrzejewski-Szmek 3c7bb0c37b elf2efi: make mypy-clean 2026-02-19 15:34:10 +01:00
Zbigniew Jędrzejewski-Szmek 528a939c89 elf2efi: import whole module, not individual symbols
When reading the code, it was hard to figure out if the given name was
imported or a local class. And the renaming of imports also made it
harder to look things up online. Arguably, the deeply nested import
structure and inconsistent naming in elftools is partially to blame:
there is just no good way to make this look nice. But anyway, let's use
the usual style of importing the module and using names prefixed with
the module path so that the origin of imported names is clear.

elfutils.elf.elffile is importered separately, because a) it needs to be
imported separately anyway bxecause the module does lazy imports
internally, a) the name already indicates the origin, c) is used in
quite a few places so the shorter name is nice.
2026-02-19 15:34:10 +01:00
Zbigniew Jędrzejewski-Szmek 469879aa44 generate-sym-test: skip everything that is not a file
The generator looks for files in the filesystem, and it sometimes fails
on emacs "lock files" which are a symlink. Ignore those.
2026-02-19 15:33:59 +01:00
Yaping Li b0fba6abd3 metrics: fix casing for metrics names (take 2)
Change the casing for metrics names to mimic properties exposed via
varlink/dbus: Use PascalCase.
2026-02-19 15:30:18 +01:00
Daan De Meyer b6bdd540f9 machine: Fix cid passed to machine_add_from_params()
The default value is VMADDR_CID_ANY, not zero.
2026-02-19 15:17:10 +01:00
Lennart Poettering 3bbada87e2 update TODO 2026-02-19 15:08:20 +01:00
Lennart Poettering c86a72af04 ci: drop 'Ex' suffix from transient props
The "Ex" is mostly internal, and our parsers will append it
automatically when needed
2026-02-19 15:08:20 +01:00
Lennart Poettering e31ee582fc ci: add test for OCI downloading 2026-02-19 15:08:20 +01:00
Lennart Poettering eb581ff6d9 man: document everything we just added 2026-02-19 15:08:20 +01:00
Lennart Poettering cab2caa170 mountpoint-util: fix typo in comment 2026-02-19 15:08:20 +01:00
Lennart Poettering 6ebaea6990 portable: fix log levels
portable_extract_by_path() and install_image() can't agree whether to be
of the "logging" or "non-logging" kind
2026-02-19 15:08:20 +01:00
Lennart Poettering 968f3ebd20 discover-image: make sure we can remove mstacks 2026-02-19 15:08:20 +01:00
Lennart Poettering e93fd71094 core: introduce PinnedResource
This introduces PinnedResources as a structure combining pinned
references to a root directory, root image, or root mstack. This is not
only easier to work with, but essential to make certain unpriv things
work, as we need some mechanism to pin resources before we drop into a
userns which might possibly not provide access anymore to those
resources.

Hence this does two things: introduce the new structure, and immediately
hook it up so that we pin things properly before dropping into userns,
and then makes use of this after dropping the right way, and enables
unpriv userns operation.

The concept is generic enough to eventually implement extension images +
mount images with the same structure, but in order to keep the changes
managable this is left for another time.

(This also makes one further clean-up: client-side verity-reuse checks
are moved server side if we are unpriv. Previously we'd do them client
side, but they were doomed to fail because of lack of privs. Hence let's
drop the client side if we are unpriv and purely do them server-side in
that case.)
2026-02-19 15:08:20 +01:00
Lennart Poettering 68ed4f3c66 mountfsd,nsresource: allow recycling mountfsd/nsresourced client connections
So far we opened a new Varlink connection for every mountfsd/nsresourced
method call. Given each tool only does a very small number of calls
(usually 1…5) on them and the connections are cheap this is not too
wasteful. Nonetheless, let's do something about it, and allow reusing
the connection for multiple calls.

This not only makes things a bit more efficient, but has one more
important benefit: Varlink connections pin the security context of the
client when connecting. This means that varlink method calls done with a
connection established while some code was privileged will still operate
as privieged once privs are dropped, until the connection is closed.
This pinning effect is really nice, as it gives us behaviour in a
"capability system" like scheme. Later code is going to use that to
continue doing certain priv userns ops even after unsharing userns and
becoming fully unpriv.
2026-02-19 15:08:19 +01:00
Lennart Poettering fe487d3670 namespace: extend bind mount ignore field to permission issues
A later commit will add transient allocation of user namespaces with
dynamic UID range assignment. That creates certain permission issues.
Let's hence allow them to be handled gracefully in case the 'ignore'
field is set for a mount.
2026-02-19 15:07:19 +01:00
Lennart Poettering 26f80a9d33 namespace: port mount_private_apivfs() to fsopen() and friends
This is not just refactoring, but has the big benefit that it makes us
indepdendent from a temporary directory we might not have enough access
to create. (This matters with the new PrivateUsers=managed).
2026-02-19 15:07:19 +01:00
Lennart Poettering 051dfed9b6 private 2026-02-19 15:07:18 +01:00
Lennart Poettering 6b22ac31af core: add PrivateUsers=managed 2026-02-19 15:05:15 +01:00
Lennart Poettering fbaf05bfeb importctl: add 'pull-oci' client API 2026-02-19 15:05:15 +01:00
Lennart Poettering 9628a5ced4 importd: add bus/varlink api for downloading OCIs 2026-02-19 15:05:15 +01:00
Lennart Poettering fe1f8c1acd run: support RootMStack= on the client side for systemd-run 2026-02-19 15:05:15 +01:00
Lennart Poettering 38e65b6e4c portable: support .mstack images 2026-02-19 15:05:15 +01:00
Lennart Poettering 32b88dd25a pid1: introduce RootMStack= for using an mstack as root dir for a service 2026-02-19 15:05:15 +01:00
Lennart Poettering 116394f7ce tree-wide: move logging from varlink clients in nsresource.c/dissect-image.c into callers
These calls are "library-like", hence better should only debug log on
their own, not more.
2026-02-19 15:05:15 +01:00
Lennart Poettering 1bc237dd7a nspawn: add support for running mstack container images 2026-02-19 15:05:15 +01:00
Lennart Poettering 8cd29712cb discover-image: add support for discovering mstack images 2026-02-19 15:05:15 +01:00
Lennart Poettering 8187cd18d6 add mstack tool for accessing mstacks from the command line 2026-02-19 15:05:15 +01:00
Lennart Poettering 944161d0d4 vpick: add generic definition for mstack image pick filters 2026-02-19 15:05:15 +01:00
Lennart Poettering 8343032a86 mstack: introduce "mstack" concept 2026-02-19 15:05:15 +01:00
Lennart Poettering a9f6ba0496 pull: add OCI support 2026-02-19 15:05:15 +01:00
Lennart Poettering 087f2ec344 core: introduce exec_context_with_rootfs_strict() as a stricter version of exec_context_with_rootfs()
We have two very similar checks in place: in some contexts we want to
know if *any* RootDirectory= is configured, in the other we want to
suppress if it is configured to our regular root. Let's add a helper for
both (even if we only need it once), to make the mirrored behaviour
clear.
2026-02-19 15:05:15 +01:00
Lennart Poettering 6d327e9fdd core: use exec_context_with_rootfs() at one more place 2026-02-19 15:05:15 +01:00
Lennart Poettering 6527861039 tar-util: add support for extracting OCI compatible whiteouts, and turn them into overlayfs whiteouts 2026-02-19 15:05:15 +01:00
Lennart Poettering d66e3cc79a pull-job: make sure pull_job_restart() can be used to fetch the same resource again, just with new headers
Let's flush out all response state from the job, but let's keep the
request data previously configured, in particular the headers set. This
is useful to re-request a resource, just with a slightly modified or
identical URL.
2026-02-19 15:05:15 +01:00