Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1090495 > unrolled thread

Bug#1004217: /bin/systemctl: Cannot enable units where the Install section is in a truncated override file

Started byAdam Dinwoodie <debian-reportbug@post.dinwoodie.org>
First post2022-01-23 00:10 +0100
Last post2022-01-23 23:20 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#1004217: /bin/systemctl: Cannot enable units where the Install section is in a truncated override file Adam Dinwoodie <debian-reportbug@post.dinwoodie.org> - 2022-01-23 00:10 +0100
    Bug#1004217: /bin/systemctl: Cannot enable units where the Install section is in a truncated override file Michael Biebl <biebl@debian.org> - 2022-01-23 09:50 +0100
      Bug#1004217: /bin/systemctl: Cannot enable units where the Install section is in a truncated override file Adam Dinwoodie <debian-reportbug@post.dinwoodie.org> - 2022-01-23 23:10 +0100
        Bug#1004217: /bin/systemctl: Cannot enable units where the Install section is in a truncated override file Michael Biebl <biebl@debian.org> - 2022-01-23 23:20 +0100

#1090495 — Bug#1004217: /bin/systemctl: Cannot enable units where the Install section is in a truncated override file

FromAdam Dinwoodie <debian-reportbug@post.dinwoodie.org>
Date2022-01-23 00:10 +0100
SubjectBug#1004217: /bin/systemctl: Cannot enable units where the Install section is in a truncated override file
Message-ID<DIxGb-Ru-15@gated-at.bofh.it>
Package: systemd
Version: 249.7-1+rpi1
Severity: normal
File: /bin/systemctl

Dear Maintainer,

If one creates a unit with a name like `test-test.service`, one can put
override files in the drop-in directory with the truncated name
`test-.service.d`, and have them be picked up by systemd, at least for
the most part.  However, it appears that `systemctl enable` does not
respect these files.

See the below simple test case, with a unit file and override file:

```
$ systemctl --user cat test-test.service
# /home/test/.config/systemd/user/test-test.service
[Service]
ExecStart=sleep 5000d

# /home/test/.config/systemd/user/test-.service.d/override.conf
[Install]
WantedBy=default.target

$ systemctl --user status test-test.service
○ test-test.service
     Loaded: loaded (/home/test/.config/systemd/user/test-test.service; static)
    Drop-In: /home/test/.config/systemd/user/test-.service.d
             └─override.conf
     Active: inactive (dead)

$ systemctl --user enable test-test.service
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.

Possible reasons for having this kind of units are: <trimmed...>
```

Clearly `systemctl cat` was able to locate the override file above, and
therefore I had expected `systemctl enable` to take note of the override
file's [Install] section.  That would mean that `systemctl enable` would
actually create a symlink from default.target.wants/test-test.service to
test-test.service.

At the very least, if this were expected behaviour (and it doesn't seem
grossly unreasonable; I know I was doing something unusual to hit
this!), I would have expected to see it mentioned in the paragraph about
drop-in directories, and/or the section on "[Install] Section Options"
in the systemd.unit(5) man page.

Kind regards,

Adam

-- Package-specific info:

-- System Information:
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye
Architecture: armv7l

Kernel: Linux 5.10.92-v7l+ (SMP w/4 CPU threads)
Kernel taint flags: TAINT_CRAP
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd depends on:
ii  adduser          3.118
ii  libacl1          2.2.53-10
ii  libapparmor1     2.13.6-10
ii  libaudit1        1:3.0-2
ii  libblkid1        2.36.1-8
ii  libc6            2.32-4+rpi1
ii  libcap2          1:2.44-1
ii  libcrypt1        1:4.4.18-4
ii  libcryptsetup12  2:2.4.3-1
ii  libgcrypt20      1.9.4-5
ii  libgnutls30      3.7.2-5
ii  libgpg-error0    1.38-2
ii  libip4tc2        1.8.7-1
ii  libkmod2         28-1
ii  liblz4-1         1.9.3-2
ii  liblzma5         5.2.5-2
ii  libmount1        2.36.1-8
ii  libpam0g         1.4.0-9+deb11u1
ii  libseccomp2      2.5.1-1+rpi1+deb11u1
ii  libselinux1      3.1-3
ii  libsystemd0      249.7-1+rpi1
ii  libzstd1         1.4.8+dfsg-2.1+rpi1
ii  mount            2.36.1-8
ii  util-linux       2.36.1-8

Versions of packages systemd recommends:
ii  dbus [default-dbus-system-bus]   1.12.20-2
ii  systemd-timesyncd [time-daemon]  249.7-1+rpi1

Versions of packages systemd suggests:
pn  policykit-1        <none>
pn  systemd-container  <none>

Versions of packages systemd is related to:
pn  dracut           <none>
ii  initramfs-tools  0.140
ii  libnss-systemd   249.7-1+rpi1
ii  libpam-systemd   249.7-1+rpi1
ii  udev             247.3-6+rpi1

-- no debconf information

[toc] | [next] | [standalone]


#1090512

FromMichael Biebl <biebl@debian.org>
Date2022-01-23 09:50 +0100
Message-ID<DIGJs-6av-5@gated-at.bofh.it>
In reply to#1090495

[Multipart message — attachments visible in raw view] — view raw

Control: tags -1 + upstream

Am 23.01.22 um 00:04 schrieb Adam Dinwoodie:
> Package: systemd
> Version: 249.7-1+rpi1
> Severity: normal
> File: /bin/systemctl
> 
> Dear Maintainer,
> 
> If one creates a unit with a name like `test-test.service`, one can put
> override files in the drop-in directory with the truncated name
> `test-.service.d`, and have them be picked up by systemd, at least for
> the most part.  However, it appears that `systemctl enable` does not
> respect these files.

Seems like a valid issue.
As we do not ship any Debian specific modifications in that regard, it 
would be great if you can file this issue upstream at
https://github.com/systemd/systemd/issues
as it should be handled there.

Regards,
Michael

[toc] | [prev] | [next] | [standalone]


#1090609

FromAdam Dinwoodie <debian-reportbug@post.dinwoodie.org>
Date2022-01-23 23:10 +0100
Message-ID<DITdD-5pR-1@gated-at.bofh.it>
In reply to#1090512
On Sun, Jan 23, 2022 at 09:38:17AM +0100, Michael Biebl wrote:
> 
> Control: tags -1 + upstream
> 
> Am 23.01.22 um 00:04 schrieb Adam Dinwoodie:
> > Package: systemd
> > Version: 249.7-1+rpi1
> > Severity: normal
> > File: /bin/systemctl
> > 
> > Dear Maintainer,
> > 
> > If one creates a unit with a name like `test-test.service`, one can put
> > override files in the drop-in directory with the truncated name
> > `test-.service.d`, and have them be picked up by systemd, at least for
> > the most part.  However, it appears that `systemctl enable` does not
> > respect these files.
> 
> Seems like a valid issue.
> As we do not ship any Debian specific modifications in that regard, it would
> be great if you can file this issue upstream at
> https://github.com/systemd/systemd/issues
> as it should be handled there.

Now reported at https://github.com/systemd/systemd/issues/22230.  Thank
you!

[toc] | [prev] | [next] | [standalone]


#1090611

FromMichael Biebl <biebl@debian.org>
Date2022-01-23 23:20 +0100
Message-ID<DITnk-5t7-7@gated-at.bofh.it>
In reply to#1090609

[Multipart message — attachments visible in raw view] — view raw

Control: forwarded -1 https://github.com/systemd/systemd/issues/22230

Am 23.01.22 um 22:31 schrieb Adam Dinwoodie:
> Now reported at https://github.com/systemd/systemd/issues/22230.  Thank
> you!

Thanks, marking accordingly.

Regards,
Michael

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web