From da7511d5758bf23727c74521951864be7d90d783 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 22 Oct 2020 14:03:38 +0200 Subject: [PATCH 1/3] update NEWS --- NEWS | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/NEWS b/NEWS index 4224fc03c5..843aefe7e3 100644 --- a/NEWS +++ b/NEWS @@ -540,6 +540,53 @@ CHANGES WITH 247 in spe: enabled in developer mode. It is thus recommended to set '-Dmode=release' in end-user and distro builds. + * systemd-cryptsetup gained support for processing detached LUKS + headers specified on the kernel command line via the header= + parameter of the luks.options= kernel command line option. The same + device/path syntax as for key files is supported for header files + like this. + + * The "net_id" built-in of udev has been updated to ignore ACPI _SUN + slot index data for devices that are connected through a PCI bridge + where the _SUN index is associated with the bridge instead of the + network device itself. Previously this would create ambiguous device + naming if multiple network interfaces were connected to the same PCI + bridge. Since this is a naming scheme incompatibility on systems that + possess hardware like this it has been introduced as new naming + scheme "v247". The previous scheme can be selected via the + "net.naming-scheme=v245" kernel command line parameter. + + * ConditionFirstBoot= semantics have been modified to be safe towards + abnormal system power-off during first boot. Specifically, the + "systemd-machine-id-commit.service" service now acts as boot + milestone indicating when the first boot process is sufficiently + complete in order to not consider the next following boot also a + first boot. If the system is reset before this unit is reached the + first time, the next boot will still be considered a first boot; once + it has been reached, no further boots will be considered a first + boot. The "first-boot-complete.target" unit now acts as official hook + point to order against this. If a service shall be run on every boot + until the first boot fully succeeds it may thus be ordered before + this target unit (and pull it in) and carry ConditionFirstBoot= + appropriately. + + * bootctl's set-default and set-oneshot commands now accept the three + special strings "@default", "@oneshot", "@current" in place of a boot + entry id. These strings are resolved to the current default and + oneshot boot loader entry, as well as the currently booted one. Thus + a command "bootctl set-default @current" may be used to make the + currently boot menu item the new default for all subsequent boots. + + * A new generic target unit "initrd-cryptsetup.target" has been added + that is supposed to pull in all encrypted volumes that shall be set + up during the initrd phase. It takes the place of "cryptsetup.target" + and "remote-cryptsetup.target" that exist during the host boot + phase. In other words, the new "initrd-cryptsetup.target" is supposed + to take the role for "initrd-fs.target", but for encrypted volumes. + + * "systemctl edit" has been updated to show the original effective unit + contents in commented form in the text editor. + CHANGES WITH 246: * The service manager gained basic support for cgroup v2 freezer. Units From 66ad93e86d5a62b92422475b538db6c4b48a0a38 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 22 Oct 2020 14:03:57 +0200 Subject: [PATCH 2/3] net_id: fix newly added naming scheme name v246 is long released. Hence the new scheme should be named v247. (Interesting, how we pretty systematically for the last releases changed the scheme only every second release) --- man/systemd.net-naming-scheme.xml | 5 +++-- src/shared/netif-naming-scheme.c | 2 +- src/shared/netif-naming-scheme.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/man/systemd.net-naming-scheme.xml b/man/systemd.net-naming-scheme.xml index b33488b9e4..e894db7cd6 100644 --- a/man/systemd.net-naming-scheme.xml +++ b/man/systemd.net-naming-scheme.xml @@ -270,7 +270,8 @@ History - The following "naming schemes" have been defined: + The following "naming schemes" have been defined (which may be chosen at system boot-up time via + the net.naming-scheme= kernel command line switch, see above: @@ -359,7 +360,7 @@ - v246 + v247 If the PCI slot is assocated with PCI bridge and that has multiple child network controllers then all of them might derive the same value of ID_NET_NAME_SLOT diff --git a/src/shared/netif-naming-scheme.c b/src/shared/netif-naming-scheme.c index 338ff661f3..0a701b0e92 100644 --- a/src/shared/netif-naming-scheme.c +++ b/src/shared/netif-naming-scheme.c @@ -12,7 +12,7 @@ static const NamingScheme naming_schemes[] = { { "v241", NAMING_V241 }, { "v243", NAMING_V243 }, { "v245", NAMING_V245 }, - { "v246", NAMING_V246 }, + { "v247", NAMING_V247 }, /* … add more schemes here, as the logic to name devices is updated … */ }; diff --git a/src/shared/netif-naming-scheme.h b/src/shared/netif-naming-scheme.h index e12464b6a3..db47d2909e 100644 --- a/src/shared/netif-naming-scheme.h +++ b/src/shared/netif-naming-scheme.h @@ -40,7 +40,7 @@ typedef enum NamingSchemeFlags { NAMING_V241 = NAMING_V240 | NAMING_STABLE_VIRTUAL_MACS, NAMING_V243 = NAMING_V241 | NAMING_NETDEVSIM | NAMING_LABEL_NOPREFIX, NAMING_V245 = NAMING_V243 | NAMING_NSPAWN_LONG_HASH, - NAMING_V246 = NAMING_V245 | NAMING_BRIDGE_NO_SLOT, + NAMING_V247 = NAMING_V245 | NAMING_BRIDGE_NO_SLOT, _NAMING_SCHEME_FLAGS_INVALID = -1, } NamingSchemeFlags; From 0d18259e0aca25cb50e933c75d614d62548d0c72 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 22 Oct 2020 14:05:13 +0200 Subject: [PATCH 3/3] clock-util: trivial clean-ups --- src/shared/clock-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/clock-util.c b/src/shared/clock-util.c index 0f0dd8281c..8669547c13 100644 --- a/src/shared/clock-util.c +++ b/src/shared/clock-util.c @@ -151,9 +151,9 @@ int clock_apply_epoch(void) { if (stat(EPOCH_FILE, &st) < 0) { if (errno != ENOENT) - log_warning_errno(errno, "Cannot stat %s: %m\n", EPOCH_FILE); + log_warning_errno(errno, "Cannot stat " EPOCH_FILE ": %m"); - epoch_usec = ((usec_t) TIME_EPOCH * USEC_PER_SEC); + epoch_usec = (usec_t) TIME_EPOCH * USEC_PER_SEC; } else epoch_usec = timespec_load(&st.st_mtim);