Commit Graph
80303 Commits
Author SHA1 Message Date
Daan De Meyer 8a87f70e3b mkosi: Add back .mkosi-private/ to .gitignore
Required to exclude the history data;
2025-03-26 14:40:14 +01:00
Luca Boccassi 1a5f9b2caf tools/check-version-history: avoid DeprecationWarning with newer lxml (#36860)
We get the same warning thousands of times:
/work/src/tools/check-version-history.py:28: FutureWarning: This search
incorrectly ignores the root element, and will be fixed in a future
version. If you rely on the current behaviour, change it to

"./refsynopsisdiv/funcsynopsis/funcprototype/funcdef/function[.='udev_device_get_properties_list_entry']"

We also need to update the ignorelist to the new form.
2025-03-25 19:34:44 +00:00
Zbigniew Jędrzejewski-Szmek 011cb5c1d7 gitignore: add .mkosi-private/ to the list again
It was dropped in 9f9da8a1c6 and is
messing up CI now.
2025-03-25 17:37:48 +01:00
Zbigniew Jędrzejewski-Szmek 8d4eda524a tools/check-version-history: avoid DeprecationWarning with newer lxml
We get the same warning thousands of times:
/work/src/tools/check-version-history.py:28: FutureWarning: This search incorrectly
ignores the root element, and will be fixed in a future version. If you rely on the
current behaviour, change it to
"./refsynopsisdiv/funcsynopsis/funcprototype/funcdef/function[.='udev_device_get_properties_list_entry']"

We also need to update the ignorelist to the new form.
2025-03-25 17:16:16 +01:00
Daan De Meyer 9f9da8a1c6 mkosi: Add two more mkosi entries to .gitignore
Also get rid of a bunch of outdated entries that don't apply anymore.
2025-03-25 15:09:40 +00:00
Daan De Meyer 9ed7019520 mkosi: update fedora commit reference
* 13d523f84d Relax dependencies from noarch packages on archful packages for OBS builds
* 59378485be Remove purge-nobody-user script
* d1380dc114 Add more services to %post for udev and networkd
* 6f0d03443d Fix paths for /usr/sbin/nologin and related progs
* df9a74d530 Make the source tarball glob in the test script more generic
2025-03-25 15:09:11 +00:00
Daan De Meyer 52b4371807 test: Disable pager in integration test units
Integration test units are now connected to the tty when running
interactively, so let's make sure we disable the pager to avoid tests
hanging in the pager.
2025-03-25 12:35:23 +01:00
Luca Boccassi a372936346 Trivial updates for docs and comments (#36854) 2025-03-25 10:37:42 +00:00
Zbigniew Jędrzejewski-Szmek 4dd94e5ba1 man/systed.swap: update description of implicit deps
This changed in e3e6f99689.
Closes https://github.com/systemd/systemd/issues/36761.
2025-03-25 10:40:12 +01:00
Zbigniew Jędrzejewski-Szmek 7a468f277b man/systemd-remount-fs: fix grammar 2025-03-25 10:37:12 +01:00
Zbigniew Jędrzejewski-Szmek a0064690c6 man/varlinkctl: remove unneeded absolute path in example 2025-03-25 10:37:12 +01:00
Zbigniew Jędrzejewski-Szmek aa0f0dd814 remount-fs: adjust comment 2025-03-25 10:37:00 +01:00
Zbigniew Jędrzejewski-Szmek c4876f604b Ratelimit attempts to open watchdog, increase logging (#35708) 2025-03-24 21:06:57 +01:00
Luca Boccassi b065ff03b1 man: fix typo in org.freedesktop.systemd1.xml 2025-03-24 18:25:29 +00:00
Busayo Dada 86960038ef test: update to use the new ASSERT_OK() macro and friends 2025-03-24 15:46:13 +00:00
Yu Watanabe dadaad157e man/timedatectl: add reference to systemd.time(7)
Closes #36839.
2025-03-24 12:59:27 +00:00
Luca Boccassi 5aee5bda1a tree-wide: introduce LOG_ITEM() macro for verifying format string (#36780)
This introduce `LOG_ITEM()` macro that checks format strings in
log_struct() and friends.

Hopefully, this silences false-positive warnings by Coverity.
2025-03-24 12:58:14 +00:00
Yu Watanabe f0cfb6a791 man/networkd.conf: revert unexpected replacement of PersistLeases= setting
The entry was unexpectedly replaced by the commit
418f2dc755 (v256).
This reverts the change.

Fixes #36837.
2025-03-24 11:30:23 +00:00
Daan De Meyer d2c1242c6d user-record: Allow/strip status for mask/extract privileged helpers
If we're using these helpers, we want to split a user record into two,
one with the privileged section, and one without. This should work even
when the user record has a "status" section, so adapt the helpers to
account for that.
2025-03-24 11:36:16 +01:00
Zbigniew Jędrzejewski-Szmek a9cee8f4de core/manager: do not exclude watchdog logic from busy-loop protection
As reported in https://github.com/systemd/systemd/issues/35405, if the watchdog
ping failed, we effectively started a busy loop here. The previous commits
should fix this, but in general, the protection here is intended as a safety
net in case the logic is broken somewhere else. We shouldn't exclude the
watchdog stuff from this.
2025-03-24 10:45:49 +01:00
Zbigniew Jędrzejewski-Szmek ab596e4cde shared/watchdog: give up after a few failed pings
Closes https://github.com/systemd/systemd/issues/35405. Apparently some
watchdog devices can be opened, but then the pings start failing after some
time. Since the timestamp of the last successful ping is not updated, we try to
ping again immediately, causing a busy loop and excessive logging.

After trying a few different approaches to fit this into the existing framework
without changing the logic too much, I settled on an approach with a second
timestamp. In particular, the timestamp of the last successful ping is public,
exposed as WatchdogLastPingTimestamp over dbus. It'd be wrong to redefine this
to mean the last ping *attempt*. So we need a second timestamp in some form.

Also, if we give up on pinging, we probably should attempt to disarm the
watchdog. It's possible that the pinging fails, but the watchdog would still
fire. I don't think we want that, since it seems that our internal loop is
working, it's just the watchdog that is broken.

Structured message with SD_MESSAGE_WATCHDOG_PING_FAILED is logged if we fail
to ping.

I tested this by attaching gdb to pid 1 and calling close(watchdog_fd).
We get a bunch of warning messages and then an attempt to close the watchdog:
Mar 21 15:46:17 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:20 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:23 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:26 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:29 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:32 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:35 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:37 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:40 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:43 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:46 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:49 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:52 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:55 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0: Bad file descriptor
Mar 21 15:46:58 fedora systemd[1]: Failed to ping hardware watchdog /dev/watchdog0, closing watchdog after 15 attempts: Bad file descriptor
Mar 21 15:46:58 fedora systemd[1]: Failed to disable hardware watchdog, ignoring: Bad file descriptor
Mar 21 15:46:58 fedora systemd[1]: Failed to disarm watchdog timer, ignoring: Bad file descriptor
2025-03-24 10:45:49 +01:00
Erik Larsson c88adbc01d networkd: add support for setting vlan_tunnel on bridge ports 2025-03-24 17:15:19 +09:00
Luca Boccassi 2e3efb1884 some dbus property fixes (#36830) 2025-03-22 15:54:16 +00:00
Lennart Poettering ed13622bc8 core: not sure why but TTYRows/TTYColumns property is 16bit towards outside, 32bit inside, handle that properly 2025-03-22 12:51:25 +01:00
Lennart Poettering 0b0cb6f33d core: fix C type handler for ExitCode property 2025-03-22 12:47:48 +01:00
Daan De Meyer fefcb935cd mkosi: Hide patches on debian instead of removing them 2025-03-21 22:36:27 +01:00
Daan De Meyer 07a6e1db06 fetch-distro: Fetch before we switch branches
Otherwise the branch we're switching to might not exist yet.
2025-03-21 21:21:37 +00:00
Daan De Meyer 655b0365e6 packit: Load fmf metadata from rpm spec repository (#36825) 2025-03-21 17:28:43 +01:00
Daan De Meyer 4d938fa865 packit: Load fmf metadata from rpm spec repository
Maintaining the fmf metadata and script upstream makes it painful
to reuse downstream so let's move the metadata and testing script
downstream and load it upstream instead.
2025-03-21 16:30:31 +01:00
Daan De Meyer 04b8dd76bd mkosi: update fedora commit reference
* 2ecfbec1a4 Support specifying extra mkosi repositories to the test script
* f5b47b1302 Use old setup sysusers files on Fedora < 43
* 2da5793357 Merge #196 `Migrate fmf metadata and test script from the upstream repository`
* e346d9f33e Limit sdubby dependency to Fedora
2025-03-21 16:30:12 +01:00
Zbigniew Jędrzejewski-Szmek 236ac39b65 shared/watchdog: add MESSAGE_IDs to logs about watchdog opening
One ID for the success case, with WATCHDOG_DEVICE= showing the device,
and one ID for the failure case, with WATCHDOG_DEVICE= if configured,
and ERRNO= set automatically.
2025-03-21 15:55:50 +01:00
Zbigniew Jędrzejewski-Szmek b27c9279f6 shared/watchdog: ratelimit the number of attempts to open watchdog
We need to retry the open attempts for the watchdog, because the device becomes
available asynchronously.

The watchdog is opened in two places:

- in pid1 in the main loop. The loop has a ratelimit, but during a boot we
  iterate in it fairly quickly. On my test VM with 'iTCO_wdt', version 2:

    $ journalctl -b --grep 'Failed to open any watchdog' | wc -l
    3398

  After the device has been processed by udev, it is initialized successfully.

- in shutdown. In that case, we most likely don't need to try more than once,
  because we mostly care about the case where the watchdog device was present
  and configured previously. But in principle it is possible that we might
  attempt shutdown while the machine was initializing, so we don't want to
  disable retries. Nevertheless, watchdog_ping() is called from a loop that
  might be fairly tight, so we could end up trying to reopen the device fairly
  often. This probably doesn't matter *too* much, but it's still ugly to try to
  open the device without any ratelimit.

Usually the watchdog timeout would be set to something like 30 s or a few
minutes. OTOH, on my VM, the device becomes avaiable at 4.35 s after boot. So
let's use 5 s or half the watchdog timeout, whatever is smaller, as the
interval.
2025-03-21 15:55:50 +01:00
Daan De Meyer 3ffcbb6b9a mkosi: Log in mkosi.sync when we don't check out commit 2025-03-21 15:24:04 +01:00
Jose Ortuno f1d8fb3d1d po: Translated using Weblate (Spanish)
Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Jose Ortuno <jose_ortuno@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/es/
Translation: systemd/main
2025-03-21 13:41:56 +00:00
Daan De Meyer f37df8c563 test: Check that the journal file was actually created (#36821)
If the test fails in the mkosi setup logic the journal file will never
be created so let's add some checks.
2025-03-21 14:31:20 +01:00
Yu Watanabe 90670111a9 udev: make udevadm and friends not warn about unknown settings
Without this change, when e.g. event_timeout= is specified in udev.conf,
udevadm and friends which loads udev.conf warn about unknown key:
===
$ udevadm info /sys/class/net/lo
/run/udev/udev.conf.d/test-17.conf:1: Unknown key 'event_timeout', ignoring.
/run/udev/udev.conf.d/test-17.conf:2: Unknown key 'timeout_signal', ignoring.
===

Follow-up for 07f5e35fe7 (v256).
2025-03-21 12:51:39 +00:00
Daan De Meyer 1fda095113 test: Check that the journal file was actually created
If the test fails in the mkosi setup logic the journal file will never
be created so let's add some checks.
2025-03-21 13:34:41 +01:00
Daan De Meyer 02a21805af packit: Remove --depth=1 from git clone
We need the full history to be able to checkout the right commit
afterwards.
2025-03-21 13:34:41 +01:00
Zbigniew Jędrzejewski-Szmek 2c6397d1c2 pid1: log if we failed to find a watchdog device
I think we need to log at some point if the user configured a watchdog device,
but no devices were found. We can't log ENOENT immediately, because the device
may likely appear during boot. So wait until the end of the initial transaction
and log then.
2025-03-21 11:38:43 +01:00
Zbigniew Jędrzejewski-Szmek 0b291130e8 shared/watchdog: raise log levels for watchdog errors
If we failed to open the watchdog device for any reason, we'd only log at debug
level. This seems iffy: if the user configured a timeout for the watchdog, we
should report when we can't set it up. ENOENT is still logged at debug level
only, since it's somewhat expected to have a watchdog timeout set up, even for
systems which don't have a watchdog, or the device might appear later.

If the device doesn't support WDIOC_GETSUPPORT, still log that we opened a
device.

No change in behaviour, except for the log level threshold. As a side effect,
the reason why we failed to open the device is now stored in watchdog_fd
(previously it was -1 always), but this isn't used for anything.
2025-03-21 11:30:26 +01:00
Zbigniew Jędrzejewski-Szmek 839db33687 test-watchdog: modernize 2025-03-21 11:30:26 +01:00
Zbigniew Jędrzejewski-Szmek ab37e9cdb2 core/watchdog: initialize variables only if they'll be used
This is not a hot path, but let's move the variables to the
minimal scope in which they are needed.

Also, all functions which call watchdog_open() check for fd < 0 first,
so change the conditional return into an assert.
2025-03-21 11:30:26 +01:00
Zbigniew Jędrzejewski-Szmek 18284f5a1b core: drop duplicated check in manager_{set,override}_watchdog
Those functions call watchdog_setup() and watchdog_setup_pretimeout(), which
internally do a similar check against the static variables watchdog_timeout and
watchdog_pretimeout. The second check is not useful.
2025-03-21 11:30:26 +01:00
Daan De Meyer 69369fd322 bootctl: adjust feature message (#36372) 2025-03-21 11:17:00 +01:00
Yu Watanabe 513f4d675a analyze: propagate error code returned by _from_string()
Follow-up for a483c39fc2.
Addresses https://github.com/systemd/systemd/pull/36468#discussion_r2005765024.
2025-03-21 10:31:46 +09:00
Yu Watanabe 3cb0551ecb edit-util: don't leave custom editor args around if we shall fall back (#36813)
Also, let's complain loudly if the editor acquired from envvar is not
present.

Fixes #36796
2025-03-21 08:48:05 +09:00
Yu Watanabe 786f60eb5d man: fix typo
Follow-up for 6fd253753c.
2025-03-21 08:35:36 +09:00
Matteo Croce dcde1e903a match glibc in ConditionVersion
Extend ConditionVersion= to allow matching against glibc version,
as proposed in https://github.com/systemd/systemd/pull/36468#issuecomment-2674600909
2025-03-21 06:57:28 +09:00
Jose Ortuno 966f872880 po: Translated using Weblate (Spanish)
Currently translated at 97.2% (250 of 257 strings)

Co-authored-by: Jose Ortuno <jose_ortuno@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/es/
Translation: systemd/main
2025-03-21 06:46:21 +09:00
Mike Yuan 551d4c91e8 core/meson: libcore doesn't depend on PAM
It's only used by sd-executor.
2025-03-20 21:34:31 +00:00