units: restore runlevel[0-6].target aliases
This partially reverts commit e58ba80a40. Those
aliases were removed as part of the removal of sysvinit compat, but the removal
was immediately reported as a regression by users. In particular, users can
have one of those set as the default target, or use those names in Wants= or
Requires= dependencies. At least in Fedora, the removal was immediately
reverted.
When looking at our "portability and stability promise", I noticed that those
units are explicitly listed in the promise. Let's restore them upstream. They
are conditionalized under a new -Dcompat-sysv-interfaces=bool option, so that
downstreams like Arch that wasnt to strictly avoid legacy interfaces can easily
disable them. They are dropped from the docs, like we do for all deprecated
interfaces.
This commit is contained in:
@@ -71,8 +71,7 @@ Note that the promise of stability applies only after an interface has been part
|
|||||||
`emergency.target`,
|
`emergency.target`,
|
||||||
`poweroff.target`,
|
`poweroff.target`,
|
||||||
`reboot.target`,
|
`reboot.target`,
|
||||||
`halt.target`,
|
`halt.target`.
|
||||||
`runlevel[1-5].target`.
|
|
||||||
|
|
||||||
We try to always preserve backward compatibility in programmatic interfaces
|
We try to always preserve backward compatibility in programmatic interfaces
|
||||||
and intentional breakage is never introduced.
|
and intentional breakage is never introduced.
|
||||||
|
|||||||
@@ -1597,6 +1597,7 @@ foreach tuple : [
|
|||||||
['backlight'],
|
['backlight'],
|
||||||
['binfmt'],
|
['binfmt'],
|
||||||
['compat-mutable-uid-boundaries'],
|
['compat-mutable-uid-boundaries'],
|
||||||
|
['compat-sysv-interfaces'],
|
||||||
['coredump'],
|
['coredump'],
|
||||||
['efi'],
|
['efi'],
|
||||||
['environment-d'],
|
['environment-d'],
|
||||||
@@ -3185,6 +3186,7 @@ foreach tuple : [
|
|||||||
['html pages', want_html],
|
['html pages', want_html],
|
||||||
['man page indices', want_man and have_lxml],
|
['man page indices', want_man and have_lxml],
|
||||||
['compat-mutable-uid-boundaries'],
|
['compat-mutable-uid-boundaries'],
|
||||||
|
['compat-sysv-interfaces'],
|
||||||
['utmp'],
|
['utmp'],
|
||||||
['ldconfig'],
|
['ldconfig'],
|
||||||
['adm group', get_option('adm-group')],
|
['adm group', get_option('adm-group')],
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ option('initrd', type : 'boolean',
|
|||||||
description : 'install services for use when running systemd in initrd')
|
description : 'install services for use when running systemd in initrd')
|
||||||
option('compat-mutable-uid-boundaries', type : 'boolean', value : false,
|
option('compat-mutable-uid-boundaries', type : 'boolean', value : false,
|
||||||
description : 'look at uid boundaries in /etc/login.defs for compatibility')
|
description : 'look at uid boundaries in /etc/login.defs for compatibility')
|
||||||
|
option('compat-sysv-interfaces', type : 'boolean', value : true,
|
||||||
|
description : 'keep legacy SysV interfaces for compatibility')
|
||||||
|
|
||||||
option('quotaon-path', type : 'string', description : 'path to quotaon')
|
option('quotaon-path', type : 'string', description : 'path to quotaon')
|
||||||
option('quotacheck-path', type : 'string', description : 'path to quotacheck')
|
option('quotacheck-path', type : 'string', description : 'path to quotacheck')
|
||||||
|
|||||||
+16
-5
@@ -1,5 +1,7 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
|
runlevels = conf.get('ENABLE_COMPAT_SYSV_INTERFACES') == 1
|
||||||
|
|
||||||
units = [
|
units = [
|
||||||
{ 'file' : 'basic.target' },
|
{ 'file' : 'basic.target' },
|
||||||
{ 'file' : 'blockdev@.target' },
|
{ 'file' : 'blockdev@.target' },
|
||||||
@@ -46,7 +48,7 @@ units = [
|
|||||||
{ 'file' : 'getty@.service.in' },
|
{ 'file' : 'getty@.service.in' },
|
||||||
{
|
{
|
||||||
'file' : 'graphical.target',
|
'file' : 'graphical.target',
|
||||||
'symlinks' : ['default.target'],
|
'symlinks' : ['default.target'] + (runlevels ? ['runlevel5.target'] : []),
|
||||||
},
|
},
|
||||||
{ 'file' : 'halt.target' },
|
{ 'file' : 'halt.target' },
|
||||||
{
|
{
|
||||||
@@ -139,7 +141,10 @@ units = [
|
|||||||
'conditions' : ['ENABLE_MACHINED'],
|
'conditions' : ['ENABLE_MACHINED'],
|
||||||
},
|
},
|
||||||
{ 'file' : 'modprobe@.service' },
|
{ 'file' : 'modprobe@.service' },
|
||||||
{ 'file' : 'multi-user.target' },
|
{
|
||||||
|
'file' : 'multi-user.target',
|
||||||
|
'symlinks' : runlevels ? ['runlevel2.target', 'runlevel3.target', 'runlevel4.target'] : [],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'file' : 'systemd-mute-console.socket',
|
'file' : 'systemd-mute-console.socket',
|
||||||
'symlinks' : ['sockets.target.wants/']
|
'symlinks' : ['sockets.target.wants/']
|
||||||
@@ -152,7 +157,10 @@ units = [
|
|||||||
{ 'file' : 'nss-lookup.target' },
|
{ 'file' : 'nss-lookup.target' },
|
||||||
{ 'file' : 'nss-user-lookup.target' },
|
{ 'file' : 'nss-user-lookup.target' },
|
||||||
{ 'file' : 'paths.target' },
|
{ 'file' : 'paths.target' },
|
||||||
{ 'file' : 'poweroff.target' },
|
{
|
||||||
|
'file' : 'poweroff.target',
|
||||||
|
'symlinks' : runlevels ? ['runlevel0.target'] : [],
|
||||||
|
},
|
||||||
{ 'file' : 'printer.target' },
|
{ 'file' : 'printer.target' },
|
||||||
{
|
{
|
||||||
'file' : 'proc-sys-fs-binfmt_misc.automount',
|
'file' : 'proc-sys-fs-binfmt_misc.automount',
|
||||||
@@ -173,7 +181,7 @@ units = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
'file' : 'reboot.target',
|
'file' : 'reboot.target',
|
||||||
'symlinks' : ['ctrl-alt-del.target'],
|
'symlinks' : ['ctrl-alt-del.target'] + (runlevels ? ['runlevel6.target'] : []),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'file' : 'remote-cryptsetup.target',
|
'file' : 'remote-cryptsetup.target',
|
||||||
@@ -193,7 +201,10 @@ units = [
|
|||||||
'symlinks' : ['initrd-root-device.target.wants/'],
|
'symlinks' : ['initrd-root-device.target.wants/'],
|
||||||
},
|
},
|
||||||
{ 'file' : 'rescue.service.in' },
|
{ 'file' : 'rescue.service.in' },
|
||||||
{ 'file' : 'rescue.target' },
|
{
|
||||||
|
'file' : 'rescue.target',
|
||||||
|
'symlinks' : runlevels ? ['runlevel1.target'] : [],
|
||||||
|
},
|
||||||
{ 'file' : 'rpcbind.target' },
|
{ 'file' : 'rpcbind.target' },
|
||||||
{ 'file' : 'serial-getty@.service.in' },
|
{ 'file' : 'serial-getty@.service.in' },
|
||||||
{ 'file' : 'shutdown.target' },
|
{ 'file' : 'shutdown.target' },
|
||||||
|
|||||||
Reference in New Issue
Block a user