Commit Graph
85237 Commits
Author SHA1 Message Date
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
Yu Watanabe f5f96d44fd TEST-46-HOMED: split into small testcases
This also replace long IDENTITY= line with pretty json string.
2025-12-07 09:09:03 +09:00
Yu Watanabe ae2ccf9d6e TEST-35-LOGIN: fix bus path when the session does not have corresponding audit session
If there is no corresponding audit session, then the session ID is
prefixed with 'c', and in that case the session ID should be used as is
in bus path.
2025-12-07 09:09:03 +09:00
Yu Watanabe 4722619c4b TEST-35-LOGIN: show remaining sessions in cleanup_session()
Otherwise it is hard to see which session is still active.
2025-12-07 09:09:03 +09:00
Yu Watanabe 45014d97dd TEST-13-NSPAWN: the host kernel may not support /proc/kcore 2025-12-07 09:09:03 +09:00
Yu Watanabe 3672e24e75 test-seccomp: do not fail when already MemoryDenyWriteExecute= is enabled 2025-12-07 09:09:03 +09:00
Yu Watanabe b49a4696c4 test: always use bash
If sh is not bash, some builtin command behave slightly differently.
E.g. if sh is provided by busybox, its builtin test command does not check if
the path is a mount point or not, and 'test -w' only checks the access mode of
the inode. So, even if a readonly filesystem is mounted on a directory,
the test command may succeed.

To avoid such confusion, let's unconditionally use bash.
2025-12-07 09:09:03 +09:00
Yu Watanabe a5d0e0ebb2 ci: pass --no-stdsplit to meson test
Hopefully, we will get more informative logs on failure.
2025-12-07 09:09:03 +09:00
Yu Watanabe 450f4ed58a Add 82-net-auto-link-local.{hwdb,rules} to build system and add BMC USB-to-USB links to hwdb (#40006)
Using systems with ADLINK COM-HPC-ALT, ASRock Rack ALTRAD8UD-1L2T and
AMPONED8-2T/BCM boards, there's an issue due to the internal network
connection between the BMC and host, which runs over USB (i.e. Linux
running on the BMC configures a USB gadget ethernet device, with a link
local address).

With the default configuration on Ubuntu (I'm using 25.10),
NetworkManager repeatedly tries to get an address for the interface
using DHCP, resulting in an "Activation of network connection failed"
notification every minute or two.

Add 82-net-auto-link-local.hwdb and 82-net-auto-link-local.rules to the
build system and update 82-net-auto-link-local.hwdb to add the USB
device vendor/product pairs I've seen on the various systems I have with
Ampere Altra and AmpereOne CPUs.
2025-12-06 09:24:55 +09:00
Rebecca Cran 06c794e316 hwdb: Add BMC USB-to-USB link devices to 82-net-auto-link-local.hwdb
Add BMC USB-to-USB Ethernet gadget devices found on ASRock Rack and
ADLINK boards containing Ampere Altra and AmpereOne CPUs to
82-net-auto-link-local.hwdb. Update 20-usb-vendor-model.hwdb with
devices which were missing.
2025-12-05 16:03:22 -07:00
Rebecca Cran b159befeae hwdb,rules: add 82-net-auto-link-local.{hwdb,rules} to build
Update hwdb.d/meson.build and rules.d/meson.build to add the
82-net-auto-link-local.{hwdb,rules} files into the build. Commit
ec541c569b in 2023 added the files
but didn't add them to the build system.
2025-12-05 16:03:22 -07:00
David Tardon d23a7eb4c0 udev-rules: use the right variable
We carefully prepare a copy of a local buffer to save in device cache
and then save the buffer there instead... This leads to abort in free()
on exit (also, copied is leaked).

Reproducer:
 # udevadm test /sys/block/sr0

Follow-up-for: a9559ebcbc

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2406118
2025-12-06 02:29:24 +09:00
Luca Boccassi fdb9ad1a44 pid1: do not fail if dlopen of libmount fails because it is not compiled in
It is now possible to build and run without libmount. But if support
is compiled in, then we need to be able to load it. Hence gracefully
skip it when support is not compiled in, but fail otherwise.
2025-12-06 01:36:43 +09:00
Luca Boccassi 64ba571576 Reapply "pid1: pull in libmount unconditionally"
It was actually intended to load libmount very early, as it is
needed by more than just mount units, such as umount_recursive(),
bind_remount_recursive(), get_sub_mounts(), etc.

Fixes https://github.com/systemd/systemd/issues/39994

This reverts commit 46b4b33c25.
2025-12-06 01:36:43 +09:00
Daniel Rusek 405a58752e po: Translated using Weblate (Czech)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Daniel Rusek <mail@asciiwolf.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/cs/
Translation: systemd/main
2025-12-05 16:03:15 +00:00
Luca Boccassi 67317e214e Translations update from Fedora Weblate (#39998)
Translations update from [Fedora
Weblate](https://translate.fedoraproject.org) for
[systemd/main](https://translate.fedoraproject.org/projects/systemd/main/).



Current translation status:

![Weblate translation
status](https://translate.fedoraproject.org/widget/systemd/main/horizontal-auto.svg)
2025-12-05 14:24:23 +00:00
Daniel Rusek bfaf63b509 po: Translated using Weblate (Czech)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Daniel Rusek <mail@asciiwolf.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/cs/
Translation: systemd/main
2025-12-05 13:08:36 +00:00
Pavel Borecki 4b9cb0c391 po: Translated using Weblate (Czech)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Pavel Borecki <pavel.borecki@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/cs/
Translation: systemd/main
2025-12-05 13:08:35 +00:00
Zbigniew Jędrzejewski-Szmek 12391431c2 machined: add description to varlink server, unify error messages
manager_varlink_init_resolve_hook and manager_varlink_init_userdb are very
similar, but one didn't set a description and the other one had an error
message which didn't print the offending path.

Define constants for the paths, and also change other similar constants
to have slightly shorter names. (It's an "address" and "path", but we don't
need to have both parts in the name, esp. that it makes the name very long.)
2025-12-05 12:17:06 +01:00
Zbigniew Jędrzejewski-Szmek 9454927c76 sd-netlink: read error message for NFNL_MSG_BATCH_BEGIN (#39967)
Before:
```
$ unshare --user --map-users=0:$(id -u):1 --map-groups=0:$(id -g):1 build/test-firewall-util
/* test_v6 */
src/test/test-firewall-util.c:34: Assertion failed: "r = fw_nftables_add_masquerade(nfnl, true, AF_INET6, &u1, 128)" failed with unexpected error: -110/ETIMEDOUT
Aborted (core dumped)
```

After:
```
$ unshare --user --map-users=0:$(id -u):1 --map-groups=0:$(id -g):1 /var/build/test-firewall-util
/* test_v6 */
test-firewall-util: Failed to add IPv6 masquerade, skipping tests: Operation not permitted
/* test_v4 */
test-firewall-util: Failed to add IPv4 masquerade, skipping tests: Operation not permitted
```
2025-12-05 12:12:03 +01:00
Colin Walters 3c85d99c79 man: Clarify secure-boot-enroll defaults
Clarify in the docs that `if-safe` is the default by noting
that in the text for it, but also moving it to the first mentioned
option.

Make explicit in `man systemd-boot` that the `secure-boot-enroll`
option is specified in the `loader.conf`

Update an outdated comment in boot.c around the same.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-12-05 11:57:18 +01:00
Luca Boccassi eb98ddd8b8 sysupdate: also mention patterns to match in error log on failure
The gpt uuid is not the only thing that needs to match, the pattern
does as well, so mention it in the error log if present
2025-12-05 10:09:38 +00:00
Zbigniew Jędrzejewski-Szmek d9e894ef72 Fix systemctl start --verbose off-by-one logs (#39927) 2025-12-05 11:09:14 +01:00
Yu Watanabe 53f5aa3fd2 musl: introduce wrappers for getopt() and getopt_long()
musl's getopt_long() behaves something different in handling optional arguments:
```
$ journalctl _PID=1 _COMM=systemd --since 19:19:01 -n all --follow
Failed to add match 'all': Invalid argument
```
This introduces getopt_long_fix() that reorders the passed arguments to make
getopt_long() provided by musl works as what we expect.

Also, musl's getopt() always behaves POSIXLY_CORRECT mode, and stops parsing
arguments when a non-option string found. Let's always use getopt_long().
2025-12-05 11:01:09 +01:00
Yu Watanabe 26b2085d54 include: update kernel headers from v6.18 2025-12-04 11:10:03 +00:00
Yu Watanabe 84990e08e5 test-firewall-util: allow to run test-firewall-util
Now fw_nftables_add_masquerade() should return EOPNOTSUPP or so if
unprivileged. It is not necessary to skip whole tests earlier.
2025-12-04 08:24:28 +09:00
Yu Watanabe 691d63dbdd sd-netlink: also read the reply for NFNL_MSG_BATCH_BEGIN message
When we send a batch of nfnl messages, but e.g. without sufficient
privilege, the kernel may only return an error message for
NFNL_MSG_BATCH_BEGIN and ignore all later messages.
So, we need to read the response for the NFNL_MSG_BATCH_BEGIN,
and if it is an error ignore the replies for the rest.
2025-12-04 08:24:28 +09:00
Yu Watanabe ea97ca9a06 sd-netlink: drop unused ret_messages argument
This is not only unused, the kernel never provide any meaningful reply
for batch message. Let's drop it.
2025-12-04 08:24:28 +09:00
Yu Watanabe 991703009e sd-netlink: introduce sd_netlink_ignore_serial()
When we send a message with NLM_F_ACK, but if later we are not
interested in the reply and do not want to call sd_netlink_read(),
the reply will be stored in the rqueue forever.

Let's introduce a way to ignore received message without waiting reply.
2025-12-04 08:24:28 +09:00
Yu Watanabe 32682ba02d sd-netlink: introduce netlink_now() and move timespan_to_timestamp()
When sd-event is attached to the sd-netlink object, use the timestamp of
the current event, otherwise call now().

This mostly change nothing. Preparation for later change.
2025-12-04 08:24:28 +09:00
Yu Watanabe 69646ac0e2 include: fix typo
Follow-up for ec32732043.
2025-12-04 07:50:26 +09:00
Alexandru Tocar 1d9a8e439c man: drop --import-credential mention from systemd-nspawn(1) 2025-12-04 07:47:23 +09:00