Bug#843761: invoke-rc.d: Kill 600 birds with one stone (a.k.a. automatic policy-rc.d for init-less chroots)
Control: tags -1 pending On 20 December 2016 at 21:52, Michael Biebl wrote: > Am 21.12.2016 um 01:29 schrieb Felipe Sateler: > >> Michael, from the discussion on IRC I did not end up entirely clear if >> you are OK with this change or not. Could you please comment, if we >> can apply this patch? >> > > I'm ok with this change. My reservation on IRC was mainly about this not > directly solving the lsb-base issue. > But the patch on itself is fine. Thanks, applied. -- Saludos, Felipe Sateler
Bug#843761: invoke-rc.d: Kill 600 birds with one stone (a.k.a. automatic policy-rc.d for init-less chroots)
Am 21.12.2016 um 01:29 schrieb Felipe Sateler: > Michael, from the discussion on IRC I did not end up entirely clear if > you are OK with this change or not. Could you please comment, if we > can apply this patch? > I'm ok with this change. My reservation on IRC was mainly about this not directly solving the lsb-base issue. But the patch on itself is fine. Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#843761: invoke-rc.d: Kill 600 birds with one stone (a.k.a. automatic policy-rc.d for init-less chroots)
On Thu, 10 Nov 2016 09:15:40 +0100 Martin Pitt wrote: > Hello Andreas, > > Andreas Henriksson [2016-11-09 11:08 +0100]: > > As discussed on IRC we seem to agree that an init-less chroot which does > > not have a policy-rc.d blocking service actions isn't a sane > > configuration. This patch auto-detects the situation and skips running > > the invoke-rc.d action (aka policy-rc.d code 101), unless --force was > > given. In both situations a warning message is (also) printed. > > I must absolutely and loudly protest against mass-killing birds! ☺ > > However, I do like the patch, it would give us a much saner behaviour > of package installation in self-created chroots. mk-sbuild and friends > do install a policy-rc.d already, but I've seen this come up more than > once already. > > In the past where SysV and /etc/init.d/ were "the thing" it could > still be argued that one doesn't need an explicit "init system" for > some situations, but with Debian supporting multiple ones (and systemd > by default) this is entirely moot IMHO. > > Michael, any others: Do you see any downside of this? I also like this patch. invoke-rc.d is a maintainer interface for starting/stopping services at package installation time (plus a few other situations like hook scripts). In that context, it makes no sense for a maintainer script to start a script in an init-less chroot. If one by any chance actually needs to do so, then it should not use invoke-rc.d. Michael, from the discussion on IRC I did not end up entirely clear if you are OK with this change or not. Could you please comment, if we can apply this patch? Saludos
Bug#843761: invoke-rc.d: Kill 600 birds with one stone (a.k.a. automatic policy-rc.d for init-less chroots)
* Martin Pitt [161210 20:50]: > However, I do like the patch, it would give us a much saner behaviour > of package installation in self-created chroots. mk-sbuild and friends > do install a policy-rc.d already, but I've seen this come up more than > once already. > Michael, any others: Do you see any downside of this? >From a sysadmin PoV: please implement this. Cheers, -- christian hofstaedtler
Bug#843761: invoke-rc.d: Kill 600 birds with one stone (a.k.a. automatic policy-rc.d for init-less chroots)
Hello Andreas, Andreas Henriksson [2016-11-09 11:08 +0100]: > As discussed on IRC we seem to agree that an init-less chroot which does > not have a policy-rc.d blocking service actions isn't a sane > configuration. This patch auto-detects the situation and skips running > the invoke-rc.d action (aka policy-rc.d code 101), unless --force was > given. In both situations a warning message is (also) printed. I must absolutely and loudly protest against mass-killing birds! ☺ However, I do like the patch, it would give us a much saner behaviour of package installation in self-created chroots. mk-sbuild and friends do install a policy-rc.d already, but I've seen this come up more than once already. In the past where SysV and /etc/init.d/ were "the thing" it could still be argued that one doesn't need an explicit "init system" for some situations, but with Debian supporting multiple ones (and systemd by default) this is entirely moot IMHO. Michael, any others: Do you see any downside of this? Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
Bug#843761: invoke-rc.d: Kill 600 birds with one stone (a.k.a. automatic policy-rc.d for init-less chroots)
Package: init-system-helpers Version: 1.46 Severity: normal Tags: patch X-Debbugs-CC: Chris Lamb , Niels Thykier Dear Maintainer, As discussed on IRC we seem to agree that an init-less chroot which does not have a policy-rc.d blocking service actions isn't a sane configuration. This patch auto-detects the situation and skips running the invoke-rc.d action (aka policy-rc.d code 101), unless --force was given. In both situations a warning message is (also) printed. Please see attached patch. For further background see #838966 and #838997 (With this patch applied I hope we can get the change in #838997 reverted from lintian as I plainly think the check suggests a bad idea.) Regards, Andreas Henriksson >From aee6f70eb7031d8f7baaca23b89e5639b02773d3 Mon Sep 17 00:00:00 2001 From: Andreas Henriksson Date: Wed, 9 Nov 2016 10:43:31 +0100 Subject: [PATCH] Do policy-rc.d automatically in init-less chroots See #838966 and #838997 for background. A debootstrap with --variant=minbase will have lsb-base installed, so the person running into this issue must have: - not added a policy-rc.d in his init-less chroot - removed lsb-base manually (and what else?) This patch auto-detects the situation with init-less chroot that's missing a policy-rc.d and deals with it automatically (plus gives a warning message). --- script/invoke-rc.d | 9 + 1 file changed, 9 insertions(+) diff --git a/script/invoke-rc.d b/script/invoke-rc.d index ed9028d..6e0a05c 100755 --- a/script/invoke-rc.d +++ b/script/invoke-rc.d @@ -176,6 +176,15 @@ if test "x${POLICYHELPER}" != x && test -x "${POLICYHELPER}" ; then ;; esac else +if test ! -e "/sbin/init" ; then +if test x${FORCE} != x ; then +printerror "WARNING: No init system and policy-rc.d missing, but force specified so proceeding." +else +printerror "WARNING: No init system and policy-rc.d missing! Defaulting to block." +RC=101 +fi +fi + if test x${RC} = x ; then RC=104 fi -- 2.10.2