Bug#1018872: closed by Michael Biebl <biebl at debian.org> (Re: Bug#1018872: systemd.service COMMAND LINE misses command search, if starting with "+".)

Harald Bergmann harald.bergmann at protronis.com
Thu Sep 1 10:10:24 BST 2022


Hello Michael,

please test the told COMMAND LINE with multiple commands, before closing.
Many thanks!

Best regards,
Harald

> Am 01.09.2022 um 11:03 schrieb Debian Bug Tracking System <owner at bugs.debian.org>:
> 
> This is an automatic notification regarding your Bug report
> which was filed against the systemd package:
> 
> #1018872: systemd.service COMMAND LINE misses command search, if starting with "+".
> 
> It has been closed by Michael Biebl <biebl at debian.org>.
> 
> Their explanation is attached below along with your original report.
> If this explanation is unsatisfactory and you have not received a
> better one in a separate message then please contact Michael Biebl <biebl at debian.org> by
> replying to this email.
> 
> 
> -- 
> 1018872: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018872
> Debian Bug Tracking System
> Contact owner at bugs.debian.org with problems
> 
> Von: Michael Biebl <biebl at debian.org>
> Betreff: Aw: Bug#1018872: systemd.service COMMAND LINE misses command search, if starting with "+".
> Datum: 1. September 2022 um 10:59:11 MESZ
> An: Harald Bergmann <harald.bergmann at protronis.com>, 1018872-done at bugs.debian.org
> 
> 
> Am 01.09.22 um 10:13 schrieb Harald Bergmann:
>> Package: systemd
>> Version: 247.3-7
>> Severity: minor
>> Dear Maintainer,
>> *** Reporter, please consider answering these questions, where appropriate ***
>>    * What led up to the situation?
>> Implementing some systemd.service, which requires preparation by ExecStartPre.
>>    * What exactly did you do (or not do) that was effective (or
>>      ineffective)?
>> Added: ExecStartPre=+mkdir -p <folder> ; +chown -R <user>:<group> <folder>
>>    * What was the outcome of this action?
>> Result via service start and via analysing (sudo systemd-analyze verify
>> <service>):
>> Command mkdir is not executable: Datei oder Verzeichnis nicht gefunden
>>    * What outcome did you expect instead?
>> Execution without error message.
>> *** End of the template - remove these template lines ***
>> Workaround using a little different COMMAND LINE:
>> ExecStartPre=+/bin/mkdir -p <folder> ; +chown -R <user>:<group> <folder
>> Identified problem:
>> The command is not found at the standard paths. This happens only, if the
>> command is prefixed with "+" or (likely) any other possible prefix character,
>> which "man systemd.service" tells (not tested).
>> Because the workaround is easy, the bug is classified as minor.
> 
> Seems to work fine here (both with systemd v247 from stable and v251 from unstable):
> 
> # adduser test
> 
> # systemctl cat test.service
> # /etc/systemd/system/test.service
> [Unit]
> Description=Test
> 
> [Service]
> Type=oneshot
> User=test
> ExecStartPre=+mkdir -p /run/foo
> ExecStartPre=+chown test /run/foo
> ExecStart=echo "Hello World"
> 
> # systemctl start test.service
> 
> # systemctl status test.service
> root at pluto:~# systemctl status test
> ○ test.service - Test
>     Loaded: loaded (/etc/systemd/system/test.service; static)
>     Active: inactive (dead)
> 
> Sep 01 10:54:42 pluto systemd[1]: Starting Test...
> Sep 01 10:54:42 pluto echo[94045]: Hello World
> Sep 01 10:54:42 pluto systemd[1]: test.service: Deactivated successfully.
> Sep 01 10:54:42 pluto systemd[1]: Finished Test.
> 
> # ls -ld /run/foo
> drwxr-xr-x 2 test root 40  1. Sep 10:54 /run/foo
> 
> 
> 
> Von: Harald Bergmann <harald.bergmann at protronis.com>
> Betreff: systemd.service COMMAND LINE misses command search, if starting with "+".
> Datum: 1. September 2022 um 10:13:45 MESZ
> An: Debian Bug Tracking System <submit at bugs.debian.org>
> 
> 
> Package: systemd
> Version: 247.3-7
> Severity: minor
> 
> Dear Maintainer,
> 
> *** Reporter, please consider answering these questions, where appropriate ***
> 
>   * What led up to the situation?
> Implementing some systemd.service, which requires preparation by ExecStartPre.
> 
>   * What exactly did you do (or not do) that was effective (or
>     ineffective)?
> Added: ExecStartPre=+mkdir -p <folder> ; +chown -R <user>:<group> <folder>
> 
>   * What was the outcome of this action?
> Result via service start and via analysing (sudo systemd-analyze verify
> <service>):
> Command mkdir is not executable: Datei oder Verzeichnis nicht gefunden
> 
>   * What outcome did you expect instead?
> Execution without error message.
> 
> *** End of the template - remove these template lines ***
> 
> Workaround using a little different COMMAND LINE:
> ExecStartPre=+/bin/mkdir -p <folder> ; +chown -R <user>:<group> <folder
> 
> Identified problem:
> The command is not found at the standard paths. This happens only, if the
> command is prefixed with "+" or (likely) any other possible prefix character,
> which "man systemd.service" tells (not tested).
> 
> Because the workaround is easy, the bug is classified as minor.
> 
> 
> -- Package-specific info:
> 
> -- System Information:
> Debian Release: 11.4
>  APT prefers stable-updates
>  APT policy: (500, 'stable-updates'), (500, 'stable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 5.10.0-16-amd64 (SMP w/3 CPU threads)
> Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
> LSM: AppArmor: enabled
> 
> 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+deb11u1
> ii  libc6            2.31-13+deb11u3
> ii  libcap2          1:2.44-1
> ii  libcrypt1        1:4.4.18-4
> ii  libcryptsetup12  2:2.3.7-1+deb11u1
> ii  libgcrypt20      1.8.7-6
> ii  libgnutls30      3.7.1-5+deb11u1
> 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.1~deb11u1
> ii  libmount1        2.36.1-8+deb11u1
> ii  libpam0g         1.4.0-9+deb11u1
> ii  libseccomp2      2.5.1-1+deb11u1
> ii  libselinux1      3.1-3
> ii  libsystemd0      247.3-7
> ii  libzstd1         1.4.8+dfsg-2.1
> ii  mount            2.36.1-8+deb11u1
> ii  util-linux       2.36.1-8+deb11u1
> 
> Versions of packages systemd recommends:
> ii  dbus                             1.12.20-2
> ii  systemd-timesyncd [time-daemon]  247.3-7
> 
> Versions of packages systemd suggests:
> ii  policykit-1        0.105-31+deb11u1
> pn  systemd-container  <none>
> 
> Versions of packages systemd is related to:
> pn  dracut           <none>
> ii  initramfs-tools  0.140
> ii  libnss-systemd   247.3-7
> ii  libpam-systemd   247.3-7
> ii  udev             247.3-7
> 
> -- no debconf information
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20220901/dc223891/attachment-0001.htm>


More information about the Pkg-systemd-maintainers mailing list