]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: add unit that can auto-enables all suggested component/features
authorLennart Poettering <lennart@amutable.com>
Wed, 1 Jul 2026 17:51:51 +0000 (19:51 +0200)
committerLennart Poettering <lennart@amutable.com>
Wed, 15 Jul 2026 11:27:48 +0000 (13:27 +0200)
if enabled it will plug itself before systemd-sysupdate-update.service
and enable every component + feature that is suggested.

man/rules/meson.build
man/systemd-sysupdate.xml
units/meson.build
units/systemd-sysupdate-auto-enable.service [new file with mode: 0644]

index 486f565815f56e07cf95ace7aa435929941ea913..3dafcc13decdc6a916e584606356b22deac18c65 100644 (file)
@@ -1277,7 +1277,8 @@ manpages = [
   ''],
  ['systemd-sysupdate',
   '8',
-  ['systemd-sysupdate-reboot.service',
+  ['systemd-sysupdate-auto-enable.service',
+   'systemd-sysupdate-reboot.service',
    'systemd-sysupdate-reboot.timer',
    'systemd-sysupdate-update.service',
    'systemd-sysupdate-update.timer',
index 2855c650c8856d7c52e909a8500b5d6832d8df7c..0491b7118fbe45270223ebbcc5f8e812c1b70547 100644 (file)
@@ -22,6 +22,7 @@
     <refname>systemd-sysupdate-update.timer</refname>
     <refname>systemd-sysupdate-reboot.service</refname>
     <refname>systemd-sysupdate-reboot.timer</refname>
+    <refname>systemd-sysupdate-auto-enable.service</refname>
 
     <!-- Compatibility symlinks for old names of systemd-sysupdate-update.{service,timer} -->
     <refname>systemd-sysupdate.service</refname>
     appropriate time (i.e. typically at night). The two sets of service/timer units may be enabled
     separately.</para>
 
+    <para>The <filename>systemd-sysupdate-auto-enable.service</filename> system service automatically enables all
+    suggested components and all features of the enabled components before each update. It is ordered before and
+    pulled in by <filename>systemd-sysupdate-update.service</filename>, and is not enabled by default. Enable it
+    if newly suggested components and features shall be picked up automatically as they become available, rather
+    than requiring manual <command>enable-component</command>/<command>enable-feature</command> invocations.</para>
+
     <para>For details about transfer files and examples see
     <citerefentry><refentrytitle>sysupdate.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
   </refsect1>
index c07e5712b0694cd651785c292722410018770403..a4b0dc61cc95d75ad05a5790753e5eb89726b205 100644 (file)
@@ -872,6 +872,10 @@ units = [
           'file' : 'systemd-sysinstall@.service',
           'conditions' : ['ENABLE_SYSINSTALL'],
         },
+        {
+          'file' : 'systemd-sysupdate-auto-enable.service',
+          'conditions' : ['ENABLE_SYSUPDATE'],
+        },
         {
           'file' : 'systemd-sysupdate-reboot.service',
           'conditions' : ['ENABLE_SYSUPDATE'],
diff --git a/units/systemd-sysupdate-auto-enable.service b/units/systemd-sysupdate-auto-enable.service
new file mode 100644 (file)
index 0000000..d2f4a22
--- /dev/null
@@ -0,0 +1,21 @@
+#  SPDX-License-Identifier: LGPL-2.1-or-later
+#
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Automatically Enable All Suggested Components & Features for System Updates
+Documentation=man:systemd-sysupdate-auto-enable.service(8)
+Before=systemd-sysupdate-update.service
+
+[Service]
+Type=oneshot
+ExecStart=systemd-sysupdate enable-component --component-suggested
+ExecStart=systemd-sysupdate enable-feature --component-all --feature-all
+
+[Install]
+WantedBy=systemd-sysupdate-update.service