1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-26 17:27:41 +03:00
Commit Graph

9013 Commits

Author SHA1 Message Date
Yu Watanabe
e7c567cc78 man: insert a comma before 'and'
Follow-up for bd91f23acf.
2024-10-24 16:42:59 +09:00
Yu Watanabe
491c903dbe man/network: suggest to not request IA_NA when received RA with Managed bit unset
Follow-up for 1f5a052963.
2024-10-24 05:32:40 +09:00
Yu Watanabe
967c586e9c man/network: fix typo
Follow-up for 1f5a052963.
2024-10-23 17:25:37 +09:00
Lennart Poettering
bd91f23acf logind: add CanIdle + CanLock dbus properties to session object
Clients should be able to know if the idle logic is available on a
session without secondary knowledge about the session class. Let's hence
expose a property for that.

Similar for the screen lock concept.

Fixes: #34844
2024-10-22 18:44:05 +02:00
Lennart Poettering
119252343e
Merge pull request #34848 from yuwata/network-dhcpv6-do-not-request-ia-pd-on-info-req
network/dhcp6: do not request IA_PD on information requesting mode
2024-10-22 18:00:12 +02:00
Lennart Poettering
2d74427a7c
Merge pull request #30952 from rpigott/resolved-dnr
RFC9463: Discovery of Network-designated Resolvers
2024-10-22 09:05:36 +02:00
Yu Watanabe
1f5a052963 man: suggest to use DHCPv6Client= when upstream provides RA with the Managed bit unset
Follow-up for daf9f42f91.
2024-10-22 04:35:03 +09:00
Ronan Pigott
9c683c0e1f network: Introduce IPv6RA UseDNR= option
Same as the DHCP v4/v6 options, this controls the use of DNR received
from ipv6ra.
2024-10-21 09:10:20 -07:00
Ronan Pigott
869381589d network: Introduce UseDNR DHCPv4 option
This option will control the use of DNR for choosing DNS servers on the
link. Defaults to the value of UseDNS so that in most cases they will be
toggled together.
2024-10-21 09:10:19 -07:00
Lennart Poettering
9c1fa3c235 ask-password-tool: add --user/--system flag to systemd-ask-password tool
This allows selecting which agents to ask about this: system-level
agents, or per-user agents.

Fixes: #1232 #2217
2024-10-21 14:14:10 +02:00
Lennart Poettering
6eabea49da
Merge pull request #33398 from AdrianVovk/sysupdate-optional
sysupdate: Add support for optional features
2024-10-21 12:36:43 +02:00
Adrian Vovk
f82a7c87d2 sysupdate: Use camelCase for JSON field names
Seems like we missed some snake_case field names in previous reviews of
systemd-sysupdate
2024-10-21 12:31:54 +02:00
Adrian Vovk
5803efff44
updatectl: Introduce optional feature verbs
This introduces a nice UX for listing, inspecting, enabling, and
disabling optional features from the command line.
2024-10-18 18:08:39 -04:00
Adrian Vovk
e55e7a5a61
sysupdated: Plumb through optional features
This adds APIs to enumerate/inspect/enable/disable optional features.
2024-10-18 18:08:38 -04:00
Adrian Vovk
0cd1a58921
sysupdate: Add verb to inspect features 2024-10-18 17:58:47 -04:00
Adrian Vovk
e1384cfb09
sysupdate: Introduce optional features
Optional features allow distros to define sets of transfers that can
be enabled or disabled by the system administrator. This is useful for
situations where a distro may want to ship some resources version-locked
to the core OS, but many people have no need for the resource, such as:
development tools/compilers, drivers for specialized hardware, language
packs, etc

We also rename sysupdate.d/*.conf -> sysupdate.d/*.transfer, because
now there are more than one type of definition in sysupdate.d/. For
backwards compat, we still load *.conf files as long as no *.transfer
files are found and the *.conf files don't try to declare themselves
as part of any features

Fixes https://github.com/systemd/systemd/issues/33343
Fixes https://github.com/systemd/systemd/issues/33344
2024-10-18 17:58:45 -04:00
Zbigniew Jędrzejewski-Szmek
2c23b7054f
Merge pull request #34783 from keszybz/man-nspawn-private-users
Change systemd-nspawn man page to strongly recommend private users
2024-10-18 18:44:05 +02:00
Zbigniew Jędrzejewski-Szmek
487d412327 tree-wise: use "lightweight" spelling
Both spellings were used, but the dictionary says that "lightweight"
is the standard spelling.
2024-10-18 18:43:40 +02:00
Zbigniew Jędrzejewski-Szmek
9b1a5bc365 man/systemd-nspawn: emphasise that user namespaces are strongly recommended 2024-10-18 18:43:40 +02:00
Ryan Wilson
63d4c4271c cgroup: Add ManagedOOMMemoryPressureDurationSec= override setting for units
This will allow units (scopes/slices/services) to override the default
systemd-oomd setting DefaultMemoryPressureDurationSec=.

The semantics of ManagedOOMMemoryPressureDurationSec= are:
- If >= 1 second, overrides DefaultMemoryPressureDurationSec= from oomd.conf
- If is empty, uses DefaultMemoryPressureDurationSec= from oomd.conf
- Ignored if ManagedOOMMemoryPressure= is not "kill"
- Disallowed if < 1 second

Note the corresponding dbus property is DefaultMemoryPressureDurationUSec
which is in microseconds. This is consistent with other time-based
dbus properties.
2024-10-16 20:12:38 -07:00
Yu Watanabe
daf9f42f91 man/network: update example for router upstream interface
This comments out all optional settings.
2024-10-15 18:23:59 +09:00
Yu Watanabe
71a886518b man: update documents of "_outbound" addresses
Follow-up for 4adf2653e2.
Addresses https://github.com/systemd/systemd/issues/34739#issuecomment-2412904739.
2024-10-15 09:25:13 +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
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
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
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
Lennart Poettering
c3069a6bfb man: reword comment a bit regarding ExecStartPre= multiple commands
The documentation claimed that ExecStartPre=/ExecStartPost= accepts
multiple command lines, in contrast to ExecStart=. This is half an
untruth, because ExecStart= allows that too – as long as Type=oneshot is
set.

Hence, reword this a bit, and do not emphasize the contrast.

Prompted by: #34570
2024-10-11 02:18:24 +09:00
Yu Watanabe
ff5ba2d6fe sd-event: rename output parameters to ret 2024-10-10 19:02:53 +09:00
Tobias Fleig
2ea0487c1b stub: Add support for .initrd addon files
Teaches systemd-stub how to load additional initrds from addon files.
This is very similar to the support for .ucode sections in addon files,
but with different ordering. Initrds from addons have a chance to
overwrite files from the base initrd in the UKI.
2024-10-09 14:06:10 +01:00
Lennart Poettering
1c62c2da43
Merge pull request #34656 from yuwata/private-users
core: drop implicit support of PrivateUsers=off
2024-10-09 10:39:30 +02:00
Lennart Poettering
0aaacc3a10
Merge pull request #34593 from Werkov/deprecate-aux-scopes
core/manager: Deprecate StartAuxiliaryScope() method
2024-10-09 10:25:30 +02:00
Yu Watanabe
edd3f4d9b7 core: drop implicit support of PrivateUsers=off
Follow-up for fa693fdc7e.

The documentation says the option takes a boolean or one of the "self"
and "identity". But the parser uses private_users_from_string() which
also accepts "off". Let's drop the implicit support of "off".
2024-10-09 05:39:54 +09:00
Michal Koutný
64f173324e core/manager: Deprecate StartAuxiliaryScope() method
The method was added with migration of resources in mind (e.g. process's
allocated memory will follow it to the new scope), however, such a
resource migration is not in cgroup semantics. The method may thus have
the intended users and others could be guided to StartTransientUnit().

Since this API was advertised in a regular release, start the removal
with a deprecation message to callers.
Eventually, the goal is to remove the method to clean up DBus API and
simplify code (removal of cgroup_context_copy()).

Part of DBus docs is retained to satisfy build checks.
2024-10-08 17:49:13 +02:00
David Joaquín Shourabi Porcel
a41da1e703
man: machinectl(1): Fix description of subcommand poweroff 2024-10-08 15:23:17 +02:00
David Joaquín Shourabi Porcel
f4e3c6e5b3
man: systemd-nspawn(1): Fix some typos 2024-10-08 15:23:07 +02:00
Ryan Wilson
3543456f84 Add ExtraFileDescriptor property to StartTransientUnit dbus API
This adds the ExtraFileDescriptor property to StartTransient dbus API
with format "a(hs)" - array of (file descriptor, name) pairs. The FD
will be passed to the unit via sd_notify like Socket and OpenFile.

systemctl show also shows ExtraFileDescriptorName for these transient
units. We only show the name passed to dbus as the FD numbers will
change once passed over the unix socket and are duplicated, so its
confusing to display the numbers.

We do not add this functionality for systemd-run or general systemd
service units as it is not useful for general systemd services.
Arguably, it could be useful for systemd-run in bash scripts but we
prefer to be cautious and not expose the API yet.

Fixes: #34396
2024-10-07 09:01:48 -07:00
Daan De Meyer
598bb6fde4
Merge pull request #34608 from DaanDeMeyer/ukify
ukify: Rework multi-profile UKIs
2024-10-04 13:57:16 +02:00
Jörg Behrmann
56f32d9e78 man: Use proper conjunction and remove superfluous or 2024-10-04 12:45:21 +01:00
Luca Boccassi
3509fe124d man: consolidate list of active unit states into a shared table
Avoids the need to maintain the same list over and over again, and
link it to the defition table in the implementation as a reminder
too
2024-10-04 12:22:55 +02:00
Daan De Meyer
16020c3324 ukify: Rework multi-profile UKIs
The API introduced in https://github.com/systemd/systemd/pull/34295
is less than ideal:

- It doesn't consider signing at all (ukify can't sign separately yet)
- Measurement is completely broken (all profile sections are marked to
  not be measured)
- It focuses on a very niche use case of extending existing UKIs and makes
  the more common use case of building a UKI with several profiles included
  much harder than needed.

Let's instead rework the API to focus on the primary use case of building
a UKI with multiple profiles added to it immediately. We require the profiles
to be built upfront as separate PE binaries with UKI. There's no need to sign
or measure these, they're solely vehicles for profile sections. This saves us
from having to complicate the command line and config parsing to support defining
multiple profiles.

To add the profiles when building a UKI, we introduce the new --add-profile
switch which takes a path to a PE binary describing a profile. The required
sections are read from each PE binary, measured and added as a profile.

The integration test is disabled until the new API is merged and exposed in
mkosi so that building a UKI with profiles can be left to mkosi and the integration
test will only test the switching between profiles and not the building of UKIs
with profiles.
2024-10-04 11:36:25 +02:00
Luca Boccassi
2f8ac1c4c7
Merge pull request #34610 from poettering/exec-start-single-line
Soft deprecate multiple ExecStart= command lines within a single assignment
2024-10-03 22:46:11 +01:00
Daan De Meyer
3891d57c4f Revert "ukify: add new --extend= switch for importing an existing UKI's sections to later extend"
This reverts commit b6570095ce.
2024-10-03 23:15:32 +02:00
Daan De Meyer
71f11a8f4c Revert "ukify: introduce new --measure-base= switch"
This reverts commit bc3e2c5a57.
2024-10-03 23:15:32 +02:00
Luca Boccassi
bdbec7cfe0
Merge pull request #34590 from poettering/file-hier-removals
man: remove some irrelevant dirs from file-hierarchy(7)
2024-10-03 21:04:30 +01:00
Zbigniew Jędrzejewski-Szmek
fb0ef5eac0 man/systemd-stub: reword descriptions of .dtb and .profile sections
- The text was clearly edited in variuos places to e.g. allow multiple
  sections, so it first said that sections are singletons, and immediately
  after that that some section are not.
- Replace "regardless of the kernel" with "regardless of the kernel version".
  The kernel is very much involved e.g. in loading of the initrds.
- Various other small rewordings to make the text more legible.
2024-10-03 16:34:04 +01:00
Lukas Nykryn
67b6404b80 man: using WantedBy=default.target is not a good idea
We had several users, that wrote their unit files with
WantedBy=default.target because it should be started "every time".
But for example in Fedora/CentOS/RHEL, this often breaks for
example selinux relabels (where we just want to do a relabel and reboot).
2024-10-02 18:25:03 +02:00
Lennart Poettering
f39e66b85a man: drop reference to /bin/ from docs regarding binary search path
We don't support "split /usr" systems anymore, hence no point in
mentioning /bin/ anymore as being part of the binary search path.
2024-10-02 10:57:25 +02:00
Lennart Poettering
225f18b9a9 man: soft deprecate use of ";" for separating multiple command lines in ExecStart=
So far we supported this syntax:

    ExecStart=foo ; bar

as equivalent to:

    ExecStart=foo
    ExecStart=bar

With this change we'll "soft" deprecate the first syntax. i.e. it's
still supported in code, but not documented anymore.

The concept was originally added to make things easier for 3rd party
.ini readers, as it allowed writing unit files with a .ini framework
that doesn't allow multiple assignments for the same key. But frankly,
this is kinda pointless, as so many other of our knobs require the
double assignment.

Hence, let's just stop advertising the concept, let's simplify the docs,
by removing one entirely redundant feature from it.

Replaces: #34570
2024-10-02 10:57:25 +02:00
Marcel Hellwig
fec09ff094 Update sd_bus_message_append_array.xml
fix pointer constness in documentation
2024-10-01 15:55:28 +02:00
Daniel Dawson
0c96911afb systemd-integritysetup: accept integrity-algorithm=xxhash64
Signed-off-by: Daniel Dawson <danielcdawson@gmail.com>
2024-10-01 11:16:14 +02:00