1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
Commit Graph

74902 Commits

Author SHA1 Message Date
Luca Boccassi
d2c8426a59 core: do not fail if ignorable img.v/ vpick dir is missing
Do not fail if the directory is missing entirely, other than just empty

Follow-up for 00f546e25e
Follow-up for 5e79dd96a8
Follow-up for 622efc544d

(cherry picked from commit e1efa9d804)
2024-11-13 19:48:10 +00:00
Luca Boccassi
2494dc1961 core: do not fail if ignorable img.v/ vpick dir is empty
If the vpick directory is configured to be ignored if missing, do not
fail and just skip ahead.

Follow-up for 5e79dd96a8
Follow-up for 622efc544d

(cherry picked from commit 00f546e25e)
2024-11-13 19:48:10 +00:00
John A. Leuenhagen
799ae7fa38 TEST-74-AUX-UTILS: add tests for 'run0 -D'
(cherry picked from commit 4ca75488d9)
2024-11-13 19:48:10 +00:00
John A. Leuenhagen
7c965fe62c run: fix bug causing run0 to ignore -D /.
Since the root directory was being suppressed to NULL, the subsequent
check would erroneously think that no working directory was specified.
This caused the default working directory to be applied instead.

(cherry picked from commit 0054a2acc3)
2024-11-13 19:48:10 +00:00
Yu Watanabe
30cf66855b network/dhcp6: set hostname even if UseAddress=no
Follow-up for f963f8953d and
1536b7b2d0.

(cherry picked from commit 8fead9c9e4)
2024-11-13 19:48:10 +00:00
Yu Watanabe
864a42f309 udev: do not try to lock whole block device on remove event
As another device may be created with the same device node while udevd
is processing the remove event of the previous owner of the device node.

This also adds comment why we skip watching device node on remove.

(cherry picked from commit e8df18c9e1)
2024-11-13 19:48:10 +00:00
Gaël PORTAY
6a288cd999 docs: add a missing : character
This adds the missing colon character to the section systemd-sysusers.

(cherry picked from commit 8ef5ea2bf6)
2024-11-13 19:48:10 +00:00
Lennart Poettering
1f0d68c6e9 man: document preference for secure_getenv() in coding style
(cherry picked from commit c9b477415a)
2024-11-13 19:48:10 +00:00
Yu Watanabe
63797be0e9 test: add test for local outbounds with preferred source address
(cherry picked from commit 0343ef9764)
2024-11-13 19:48:10 +00:00
Yu Watanabe
b34a93d61a local-addresses: honor RTA_PREFSRC field of gateway
Fixes #34739.

(cherry picked from commit 4adf2653e2)
2024-11-13 19:48:10 +00:00
Yu Watanabe
ba58edb8ff local-addresses: use FOREACH_ARRAY() macro
(cherry picked from commit 418641f73f)
2024-11-13 19:48:10 +00:00
Yu Watanabe
ec37980695 TEST-64-UDEV-STORAGE: insert udevadm settle more
Hopefully fixes #34073.

(cherry picked from commit acadc9a849)
2024-11-13 19:48:10 +00:00
Yu Watanabe
d600880c99 TEST-58-REPART: drop duplicated inclusion of util.sh
(cherry picked from commit 4ca7b55329)
2024-11-13 19:48:10 +00:00
Yu Watanabe
4abbd3a9c6 mkosi: replace PackageManagerTrees= with SandboxTrees=
(cherry picked from commit 4e3f16b5ef)
2024-11-13 19:48:10 +00:00
Jörg Behrmann
39a46aced6 ukify: Require both key and cert be set in generate_keys
If either is None the write in this branch of the code will fail.

(cherry picked from commit 9ba53499b9)
2024-11-13 19:48:10 +00:00
Daan De Meyer
c7762098ec systemd-update-helper: Show executed commands if debug logging is enabled
(cherry picked from commit 8b8668b9e7)
2024-11-13 19:48:10 +00:00
Lennart Poettering
389fbf4649 seccomp: allowlist uretprobe() syscall
This is a new syscall provided by the kernel used to implement faster
uprobes. It's not supposed to be called by userspace, but only by kernel
generated uprobe code.

It should be fine to allow this, as the kernel authenticates the
invocation itself, and we shouldn't break compat with things.

Note that this allowlisting is not sufficient to make ureprobe() work.
libseccomp must be tought the syscall too, but this can happen
independently.

Fixes: #34615
(cherry picked from commit d693c483a2)
2024-11-13 19:48:10 +00:00
Daan De Meyer
4d2999eb53 mkosi: Fix up ownership of testuser home directory on first boot
When building unprivileged, the testuser home directory ends up
owned by root:root because mkosi can't chown directories to other
owners when running unprivileged. So let's fix up the testuser
ownership on first boot with tmpfiles instead.

(cherry picked from commit 0d0ecaab00)
2024-11-13 19:48:10 +00:00
David Rheinsberg
a9aa75145b docs/DESKTOP_ENVIRONMENTS: clarify name aliases
Add a note to the service-file naming scheme that reminds developers
that those names might be aliases. Hence, when parsing such unit names,
the entire name-array of a unit must be parsed, rather than just the
unit ID.

The service-name of existing applications might be already part of their
API. Hence, not all applications can switch the service ID to this new
naming scheme, but can provide suitable aliases. Document this behavior.

(cherry picked from commit b3b7cf8b7c)
2024-11-13 19:48:10 +00:00
David Rheinsberg
361021a522 docs/DESKTOP_ENVIRONMENT: clarify <RANDOM> usage
The <RANDOM> part is optional in the naming scheme of application units.
However, this is only true for service files. Scope units must include
the <RANDOM> part, otherwise it would be impossible to parse:

The schema would be:

    `app[-<launcher>]-<ApplicationID>[-<RANDOM>].scope`

in which case a two-part name would be impossible to parse, since it is
unclear whether the launcher of the random bit where omitted.

(cherry picked from commit cbaebf811e)
2024-11-13 19:48:10 +00:00
Lennart Poettering
c14a47547d meson: sort includes
(cherry picked from commit 882032faaf)
2024-11-13 19:48:10 +00:00
Mike Yuan
f4df9627ae core/manager: still send out STATUS=Ready for user manager
This effectively reverts 37d15cd132.

The offending commit wrongly assumed that the second READY=1
notification is for system scope only, but it also serves the purpose
of flushing out previous STATUS= containing user unit job status.

(cherry picked from commit da81a10865)
2024-11-13 19:48:10 +00:00
David Rheinsberg
3a0c77aeb9 docs/DESKTOP_ENVIRONMENTS: fix formatting
The annotation about omittance is meant to be about the `RANDOM` string.
However, the current formatting makes it look like the entire naming
scheme is optional. Fix this.

(cherry picked from commit 5697bce82b)
2024-11-13 19:48:10 +00:00
Lennart Poettering
ca9b0afd91 docs: don't mention split-usr path anymore
We don't support split /usr/ anymore. Hence fix the paths. This
apparently matters because of PK validating the binary path.

Fixes: #34712
(cherry picked from commit c28a13b5af)
2024-11-13 19:48:10 +00:00
Yu Watanabe
d9d4cbfe5f mkosi: fix sections for settings
Follow-up for 963157ca78.

(cherry picked from commit 727dc1f23a)
2024-11-13 19:48:10 +00:00
Lennart Poettering
ff667d8c2e man: reword comment a bit regarding ExecStartPre= multiple commands
The documentation claimed that ExecStartPre=/ExecStartPost= accepts
multiple command lines, in contrast to ExecStart=. This is half an
untruth, because ExecStart= allows that too – as long as Type=oneshot is
set.

Hence, reword this a bit, and do not emphasize the contrast.

Prompted by: #34570

(cherry picked from commit c3069a6bfb)
2024-11-13 19:48:10 +00:00
Jörg Behrmann
50b42bb82b ukify: Fix systemd-measure detection in tests
Fixes: 206fa93c85
(cherry picked from commit e9984357ad)
2024-11-13 19:48:10 +00:00
WilliButz
b96e3bbd9f test/repart: add test case for hash size derived from max data size
(cherry picked from commit e16153a403)
2024-11-13 19:48:10 +00:00
WilliButz
5ea69f9f6d repart: derive hash partition size from SizeMaxBytes= of data sibling
This change makes it possible for repart to create dm-verity hash
partitions for a custom amount of protected data. When the property
`SizeMaxBytes=` is specified for a dm-verity data partition, the size
of the corresponding hash partition is set to accommodate hash data
for this maximum size, rather than the actual contents its data
sibling. However, the contained hash data continues to be generated
from said sibling.

(cherry picked from commit d3032e651e)
2024-11-13 19:48:10 +00:00
Chen Guanqiao
44e1774660 mount: optimize mountinfo traversal by decoupling device discovery
In mount_load_proc_self_mountinfo(), device_found_node() is synchronously called
during the traversal of mountinfo entries. When there are a large number of
mount points, and the device types are not significantly different, this results
in excessive time consumption during device discovery, causing a performance
bottleneck. This issue is particularly prominent on servers with a large number
of cores in IDC.

This patch decouples device discovery from the mountinfo traversal process,
avoiding redundant device operations. As a result, it significantly improves
performance, especially in environments with numerous mount points.

Signed-off-by: Chen Guanqiao <chen.chenchacha@foxmail.com>
(cherry picked from commit 00ad3f0227)
2024-11-13 19:48:10 +00:00
David Joaquín Shourabi Porcel
697d247e30 man: machinectl(1): Fix description of subcommand poweroff
(cherry picked from commit a41da1e703)
2024-11-13 19:48:10 +00:00
David Joaquín Shourabi Porcel
5a2f94d2da man: systemd-nspawn(1): Fix some typos
(cherry picked from commit f4e3c6e5b3)
2024-11-13 19:48:10 +00:00
Yu Watanabe
b64601d454 test: add test cases for timestamp with time zone
(cherry picked from commit 25999f868f)
2024-11-13 19:48:10 +00:00
Yu Watanabe
38d55448b9 time-util: copy input string before fork()
Fixes #34670.

(cherry picked from commit 6d3012bab4)
2024-11-13 19:48:10 +00:00
Yu Watanabe
c7a00c4cae time-util: fix parsing timestamp with NZ timezone
Fixes a bug caused by ef658a63f8.

(cherry picked from commit eb87d3e1e9)
2024-11-13 19:48:10 +00:00
Lennart Poettering
964f7772ad resolved: fix fastopen fallback
We should not invalidate the socket address size before we use it.

Fixes: #34579
(cherry picked from commit 5699e4c2d4)
2024-11-13 19:48:10 +00:00
Vito Caputo
5e45c58274 mmap-cache: add some stats about files/windows/unused
Let's give some visibility into the ratio of files:windows:unused
by the time we're done using the cache.

(cherry picked from commit 284802c597)
2024-11-13 19:48:10 +00:00
Vito Caputo
3dcde32fed mmap-cache: enforce an unused windows minimum
With many fds the global windows count generally exceeds the
minimum.   This results in always reusing the unused entry if
there is one, which becomes a sort of degenerate case where we're
just constantly unmapping->mapping.

Instead let's try always have at least several unused windows on
the unused list before we resort to churning through it.

Fixes #34516

(cherry picked from commit 176f73272e)
2024-11-13 19:48:10 +00:00
Daan De Meyer
933686348b
Merge pull request #34728 from DaanDeMeyer/backport-logging-improvements
Backport logging improvements to v256-stable
2024-10-11 20:40:07 +02:00
Daan De Meyer
814be7116d core: Log in more scenarios about which process initiated an operation
Exit/Reboot/Poweroff and similar operations are invasive enough that
logging about who initiated them is very useful to debug issues.

(cherry picked from commit acb0f501f4)
2024-10-11 18:14:45 +02:00
Daan De Meyer
31e38b55b2 core: Bump log level of reexecute request to notice
A daemon-reload is important enough to deserve logging at notice
level.

(cherry picked from commit 4ee41be825)
2024-10-11 18:13:35 +02:00
Daan De Meyer
871ee2f087 bus-util: Log more information when connecting to a bus socket fails
Let's log about which bus we're trying to connect to and what transport
we're using to do it.

(cherry picked from commit d8a77d55e6)
2024-10-11 18:12:38 +02:00
Frantisek Sumsal
c5baa5d9d9 test: drop removed SCSI passthrough feature
This feature has been deprecated since QEMU 5.0 and finally removed in
QEMU 9.1 [0] which now causes issues when running the storage tests on
latest Arch:

------ testcase_long_sysfs_path: BEGIN ------
...
qemu-system-x86_64: -device virtio-blk-pci,drive=drive0,scsi=off,bus=pci_bridge25: Property 'virtio-blk-pci.scsi' not found
E: qemu failed with exit code 1

[0] a271b8d7b2

(cherry picked from commit cd57920fbf)
2024-10-09 15:32:29 +01:00
Luca Boccassi
abd44e2654 doc-sync: strip point release from version before uploading
We create subdirectories for each major release, but not for point releases
so strip the suffix if it is present

(cherry picked from commit 59e6059513)
2024-10-08 16:47:25 +01:00
Luca Boccassi
7635d01869 meson: bump version to 256.7 2024-10-08 16:42:30 +01:00
Yu Watanabe
259a8413a6 test: add test cases for --volatile= with -U
For issue #34254.

(cherry picked from commit 48878074d6)
2024-10-08 16:39:12 +01:00
Yu Watanabe
8f31e8ca84 nspawn: only remount /usr/ with idmap when --volatile=yes
The root directory is already mounted with a picked UID shift, hence
it is not necessary to remount with idmap. However, /usr/ is a bind-mount,
hence it must be remounted with idmap.

With this change, now '-U --volatile=yes' works fine.

Fixes #34254.

(cherry picked from commit 025be2361b)
2024-10-08 16:39:12 +01:00
Yu Watanabe
8c31367d23 nspawn: mount /var/ after remount_idmap() when --volatile=state
Previously, remount_idmap() failed as /var/ was already mounted, thus
remounting (strictly speaking, unmounting old root directory) failed
with -EBUSY.

As tmpfs /var/ is mounted with picked UID shift, it should not be
remounted with idmap, but needs to be mounted after the root directory
being remounted.

This makes '-U --volatile=state' work as expected.

(cherry picked from commit 2c2511aa73)
2024-10-08 16:39:12 +01:00
Yu Watanabe
8aedc1fe29 nspawn: use strv_extend() and friends to build directories passed to remount_idmap()
No functional change, just refactoring and preparation for later change.

(cherry picked from commit 21cd84df69)
2024-10-08 16:39:12 +01:00
Lennart Poettering
c5169b4441 meson: tweak meson conditionalization for ssh{d,}_config drop-ins
Let's make sure "no" is an acceptable setting for these paths.

(cherry picked from commit a8ea7c1940)
2024-10-08 16:39:12 +01:00