From f2f40edcb99295bc4655d0f057b8321b63db0e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 May 2022 11:49:52 +0200 Subject: [PATCH 1/5] man: fix typo --- man/systemd.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/systemd.xml b/man/systemd.xml index def7bfc559..94cd96540f 100644 --- a/man/systemd.xml +++ b/man/systemd.xml @@ -621,7 +621,7 @@ Environment The environment block for the system manager is initially set by the kernel. (In particular, - key=value assignments on the kernel command line are returned into environment + key=value assignments on the kernel command line are turned into environment variables for PID 1). For the user manager, the system manager sets the environment as described in the "Environment Variables in Spawned Processes" section of systemd.exec5. The From 8458ca26c163837169c1c97e53e8014507d06d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 May 2022 13:14:37 +0200 Subject: [PATCH 2/5] networkd: reword debug messages "left from " is not correct. "left " would be the usual form, but "left master interface" is not clear at all. So reword those messages totally. Follow-up for 3881fd406b13746336c6c654fd2f68261161fd8a. --- src/network/networkd-link.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index d697210bdc..63679505f7 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -2035,11 +2035,11 @@ static int link_update_master(Link *link, sd_netlink_message *message) { return 0; if (link->master_ifindex == 0) - log_link_debug(link, "Joined to master interface: %i", master_ifindex); + log_link_debug(link, "Attached to master interface: %i", master_ifindex); else if (master_ifindex == 0) - log_link_debug(link, "Left from master interface: %i", link->master_ifindex); + log_link_debug(link, "Detached from master interface: %i", link->master_ifindex); else - log_link_debug(link, "Master interface is changed: %i → %i", link->master_ifindex, master_ifindex); + log_link_debug(link, "Master interface changed: %i → %i", link->master_ifindex, master_ifindex); link_drop_from_master(link); From 12801295d1f92c32f1ed3cc1e49474c9be553a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 May 2022 19:22:11 +0200 Subject: [PATCH 3/5] README: add missing colons and wrap to ~80 columns Some paragraphs were narrow for no good reason. Let's make things a bit more uniform. --- README | 125 +++++++++++++++++++++++++++------------------------------ 1 file changed, 59 insertions(+), 66 deletions(-) diff --git a/README b/README index 072ef842e0..234e205a50 100644 --- a/README +++ b/README @@ -60,7 +60,7 @@ REQUIREMENTS: CONFIG_PROC_FS CONFIG_FHANDLE (libudev, mount and bind mount handling) - Kernel crypto/hash API + Kernel crypto/hash API: CONFIG_CRYPTO_USER_API_HASH CONFIG_CRYPTO_HMAC CONFIG_CRYPTO_SHA256 @@ -71,15 +71,15 @@ REQUIREMENTS: Legacy hotplug slows down the system and confuses udev: CONFIG_UEVENT_HELPER_PATH="" - Userspace firmware loading is not supported and should - be disabled in the kernel: + Userspace firmware loading is not supported and should be disabled in + the kernel: CONFIG_FW_LOADER_USER_HELPER=n Some udev rules and virtualization detection relies on it: CONFIG_DMIID - Support for some SCSI devices serial number retrieval, to - create additional symlinks in /dev/disk/ and /dev/tape: + Support for some SCSI devices serial number retrieval, to create + additional symlinks in /dev/disk/ and /dev/tape: CONFIG_BLK_DEV_BSG Required for PrivateNetwork= in service units: @@ -97,18 +97,18 @@ REQUIREMENTS: CONFIG_{TMPFS,EXT4_FS,XFS,BTRFS_FS,...}_POSIX_ACL CONFIG_SECCOMP CONFIG_SECCOMP_FILTER (required for seccomp support) - CONFIG_KCMP (for the kcmp() syscall, used to be under CONFIG_CHECKPOINT_RESTORE before ~5.12) + CONFIG_KCMP (for the kcmp() syscall, used to be under + CONFIG_CHECKPOINT_RESTORE before ~5.12) - Required for CPUShares= in resource control unit settings + Required for CPUShares= in resource control unit settings: CONFIG_CGROUP_SCHED CONFIG_FAIR_GROUP_SCHED - Required for CPUQuota= in resource control unit settings + Required for CPUQuota= in resource control unit settings: CONFIG_CFS_BANDWIDTH Required for IPAddressDeny=, IPAddressAllow=, IPIngressFilterPath=, - IPEgressFilterPath= in resource control unit settings - unit settings + IPEgressFilterPath= in resource control unit settings unit settings: CONFIG_BPF CONFIG_BPF_SYSCALL CONFIG_BPF_JIT @@ -116,7 +116,7 @@ REQUIREMENTS: CONFIG_CGROUP_BPF Required for SocketBind{Allow|Deny}=, RestrictNetworkInterfaces= in - resource control unit settings + resource control unit settings: CONFIG_BPF CONFIG_BPF_SYSCALL CONFIG_BPF_JIT @@ -137,22 +137,21 @@ REQUIREMENTS: CONFIG_DEBUG_INFO_BTF CONFIG_LSM="...,bpf" or kernel booted with lsm="...,bpf". - We recommend to turn off Real-Time group scheduling in the - kernel when using systemd. RT group scheduling effectively - makes RT scheduling unavailable for most userspace, since it - requires explicit assignment of RT budgets to each unit whose - processes making use of RT. As there's no sensible way to - assign these budgets automatically this cannot really be - fixed, and it's best to disable group scheduling hence. + We recommend to turn off Real-Time group scheduling in the kernel when + using systemd. RT group scheduling effectively makes RT scheduling + unavailable for most userspace, since it requires explicit assignment of + RT budgets to each unit whose processes making use of RT. As there's no + sensible way to assign these budgets automatically this cannot really be + fixed, and it's best to disable group scheduling hence: CONFIG_RT_GROUP_SCHED=n It's a good idea to disable the implicit creation of networking bonding devices by the kernel networking bonding module, so that the automatically created "bond0" interface doesn't conflict with any such - device created by systemd-networkd (or other tools). Ideally there - would be a kernel compile-time option for this, but there currently - isn't. The next best thing is to make this change through a modprobe.d - drop-in. This is shipped by default, see modprobe.d/systemd.conf. + device created by systemd-networkd (or other tools). Ideally there would + be a kernel compile-time option for this, but there currently isn't. The + next best thing is to make this change through a modprobe.d drop-in. + This is shipped by default, see modprobe.d/systemd.conf. Required for systemd-nspawn: CONFIG_DEVPTS_MULTIPLE_INSTANCES or Linux kernel >= 4.7 @@ -160,19 +159,17 @@ REQUIREMENTS: Required for systemd-oomd: CONFIG_PSI - Note that kernel auditing is broken when used with systemd's - container code. When using systemd in conjunction with - containers, please make sure to either turn off auditing at - runtime using the kernel command line option "audit=0", or - turn it off at kernel compile time using: + Note that kernel auditing is broken when used with systemd's container + code. When using systemd in conjunction with containers, please make + sure to either turn off auditing at runtime using the kernel command + line option "audit=0", or turn it off at kernel compile time using: CONFIG_AUDIT=n - If systemd is compiled with libseccomp support on - architectures which do not use socketcall() and where seccomp - is supported (this effectively means x86-64 and ARM, but - excludes 32-bit x86!), then nspawn will now install a - work-around seccomp filter that makes containers boot even - with audit being enabled. This works correctly only on kernels - 3.14 and newer though. TL;DR: turn audit off, still. + If systemd is compiled with libseccomp support on architectures which do + not use socketcall() and where seccomp is supported (this effectively + means x86-64 and ARM, but excludes 32-bit x86!), then nspawn will now + install a work-around seccomp filter that makes containers boot even + with audit being enabled. This works correctly only on kernels 3.14 and + newer though. TL;DR: turn audit off, still. glibc >= 2.16 libcap @@ -244,21 +241,20 @@ REQUIREMENTS: A tarball can be created with: v=250 && git archive --prefix=systemd-$v/ v$v | zstd >systemd-$v.tar.zstd - When systemd-hostnamed is used, it is strongly recommended to - install nss-myhostname to ensure that, in a world of - dynamically changing hostnames, the hostname stays resolvable - under all circumstances. In fact, systemd-hostnamed will warn - if nss-myhostname is not installed. + When systemd-hostnamed is used, it is strongly recommended to install + nss-myhostname to ensure that, in a world of dynamically changing + hostnames, the hostname stays resolvable under all circumstances. In + fact, systemd-hostnamed will warn if nss-myhostname is not installed. nss-systemd must be enabled on systemd systems, as that's required for DynamicUser= to work. Note that we ship services out-of-the-box that make use of DynamicUser= now, hence enabling nss-systemd is not optional. - Note that the build prefix for systemd must be /usr. (Moreover, - packages systemd relies on — such as D-Bus — really should use the same - prefix, otherwise you are on your own.) -Dsplit-usr=false (which is the - default and does not need to be specified) is the recommended setting. + Note that the build prefix for systemd must be /usr. (Moreover, packages + systemd relies on — such as D-Bus — really should use the same prefix, + otherwise you are on your own.) -Dsplit-usr=false (which is the default + and does not need to be specified) is the recommended setting. -Dsplit-usr=true can be used to give a semblance of support for systems with programs installed split between / and /usr. Moving everything under /usr is strongly encouraged. @@ -272,33 +268,30 @@ REQUIREMENTS: - capsh (optional, used by test-execute) USERS AND GROUPS: - Default udev rules use the following standard system group - names, which need to be resolvable by getgrnam() at any time, - even in the very early boot stages, where no other databases - and network are available: + Default udev rules use the following standard system group names, which + need to be resolvable by getgrnam() at any time, even in the very early + boot stages, where no other databases and network are available: audio, cdrom, dialout, disk, input, kmem, kvm, lp, render, tape, tty, video - During runtime, the journal daemon requires the - "systemd-journal" system group to exist. New journal files will - be readable by this group (but not writable), which may be used - to grant specific users read access. In addition, system - groups "wheel" and "adm" will be given read-only access to - journal files using systemd-tmpfiles.service. + During runtime, the journal daemon requires the "systemd-journal" system + group to exist. New journal files will be readable by this group (but + not writable), which may be used to grant specific users read access. In + addition, system groups "wheel" and "adm" will be given read-only access + to journal files using systemd-tmpfiles.service. - The journal remote daemon requires the - "systemd-journal-remote" system user and group to - exist. During execution this network facing service will drop - privileges and assume this uid/gid for security reasons. + The journal remote daemon requires the "systemd-journal-remote" system + user and group to exist. During execution this network facing service + will drop privileges and assume this uid/gid for security reasons. - Similarly, the network management daemon requires the - "systemd-network" system user and group to exist. + Similarly, the network management daemon requires the "systemd-network" + system user and group to exist. - Similarly, the name resolution daemon requires the - "systemd-resolve" system user and group to exist. + Similarly, the name resolution daemon requires the "systemd-resolve" + system user and group to exist. - Similarly, the coredump support requires the - "systemd-coredump" system user and group to exist. + Similarly, the coredump support requires the "systemd-coredump" system + user and group to exist. NSS: systemd ships with four glibc NSS modules: @@ -318,9 +311,9 @@ NSS: DynamicUser= setting in unit files.) To make use of these NSS modules, please add them to the "hosts:", - "passwd:" and "group:" lines in /etc/nsswitch.conf. The "resolve" - module should replace the glibc "dns" module in this file (and don't - worry, it chain-loads the "dns" module if it can't talk to resolved). + "passwd:" and "group:" lines in /etc/nsswitch.conf. The "resolve" module + should replace the glibc "dns" module in this file (and don't worry, it + chain-loads the "dns" module if it can't talk to resolved). The four modules should be used in the following order: From ead7e86d204e87afda31f32e55a5580f5f74ba24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 May 2022 19:23:37 +0200 Subject: [PATCH 4/5] README: recommend --no-rebuild for sudo meson install sudo and rebuilding don't mix well. C.f. fe2b7631ad20b0e518b9f566608ff5f9b84d4d8b. --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 234e205a50..0f848b3eb1 100644 --- a/README +++ b/README @@ -235,7 +235,7 @@ REQUIREMENTS: Useful commands: ninja -C build -v some/target meson test -C build/ - sudo meson install -C build/ + sudo meson install -C build/ --no-rebuild DESTDIR=... meson install -C build/ A tarball can be created with: From 5810c2042ab052a25a2293b7e0e43bb7279614d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 May 2022 19:49:20 +0200 Subject: [PATCH 5/5] README: say that recent releases are supported Prompted by the discussion in https://github.com/systemd/systemd/pull/23391. --- README | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README b/README index 0f848b3eb1..56614a778d 100644 --- a/README +++ b/README @@ -267,6 +267,26 @@ REQUIREMENTS: - strace (used by test/test-functions) - capsh (optional, used by test-execute) +POLICY FOR SUPPORT OF DISTRIBUTIONS AND ARCHITECTURES: + + systemd main branch and latest major or stable releases are generally + expected to compile on current versions of popular distributions (at + least all non-EOL versions of Fedora, Debian unstable/testing/stable, + latest Ubuntu LTS and non-LTS releases, openSUSE Tumbleweed/Leap, + CentoOS Stream 8 and 9, up-to-date Arch, etc.) We will generally + attempt to support also other non-EOL versions of various distros. + Features which would break compilation on slightly-older distributions + will only be introduced if there are significant reasons for this + (i.e. supporting them interferes with development or requires too many + resources to support). In some cases backports of specific libraries or + tools might be required. + + The policy is similar wrt. architecture support. systemd is regularly + tested on popular architectures (currently amd64, i386, arm64, ppc64el, + and s390x), but should compile and work also on other architectures, for + which support has been added. systemd will emit warnings when + architecture-specific constants are not defined. + USERS AND GROUPS: Default udev rules use the following standard system group names, which need to be resolvable by getgrnam() at any time, even in the very early