[Pkg-sysvinit-devel] default init on non-Linux platforms

Thomas Goirand zigo at debian.org
Wed Feb 19 07:13:39 UTC 2014


Hi,

I'm replying to everyone in a single mail, I hope that's fine. I'm
therefore a bit repeating myself, sorry for that.

On 02/19/2014 02:18 AM, Didier 'OdyX' Raboud wrote:
> Le mercredi, 19 février 2014, 00.56:07 Thomas Goirand a écrit :
>> On 02/18/2014 11:10 PM, Jonathan Dowland wrote:
>>> On Tue, Feb 18, 2014 at 10:55:32PM +0800, Thomas Goirand wrote:
>>>> Once I consider OpenRC ready for it, would it be ok to just replace
>>>> sysv-rc by OpenRC, and transform sysv-rc into a transitional
>>>> package?
>>>> What is the opinion of other DDs? Is there anyone which would like
>>>> to
>>>> keep the old featureless sysv-rc?
>>>
>>> What problem does that solve?
>>
>> In this way, we'd have only 2 init systems to take care of, and we
>> could start replacing init.d scripts by OpenRC runscripts *IF*
>> there's a systemd service file.
> 
> Yes. And three different daemon-starting syntaxes to manage the Wheezy-
> to-Jessie upgrades.
> 
> Again, for Jessie, I don't think it's reasonable to change the default 
> init _and_ replace the common baseline. I, for one, am not going to 
> replace my awkward-but-working sysvinit scripts by anything but 
> systemd/upstart unit files and that is doomed to happen in jessie+1 [0].

I agree. My idea is that we shouldn't change any init.d script in the
favor of OpenRC before sysv-rc is deprecated by one of the new stable
release.

> [0] Can we haz a release name?

It's been years that I've been asking that we have the release name a
way sooner. Ideally, one release earlier, so that we can prepare for the
new name soon enough (and not fix things during the freeze). But the
release team doesn't seem to agree with this! :)

On 02/19/2014 01:33 AM, Gergely Nagy wrote:
> From a maintainer PoV, I already maintain sysvinit scripts for wheezy,
> and upstream, they will have to be maintained for the forseeable
> future anyway, so maintaining it for Jessie is exactly zero work on
> my part.
>
> Adding OpenRC to the mix (something I'm not familiar with, and I'm not
> really interested in getting to know better, either) is an extra
> burden I wouldn't want to do myself.

Then great, because I am not proposing to change any init.d script right
now, at least not before OpenRC officially replaces sysv-rc. And OpenRC
is fully compatible with init.d scripts, transforming them into
runscript is optional, and IMO, not something we should do before
sysv-rc is gone.

> I wouldn't say no to a patch
> adding an OpenRC runscript, of course, but I'd rather not do it
> myself.

Thanks!

On 02/19/2014 02:12 AM, Didier 'OdyX' Raboud wrote:
> Le mercredi, 19 février 2014, 01.11:21 Thomas Goirand a écrit :
>> Actually, thinking about it a 2nd time, I think there would be a major
>> drawback in delaying to Jessie +1. If we decide that sysv-rc goes
>> away, then starting at the Jessie release, we don't have to care
>> anymore about LSB header scripts. Meaning that we could write systemd
>> service files, plus OpenRC runscripts (for those who cares about
>> OpenRC, or our non-linux ports).
>>
>> If we delay it, this means that we'd have to keep maintaining LSB
>> header scripts in Sid for all the life of Jessie (for those who cares
>> about non-linux ports or having OpenRC / sysv-rc support).
>
> I don't think that's true. If we decide that sysvinit scripts (hence
> LSB  headers) have to be supported in jessie but are deprecated, then
> jessie+1 can start to drop them completely (given reasonable
> replacement  for non-init defaults of course). Dropping them in the
> jessie suite would complicate the upgrade path from Wheezy for no
> reason that I would  value high enough.

One of us is not understanding the other here. I believe this should be
because I don't express myself well enough (this wouldn't be the first
time...). So I'll try once more:

I thing we should *not* replace any LSB header init.d scripts before
Jessie, and make them mandatory for the release. At the same time, I
think we should replace sysv-rc by OpenRC for Jessie [1]. This way,
after the release, we'd be sure there wouldn't be any sysv-rc setup out
there, and replacing LSB headers would be possible (and recommended).

On 02/19/2014 06:07 AM, Adam Borowski wrote:
> Idea: someone is working on a service->runscript interpreter, for a
> subset of common functionality.  If that tool could have a validator
> that returns ok if there's no unsupported stanza, what about running
> that validator in lintian and screaming if validation fails but there
> is no runscript?
>
> This way, there'd be three kinds of packages:
> * LSB only
> * service that's palatable for OpenRC
> * service + runscript
>
> This would greatly simplify preparing for deprecation of sysv-rc.
> Hopefully somewhere to the tune of 90-95% packages having just one
> daemon definition. Such a reduction of work could make dropping
> sysv-rc in jessie viable.

I think this could be a good idea to have such a tool. I see 3 ways to
implement it.
1/ A userland tool to generate stuff once in the debian folder: this
would mean, *not* a debhelper script, but really something that the
maintainer would just run once to generate the runscript.
2/ A debhelper script that would generate the runscript at package build
time
3/ Something at runtime in OpenRC during the boot process

I would much prefer 1/, but one may argue that this would mean more work
for package maintainers. Please tell what you think about it.

> If we need to suffer systemd but can't use the main benefit of
> new-style init systems, what the whole brouchacha was for?

I think this can happen *only* when sysv-rc is gone away. Otherwise,
writing runscript in /etc/init.d can go *boom*, and upgrade may become
difficult!

> As OpenRC
> is supposed to be a drop-in replacement, and upstart has dropped the
> towel, migrating by Jessie would allow supporting only two init
> systems by Zurg¹ with nothing but 1.05 declarative definition per
> daemon package.

That's my goal, yes.

On 02/19/2014 02:59 AM, Tollef Fog Heen wrote:
>> Once I consider OpenRC ready for it, would it be ok to just replace
>> sysv-rc by OpenRC, and transform sysv-rc into a transitional package?
>
> No, update-rc.d and invoke-rc.d still need to be provided by
> something.

OpenRC provides update-rc.d and invoke-rc.d (with some slight change,
like updating the symlinks in /run/openrc/started, but it's mainly the
same stuff)...

On 02/19/2014 08:05 AM, Henrique de Moraes Holschuh wrote:
> On Tue, 18 Feb 2014, Russ Allbery wrote:
>> There are some advantages to providing only one version with
>> knowledge of all of the init systems given that we're supporting
>> init system switching, and therefore may need to set up state for
>> init systems that aren't currently running so that switching can
>> work properly.  A good example is registering an init script with
>> insserv so that the correct S and K links are created even if the
>> system is currently booted with a different init system.
>
> I agree.

I agree as well, but it's simply not what is currently being done.
Currently, sysv-rc & OpenRC both provide update-rc.d and invoke-rc.d. If
we could move them to sysvinit-utils, why not. It'd be also nice to have
invoke-rc.d write the symlinks in /run/openrc/started no mater what, so
that OpenRC could know how to shutdown quickly after switching init
system. Note that I already patched the "service" tool for this, but it
will only do something if /run/openrc/started exists as a folder.
Suggestions welcome.

On 02/19/2014 12:26 AM, Christoph Egger wrote:
> As others have said already, sysv init is hardly going away *for*
> *jessie* (if for upgrades alone).

Did you mean sysv-rc? Please avoid confusing sysvinit and sysv-rc, it's
making the discussion difficult. If you meant sysv-rc, then that's
exactly what I would like to happen: get rid of it, and replace it by
OpenRC when upgrading to Jessie.

> This positions seems to clearly be
> supported by systemd maintainers as well (I remember particularly
> discussing things along these lines with e.g. Michael Stapelberg at
> Debconf).

It's the view of upstream systemd authors that Debian should maintain 2
init systems if we want to support non-linux ports, yes. That's what
Lennart told me at Debconf 13. It doesn't mean that I agree, but now, if
we accept the TC decision (which I hope everyone does), then that's
effectively what we will have to do.

On 02/19/2014 08:19 AM, Steven Chamberlain wrote:
> Apparently sysvinit scripts must be retained anyway for a smooth
> migration to jessie;  also for easy backporting of jessie packages to
> wheezy, and maybe other reasons.

s/sysvinit/sysv-rc/

I agree. Let's keep LSB header scripts (could we please call them this
way, instead of sysv-rc scripts?) should stay until Jessie is released.

> Non-Linux ports are likely to use
> those SysV init scripts, though we might invoke them from something
> other than sysvinit.

s/sysvinit/sysv-rc/

Reminder: OpenRC doesn't reimplement sysvinit, just sysv-rc.

> I know some maintainers would like SysV init scripts to disappear,

s/SysV init scripts/LSB header scripts/

> but the earliest I think that can happen for existing packages would
> be jessie+1.

Agreed.

> In that case, we should try to plan for a similar
> migration from jessie to jessie+1.

Yes.

> It's difficult to predict so far ahead, but if it will be a migration
> to OpenRC, maybe jessie should try to have OpenRC already in place,
> so that it will be able to use jessie+1's runscripts when they appear
> and be able to shut down cleanly when SysV init scripts are gone.

Agreed. Also because it will make jessie-backports more easy to do.

Cheers,

Thomas

[1] and make systemd the default, probably replacing sysv-rc by default
as well, since that's the TC decision




More information about the Pkg-sysvinit-devel mailing list