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.
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.
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.
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421