Mike Yuan
70ae9dc4f6
hibernate-resume-generator: don't initiate resume if soft-rebooted
...
This is just paranoia, to ensure that we don't accidentally
initiate resume if the initrd is entered through soft-reboot
rather than the initial one for booting up.
2024-10-15 01:18:26 +02:00
Mike Yuan
1cfe9737cf
gpt-auto: use RET_GATHER at one more place
2024-10-15 01:18:26 +02:00
Mike Yuan
86eb3a8fdd
core/manager: pass soft-reboot count to generators
...
soft-reboot allows switching into a different root/installation,
i.e. potentially invalidate settings from kernel cmdline and such.
Let's hence inform generators about soft-reboots.
2024-10-15 01:18:26 +02:00
Mike Yuan
de41622bf3
core/manager: minor cleanup for generator_path_any() and friends
2024-10-15 01:18:26 +02:00
Mike Yuan
f5dc74de2e
shared/exec-util: modernize execute_strv() and friends a bit
...
do_spawn() is also called during execute_strv(), so rename
"direxec" to "exec-inner".
2024-10-15 01:16:57 +02:00
Mike Yuan
8e39ba3e5a
shared/exec-util: minor rearrangement, drop unused EXEC_DIR_NONE
2024-10-15 01:16:57 +02:00
Mike Yuan
e472238525
basic/stat-util: use xopenat() where appropriate
2024-10-15 01:16:57 +02:00
Yu Watanabe
098f32e2a1
sd-radv: drop sd_radv_prefix and friends, and use sd_ndisc_option to manage NDisc options
...
No effective functional change, just refactoring.
2024-10-15 05:59:20 +09:00
Yu Watanabe
f121d8179a
Merge pull request #34738 from behrmann/ukifyoption
...
ukify: Add a config object
2024-10-15 05:58:49 +09:00
Yu Watanabe
c9dea52941
Merge pull request #34743 from yuwata/bus-message-dump-fd
...
bus-message-util: introduce bus_message_dump_fd() and _string()
2024-10-15 05:58:03 +09:00
Yu Watanabe
40fbde9571
Merge pull request #34745 from yuwata/local-outbounds-prefsrc
...
local-addresses: honor RTA_PREFSRC field of gateway
2024-10-15 05:57:34 +09:00
Michiel
2053182bd1
Fix some typos in socket-util.h
2024-10-14 16:09:41 +02:00
Luca Boccassi
4881dd5cf5
Merge pull request #34749 from yuwata/network-address-parse-broadcast
...
network/address: fix parser for Broadcast=
2024-10-14 12:31:03 +01:00
Antonio Alvarez Feijoo
5b9de8adef
updatectl: remove unimplemented option
2024-10-14 13:30:46 +02:00
Ivan Kruglov
84d7447a88
machine: listen on io.systemd.MachineImage socket
2024-10-14 11:09:18 +02:00
Ivan Kruglov
7809bd3ba7
machine: introduce io.systemd.MachineImage.Update varlink method
...
io.systemd.MachineImage.Update implements the following dbus org.freedesktop.machine1.Manager interfaces:
- RenameImage
- MarkImageReadOnly
- SetImageLimit
2024-10-14 11:09:18 +02:00
Ivan Kruglov
fb0ea6a6a3
machine: introduce io.systemd.MachineImage.List varlink method
...
io.systemd.MachineImage.List implements the following dbus org.freedesktop.machine1.Manager interfaces:
- GetImage
- ListImages
- GetImageHostname
- GetImageMachineID
- GetImageMachineInfo
- GetImageOSRelease
2024-10-14 10:57:36 +02:00
Ivan Kruglov
dd2d5952c9
machine: generalize rename_image_and_update_cache() logic
...
This is a prep step to reuse the function in varlink interface
2024-10-14 10:42:47 +02:00
Ivan Kruglov
ad0d4f9a4c
machine: move manager_acquire_image to src/machine/machined-core.c
...
This is a prep step to reuse the function in varlink interface.
2024-10-14 10:42:47 +02:00
Ivan Kruglov
4439679892
machine: fix misnamed params in src/shared/discover-image.h
2024-10-14 10:42:47 +02:00
Jörg Behrmann
467d21a710
ukify: Add more mypy options
...
This achieves parity with the mypy config used in mkosi.
The import of builtins is needed because otherwise type is attempted to be
resolved to the variable in the scope.
2024-10-14 09:59:25 +02:00
Jörg Behrmann
f1b6430ecf
ukify: Add UkifyConfig
...
Using a dataclass instead of an argparse namespace to pass around the parsed
options allows to track the types properly.
2024-10-14 09:59:25 +02:00
Jörg Behrmann
02eabaffe9
ukify: Add a unified interface for signing tools
2024-10-14 09:59:25 +02:00
Jörg Behrmann
929d6225b2
ukify: Fix type of UKI.executable
2024-10-14 09:59:25 +02:00
Lennart Poettering
ab826c4647
Merge pull request #34730 from yuwata/boot-efi-follow-ups
...
boot/efi: several follow-ups for recent change
2024-10-14 09:56:47 +02:00
Yu Watanabe
81fd92809d
network/address: use config_parse_in_addr_non_null() at one more place
...
No functional change, just refactoring.
2024-10-14 08:10:35 +09:00
Yu Watanabe
6f639b2555
network/address: do not set family in config_parse_broadcast()
...
The family will be checked later in
address_section_verify() -> address_section_adjust_broadcast(),
hence it is not necessary to set here.
Follow-up for 5d15c7b19c .
Fixes oss-fuzz#372994449.
Fixes #34748 .
2024-10-14 08:10:30 +09:00
Yu Watanabe
4a7fd9d1d5
Merge pull request #34555 from rpigott/busctl-wait
...
busctl: add wait verb to wait for signals
2024-10-13 18:50:48 +09:00
Yu Watanabe
709fdcc75a
Merge pull request #34520 from vcaputo/mmap-cache-unused-min
...
mmap-cache: enforce an unused windows minimum
2024-10-13 14:48:35 +09:00
Ronan Pigott
30465af656
busctl: add wait verb to wait for signals
...
It's like busctl call, but it waits for a signal rather than a reply to
a method call.
2024-10-12 19:30:56 -07:00
Yu Watanabe
0343ef9764
test: add test for local outbounds with preferred source address
2024-10-13 07:25:59 +09:00
Yu Watanabe
4adf2653e2
local-addresses: honor RTA_PREFSRC field of gateway
...
Fixes #34739 .
2024-10-13 06:56:41 +09:00
Yu Watanabe
418641f73f
local-addresses: use FOREACH_ARRAY() macro
2024-10-13 06:30:58 +09:00
Yu Watanabe
4169cad876
sha256: use memory-util-fundamental.h
...
Prompted by https://github.com/systemd/systemd/pull/34722#discussion_r1797352922 .
2024-10-13 05:57:29 +09:00
Yu Watanabe
c16d297e79
boot/efi/log: always include filename, line, and function in log message
...
Then, drop unused log_trace().
2024-10-13 05:51:23 +09:00
Yu Watanabe
5254c687d0
boot/efi/smbios: initialize output parameters if entries not found
2024-10-13 05:51:23 +09:00
Yu Watanabe
f87e02ba3f
boot/efi: trivial coding style cleanups
...
Follow-ups for #34717 and #34718 .
2024-10-13 05:51:23 +09:00
Yu Watanabe
058bccbecb
bus-message-util: introduce bus_message_dump_fd() and _string()
...
Then, use them in analyze and oomctl.
2024-10-13 05:44:19 +09:00
Yu Watanabe
72e05e44f8
analyze: fall back to simple method from dump_patterns() and friends
...
No functional change, just refactoring.
2024-10-13 05:44:19 +09:00
Jörg Behrmann
9ba53499b9
ukify: Require both key and cert be set in generate_keys
...
If either is None the write in this branch of the code will fail.
2024-10-12 19:01:00 +02:00
Jörg Behrmann
f5698a3f41
ukify: Add missing typing for iterator
2024-10-12 19:01:00 +02:00
Yu Watanabe
39b2ee5369
Merge pull request #34591 from teknoraver/timer
...
timer: introduce DeferReactivation setting
2024-10-12 08:12:38 +09:00
Yu Watanabe
d106887bb5
Merge pull request #34698 from yuwata/udev-node-lock-file
...
udev-node: remove stack directories and their lock files by workers, rather than manager
2024-10-12 08:12:10 +09:00
Yu Watanabe
8ffc83d3d4
Merge pull request #34722 from anonymix007/fundamental-sha1
...
fundamental: Add SHA1
2024-10-12 08:11:35 +09:00
Arthur Shau
cc0ab8c810
timer: introduce DeferReactivation setting
...
By default, in instances where timers are running on a realtime schedule,
if a service takes longer to run than the interval of a timer, the
service will immediately start again when the previous invocation finishes.
This is caused by the fact that the next elapse is calculated based on
the last trigger time, which, combined with the fact that the interval
is shorter than the runtime of the service, causes that elapse to be in
the past, which in turn means the timer will trigger as soon as the
service finishes running.
This behavior can be changed by enabling the new DeferReactivation setting,
which will cause the next calendar elapse to be calculated based on when
the trigger unit enters inactivity, rather than the last trigger time.
Thus, if a timer is on an realtime interval, the trigger will always
adhere to that specified interval.
E.g. if you have a timer that runs on a minutely interval, the setting
guarantees that triggers will happen at *:*:00 times, whereas by default
this may skew depending on how long the service runs.
Co-authored-by: Matteo Croce <teknoraver@meta.com >
2024-10-11 22:54:16 +02:00
Yu Watanabe
ea4af553d8
udev-node: drop unnecessary manager side cleaning up logic for stack directory
...
Unnecessary stack directories and their lock files are removed by
workers. Hence, the logic is not necessary anymore.
2024-10-12 05:34:07 +09:00
Yu Watanabe
b364af59f0
udev-node: drop workaround for by-diskseq symlinks
...
This effectively reverts 09373c1a50 ,
as stack directories and lock files are removed by udev workers on
unlocking.
2024-10-12 05:34:07 +09:00
Yu Watanabe
7727b694db
udev-node: remove lockfile and stack directory when not necessary if possible
...
Replaces 09373c1a50 .
Let's remove stack directories and their lock files by workers if
possible.
Now, lock files must be created before creating stack directories, hence
lock files are moved to /run/udev/links.lock/ , e.g.,
Before:
/run/udev/links/disk\x2fby-diskseq\x2f1/.lock
After:
/run/udev/links.lock/disk\x2fby-diskseq\x2f1
Fixes ##34637.
2024-10-12 05:34:02 +09:00
Yu Watanabe
632407c3e4
Merge pull request #34700 from yuwata/network-conf-parser
...
network: several cleanups for conf parsers
2024-10-12 05:22:11 +09:00
anonymix007
5be6e9e0cf
test: Add tests for SHA1
2024-10-11 23:10:23 +03:00