1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-31 21:18:09 +03:00
Commit Graph

75871 Commits

Author SHA1 Message Date
Luca Boccassi
b3014aafb5 TODO: add note about live mounting via pinned namespace fd 2024-08-28 16:57:14 +01:00
Luca Boccassi
ec54029017 mkosi: use util-linux's autologin
login is now from util-linux so credentials are supported.
It also needs to be pulled in as it's Protected: yes rather than
Essential: yes.

Keep the old setting for Ubuntu as that still uses login from shadow.
2024-08-28 16:32:17 +01:00
Daan De Meyer
360b8dc9a6
Merge pull request #34143 from DaanDeMeyer/tests
test-dhcp-server: Migrate to new assertion macros
2024-08-28 15:17:55 +02:00
Daan De Meyer
73a1a6f445 test-dhcp-server: Migrate to new assertion macros 2024-08-28 13:30:52 +02:00
Yu Watanabe
9f563bcd74
Merge pull request #34123 from yuwata/sd-device
sd-device: expose sd_device_get_device_id() and sd_device_get_driver_subsystem()
2024-08-28 11:33:09 +09:00
Yu Watanabe
29d41efd44
Merge pull request #34139 from yuwata/sd-device-monitor
sd-device-monitor: introduce sd_device_monitor_get_events() and _get_timeout()
2024-08-28 11:32:51 +09:00
Yu Watanabe
5ab1250534 sd-device-monitor: introduce sd_device_monitor_get_events() and _get_timeout()
Follow-up for bab889c51e (#33032).

Currently, they unconditionally returns EPOLLIN and USEC_INFINITY, respectively.
Just for consistency with sd-bus, sd-journal, sd-varlink, and so on. All
they have _get_fd(), _get_events(), and _get_timeout().

Closes #34094.
2024-08-28 05:35:07 +09:00
Yu Watanabe
d36d71cade test: use more suitable assertions 2024-08-28 05:35:07 +09:00
Yu Watanabe
bbb7a0e6ed sd-varlink: make the argument type consistent with header 2024-08-28 05:35:07 +09:00
Yu Watanabe
3fe0fd20c9 udevadm/info: also show driver subsystem and device ID
This adds two more fields in 'udevadm info':
- J for device ID, e.g. b128:1, c10:1, n1, and so on.
- B for driver subsystem, e.g. pci, i2c, and so on.

These, especially the device ID field may be useful to find udev
database file under /run/udev/data for a device.
2024-08-28 05:26:26 +09:00
Yu Watanabe
cd7c71154c sd-device: make sd_device_new_from_subsystem_sysname() stricter
As workarounded by fc0cbed2db, the pair of
subsystem and sysname is not unique. For examples,
- /sys/bus/gpio and /sys/class/gpio, both have gpiochip%N. However, these point to different devpaths.
- /sys/bus/mdio_bus and /sys/class/mdio_bus,
- /sys/bus/mei and /sys/class/mei,
- /sys/bus/typec and /sys/class/typec, and so on.

Let's refuse to provide sd_device object in such cases.
2024-08-28 05:26:08 +09:00
Yu Watanabe
1ff0164be5 sd-device: make device_get_device_id() public
We have already exposed sd_device_new_from_device_id(), but we have
never provide the way to get device ID from an existing sd_device
object.
2024-08-28 05:26:04 +09:00
Yu Watanabe
44bc6f3cab sd-device: introduce sd_device_get_driver_subsystem()
To create the sd_device object of a driver, the function
sd_device_new_from_subsystem_sysname() requires "drivers" for subsystem
and e.g. "pci:iwlwifi" for sysname. Similarly, sd_device_new_from_device_id()
also requires driver subsystem. However, we have never provided a
way to get the driver subsystem ("pci" for the previous example) from
an existing sd_device object.

Let's introduce a way to get driver subsystem.
2024-08-28 05:18:14 +09:00
Yu Watanabe
55e35a4d59 sd-device: refuse earlier when too long ifname is passed to sd_device_new_from_ifname()
Otherwise, alloca() called in strjoina() may trigger assertion.

This partially reverts 3652891c39.
The commit mistakenly dropped the check.
2024-08-28 05:18:14 +09:00
Yu Watanabe
1937f5105d sd-device: make sd_device_get_devtype() return 0 on success again
This partially reverts the commit 730b76bd2c.

Before the commit, the function returned 0 on success, but the commit
made the function always return 1, as if device->devtype is NULL, the
function returns -ENOENT in the above.

Fortunately, udev_device_get_devtype() does not propagate any
non-negative value from sd_device_get_devtype(). Hence, hopefully we can
safely revert the change.
2024-08-28 05:18:14 +09:00
Vitaly Kuznetsov
803a392471 stub: restore random seed update logic
Commit 201e0d53bd ("stub: split out random seed part out of run()")
looks like refactoring but apparently it changed the logic when random
seed is refreshed in the ESP completely. Previously, process_random_seed()
was called when either:
- sd-stub was not present (LoaderFeatures var is unset) OR
- sd-stub was present but EFI_LOADER_FEATURE_RANDOM_SEED flag was unset.
Post-change, refresh_random_seed() bails under the exact same conditions (no
sd-stub or EFI_LOADER_FEATURE_RANDOM_SEED is unset) and thus
process_random_seed() is NOT called.

Restore the original logic. efivar_get_uint64_le()'s return value doesn't
require checking: loader_features is initialized to 0 and in case of failure it
stays untouched.
2024-08-28 05:10:06 +09:00
Lennart Poettering
4e7a627797 vmspawn: fix duplicate logging on oom 2024-08-28 03:03:23 +09:00
Adrian Vovk
88261bcf3b
Merge pull request #33570 from AdrianVovk/sysupdate-incomplete
sysupdate: Handle incomplete versions
2024-08-27 13:04:02 -04:00
Lennart Poettering
9c0aee7cbb exec-invoke: remove redundant empty lines 2024-08-27 16:20:23 +02:00
Luca Boccassi
7d8bbfbe08 service: add 'debug' option to RestartMode=
One of the major pait points of managing fleets of headless nodes is
that when something fails at startup, unless debug level was already
enabled (which usually isn't, as it's a firehose), one needs to manually
enable it and pray the issue can be reproduced, which often is really
hard and time consuming, just to get extra info. Usually the extra log
messages are enough to triage an issue.

This new option makes it so that when a service fails and is restarted
due to Restart=, log level for that unit is set to debug, so that all
setup code in pid1 and sd-executor logs at debug level, and also a new
DEBUG_INVOCATION=1 env var is passed to the service itself, so that it
knows it should start with a higher log level. Once the unit succeeds
or reaches the rate limit the original level is restored.
2024-08-27 12:24:45 +01:00
Luca Boccassi
23e3bddc48
Merge pull request #34114 from yuwata/resolvconf-p
resolve: support 'resolvconf -p'
2024-08-27 11:18:34 +01:00
Daan De Meyer
1ee6a08623 tests: Add ASSERT_OK_EQ() 2024-08-27 12:15:24 +02:00
Daan De Meyer
3862a227fb tests: Remove some unnecessary quotes 2024-08-27 12:15:05 +02:00
Mike Yuan
ecf89abf2f core-varlink: add missing runtime scope check for manager_varlink_managed_oom_connect()
Follow-up for 2250c996cf
2024-08-27 12:12:50 +09:00
Yu Watanabe
44eee910c0
Merge pull request #34124 from YHNdnzj/socket-accept-name
core: honor FileDescriptorName= too for Accept=yes sockets, plus several other cleanups
2024-08-27 12:11:20 +09:00
Yu Watanabe
57bdb24f9d NEWS: mention "resolvconf -p" 2024-08-27 05:42:34 +09:00
Yu Watanabe
80e038221b test: add more test cases for resolvconf 2024-08-27 05:37:34 +09:00
Yu Watanabe
374825ec05 resolvconf: disable default route when -p is specified
Internally, the switch triggers 'resolvectl default-route INTERFACE no'.

Closes #34112.
2024-08-27 05:30:06 +09:00
Yu Watanabe
189cb2b15f resolvconf: clear domains if nothing specified 2024-08-27 05:23:12 +09:00
Yu Watanabe
b3102c05e1 resolvectl: make enum name consistent with the option name 2024-08-27 05:17:52 +09:00
Martin Srebotnjak
71bcd6c0d7 po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-08-27 04:50:58 +09:00
Ronan Pigott
13e15dae9f resolved: clear the AD bit for bypass packets
When the bypass logic is invoked, such as for queries to the stub with
the DO bit set, be certain to clear the AD bit in the reply before
forwarding it if the answer is not known to be authentic.
2024-08-26 16:57:37 +01:00
Daan De Meyer
3fcf2a2a39 repart: Use streq_ptr() in one more place 2024-08-26 16:55:29 +01:00
Allison Karlitskaya
2bdf027de1 man: document "web" session type
This has been supported since e9e74f28d7 but never got documented.
Add it to the man pages (plus one comment in a header).

Closes #34127.
2024-08-26 16:54:59 +01:00
Daan De Meyer
1b275c2acd crash-handler: Add back notice log message
Fixes https://github.com/systemd/systemd/pull/33959#discussion_r1730987738
2024-08-26 16:36:39 +02:00
Lennart Poettering
cb1e7ab533 update TODO 2024-08-26 16:29:07 +02:00
Lennart Poettering
e7c8d78e7f
units: don't set LISTEN_FDNAMES for varlink services explicitly
Now that FileDescriptorName= is properly honored by Accept=yes sockets,
this explicit override is pointless.
2024-08-26 15:40:15 +02:00
Mike Yuan
daa78907af
core: honor FileDescriptorName= too for Accept=yes sockets
So far we manually hardcoded $LISTEN_FDNAMES to "varlink" in various
varlink service units we ship, even though FileDescriptorName=varlink
is specified in associated socket units already, because
FileDescriptorName= is currently silently ignored when combined with
Accept=yes. Let's step away from this, which seems saner.

Note that this is technically a compat break, but a mostly negligible
one as there shall be few users setting FileDescriptorName= but
still expecting LISTEN_FDNAMES=connection in the actual executable.

Preparation for #34080
2024-08-26 15:40:15 +02:00
Daan De Meyer
caf5eb586a mkosi: Stop using git commit timestamps for package releases
This prevents bisecting to figure out which commit broke something
as when going backwards the git commit timestamp will be older meaning
package managers will refuse to upgrade to the "older" version. Let's
make sure the release is always newer by using the current date unless
$SOURCE_DATE_EPOCH is set.
2024-08-26 14:22:29 +01:00
Mike Yuan
2234032c47
core: move check for combination of PAMName= + KillMode= to unit_verify_contexts()
While at it, allow "mixed" for all unit types too, i.e.
also apply ebc2259da1 to
socket/mount/swap units.
2024-08-26 14:52:25 +02:00
Mike Yuan
bca5505839
core/socket: refuse MaxConnection=0 for Accept=no sockets too
This makes no sense at all, and we already refuse such setting
for Accept=yes sockets. I see no reason not to extend this to
Accept=no ones.
2024-08-26 14:52:25 +02:00
Mike Yuan
f220d98945
core/socket: use UNIT_ISSET rather than _DEREF where suitable 2024-08-26 14:52:25 +02:00
Luca Boccassi
2e8e32e6d5
Merge pull request #34117 from yuwata/network-routing-policy-rule
network: introduce generic conf parser for [RoutingPolicyRule] section
2024-08-26 12:08:26 +01:00
Yu Watanabe
36f6e87dd3 man: reword about default route for DNS traffic
DefaultRoute is a D-Bus property, not a valid setting name in .network
files nor resolved.conf.
Whether a link is the default route or not is configured with
DNSDefaultRoute= setting in .network files.
2024-08-26 11:14:26 +01:00
Yu Watanabe
b1fc342cdd
Merge pull request #34120 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-08-25 21:28:53 +09:00
Oğuz Ersen
8eaceb3814 po: Translated using Weblate (Turkish)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/tr/
Translation: systemd/main
2024-08-25 13:38:32 +02:00
Sergey A
5bac779ca0 po: Translated using Weblate (Russian)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Sergey A <Ser82-png@yandex.ru>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ru/
Translation: systemd/main
2024-08-25 13:38:32 +02:00
Léane GRASSER
feef5a773f po: Translated using Weblate (French)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Léane GRASSER <leane.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main
2024-08-25 13:38:32 +02:00
Weblate Translation Memory
a68c2f5f76 po: Translated using Weblate (French)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main
2024-08-25 13:38:31 +02:00
Yu Watanabe
605377e7b3 network/routing-policy-rule: use config_parse_routing_policy_rule() more
Then, we can drop allocation of RoutingPolicyRule object in each conf
parsers.

No functional change, just refactoring.
2024-08-25 06:25:07 +09:00