I've packaged "simplemonitor". The package adds a simplemonitor user,
and a systemd service to run simplemonitor under this user and using the configuration files from /etc/simplemonitor
I know that some user did "apt install simplemonitor" and then tried to
use simplemonitor without systemd (which is possible, but reinventing
the wheel). The user tried it that because he didn't realise that simplemonitor was integrated with systemd, the simplemonitor system
user, checks on startup, etc.
My question is: how to inform users about systemd integration?
But I wonder of any more standard ways to do that, what other packages
do, etc.
Hello,
I've packaged "simplemonitor". The package adds a simplemonitor user,
and a systemd service to run simplemonitor under this user and using
the configuration files from /etc/simplemonitor
I know that some user did "apt install simplemonitor" and then tried
to use simplemonitor without systemd (which is possible, but
reinventing the wheel). The user tried it that because he didn't
realise that simplemonitor was integrated with systemd, the
simplemonitor system user, checks on startup, etc.
My question is: how to inform users about systemd integration?
As a user, what I do when I wonder about that is "dpkg -L PACKAGE"
and see if I spot some systemd service files. And also tend to read /usr/share/doc/PACKAGE/changelog.Debian.gz or related files to see if
the maintainer wrote any information there.
To be more proactive about that, I thought to add a debconf template
with something such as (untested, just the idea):
----
Template: simplemonitor/systemd-info
Type: note
_Description: Usage of simplemonitor
The simplemonitor package integrates with systemd. Set it up in
/etc/simplemonitor and then use:
sudo systemctl restart simplemonitor
----
But I wonder of any more standard ways to do that, what other packages
do, etc.
Thanks very much!
Hi,
On Mon, 24 Feb 2025 11:48:03 +0100
Carles Pina i Estany <carles@pina.cat> wrote:
Hello,
I've packaged "simplemonitor". The package adds a simplemonitor user,
and a systemd service to run simplemonitor under this user and using
the configuration files from /etc/simplemonitor
I know that some user did "apt install simplemonitor" and then tried
to use simplemonitor without systemd (which is possible, but
reinventing the wheel). The user tried it that because he didn't
realise that simplemonitor was integrated with systemd, the
simplemonitor system user, checks on startup, etc.
My question is: how to inform users about systemd integration?
If your package uses dh_installsystemd to integrate with systemd, that
should be enough.
My question is: how to inform users about systemd integration?
Unpacking simplemonitor (1.13.0-1) ...
Setting up simplemonitor (1.13.0-1) ...
Created symlink '/etc/systemd/system/multi-user.target.wants/simplemonitor.service' → '/usr/lib/systemd/system/simplemonitor.service'. Processing triggers
for man-db (2.13.0-1) ... -----
When you said "that should be enough.": do you mean that for a user to
know that the package is systemd ready this is enough?
Thank you very much,
Hi,
On Tue, 25 Feb 2025 06:57:36 +0100
Carles Pina i Estany <carles@pina.cat> wrote:
Unpacking simplemonitor (1.13.0-1) ...
Setting up simplemonitor (1.13.0-1) ...
Created symlink '/etc/systemd/system/multi-user.target.wants/simplemonitor.service' → '/usr/lib/systemd/system/simplemonitor.service'. Processing triggers
for man-db (2.13.0-1) ... -----
When you said "that should be enough.": do you mean that for a user to
know that the package is systemd ready this is enough?
Thank you very much,
Well, I don't use systemd so I'm not able to tell the exact command
but just looking at the man page I think the user can try
systemctl list-units simplemonitor
or
systemctl status simplemonitor
or
systemctl status --all
in general I think is reasonable to expect that a user that wants to
play with services is able to use systemctl to search and query a
service status.
If your package uses dh_installsystemd with default options, the service should be unmasked, enabled and started by default at install, so your service comes ready for use even without using systemctl..
So I still think that there is room to inform users that a package is
systemd ready and the name of the service and I wondered if there is a
way to do it.
On Wed, 26 Feb 2025 06:37:43 +0100
Carles Pina i Estany <carles@pina.cat> wrote:
So I still think that there is room to inform users that a package is systemd ready and the name of the service and I wondered if there is a
way to do it.
then you can use the package description to mention that the package
include a simplemonitor systemd service
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).
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?
On Wed, 26 Feb 2025 06:37:43 +0100
Carles Pina i Estany <carles@pina.cat> wrote:
So I still think that there is room to inform users that a package is systemd ready and the name of the service and I wondered if there is a
way to do it.
then you can use the package description to mention that the package
include a simplemonitor systemd service
Hi,
Thanks all for the ideas in this thread about how to notify users that a package is ready to be used via systemd service and not used manually.
Some users of simplemonitor missed it and it complicated their lifes.
On 26 Feb 2025 at 10:20:24, Jérémy Lal wrote:
Le mer. 26 févr. 2025 à 10:09, lorenzo <plorenzo@disroot.org> a écrit :
On Wed, 26 Feb 2025 06:37:43 +0100
Carles Pina i Estany <carles@pina.cat> wrote:
So I still think that there is room to inform users that a package is systemd ready and the name of the service and I wondered if there is a way to do it.
then you can use the package description to mention that the package include a simplemonitor systemd service
And/or explain what needs to be done to work in README.Debian,
which is somewhat missing, btw, in the syncthing package.
Since I asked, I saw at least three packages that ask a question in the postinst via po-debconf. The last one that I see asking this type of
question (I am reviewing/managing some po-debconf translations) is
mopidy. I haven't checked the implementation and wether is a systemd integration but the question is:
"""
You have the option of starting the Mopidy server automatically on
system boot. If in doubt, it is suggested to not start it automatically
on boot.
"""
Le mer. 26 févr. 2025 à 10:09, lorenzo <plorenzo@disroot.org> a écrit :
On Wed, 26 Feb 2025 06:37:43 +0100
Carles Pina i Estany <carles@pina.cat> wrote:
So I still think that there is room to inform users that a package is systemd ready and the name of the service and I wondered if there is a way to do it.
then you can use the package description to mention that the package include a simplemonitor systemd service
And/or explain what needs to be done to work in README.Debian,
which is somewhat missing, btw, in the syncthing package.
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.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 547 |
Nodes: | 16 (2 / 14) |
Uptime: | 60:14:44 |
Calls: | 10,398 |
Calls today: | 6 |
Files: | 14,067 |
Messages: | 6,417,474 |
Posted today: | 1 |