Commit Graph
100 Commits
Author SHA1 Message Date
Daan De Meyer e2c418d528 ci: Add claude code github action
This will allow maintainers to mention claude in comments on issues
and prs to do stuff like review something or try to reproduce a bug
or other stuff. Let's give it a try and see whether we like it or
not.
2026-03-05 22:13:51 +01:00
Daan De Meyer 101f03bedb Additions to nsresourced and vmspawn required for making use of the foreign UID range in mkosi (#40415) 2026-02-25 13:49:19 +01:00
Daan De Meyer 3363693935 nspawn: Add support for delegated UID ranges
We expose this via --private-users-delegate= which takes the number of
ranges to delegate. On top of delegating the ranges, we also mount in
the nsresourced socket and the mountfsd socket so that nested containers
can use nsresourced to allocate from the delegated ranges and mountfsd to
mount images.

Finally, we also create /run/systemd/dissect-root with systemd-tmpfiles to
make sure it is always available as unpriv users won't be able to create it
themselves.
2026-02-25 11:31:06 +01:00
Daan De Meyer fd05c6c759 vmspawn: Add support for foreign UID range owned directories 2026-02-25 11:31:04 +01:00
Daan De Meyer e4f72956b6 network: several follow-ups for new varlink methods (#40808) 2026-02-24 19:59:01 +01:00
Daan De Meyer 104579e401 dissect: Go via service on ENOENT from loop_device_make() as well
ENOENT means /dev/loop-control isn't there which means we're in a
container and should go via mountfsd.

At the same time, reverse the check for fatal actions as almost all
actions can be done via mountfsd, only --attach needs the loop device.
2026-02-24 18:29:37 +01:00
Daan De Meyer 4bc0d8a9a1 mountfsd: Relax user namespace checks
- Allow foreign UID range
- Allow delegated UID ranges

Both of these can now be mapped by nsresourced into user namespaces
and hence should be accepted by mountfsd.
2026-02-24 18:29:37 +01:00
Daan De Meyer 838528104b nsresourced: Optionally map foreign UID range
Whenever delegating UID ranges to a user namespace, it can also be
useful to map the foreign UID range, so that the container running in
the user namespace with delegated UID ranges can download container
images and unpack them to the foreign UID range.

Let's add an option mapForeign to make this possible. Note that this option
gives unprivileged users full access to the any foreign UID range owned directory
that they can access. Hence it is recommended (and already was recommended) to
store foreign UID range owned directories in a 0700 directory owned by the
owner of the tree to avoid access and modifications by other users.

This is already the case for the main users of the foreign UID range,
namely /var/lib/machines, /var/lib/portables and /home/<user> which all
use 0700 as their mode.

Users will also be able to create foreign UID range owned inodes in any
directories their own user can write to (on most systems this means /tmp,
/var/tmp and /home/<user>).
2026-02-24 18:29:37 +01:00
Daan De Meyer 95d05079bf nsresourced: Add support for self mappings with delegations
mkosi does all of its environment setup in an unprivileged user
namespace with an identity mapping. When it invokes nspawn and nspawn
tries to get a transient userns from nsresourced, this fails as no
transient ranges are mapped into mkosi's unprivileged userns (as doing
so would require privileges).

To fix this problem, let's allow allocating unprivileged self user
namespaces in nsresourced, similar to what the kernel allows, except that
we also support delegations for these. This means that mkosi can get its
unprivileged userns as before from nsresourced, but it can also request a
delegated 64K range inside that userns as well, which nsresourced can then
allocate to nspawn later when it asks for one.

Similar to the kernel, we disallow setgroups for self mappings. However,
instead of doing this via /proc/self/setgroups, which applies to the current
user namespace and all its child user namespaces, we use the BPF LSM to deny
setgroups instead, so that it can still be allowed for child user namespaces.
We need this because as soon as a container launches in a child user namespace
using one of the delegated mappings, it has to be able to do setgroups() to be
able to function properly.

To allow mapping the root user, we need to add the CAP_SETFCAP capability to
nsresourced.
2026-02-24 18:29:37 +01:00
Daan De Meyer 025439faaa nsresourced: Add support for delegated ranges
We want to support the scenario where we bind mount the nsresourced
varlink socket into a container to allow nested containers where the
outer container runs in its own transient range from nsresourced but
can still allocate transient ranges for its own nested containers.

To support this use case let's add support for delegation. Delegated
ranges are allocated when allocating the primary range and are propagated
1:1 to the user namespace. We track delegated ranges in ".delegate" files
in the userns registry so that they can't be used for other range allocations.

We make one exception for delegated ranges though, if we get a request from
a user namespace that is a child of the user namespace that owns the delegated
ranges, we allow allocating from the delegated range. The parent userns already
has full ownership over the child userns, so it doesn't matter that the parent
userns and the child userns share the same range. This allows making use of
delegated ranges without having to run another copy of nsresourced inside the
parent userns to hand out from the delegated range.

To support recursive delegations, we keep track of the previous owners of the
delegated range and restore ownership to the last previous owner when the current
owner is freed.
2026-02-24 18:29:37 +01:00
Daan De Meyer 6c2d437585 nsresourced: Allow operations outside transient UID/GID ranges
The purpose of the userns-restrict BPF-LSM program is to prevent the
transient ranges leaking to disk, so let's allow operations outside the
transient UID ranges, even if the mount is not allowlisted.

This is preparation for the next commits where we'll add support for mapping
the current user and the foreign UID range into the user namespaces provisioned
by nsresourced. Operations creating files/directories as these UIDs/GIDs should
not need the corresponding mount to be allowlisted with nsresourced.
2026-02-24 18:29:37 +01:00
Daan De Meyer 868fdc5520 Several follow-ups for JournalAccess varlink interface (#40794) 2026-02-23 20:17:31 +01:00
DaanDeMeyer f29edb227c repart: Use new mkfs.xfs support for populating from directories
xfsprogs 6.17.0 added support for populating xfs filesystems from
directories. As this supports extended attributes unlike our current
hack with protofiles. Let's make use of the new feature in mkfs-util.c

As there's no clean way to do feature detection on the mkfs.xfs binary,
we drop support for the old hack with protofiles that we had before.
2026-02-23 15:04:41 +00:00
Daan De Meyer a51e5bd1f1 core: Introduce ConditionPathIsSocket= 2026-02-23 13:08:49 +01:00
Daan De Meyer 54b745d7bb test-condition: Migrate to new assertion macros 2026-02-23 12:28:10 +01:00
Daan De Meyer a2a78602b0 mountfsd: Try to polkit auth when the verity key is not available
If we include a verity signature but the corresponding key is not in
the kernel keyring or userspace, try to get polkit auth similar to how
we do the same if the image doesn't pass the policy.
2026-02-23 12:11:04 +01:00
Daan De Meyer 0dbdbed03f uid-range: Handle same userns in uid_range_load_userns_by_fd()
If we're asked to look up our own user namespace mapping, don't go
via fd as trying to setns() to our own user namespace in
userns_enter_and_pin() would fail with EPERM as the kernel doesn't
allow switching to your own userns.
2026-02-19 21:33:11 +01:00
Daan De Meyer d28c96d85e userns-restrict: Remove unused inode argument and rename function 2026-02-19 21:33:11 +01:00
Daan De Meyer fd99ead01d test-userns-restrict: Migrate to new assertion macros
We also inline the test functions so we get proper line information
in the failure coredumps.
2026-02-19 21:33:11 +01:00
Daan De Meyer e6be5fb720 ssh-proxy: Support ssh machine/xxx for nspawn containers 2026-02-19 21:32:29 +01: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
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
Daan De Meyer 81cef494a6 vpick: Make suffix a single string again instead of a strv
This was made a strv to handle either directories or raw images but
since we now handle that via multiple PickFilter instances, we don't
need suffixes to be a strv anymore.
2026-02-18 23:14:11 +01:00
Daan De Meyer db1689e69c machined: Skip root user namespace check for user managers
You can register whatever process you want in the user machined instance
that is running in the same namespace as pid 1 as machined won't be allowed
to do anything privileged anyway that could be dangerous when running as a user
instance.

We have to skip the check as we user machined instances don't have
privileges to inspect pid1's user namespaces.
2026-02-18 19:22:14 +01:00
Daan De Meyer cec9eb5e7e vmspawn: Don't keep tpmstate around in auto mode if ephemeral 2026-02-18 15:18:58 +01:00
Daan De Meyer 10eaca4159 sysupdate: Use partition types for pending/partial partitions
Fixes #40658
2026-02-18 11:15:04 +09:00
Daan De Meyer e38fac0cc5 sd-bus: Make sure we can connect to user machines as well (#40698)
Don't unconditionally look into /run/systemd/machines. If we're a
connected to a session bus, look at the machines for the current user
instead.
2026-02-17 19:13:40 +01:00
Daan De Meyer 6119252f5a sd-bus: Don't fork unnecessarily to connect to container
Let's check if we're already in the right namespaces and call connect()
directly if that's the case. This can easily happen when the machine is
specified as .host or so.
2026-02-17 17:52:20 +01:00
Daan De Meyer a12c5bf4f5 sd-bus: Make sure we can connect to user machines as well
Don't unconditionally look into /run/systemd/machines. If we're a
connected to a session bus, look at the machines for the current user
instead.
2026-02-17 17:52:20 +01:00
Daan De Meyer 8d11835397 namespace-util: Do is_our_namespace() checks first in namespace_enter()
These checks may rely on /proc on older kernels which we could lose access
to by joining namespaces so let's do all the checks first and then join
namespaces.
2026-02-17 17:52:17 +01:00
Daan De Meyer 3791710f44 namespace-util: Add extra debug logging 2026-02-17 16:44:37 +01:00
Daan De Meyer 5045a28ae1 coredump: Use error log level in coredump_send_to_container() 2026-02-17 16:44:35 +01:00
Daan De Meyer f6bcd125db nspawn: Join network namespace with setns()
We don't have /proc mounted which means namespace_enter() won't work
on older kernels, so use setns() instead.
2026-02-17 11:45:01 +01:00
Daan De Meyer 48c84fe730 nspawn-mount: Use setns() in wipe_fully_visible_api_fs()
namespace_enter() now does a is_our_namespace() check, which requires
/proc on older kernels, which is not available anymore after we call
do_wipe_fully_visible_api_fs() in wipe_fully_visible_api_fs().

Let's just call setns() instead as namespace_enter() is overkill to
enter a single namespace anyway.
2026-02-17 04:55:24 +01:00
Daan De Meyer 0ad6108c8e mkosi: Set CacheOnly=metadata for test images (#40699)
The default behavior is to sync repository metadata for every image
that does not have a cache and we recently changed behavior to
invalidate
all cached images whenever we decide the repository metadata needs to
be resynced.

In systemd we have two images that are not cached because they use
BaseTrees=
hence set CacheOnly=metadata to explicitly indicate these two images
should never cause a repository metadata if resync even though they are
not cached.
2026-02-16 15:42:35 +01:00
Daan De Meyer 2a08e31cbd mkosi: Set CacheOnly=metadata for test images
The default behavior is to sync repository metadata for every image
that does not have a cache and we recently changed behavior to invalidate
all cached images whenever we decide the repository metadata needs to
be resynced.

In systemd we have two images that are not cached because they use BaseTrees=
hence set CacheOnly=metadata to explicitly indicate these two images
should never cause a repository metadata if resync even though they are
not cached.
2026-02-16 13:28:22 +01:00
Daan De Meyer 64ccae2a25 mkosi: update mkosi ref to 66d51024b7149f40be4702e84275c936373ace97
* 66d51024b7 man: Update caching section
* 4eac60f168 Remove all cached images if repository metadata will be synced
* 025c6c0150 Move Incremental= to inherited settings in docs
* 427970d8fd Make MakeScriptsExecutable= a multiversal setting
* 53bd2da6fe Look at all CacheOnly= settings to determine if we need to sync metadata
* 114ae558ef config / qemu: add Console=headless
2026-02-16 13:28:13 +01:00
Daan De Meyer 4e40c2a515 namespace-util: Merge namespace_enter_delegated() into namespace_enter() (#40669)
There's no need to pass in a boolean to decide whether we use
namespace_enter_delegated() or not. Instead, we can just check if we
have CAP_SYS_ADMIN in our own user namespace. If we don't, then we have
to insist on a child user namespace being passed in and we have to enter
it first to get CAP_SYS_ADMIN as without CAP_SYS_ADMIN we wouldn't be
able
to call setns() in the first place. If we do have CAP_SYS_ADMIN, we can
always enter the other namespaces first before entering the user
namespace.

Additionally, we don't fail anymore if we can't reset the UID/GID since
a
root user might not always be available in every user namespace we might
enter.
2026-02-16 11:26:41 +01:00
Daan De Meyer a5ceab95ab Varlink fixlets and several other follow-ups (#40687) 2026-02-16 11:02:08 +01:00
Daan De Meyer d1e0b59843 oomd: Fix bug where we drop queued kill state on duplicate cgroup (#40690) 2026-02-16 10:52:49 +01:00
Daan De Meyer 211c3c9d41 namespace-util: Merge namespace_enter_delegated() into namespace_enter()
There's no need to pass in a boolean to decide whether we use
namespace_enter_delegated() or not. Instead, we can just check if we
have CAP_SYS_ADMIN in our own user namespace. If we don't, then we have
to insist on a child user namespace being passed in and we have to enter
it first to get CAP_SYS_ADMIN as without CAP_SYS_ADMIN we wouldn't be able
to call setns() in the first place. If we do have CAP_SYS_ADMIN, we can
always enter the other namespaces first before entering the user namespace.

Additionally, we don't fail anymore if we can't reset the UID/GID since a
root user might not always be available in every user namespace we might
enter.
2026-02-16 10:27:02 +01:00
Daan De Meyer e2c1f3ca2a user-util: Don't setgroups() if /proc/self/gid_map is empty
If /proc/self/gid_map is empty, the kernel will refuse setgroups(),
so don't attempt it if that's the case on top of the /proc/self/setgroups
check we already have.
2026-02-16 09:37:32 +01:00
Daan De Meyer 051d228b1c tree-wide: Add some extra debug logging 2026-02-16 09:37:32 +01:00
Daan De Meyer 77b3ddf2aa mkosi: Install musl in tools trees on Fedora/Arch
For debugging purposes.
2026-02-16 09:37:14 +01:00
Daan De Meyer 4e77671be7 mkosi: Remove some packages from the image
Let's slim down the image size a bit. None of the removed packages
should be required.
2026-02-15 12:51:00 +00:00
Daan De Meyer 8734b0ff32 mkosi: update mkosi ref to 4b18ea8395e9cc2b1d247be93944f5539affe964 (#40681)
* 4b18ea8395 sandbox: Make sure eventfd is CLOEXEC
* 23ea86d0cf Revert "Bump minimum python version to 3.10"
* 81fd30ec77 Revert "sandbox: Use os.eventfd()"
* 717020c97b Revert "Use python3.12 as interpreter in CentOS Stream 9
zipapp"
* e1d0e45e3b Rework sandbox globbing and exist checks
2026-02-14 18:31:26 +01:00
Daan De Meyer fe989a1f5a mkosi: update mkosi ref to 4b18ea8395e9cc2b1d247be93944f5539affe964
* 4b18ea8395 sandbox: Make sure eventfd is CLOEXEC
* 23ea86d0cf Revert "Bump minimum python version to 3.10"
* 81fd30ec77 Revert "sandbox: Use os.eventfd()"
* 717020c97b Revert "Use python3.12 as interpreter in CentOS Stream 9 zipapp"
* e1d0e45e3b Rework sandbox globbing and exist checks
2026-02-14 16:04:57 +01:00
Daan De Meyer 5ae7db99bf tools: Fix changelog generation (again)
Using --first-parent --no-merges seems to exclude not just the merge
commits but all the commits from the merge as well. Let's use only
--no-merges to get just the commits without merges.
2026-02-14 16:04:55 +01:00
Daan De Meyer 7a70c32368 mkosi: Mark minimal images as Incremental=relaxed
Building these over and over again is extremely wasteful. Let's just
build them once and not touch them again unless -ff is specified or
their cache is out-of-date, which is exactly what Incremental=relaxed
does.

This means mkosi.extra/ and such changes won't be picked up for these
anymore unless -ff is used, but that slight annoyance is totally
outweighed by the time saved building the images.
2026-02-14 10:36:14 +01:00
Daan De Meyer 894477e6c1 mkosi: Use mkosi.initrd.conf
A more straightforward way to extend the default initrd rather than
using a subimage. This mainly allows us to take advantage of mkosi
automatically figuring out whether the initrd needs to be built or not,
speeding up builds when building directory images as the initrd can be
skipped in that case.
2026-02-14 10:36:14 +01:00
Daan De Meyer e739a10625 mkosi: update mkosi ref to d6ddc66acb05d3d761d3f600c6b029319db9ae95
* d6ddc66acb Use python3.12 as interpreter in CentOS Stream 9 zipapp
* 89d876c86f tests: fix running pytest on undetected distro
* 61a47eeb1c centos: Fix EPEL repositories for RHEL 10
* e5aa19e2bc oci: allow user defined labels and annotations
* 1680fc5789 man: be more precise that the tools tree distribution is decided by the host distribution
* 7025b8e67d Support resizing output image
2026-02-14 10:36:09 +01:00
Daan De Meyer e8055af5f0 dissect: Various cleanups and fixes
- Only call have_effective_cap() if needed
- Fix comments and logging

Follow up for #40212
2026-02-13 17:18:33 +01:00
Daan De Meyer 54ff4f4c82 test-capability-util: Migrate to new test framework and macros 2026-02-13 14:21:32 +01:00
Daan De Meyer aca8ed4af1 portable: /run/systemd/portables => /run/portables 2026-02-13 11:40:11 +01:00
Daan De Meyer a81a88560b ssh-proxy: Fix runtime directory 2026-02-13 11:40:11 +01:00
Daan De Meyer 6ff7a8c691 Follow-ups for the metrics/report tool (#40642)
/cc @YapingLi04
2026-02-13 11:37:34 +01:00
Daan De Meyer 71de0a22ff core/service: support credentials refreshing on reload (#40093)
Closes https://github.com/systemd/systemd/issues/21099
Closes https://github.com/systemd/systemd/issues/35227
2026-02-13 10:21:44 +01:00
Daan De Meyer 48f0f1fd81 TEST-72-SYSUPDATE: Use some very long partition names
To catch issues like https://github.com/systemd/systemd/issues/40658.
The commit that fixes that issue can make the name even longer to ensure
we don't regress again in this regard.
2026-02-13 15:46:52 +09:00
Daan De Meyer 7b9600a6b2 sysupdate: Compute temporary paths before vacuuming
We don't want to vacuum anything if we're just going to fail just
afterwards because a GPT partition label exceeds the maximum size
so let's compute the temporary paths for all transfers before we do
any vacuuming or acquiring.
2026-02-13 15:46:52 +09:00
Daan De Meyer 3bba7fee4f dissect: Various fixes and improvements (#40212) 2026-02-12 11:26:18 +01:00
Daan De Meyer 01fb2d4a9e dissect: Use must_be_root() 2026-02-12 10:38:33 +01:00
Daan De Meyer f933e959b1 shift-uid: Add debug logging 2026-02-12 09:46:37 +01:00
Daan De Meyer dbd1a6e34f dissect: Allow --shift for users with CAP_CHOWN 2026-02-12 09:46:37 +01:00
DaanDeMeyer ba37ed9634 dissect: Introduce --copy-ownership= to configure chown behavior
Currently, if we're copying a file, we won't copy the owner UID/GID
from the source. If we're copying a directory, we will copy the owner
UID/GID from the source. Let's give users a bit more control over this
behavior by introducing --copy-ownership= which will default to the
current behavior but allows users to explicitly enable/disable copying
of ownership.
2026-02-12 09:45:13 +01:00
DaanDeMeyer ef155c909a dissect: Make --mount/--unmount/--with work unprivileged
Let's check for CAP_SYS_ADMIN instead of root for these, and make
unmounting more graceful if we can't access the backing loop device
because of permission issues. This allows mounting and unmounting images
from an unprvileged mount namespace. The actual files in the image will
end up owned by nobody:nobody because we'll be in an unprivileged user
namespace, but assuming the directory permissions are not too strict, this
still allows interacting with the image in useful ways.
2026-02-12 09:43:07 +01:00
DaanDeMeyer fe0114db8e dissect: Fix wrong errno passed to log message 2026-02-12 09:43:07 +01:00
DaanDeMeyer a0a4e9d7d2 dissect: Fix segmentation fault if loop device is not provided 2026-02-12 09:43:07 +01:00
DaanDeMeyer 53d1d6e49c dissect: Fix logging in (with) 2026-02-12 09:43:07 +01:00
DaanDeMeyer 09e38c2709 dissect: Don't use private userns for --copy-to/--copy-from
These actions interact with the host. The former needs privileges to
write into the image, the latter needs privileges to write on the host.
Neither will have the privileges required if the image is attached under
a private userns, hence, don't use one.
2026-02-12 09:43:07 +01:00
Daan De Meyer 5bc11cd4e6 sd-varlink: Allow using sd_varlink_reply() in streaming methods (#40546) 2026-02-11 14:58:12 +01:00
Daan De Meyer 9f01cffc39 bootctl: Drop SD_VARLINK_NULLABLE from ListBootEntries IDL
9e10f3a7e8 changed the implementation
to report an error instead of an empty object but the IDL was not
adjusted. Let's fix that.
2026-02-11 14:25:36 +01:00
Daan De Meyer 4f5d44ef53 tree-wide: Migrate to varlink_set_sentinel() 2026-02-11 14:25:36 +01:00
Daan De Meyer dc28940745 resolve: Make sure we free varlink subscription sets 2026-02-11 14:24:03 +01:00
Daan De Meyer c0696f1f5d sd-varlink: Introduce varlink_set_sentinel()
Streaming methods which are not used as a continuous subscription but
instead only send a series of objects all end up with the same workaround
to be able to figure out when to send sd_varlink_reply() or sd_varlink_notify().
Let's generalize this in sd-varlink itself.

Let's introduce the concept of a sentinel, which is a reply that will be sent
by sd-varlink if no other reply was queued by a method callback. The sentinel
is configured with varlink_set_sentinel(). If a sentinel is configured,
sd_varlink_reply() can be used more than once in streaming methods to queue
multiple values to stream to the client. The last queued reply is not sent
until the callback finishes. When the callback finishes, the last reply is
sent without "continues: more". If no reply was queued, the sentinel is sent.

This always using only sd_varlink_reply() in such streaming methods and
leaves sd_varlink_notify() available solely for continuous subscription
streaming methods, where we never use sd_varlink_reply() and instead disconnect
when the server exits.
2026-02-11 14:24:03 +01:00
Daan De Meyer 22f1d5a625 sd-varlink: Move code around
Preparation for next commits
2026-02-11 14:24:03 +01:00
Daan De Meyer edc1515cf8 varlink-unit: Coding style cleanups 2026-02-11 14:24:03 +01:00
Daan De Meyer 7f33ee8bb4 mkosi: Grow the root partition on boot
Let's make sure the root partition takes up all the allocated space
on boot.
2026-02-10 16:32:05 +01:00
Daan De Meyer 05f50caacb mkosi: Move generic disk partition before root partition
Otherwise we can't grow the root partition.
2026-02-10 16:31:22 +01:00
Daan De Meyer 7d4ea41bd1 bootctl parts of installer PR (#40447)
This contains the "bootctl install" related work from the #38764 split
out, but also includes the preparatory work already split out into
#40446.

I'll rebase this PR once the prep work is merged.

This has a simple CI test already, and has docs
2026-02-09 09:46:39 +01:00
Daan De Meyer 8fba6e2b40 oomd: Make OomdCGroupContext reference counted
Preparation for adding oomd hooks.
2026-02-09 02:05:57 +01:00
Daan De Meyer dd8c07da04 Various fixes related to mountfsd (#40564) 2026-02-05 16:39:28 +01:00
Daan De Meyer cbd2e08f00 pidfd-util: Remove unused include
This snuck in when CI was broken.
2026-02-05 16:18:35 +01:00
Daan De Meyer 14054134c6 nsresourced: Add comment about mknod() hook covering regular files 2026-02-05 15:16:31 +01:00
Daan De Meyer d1ae0e5205 nsresourced: Fix typo 2026-02-05 15:16:31 +01:00
Daan De Meyer b4bfacf496 mountfsd: Always open_tree() in mount namespace of peer
open_tree() will fail with EINVAL when passed a directory file descriptor
that comes from another mount namespace. While this should be fixed in a
future kernel, let's workaround the issue for now by entering the mount
namespace of the peer if needed and calling open_tree() there and then
passing the fd back to the mountfsd process.
2026-02-05 15:16:29 +01:00
Daan De Meyer 8b6d8ec66f udev: fix performance regression in resolving event dependencies (#40364)
Fixes #39583.
Fixes #39817.
2026-02-05 14:14:47 +01:00
Daan De Meyer 4de6855171 test-uid-range: Migrate to new assertion macros 2026-02-05 14:09:03 +01:00
Daan De Meyer f3b81859c2 namespace-util: Fix logging in userns_enter_and_pin() 2026-02-05 14:09:03 +01:00
Daan De Meyer d2f55e7079 mkosi: update mkosi ref to 215a9497ccc089ba030da39e15e9e2371efad3cb (#40573)
* 215a9497cc fedora: Use N-1 key as well when querying rawhide GPG key
* 842a37ed6c Add MakeScriptsExecutable= setting to optionally try to
make scripts executable before bailing out
* 814f2004bb build(deps): bump github/codeql-action from 4.31.9 to
4.32.0
* d8f4f628bf build(deps): bump actions/checkout from 6.0.1 to 6.0.2
* 3e55361142 docs: remove superfluous definition colon
* 5901524c48 mkosi-tools: add libarchive-tools package.
* 968392f1b9 docs: Add information about gui mkosi-tools profile
* 0e2960c245 Add missing call to run_locale_gen()
* 41cd2067bc rpm: Set pkgverify_level to digest
* 86fe0f448a dnf: Give advanced users some control over plugins
* 50a1feee52 run: Improve sandbox command logging
* b1dffe1c3c Fix environment variable name for systemd-repart
* 07726068d9 Allow specifying "default" value for Initrds=
* 704f163ec0 Allow setting PORTABLE_PREFIXES= via Environment=
* e6588afb45 opensuse: More GPG key handling fixes
* c367f993dd opensuse: Fetch remote keys as well if RepositoryKeyFetch=
is enabled
* 31852c9314 ci: Use mkosi box for unit test CI as well
* e4229f5bf5 Make sure we pass the right context to
finalize_default_initrd()
* 9b431b783a tools: don't pull in virtiofsd in bookworm tools trees
* ae2d88d463 build(deps): bump github/codeql-action from 4.31.6 to
4.31.9
* 933401a8b6 build(deps): bump actions/checkout from 6.0.0 to 6.0.1
* 6bfeb4ac86 opensuse: Import GPG keys for all repositories
* 9829b9136f Add support for locale-gen
* 63ae86ec04 nixos: Use repository key fetching by default on nixos
* f01ca9904b docs: Reword dependencies vs tools tree requirement a bit
* ab47ba25ef docs: Minor correction on enabling unprivileged namespaces
* 7bd46a417e docs: Update unprivileged user namespace docs
2026-02-05 14:06:45 +01:00
Daan De Meyer 42c0a25a21 mkosi: update mkosi ref to 14d2d37a1923c03062f55454b2b61d0c64db6238
* 14d2d37a19 sandbox: Make sure we're dumpable before writing uidmap files
* 215a9497cc fedora: Use N-1 key as well when querying rawhide GPG key
* 842a37ed6c Add MakeScriptsExecutable= setting to optionally try to make scripts executable before bailing out
* 814f2004bb build(deps): bump github/codeql-action from 4.31.9 to 4.32.0
* d8f4f628bf build(deps): bump actions/checkout from 6.0.1 to 6.0.2
* 3e55361142 docs: remove superfluous definition colon
* 5901524c48 mkosi-tools: add libarchive-tools package.
* 968392f1b9 docs: Add information about gui mkosi-tools profile
* 0e2960c245 Add missing call to run_locale_gen()
* 41cd2067bc rpm: Set pkgverify_level to digest
* 86fe0f448a dnf: Give advanced users some control over plugins
* 50a1feee52 run: Improve sandbox command logging
* b1dffe1c3c Fix environment variable name for systemd-repart
* 07726068d9 Allow specifying "default" value for Initrds=
* 704f163ec0 Allow setting PORTABLE_PREFIXES= via Environment=
* e6588afb45 opensuse: More GPG key handling fixes
* c367f993dd opensuse: Fetch remote keys as well if RepositoryKeyFetch= is enabled
* 31852c9314 ci: Use mkosi box for unit test CI as well
* e4229f5bf5 Make sure we pass the right context to finalize_default_initrd()
* 9b431b783a tools: don't pull in virtiofsd in bookworm tools trees
* ae2d88d463 build(deps): bump github/codeql-action from 4.31.6 to 4.31.9
* 933401a8b6 build(deps): bump actions/checkout from 6.0.0 to 6.0.1
* 6bfeb4ac86 opensuse: Import GPG keys for all repositories
* 9829b9136f Add support for locale-gen
* 63ae86ec04 nixos: Use repository key fetching by default on nixos
* f01ca9904b docs: Reword dependencies vs tools tree requirement a bit
* ab47ba25ef docs: Minor correction on enabling unprivileged namespaces
* 7bd46a417e docs: Update unprivileged user namespace docs
2026-02-05 13:10:35 +01:00
Daan De Meyer 7bb0bd400f fetch-mkosi: Shorten commit message title
Currently github truncates the message so let's make it a little shorter
so it's not truncated.
2026-02-05 10:53:09 +01:00
Daan De Meyer ae6dcaff0d portable: Don't refuse copying out instance of template that exists
There's no reason to refuse copying out capsule@abc.service even if
capsule@.service already exists on the host, so let's optionally not
search for templates if we can't find an instance when looking up
units and use it in portabled.
2026-02-03 15:03:51 +01:00
Daan De Meyer 4d388536ee tree-wide: Allow running capsules as any user
For many use cases DynamicUser= just doesn't cut it. Specifically lots
of stuff wants to run as root. Let's support this use case by relaxing
our checks for capsules a bit.
2026-02-03 15:00:32 +01:00
Daan De Meyer b231c4dcb4 core: Improve logging when we cannot create destination mountpoint
If we fail to create a parent directory, then the error from
make_mount_point_inode_from_path() will always be
"No such file or directory" which doesn't tell us anything. Add logging
for the mkdir_parents() call as well so we get a useful error.
2026-02-03 15:00:32 +01:00
Daan De Meyer b61aeeb315 meson: Drop minimum meson version required for clang-tidy 2026-01-22 13:33:35 +09:00
Daan De Meyer a08cee5084 mountfsd: Make singleFileSystem non-nullable
It's always set, so no need to be nullable.
2026-01-21 23:12:47 +01:00
Daan De Meyer b58a45e96a portable: Enable unpriv operation (#40091)
This does not yet support directory images properly
as systemd itself does not support unpriv directory
images properly yet.
2026-01-21 16:46:53 +01:00
Daan De Meyer 824fcb95c9 portable: Enable unpriv operation
This does not yet support directory images properly
as systemd itself does not support unpriv directory
images properly yet.

The user profiles are a copy of the system profiles but without
DynamicUser=yes (can't be used by user managers) and without
ProtectHome=yes (this masks /home which breaks StateDirectory= which
is lcoated inside /home)
2026-01-21 15:09:46 +01:00
Daan De Meyer 1a239eae8e portable: Split out receive_portable_metadata() 2026-01-21 12:03:08 +01:00