1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00
Commit Graph

8007 Commits

Author SHA1 Message Date
Lennart Poettering
60936158d1
Merge pull request #29159 from poettering/socket-pause
core: add new "PollLimit" settings to .socket units
2023-09-19 09:40:27 +02:00
наб
eed99fe995 systemd.time.7: rewrite Parsing Timestamps section 2023-09-19 00:50:08 +01:00
Abderrahim Kitouni
aefdc1124f man: update version information
As I noticed a lot of missing information when trying to implement checking
for missing info. I reimplemented the version information script to be more
robust, and here is the result.

Follow up to ec07c3c80b
2023-09-19 00:37:37 +01:00
Luca Boccassi
c2077ae0c4
Merge pull request #29186 from keszybz/man-notifications-and-fd-store
man: notifications and fd store
2023-09-19 00:36:24 +01:00
Lennart Poettering
9373fce68d man: document the new PollLimitIntervalSec=/PollLimitBurst= settings 2023-09-18 18:55:19 +02:00
Lennart Poettering
2bec84e7a5 core: add new "PollLimit" settings to .socket units
This adds a new "PollLimit" pair of settings to .socket units, very
similar to existing "TriggerLimit" logic. The differences are:

* PollLimit focusses on the polling on the sockets, and pauses that
  temporarily if a ratelimit on that is reached. TriggerLimit otoh
  focusses on the triggering effect of socket units, and stops
  triggering once the ratelimit is hit.

* While the trigger limit being hit is an action that causes the socket
  unit to fail the polling limit being reached will just temporarily
  disable polling on the socket fd, and it is resumed once the ratelimit
  interval is over.

* When a socket unit operates on multiple socket fds (e,g, ListenStream=
  on both some ipv6 and an ipv4 address or so). Then the PollLimit will
  be specific to each fd, while the trigger limit is specific to the
  whole unit.

Implementation-wise this is mostly a wrapper around sd-event's
sd_event_source_set_ratelimit(), which exposes the desired behaviour
directly.

Usecase for all of this: socket services which when overloaded with
connections should just slow down reception of it, but not fail
persistently.
2023-09-18 18:55:19 +02:00
Daan De Meyer
ef61eec2b2 man: Mention that JSON user record files should have the .user extension 2023-09-18 14:52:06 +02:00
Lennart Poettering
0959847af5 doc: add a markdown doc giving an overview over the fdstore
And link it up everywhere.
2023-09-18 14:47:07 +02:00
Zbigniew Jędrzejewski-Szmek
7ab1a1be1c man/daemon: s/init system/service manager/
As pointed out in the review, all this applies to the user services too, so are
not managed by the "init system", but by the more generic "service manager".

Also:
- use oxford comma
- change "employ" to "use" in various places
- change "the init system forwards messages to syslog" to "are forwarded to
  syslog". This is done by systemd-journald, so really there is no forwarding,
  because systemd-journald just writes them to a file in the common setup,
  so let's use the passive form to avoid specifying who does this.
2023-09-18 14:44:32 +02:00
Lennart Poettering
e75386bd84 man: fix counting of resource types 2023-09-18 11:19:26 +02:00
Lennart Poettering
652d2bfb61 man: link UKI spec from sd-stub 2023-09-18 11:19:17 +02:00
Lennart Poettering
ef3e110a07 man: drop duplicate .uname documentation, add .sbat documentation
This fixes the PE section documentation in the systemd-stub man page:
for some reason .uname was listed twice, and .sbat was still missing.
Address that.

Also, let's reorder things to to match the "canonical" ordering we also
use for measurement in sd-stub. The order makes sense and there's really
no reason to depart from that here.

Minor other tweaks.

Reverts b6f2e68602, among other things
2023-09-18 11:13:08 +02:00
Luca Boccassi
23bef849d9
Merge pull request #29119 from yuwata/network-dhcp-server-allow-null-server-address
network/dhcp-server: allow null server address
2023-09-17 12:36:33 +01:00
Tj
ecac48783c doc: Scope is automatic for IPv6 address
The kernel automatically sets the scope of IPv6 addresses. That is
0 (global), 254 (host), 253 (link).
2023-09-15 16:12:11 +02:00
Zbigniew Jędrzejewski-Szmek
d73f8ff95f man/daemon: recommend status notications, mention fd store
This is just a small update. We probably should write a much longer document
that describes how to write a daemon in the XXI century.
2023-09-15 09:16:26 +02:00
Zbigniew Jędrzejewski-Szmek
bb8a3296e8 man/sd_notify: change recommendations about unsupported notifications
In principle, arbitrary notifications may be sent via sd_notify. But in
practice, this is not useful at all, since the manager only accepts
notifications from services and ignores anything except a few specific
ones. The others will be logged if debugging is enabled. OTOH, the manager
produces EXIT_STATUS, but nothing in systemd looks at it, which is rather
confusing.

So remove the recommendation to use X_ prefixes, and instead say that other
messages will be ignored. Also, mention that mkosi uses this. Having an example
may be useful to understand what is going on.

Strangely, this is the first reference to mkosi in our man pages. Even more
strangely, debian is the only place which hosts the mkosi man page (among
the sites we have definitions for), so I linked to that version.
2023-09-15 09:00:23 +02:00
Zbigniew Jędrzejewski-Szmek
67da7e9a4f man: make the description of fd storage a bit more accessible
The text is split into paragraphs about specific topics. The advice
and recommendations parts are moved to the end.
2023-09-15 09:00:23 +02:00
Zbigniew Jędrzejewski-Szmek
ef86486acf man/sd_notify: split out variable descriptions to a separate section
This just moves the text around with miminal text added to refer to the new
section.
2023-09-15 09:00:23 +02:00
Zbigniew Jędrzejewski-Szmek
4454ca1057 man/kernel-install: add more paragraph breaks, fix indentation 2023-09-15 09:00:23 +02:00
Zbigniew Jędrzejewski-Szmek
87cc99332e man: add versioned version of --no-pager, use for systemd-path 2023-09-14 22:33:26 +02:00
Luca Boccassi
e4aab5cf1a logind: add PrepareForShutdownWithMetadata signal
The existing signal doesn't say which type of shutdown is going to happen.
With the introduction of soft-reboot, it is useful to have this information
broadcasted, so that clients can choose to do different things based on the
reboot type.
Add a{sv} as the payload so that more metadata can be added later if
needed, without needing to add yet another signal.
Send both old and new signal for backward compatibility, and send the new
one first so that clients can just wait for the first one on both old and
new systems.
2023-09-11 12:56:00 +01:00
Michal Koutný
055665d596 dbus: Document org.freedesktop.systemd1.Service.MemoryAvailable property
The value is an optimistic estimate, make it clear in the docs.
2023-09-09 10:42:38 +02:00
Alvin Alvarado
a05fa30f88 ukify/man: Look for a config file in systemd folders if not specified
If the user does not specify a config file to use, ukify will try looking for one at {/run,/etc,/usr/local/lib,/usr/lib}/systemd/ukify.conf in order and then use the first one found. Also made sure the --config input is a pathlib.Path by specifying its type in its CONFIG_ITEMS entry.
Big cheers to Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> for helping!
2023-09-08 16:21:28 +02:00
Yu Watanabe
e443a88a9a man: update [DHCPServer] ServerAddress= 2023-09-08 20:03:40 +09:00
наб
ef658a63f8 parse_timestamp: accept RFC3339-style timezone and %FT%R[:%S[.%N]]
We basically parsed the RFC3339 format already, except with a space:
      NOTE: ISO 8601 defines date and time separated by "T".
      Applications using this syntax may choose, for the sake of
      readability, to specify a full-date and full-time separated by
      (say) a space character.
so now we handle both
  2012-11-23 11:12:13.456
  2012-11-23T11:12:13.456
as equivalent.

Parse directly-suffixed Z and +05:30 timezones as well:
  2012-11-23T11:12:13.456Z
  2012-11-23T11:12:13.456+02:00
as they're both defined by RFC3339.

We do /not/ allow z or t; the RFC says
      NOTE: Per [ABNF] and ISO8601, the "T" and "Z" characters in this
      syntax may alternatively be lower case "t" or "z" respectively.

      This date/time format may be used in some environments or contexts
      that distinguish between the upper- and lower-case letters 'A'-'Z'
      and 'a'-'z' (e.g. XML).  Specifications that use this format in
      such environments MAY further limit the date/time syntax so that
      the letters 'T' and 'Z' used in the date/time syntax must always
      be upper case.  Applications that generate this format SHOULD use
      upper case letters.
We /are/ in a case-sensitive environment, neither are in wide-spread
use, and "z" poses an issue of whether "todayz" should be the same
as "todayZ" ("today UTC") or an error (it should be an error).

Fractional seconds are limited to six digits (they're nominally
   time-secfrac    = "." 1*DIGIT
), since we only support 1µs-resolution timestamps, and limit to six
digits in our other sub-second formats.

Parsing
  2012-11-23T11:12
is an extension two ways (no seconds, no timezone),
mirroring our "canonical" format.

Fixes #5194
2023-09-07 17:33:15 +02:00
Luca Boccassi
7d84904925
Merge pull request #29098 from keszybz/man-page-postreview-fixup
man/systemd-id128: fix example
2023-09-06 18:58:27 +01:00
Jan Janssen
400229eaae man: Add new Microsoft CAs to example
Also, let's use the links from the Microsoft documentation as they are
guaranteed to be stable.

Fixes: #29102
2023-09-06 18:56:51 +01:00
Zbigniew Jędrzejewski-Szmek
b477c6949a man/systemd-id128: fix example
The example was supposed to show how
machine-id/new/machine-id --app-specific/show --app-specific tie together, but
the verb was ommitted.

I also extended the explanation a bit and used long option form in the first
example for more clarity. In the second, more complicated example, the
one-letter form is used for brevity.

Noticed in post-review:
b37e8184a5 (r1315678438)
2023-09-06 16:56:40 +02:00
Yu Watanabe
1d5db7b9f3 man: mention DBus interfaces for DHCP clients
Follow-up for #28896.
2023-09-06 06:05:55 +09:00
Yu Watanabe
53dff954d3 network: reorder bus implementations
Otherwise, in the man page, DHCPServer interface is listed in the Link
object.
2023-09-06 06:01:31 +09:00
Abderrahim Kitouni
69106f4742 man: add version information for functions 2023-09-04 19:31:16 +01:00
Susant Sahani
6e8f5e4c1f network: ndisc - Allow to parse PREF64 prefix 2023-09-04 23:41:02 +09:00
Susant Sahani
6a6d27bc5b network: sd-radv - Allow to configure Mobile IPv6 Home Agent 2023-09-04 23:40:40 +09:00
Luca Boccassi
626a9eba09
Merge pull request #28988 from keszybz/sd128-arbitrary-values
Add sd-id128 and systemd-id128 functionality to do "app specific" with any "base"
2023-09-03 14:05:32 +01:00
Zbigniew Jędrzejewski-Szmek
437e217a48 man: add version information
I'm keeping this as a separate commit. It is the first time version
information is manually added after 6a73a4f7c4
and we might want to revert this later.
2023-09-02 14:17:29 +03:00
Zbigniew Jędrzejewski-Szmek
fa96afb4c4 sd-id128: do not allow null 'app_id' param
If it is null, we get the 'base' param unchanged:
$ build/systemd-id128 show 00000000000000000000000000000001 \
  --app-specific=00000000000000000000000000000000
00000000000000000000000000000001

This is not good, because it breaks our promise that the base (usually either
machine-id or boot-id) cannot be derived from the result. Some application
using the library could use a null app id, inadvertently exposing the machine
or boot id. (This could happen because of forgotten initialization, or maybe
because the app id is configurable, and the user configures it wrongly.)

Note: the other way the secret is not exposed:
$ build/systemd-id128 show 00000000000000000000000000000000 \
  --app-specific=00000000000000000000000000000002
4f63080959264900b0d88d999dae2d3a

Normally systemd would not allow a null machine-id or boot-id, but we can let
the user do the calculation that if they want to.
2023-09-02 14:17:29 +03:00
Zbigniew Jędrzejewski-Szmek
b37e8184a5 id128: allow combining --app with show
This effectively exposes sd_id128_get_app_specific() on the commandline.

Fixes https://github.com/systemd/systemd/issues/27514.
2023-09-02 14:17:29 +03:00
Yu Watanabe
c97f268f29 man: mention version info for NFTSet= setting
Follow-up for fc289dd0ad.
2023-09-01 13:29:27 +01:00
Yu Watanabe
1d4c874d3c
Merge pull request #24570 from topimiettinen/nft-sets-v2
network: firewall integration with NFT sets
2023-09-01 20:13:39 +09:00
Luca Boccassi
de6906b1c1
Merge pull request #28999 from keszybz/two-man-ukify-fixe
Make ukify non-experimental
2023-08-29 16:08:49 +01:00
Zbigniew Jędrzejewski-Szmek
f4e518e812 systemd-id128: properly document the show verb
https://github.com/systemd/systemd/issues/27514 requested this functionality
among other things, but it is already implemented. The man page was also
missing 'show' in the synopsis, so add that, along with an example.
2023-08-29 17:06:47 +03:00
Zbigniew Jędrzejewski-Szmek
b5c27ebca4 man: document sd_id128_get_app_specific 2023-08-29 17:06:47 +03:00
Zbigniew Jędrzejewski-Szmek
782902f217 id128: add option -P to only show value
We have '-P' in systemctl with similar meaning.

Partially closes https://github.com/systemd/systemd/issues/27514.
2023-08-29 17:06:47 +03:00
Abderrahim Kitouni
ec07c3c80b man: add version info
This tries to add information about when each option was added. It goes
back to version 183.

The version info is included from a separate file to allow generating it,
which would allow more control on the formatting of the final output.
2023-08-29 14:07:24 +01:00
Zbigniew Jędrzejewski-Szmek
f65aa477d9 ukify: move to /usr/bin and mark as non non-experimental
The notice in the man page is removed and the tool is moved into the $PATH.
A compat symlink is provided.

It is fairly widely used now, and realistically we need to keep backwards
compat or people will be very unhappy.
2023-08-29 15:16:35 +03:00
Zbigniew Jędrzejewski-Szmek
d3f8b754d4 man/ukify: fix synopsis
Fixup for 7d481546ac and
a3f758b310.
2023-08-29 15:16:35 +03:00
Abderrahim Kitouni
4623eecb2f man: Add xinclude namespace
This will be used by the next commit to add version information to the
nodes.
2023-08-28 18:27:10 +01:00
Luca Boccassi
f154440980
Merge pull request #28916 from ddstreet/tpm2_pcr_value_post_merge
Tpm2 pcr value post merge
2023-08-28 17:42:48 +01:00
Michael Vasseur
c91d636fad pkg.m4 macro needs brackets
See documentation at: https://manpages.debian.org/testing/pkgconf/pkg.m4.7.en.html

Without this the macro was not always correctly resolved so the correct command was not used in the rest of the snippet.
2023-08-28 10:07:26 +01:00
Zbigniew Jędrzejewski-Szmek
7abb0eef8f man/gpt-auto-generator: avoid saying "negative" for boolean
Fixes #28928.
2023-08-28 09:46:54 +01:00
Alvin Alvarado
c766e05f29 man: Fix typo in config file example for ukify
or else it would output 'Unknown config setting [UKI] SecureBootCerificate=' or just an error outright if not overrode.
2023-08-27 15:03:49 +08:00
Topi Miettinen
fc289dd0ad
network: firewall integration with NFT sets
New directive `NFTSet=` provides a method for integrating network configuration
into firewall rules with NFT sets. The benefit of using this setting is that
static network configuration or dynamically obtained network addresses can be
used in firewall rules with the indirection of NFT set types. For example,
access could be granted for hosts in the local subnetwork only. Firewall rules
using IP address of an interface are also instantly updated when the network
configuration changes, for example via DHCP.

This option expects a whitespace separated list of NFT set definitions. Each
definition consists of a colon-separated tuple of source type (one of
"address", "prefix", or "ifindex"), NFT address family (one of "arp", "bridge",
"inet", "ip", "ip6", or "netdev"), table name and set name. The names of tables
and sets must conform to lexical restrictions of NFT table names. The type of
the element used in the NFT filter must match the type implied by the
directive ("address", "prefix" or "ifindex") and address type (IPv4 or IPv6)
as shown type implied by the directive ("address", "prefix" or "ifindex") and
address type (IPv4 or IPv6) must also match the set definition.

When an interface is configured with IP addresses, the addresses, subnetwork
masks or interface index will be appended to the NFT sets. The information will
be removed when the interface is deconfigured. systemd-networkd only inserts
elements to (or removes from) the sets, so the related NFT rules, tables and
sets must be prepared elsewhere in advance. Failures to manage the sets will be
ignored.

/etc/systemd/network/eth.network
```
[DHCPv4]
...
NFTSet=prefix:netdev:filter:eth_ipv4_prefix
```

Example NFT rules:
```
table netdev filter {
        set eth_ipv4_prefix {
                type ipv4_addr
                flags interval
        }
        chain eth_ingress {
                type filter hook ingress device "eth0" priority filter; policy drop;
                ip saddr != @eth_ipv4_prefix drop
                accept
        }
}
```
```
$ sudo nft list set netdev filter eth_ipv4_prefix
table netdev filter {
        set eth_ipv4_prefix {
                type ipv4_addr
                flags interval
                elements = { 10.0.0.0/24 }
        }
}
```
2023-08-26 21:37:09 +03:00
Zbigniew Jędrzejewski-Szmek
3b9b33a143
Merge pull request #28913 from keszybz/tmpfs-top-level-dir-mode
systemd-mount: do not create tmpfs mounts with sticky permission bit
2023-08-25 18:36:30 +02:00
Susant Sahani
1925f829ab network: sd-radv - Introduce pref64 support (RFC8781)
Implements: https://datatracker.ietf.org/doc/html/rfc8781

```

[IPv6PREF64Prefix]
Prefix=2003:da8:1:0::/64
ValidLifetimeSec=30m

Frame 16: 126 bytes on wire (1008 bits), 126 bytes captured (1008 bits) on interface veth99, id 0
Ethernet II, Src: 06:c7:41:95:1d:7f (06:c7:41:95:1d:7f), Dst: IPv6mcast_01 (33:33:00:00:00:01)
Internet Protocol Version 6, Src: fe80::4c7:41ff:fe95:1d7f, Dst: ff02::1
Internet Control Message Protocol v6
    Type: Router Advertisement (134)
    Code: 0
    Checksum: 0x0ca0 [correct]
    [Checksum Status: Good]
    Cur hop limit: 0
    Flags: 0x00, Prf (Default Router Preference): Medium
    Router lifetime (s): 1800
    Reachable time (ms): 0
    Retrans timer (ms): 0
    ICMPv6 Option (Source link-layer address : 06:c7:41:95:1d:7f)
    ICMPv6 Option (Prefix information : 2002:da8:1::/64)
    ICMPv6 Option (PREF64 Option)
        Type: PREF64 Option (38)
        Length: 2 (16 bytes)
        0000 0111 0000 1... = Scaled Lifetime: 225
        .... .... .... .001 = PLC (Prefix Length Code): 64 bits prefix length (0x1)
        Prefix: 64:ff9b::

```
2023-08-25 15:13:06 +02:00
Dan Streetman
a11a2e059c cryptenroll: change man page example to remove leading 0x and lowercase hex 2023-08-24 12:35:58 -04:00
Zbigniew Jędrzejewski-Szmek
6d9829e724 man/repart: use <filename> and add missing <para> 2023-08-24 15:45:24 +02:00
Yu Watanabe
80500bb5d4 network/dhcp: make DUIDType= take an arbitrary integer
Closes #26745.
2023-08-24 19:55:27 +09:00
Yu Watanabe
6ed69be98a Revert "network: DHCP6 client- Allow to send manual DUID"
This reverts commits 89e73ce86f and
543d2a4d45.

The commit assign "custom" to fixed DUID type 5. When making DUID fully
configurable, the type number should be also configurable. Also, the
fully custom DUID should be acceptable for DHCPv4.
2023-08-24 19:50:36 +09:00
Zbigniew Jędrzejewski-Szmek
c9c4e599fc
Merge pull request #24175 from medhefgo/meson-feature
meson: Use feature options
2023-08-24 11:19:55 +02:00
Daan De Meyer
799cd3100b repart: Make verity example more useful
Add Minimize= so the size gets calculated correctly and add a verity
signature partition as well for completeness.
2023-08-24 10:43:11 +02:00
Jan Janssen
1e73a64a7a meson: Convert more options to meson features
The semantics for libidn2 and pwquality have changed slightly: We will
pick a preferred one if both are enabled instead of making it an error.
2023-08-23 14:45:02 +02:00
Susant Sahani
b26c345279 network: radv - Allow to send hop limit 2023-08-23 14:06:14 +09:00
Yu Watanabe
856532ef01
Merge pull request #28926 from yuwata/bsod-cleanups
bsod: several cleanups
2023-08-23 12:41:53 +09:00
Susant Sahani
fdc4c67c2a
network/radv: allow to configure the time between retransmitted Neighbor Solicitation (#28888) 2023-08-23 12:37:44 +09:00
Yu Watanabe
c3c885a771 bsod: several cleanups
- add reference to the service unit in the man page,
- fix several indentation and typos,
- replace '(uint64_t) -1' with 'UINT64_MAX',
- drop unnecessary 'continue'.
2023-08-22 23:20:14 +09:00
Yu Watanabe
cf5d2df986 man/rules: update man rules for systemd-tmpfiles-setup-dev-early.service
Follow-up for bb7f485f4b.
2023-08-22 22:58:40 +09:00
Yu Watanabe
9475e23c90 network: several follow-ups for TCP-RTO setting
- rename TCPRetransmissionTimeOutSec= -> TCPRetransmissionTimeoutSec,
- refuse infinity,
- fix the input value verifier (USEC_PER_SEC -> USEC_PER_MSEC),
- use DIV_ROUND_UP() when assigning the value.

Follow-ups for 1412d4a4fe.
Closes #28898.
2023-08-22 15:02:59 +02:00
Zbigniew Jędrzejewski-Szmek
b0edf3a303
Merge pull request #28914 from poettering/boot-poweroff
sd-boot: add quick hotkeys for poweroff/reboot
2023-08-22 14:55:24 +02:00
Zbigniew Jędrzejewski-Szmek
9269296df0 mount-tool: override mode of --tmpfs mounts to (rwxrwxrwx & ~umask)
The kernel default for tmpfs mounts is rwxrwxrwt, i.e. world-writable with the
sticky bit set. This makes sense for /tmp and /var/tmp, but less so for other
directories. Users will not use systemd-mount to mount /tmp and /var/tmp, so
the existing behaviour is surprising. The defaults are overriden to the
same defaults we use for "internal tmpfs mounts", i.e. no sticky bit, nosuid,
nodev, and limits of size=10%, nr_inodes=400k.

--tmpfs is new, so we can modify the behaviour without breaking compatibility.
2023-08-22 12:31:45 +02:00
Yu Watanabe
08801318e8 network: fix log message and man page for HopLimit=
Follow-up for 88c0642358.
Closes #28899.
2023-08-22 12:10:39 +02:00
Lennart Poettering
f6531b11d2 boot: add hotkeys for rebooting/powering off the system from the boot menu
In a an environment with a serial console it's just too useful to
directly reboot/power off the machine without any further tooling.
2023-08-22 11:29:36 +02:00
Lennart Poettering
1126841553 man: mention two more things logind does
Prompted by: #28902
2023-08-21 23:15:57 +02:00
Zbigniew Jędrzejewski-Szmek
52a1e91e96 mount-tool,man: reword comments and error messages
We were consistenly using --umount everywhere, but add a comment to make this
clearer. Also, reword a few things for clarity.
2023-08-21 20:47:17 +02:00
Luca Boccassi
2322c6c735 sd-mount: allow creating tmpfs
Mount units can do it, but the command line tool cannot, as it needs a
valid 'what'. If --tmpfs/-T if passed, parse the argument as 'where'
and send a literal 'tmpfs' as the 'what' if not specified.
2023-08-21 11:45:15 +02:00
Susant Sahani
9175002864 network: ndisc - Allow to use ICMP6 rate limit from received RA 2023-08-21 11:14:42 +02:00
Mathieu Tortuyaux
41712cd1c0 sysext: support EXTENSION_RELOAD_MANAGER metadata
This metadata (EXTENSION_RELOAD_MANAGER) can be set to "1" to reload the manager
when merging/refreshing/unmerging a system extension image. This can be useful in case the sysext
image provides systemd units that need to be loaded.

With `--no-reload`, one can deactivate the EXTENSION_RELOAD_MANAGER metadata interpretation.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2023-08-21 11:13:54 +02:00
Susant Sahani
88c0642358 network: static route - Allow to configure per route hop liimt 2023-08-18 14:46:37 +05:30
Luca Boccassi
f9e653cfb7
Merge pull request #28870 from ssahani/rto-min-network
network: Route - allow to set TCP RTO
2023-08-18 09:23:45 +01:00
Luca Boccassi
eb2f0b2b3a
Merge pull request #28846 from ssahani/custom-duid-dhcp4-26745
network: DHCP6 client- Allow to send manual DUID
2023-08-18 09:23:30 +01:00
Luca Boccassi
b24d10e35a
Merge pull request #28697 from 1awesomeJ/new_bsod
systemd-bsod: Add "--continuous" option
2023-08-18 00:20:04 +01:00
Daan De Meyer
47838b55c8 dissect: Set SYSTEMD_DISSECT_DEVICE to path of loop device
For some use cases we want to operate on the loop device that
systemd-dissect has attached the loop device to, so let's make that
easily accessible.
2023-08-17 20:36:51 +02:00
Susant Sahani
89e73ce86f network: DHCP6 client- Allow to send manual DUID
```
[DHCPv6]
DUIDType=custom
DUIDRawData=00:00:ab:11:f9:2a:c2:77:29:f9:5c:00
```

```
Client Identifier
    Option: Client Identifier (1)
    Length: 12
    DUID: 0000ab11f92ac27729f95c00
    DUID Type: Unknown (0)
```
2023-08-17 23:52:22 +05:30
Susant Sahani
1412d4a4fe network: Route - allow to set TCP RTO 2023-08-17 23:47:13 +05:30
OMOJOLA JOSHUA
77d0917ea3 systemd-bsod: Add "--continuous" option 2023-08-17 13:13:54 +01:00
Maanya Goenka
d07246a621 documentation: add man page data for confext 2023-08-16 19:19:44 +01:00
Mike Yuan
8d6791d2aa journalctl: support --lines=+N for showing the oldest N entries
After f582695107, the wrong behavior
occurred when --since= and --lines= are both specified is fixed.
However, it seems that the old behavior is already being somewhat
widely used, and the function itself makes sense, i.e. to allow --lines=
to output the first N journal entries.

Therefore, let's support prefixing the number for --lines= with '+',
and provide such functionality.

Related: #28746
2023-08-16 14:05:19 +02:00
Michael A Cassaniti
c380047bf4 repart: Add verity configuration section and options 2023-08-15 15:32:09 +01:00
Daan De Meyer
440f805c17 repart: Add Subvolumes= setting
This setting indicates which directories in the target partition
should be btrfs subvolumes. If set, we'll try to create these
directories as subvolumes.

Note that this only works when running as root without --offline,
as mkfs.btrfs does not support creating subvolumes.
2023-08-14 18:46:08 +02:00
Rahil Bhimjiani
f5263dd09e man: kernel-install(8) add uki.conf in FILES & add ukify(1) in SEE ALSO
Signed-off-by: Rahil Bhimjiani <rahil3108@gmail.com>
2023-08-12 11:24:43 +01:00
Yu Watanabe
353c8497b1
Merge pull request #28784 from yuwata/udev-vs-tmpfiles-take-3
Udev vs tmpfiles take 3
2023-08-12 13:12:10 +09:00
Luca Boccassi
e17076b9f0 man: systemd-repart can now create filesystems, update manpage 2023-08-12 00:06:07 +01:00
Yu Watanabe
bb7f485f4b units: introduce systemd-tmpfiles-setup-dev-early.service
This makes tmpfiles, sysusers, and udevd invoked in the following order:
1. systemd-tmpfiles-setup-dev-early.service
   Create device nodes gracefully, that is, create device nodes anyway
   by ignoring unknown users and groups.
2. systemd-sysusers.service
   Create users and groups, to make later invocations of tmpfiles and
   udevd can resolve necessary users and groups.
3. systemd-tmpfiles-setup-dev.service
   Adjust owners of previously created device nodes.
4. systemd-udevd.service
   Process all devices. Especially to make block devices active and can
   be mountable.
5. systemd-tmpfiles-setup.service
   Setup basic filesystem.

Follow-up for b42482af90.

Fixes #28653.
Replaces #28681 and #28732.
2023-08-12 07:55:20 +09:00
Lennart Poettering
579fbe5b78 man: don't claim BindPaths= file systems would remain "in memory", they are just kept "mounted"
Follow-up for: 947d836a6e

(I guess in the original patch authors usecase the root fs actually
*does* remain in memory, but that's a special case and does not belong
in the man pages this way).
2023-08-11 15:41:53 +01:00
Daan De Meyer
9a441937e1
Merge pull request #28766 from DaanDeMeyer/repart-copy-from
repart: Allow specifying --copy-from more than once
2023-08-11 14:51:24 +02:00
Daan De Meyer
e1536d1fb0 repart: Allow specifying --copy-from more than once
Definitions will be synthesized from each of the given images.
2023-08-11 11:05:31 +02:00
Lennart Poettering
bf77d59772 vconsole-setup: use "@kernel" rather than "kernel" as special string to leave keymap untouched
This is a magic string, and we should avoid stepping into the territory
of normal keymap names with that, given that users can pick names
otherwise freely.

Hence, prefix the name with a special char to avoid any namespace
issues.

Follow-up for: #28660
2023-08-11 04:17:57 +09:00
Yu Watanabe
09256904ed
Merge pull request #28760 from poettering/coredump-tweaks
coredump: minor tweaks/modernizations
2023-08-11 04:16:31 +09:00
Lennart Poettering
a06c92eb48 sd-event: explicit document what to do with epoll-incompatible fds 2023-08-10 15:02:03 +02:00
Lennart Poettering
e5e900edcd man: let's tone down the recommendation to use Type=exec a bit
This is a follow-up for #28596.

I think the suggestion to use Type=exec uses too strong wording:
Type=exec has non-trivial drawbacks over Type=simple, and they deserve
to be mentioned.

Hence drop the <emphasis> and turn this around so that Type=exec is
*recommended*, but Type=simple is not expressly discouraged, because
there are plenty reasons to use it.

Add a brief discussion where Type=simple might be preferable.

Also, fix the outright unruth that Type=exec was the "simplest and
fastest", because it certainly is a lot, but not that.
2023-08-10 14:41:14 +02:00
Daan De Meyer
4152fd46bb
Merge pull request #28756 from DaanDeMeyer/repart-fix
repart --copy-from followups
2023-08-10 14:36:02 +02:00
Lennart Poettering
85ec1b6efa coredump: explicitly document that in order to process a coredump we have to write it to disk first
Prompted by: #28740
2023-08-10 12:09:15 +02:00
Daan De Meyer
39b4649fc1 repart: Reword --copy-from docs 2023-08-10 10:46:14 +02:00
Yu Watanabe
7a05926fbe udev: re-introduce symlinks for loopback block device
But the directories are changed from /dev/loop/by-ref/ -> /dev/disk/by-loop-ref/
and /dev/loop/by-inode/ -> /dev/disk/by-loop-inode/.
As /dev/loop/ is used by losetup command for other purpose.
See issue #28475.

This effectively reverts commits 9915cc6086,
5022fab15f, and
c0d998248e.
2023-08-10 07:05:47 +09:00
Lennart Poettering
0de0ed6e89 bootctl: don't advertise systemd-efi-options in --help/man anymore
The command is deprecated, as per NEWS of 254. Let's go one step further
and remove it from the help text and man page, so that people are not
inspired to use it at this time anymore.

This is how we usually have done this before: remove it from visibility,
but support it for a while still.
2023-08-09 14:25:46 +02:00
Yu Watanabe
9289e093ae meson: use install_emptydir() and drop meson-make-symlink.sh
The script is mostly equivalent to 'mkdir -p' and 'ln -sfr'.
Let's replace it with install_emptydir() builtin function and
inline meson call.
2023-08-08 22:11:34 +01:00
mordner
653c90ec0e man: fix typo in journalctl 2023-08-08 22:05:10 +02:00
Yu Watanabe
7b5ca134a5 man: update document about the maximum number of child processes 2023-08-05 15:40:02 +09:00
Mike Yuan
804c6397bc man/systemd: avoid duplicate variable name 2023-08-05 15:05:10 +09:00
Luca Boccassi
06e8f7af7b
Merge pull request #28398 from ddstreet/tpm2_specify_pcr_value
Tpm2 specify pcr value
2023-08-04 21:04:03 +01:00
Dan Streetman
1782b0b88c man: update systemd-cryptenroll man page with details on --tpm2-pcrs format change
The previous commit extended the accepted format of --tpm2-pcrs to allow
specifying the hash algorithm (i.e. PCR bank) and hash digest value, this
updates the man page with those changes.
2023-08-04 11:20:31 -04:00
Mike Yuan
83d373d213
man/systemd.unit: DefaultTimeoutStartSec= -> DefaultDeviceTimeoutSec=
for device unit job timeouts

Follow-up for #24044
2023-08-04 20:53:02 +08:00
Antonio Alvarez Feijoo
000680a68d man/systemd-fsck@.service: clarify passno and noauto combination in /etc/fstab
Fixes #28657
2023-08-04 11:33:18 +01:00
OMOJOLA JOSHUA
fc7eb1325b Add tool to display emergency log message full-screen on boot failure. 2023-08-04 00:24:54 +01:00
Mike Yuan
ef7f5baae8 vconsole: support KEYMAP=kernel for preserving kernel keymap
Follow-up for #26089 and #28505

Currently, if default-keymap is not empty, there's no way
to ask vconsole-setup to retain the kernel keymap. Let's
accept a special value "kernel" for that purpose.

Addresses the problem mentioned in https://github.com/systemd/systemd/pull/28505#issuecomment-1663681665
2023-08-04 02:20:39 +09:00
Daan De Meyer
1e46985a60 repart: Add --copy-from option
--copy-from synthesizes partition definitions from the given image
which are then applied to the repart algorithm. In its most basic
form, this allows copying an image to another device but it can
also be combined with --definitions to copy + add partitions in the
same call to repart.
2023-08-03 11:12:25 +02:00
Daan De Meyer
86320e626c Revert "repart: Allow combining CopyBlocks= and CopyFiles="
This reverts commit dea0dc7ba2.
2023-08-01 15:12:24 +02:00
Daan De Meyer
7e81a84448 Revert "repart: Add --oem and OEM="
This reverts commit 47c7805579.
2023-08-01 15:10:24 +02:00
Daan De Meyer
47c7805579 repart: Add --oem and OEM=
--oem can be used to only install OEM partitions (usr, verity,
verity-sig, ...). OEM= is used to indicate OEM partitions. If unset,
defaults to !FactoryReset. We also add a credential repart.oem to
allow configuring --oem via a credential.
2023-08-01 07:53:50 +02:00
Daan De Meyer
dea0dc7ba2 repart: Allow combining CopyBlocks= and CopyFiles=
Let's allow the combination of these two options. When used, repart
will first try to apply the CopyBlocks= behavior. If that's not possible,
it falls back to the CopyFiles= behavior.

This is a first step in being able to also use the partition definition
files shipped in the image to build the image in mkosi instead of having
a separate set of repart definition files to build the image.
2023-08-01 07:53:34 +02:00
Luca Boccassi
b173b8186f
Merge pull request #28596 from keszybz/doc-updates
Two documentation updates
2023-07-31 11:11:11 +01:00
Zbigniew Jędrzejewski-Szmek
377d3a31e6 man/systemd.service: advise Type=exec instead of Type=simple
The descriptions of various options are reworked: first say what protocol
actually is, i.e. describe what type of notification the manager waits
for. Only after that describe various steps and things the service should
do. Also, apply some paragraph breaks.

Instead of recommending Type=simple, recommend Type=exec. Say explicitly that
Type=simple, Type=forking are not recommended. Type=simple ignores failure in a
way that doesn't make any sense except as a historical accident. We introduced
'exec' instead of changing 'simple' to keep backwards-compatiblity, but
'simple' is not very useful. 'forking' works, but is inefficient: correctly
programming the interface requires a lot of work, and at runtime, the
additional one or two forks are just a waste of CPU resources. Furthermore, we
now understand that because of COW traps, they may also increase memory
requirements. There is really no reason to use 'forking', except if it's
already implemented and the code cannot be changed to use 'notify'.

Also, remove the recommendations to use Type=simple to avoid delaying boot. In
most cases, if the service can support notifications about startup, those
should be done.

Overall, for new services, "notify", "notify-reload", and "dbus" are the
types that make sense.
2023-07-31 11:23:36 +02:00
Kiran Vemula
bc837621a3 resolved: added show-server-state verb and DumpStatistics varlink method
Added show-server-state verb to resolvectl
Added DumpStatistics and ResetStatistics  methods to varlink
2023-07-31 02:02:03 +09:00
Susant Sahani
f141b2c053 network: ndisc - Honour CurHopLimit
RFC4861 Neighbor Discovery – Sections 4.2 and 6.3.4

From section 4.2. Router Advertisement Message Format:

Cur Hop Limit        8-bit unsigned integer.  The default value that
                     should be placed in the Hop Count field of the IP
                     header for outgoing IP packets.  A value of zero
                     means unspecified (by this router).
2023-07-30 14:37:21 +01:00
Yu Watanabe
d8f19e03c0 network,dhcp: drop support of ClientIdentifier=duid-only
The setting has not been never worked, not tested, and should not been
used. As the option is RFC incompliant. Let's drop it.

Closes #25562.
2023-07-29 18:51:09 +09:00
Luca Boccassi
b739b46919
Merge pull request #28391 from ssahani/rp-filter
networkd: allow setting rp_filter for an interface
2023-07-28 21:59:04 +01:00
Luca Boccassi
b0d3095fd6 Drop split-usr and unmerged-usr support
As previously announced, execute order 66:

https://lists.freedesktop.org/archives/systemd-devel/2022-September/048352.html

The meson options split-usr, rootlibdir and rootprefix become no-ops
that print a warning if they are set to anything other than the
default values. We can remove them in a future release.
2023-07-28 19:34:03 +01:00
Susant Sahani
9c72e8f8bc networkd: allow setting rp_filter for an interface 2023-07-28 14:38:27 +05:30
Luca Boccassi
afe7026511
Merge pull request #28335 from ssahani/dhcp4-route-option
network: DHCP4 allow to set InitialCongestionWindow and InitialAdvert…
2023-07-28 09:57:19 +01:00
Luca Boccassi
1a1a691ba7
Merge pull request #27621 from esposem/ukify_read
ukify: add an option to read the PE sections
2023-07-28 09:55:03 +01:00
Luca Boccassi
22c5593c90
Merge pull request #28518 from yuwata/fstab-generator-fixes
fstab-generator: fixes for systemd.mount-extra=
2023-07-27 18:47:41 +01:00
Erik Sjölund
6870daff03 man: fix typos 2023-07-27 09:54:43 +01:00
Yu Watanabe
45c535ddb0 fstab-generator: add rd.systemd.mount-extra= and friends
Previously, mounts specified in systemd.mount-extra= are equally handled
both in initrd and the main system. So, the mounts for the main system
are also mounted in initrd.

This introduces rd.systemd.mount-extra=, which specifies mounts in initrd.
Then, mounts specified in systemd.mount-extra= are still mounted both in
initrd and the main system, but prefixed with /sysroot/ when running in
initrd.

Fixes #28516.
2023-07-27 00:50:01 +09:00
Luca Boccassi
b41ab9b3f4 softreboot: ensure all processes are killed
Having surviving processes is not ready yet as a feature, so ensure
everything is killed on the transition for now
2023-07-24 10:45:28 +01:00
Luca Boccassi
3835b9aa4b Revert "core: add IgnoreOnSoftReboot= unit option"
The feature is not ready, postpone it

This reverts commit b80fc61e89.
2023-07-22 23:27:27 +01:00
Luca Boccassi
686b983040
Merge pull request #26541 from DaanDeMeyer/xfs-whitespace-fix
mkfs-util: Escape spaces with slashes in protofile format
2023-07-21 18:58:27 +01:00
Luca Boccassi
b80fc61e89 core: add IgnoreOnSoftReboot= unit option
As it says on the tin, configures the unit to survive a soft reboot.
Currently all the following options have to be set by hand:

Conflicts=reboot.target kexec.target poweroff.target halt.target
Before=reboot.target kexec.target poweroff.target halt.target
After=sysinit.target basic.target
DefaultDependencies=no
IgnoreOnIsolate=yes

This is not very user friendly. If new default dependencies are added,
or new shutdown/reboot types, they also have to be added manually.

The new option is much simpler, easy to find, and does the right thing
by default.
2023-07-21 18:05:41 +02:00
Zbigniew Jędrzejewski-Szmek
03d298e1e5
Merge pull request #28460 from bluca/scope_run_env
run: disable --expand-environment by default for --scope
2023-07-21 15:41:56 +02:00
Daan De Meyer
776be5964d mkfs-util: Escape spaces with slashes in protofile format 2023-07-21 15:35:50 +02:00
Yu Watanabe
dc3b5e0432 tree-wide: fix typo found by Fossies Codespell report 2023-07-21 19:12:08 +09:00
Yu Watanabe
c0d998248e tree-wide: drop references to /dev/loop/by-ref
Follow-up for #28476.
2023-07-21 10:24:20 +09:00
Luca Boccassi
8167c56bfa run: disable --expand-environment by default for --scope
The intention was to have this option enabled by default everywhere,
but unfortunately at least one case was found where it breaks
compatibility of a program using systemd-run --scopes and expecting
variables not to be expanded:

https://sources.debian.org/src/pbuilder/0.231/pbuilder-checkparams/#L400

Example run:

systemd-run --quiet --scope --description=pbuilder_build_xfce4-notes-plugin_1.10.0-1.dsc '--slice=system-pbuilder-build-xfce4\x2dnotes\x2dplugin_1.10.0\x2d1-449932.slice' chroot /var/cache/pbuilder/build/449932 dpkg-query -W '--showformat=${Version}' apt

Restore backward compatibility and make the option disabled by default
when --scope is used, and enabled by default for other types.

In case --expand-environment is not specified and a '$' character is
detected, print a warning to nudge users toward specifying the
parameter as needed. In the future we can then flip the default.

Follow-up for 2ed7a221fa
2023-07-20 17:37:27 +01:00
Zbigniew Jędrzejewski-Szmek
e51846adc0 man: clarify DNSSEC= again
https://github.com/systemd/systemd/pull/28407#issuecomment-1640900239
2023-07-19 15:13:01 +02:00
Luca Boccassi
7177c9022e
Merge pull request #28445 from bluca/run_host_release
core: copy the host's os-release for /run/host/os-release
2023-07-19 09:34:06 +01:00
Luca Boccassi
947d836a6e man: explicitly note that units surviving soft-reboot should not pin resources 2023-07-18 17:26:02 +01:00
Luca Boccassi
3f37a82545 core: copy the host's os-release for /run/host/os-release
Currently for portable services we automatically add a bind mount
os-release -> /run/host/os-release. This becomes problematic for the
soft-reboot case, as it's likely that portable services will be configured
to survive it, and thus would forever keep a reference to the old host's
os-release, which would be a problem because it becomes outdated, and also
it stops the old rootfs from being garbage collected.

Create a copy when the manager starts under /run/systemd/propagate instead,
and bind mount that for all services using RootDirectory=/RootImage=, so
that on soft-reboot the content gets updated (without creating a new file,
so the existing bind mounts will see the new content too).

This expands the /run/host/os-release protocol to more services, but I
think that's a nice thing to have too.

Closes https://github.com/systemd/systemd/issues/28023
2023-07-18 17:26:02 +01:00
Zbigniew Jędrzejewski-Szmek
7e90814f0a Deprecate efivar SystemdOptions
As mentioned in the NEWS entry, it seems to see very little use, but adds
complexity in our code. It was added mainly with the goal of making it easier
for people using grub2 to modify their boot configuration, but grub2 is gaining
support for BLS snippets. On the systemd side, we now have credentials. So
let's deprecate this, and if there's no outcry, remove it in a few releases.
2023-07-18 17:30:06 +02:00
Petr Menšík
96d384ca4f Include in manual what DNSSEC=no means in detail
https://www.rfc-editor.org/rfc/rfc4035.html#section-3.2.1 says
security-aware recursive name server MUST set DO bit when sending
requests. systemd-resolved does not do that by design. State it more
clearly in manual page. Unlike other implementations it disables not
only validation as it stated, but complete DNSSEC awareness.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
2023-07-18 17:28:32 +02:00
Emanuele Giuseppe Esposito
7d481546ac man/ukify: describe 'inspect'
Co-authored-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
2023-07-15 19:43:57 +02:00
Susant Sahani
cb35a0d43e network: DHCP4 allow to set InitialCongestionWindow and InitialAdvertisedReceiveWindow 2023-07-15 19:24:27 +05:30
Luca Boccassi
9027aff9d4
Merge pull request #27867 from keszybz/vconsole-reload-again
Restore ordering between vconsole-setup and firstboot services
2023-07-14 23:06:18 +01:00