Several follow-ups for removal of SysV compat (#40371)

This commit is contained in:
Yu Watanabe
2026-01-18 18:02:53 +09:00
committed by GitHub
6 changed files with 15 additions and 25 deletions
+4 -2
View File
@@ -7,6 +7,10 @@ SPDX-License-Identifier: LGPL-2.1-or-later
# Compatibility with SysV
Since systemd v260, support for SysV functionalities has been removed. The documentation below is preserved for historical references only.
## Pre v260 state
systemd provides a fair degree of compatibility with the behavior exposed by the SysV init system as implemented by many distributions.
Compatibility is provided both for the user experience and the SysV scripting APIs.
However, there are some areas where compatibility is limited due to technical reasons or design decisions of systemd and the distributions.
@@ -33,5 +37,3 @@ Many of the incompatibilities are specific to distribution-specific extensions o
* systemd's handling of the existing "nofail" mount option in /etc/fstab is stricter than it used to be on some sysvinit distributions: mount points that fail and are not listed as "nofail" will cause the boot to be stopped, for security reasons, as we should not permit unprivileged code to run without everything listed — and not expressly exempted through "nofail" — being around. Hence, please mark all mounts where booting shall proceed regardless whether they succeeded or not with "nofail"
* Some SysV systems support an "rc.local" script that is supposed to be called "last" during boot. In systemd, the script is supported, but the semantics are less strict, as there is simply no concept of "last service", as the boot process is event- and request-based, parallelized and compositive. In general, it's a good idea to write proper unit files with properly defined dependencies, and avoid making use of rc.local.
* systemd assumes that the UID boundary between system and regular users is a choice the distribution makes, and not the administrator. Hence it expects this setting as compile-time option to be picked by the distribution. It will _not_ check /etc/login.defs during runtime.
Note that there are some areas where systemd currently provides a certain amount of compatibility where we expect this compatibility to be removed eventually.
+5 -5
View File
@@ -284,11 +284,11 @@
<para>Old-style daemons are usually activated exclusively on boot (and manually by the administrator)
via SysV init scripts, as detailed in the <ulink
url="http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html">LSB
Linux Standard Base Core Specification</ulink>. This method of activation is supported ubiquitously on
Linux init systems, both old-style and new-style systems. Among other issues, SysV init scripts have
the disadvantage of involving shell scripts in the boot process. New-style init systems generally use
updated versions of activation, both during boot-up and during runtime and using more minimal service
description files.</para>
Linux Standard Base Core Specification</ulink>. Among other issues, SysV init scripts have
the disadvantage of involving shell scripts in the boot process. Support for init scripts has been
phased out in modern Linux init systems, and should not be relied upon. New-style init systems
generally use updated versions of activation, both during boot-up and during runtime and using
more minimal service description files.</para>
<para>In systemd, if the developer or administrator wants to
make sure that a service or other unit is activated
+4 -3
View File
@@ -46,7 +46,8 @@ option('sysvinit-path', type : 'string', value : '/etc/init.d', deprecated : tru
option('sysvrcnd-path', type : 'string', value : '/etc/rc.d', deprecated : true,
description : 'This option is deprecated and will be removed in a future release')
option('rc-local', type : 'string', value : '/etc/rc.local', deprecated : true,
description : 'path to SysV rc.local script')
description : 'This option is deprecated and will be removed in a future release')
option('initrd', type : 'boolean',
description : 'install services for use when running systemd in initrd')
option('compat-mutable-uid-boundaries', type : 'boolean', value : false,
@@ -439,9 +440,9 @@ option('idn', type : 'boolean',
option('libidn2', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
description : 'libidn2 support')
option('libidn', type : 'feature', deprecated : true,
description : 'libidn support')
description : 'This option is deprecated and will be removed in a future release')
option('libiptc', type : 'feature', deprecated : true,
description : 'libiptc support')
description : 'This option is deprecated and will be removed in a future release')
option('qrencode', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
description : 'libqrencode support')
option('gcrypt', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
-1
View File
@@ -25,7 +25,6 @@ VolatilePackages=
systemd-networkd
systemd-portable
systemd-resolved
systemd-sysvcompat
systemd-testsuite
systemd-ukify
udev
@@ -23,11 +23,7 @@ TS="${SOURCE_DATE_EPOCH:-$(date +%s)}"
# when the upstream spec is updated
while read -r filelist; do
sed -E \
-e 's/\.gz$//; /systemd-cgroups-agent/d; s/import-pubring.gpg/import-pubring.pgp/' \
-e '/(initctl|runlevel|telinit)/ d' \
-e 's/systemd-quotacheck.service.8/systemd-quotacheck@.service.8/' \
-e '/systemd-sysv-generator/d' \
-e '/rc-local/d' \
-e 's/\.gz$//' \
"$filelist" >"/tmp/$(basename "$filelist")"
mount --bind "/tmp/$(basename "$filelist")" "$filelist"
done < <(find "pkg/$PKG_SUBDIR${GIT_SUBDIR:+/$GIT_SUBDIR}" -name "files.*")
@@ -97,6 +93,7 @@ build() {
--noprep \
--build-in-place \
--with upstream \
--without sysvcompat \
$( ((WITH_TESTS)) || echo "--nocheck") \
--define "_topdir /var/tmp" \
--define "_sourcedir $PWD/pkg/$PKG_SUBDIR${GIT_SUBDIR:+/$GIT_SUBDIR}" \
-9
View File
@@ -96,15 +96,6 @@ int verb_enable(int argc, char *argv[], void *userdata) {
if (r < 0)
return r;
/* If the operation was fully executed by the SysV compat, let's finish early */
if (strv_isempty(names)) {
if (arg_no_reload || install_client_side() != INSTALL_CLIENT_SIDE_NO)
return 0;
r = daemon_reload(ACTION_RELOAD, /* graceful= */ false);
return r > 0 ? 0 : r;
}
if (streq(verb, "disable"))
r = normalize_names(names);
else if (streq(verb, "link"))