• deb-systemd-invoke on systems not running systemd

    From Antoine Le Gonidec@21:1/5 to helmut@subdivi.de on Sat Jul 12 00:40:01 2025
    Context is https://bugs.debian.org/1109119

    On Fri, 11 Jul 2025 19:11:42 +0200 Helmut Grohne <helmut@subdivi.de> wrote:
    deb-systemd-invoke is part of init-system-helpers and therefore
    essential. It calls out to systemctl, which is not essential but for all practical matters we really should be treating it as if it was and maintainer scripts expect it to work at all times.

    How is that expected to behave on systems using other init systems?

    Here I disable daemons-related actions during apt activity through policy-rc.d, grouping them at the end of apt actions through needrestart, so I probably avoid unwanted systemctl calls that way.

    But were I not using this specific policy, should I expect maintainer scripts to fail on my systems that do not run systemd? Or are maintainer scripts expected to check for systemd presence, and only call deb-systemd-invoke on systems actually running this init system?

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

    iHUEARYKAB0WIQSUsdxM90hewW6X7Jhja3j5HOuA2AUCaHGNwQAKCRBja3j5HOuA 2Jf4AQCjOtemYvnAYoOTvxgIA8fhaEqJf+BoKBy5walpEj76gAD/SMreGZkmk5AF 8BvQNKXg9xusCpCPBwHPzYyDo2ZCYAs=
    =5bgM
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Hofstaedtler@21:1/5 to All on Sat Jul 12 01:10:01 2025
    * Antoine Le Gonidec <debian@vv221.fr> [250712 00:36]:
    Context is https://bugs.debian.org/1109119

    On Fri, 11 Jul 2025 19:11:42 +0200 Helmut Grohne <helmut@subdivi.de> wrote:
    deb-systemd-invoke is part of init-system-helpers and therefore
    essential. It calls out to systemctl, which is not essential but for all
    practical matters we really should be treating it as if it was and
    maintainer scripts expect it to work at all times.

    How is that expected to behave on systems using other init systems?

    Here I disable daemons-related actions during apt activity through policy-rc.d,
    grouping them at the end of apt actions through needrestart, so I probably >avoid unwanted systemctl calls that way.

    But were I not using this specific policy, should I expect maintainer scripts >to fail on my systems that do not run systemd? Or are maintainer scripts >expected to check for systemd presence, and only call deb-systemd-invoke on >systems actually running this init system?

    The debhelper helpers always guard deb-systemd-invoke invocations by
    a systemd check.

    Maintainers directly calling deb-systemd-invoke need to write the same
    code.

    Chris

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Antoine Le Gonidec@21:1/5 to All on Sat Jul 12 02:10:01 2025
    Le Sat, 12 Jul 2025 00:43:21 +0200,
    Chris Hofstaedtler <zeha@debian.org> a écrit :

    The debhelper helpers always guard deb-systemd-invoke invocations by a systemd check.

    Thanks for the confirmation, all is well then.

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

    iHUEARYKAB0WIQSUsdxM90hewW6X7Jhja3j5HOuA2AUCaHGirQAKCRBja3j5HOuA 2JTEAQDepCQD1XgsEkFKTdjZ/Y6BpwLqE3PaM1l/RcttskqDSgD7BIG1OGri1WRo 8SCkcddoGbmBq2jAucKRvtSwJb5fggM=
    =8Gbs
    -----END PGP SIGNATURE-----

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