Hi Marc, On 02 Apr 2025 at 08:55:25, Marc Haber wrote: > On Wed, Apr 02, 2025 at 07:20:32AM +0100, Carles Pina i Estany wrote: > > I applied some of the suggestions of this thread in my package, thanks > > very much. > > > > On the other hand, while doing something else, I saw a package that had > > a po-debconf template asking something similar to: > > > > "Enable XXXX at boot time?" > > > > (or perhaps was "Enable XXXX via a service in systemd?" (or equivalent > > question). > > This is wildly considered an antipattern. Don't do that. I didn't see your email until now. Now: after I found two packages doing that, so sorry if I'm finger-pointing! (it was just two nice phrases). > > Policy 9.3 say that packages providing system services "should" arrange for > those services to be automatically started. It is stil valid to arrange for > the service not to be automatically started, see policy 9.3.3.1. The header > of that section still says "managing the links", but I'd say that those > things apply analogously to systemd. I will review that policy, thanks very much. > > For a package that is usually interesting to run it from systemd, but > > some user might want to opt-out... is there any policy on against > > asking? > > It used to be common to have a setting in /etc/default/package, but that's > also an antipattern. Users who don't want a service running should use the > methods offered by the init system to disable those things (policy 9.3.3.1, > near the end). > > For packages starting and stopping system services, systemd integration is > mandatory, so this is nothing to brag about (policy 9.3.1) explicitly. If a > package runs a service that might be unexpected, that could of course be > mentioned in the package description. > > Greetings > Marc > > P.S.: Maybe I should mention in atop's description that the package arranges > for an atop daemon running in the background. Thanks for bringing this up. this is an example of a package that I wouldn't expect it. I will look into the package, but I see that atop has: Pre-Depends: init-system-helpers (>= 1.54~) is this in order to use the systemd service? To me, as a user, this give me a clue about that. Should all packages using systemd try to have anything like that? (retorical question if you want, I will look in why not a common pattern). Thank you, -- Carles Pina i Estany https://carles.pina.cat | carles@pina.cat | cpina@debian.org
Attachment:
signature.asc
Description: PGP signature