]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Deprecate efivar SystemdOptions
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 17 Jul 2023 18:55:47 +0000 (20:55 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 18 Jul 2023 15:30:06 +0000 (17:30 +0200)
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.

NEWS
man/bootctl.xml
man/systemd.xml
src/boot/bootctl-systemd-efi-options.c

diff --git a/NEWS b/NEWS
index cf85eb889eedb9e1b265a4a6b93d89d681f2273f..c7f4c3c0f18298b536e3a6664aca004aa31e9017 100644 (file)
--- 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
index 3219ae247b3e2bf3a6b8694c63a22b56a3db8779..a03c7c76e813c67334b0e22989d890f7624ba00b 100644 (file)
         <literal>SystemdOptions</literal> EFI variable. When called with an argument, sets the variable to
         that value. See
         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> for the
-        meaning of that variable.</para></listitem>
+        meaning of that variable.</para>
+
+        <para>Note: use of <literal>SystemdOptions</literal> and this command is deprecated.</para>
+        </listitem>
       </varlistentry>
     </variablelist>
   </refsect1>
index 21c98efecd4dd855180d21e2c635e7461b019770..708bfa9f8c508efa884c309cb116d96ab45981dc 100644 (file)
     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
     <filename>/proc/cmdline</filename> and from the <literal>SystemdOptions</literal> EFI variable
-    (on EFI systems) instead. Options from <filename>/proc/cmdline</filename> have higher priority. The
-    following variables are understood:</para>
+    (on EFI systems) instead. Options from <filename>/proc/cmdline</filename> have higher priority.</para>
+
+    <para>Note: use of <literal>SystemdOptions</literal> is deprecated.</para>
+
+    <para>The following variables are understood:</para>
 
     <variablelist class='kernel-commandline-options'>
       <varlistentry>
index d0de9ef4f612a3f3e4aed23d24499545658445c5..6375f210970e5ab61a362cf9dea48bebf187dd93 100644 (file)
@@ -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;