From: Zbigniew Jędrzejewski-Szmek Date: Mon, 17 Jul 2023 18:55:47 +0000 (+0200) Subject: Deprecate efivar SystemdOptions X-Git-Tag: v254-rc3~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e90814f0a4d8924709899cd59eb00c1d8a64ba6;p=thirdparty%2Fsystemd.git Deprecate efivar SystemdOptions As mentioned in the NEWS entry, it seems to see very little use, but adds complexity in our code. It was added mainly with the goal of making it easier for people using grub2 to modify their boot configuration, but grub2 is gaining support for BLS snippets. On the systemd side, we now have credentials. So let's deprecate this, and if there's no outcry, remove it in a few releases. --- diff --git a/NEWS b/NEWS index cf85eb889ee..c7f4c3c0f18 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,13 @@ CHANGES WITH 254 in spe: *now* to include a native systemd unit file instead of a legacy System V script to retain compatibility with future systemd releases. + * Support for the SystemdOptions EFI variable is deprecated. + 'bootctl systemd-efi-options' will emit a warning when used. It seems + that this feature is little-used and it is better to use alternative + approaches like credentials and confexts. The plan is to drop support + altogether at a later point, but this might be revisited based on + user feedback. + * EnvironmentFile= now treats the line following a comment line trailing with escape as a non comment line. For details, see: https://github.com/systemd/systemd/issues/27975 diff --git a/man/bootctl.xml b/man/bootctl.xml index 3219ae247b3..a03c7c76e81 100644 --- a/man/bootctl.xml +++ b/man/bootctl.xml @@ -77,7 +77,10 @@ SystemdOptions EFI variable. When called with an argument, sets the variable to that value. See systemd1 for the - meaning of that variable. + meaning of that variable. + + Note: use of SystemdOptions and this command is deprecated. + diff --git a/man/systemd.xml b/man/systemd.xml index 21c98efecd4..708bfa9f8c5 100644 --- a/man/systemd.xml +++ b/man/systemd.xml @@ -769,8 +769,11 @@ the command line arguments passed to systemd itself, next to any of the command line options listed in the Options section above. If run outside of Linux containers, these arguments are parsed from /proc/cmdline and from the SystemdOptions EFI variable - (on EFI systems) instead. Options from /proc/cmdline have higher priority. The - following variables are understood: + (on EFI systems) instead. Options from /proc/cmdline have higher priority. + + Note: use of SystemdOptions is deprecated. + + The following variables are understood: diff --git a/src/boot/bootctl-systemd-efi-options.c b/src/boot/bootctl-systemd-efi-options.c index d0de9ef4f61..6375f210970 100644 --- a/src/boot/bootctl-systemd-efi-options.c +++ b/src/boot/bootctl-systemd-efi-options.c @@ -1,12 +1,16 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "alloc-util.h" +#include "bootctl.h" #include "bootctl-systemd-efi-options.h" #include "efi-loader.h" int verb_systemd_efi_options(int argc, char *argv[], void *userdata) { int r; + if (!arg_quiet) + log_notice("Use of the SystemdOptions EFI variable is deprecated."); + if (argc == 1) { _cleanup_free_ char *line = NULL, *new = NULL;