Commit Graph

85211 Commits

Author SHA1 Message Date
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
Daan De Meyer
2253b4c35d dissect: Stop refusing external verity settings for mountfsd
These are supported now so no point in refusing them in systemd-dissect
2025-12-03 22:13:48 +00:00
Antonio Alvarez Feijoo
a308e97ad2 run-generator: use generator_add_symlink() 2025-12-03 15:52:55 +01:00
Antonio Alvarez Feijoo
6b892f85e2 man/inhibit: mention handle-reboot-key operation 2025-12-03 17:55:50 +09:00
Antonio Álvarez Feijoo
4ae16cf9b7 kernel-install: exit with option --json=help (#39974)
In that case, `parse_json_argument()` returns 0.

Follow-up for bdd36c003d (v255).
2025-12-03 01:56:01 +09:00
Luca Boccassi
ce3acf9acb cryptsetup: downgrade dlopen not compiled message to debug
Every other log in this function is debug level, so downgrade this too.
Otherwise compiling without libcryptsetup means sd-executor logs at
error level when starting any service, regardless of whether it is
needed or not.

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

Follow-up for efaf5a763d
2025-12-02 16:52:24 +00:00
Yu Watanabe
929ce35f8d meson: rework include_directories() and finding of tools (#39956)
This is a cleanup in preparation for later additions.
2025-12-02 20:07:37 +09:00
Lennart Poettering
722dc73699 machined: in --user mode, restrict register access to our own UID, and that's it
This is a follow-up for 119d332d9c and
ensures the check only is applied to the system instance of machined. It
doesn't really apply to the per-user instance, because we never want to
permit differently privileged clients access anyway.

(The process_is_owned_by_uid() call might fail if invoked unpriv, hence
there's value in not calling it if machined runs in --user mode, it's
what makes machined actually work)
2025-12-02 13:34:20 +09:00
Lennart Poettering
81e79ee499 exec-invoke: fix type for gid 2025-12-02 13:34:05 +09:00
Luca Boccassi
a3b6ad69ab cgroup-util: fix cg_pid_get_user_unit() to actually query user units
Refactor switched to the wrong implementation for this inline,
breaking querying for user units

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

Follow-up for 015025cba2
2025-12-02 10:50:41 +09:00
Lennart Poettering
8c5917a03b man: remove notes about limitations of unpriv containers that don't apply anymore 2025-12-01 17:14:53 +00:00
Zbigniew Jędrzejewski-Szmek
322f6adbcd meson: add tools/meson.build
Previously, we looked for scripts in the tools/ directory ad hoc,
wherever they were needed. Let's do those checks in one place.
The main meson.build file is shrunk somewhat, which is always nice.
2025-12-01 16:18:11 +01:00
Zbigniew Jędrzejewski-Szmek
963bebd7b0 meson: add source dir to include_directories automatically
Quite often we need to specify include_directories('.'). Normally, meson
does this automatically, but we specify implicit_include_directories : false,
see 30d20907bd for an explanation.
Passing the include_directories argument through the template layers was rather
cumbersome. Let's simplify things by always including the directory of the
first source file. This makes the definitions simpler, at the cost of having an
unnecessary include directory in the list in some cases.

(Tests are excluded from this change, because they happen to not need this, but
also because some tests have source[0] which is a custom target, and we'd need
newer meson to support that.)
2025-12-01 15:35:22 +01:00
Zbigniew Jędrzejewski-Szmek
4c3c60c270 meson: reuse variable in one more place 2025-12-01 14:40:03 +01:00
dependabot[bot]
0413c780ae build(deps): bump softprops/action-gh-release from 2.4.1 to 2.5.0
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](6da8fa9354...a06a81a03e)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 13:25:11 +00:00
dependabot[bot]
05cfef4a92 build(deps): bump super-linter/super-linter from 7.4.0 to 8.3.0
Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 7.4.0 to 8.3.0.
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](12150456a7...502f4fe48a)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-version: 8.3.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 13:24:35 +00:00
Mike Gilbert
1a88817b83 test-kernel-install: respect TMPDIR in expected output 2025-12-01 13:23:42 +00:00
Abílio Costa
2fd63f831f hwdb: add ProtoArc EM01 NL mouse configuration 2025-11-29 13:02:27 +09:00
Fco. Javier F. Serrador
a05969f152 po: Translated using Weblate (Spanish)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Fco. Javier F. Serrador <fserrador@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/es/
Translation: systemd/main
2025-11-29 13:01:44 +09:00
Zbigniew Jędrzejewski-Szmek
21eb636aaa sd-notify: print a debug message when sd_notify() succeds
… and also when it fails, in the few cases where this wasn't done already.
When I was debugging https://github.com/systemd/systemd/issues/39048, it
was quite confusing that we print copious information about D-Bus messages
and all other steps we're undertaking, but nothing about the sd-notify
messages which are much more important. Add some debug messages for the
cases where we didn't print anything. (The case where $NOTIFY_SOCKET is
not set in left unchanged. The variable is often left unset and we don't
need to spam logs in that trivial case.)
2025-11-27 20:03:00 +01:00
Zbigniew Jędrzejewski-Szmek
f943ab6efb systemctl: stop showing last message from previous run
--lines=1 means that we show the last message about the unit, whatever it is:

$ SYSTEMD_LOG_LEVEL=debug systemctl --verbose start demo2
...
Invoking 'journalctl -q --follow --no-pager --lines=1 --synchronize-on-exit=yes --unit=demo2.service' as child.
...
Directory /var/log/journal/7d16833bfa924410851e2a193bcfd4ba added.
Journal effective settings seal=no keyed_hash=yes compress=ZSTD compress_threshold_bytes=8B
...
Reiterating files to get inotify watches established.
Considering root directory '/run/log/journal'.
Considering root directory '/var/log/journal'.
Considering directory '/var/log/journal/7d16833bfa924410851e2a193bcfd4ba'.
Nov 26 17:24:35 rawhide systemd[1]: Finished demo2.service.
...
Executing dbus call org.freedesktop.systemd1.Manager StartUnit(demo2.service, replace)
...
Job for demo2.service finished.
Got result done/Success for job demo2.service.
journal: Sending message: {"method":"io.systemd.Journal.Synchronize","parameters":{"offline":false}}
Nov 27 13:05:30 rawhide systemd[1]: Starting demo2.service...
Nov 27 13:05:30 rawhide systemd[1]: demo2.service: Deactivated successfully.
Nov 27 13:05:30 rawhide systemd[1]: Finished demo2.service.
...

We obviously should only show _new_ messages, hence change to --lines=0.
This works properly after the fix in the previous commit.

Fixes #39048.
2025-11-27 20:03:00 +01:00
Zbigniew Jędrzejewski-Szmek
ef90afd59e journal: send READY=1 also when --lines=0 is given
If --lines=0 is given, we'd skip the setup and not invoke sd_notify,
potentially blocking the caller. Change the condition for the callback
to also include that case. Since then the callback would always be
set, the 'if' statement is not necessary anymore.
2025-11-27 20:02:02 +01:00
João Rodrigues
68ce283c3f Symlink for the /dev/ptp0 in vmware (#39917)
There are rules to create a symlink for the /dev/ptp0 device in KVM and
Hyper-V virtualization infrastructure but not for vmware.
2025-11-27 03:54:03 +09:00
Yu Watanabe
2feb8f58ce Pull in recent changes from Weblate (#39920)
One of the pending commits in Weblate causes conflicts due to an
unfortunate timing with 9e929e4aa7, so
let's pull the changes into the main tree manually (and resolve the
conflicts).
2025-11-27 03:10:29 +09:00
lumingzh
1fd1001657 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (264 of 264 strings)

Translation: systemd/main
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
2025-11-26 17:17:37 +01:00
Jesse Guo
556dc3a0f1 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (264 of 264 strings)

Translation: systemd/main
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
2025-11-26 17:17:19 +01:00
Mike Yuan
b9be45f926 analyze-dlopen-metadata: honor --no-legend and --no-pager 2025-11-26 16:17:08 +01:00