• Re: How to inform users package is ready to use systemd

    From =?UTF-8?B?SsOpcsOpbXkgTGFs?=@21:1/5 to All on Wed Feb 26 10:40:03 2025
    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.

    <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Le mer. 26 févr. 2025 à 10:09, lorenzo &lt;<a href="mailto:plorenzo@disroot.org">plorenzo@disroot.org</a>&gt; a écrit :<br><
    /div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 26 Feb 2025 06:37:43 +0100<br>
    Carles Pina i Estany &lt;<a href="mailto:carles@pina.cat" target="_blank">carles@pina.cat</a>&gt; wrote:<br>

    &gt; So I still think that there is room to inform users that a package is<br> &gt; systemd ready and the name of the service and I wondered if there is a<br> &gt; way to do it.<br>

    then you can use the package description to mention that the package<br> include a simplemonitor systemd service<br></blockquote><div><br></div><div> And/or explain what needs to be done to work in README.Debian,</div><div>which is somewhat missing, btw, in the syncthing package.</div></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to Carles Pina i Estany on Mon Feb 24 12:40:02 2025
    On Mon, Feb 24, 2025 at 11:48:03AM +0100, Carles Pina i Estany wrote:
    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?

    NEWS.Debian or nothing.

    But I wonder of any more standard ways to do that, what other packages
    do, etc.

    The standard way is to not notify about any non-critical changes.


    --
    WBR, wRAR

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAme8VRAtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh hz4P/3NdUdPS5KZPz+MjWZg2R+QxkBPTVpTxrTt86HqmOq/rkwpKBvi5hzSvKEAO Om1Tc7wHY1Vjm428iwM9fgrMJM8WuDPd1BJNM1zp/bF7TDLv5U8Nt41doJfw5CRX +86qTAEmPCqFzMP9UnPPxBCagiO739rxCj8SJuWxZNzK7hWG+LeyIlTHry+njp0h WGIUHvjirUMVxlKFvaR/zeSKn2eh+UWXaHUJUrQYnb0ifT+dPN7vDCnaQ1Cvlcly gleprVv3zGaBz8Mp32OvTbR+eoR+Ev1FJQtu1G0H3cGL3APq/XRdGy+udogIV3EN PSDf5wMBBqevWdIdtqMKPjF6YizknrBjYk4P+VSax15e2RHXS49FpS6rt6OJOks5 OOFfOG1VUGnHImkLKO1iBliPZR6fS4FQbSEYsr222lJGzBpqUH3qI1vpOXjb0OXD L2VDOsidgXwDTPsq69za384VIyQvpGFhqSLUoUyg6esGzWhIP4V9VMdZPTkqh1F8 SkHaW/4wcs79Y3IaJE/m34Ba5d7sQOItR1AQ9NLhml7Dc0FockGijecaGxh4WzGH wk0k19KtC50ZoUY4pWvgVsxOA5CJsNJPfx3Xx7Ft42anMtM0nZ95GvYcWGruolkC L/XsFtFtHJgkARqtytc3lnhwWWnMnthqwEm4QeYNmZlyFoFg
    =dR0H
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carles Pina i Estany@21:1/5 to All on Mon Feb 24 11:48:03 2025
    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!

    --
    Carles Pina i Estany
    https://carles.pina.cat | carles@pina.cat | cpina@debian.org

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEth6/Zob9uGYomaJ+qAKIT2ClX4EFAme8TmMACgkQqAKIT2Cl X4FSPxAAn4j2XxBFO3obL3BfwdM7XZvGYNKfybpbfmYICcJnxTLBRmynMntc+ayq NibrEEVLyfK0rqCMsuabETXLKLJjNkNEQvbvWGSQ14XwWLn2BkiYMrqpi4TRmrDZ O4h3DwxX0c9X+8kP1HnrS8TM8qkBVtdrXtRjaRuaHdJo0Z5oZdT7sre5Q2dHOTik xDVyrYsiloY7oqyc4PPDX2/dHs902Gv93JWd7RIMgmIxycmqA79Zj5eVBd9rQiZQ +mLYI2X3VKpBOPsWIDzdzRWmMPmegVtnPyX4vieBKfyQX8HrHTI5K3Kzf1hMsH5I IZjT055F714LZZyswxb5KD/WpwEJoOCVtBGjJCeBixb3Rsn8hoDZF13e+G5b8i4E Aq2xEl9wG+CPHWm8cwJ6/F/5C8mx4DpZmRAp+UJH0apmFHYhiM6TY5B3o9pwI7/y WXXoos+nSiBT4YdFQBAGsMw6oD1StKLTOv7rhTK3yC/ps75ELZxe0u6DH4nhl6GZ MePscNtrbDEy7hTv6cGG10DVBgxYKDl98yEl2JO+iZooixvqJi+oCe9fAmIKPQYg Xtc2+O3CZRTwnL6CKvcqu+5GdU6hBcCEQokxUU8WnySvqrLjDvN15rbl5bjfQOw+ 3vKtxUV87o9pV0C/fvl75sA4veRAZ70bk/fLRUQWfOl3uazP+iE=
    =rzYf
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From lorenzo@21:1/5 to Carles Pina i Estany on Mon Feb 24 14:00:01 2025
    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.

    Lorenzo


    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!


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carles Pina i Estany@21:1/5 to lorenzo on Tue Feb 25 06:57:36 2025
    Hi,

    On 24 Feb 2025 at 13:37:19, lorenzo wrote:
    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.

    Yes, the package uses dh_installsystemd (thanks to having debian/simplemonitor.service). No extra configuration.

    Installing simplemonitor via "apt", I see at the end:

    -----
    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,

    --
    Carles Pina i Estany
    https://carles.pina.cat | carles@pina.cat | cpina@debian.org

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEth6/Zob9uGYomaJ+qAKIT2ClX4EFAme9W9AACgkQqAKIT2Cl X4GT0RAAjYjQcyR8jXR3ATt/CH2t+uUoZqY6nOMRXPaBuy32rrhqwknSi3jna7fX tMxuJ4ZUt0nbVAv53S7GRSs/GmKiFGlYlrBC8SB0NeX5ObjJcn2WKjBKrGN8lBrH J+on9ZBa6dY/Cewbj2D0uMdbtORi6dIpUsBp1evQdChJXoh2eIITJBe/RlYBu8eY EM94UOlTPbzlDuOldpzP/yryJsppdSNAGnG939a1NcQsz6Hna2SxgNVfMjRM6qFJ /6trEfloAYnZPLl8zrm/drlgmRegtsJ/1AcsxRJVzW90NWD2otrtVw7Acxz/SGxT xP6nYydlHOn/q9wfrpuxq2Oy4WhHtRSY56yIdn3b0s1Wg15qOBCcRGAuYRKRdAoa xrHARQOUMvyUDF+1+mQcUCMq1W0tnFdPSTqBk9rpEhYkpEf487OzmJ5kmXcPCQiK onCtiRAC4mMl488dKWbcD0x8DogVq5bSB7uMCytI/stWQGSW+AbjzVZNEsRcvQW3 RZ1qPYx5nvpFnofy7Dt7yv5dj4BQccsdSyqLQOE7IYdLr+S+r5GXunnhAsbGJ8NY icwmj3I+kif6oFqHOyjbUkDC9e5gBjj4xFwhGuoFwyk7f7a1ysWAZruSPNpMz9xX +HI/9D48m6KmnCUU9DroSjo+4+twheuNfX9yxIfIp1nTurDwKSA=
    =A2IX
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ahmad Khalifa@21:1/5 to Carles Pina i Estany on Tue Feb 25 21:00:01 2025
    On 25/02/2025 05:57, Carles Pina i Estany wrote:
    My question is: how to inform users about systemd integration?

    If you mean command line level, then you're probably patching it to
    check runtime user then exit?

    If USER <> service_user:
    print "boo, use systemctl instead"
    exit 1


    --
    Regards,
    Ahmad

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From lorenzo@21:1/5 to Carles Pina i Estany on Tue Feb 25 23:20:01 2025
    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..

    Best,
    Lorenzo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carles Pina i Estany@21:1/5 to lorenzo on Wed Feb 26 06:37:43 2025
    Copy: debian-mentors@lists.debian.org

    Hi,

    On 25 Feb 2025 at 22:59:20, lorenzo wrote:
    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.

    In the case of simplemonitor package: what I'd like to do is inform the
    user that simplemonitor is ready to be used using systemctl (not
    necessarily how to use systemd). Why I'd like to do that?

    -As a user sometimes I wonder if some package are meant to be used from
    systemd or not and what would the systemd unit name would be

    -I know of some user who installed the package and tried to use it
    without systemd integration because they didn't know that it was
    possible (but they knew how to use systemd).

    Some packages (e.g. syncthing) are using user services (via /lib/systemd/system/syncthing@.service file) so in that case the user
    would need to do "systemctl restart PACKAGE@user). So it would be nice
    to tell the user.

    Another case: the package name and systemd service name might not align (openssh-server package, the systemd service is "ssh").
    Or bind9 package, and the systemd service might be bind9 or named.

    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.

    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..

    It works lovely.

    Thanks very much!

    --
    Carles Pina i Estany
    https://carles.pina.cat | carles@pina.cat | cpina@debian.org

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEth6/Zob9uGYomaJ+qAKIT2ClX4EFAme+qKcACgkQqAKIT2Cl X4GdLRAAzz9/N+wPtmCe4HwljhfkMzUoVEMUVykUHtwgJF4AjJ3bViQliM9qVZ7Q zZxTiMtEusXag7EvbnmOqLzRm4XPOFd+BedKQC5OZHIQryy0ub0cq12huOxmRxfN EpniX4OFKkIYV4kDhQefA2HQYTPOvRCqItBOzYLJu8N9XtoOZIukIUi3DQxqjNbi Em1c9cpqz2bmBNP1vWFPBNAGX/I6zlrL2HPJDTH8yzXhGxhlUERWc6oMZFhh2NSu fHIyT/kNOa+TCWDOslIJSLAOEj9GLA9b21r1VS9fsA1JU1/7c79ZhID9mPD8+xum 1AgjBKrI1hACwq6ZCwHBkDD9t7Qs4Umn2YYbC7HhCmwylwi7X0j0OfSgGPrvg3Vp uxXnop/k2JB6yESStdF9+IIwj/nCjoS7h3QbG2x0/B9c7XWLdOzH9uADI51tcDv7 Ui1WW/XIIzuj7Gp/FBP7lmgXEXzdEjEs5qm8v1+O8l4cOwOh1mEZNIPW+mARHpNf HV2O0Hd1GWTCeEf6E3nCslMkj5gRnEkBDQGTHPEewK/UNA9SYW0zImxS7KMLIsQk jVBrETf/VPLw2wmBGivSxLjwLBVGxTiFpi3GlboswJaw3dhsP6xjBwVlPAgX6doP FHvlvLlSm3SYHQeOI1ipKo5aY+PAM3CUfn4KnaMSNgbRoWJ1a68=
    =L/Go
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From lorenzo@21:1/5 to Carles Pina i Estany on Wed Feb 26 10:10:01 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)