Commit Graph
81033 Commits
Author SHA1 Message Date
Mike Yuan 0964b022fa socket-activate: remove effectively unused 'name' param for exec_process() 2025-04-27 20:21:10 +02:00
Mike Yuan 7e672795be socket-activate: drop arg_args
To follow our usual coding style.
2025-04-27 20:21:10 +02:00
Mike Yuan bce295ef00 journald-server: use generic NOTIFY_READY message 2025-04-27 20:21:09 +02:00
Yu Watanabe 531cf425e8 man/busctl: many other commands can take --json=/-j
Also, in a futre remaining commands may also support the option.
Let's not mention which command support the options.

Closes #37210.
2025-04-27 10:41:34 +09:00
Yu Watanabe 4db8663b81 tree-wide: fix typo 2025-04-27 10:36:12 +09:00
Jesper Nilsson d93292bc59 man/sd_bus_slot_set_floating: Improve wording around b parameter 2025-04-27 09:18:05 +09:00
Mike Yuan 406f5ea700 Several Coverity fixes (#37253) 2025-04-26 16:58:54 +02:00
Yu Watanabe b09f351bd7 networkd: reduce the default IPv4 DAD (ACD) timeout and make it configurable (#37138)
RFC 5227 specifies randomized intervals to avoid that a large number of
hosts powered up at the same time send their message simultaneously.
Performing the conflict detection takes a variable time between 4 and 7
seconds from the beginning to the first announcement, as shown by the
following diagram where P indicates a probe and A an announcement:

```
     time(s)     0   1   2   3   4   5   6   7   8   9
                 +---+---+---+---+---+---+---+---+---+
     SHORTEST    P   P   P       A       A
     LONGEST         P       P       P       A       A
```

The host can't use the address until the first announcement is sent. 7
seconds is a very long time on modern computers especially considering
the fact that the round-trip time on current LAN technologies is at most
few milliseconds. Section 2.2 of the RFC addresses this matter and hints
that a future standard will adjust those timeouts; however that standard
doesn't exist yet.

Make the timeout configurable via a new
"IPv4DuplicateAddressDetectionTimeoutSec=" option. The intervals defined
in the RFC are then scaled proportionally so that the duration of the
conflict detection takes at most the given value. Interval happening
after the first announcement are not scaled, as recommended by the RFC.

Also reduce the default value from 7s to 200ms, which is a more suitable
value for today's technology.
2025-04-26 16:19:33 +09:00
Beniamino Galvani 2451cd2512 networkd: reduce the IPv4 DAD timeout to 200ms
The original timeout of 7 seconds is very long for today's networks. Reduce it
to 200ms. Note that this change also affects IPv4 link-local addressing.
2025-04-26 14:44:52 +09:00
Beniamino Galvani c2691d8e7c networkd: make the ACD timeout configurable
RFC 5227 specifies randomized intervals to avoid that a large number of hosts
powered up at the same time send their message simultaneously. Performing the
conflict detection takes a variable time between 4 and 7 seconds from the
beginning to the first announcement, as shown by the following diagram where P
indicates a probe and A an announcement:

 time(s)     0   1   2   3   4   5   6   7   8   9
             +---+---+---+---+---+---+---+---+---+
 SHORTEST    P   P   P       A       A
 LONGEST         P       P       P       A       A

The host can't use the address until the first announcement is sent. 7 seconds
is a very long time on modern computers especially considering the fact that
the round-trip time on current LAN technologies is at most few milliseconds.
Section 2.2 of the RFC addresses this matter and hints that a future standard
will adjust those timeouts; however that standard doesn't exist yet.

Make the timeout configurable via a new IPv4DuplicateAddressDetectionTimeoutSec=
option. The intervals defined in the RFC are then scaled proportionally so that
the duration of the conflict detection takes at most the given value. Interval
happening after the first announcement are not scaled, as recommended by the
RFC.
2025-04-26 14:44:31 +09:00
Yu Watanabe 9d902ed4cc journal-file: fix meaning less assertion
Closes CID#1609495.
2025-04-26 09:37:18 +09:00
Yu Watanabe f96867edde format-table: add _TABLE_ERSATZ_INVALID to follow our usual coding style
Closes CID#1609497.
2025-04-26 09:32:23 +09:00
Yu Watanabe d6891af577 core/device: fix meaningless assertion
Closes CID#1609498.
2025-04-26 09:29:43 +09:00
joo es 52990feb2b po: Translated using Weblate (Arabic)
Currently translated at 28.0% (72 of 257 strings)

Co-authored-by: joo es <johndevand@tutanota.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ar/
Translation: systemd/main
2025-04-25 22:29:51 +09:00
Luca Boccassi 30c3e937e3 Update example to F42 and fix invocation with dnf5 (#37250) 2025-04-25 13:35:05 +01:00
Zbigniew Jędrzejewski-Szmek f6d524a0e6 man: update fedora release to F42
F42 was released a few weeks ago.
2025-04-25 14:00:59 +02:00
Zbigniew Jędrzejewski-Szmek 392a9bd0cf man/systemd-nspawn: call dnf with --use-host-config
This is needed for dnf5. But dnf-4 doesn't know about it. So also add a hint to
skip the option with dnf-4. We can drop this later when dnf5 is the default
everywhere.

Also, s/vim-minimal/nano/. Nano is the default editor in Fedora since
https://fedoraproject.org/wiki/Changes/UseNanoByDefault.
2025-04-25 14:00:59 +02:00
joo es cf0f741241 po: Added translation using Weblate (Arabic)
Co-authored-by: joo es <johndevand@tutanota.com>
2025-04-25 11:38:50 +01:00
Daan De Meyer c2ba4a2864 docs: Document manual cgroup controller management for Delegate=yes
This isn't immediately clear, so let's explicitly document this fact.

More context in https://github.com/systemd/systemd/issues/7355.
2025-04-25 00:42:24 +01:00
Werner Sembach d2502f55a2 hwdb/keyboard: Map FN key on TUXEDO InfinityFlex 14 Gen1
Map the FN key of TUXEDO InfinityFlex 14 Gen1 that wrongly produces the F23
scancode by default.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
2025-04-25 07:20:22 +09:00
Daan De Meyer d04f6fe446 selinux: Disable selinux logging in mac_init() as well
We currently only disable selinux logging in mac_selinux_setup(),
but not in mac_init(). We don't want libraries we use to log unless
we tell them to, so disable selinux's logging in mac_init() as well.
2025-04-25 06:17:28 +09:00
Michal Koutný 3a4aa7f5b2 update TODO 2025-04-25 06:14:42 +09:00
Luca Boccassi a3dc2bbf96 test: use /run/ for test configuration, not /etc/
In case of failures we don't want to leave an image with intermediate
test configuration, as images are reused across multiple tests

Follow-up for edca63a632
2025-04-25 06:13:43 +09:00
Daan De Meyer 45f63c3db7 test: Add custom signal handlers to integration test wrapper script
meson will send SIGTERM if the test gets stuck and hits the timeout,
in which case we still want to do log saving and analysis, so let's
add some signal handlers which allow us to do that.

This won't be very useful until https://github.com/mesonbuild/meson/pull/14513
lands, since we only get half a second from meson to handle SIGTERM
before it sends SIGKILL, but let's land this already so we immediately
start taking advantage of the meson fix once it lands.
2025-04-25 06:11:43 +09:00
Yu Watanabe 497b7a30a9 Several cleanups for reading IP address from DBus message (#37230) 2025-04-25 06:07:18 +09:00
Yu Watanabe 90e799de1f sd-json: fix conditions
Fixes a bug in 6647bbeab1 (v257).

Fixes CID#1609496.
2025-04-25 06:06:38 +09:00
Daan De Meyer dcedcb443c Various clang-tidy improvements (#37237) 2025-04-24 14:40:39 +02:00
Daan De Meyer d06abcf68e meson: Implement duplicate includes check with clang-tidy
Instead of doing this with our own script, let's use clang-tidy
instead.
2025-04-24 12:36:38 +02:00
Daan De Meyer 5008a92469 network: Remove duplicate include 2025-04-24 12:36:38 +02:00
Daan De Meyer 44e86153d1 meson: Define our own clang-tidy target
meson's target has a few issues:
- Runs on all source files regardless if they're included in the
  build or not
- Doesn't have any dependencies on generated sources which means we
  have to do a full build first before we can run clang-tidy
- Doesn't allow us to pass any extra arguments

To work around these, let's define our own clang-tidy target instead
using llvm's run-clang-tidy script. Alongside the clang-tidy target,
let's start keeping track of all generated sources which we make the
clang-tidy target depend on. We also add a new target which will only
generate source files which is useful for setting up the source tree
for running code analysis against it.
2025-04-24 12:36:36 +02:00
Yu Watanabe 10594762c7 Remove unused code and fix one bug (#37225) 2025-04-24 12:28:48 +09:00
Daan De Meyer bcf716ca01 tree-wide: Remove dead code
This code seems to not be used anywhere at all, so let's drop it.

Follow up for ba8d00e859
Follow up for 85686b37b0
Follow up for aff853f8ea
Follow up for 36dad381a2
2025-04-24 10:15:19 +09:00
Daan De Meyer 8621c646b8 core: Use parse_syscall_archs() in bus_exec_context_set_transient_property() 2025-04-24 10:15:19 +09:00
Daan De Meyer 058d680625 network: Fix wrong config parser for Bridge.MulticastIGMPVersion
Follow up for afa51e2dfb
2025-04-24 10:14:57 +09:00
Yu Watanabe 264749453c core/dbus-cgroup: use bus_message_read_in_addr_auto() at one more place 2025-04-24 10:11:07 +09:00
Daan De Meyer 176b887da4 bus-message-util: use bus_message_read_family() at one more place 2025-04-24 10:11:07 +09:00
Yu Watanabe 06a5d24d78 resolvectl: skip reading remaining elements when an invalid address is specified
Previous code assumed that both family and address are read when
-EINVAL, hence the following read of port and name could succeed.

Let's drop the assumption, and skip reading remaining elements.

No functional change, just refactoring and preparation for later change.
2025-04-24 10:11:07 +09:00
Yu Watanabe 90293a9583 resolvectl: make three booleans for read_dns_server_one() into one enum 2025-04-24 10:11:07 +09:00
Nick Labich 5d49aec4c1 repart: Allow devices as sources for --copy-from
Implements #37208
2025-04-24 09:33:51 +09:00
Yu Watanabe a31777df99 udev: support soft-reboot (#37222) 2025-04-24 09:31:56 +09:00
Daan De Meyer bde994efcc mkosi: Run clangd within the tools tree instead of the build container
Running within the build sandbox has a number of disadvantages:
- We have a separate clangd cache for each distribution/release combo
- It requires to build the full image before clangd can be used
- It breaks every time the image becomes out of date and requires a
  rebuild
- We can't look at system headers as we don't have the knowledge to map
  them from inside the build sandbox to the corresponding path on the host

Instead, let's have mkosi.clangd run clangd within the tools tree. We
already require building systemd for both the host and the target anyway,
and all the dependencies to build systemd are installed in the tools tree
already for that, as well as clangd since it's installed together with the
other clang tooling we install in the tools tree. Unlike the previous approach,
this approach only requires the mkosi tools tree to be built upfront, which has
a much higher chance of not invalidating its cache. We can also trivially map
system header lookups from within the sandbox to the path within mkosi.tools
on the host so that starts working as well.
2025-04-23 21:04:07 +02:00
Daan De Meyer cfe8f3ec74 Add clang-tidy check in CI (#37226)
This will make sure we keep our headers standalone and don't introduce
any new cyclic header dependencies
2025-04-23 16:43:17 +02:00
Daan De Meyer 9b5895be12 ci: Add basic clang-tidy check to linter workflow
Let's add a basic clang-tidy check to the linter workflow. This
gives us the following:
- A check so that we don't introduce any new cyclic header dependencies
- A check to make sure all of our header files are standalone, as clang-tidy
  will fail to parse header files that don't include all their dependencies.
2025-04-23 16:13:58 +02:00
Daan De Meyer 50810ff7b8 Various logging improvements and cleanups (#37040) 2025-04-23 15:31:44 +02:00
Daan De Meyer 9e3d048bd0 ci: Use mkosi in linter workflow
Let's reuse the mkosi tools tree to get all the tools we need instead
of pulling them from pypi.
2025-04-23 15:27:49 +02:00
Daan De Meyer 98a8117eb9 Add .clangd configuration file that disables the unused include check
The clangd include checker is rather broken and is littered with false
positives in our codebase, so let's disable the feature until it improves
a bit.
2025-04-23 15:27:49 +02:00
Daan De Meyer 44d50ba88e execute: Get rid of custom logging macros
We already have LOG_CONTEXT_PUSH_EXEC() which with two additions
does exactly the same as the custom logging macros, so let's get rid
of the custom logging macros and use LOG_CONTEXT_PUSH_EXEC() instead.
2025-04-23 14:48:45 +02:00
Daan De Meyer a94d0e3177 timedate: Drop custom logging macros in favor of log context
Additionally, using the log context makes sure the extra fields are
applied to all log messages generated while the context is in place,
rather than only log messages logged with log_unit_xxx() in timedated
itself.

It also means the unit name is prefixed to all log messages logged
within that context. While it's not clear whether we always want the
unit name to be attached to library log messages, we also don't want
the unit name to not be attached to any library log messages, so we opt
to add more rather than less information by adding the unit name everywhere
for now.

In the future we can look into some log.h helpers to enable/disable
adding the prefix to the following log messages or not.
2025-04-23 14:46:46 +02:00
Daan De Meyer ba77798bba unit: Make sure individual unit maximum log level always takes priority
Currently LogLevelMax= can only be used to decrease the maximum log level
for a unit but not to increase it. Let's make sure the latter works as
well, so LogLevelMax=debug can be used to enable debug logging for specific
units without enabling debug logging globally.
2025-04-23 14:46:12 +02:00
Daan De Meyer 6d47c16ce0 log: Make sure LOG_CONTEXT_SET_LOG_LEVEL() can be nested 2025-04-23 14:46:12 +02:00