Commit Graph
84661 Commits
Author SHA1 Message Date
Gero Schwäricke 032ea7ca12 rules: add rule to generate unique symlinks for gpio devices
Regular generated paths make it hard to identify individual GPIO
devices. This is a challenge when using multiple USB-to-GPIO adapters
like Diolan DLN2.

The unique symlinks from this rule can be used, e.g., with gpiod tools.
2025-11-10 23:22:08 +09:00
Yu Watanabe 9485379850 resolve: several follow-ups for json output (#39605)
Follow-ups for #38960.
2025-11-10 22:32:28 +09:00
Yu Watanabe ecf3c8702d test-ndisc-rs: drop unused verbose flag and log in the debug level 2025-11-10 20:49:21 +09:00
Yu Watanabe 1d17b23dd6 test: avoid service name collision
The same service name was accidentally used for two invocations:
```
[ 1801.197993] H TEST-04-JOURNAL.sh[20563]: + assert_rc 0 journalctl -q -D /run/log/journal/e30adae55e664d328af442bf5df694c8/ -u test-23833.service --grep service=test-23833.service
[ 1801.198527] H TEST-04-JOURNAL.sh[20685]: + set +ex
[ 1801.222676] H TEST-04-JOURNAL.sh[20686]: Nov 10 03:18:51 H systemd[1]: test-23833.service: About to execute: /usr/bin/bash -c "echo service=test-23833.service invocation=\$INVOCATION_ID; journalctl --sync"
[ 1801.222676] H TEST-04-JOURNAL.sh[20686]: Nov 10 03:18:51 H systemd[1]: Started test-23833.service - [systemd-run] /usr/bin/bash -c "echo service=test-23833.service invocation=\$INVOCATION_ID; journalctl --sync".
[ 1801.222676] H TEST-04-JOURNAL.sh[20686]: Nov 10 03:18:51 H (bash)[20681]: test-23833.service: Executing: /usr/bin/bash -c "echo service=test-23833.service invocation=\$INVOCATION_ID; journalctl --sync"
[ 1801.222676] H TEST-04-JOURNAL.sh[20686]: Nov 10 03:18:51 H bash[20681]: service=test-23833.service invocation=1866f15e95924a688dcecde72bf345f6
[ 1801.227878] H TEST-04-JOURNAL.sh[20563]: + assert_rc 1 journalctl -q -D /var/log/journal/e30adae55e664d328af442bf5df694c8/ -u test-23833.service --grep service=test-23833.service
[ 1801.228265] H TEST-04-JOURNAL.sh[20689]: + set +ex
[ 1801.253412] H TEST-04-JOURNAL.sh[20690]: Nov 10 03:18:49 H systemd[1]: test-23833.service: About to execute: /usr/bin/bash -c "echo service=test-23833.service invocation=\$INVOCATION_ID; journalctl --sync"
[ 1801.253412] H TEST-04-JOURNAL.sh[20690]: Nov 10 03:18:49 H systemd[1]: Started test-23833.service - [systemd-run] /usr/bin/bash -c "echo service=test-23833.service invocation=\$INVOCATION_ID; journalctl --sync".
[ 1801.253412] H TEST-04-JOURNAL.sh[20690]: Nov 10 03:18:49 H (bash)[20581]: test-23833.service: Executing: /usr/bin/bash -c "echo service=test-23833.service invocation=\$INVOCATION_ID; journalctl --sync"
[ 1801.253412] H TEST-04-JOURNAL.sh[20690]: Nov 10 03:18:49 H bash[20581]: service=test-23833.service invocation=a3089a62b5624d21bac0a75a3995d8b5
[ 1801.258158] H TEST-04-JOURNAL.sh[20692]: FAIL: expected: '1' actual: '0'
```
2025-11-10 20:49:00 +09:00
Yu Watanabe 39adbedafc various: assorted cleanups for safe_fork (#39661) 2025-11-10 18:40:16 +09:00
Yu Watanabe f50f785737 dissect: getenv_fstype() is unused when LIBBLKID support is disabled
Follow-up for aad0d11e7c.
2025-11-10 18:38:32 +09:00
Yu Watanabe b1a95a3aa7 resolvectl: drop an empty line between function call and error handling
Follow-up for 0536b37629.
2025-11-10 11:02:51 +09:00
Yu Watanabe f2f89678ec resolvectl: use string table
Follow-up for 0536b37629.
2025-11-10 11:02:51 +09:00
Yu Watanabe fa05718dea resolvectl: rename STATUS_PRIVATE -> STATUS_DNS_OVER_TLS 2025-11-10 11:02:51 +09:00
Yu Watanabe 6f841e58b1 resolve: do not dump cache entries when not necessary
Follow-up for 306375c368.
2025-11-10 11:02:51 +09:00
Mike Yuan 1be6068c48 notify: raise log level for safe_fork() 2025-11-10 03:02:47 +01:00
Yu Watanabe 76c674ec25 resolve: use enum for several fields
Unfortunately, we have already exposed dnssec with hyphen, so we cannot
change it as enum.
2025-11-10 11:02:33 +09:00
Yu Watanabe c6b6ac63ea resolve: drop unnecessary preparation of empty arrays 2025-11-10 11:01:39 +09:00
Yu Watanabe a37239d05f resolve: use JSON_BUILD_PAIR_TRISTATE_NON_NULL for default_route 2025-11-10 11:01:38 +09:00
Yu Watanabe a45bc4a1be core/namespace: hide the correct credentials tree when running in user scope (#39651) 2025-11-10 11:01:16 +09:00
Hosted Weblate 2ddd030b6a po: Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/
Translation: systemd/main
2025-11-10 11:00:40 +09:00
Dr. David Alan Gilbert 72afecf1f6 network: Typo fix configur*a*d
configurad->configured
2025-11-10 10:58:11 +09:00
Mike Yuan d9f993dd86 hostname-setup: prefix helper process name with "sd-" 2025-11-10 02:55:40 +01:00
Yu WatanabeandEvgeny Vereshchagin a736d4ec9c oss-fuzz: install libcrypt-dev in i386 image
This is preparation for bumping base image of oss-fuzz to Ubuntu 24.04.

Closes #39395.

Co-authored-by: Evgeny Vereshchagin <evvers@ya.ru>
2025-11-10 10:45:42 +09:00
Mike Yuan 686117e5b0 process-util: prefix FORK_PID_ONLY with _ to signify it is internal 2025-11-10 02:44:57 +01:00
Yu Watanabe e3ea1cfd5e tree-wide: add several missing includes
- test-reread-partition-table.c: sys/file.h for LOCK_EX
- coredump: unistd.h for STDIN_FILENO
2025-11-10 09:36:52 +09:00
Mike Yuan 6a5e38c3b9 TEST-54-CREDS: add test case for credential dir masking 2025-11-09 23:38:59 +01:00
Mike Yuan 9876309cfe run: make sure we send out READY=1 when --wait
Let's skip bus_wait_for_jobs_one() when --wait as well,
as it surpasses the start job and allows for
run_context_check_started() to fire.
2025-11-09 22:39:42 +01:00
Mike Yuan a07c1ed05f core/namespace: hide the correct credentials tree when running in user scope 2025-11-09 22:39:42 +01:00
Yu Watanabe 97ad10c9aa profile: skip setting PS0 when PROMPT_COMMAND= is cleared
Fixes #39639.
2025-11-10 06:05:15 +09:00
Maximilian Bosch 4dabc30050 service: setup credentials for ExecCondition
Closes #35788

This gives access to credentials within ExecCondition=. As described in
ticket #35788, I do have a use-case for this and as noted in the
commit that dropped this[1], this is OK to be revisited if there are
use-cases.

[1] a145623bc4
2025-11-10 05:27:00 +09:00
Yu Watanabe 96e5612d9f core/import-creds: trivial modernizations (#39652) 2025-11-10 05:26:37 +09:00
Mike Yuan 40054039e6 labeler: catch up with recent changes (#39653) 2025-11-09 20:25:45 +01:00
Mike Yuan c2715eed58 labaler: add "shell profile" 2025-11-09 18:57:20 +01:00
Mike Yuan dcb717a53a labeler: match per-user machined units too 2025-11-09 18:57:01 +01:00
Mike Yuan 4f7695fa21 labeler: be more specific when matching for "import" 2025-11-09 18:56:15 +01:00
Mike Yuan 63edae360f core/import-creds: use RET_GATHER 2025-11-09 18:46:37 +01:00
Mike Yuan 61e018dfad core/import-creds: use FOREACH_ARRAY at one more place 2025-11-09 18:46:37 +01:00
Mike Yuan d0fcb614cb core/import-creds: rename import_credentials_context_free() to _done()
This is allocated on stack, hence rename as per our coding style.
While at it, make sure the struct name is consistent with funcs.
2025-11-09 18:46:36 +01:00
Yu Watanabe 445b7073c7 repart: Correctly handle btrfs compression (#39597)
systemd-repart is incorrectly choosing the loop-mount
code path to copy files after formatting, instead of using the --rootdir
path, which is required by mkfs.btrfs to apply compression (since it's
on files, not the fs).

So two fixes (and an integ test):

1. If Btrfs compression is requested without a root directory (e.g.,
Compression= without CopyFiles=), we now log a warning and skip the
--compress flag. This prevents the mkfs.btrfs failure, and it's
meaningless anyway without any files.
2. The logic in repart now uses the --rootdir code path whenever the
partition is btrfs and compression is requested. Otherwise it still
won't work even in the legitimate case because use the loop mounting
code, which is too late to use --compress.

Fixes: https://github.com/systemd/systemd/issues/39584
2025-11-10 01:52:19 +09:00
Chris Down 2091caddb8 test: Add integration test for btrfs compression in repart
Add testcase_btrfs_compression() to verify that btrfs partitions with
Compression= and CopyFiles= directives work correctly.

The test verifies the fix for issue #39584, where mkfs.btrfs would fail
with "ERROR: --compression must be used with --rootdir" when repart
tried to create compressed btrfs filesystems.

The test creates a partition definition with Format=btrfs,
Compression=zstd, and CopyFiles=, then validates:

1. systemd-repart output shows "Rootdir from:" and "Compress:",
   confirming that the --rootdir code path is used
2. mkfs.btrfs is invoked with both --compress and --rootdir options
3. The file is successfully copied to the filesystem
4. Compression is actually applied (verified via compsize output
   containing "zstd")
2025-11-09 21:14:22 +08:00
Yu Watanabe b3c117172f bpf-compat: coding style cleanups 2025-11-09 18:13:44 +09:00
Yu Watanabe 7304557ea9 reread-partition-table: fix error code check
flock() sets EAGAIN rather than EBUSY when a node is already locked.

Follow-up for d8e38d4aaa.
Fixes #39544.
2025-11-09 18:12:38 +09:00
Yu Watanabe 0213b68969 libarchive-util: several cleanups
- use loop for checking existence of functions,
- rename HAVE_LIBARCHIVE_XYZ -> HAVE_ARCHIVE_XYZ to make them match with
  the function name,
- do not conditionally include user-util.h in libarchive-util.h,
- sort library function symbols.
2025-11-09 18:09:31 +09:00
Yu Watanabe 3519b73b70 meson: several cleanups (#39644) 2025-11-09 18:05:22 +09:00
Yu Watanabe 5123d9d38c meson: refuse to build when gcrypt support is enabled bu libgpg-error not found
Follow-up for 066e603ac6.
2025-11-09 09:21:19 +09:00
Yu Watanabe 242088e98b meson: drop redundant HAVE_ZLIB check
ENABLE_IMPORTD requires HAVE_ZLIB, and it is already checked at the very
beginning of the file.
2025-11-09 05:42:21 +09:00
Yu Watanabe dee82ead3c README: align features after 'for' 2025-11-09 04:53:46 +09:00
Yu Watanabe 2202ba286d README: memory_hugetlb_accounting is since kernel v6.7
https://github.com/torvalds/linux/commit/8cba9576df601c384abd334a503c3f6e1e29eefb
2025-11-09 04:52:20 +09:00
Lennart Poettering aae054e1ab nsresource: allow multiple userns from the same process in parallel
When generating a name for a transient userns automatically we so far
just included our PID to make it unique. That doens't really work if
multiple userns shall be kept in parallel by a single process. Let's hence
include a counter as well.
2025-11-08 18:32:37 +01:00
Lennart Poettering 14d9f58823 import: various smaller tweaks and fixes, preparation for OCI download support in importd (#39620) 2025-11-08 18:31:11 +01:00
Lennart Poettering 729e1f24c5 pull-job: port .payload field to struct iovec
struct iovec is really how we should encode any form of arbitrary blob
data
2025-11-08 09:28:50 +01:00
Lennart Poettering 33f49312f8 pull-job: use http_status_etag_exists() at a second place 2025-11-08 09:28:50 +01:00
Lennart Poettering f56531c25c pull: there's no need to keep the downloaded image in memory, except for the sha256sums/gpg file
This seems to be a mistake, in place since the first commit: we only
want the downloaded data in memory if this is a sha256sums or gpg file,
which we need to prorcess ourselves.
2025-11-08 09:28:50 +01:00
Lennart Poettering 7aa847933f pull: use ASSERT_PTR() to shorten code a tiny bit 2025-11-08 09:28:50 +01:00