Commit graph

7736 commits

Author SHA1 Message Date
Lennart Poettering e40cad1f3c
Merge pull request #28243 from bluca/sbat_initrd
ukify: enable --sbat for UKIs too
2023-07-06 10:21:44 +02:00
Lennart Poettering 4560f9821b meson: run forgotten 'update-man-rules' 2023-07-05 23:18:16 +02:00
Luca Boccassi a8b645dec8 ukify: enable --sbat for UKIs too
For confidential computing they want to be able to revoke initrds too, so allow
passing a specific --sbat section when building a UKI too, not just an addon.
Merge it with the stub and kernel sections.
2023-07-05 21:31:08 +01:00
Mike Yuan 3121374ca4
Merge pull request #28252 from yuwata/journal-open-machine
journal: introduce journal_open_machine()
2023-07-06 03:08:18 +08:00
Yu Watanabe 4a45a2e0e3 sd-journal: introduce SD_JOURNAL_TAKE_DIRECTORY_FD flag for sd_journal_open_directory_fd()
If it is called with the flag, then the provided file descriptor will be
owned by the sd_journal object, and will be closed in sd_journal_close().
2023-07-06 00:06:20 +09:00
Lennart Poettering 529ba8a1a3
Merge pull request #26844 from YHNdnzj/propagate-stop-fixup
core: introduce UNIT_ATOM_PROPAGATE_STOP_GRACEFUL for PropagatesStopTo=
2023-07-05 15:56:21 +02:00
Mike Yuan e9bd185316
man/systemctl: document --job-mode=restart-dependencies
Follow-up for 09d04ad325
2023-07-05 08:15:34 +08:00
Lennart Poettering de70ecb328 import-creds: add support for binary credentials specified on the kernel cmdline 2023-07-04 23:19:48 +02:00
Lennart Poettering 49850c1ee3 man: document where PID 1 imports credentials from 2023-07-04 23:18:59 +02:00
Lennart Poettering 771c76294a man: document how credentials are passed into generators 2023-07-04 23:18:11 +02:00
Lennart Poettering cdd133b3dd getty-generator: allow configuring additional gettys via credentials 2023-07-04 23:11:03 +02:00
Lennart Poettering 6ac62485cf fstab-generator: optional read addtional fstab lines from credentials
Fixes: #27260
2023-07-04 23:06:48 +02:00
Lennart Poettering deb0d489ea core: consult credentials for machine ID to use for host
Let's hook up one more thing with credentials: the machine ID to use
when none is initialized yet.

This requires some reordering of initialization steps in PID 1: we need
to import credentials first, and only then initialize the machine ID.
2023-07-04 23:01:42 +02:00
Lennart Poettering 0dea5b7719 import-creds: define a new dir where initrd configurators can pass credentials to host 2023-07-04 22:59:07 +02:00
Lennart Poettering 8914f7e8e4 man: make sure credentials properly show up in directives index 2023-07-04 22:56:59 +02:00
Igor Tsiglyar 9f6e0bd417 journal-remote: upload journals from namespace 2023-07-04 18:47:54 +01:00
Lennart Poettering c86a95082b systemctl: implement a new "whoami" verb, that just returns unit of caller/PID 2023-07-04 01:05:02 +01:00
Yu Watanabe 86c2a76e09
Merge pull request #28132 from rpigott/dhcp-captive-portal
Implement RFC8910: captive portal dhcp options
2023-07-03 14:51:56 +09:00
Zbigniew Jędrzejewski-Szmek da89046643 tree-wide: "<n>bit" → "<n>-bit"
In some places, "<n> bits" is used when more appropriate.
2023-07-02 11:10:12 +01:00
Ronan Pigott d74c4ce103 network: Introduce UseCaptivePortal IPv6RA option
Accepts a boolean. When enabled retains captive portal configuration
advertised by the router.
2023-07-02 01:13:43 -07:00
Ronan Pigott a75feb554b network: Introduce UseCaptivePortal DHCPv6 option
Acepts a boolean. When enabled requests and retains captive portal
configuration from the DHCPv6 server.
2023-07-02 01:13:43 -07:00
Ronan Pigott edb88a7201 network: Introduce UseCaptivePortal DHCPv4 option
Accepts a boolean. When enabled, UseCaptivePortal will request and
retain the captive portal configuration from the DHCP server.
2023-07-02 01:13:43 -07:00
Luca Boccassi cc5afe481e
Merge pull request #28187 from bluca/sbat
ukify: merge .sbat sections from stub and kernel
2023-06-30 21:55:58 +01:00
Lennart Poettering 95dafd30da battery-check: rework unit
Let's rename the unit to systemd-battery-check.service. We usually want
to name our own unit files like our tools they wrap, in particular if
they are entirely defined by us (i.e. not just wrappers of foreign
concepts)

While we are at it, also hook this in from initrd.target, and order it
against initrd-root-device.target so that it runs before the root device
is possibly written to (i.e. mounted or fsck'ed).

This is heavily inspired by @aafeijoo-suse's PR #28208, but quite
different ;-)
2023-07-01 03:19:16 +08:00
Luca Boccassi d5f91cf793 boot: measure .sbat section
We are now merging .sbat sections from sd-stub and kernel image, so
measure it in PCR11.
2023-06-30 17:17:56 +01:00
Luca Boccassi c3f7501c4d ukify: merge .sbat sections from stub and kernel
If the kernel contains a .sbat section (they should start soon) then merge
it with the stub's so that revocations can apply to either component.

Fixes https://github.com/systemd/systemd/issues/27866
2023-06-30 17:17:56 +01:00
Ivan Vecera 88d2bda812 udev-builtin-net_id: align VF representor names with VF names
Certain cards support to set their eswitch to switchdev mode. In this
mode for each created VF there is also created so called VF representor.
This representor is helper network interface used for configuration of
mentioned eswitch and belongs to an appropriate PF.

VF representors are identified by the specific value of phys_port_name
attribute and the value has format "pfMvfN" where M is PF function
number and N is VF number inside this PF.

As the VF representor interfaces belong to PF PCI device the naming
scheme used for them is the same like for other PCI devices. In this
case name of PF interface is used and phys_port_name suffix is appended.

E.g.
 PF=enp65s0f0np0 # phys_port_name for PF interface is 'p0'
 VF=enp65s0f0np0v0 # v0 is appended for VF0 in case of NAMING_SR_IOV_V
REP=enp65s0f0np0pf0vf0 # phys_port_name for VF0 representor is 'pf0vf0'

First as the phys_port_name for representors is long (6+ chars) then the
generated name does not fit into IFNAMSIZ so this name is used only as
alternate interface name and for the primary one is used generic one
like eth<N>. Second 'f0' and 'pf0' in REP name is redundant.

This patch fixes this issue by introducing another naming scheme for VF
representors and appending 'rN' suffix to PF interface name for them.
N is VF number so the name used for representor interface is similar to
VF interface and differs only by the suffix.

For the example above we get:
 PF=enp65s0f0np0
 VF=enp65s0f0np0v0
REP=enp65s0f0np0r0

This eases for userspace to determine which representor interface
represents particular VF.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2023-06-29 22:18:05 +01:00
Luca Boccassi 3a6a93220a
Merge pull request #28191 from yuwata/network-ipv6-privacy-extensions
network: introduce global setting for IPv6 privacy extensions
2023-06-29 22:16:10 +01:00
Lennart Poettering eb99c45914 man: add brief smbios-type-11 man page 2023-06-29 22:13:11 +01:00
Lennart Poettering 452cfd983f man: document vmm.notify_socket credential in systemd(1) man page
Let's move the long explanation to the man page of the component that
interprets the credential, and keep only a brief summary in
systemd.system-credentials(7).
2023-06-29 22:11:41 +01:00
Yu Watanabe 932ef6ecd4 network: add global setting for IPv6PrivacyExtensions=
Closes #28186.
2023-06-29 21:40:47 +09:00
Yuxiang Zhu b67e8a4e3e
network: Add IgnoreDdontFragment= option for Fragmentation control (#28131)
From `ip-link(8)`:
> [no]ignore-df - enables/disables IPv4 DF
                      suppression on this tunnel.  Normally datagrams
                      that exceed the MTU will be fragmented; the
                      presence of the DF flag inhibits this, resulting
                      instead in an ICMP Unreachable (Fragmentation
                      Required) message.  Enabling this attribute causes
                      the DF flag to be ignored.

If this option is enabled for a GRE/GRETAP tunnel, the `DF` flag in the outer IP header
will not inherit the inner IP header's `DF` flag.

This is useful to transfer packets that exceed the MTU of the underlay
network.
2023-06-29 12:11:52 +02:00
Alexander Krabler 9d5c20657a man: Extend journalctl color information
Add sentence about colored warning messages in journalctl.
2023-06-29 10:10:09 +02:00
Yu Watanabe be994c2640 battery-check: several follow-ups
Follow-ups for e3d4148d50.

- add reference to initrd-battery-check.service in man page, and move
  its section from 1 to 8,
- add link to man page in help message,
- introduce ERRNO_IS_NO_PLYMOUTH(),
- propagate error in battery_check_send_plymouth_message(),
- rename battery_check_send_plymouth_message() -> plymouth_send_message(),
- return earlier when the first battery level check passed to reduce
  indentation,
- fix potential use of invalid fd on battery restored,
- do not use emoji for /dev/console,
- add simple test (mostly for coverity),

etc, etc...
2023-06-29 15:41:00 +09:00
Lennart Poettering b50aadaff2 tmpfiles: teach tmpfiles the new XDG_STATE_HOME variable too 2023-06-28 22:13:13 +02:00
Lennart Poettering cc8fdd5d30 man: properly close XML tags 2023-06-28 22:12:03 +02:00
Lennart Poettering fa1d34825a man: rebreak lines in file-hierarchy(7) a bit
(Does not change a single word, just rebreaks a bunch of paragraphs
matching our current line breaking rules)
2023-06-28 22:11:06 +02:00
Franklin Yu b4d6bc63e6 man: mention the newly-added XDG_STATE_HOME
The description is copied from config-home.

Taken from: #27795
2023-06-28 22:10:18 +02:00
Lennart Poettering f9c91932b4 execute: add support for XDG_STATE_HOME for placing service state data in --user mode
This adds support for the new XDG_STATE_HOME env var that was added to
the xdg basedir spec. Previously, because the basedir spec didn't know
the concept we'd alias the backing dir for StateDirectory= to the one
for ConfigurationDirectory= when runnin in --user mode. With this change
we'll make separate. This brings us various benefits, such as proper
"systemctl clean" support, where we can clear service state separately
from service configuration, now in user mode too.

This does not come without complications: retaining compatibility with
older setups is difficult, because we cannot possibly identitfy which
files in existing populated config dirs are actually "state" and which
one are true" configuration.

Hence let's deal with this pragmatically: if we detect that a service
that has both dirs configured only has the configuration dir existing,
then symlink the state dir to the configuration dir to retain
compatibility.

This is not great, but it's the only somewhat reasonable way out I can
see.

Fixes: #25739
2023-06-28 22:01:55 +02:00
Lennart Poettering 9a653235d1 sd-path: add support for XDG_STATE_HOME 2023-06-28 21:55:33 +02:00
Lennart Poettering 5e4c66450c
Merge pull request #27830 from 1awesomeJ/initrd
PID1: Detect battery level in initrd and if low refuse continuing to …
2023-06-28 19:18:03 +02:00
Lennart Poettering f70c90f5ca analyze: add new "pcrs" verb
It shows the PCRs we know about along with their name strings and
current values.
2023-06-28 16:50:50 +02:00
OMOJOLA JOSHUA e3d4148d50 PID1: detect battery level in initrd and if low refuse continuing to boot, print message and shut down. 2023-06-28 14:48:54 +01:00
Lennart Poettering 5d97475b27 sysv-generator: deprecate even more
Let's add a comment about the deprecation to the docs, and as comment to
the sources.

Follow-up for: #28179
2023-06-28 10:39:06 +01:00
Lennart Poettering a27e6fb71b man: rework BPFForeign= documentation a bit
Various assorted changes, among them make clear that a missing BPF
program is not reason to abort unit activation.
2023-06-26 13:16:11 +02:00
Mike Yuan 9deeca1275
hibernate-resume: support resuming through efivar HibernateLocation 2023-06-24 00:04:32 +08:00
Mike Yuan 760e99bb52
hibernate-resume: rework to follow the logic of sleep.c and use
main-func.h

Preparation for #27247
2023-06-23 23:57:49 +08:00
Antonio Alvarez Feijoo 191b891bf1 man: fix references to gethostname/sethostname 2023-06-23 23:38:05 +08:00
Frantisek Sumsal dc7e580e64 tree-wide: use https for the 0pointer.de doc links 2023-06-23 13:46:56 +01:00
Lennart Poettering e6421b6ccd man: correct and extend JournalSizeMax=
The man page claimed the default was 10M, but that's not true, it's
767M.

Also mention there's no point in increasing it further.

See: #26748
2023-06-23 09:49:41 +02:00