From 95d311faea78b0508962ffcc76f74365c79979a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 3 Mar 2020 14:48:54 +0100 Subject: [PATCH 1/8] man: bump fedora versions --- man/systemd-nspawn.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml index 0b7959e06f..a7c4b138b7 100644 --- a/man/systemd-nspawn.xml +++ b/man/systemd-nspawn.xml @@ -1,8 +1,8 @@ - + + ]> From a345d5c1c9b223adb513e7cd7663bdb7277a3f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 3 Mar 2020 14:50:58 +0100 Subject: [PATCH 2/8] man,mkosi: use glibc-minimal-langpack for Fedora This saves ~24MB of space, see https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot. --- .mkosi/mkosi.fedora | 1 + man/systemd-nspawn.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.mkosi/mkosi.fedora b/.mkosi/mkosi.fedora index 3717875366..7d07140e6e 100644 --- a/.mkosi/mkosi.fedora +++ b/.mkosi/mkosi.fedora @@ -27,6 +27,7 @@ BuildPackages= gcc gettext git + glibc-minimal-langpack gnu-efi gnu-efi-devel gnutls-devel diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml index a7c4b138b7..b269b99170 100644 --- a/man/systemd-nspawn.xml +++ b/man/systemd-nspawn.xml @@ -1378,7 +1378,7 @@ # dnf -y --releasever=&fedora_latest_version; --installroot=/var/lib/machines/f&fedora_latest_version; \ --disablerepo='*' --enablerepo=fedora --enablerepo=updates install \ - systemd passwd dnf fedora-release vim-minimal + systemd passwd dnf fedora-release vim-minimal glibc-minimal-langpack # systemd-nspawn -bD /var/lib/machines/f&fedora_latest_version; This installs a minimal Fedora distribution into the From 33eb1f24978c813994357c27efd0e99f491e7c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 3 Mar 2020 14:57:03 +0100 Subject: [PATCH 3/8] tree-wide: drop printk.devkmsg=on setting in various places Since 6123dfaa72 this should not be necessary anymore. --- .mkosi/mkosi.fedora | 1 - man/journald.conf.xml | 6 +++--- test/mkosi.default.networkd-test | 1 - test/test-functions | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.mkosi/mkosi.fedora b/.mkosi/mkosi.fedora index 7d07140e6e..01bfd2338b 100644 --- a/.mkosi/mkosi.fedora +++ b/.mkosi/mkosi.fedora @@ -10,7 +10,6 @@ Release=31 [Output] Format=gpt_ext4 Bootable=yes -KernelCommandLine=printk.devkmsg=on [Partitions] RootSize=3G diff --git a/man/journald.conf.xml b/man/journald.conf.xml index afbbe64bb8..e24c420ab0 100644 --- a/man/journald.conf.xml +++ b/man/journald.conf.xml @@ -350,9 +350,9 @@ TTYPath=, described below. When forwarding to the kernel log buffer (kmsg), make sure to select a suitably large size for - the log buffer, and ensure the kernel's rate-limiting applied to userspace processes is turned - off. Specifically, add log_buf_len=8M and printk.devkmsg=on (or - similar) to the kernel command line. + the log buffer, for example by adding log_buf_len=8M to the kernel command line. + systemd will automatically disable kernel's rate-limiting applied to userspace + processes (equivalent to setting printk.devkmsg=on). diff --git a/test/mkosi.default.networkd-test b/test/mkosi.default.networkd-test index 58af352f6f..6032c33c3a 100644 --- a/test/mkosi.default.networkd-test +++ b/test/mkosi.default.networkd-test @@ -10,7 +10,6 @@ Release=29 [Output] Format=raw_btrfs Bootable=yes -KernelCommandLine=printk.devkmsg=on OutputDirectory=../mkosi.output Output=networkd-test.raw diff --git a/test/test-functions b/test/test-functions index 1bba8e429b..e4ec4f025f 100644 --- a/test/test-functions +++ b/test/test-functions @@ -212,7 +212,6 @@ loglevel=2 \ init=$PATH_TO_INIT \ console=$CONSOLE \ selinux=0 \ -printk.devkmsg=on \ $_cgroup_args \ $KERNEL_APPEND \ " From 105a1a36cd6eeac3a43b5dd52383b00c69f86497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 3 Mar 2020 15:00:53 +0100 Subject: [PATCH 4/8] tree-wide: fix spelling of lookup and setup verbs "set up" and "look up" are the verbs, "setup" and "lookup" are the nouns. --- src/core/dbus-manager.c | 2 +- src/core/namespace.c | 2 +- src/nspawn/nspawn.c | 2 +- src/resolve/resolved-dns-scope.c | 2 +- src/resolve/resolved-mdns.c | 2 +- src/shared/module-util.c | 2 +- src/systemctl/systemctl.c | 2 +- src/test/test-btrfs.c | 2 +- src/test/test-ns.c | 2 +- src/timesync/timesyncd-manager.c | 2 +- src/udev/udev-builtin-hwdb.c | 4 ++-- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 46b6082a25..60f55aef5f 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -1713,7 +1713,7 @@ static int method_get_dynamic_users(sd_bus_message *message, void *userdata, sd_ if (r == -EAGAIN) /* not realized yet? */ continue; if (r < 0) - return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Failed to lookup a dynamic user."); + return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Failed to look up a dynamic user."); r = sd_bus_message_append(reply, "(us)", uid, d->name); if (r < 0) diff --git a/src/core/namespace.c b/src/core/namespace.c index 07c9ac2b51..cda9d2ca1d 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -749,7 +749,7 @@ static int mount_private_dev(MountEntry *m) { r = dev_setup(temporary_mount, UID_INVALID, GID_INVALID); if (r < 0) - log_debug_errno(r, "Failed to setup basic device tree at '%s', ignoring: %m", temporary_mount); + log_debug_errno(r, "Failed to set up basic device tree at '%s', ignoring: %m", temporary_mount); /* Create the /dev directory if missing. It is more likely to be * missing when the service is started with RootDirectory. This is diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 2a63315a4c..f2f420c26f 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -3020,7 +3020,7 @@ static int inner_child( r = setup_dev_console(console); if (r < 0) - return log_error_errno(r, "Failed to setup /dev/console: %m"); + return log_error_errno(r, "Failed to set up /dev/console: %m"); r = send_one_fd(master_pty_socket, master, 0); if (r < 0) diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c index 691f07945f..d7e7b5a853 100644 --- a/src/resolve/resolved-dns-scope.c +++ b/src/resolve/resolved-dns-scope.c @@ -863,7 +863,7 @@ void dns_scope_process_query(DnsScope *s, DnsStream *stream, DnsPacket *p) { r = dns_zone_lookup(&s->zone, key, 0, &answer, &soa, &tentative); if (r < 0) { - log_debug_errno(r, "Failed to lookup key: %m"); + log_debug_errno(r, "Failed to look up key: %m"); return; } if (r == 0) diff --git a/src/resolve/resolved-mdns.c b/src/resolve/resolved-mdns.c index eba2978991..921720febf 100644 --- a/src/resolve/resolved-mdns.c +++ b/src/resolve/resolved-mdns.c @@ -195,7 +195,7 @@ static int mdns_scope_process_query(DnsScope *s, DnsPacket *p) { r = dns_zone_lookup(&s->zone, key, 0, &answer, &soa, &tentative); if (r < 0) - return log_debug_errno(r, "Failed to lookup key: %m"); + return log_debug_errno(r, "Failed to look up key: %m"); if (tentative && DNS_PACKET_NSCOUNT(p) > 0) { /* diff --git a/src/shared/module-util.c b/src/shared/module-util.c index 75c8ba2b78..9173cf2ffd 100644 --- a/src/shared/module-util.c +++ b/src/shared/module-util.c @@ -18,7 +18,7 @@ int module_load_and_warn(struct kmod_ctx *ctx, const char *module, bool verbose) r = kmod_module_new_from_lookup(ctx, module, &modlist); if (r < 0) return log_full_errno(verbose ? LOG_ERR : LOG_DEBUG, r, - "Failed to lookup module alias '%s': %m", module); + "Failed to look up module alias '%s': %m", module); if (!modlist) { log_full_errno(verbose ? LOG_ERR : LOG_DEBUG, r, diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 771ede7397..f44db4ffc3 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -6590,7 +6590,7 @@ static int enable_sysv_units(const char *verb, char **args) { j = unit_file_exists(arg_scope, &paths, name); if (j < 0 && !IN_SET(j, -ELOOP, -ERFKILL, -EADDRNOTAVAIL)) - return log_error_errno(j, "Failed to lookup unit file state: %m"); + return log_error_errno(j, "Failed to look up unit file state: %m"); found_native = j != 0; /* If we have both a native unit and a SysV script, enable/disable them both (below); for is-enabled, diff --git a/src/test/test-btrfs.c b/src/test/test-btrfs.c index 5bd0e3458c..9dbe4dccd1 100644 --- a/src/test/test-btrfs.c +++ b/src/test/test-btrfs.c @@ -155,7 +155,7 @@ int main(int argc, char *argv[]) { r = btrfs_subvol_snapshot("/xxxquotatest", "/xxxquotatest2", BTRFS_SNAPSHOT_RECURSIVE|BTRFS_SNAPSHOT_QUOTA); if (r < 0) - log_error_errno(r, "Failed to setup snapshot: %m"); + log_error_errno(r, "Failed to set up snapshot: %m"); r = btrfs_qgroup_get_quota("/xxxquotatest2/beneath", 0, "a); if (r < 0) diff --git a/src/test/test-ns.c b/src/test/test-ns.c index 48a5ff9f2d..cf8b08ba9b 100644 --- a/src/test/test-ns.c +++ b/src/test/test-ns.c @@ -79,7 +79,7 @@ int main(int argc, char *argv[]) { 0, NULL); if (r < 0) { - log_error_errno(r, "Failed to setup namespace: %m"); + log_error_errno(r, "Failed to set up namespace: %m"); log_info("Usage:\n" " sudo TEST_NS_PROJECTS=/home/lennart/projects ./test-ns\n" diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index 7b71e98f56..e18e1e6c04 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -110,7 +110,7 @@ static int manager_send_request(Manager *m) { r = manager_listen_setup(m); if (r < 0) - return log_warning_errno(r, "Failed to setup connection socket: %m"); + return log_warning_errno(r, "Failed to set up connection socket: %m"); /* * Set transmit timestamp, remember it; the server will send that back diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c index 36cda504e7..8e86d2f0d1 100644 --- a/src/udev/udev-builtin-hwdb.c +++ b/src/udev/udev-builtin-hwdb.c @@ -163,7 +163,7 @@ static int builtin_hwdb(sd_device *dev, int argc, char *argv[], bool test) { if (argv[optind]) { r = udev_builtin_hwdb_lookup(dev, prefix, argv[optind], filter, test); if (r < 0) - return log_device_debug_errno(dev, r, "Failed to lookup hwdb: %m"); + return log_device_debug_errno(dev, r, "Failed to look up hwdb: %m"); if (r == 0) return log_device_debug_errno(dev, SYNTHETIC_ERRNO(ENODATA), "No entry found from hwdb."); return r; @@ -178,7 +178,7 @@ static int builtin_hwdb(sd_device *dev, int argc, char *argv[], bool test) { r = udev_builtin_hwdb_search(dev, srcdev, subsystem, prefix, filter, test); if (r < 0) - return log_device_debug_errno(dev, r, "Failed to lookup hwdb: %m"); + return log_device_debug_errno(dev, r, "Failed to look up hwdb: %m"); if (r == 0) return log_device_debug_errno(dev, SYNTHETIC_ERRNO(ENODATA), "No entry found from hwdb."); return r; From cd517eb7310de083bfbf51322239d9538d86cd2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 3 Mar 2020 18:03:53 +0100 Subject: [PATCH 5/8] man: specify that Domains= is a space-separated list Fixes #14998. --- man/systemd.network.xml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 7d02b11d20..8915d50d1e 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -514,13 +514,14 @@ Domains= - A list of domains which should be resolved using the DNS servers on this link. Each item in the list - should be a domain name, optionally prefixed with a tilde (~). The domains with the - prefix are called "routing-only domains". The domains without the prefix are called "search domains" and - are first used as search suffixes for extending single-label host names (host names containing no dots) to - become fully qualified domain names (FQDNs). If a single-label host name is resolved on this interface, - each of the specified search domains are appended to it in turn, converting it into a fully qualified - domain name, until one of them may be successfully resolved. + A whitespace-separated list of domains which should be resolved using the DNS servers on + this link. Each item in the list should be a domain name, optionally prefixed with a tilde + (~). The domains with the prefix are called "routing-only domains". The + domains without the prefix are called "search domains" and are first used as search suffixes for + extending single-label host names (host names containing no dots) to become fully qualified + domain names (FQDNs). If a single-label host name is resolved on this interface, each of the + specified search domains are appended to it in turn, converting it into a fully qualified domain + name, until one of them may be successfully resolved. Both "search" and "routing-only" domains are used for routing of DNS queries: look-ups for host names ending in those domains (hence also single label names, if any "search domains" are listed), are routed to From c7fe06fb0a00bdbc0d9b94232fbaa115560d9e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 3 Mar 2020 18:36:03 +0100 Subject: [PATCH 6/8] man: document the default value for IPv6AcceptRA= Fixes #14121. --- man/systemd.network.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 8915d50d1e..9da078cb7d 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -614,10 +614,12 @@ IPv6AcceptRA= - Takes a boolean. Controls IPv6 Router Advertisement (RA) reception support - for the interface. If true, RAs are accepted; if false, RAs are ignored, independently of the - local forwarding state. When RAs are accepted, they may trigger the start of the DHCPv6 - client if the relevant flags are set in the RA data, or if no routers are found on the link. + Takes a boolean. Controls IPv6 Router Advertisement (RA) reception support for the + interface. If true, RAs are accepted; if false, RAs are ignored. When RAs are accepted, they may + trigger the start of the DHCPv6 client if the relevant flags are set in the RA data, or if no + routers are found on the link. The default is to disable RA reception for bridge devices or when IP + forwarding is enabled, and to enable it otherwise. Cannot be enabled on bond devices and when link + local adressing is disabled. Further settings for the IPv6 RA support may be configured in the [IPv6AcceptRA] section, see below. From 870d38dca90b172f331738e4562422b1c84c887c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 3 Mar 2020 18:42:22 +0100 Subject: [PATCH 7/8] docs: add .link/.network/.netdev files to interface stability chart Fixes #9850. --- docs/PORTABILITY_AND_STABILITY.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/PORTABILITY_AND_STABILITY.md b/docs/PORTABILITY_AND_STABILITY.md index ebea93b526..95bfcb98d3 100644 --- a/docs/PORTABILITY_AND_STABILITY.md +++ b/docs/PORTABILITY_AND_STABILITY.md @@ -96,6 +96,8 @@ And now, here's the list of (hopefully) all APIs that we have introduced with sy | [$NOTIFY_SOCKET Daemon Notifications](https://www.freedesktop.org/software/systemd/man/sd_notify.html) | Environment | yes | yes | a few, including udev | yes | - | no | | [argv[0][0]='@' Logic](https://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons) | `/proc` marking | yes | yes | mdadm | yes | - | no | | [Unit file format](https://www.freedesktop.org/software/systemd/man/systemd.unit.html) | File format | yes | yes | numerous | no | - | no | +| [Network](https://www.freedesktop.org/software/systemd/man/systemd.network.html) & [Netdev file format](https://www.freedesktop.org/software/systemd/man/systemd.netdev.html) | File format | yes | yes | no | no | - | no | +| [Link file format](https://www.freedesktop.org/software/systemd/man/systemd.link.html) | File format | yes | yes | no | no | - | no | | [Journal File Format](https://www.freedesktop.org/wiki/Software/systemd/journal-files) | File format | yes | yes | - | maybe | - | no | | [Journal Export Format](https://www.freedesktop.org/wiki/Software/systemd/export) | File format | yes | yes | - | yes | - | no | | [Cooperation in cgroup tree](https://www.freedesktop.org/wiki/Software/systemd/PaxControlGroups) | Treaty | yes | yes | libvirt | yes | libvirt | no | From d4de2b2afff6bc1f2d9ca960197bb0388c154221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 3 Mar 2020 19:08:26 +0100 Subject: [PATCH 8/8] man: document that .link/.network/.netdev files have the usual ini syntax Fixes #1266. --- man/systemd.link.xml | 7 +++++-- man/systemd.netdev.xml | 5 +++-- man/systemd.network.xml | 6 ++++-- man/systemd.syntax.xml | 9 +++++++++ 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/man/systemd.link.xml b/man/systemd.link.xml index 130cc78693..1dca495a03 100644 --- a/man/systemd.link.xml +++ b/man/systemd.link.xml @@ -26,8 +26,11 @@ Description - Network link configuration is performed by the - net_setup_link udev builtin. + A plain ini-style text file that encodes configuration for matching network devices, used by + systemd-udev8 and in + particular its net_setup_link builtin. See + systemd.syntax5 for a + general description of the syntax. The link files are read from the files located in the system network directory /usr/lib/systemd/network, diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml index 6e215a38bb..6ad1dc9e73 100644 --- a/man/systemd.netdev.xml +++ b/man/systemd.netdev.xml @@ -27,9 +27,10 @@ Description - Network setup is performed by + A plain ini-style text file that encodes configuration about a virtual network device, used by systemd-networkd8. - + See systemd.syntax5 + for a general description of the syntax. The main Virtual Network Device file must have the extension .netdev; other extensions are ignored. Virtual network devices are created as soon as networkd is diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 9da078cb7d..bd19b766c3 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -28,9 +28,11 @@ Description - Network setup is performed by + A plain ini-style text file that encodes network configuration for matching network interfaces, + used by systemd-networkd8. - + See systemd.syntax5 + for a general description of the syntax. The main network file must have the extension .network; other extensions are ignored. Networks are applied to links whenever the links appear. diff --git a/man/systemd.syntax.xml b/man/systemd.syntax.xml index 05786cc534..04b1564b17 100644 --- a/man/systemd.syntax.xml +++ b/man/systemd.syntax.xml @@ -46,6 +46,15 @@ systemd.nspawn5 + link files, see + systemd.link5 + + + netdev and network files, see + systemd.netdev5, + systemd.network5 + + daemon config files, see systemd-system.conf5, systemd-user.conf5,