Commit Graph
14 Commits
Author SHA1 Message Date
Lennart Poettering acd4943528 copy: calculate bytes per second while copying, and pass to progress info
Also, show it in import-fs/repart.
2025-09-17 19:48:08 +01:00
DaanDeMeyer 852de7ed70 nspawn: Prepare --bind-user= logic for reuse in systemd-vmspawn
Aside from the usual boilerplate of moving the shared logic to shared/,
we also rework the implementation of --bind-user= to be similar to what
we'll do in systemd-vmspawn. Instead of messing with the nspawn container
user namespace, we use idmapped mounts to map the user's home directory on
the host to the mapped uid in the container.

Ideally we'd also use the "userdb.transient" credentials to provision the
user records, but this would only work for booted containers, whereas the
current logic works for non-booted containers as well.

Aside from being similar to how we'll implement --bind-user= in vmspawn,
using idmapped mounts also allows supporting --bind-user= without having to
use --private-users=.
2025-07-14 16:25:22 +02:00
Yu Watanabe 31b7616420 conf-files: introduce struct ConfFile to store information of found conf file
It is currently unused, will be used later. Preparation for later changes.
2025-07-11 10:41:07 +09:00
DaanDeMeyer bda934d4e5 forward: Add struct mount_attr forward declaration 2025-07-07 13:35:54 +02:00
Mike Yuan 0e9667fd9a basic/forward: replace tab with space 2025-06-09 20:39:23 +02:00
Yu Watanabe afcb6d671b forward: also include paths.h
It provides several important constants, especially _PATH_BSHELL, which
is used in PID1, executor, and run. The header has been included
indirectly through e.g. libmount.h, mntent.h, utmpx.h, and so on.
Let's explicitly include it in forward.h, as libmount.h and friends that
includes paths.h are irrelevant to _PATH_BSHELL, and we may easily fail
to build when code is touched.
The header is not heavy, hence should not hurt anything.
2025-06-09 22:45:23 +09:00
Daan De Meyer 1b4645d762 forward: Drop socklen_t forward declaration
This is glibc specific and doesn't exist on musl, since removing only
means adding one more include in selinux-util.h, let's drop it.

Fixes #37779
2025-06-08 10:58:56 +09:00
Daan De Meyer 0c15577abe basic + fundamental: Clean up includes
Split out of #37344.
2025-05-25 10:06:07 +02:00
Daan De Meyer 4cfd024e73 forward: Move ChaseFlags forward declaration to forward.h 2025-05-24 20:44:12 +02:00
Daan De Meyer b2ae2119c5 forward: Add more forward declarations
CGroupMask was erronously added to core-forward.h even though it
comes from src/basic so we move it to the right location.
2025-05-22 17:26:43 +02:00
Daan De Meyer 4c26a68f7b forward.h: Add forward declaration of BusObjectImplementation 2025-05-21 10:12:19 +02:00
Daan De Meyer 0dc510ab03 tpm2-util: Make sure structs/enums are named and add to forward.h
We have to name structs/enums to be able to forward declare them, so
let's do that and add the missing ones to forward.h.
2025-05-14 22:34:02 +02:00
Daan De Meyer ba6d1f9aca forward: Add forward declaration for LockFile 2025-05-14 19:20:00 +02:00
Daan De Meyer 686bbf1e7f Introduce forward.h header with forward declarations
In preparation for adopting forward declarations to reduce unnecessary
transitive includes across the tree, let's introduce a forward.h header
with forward declarations for all libc, libsystemd, basic and shared types.

Additionally, this header exports all basic integer types and errno constants,
as well as all macros including assertions macros. These header files contain
types often used in headers and are always included in every source file one
way or another anyway.

To avoid having to include memory-util.h and alloc-util.h in forward.h, we
split off the parts we need from both into cleanup-util.h and only include
cleanup-util.h in forward.h.

To keep this commit self-contained, we include cleanup-fundamental.h and
cleanup-util.h from the headers that originally contained the same macros.
We'll remove these again in a later commit that optimizes the includes in
src/basic and src/fundamental.

Split out of #37364
2025-05-14 15:44:17 +02:00