Bug#1138547: debian-policy: Add openRC section to starting system services

Simon McVittie <[email protected]> Sun, 31 May 2026 19:18:11 +0100
Newsgroups gmane.linux.debian.devel.policy
Message-ID <ahx7YzXWDMiGhFiS__4377.11710562638$1780252757$gmane$org@definition.pseudorandom.co.uk>
On Sun, 31 May 2026 at 18:36:10 +0200, Matthias Geiger wrote:
>After discussion with upstream I think it is best
>to install the service files to /etc/rc/init.d
...
>Another possibility would be for the services to live under /usr/, but 
>this would require coordination with upstream.

Please bear in mind that if the services are in /etc, then they will 
remain on the system when a service is removed-but-not-purged, and need 
to be carefully written to not break boot in that situation. This is one 
of the ongoing problems with LSB /etc/init.d scripts: it has been worked 
around in recent dh_installinit versions by chmod'ing them -x on package 
removal, but that's extra maintainer-script code that ideally wouldn't 
have been necessary.

Similarly, if OpenRC services have metadata similar to the LSB "INIT 
INFO" section, and there is a bug in that metadata in the service left 
behind by a package that has been removed, there's no Policy-compliant 
way to fix that bug. In the past we've had situations where some 
semi-related package has to ship a non-Policy-compliant maintainer 
script to delete a broken init script, because otherwise it would have 
broken upgrades.

I think putting the equivalents of init scripts and systemd services in 
/usr with a mechanism for overrides in /etc, similar to how systemd 
services were done, would be a good choice for new init systems.

     smcv