Commit Graph
85268 Commits
Author SHA1 Message Date
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
Luca Boccassi b169c7512c tests: run qemu with cpu_reset,guest_errors debug messages
Attempt to gather more information to debug https://github.com/systemd/systemd/issues/38240
2025-12-08 12:08:40 +00:00
Luca Boccassi e66f6d3b23 tests: log when qemu crashed and the test is re-ran
Follow-up for 0d7f5a9ae6
2025-12-08 12:08:40 +00:00
Daan De Meyer 154c642e7b Update mkosi reference and drop use of deprecated RuntimeScratch=/--runtime-scratch= (#40016) 2025-12-08 10:18:33 +01:00
q66 c39238bdc8 import: include unistd.h for pipe2
This is needed for e.g. pipe2 and unlinkat and a build failure
is reproducible when libarchive support is disabled.
2025-12-08 08:33:56 +09:00
Yu Watanabe f0feff731c mkosi: RuntimeScratch=/--runtime-scratch= are deprecated
See https://github.com/systemd/mkosi/commit/054d0690b08afa6163b53ad2dca0e1374e9069f7
2025-12-07 11:15:34 +09:00
Yu Watanabe feb9e19ae4 mkosi: update mkosi commit reference to 5a476a92deca8ad54869e5d416217aa1bb137b25
* 5a476a92de Use Path.relative_to instead of Path.parts
* 03f41faf9f Update doc for mkosi ssh to mention sd v256 sshd-vsock
* e054976d18 Rewrite note on fw deps of kernel modules in manpage
* a046243a50 Add python3-pefile to fedora tools conf
* 0bab54087e Fix truthy condition
* 01c38544b2 code review
* 563dca41da code review
* 6074d14c0e code review
* 7e842db3b1 Don't discard ordering of include/exclude entries in KernelModules=
* 0047b64785 build(deps): bump github/codeql-action from 4.31.2 to 4.31.6
* f13325bc4b build(deps): bump actions/checkout from 5.0.0 to 6.0.0
* 9ac31d1795 Add zram and nfnetlink to default initrd
* 4bdb47b6da verity: copy signing certificate to /usr/lib/verity.d/
* 8865afde9e Improve manpage output using pandoc lua filter (#4005)
* a425313c58 Pass environment to systemd-sysusers invocation
* 23f09d5de7 Make Ruff check for dangling whitespace
* abeed73d13 qemu: Add missing sandbox
* a05872e523 Ssh=yes maps to Ssh=always, update the manpage
* 79489534ca Warn of mkosi's sshd lacking support in distros' SElinux policy
* 696f99da43 Manpage: Update supported output formats
* 21675c4822 Silence swtpm SHA1 signature deprecation warning
* df53510982 DOC: update Ssh= to note sd-v256+ already generates sshd-vsock
* 50ccef7926 Configure default tools tree with ToolsTree=yes
* 0b701c690d opensuse: do not install openSUSE-release for Leap >= 16.0
* 4bababf421 opensuse: fix mirror URL for Leap >= 16.0
* c43123398c config.py: add config_default_proxy_exclude()
* 07a0a2be67 installer: Only mount configured state subdirs into sandbox
* d5efbf6f8c build(deps): bump github/codeql-action from 3.30.5 to 4.31.2
* 2912ed20d5 PTY forward fixes
* 66dab75259 sandbox: Drop all capabilities that don't make sense in userns
* 8fe5df4400 Respect SYSTEMD_TINT_BACKGROUND and SYSTEMD_ADJUST_TERMINAL_TITLE
* b9d208789d log: Drop konsole hack
* 7fa6eac65c Clarify that mkosi.images is not picked up in mkosi.conf.d
* 08a0f768dd vmspawn: Support BindUser=
* c7c3eaee4e mkosi-vm: Enable universe repository for ubuntu in mkosi-vm
* 688e77f1a8 vmspawn: Use --grow-image
* c47b7fe57b arch: Switch to the newly established fastly mirror
* 7db8f2cda3 Match compressed pacman packages too
* e3b3b93c50 Prevent using Overlay=yes with Format=portable
* 83a25324b3 Make sure apt sources are installed when BaseTrees= is in the mix
* f6fa2fd6a0 test: add unit tests for parents_below() utility function
* 1eafbd8d03 Don't print newlines in stash_terminal_title()
* bbaf92b50e Don't print newline after ansi sequences
* d1b84f5fb3 Look for .sdmagic before we consider a PE binary a UKI/addon
* b4efdbf14e Treat /opt the same as /usr for the sandbox
* 71ffced0f1 Rework PACKAGE_GLOBS to be a PackageManager classmethod
* 29605c2757 Various SPDX and whitespace fixes
2025-12-07 11:15:31 +09:00
Yu Watanabe 80cfe9abf2 test: several fixlets/workarounds for supporting postmarketOS (#39905) 2025-12-07 10:16:58 +09:00
Morgan 97887d09a8 logind: fix initial button state is not fetched when device is registered late (#39978)
If buttons that are not initialized from manager_startup() due to still
being processed by udev, the initial state is not checked. (commit
405be62f05)

This caused a problem which initial "close" state being not recognized
if lid switch of some system getting initialized later.
2025-12-07 09:48:49 +09:00
Luca Boccassi e2fbcee030 test-network: fix invalid captive portal URL with dnsmasq 2.92 (#40011)
dnsmasq 2.92 started converting binary content to ascii so the previous
invalid URL is no longer invalid as it's escaped.

So the test started failing: https://bugs.debian.org/1122015

Use a '|' character instead, which is not a valid URL character but it's
also not escaped by dnsmasq.

Follow-up for 1219391c9f
2025-12-07 09:43:47 +09:00
Yu Watanabe e7e3c23bbb test-execute: support case that the games user in multiple groups
On Alpine/postmarketOS,
```
$ id -nG games
games users
```
2025-12-07 09:10:32 +09:00
Yu Watanabe d5932060ed integration-test: skip several test cases when nss module is not supported 2025-12-07 09:10:29 +09:00
Yu Watanabe f117629f28 test: skip several test cases when built with musl 2025-12-07 09:09:03 +09:00
Yu Watanabe 9fafe89bcc integration-test: skip several test cases on Alpine/postmarketOS 2025-12-07 09:09:03 +09:00
Yu Watanabe 355bcc243c test: support coreutils built with --enable-single-binary=symlinks
Alpine/postmarketOS build coreutils with --enable-single-binary=symlinks.
In that case, all commands provided by coreutils are symlink to
/usr/bin/coreutils, and it calls prctl(PR_SET_NAME, argv[0]), hence the comm
will be the path to the symlink.

This also makes not kill sleep command with SIGKILL in TEST-17-UDEV, that is
totally unnecessary.
2025-12-07 09:09:03 +09:00
Yu Watanabe 8374085f22 test-network: IPv4-mapped-IPv6 addresses may be shown as pure IPv6 address
It seems ip command built with musl always shows IPv6 addresses in the same way.
2025-12-07 09:09:03 +09:00
Yu Watanabe 193626bd8b test-network: also stop nftables.service
It is a firewall service used in postmarketOS.
When it is active, then e.g. DHCP packets are filtered, and many
tests will be failed.
2025-12-07 09:09:03 +09:00
Yu Watanabe 43588dd63d TEST-75-RESOLVED: move test cases for NFTSet= to TEST-07-PID1
The test cases are not related to systemd-resolved.

While moving the test cases, now userdbctl is used for obtaining UID/GID
for the dynamic user, as musl does not support nss module, hence getent
does not provide information about the dynamic user.
2025-12-07 09:09:03 +09:00