Commit graph

6621 commits

Author SHA1 Message Date
Yu Watanabe 902bbdc4b6 network: use scope link for direct unicast routes by default
Strictly speaking, this breaks the backward compatibility, but I guess
in most cases people already sets Scope=link for such routes.

This behavior matches with how 'ip route' command adds such route by
default.

Prompted by https://twitter.com/jplitza/status/1480500562391179270.
2022-01-13 22:46:52 +00:00
Zbigniew Jędrzejewski-Szmek ffb8c82715
Merge pull request #22092 from keszybz/docs-links
Add more doc pages, adjust links, add explanatory headers to examples and relax license to CC-0
2022-01-12 16:06:39 +01:00
Zbigniew Jędrzejewski-Szmek 717e92ceb9 man+docs: adjust links to the new page 2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek 931bc1957b docs: use https:// for fd.o links 2022-01-12 16:05:59 +01:00
Luca Boccassi e80b51dad2
Merge pull request #22043 from medhefgo/boot-bitlocker
boot: Add BitLocker TPM key sealing workaround
2022-01-12 13:05:30 +00:00
Jan Janssen 68a06b3cdf meson: Add check argument to remaining run_command() calls 2022-01-11 14:56:30 +01:00
lincoln auster a1a03fa54b
sd-bus/man: document EBUSY error in bus_message_read (#21954)
* sd-bus/man: document EBUSY error in bus_message_read

The EBUSY error can be returned from sd_bus_exit_container(), and, if
that happens, it will be propogated upwards towards bus_message_read. In
terms of documentation, this means that bus_message_read's man page
can't just include the error text for sd_bus_message_read_basic, as
reading basic types exclusively doesn't have the potential for this
error.

sd_bus_message_read_basic's error documentation isn't incorrect when
applied to sd_bus_message_read, it's just incomplete.  While EBUSY is
documented in sd_bus_message_open_container.xml,
it's explanation is unique to the sd_bus_message_exit_container function
and makes for poor documentation of the general read API.
2022-01-11 10:47:31 +00:00
Jan Janssen 9818ec8ea5 boot: Change boot entry sorting
There are a few undesirable properties to how boot entries are
currently sorted.

First, it sorts by entry file name only, which may not correspond
to the title that is shown (for exmaple because it is prefixed by
machine-id). The file ending will also create unexpected ordering
("arch-lts.conf" would come before "arch.conf").

While the list is sorted alphabetically ascending, it is also
lower version/priority first, which is unintuitive. In particular,
a boot-counted entry that is bad (0 tries left) will be at the very
top.

Additionally, the Windows and Mac loaders should be sorted with
the rest of the loaders.
2022-01-10 21:34:12 +01:00
Jan Janssen 661615a0af boot: Add BitLocker TPM key sealing workaround
Fixes: #21891
2022-01-10 16:40:16 +01:00
Albert Brox 3989bdc1ad core: teach LoadCredential= to load from a directory 2022-01-08 13:17:51 +00:00
Zbigniew Jędrzejewski-Szmek bd330fb05e man: adjust chart in bootup(5)
The style used for that one branch was inconsistent with other branches.
2022-01-07 17:37:37 +01:00
Zbigniew Jędrzejewski-Szmek 49fddcd355 man: refer to os-release(5) for description of files in the same format 2022-01-07 17:37:37 +01:00
Zbigniew Jędrzejewski-Szmek 55ac274ef4 man: add missing example title in systemd.network(5)
Also rename the file to match the example being extended.
2022-01-07 17:34:20 +01:00
Morten Linderud 921e1bae16 man: correct minor mistakes in systemd-creds
Signed-off-by: Morten Linderud <morten@linderud.pw>
2022-01-07 16:07:28 +01:00
Yu Watanabe 7611946ebc tree-wide: fix typo 2022-01-06 22:20:11 +09:00
Zbigniew Jędrzejewski-Szmek 5ca99dfabd man: add example of sd_event_add_child()
The thing with blocking SIGCHLD is rather annoying. I think we could/should
make this automatic.
2022-01-05 15:19:13 +01:00
Zbigniew Jędrzejewski-Szmek 9809a788e4 man: add better descriptions of what event handlers do
The meaning of the return value, the default handlers, and loop exiting are now
described.
2022-01-05 15:19:13 +01:00
Noel Kuntze 0d03e672a9 network: complete example for xfrm setup 2021-12-30 23:52:28 +09:00
Yu Watanabe b886649c95 network: vxlan: support to select an address assigned on underlying interface as local address 2021-12-25 15:32:06 +09:00
Yu Watanabe 8585b7ca65
Merge pull request #20833 from pdmorrow/onfailure_env
service: pass exiting service state to triggered On{Failure,Success}= dependencies
2021-12-25 15:29:42 +09:00
Yu Watanabe 2588920059
Merge pull request #21868 from lucab/ups/factory-locale-conf
factory: populate /etc/locale.conf with systemd build-time setting
2021-12-25 15:09:35 +09:00
Stephen Hemminger 7c4bd9ac98
bus-dump: change capture output to use pcapng (#21738)
This patch changes busctl capture to generate pcapng format
instead of the legacy pcap format files. It includes basic
meta-data in the file and still uses microsecond time
resolution. In future, more things can be added such as
high resolution timestams, statistics, etc.

PCAP Next Generation capture file format is what tshark uses
and is in process of being standardized in IETF. It is also
readable with libpcap.

$ capinfos /tmp/new.pcapng
File name:           /tmp/new.pcapng
File type:           Wireshark/... - pcapng
File encapsulation:  D-Bus
File timestamp precision:  microseconds (6)
Packet size limit:   file hdr: (not set)
Packet size limit:   inferred: 4096 bytes
Number of packets:   22
File size:           21kB
Data size:           20kB
Capture duration:    0.005694 seconds
First packet time:   2021-12-11 11:57:42.788374
Last packet time:    2021-12-11 11:57:42.794068
Data byte rate:      3,671kBps
Data bit rate:       29Mbps
Average packet size: 950.27 bytes
Average packet rate: 3,863 packets/s
SHA256:              b85ed8b094af60c64aa6d9db4a91404e841736d36b9e662d707db9e4096148f1
RIPEMD160:           81f9bac7ec0ec5cd1d55ede136a5c90413894e3a
SHA1:                8400822ef724b934d6000f5b7604b9e6e91be011
Strict time order:   True
Capture oper-sys:    Linux 5.14.0-0.bpo.2-amd64
Capture application: systemd 250 (250-rc2-33-gdc79ae2+)
Number of interfaces in file: 1
Interface #0 info:
                     Encapsulation = D-Bus (146 - dbus)
                     Capture length = 4096
                     Time precision = microseconds (6)
                     Time ticks per second = 1000000
                     Number of stat entries = 0
                     Number of packets = 22
2021-12-25 15:07:40 +09:00
Yu Watanabe 7726526cc6
Merge pull request #21648 from yuwata/network-tunnel-local-automatic-address-selection
network: tunnel: automatic local address selection
2021-12-25 15:05:13 +09:00
Yu Watanabe 34b5684846 man: also add anotations for methods
Fixes #21882.
2021-12-24 10:18:11 +00:00
Luca BRUNO 8e85924fd6
factory/locale.conf: mention systemd ownership
This explicitly mentions that comments and empty lines are supported
(and ignored) in /etc/locale.conf. It then adds ownership reference
to the factory default.
2021-12-23 14:18:02 +00:00
Luca BRUNO 623370e643
factory: populate /etc/locale.conf with systemd build-time setting
This adds /etc/locale.conf to the set of configuration files
populated by tmpfiles.d factory /etc handling.
In particular, the build-time locale configuration in systemd is
now wired to a /usr factory file, and installed to the system.
On boot, if other locale customization tools did not write
/etc/locale.conf on the system, the factory default file gets
copied to /etc by systemd-tmpfiles.
This is done in order to avoid skews between different system
components when no locale settings are configured. At that point,
systemd can safely act as the fallback owner of /etc/locale.conf.
2021-12-23 11:01:12 +00:00
Yu Watanabe add469f5a9 man: reindent and rebreak systemd.network
Also fixes the following:
- IPServiceType= is moved to [DHCPv4] section,
- drop an incorrect sentence in RouteMTUBytes= in [DHCPv4] section.
- drop unnecessary word 'unsigned'.
2021-12-23 11:26:18 +01:00
Zbigniew Jędrzejewski-Szmek 8ef114c692 nss-resolve: expose various source-disablement settings as variables
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2006761:
> systemd-resolved always (reverse)-resolves the host's IP addresses and FQDN.
> This can be harmful when an application (for instance, a DNS zone manager) is
> installed on the same server instance.  That application would expect
> NXDOMAIN to be returned if the current server's IP does not belong in an
> already managed reverse zone.

This allows clients of nss-resolve to use the same config options that are
available through the dbus api and as command-line options to resolvectl.

The man page text is is mostly copied directly from
c6f20515ab.
2021-12-21 02:28:52 +09:00
Zbigniew Jędrzejewski-Szmek e803cf2139 man: correctly document default for DNSSEC= and DNSoverTLS=
https://bugzilla.redhat.com/show_bug.cgi?id=1926323
2021-12-20 10:56:14 +01:00
Zbigniew Jędrzejewski-Szmek c6f20515ab man: describe flags for record resolving 2021-12-20 10:56:14 +01:00
Zbigniew Jędrzejewski-Szmek 1c4539afc0 man: describe $SYSTEMD_NSS_RESOLVE_VALIDATE
This variable has a pretty important effect, but we didn't mention it
anywhere in the docs. It was added in aee9d18c8d.
2021-12-20 10:51:51 +01:00
Daan De Meyer 3e6357de9d
Merge pull request #21807 from keszybz/bootcls-no-autodetect
Use KERNEL_INSTALL_MACHINE_ID and KERNEL_INSTALL_LAYOUT with bootctl install
2021-12-20 10:43:18 +01:00
Luca Boccassi 47dba9fb09 path unit: add TriggerLimitBurst= and TriggerLimitIntervalSec=
Given there's now a default for these settings, also allow users to configure
them, matching socket units
2021-12-18 23:17:53 +00:00
Luca Boccassi ef1aa10692 man: fix typo in systemd.socket.5 2021-12-18 17:23:53 +00:00
Frantisek Sumsal b5c946d3b8 man: fix machine-id(5) man page reference
Spotted whilst debugging:
```
[763/2094] Generating man/machine-info.html with a custom command
Element cite in namespace '' encountered in para, but no template matches.
[765/2094] Generating man/machine-info.5 with a custom command
Element cite in namespace '' encountered in para, but no template matches.
```

Follow-up to 357376d0bb.
2021-12-18 08:35:24 +09:00
Yu Watanabe a00fd2a553
Merge pull request #21800 from keszybz/net-id-debugging
Add more debugging info to udev builtin net_id
2021-12-18 08:35:08 +09:00
Zbigniew Jędrzejewski-Szmek 1ff493d5c1 bootctl: deprecate --make-machine-id-directory=auto
Now that kernel-install creates the machine-id directory, we don't need to do
this is 'bootctl install', and in fact it's better not to do this since it
might never be necessary. So let's change the default behaviour to 'no'.

I kept support for 'auto' to maintain backwards compatibility, even though the
default was changed. Previous behaviour can be requested by specifying
--make-machine-id-directory=auto.
2021-12-17 18:48:08 +01:00
наб 641e2124de kernel-install: replace 00-entry-directory with K_I_LAYOUT in k-i
341890de86 made "bootctl install" create
ESP\MID, in preparation of cf73f65089 that
followed it and created 00-entry-directory.install to make ESP\MID\KVER
if ESP\MID existed ‒ this meant that "bootctl install" followed by
"kernel-install $(uname -r) /boot/vml*$(uname -r) /boot/ini*$(uname -r)"
actually installed the kernel correctly.

Later, 31e57550b5 reverted the first
commit, meaning, that now running those two commands first installs
sd-boot, but then does nothing. Everything appears to work right,
nothing errors out, but no changes are actually done. To the untrained
eye (all of them), even running with -v appears to work:
all the hooks are run, as is depmod, but, again, nothing happens.

This is horrible. Nothing in either manpage suggests what to do
(nor should it, really), but the user is left with a bootloader that
appears fully funxional, since nothing suggests a failure in the output,
but with an unbootable machine, /no way to boot it/, even if they drop
to an EFI shell, since the boot bundle isn't present on the ESP,
and no real recourse even if they boot into a recovery system,
apart from installing like GRUB or whatever.

00- is purely instrumentation for 90-,
and separating one from the other has led to downstream dissatisfaxion
(indeed, the last mentioned commit cited cited exactly that as the
 reversion reason), while creating $ENTRY_DIR_ABS is only required
for bootloaders using the BLS, and shouldn't itself toggle anything.

To that end, introduce an /{e,l}/k/install.conf file that allows
overriding the detected layout, and detect it as "bls" if
$BOOT_ROOT/$MACHINE_ID ($ENTRY_DIR_ABS/..) exists, otherwise "other" ‒
if a user wishes to select a different bootloader,
like GRUB, they (or, indeed, the postinst script) can specify
layout=grub. This disables 90- and $ENTRY_DIR_ABS manipulation.
2021-12-17 14:57:56 +01:00
Zbigniew Jędrzejewski-Szmek a2968e8366 man: use unicode superscripts to indicate the exponent 2021-12-17 11:45:55 +01:00
Zbigniew Jędrzejewski-Szmek 56f9ce31b9 man: fix two typos 2021-12-17 11:45:55 +01:00
Luca Boccassi c6837e4e86
Merge pull request #21790 from keszybz/network-generator-always
Enable systemd-network-generator by default
2021-12-16 15:50:39 +00:00
Zbigniew Jędrzejewski-Szmek 0c0bb433db
Merge pull request #21757 from DaanDeMeyer/boot-id
kernel-install: Introduce KERNEL_INSTALL_MACHINE_ID in /etc/machine-info
2021-12-16 13:47:17 +01:00
Daan De Meyer 357376d0bb kernel-install: Introduce KERNEL_INSTALL_MACHINE_ID in /etc/machine-info
If KERNEL_INSTALL_MACHINE_ID is defined in /etc/machine-info, prefer it
over the machine ID from /etc/machine-id. If a machine ID is defined in
neither /etc/machine-info nor in /etc/machine-id, generate a new UUID
and try to write it to /etc/machine-info as KERNEL_INSTALL_MACHINE_ID
and use it as the machine ID if writing it to /etc/machine-info succeeds.

In practice, this means we have a more robust fallback if there's no
machine ID in /etc/machine-id than just using "Default" and allows
image builders to force kernel-install to use KERNEL_INSTALL_MACHINE_ID
by simply writing it to /etc/machine-info themselves.
2021-12-16 12:24:42 +01:00
Zbigniew Jędrzejewski-Szmek 66aaca688f man: split out a paragraph and shorten the text about sd-network-generator
The ordering of the service wrt. to udevd is enforced by unit configuration,
so no need to tell the user about this. From users' POV, the only thing that
counts is that the unit is enabled and then the right thing happens.
2021-12-16 09:56:13 +01:00
Yu Watanabe a4c9bf2e51 network-generator: support to set NamePolicy= through kernel command line argument
Closes #16296.
2021-12-16 01:55:37 +09:00
Yu Watanabe 987dd89c77 meson: build network-generator unconditionally
The service also generates .link files for udevd.
2021-12-16 01:55:20 +09:00
Yu Watanabe 372e8592c6 wait-online: also use address state even when operational state is below degraded
Closes #21706.
2021-12-14 10:32:56 +01:00
Davide Cavalca ba38a24de3 man: do not install sd-boot man pages when -Dgnu-efi=false is set 2021-12-14 00:08:55 +00:00
Sho Iizuka 17cfd6f96f man: how to unset CPUQuota=
This description will help users who are trying to reset the already configured
CPUQuota= by trying incorrect ways such as CPUQuota=0 or CPUQUota=infinity.
2021-12-13 19:43:56 +00:00
Luca Boccassi 720db03495
Merge pull request #21752 from keszybz/man-creds
Small improvements to systemd-creds output and man page
2021-12-13 19:43:37 +00:00