]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
systemd: Stop supporting sysvinit compatibility master
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 13 Feb 2026 17:56:18 +0000 (17:56 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Feb 2026 23:25:50 +0000 (23:25 +0000)
Systemd has worked with sysvinit compatibility but upstream plans to remove
this and hence we will no longer be able to support it. We need to remove this
before the LTS since the support will certainly not be there for the lifetime
of the LTS.

This patch disables that usage mode and removes some of the compatibility logic.
There is more that can be removed, this is meant just to signal to people it is
no longer supported and start that process. Further cleanup can be made over time
in later commits.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/systemd.bbclass
meta/conf/distro/include/init-manager-systemd.inc
meta/conf/distro/include/maintainers.inc
meta/recipes-core/systemd/systemd-compat-units.bb [deleted file]
meta/recipes-core/systemd/systemd_258.1.bb

index 562e71fb56eb81b1beab2bc5d733c73c91f0d16e..26eaaf1922f6305fa77608fac52434b325dd7e7e 100644 (file)
@@ -18,14 +18,12 @@ SYSTEMD_AUTO_ENABLE ??= "enable"
 # even if systemd is not in DISTRO_FEATURES.  As such don't make any changes
 # directly but check the DISTRO_FEATURES first.
 python __anonymous() {
-    # If the distro features have systemd but not sysvinit, inhibit update-rcd
-    # from doing any work so that pure-systemd images don't have redundant init
-    # files.
+    # Inhibit update-rcd from doing any work so that systemd images don't have
+    # redundant init files.
     if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
         d.appendVar("DEPENDS", " systemd-systemctl-native")
         d.appendVar("PACKAGE_WRITE_DEPS", " systemd-systemctl-native")
-        if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
-            d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
 }
 
 systemd_postinst() {
@@ -295,9 +293,5 @@ rm_sysvinit_initddir() {
 }
 
 do_install[postfuncs] += "${RMINITDIR}"
-RMINITDIR = " \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'rm_systemd_unitdir', d)} \
-    ${@'rm_sysvinit_initddir' if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and \
-                                 not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) else ''} \
-"
+RMINITDIR = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'rm_sysvinit_initddir', 'rm_systemd_unitdir', d)}"
 RMINITDIR:class-native = ""
index 0a76647459b86bed5a1621d326aef028d56907c4..1e64b8ad22688b205706e0a54ef2db75ddae23c5 100644 (file)
@@ -2,7 +2,7 @@
 DISTRO_FEATURES:append = " systemd usrmerge"
 DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " sysvinit"
 VIRTUAL-RUNTIME_init_manager ??= "systemd"
-VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
+VIRTUAL-RUNTIME_initscripts ??= ""
 VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
 VIRTUAL-RUNTIME_dev_manager ??= "systemd"
 # systemd hardcodes /root in its source codes, other values are not offically supported
index 28c3e987c9d3d9bbaa7743d51bd513b8322ee0b5..b5ab35d92a0609bde082a30e72a5ae77f43f7759 100644 (file)
@@ -823,7 +823,6 @@ RECIPE_MAINTAINER:pn-systemd-bootchart = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER:pn-systemd-bootconf = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER:pn-systemd-boot-native = "Viswanath Kraleti <quic_vkraleti@quicinc.com>"
 RECIPE_MAINTAINER:pn-systemd-conf = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER:pn-systemd-compat-units = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER:pn-systemd-machine-units = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER:pn-systemd-serialgetty = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER:pn-systemd-systemctl-native = "Chen Qi <Qi.Chen@windriver.com>"
diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
deleted file mode 100644 (file)
index 6839101..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
-LICENSE = "MIT"
-
-DEPENDS = "systemd-systemctl-native"
-INHIBIT_DEFAULT_DEPS = "1"
-
-S = "${UNPACKDIR}"
-
-inherit features_check
-
-REQUIRED_DISTRO_FEATURES = "systemd"
-
-SYSTEMD_DISABLED_SYSV_SERVICES = " \
-  busybox-udhcpc \
-  hwclock \
-  networking \
-  nfsserver \
-  nfscommon \
-  syslog.busybox \
-"
-
-do_install() {
-       for unit in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
-               systemctl --root ${D} mask $unit
-       done
-}
index d430fab72ecf277a88610f3c8a49350fa205b044..fdf4dc5bdc6580f12a7ff4a2732ebe8046a99b7e 100644 (file)
@@ -18,6 +18,10 @@ REQUIRED_DISTRO_FEATURES += "usrmerge"
 # that we don't build both udev and systemd in world builds.
 REQUIRED_DISTRO_FEATURES += "systemd"
 
+# Systemd used to work with sysvinit compatibility but upstream plans to remove
+# this and hence we can no longer support it
+CONFLICT_DISTRO_FEATURES += "sysvinit"
+
 SRC_URI += " \
            file://touchscreen.rules \
            file://00-create-volatile.conf \
@@ -62,7 +66,7 @@ PACKAGECONFIG ??= " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'coredump elfutils', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit', 'link-udev-shared', d)} \
+    link-udev-shared \
     backlight \
     binfmt \
     gshadow \
@@ -298,13 +302,6 @@ do_install() {
 
        install -m 0644 ${UNPACKDIR}/00-create-volatile.conf ${D}${nonarch_libdir}/tmpfiles.d/
 
-       if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
-               install -d ${D}${sysconfdir}/init.d
-               install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
-               sed -i s%@UDEVD@%${nonarch_libdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
-               install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
-       fi
-
        if ${@bb.utils.contains('FILESYSTEM_PERMS_TABLES', 'files/fs-perms-volatile-log.txt', 'true', 'false', d)}; then
                # base-files recipe provides /var/log which is a symlink to /var/volatile/log
                rm -rf ${D}${localstatedir}/log
@@ -839,10 +836,9 @@ INITSCRIPT_PACKAGES = "udev"
 INITSCRIPT_NAME:udev = "systemd-udevd"
 INITSCRIPT_PARAMS:udev = "start 03 S ."
 
-python __anonymous() {
-    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
-        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+INHIBIT_UPDATERCD_BBCLASS = "1"
 
+python __anonymous() {
     if bb.utils.contains('DISTRO_FEATURES', 'systemd-resolved', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'nss-resolve resolved', True, False, d):
         bb.error("DISTRO_FEATURES[systemd-resolved] requires PACKAGECONFIG[nss-resolve, resolved]")