[Pkg-sysvinit-devel] Bug#660824: sysvinit: Please include support for upstart in startpar
Steve Langasek
steve.langasek at canonical.com
Wed Feb 22 08:08:30 UTC 2012
Package: sysvinit
Version: 2.88dsf-22
Severity: wishlist
Hi there,
It seems that the discussion about this patch petered out long ago on
pkg-sysvinit-devel
(http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/2011-October/005345.html),
so it's probably time to submit a proper bug report to the BTS (especially
since sysvinit appears to be under new maintenance).
Pursuant to bug #591791 against Debian Policy about permitting alternate
init systems in Debian, I've prepared a patch against sysvinit which would
make startpar aware that a given job is implemented as an upstart job
instead of a SysV init script and that startpar should defer to upstart to
satisfy the dependency.
This enables insserv/startpar-based dependency boot to be used for sysvinit
in conjunction with upstart as /sbin/init and native upstart jobs as
dependencies, and is the first step towards having upstart be genuinely
usable on Debian. It also rolls back the previous /lib/init/upstart-job
approach, which never worked right with startpar due to the inability to
express dependency information. As a result, packages shipping upstart jobs
should now ship real init scripts in parallel (per the policy bug
discussion), which means some changes to debhelper are wanted before this
goes into effect.
It does *not* allow bidirectional dependencies between upstart jobs and init
scripts. It's assumed that a system that runs upstart will be converted
from the bottom up - starting with rcS.d, which more or less needs to be
converted as a block anyway.
I've tested this patch to be regression-free on sysvinit as well as working
with upstart, and verified that the package still builds on non-Linux Debian
ports after applying (upstart doesn't run there anyway, so it's a simple
#ifdef :P). I've also taken care to avoid adding any new runtime library
dependencies here; it would have been nice to use libdbus for talking to
upstart, but I guess some might resist such a change. :-)
The patch includes two mostly unrelated changes that warrant a mention:
- debian/rules has been patched to pass CFLAGS from dpkg-buildflags to the
startpar makefile. Not really related, but was invaluable for having a
proper debug build when testing.
- The patch to startpar.c includes a change to call checkdevpts() early on.
this is a bugfix in its own right; unless devpts support is checked at
the top of the loop, tasks will be launched as "interactive", meaning
they won't be run in parallel. This at least impacts the first process
launched, I haven't checked if it affects others. Apparently SuSE never
had to deal with this bug because the runtime devpts checking code was
ifdef'ed out there. In any case, I found a strange interaction between
interactive tasks and upstart jobs; so this fix is something of a
prerequisite (and may indicate a latent bug in my patch).
Please consider including this patch in sysvinit for wheezy.
Thanks,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sysvinit-startpar-upstart.patch
Type: text/x-diff
Size: 21823 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20120222/276d4737/attachment-0001.patch>
More information about the Pkg-sysvinit-devel
mailing list