• Re: New systemd service file path?

    From Utkarsh Gupta@21:1/5 to otto@kekalainen.net on Tue Oct 5 16:00:01 2021
    Hello,

    On Tue, Oct 5, 2021 at 7:00 PM Otto Kekäläinen <otto@kekalainen.net> wrote:
    I noticed that Lintian has recently started erroring on https://lintian.debian.org/tags/systemd-service-in-odd-location

    I can't find this requirement anywhere in the Debian Policy, e.g.

    https://www.debian.org/doc/debian-policy/ch-opersys.html#starting-system-services
    does not mention anything about systemd paths.

    Seems dh_systemd_enable still installs files into /lib/systemd/system/
    and I find it confusing that apparently Lintian errors on what
    debhelper does by default. Please enlighten me on what I have missed.

    I stumbled upon this earlier but was told by a fellow developer that this
    is due
    to lintian being already updated, but debhelper isn't (in unstable) yet containing https://salsa.debian.org/debian/debhelper/-/commit/d70caa69c64b124e3611c967cfab93aef48346d8
    .

    The files will move location once rebuilt with the new debhelper without any action on the packaging side.

    HTH.


    - u

    <div dir="ltr">Hello,<br><br>On Tue, Oct 5, 2021 at 7:00 PM Otto Kekäläinen &lt;<a href="mailto:otto@kekalainen.net">otto@kekalainen.net</a>&gt; wrote:<br>&gt; I noticed that Lintian has recently started erroring on<br>&gt; <a href="https://lintian.
    debian.org/tags/systemd-service-in-odd-location">https://lintian.debian.org/tags/systemd-service-in-odd-location</a><br>&gt;<br>&gt; I can&#39;t find this requirement anywhere in the Debian Policy, e.g.<br>&gt; <a href="https://www.debian.org/doc/debian-
    policy/ch-opersys.html#starting-system-services">https://www.debian.org/doc/debian-policy/ch-opersys.html#starting-system-services</a><br>&gt; does not mention anything about systemd paths.<br>&gt;<br>&gt; Seems dh_systemd_enable still installs files
    into /lib/systemd/system/<br>&gt; and I find it confusing that apparently Lintian errors on what<br>&gt; debhelper does by default. Please enlighten me on what I have missed.<br><br>I stumbled upon this earlier but was told by a fellow developer that
    this is due<div>to lintian being already updated, but debhelper isn&#39;t (in unstable) yet containing</div><div><a href="https://salsa.debian.org/debian/debhelper/-/commit/d70caa69c64b124e3611c967cfab93aef48346d8">https://salsa.debian.org/debian/
    debhelper/-/commit/d70caa69c64b124e3611c967cfab93aef48346d8</a>.<div><div><br>The files will move location once rebuilt with the new debhelper without any</div><div>action on the packaging side.<br></div></div></div><div><br></div><div>HTH.</div><div><br>
    </div><div><br></div><div>- u</div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?T3R0byBLZWvDpGzDpGluZW4=?@21:1/5 to All on Tue Oct 5 15:40:01 2021
    Hello!

    I noticed that Lintian has recently started erroring on https://lintian.debian.org/tags/systemd-service-in-odd-location

    I can't find this requirement anywhere in the Debian Policy, e.g. https://www.debian.org/doc/debian-policy/ch-opersys.html#starting-system-services
    does not mention anything about systemd paths.

    Seems dh_systemd_enable still installs files into /lib/systemd/system/
    and I find it confusing that apparently Lintian errors on what
    debhelper does by default. Please enlighten me on what I have missed.

    So, which one of these paths should be used and why?
    - /lib/systemd/system/
    - /usr/lib/systemd/system/

    Thanks!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Ehrhardt@21:1/5 to otto@kekalainen.net on Tue Oct 5 16:20:01 2021
    On Tue, Oct 5, 2021 at 3:30 PM Otto Kekäläinen <otto@kekalainen.net> wrote:

    Hello!

    I noticed that Lintian has recently started erroring on https://lintian.debian.org/tags/systemd-service-in-odd-location

    I can't find this requirement anywhere in the Debian Policy, e.g. https://www.debian.org/doc/debian-policy/ch-opersys.html#starting-system-services
    does not mention anything about systemd paths.

    Seems dh_systemd_enable still installs files into /lib/systemd/system/
    and I find it confusing that apparently Lintian errors on what
    debhelper does by default. Please enlighten me on what I have missed.

    Thanks Otto, I think it is right to bring this to more attention as I've seen various people and builds stumble over it already.

    Not sure what the general discussion/status on this is, but for myself
    I have tracked it down starting from one of my builds failing to this
    commit [1] that has to land into debhelper to resolve it.

    [1]: https://salsa.debian.org/debian/debhelper/-/commit/d70caa69c64b

    So, which one of these paths should be used and why?
    - /lib/systemd/system/
    - /usr/lib/systemd/system/

    Thanks!



    --
    Christian Ehrhardt
    Staff Engineer, Ubuntu Server
    Canonical Ltd

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon McVittie@21:1/5 to All on Tue Oct 5 18:10:01 2021
    On Tue, 05 Oct 2021 at 06:14:26 -0700, Otto Kekäläinen wrote:
    So, which one of these paths should be used and why?
    - /lib/systemd/system/
    - /usr/lib/systemd/system/

    tl;dr: Continue to use /lib/systemd/system.

    Moving files to /usr/lib/systemd/system can cause debhelper >= 13.5.2
    (and debhelper < 13.4) to not find them, and could cause upgrade issues
    during the transition to merged-/usr under some circumstances (for example moving from /lib to /usr/lib at the same time that a package Replaces
    another package).

    Seems dh_systemd_enable still installs files into /lib/systemd/system/
    and I find it confusing that apparently Lintian errors on what
    debhelper does by default. Please enlighten me on what I have missed.

    debhelper and lintian have both changed more than once recently, reacting
    to each other's changes with less coordination than they would ideally
    have had. (A reminder: the development suite is called "unstable" for a reason...)

    As of debhelper 13.5.2 and lintian 2.107.0, the situation is:

    * systemd supports both /{,usr/}lib/systemd/system
    * init-system-helpers supports both /{,usr/}lib/systemd/system
    * lintian considers either /{,usr/}lib/systemd/system to be potentially valid
    * debhelper installs units from debian/ in /lib/systemd/system
    * debhelper looks for upstream units in /lib/systemd/system (only!)

    So if an upstream project installs systemd system units,
    please configure its build system in the Debian packaging to
    install them into /lib/systemd/system so that debhelper will see
    them. For example, in Autotools, this is conventionally spelled "--with-systemdsystemunitdir=/lib/systemd/system". dbus is an example
    of a package doing this correctly.

    The Technical Committee should give more specific advice about the /usr
    merge and /usr vs. the root filesystem soon. (I have written a draft
    resolution and I'm waiting for feedback from others in the committee.)

    It is likely that one of our recommendations will be that individual
    packages should not move any more files from the root filesystem to /usr
    (so files that were historically in /bin, /lib*, /sbin should continue
    to be packaged as /bin, /lib*, /sbin in the data.tar.* of a .deb)
    until we are sure that it has been prevented from breaking upgrades.

    smcv
    writing here as an individual, not on behalf of the TC

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lorenzo@21:1/5 to All on Tue Oct 5 18:20:02 2021
    Hi Otto,

    I think it's Debian going usrmerge-only without before reaching a
    consensus on how to get there.


    just wait for debhelper and lintian to agree with each other based on https://lists.debian.org/debian-ctte/2021/09/msg00004.html

    Lorenzo

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