[File-rc-users] Bug#539591: [Pkg-sysvinit-devel] Future of update-rc.d in wheezy+1
formorer at debian.org
Sun Jul 22 11:14:56 UTC 2012
On Sun, 22 Jul 2012, Roger Leigh wrote:
> On Mon, Jul 02, 2012 at 12:16:31AM +0100, Roger Leigh wrote:
> > On Fri, Jun 29, 2012 at 10:53:03PM +0100, Roger Leigh wrote:
> > > On Fri, Jun 29, 2012 at 08:27:22PM +0100, Roger Leigh wrote:
> > > > The following patch implements this behaviour. While the insserv
> > > > parsing logic has been tested, it's not been tested for upgrades
> > > > or whether the whole script works correctly.
> > > >
> > > > - it needs a Depends on insserv (>= $version_with_-s)
> > > > ==> this needs your feedback so it can be uploaded.
> > > > - the preinst could be simplified to just use
> > > > update-rc.d "$script" -f defaults
> > > > if this is sufficient to update the sequence numbers in the
> > > > configuration. This probably needs running in the postinst TBH.
> > > > - this just replaces the defaults and user-provided start and stop
> > > > arguments with those provided by insserv. Other than that, there
> > > > are no changes to anything else.
> > > > - You might need to retain support for the old-style logic so that
> > > > if other scripts call update-rc.d in the gap between unpacking and
> > > > running the postinst, it won't fail. Just back out the deletions
> > > > and run those blocks only if insserv didn't run or didn't find any
> > > > matches, which are a trivial addition to the script.
> > > >
> > > > While this patch is just a proof a concept, this should be pretty much
> > > > all you need. It just needs checking and testing by someone with
> > > > file-rc expertise. If this could be done in the very near future,
> > > > then that would be great.
> > >
> > > I've attached an updated patch.
> > Another patch attached. This one is somewhat more comprehensive.
> > - insserv support is "optional". If insserv is not present, it will
> > fall back to using static sequence numbers. This will provide
> > backward compatibility for squeeze upgrades. For new installations
> > from wheezy however, it will generate runlevel.conf using insserv.
> > For wheezy+1, you'll likely be required to migrate existing users
> > to using insserv, but for now it's optional.
> > - the output functions have been refactored to include start and
> > stop entries on separate lines, because this is the common case
> > (due to the sequence numbers for start and stop making no sense to
> > be the same, unless it's pure coincidence).
> > - long obsolete code removed from maintainer scripts.
> > I've documented most of the user-visible change in NEWS.Debian and
> > the changelog.
> > The most important change is this: runlevel.conf is no longer user-
> > editable, except for adding and removing lines. When using insserv,
> > the sequence numbers mean nothing, because they are dynamically
> > generated from the dependency information. When you run update-rc.d,
> > the numbers could potentially change if a script is added or removed
> > from the middle of the sequence, causing all following scripts to be
> > renumbered. This means that only two operations are possible:
> > 1. remove a script. This is equivalent to "update-rc.d remove"
> > 2. add a script. This is equivalent to
> > "update-rc.d defaults|start|stop" (which are all equivalent from
> > the insserv POV--they all just add/update the entries for the
> > script according to the LSB dependencies)
> > So if you want to reorder the scripts, you just edit the LSB header
> > in the init script, and then run "update-rc.d foo defaults" to
> > effect the change. This is a change from the historical behaviour
> > of file-rc, but it's the logical consequence of having dependency-
> > based boot: you edit the dependencies, not the script numbers.
> > Hope this all looks reasonable. I've tested all the insserv
> > codepaths, but not the non-insserv case yet. Testing
> > file-rc -> sysv-rc migration also needs doing (the change to
> > not restore the rcS links probably needs reverting). Anyway,
> > I hope this is useful as a basis for implementing insserv
> > support in file-rc; hopefully I've done the bulk of the work and
> > it just remains to test and tweak, or back out any changes you're
> > unhappy with. I'd appreciate any feedback; I can make any further
> > changes you need if you let me know what you want.
> Hi Alexander,
> I've attached a (hopefully final) patch. We now have updated
> insserv and sysvinit packages in unstable, so it's now safe to
> enable this. It will work with or without insserv, so will
> work fine for upgrades and new installs. It now transparantly
> works to install file-rc and sysv-rc and the configuration is
> migrated both ways depending on which you install.
Great. Thanks a lot for your work, it is really appreciated. Unfortunatly my
current workload leaves me with not much time left for debian, but I'll try
to upload the package til wednesday. I want to give it a few more tests
More information about the File-rc-users