Commit Graph
85285 Commits
Author SHA1 Message Date
Daan De Meyer 5eb0639faa namespace: Clone root dir descriptor before use
Before doing anything with the root directory file descriptor, let's
make sure we clone it first so that the caller can't mess with mount fd
attributes via mount_setattr() anymore.

We clone during parsing instead of in executor so that the caller can't
mess with the mount fd between invocations.
2025-12-14 11:32:06 +01:00
Daan De Meyer 273c6bc045 mount-util: Add mount_fd_clone() helper
The kernel prevents you from open_tree()'ing an open_tree() fd unless it
was created from the caller's mount namespace. For various use cases, we
want to be able to open_tree() arbitrary mount file descriptors. Turns
out there's a way go get around it by mounting the mount file descriptor
in a throw-away mount namespace and then open_tree()'ing the mount file
descriptor. Let's implement this as a new helper mount_fd_clone() and
add a test for it.

Because move_mount()'ing the original fd makes it pretty useless as it
can't be move_mount()'ed again, we optionally make a second clone which
can replace the original fd so it can be cloned again later.
2025-12-14 11:31:59 +01:00
Daan De Meyer 0859fe3f32 discover-image: Rework image_make()
Currently, image_new() will calculate the image
path as the combination of dir_path and filename,
which is completely broken if filename is absolute
and dir_path is set.

Let's fix this by thoroughly cleaning up the
image_make() interface. Instead of having four
different arguments to pass in the image path,
let's reduce that to two, a file descriptor and a
path. If no file descriptor is provided, we create
own ourselves by opening the given path.

The callsites are updated to pass in an existing file
descriptor when available. Path calculation is moved
to callers instead of image_make().
2025-12-12 12:25:57 +01:00
Daan De Meyer 9848f56cc6 tree-wide: Use meson test -q
meson test output is extremely verbose, printing
a separate line for each successful test. Let's
add -q/--quiet everywhere so it only prints full
lines for skipped and failed tests.
2025-12-12 11:45:58 +01:00
0x06 85e6b98380 hwdb: Add ACCEL_MOUNT_MATRIX for variant of TERRA PAD 1061
Tested with monitor-sensor
2025-12-12 11:22:21 +01:00
Fletcher Woodruff 65eebee9bf resolve: use strcmp when comparing DnsServer names
This fixes an issue where duplicate DNS Servers are added to
to resolv.conf files even when all fields are the same.
2025-12-12 10:12:21 +01:00
Luca Boccassi 7c0afcdde2 core: gracefully skip unknown policy designators in RootImagePolicy et al (#40060)
Usually we gracefully ignore unknown configuration parameters, so that
service files can be written by upstreams and used across a variegated
range of distributions with various versions of systemd, to avoid
forcing users to the minimum common denominator and only adding settings
that are supported by the oldest distro supported.

Image policies do not behave like this, and any unknown partition or
policy designator causes the whole unit to fail to parse and a hard
error.

Change it so that parsing RootImagePolicy and friends via unit file or
D-Bus logs but otherwise ignores unknown specifiers, like other options
do.

This allows us to add new specifiers in the future, and users to adopt
them immediately.

Follow-up for d452335aa4
2025-12-11 14:38:26 +09:00
Yu Watanabe 72711b76e0 TEST-85-NETWORK: enable NetworkdSysctlTest
Note, each test case must be prefixed with 'test_'.

This also adds one more log check for issue #40051.

Follow-up for c78bcda461.
2025-12-11 14:37:04 +09:00
Luca Boccassi 427dcb2eeb meson: bump version to v259~rc3 2025-12-10 17:35:06 +00:00
Zbigniew Jędrzejewski-Szmek 0c8c70e2b3 Chores for RC3 (#40058) 2025-12-10 18:33:05 +01:00
Luca Boccassi b8db6aba26 NEWS: update date 2025-12-10 17:11:24 +00:00
Luca Boccassi 1b54709fd5 NEWS: update contributors list 2025-12-10 17:11:05 +00:00
Luca Boccassi edfbd7654f hwdb: update autosuspend rules
ninja -C build update-hwdb-autosuspend
2025-12-10 17:08:57 +00:00
Luca Boccassi 0b90007530 Update hwdb
ninja -C build update-hwdb
2025-12-10 17:07:41 +00:00
Antonio Alvarez Feijoo 2ed0cc458f vmspawn: fix typo in log specifier
Follow-up for 179dcf924f
2025-12-11 01:12:27 +09:00
Temuri Doghonadze c88ad7e5c6 po: Translated using Weblate (Georgian)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ka/
Translation: systemd/main
2025-12-11 00:03:26 +09:00
Daan De MeyerandYu Watanabe ee6b3d1aa2 test: Stop using grep -q in integration test
When a TTY is attached to the test unit, grep -q will generate SIGPIPE
for the previous command in the pipeline which in combo with `pipefail`
will cause the command to fail with exit status 141 which will fail the
test.

Replace with >/dev/null to avoid this from happening.

See also https://www.gnu.org/software/grep/manual/html_node/Usage.html
> There is a related problem with Bash’s set -e -o pipefail. Since grep
> does not always read all its input, a command outputting to a pipe read
> by grep can fail when grep exits before reading all its input, and the
> command’s failure can cause Bash to exit.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
2025-12-10 12:09:10 +01:00
Yu Watanabe d065fdd337 bus-wait-for-jobs: fix failed job logging (#40043)
Follow-ups for 0d91a204cb.
Fixes #40030.
2025-12-10 19:00:39 +09:00
David Tardon 085c2a2338 manager-serialize: add logging for ENOMEM 2025-12-10 18:59:44 +09:00
David Tardon 94446e4f5a tree-wide: flatten nested error checks 2025-12-10 18:59:44 +09:00
Zbigniew Jędrzejewski-Szmek 13a74f350e tar-util: allow to build without acl support (#39965)
This adds minimal definitions provided by libacl to make tar-util built
without libacl support.
Fixes the following compile error:
```
../src/shared/tar-util.c:62:9: error: unknown type name 'acl_t'
   62 |         acl_t acl_access, acl_default;
      |         ^~~~~
```

Follow-up for 4ded7f7a43.
Fixes #39928.
Replaces #39954.
2025-12-10 09:42:50 +01:00
Yu Watanabe fc7aca10c9 bus-wait-for-jobs: assign unique error code from service result 2025-12-10 17:22:35 +09:00
David Santamaría Rogado a07b184e8c hwdb: sensor: Remove Lenovo IdeaPad D330 accel mount matrix
Reading values from iio-sensor we are getting bad values. This matrix was added because the panel was a vertical one but the normal position is horizontal and the sensor is not bad oriented.

Removing the matrix ensure we have correct orientation values and prevent from misleads where the incorrect values we were getting messed up.

For example mutter actually is setting incorrect screen rotation for devices with panel orientation quirks.

I'm pretty sure that there are more devices where we have incorrectly "corrected" the sensor values when the only problem was the panel orientation.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
2025-12-10 14:23:33 +09:00
Lennart Poettering 4362d942c4 hostname: explain a bit why hostnames should be single DNS labels, not fqdns 2025-12-10 14:17:11 +09:00
Pasquale van Heumen ca1d2ae5d6 resolve: always read /etc/resolv.conf on reload systemd-resolved
When systemd-resolved is used in resolv.conf foreign mode, reloading the
systemd-resolved daemon does not read resolv.conf when not touched since
the last time resolved read the file. Since the DNS servers list is
flushed during a reload, resolved forgets about the servers
in /etc/resolv.conf

When reloading the daemon it is expected that all configuration is
reloaded regardless of the disk timestamps.
2025-12-10 04:56:23 +09:00
Ricardo Salveti a40f4ba1a8 boot: handle empty initrd files (#40040)
Commit f8fa4222c9 added extra logic to
account for the size of the initrds before allocating the required memory pages,
but missed checking if the initrds were empty before allocating memory.

Extend the initrd options only when the initrd is valid, and add extra
check for validating that there is at least one valid initrd file before
allocating memory, fixing the following crash when booting with empty
initrd files:

src/boot/log.c:30@efi_assert: systemd-boot: Assertion
 'BS->AllocatePages(type, memory_type, n_pages, &addr) == EFI_SUCCESS'
failed at /usr/src/debug/systemd-boot/257.8/src/boot/util.h:95@xmalloc_pages, halting.

Fixes: f8fa4222c9
("boot: Make initrd_prepare() semantically equivalent to combine_initrds()")
2025-12-10 04:55:57 +09:00
Yu Watanabe 286527a1c1 bus-wait-for-jobs: do not say "Unexpected job result" when job is simply failed 2025-12-10 04:20:39 +09:00
Yu Watanabe 473f427757 bus-wait-for-jobs: use SYNTHETIC_ERRNO()
Since 0d91a204cb, we always logs
something. Hence, we can use SYNTHETIC_ERRNO().
2025-12-10 04:16:25 +09:00
Yu Watanabe 0fe1de0812 bus-wait-for-jobs: fix quiet argument for log_job_error_with_service_result()
The argument 'quiet' is a boolean, not a integrer and not a log level.

Follow-up for 0d91a204cb.
Fixes #40030.
2025-12-10 04:16:21 +09:00
Martin Srebotnjak ac752f1eff po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2025-12-10 00:59:51 +09:00
Yu Watanabe cbe34b4e73 tar-util: allow to build without libacl support
Fixes #39928.
Follow-up for 4ded7f7a43.
2025-12-10 00:49:27 +09:00
Yu Watanabe f75c49916b tar-util: allocate ACL entry only when necessary
Follow-up for 4ded7f7a43.
2025-12-10 00:49:27 +09:00
Yu Watanabe 4976d6e9ac acl-util: define minimal types and constants even when acl support is disabled 2025-12-10 00:48:37 +09:00
Jeremy Kerr b10b4303c6 udev-builtin-net_id: fix construction of USB specifier-based names
Commit 0bac1ed242 ("tree-wide: Fix constness issues with newer glibc")
split a temporary var in get_usb_specifier to const and non-const
versions, but missed converting a couple of uses. This means we get
names of with components of:

 port: uN
 config: cC.I
 interface: iC.I

instead of:

 port: uN
 config: cC
 interface: iI

This results in net names like enu1c1.0i1.0, as we also no longer hit
the config==1 and interf==0 elision cases.

Change the config portion handling to start from the correct position,
and the earlier check for NULL.
2025-12-10 00:24:01 +09:00
Luca Boccassi af80c9c224 test: use -force with unsquashfs for test reruns
In case a test is reran or a directory reused, overwrite it
instead of failing
2025-12-09 14:41:59 +09:00
Luca Boccassi 2abb433ca1 shell-completion: fix portablectl path completion with preceding params
The completion fails to complete to paths for verbs that need them when
a --param is the previous word, e.g.:

portablectl attach --runtime <tab>

fails to complete to paths
2025-12-09 14:39:07 +09:00
Lukáš Zaoral 1e5498e237 ukify: prefer compression.zstd when available
Python 3.14 introduced support for zstd in the standard library [1].  Therefore,
let's prefer it when available to decrease the number of necessary  external
dependencies.

[1] https://docs.python.org/3/whatsnew/3.14.html#whatsnew314-zstandard
2025-12-09 14:37:22 +09:00
David Tardon 7cfd4f3f51 find-esp: consistently quote paths in log messages 2025-12-09 14:36:31 +09:00
David Tardon 50482aced5 find-esp: replace assert by a runtime check
The path--as a whole--is no longer being opened with O_DIRECTORY, hence
the assertion is not valid.

Reproducer:
 # SYSTEMD_RELAX_ESP_CHECKS=1 bootctl list --esp-path=`pwd`/README
 Assertion 'S_ISDIR(sxa.stx_mode)' failed at src/shared/find-esp.c:295, function verify_fsroot_dir(). Aborting.

Follow-up-for: 63105f33ed

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2417917
2025-12-09 14:36:31 +09:00
Yu Watanabe a28ed65f4c meson: a variety of build portability fixes (#40012)
This is for packaging systemd in Chimera Linux, which uses BSD-style
userland tools, alongside musl.
2025-12-09 14:35:22 +09:00
Luca Boccassi 28c68dbea0 portabled: list new methods in D-Bus policy
Access to these methods is also managed via polkit,
but they were never added to the access list in the
D-Bus policy.

Follow-up for 907952bbc9
2025-12-09 12:00:59 +09:00
q66 3d64cb9a54 vcs-tag.sh: use portable sed argument order 2025-12-08 21:35:28 +01:00
q66 abf73cb072 meson: try BSD-style date(1) for alt_time_epoch as a fallback
If we fail to calculate alt_time_epoch using the GNU-style syntax,
try if BSD-style syntax does not work. Fail for real if that does
not work either.
2025-12-08 21:35:28 +01:00
q66 57f911973a meson: try BSD-style stat(1) syntax when failing mtime check
The system may be using a stat(1) implementation that follows
BSD-style syntax. Try that as a fallback, but do fail for real
if that also fails.
2025-12-08 21:35:28 +01:00
q66 f40bd7af20 meson: drop ln --relative check
The coreutils release that included this was in 2012. Since then,
systemd requires a newer meson, mostly uses install_symlink, and
so on. Additionally, where it does use this feature, it uses the
'-r' short flag. There are implementations of 'ln' that do have
support for '-r' but no longopts. Things will still work on those
but this check will fail.
2025-12-08 21:35:28 +01:00
Luca Boccassi 9b42cc3b12 tests: also add qemu shutdown trace debug logs to integration script
Again to chase https://github.com/systemd/systemd/issues/38240
as suggested on QEMU's matrix channel
2025-12-08 21:29:36 +01:00
Stephanie Wilde-Hobbs 6c9b778076 hwdb: add Magic Trackpad v2 USB-C (2024) to quirks (#40032)
Without being marked as an external trackpad the palm rejection triggers
too easily. Tested with a local hwdb rule.
2025-12-09 03:38:17 +09:00
Luca Boccassi afcc0ca509 test-network: drop unused variable
Follow-up for e2fbcee030
2025-12-09 03:30:57 +09:00
Luca Boccassi d36ddefb51 tests: some more logs to try and get info about VM spurious reboots (#40028)
https://github.com/systemd/systemd/issues/38240 keep happening, trying
to get more info
2025-12-08 14:38:42 +00:00
Daan De Meyer 1075316a4b machine: Fix hardcoded /var/lib/machines paths 2025-12-08 14:56:39 +01:00