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


Groups > linux.debian.bugs.dist > #1021986

Bug#968612: New ConditionEnable feature inop

From Stewart Ferguson <stew@ferg.aero>
Newsgroups linux.debian.bugs.dist
Subject Bug#968612: New ConditionEnable feature inop
Date 2020-08-18 18:00 +0200
Message-ID <AFcbM-80g-13@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Package: systemd
Version: 246.1-1
Severity: normal

Systemd 246 introduces ConditionEnviornment=/AssertEnvironment [1] in the [Unit]
configuration (see systemd.unit(5)).  This feature does not appear to work.

The first evidence of this is neither ConditionEnvironment or AssertEnvironment
get parsed by `systemd-analyze` which other conditions are parsed (even when
empty):

    $ systemd-analyze condition \
        'ConditionKernelVersion='  \
        'ConditionKernelVersion='  \
        'ConditionACPower=' \
        'ConditionArchitecture=' \
        'AssertPathExists=' \
        'AssertEnvironment='
    Cannot parse "AssertEnvironment=".

The second evidence is that targets can be reached when conditions are not met: 

    $ systemctl --user cat i3-session-pre.target
    # /home/stew/.config/systemd/user/i3-session-pre.target
    [Unit]
    Description=i3 session
    BindsTo=graphical-session-pre.target
    ConditionEnvironment=THIS_ENV_DOESNT_EXIST=1
    $ systemctl --user start i3-session-pre.target
    $ systemctl --user status i3-session-pre.target
    ● i3-session-pre.target -
i3 session
         Loaded: loaded (/home/stew/.config/systemd/user/i3-session-
pre.target;
                        static)
         Active: active since Tue
2020-08-18 17:29:36 CEST; 6s ago

    Aug 18 17:29:36 stewbian systemd[1717]: Reached target i3 session.

The same behaviour was observed for 
 (1) non-existent environment variables
 (2) environment variables with incorrect data
 (3) matching environment variables.

I can confirm that the pull request related to this [2] appears to be
integrated.  I confirmed that with `apt source systemd` and inspecting the
sources.

I suspect the problem lies upstream.

[1]: https://raw.githubusercontent.com/systemd/systemd/master/NEWS
[2]: https://github.com/systemd/systemd/pull/15817




Back to linux.debian.bugs.dist | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Bug#968612: New ConditionEnable feature inop Stewart Ferguson <stew@ferg.aero> - 2020-08-18 18:00 +0200
  Bug#968612: New ConditionEnable feature inop Michael Biebl <biebl@debian.org> - 2020-08-18 20:40 +0200
  Bug#968612:  Stewart Ferguson <stew@ferg.aero> - 2020-08-19 09:10 +0200

csiph-web