Subject: bug#881 closed by Mark Hindley <[email-masked]> (Re: bug#881: invoke-rc.d: Policy layer may override runlevel constraint)

From: "Devuan bug Tracking System" <[email-masked]>
Date: Sun, 06 Apr 2025 08:38:04 +0000

This is an automatic notification regarding your bug report
which was filed against the init-system-helpers package:

#881: invoke-rc.d: Policy layer may override runlevel constraint

It has been closed by Mark Hindley <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Mark Hindley <[email-masked]> by
replying to this email.

-- 
881: https://bugs.devuan.org/cgi/bugreport.cgi?bug=881
Devuan Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#881: invoke-rc.d: Policy layer may override runlevel constraint
From: Mark Hindley <[email-masked]>
To: Opty <[email-masked]>
Cc: [email-masked]
Date: Sun, 6 Apr 2025 09:37:14 +0100

Opty,

Thanks,

On Thu, Apr 03, 2025 at 01:16:40PM +0200, Opty wrote:
> > That isn't conventional Debian practice.
> 
> I could continue using the policy layer unmodified, selectively allow
> what I need (extra work) and keep denied the rest
> 
> -or-
> 
> modify invoke-rc.d or rather policy-rc.d to check
> $DPKG_MAINTSCRIPT_NAME (to detect preinst, postinst, prerm or postrm
> script), crosscheck $DPKG_MAINTSCRIPT_PACKAGE vs. $INITSCRIPTID
> (substring of each other) to allow calling other scripts and
> eventually do nothing, maybe ask the administrator.
> 
> Both seem unintentional error- or side-effect-prone.
> 
> I could also just modify invoke-rc.d to skip the querypolicy call in
> case of K link.

I find it hard to see an actionable bug here. I think invoke-rc.d and
policy-rcd-declarative* are behaving as advertised. Your requirements appear
different to what policy-rcd-declarative-deny-all provides. So, as Simon
suggested, you need to write your own policy script to meet your requirements.

Therefore I will close this.

If you think I have missed something, please feel free to reopen.

Thanks

Mark

Subject: invoke-rc.d: Policy layer may override runlevel constraint
From: Opty <[email-masked]>
To: [email-masked]
Date: Tue, 1 Apr 2025 14:13:44 +0200

Package: init-system-helpers
Version: 1.65.2devuan1

querypolicy call in invoke-rc.d may override previous result of K link
test. When using permissive default policy this leads to e.g. unwanted
start of a disabled service after package upgrade.

Regards,
Opty