<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11002</bug_id>
          
          <creation_ts>2017-02-01 10:37:05 +0000</creation_ts>
          <short_desc>dbus: user-session dbus.socket contains path from native sysroot</short_desc>
          <delta_ts>2017-03-20 17:33:16 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nubosch">andreas.kling</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70324</commentid>
    <comment_count>0</comment_count>
      <attachid>3613</attachid>
    <who name="Nubosch">andreas.kling</who>
    <bug_when>2017-02-01 10:37:05 +0000</bug_when>
    <thetext>Created attachment 3613
replace systemctl path from native sysroot

Preconditions/Environment
-------------------------
image with systemd and PACKAGECONFIG_append_pn-dbus=&quot;user-session&quot;

Triggering Action/Cause
-----------------------
:~# export XDG_RUNTIME_DIR=/run/user/0
:~# /lib/systemd/systemd --user
:~# systemctl --user start dbus
:~# systemctl --user show-environment

Expectation
-----------
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus
...

Actual Result
-------------
missing variable

What really happens

ExecStartPost from dbus.socket tries to launch systemctl from PATH on build machine.

Reproducibility
---------------
1/1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70664</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-02-13 16:45:10 +0000</bug_when>
    <thetext>It&apos;s probably safer to always set the systemctl assignment in case any other bits of dbus use it in the future.

Can you submit this patch on the mailing list please?

(http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70682</commentid>
    <comment_count>2</comment_count>
    <who name="Nubosch">andreas.kling</who>
    <bug_when>2017-02-14 14:02:36 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; It&apos;s probably safer to always set the systemctl assignment in case any other
&gt; bits of dbus use it in the future.
&gt; 
&gt; Can you submit this patch on the mailing list please?
&gt; 
&gt; (http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded)

many thanks for your kind advice.

since recipe specific sysroots are used the situation has changed.
user dbus.socket contains /bin/systemctl for target and native builds even without this patch.

dbus does not include sysroot components from systemd-systemctl-native yet, this means the value now refers to installation on the host system determined by $PATH.

Adding systemd-systemctl-native to DEPENDS brings back the old situation with &apos;.../1.10.14-r0/recipe-sysroot-native/usr/bin/systemctl&apos; in user dbus.socket for target and native build.

So I&apos;m sorry to have some questions before submitting a patch to the mailing list. Even if they somehow sound philosophical cause fiddling with systemd user services for native seems weird.

1)
should dbus contain a DEPENDS to systemd-systemctl-native
1a)
and should it be conditional on DISTRO_FEATURES systemd?

2)
should dbus override ac_cv_path_SYSTEMCTL
2a)
and should override be done only for target with EXTRA_OECONF_append_class-target or with EXTRA_OECONF_append? (recipe explicitly sets EXTRA_OECONF_append_class-native = &quot; --disable-selinux&quot;)

many thanks in advance

- Andy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70707</commentid>
    <comment_count>3</comment_count>
    <who name="Nubosch">andreas.kling</who>
    <bug_when>2017-02-15 06:16:48 +0000</bug_when>
    <thetext>I gave the minimal change a shot on the mailing list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71459</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-03-20 17:33:16 +0000</bug_when>
    <thetext>Merged in oe-core e9471f8da3946439141ccdd8284200aa614df46c.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>3613</attachid>
            <date>2017-02-01 10:37:05 +0000</date>
            <delta_ts>2017-02-01 10:37:05 +0000</delta_ts>
            <desc>replace systemctl path from native sysroot</desc>
            <filename>0001-dbus-do-not-use-systemctl-from-PATH-for-configure.patch</filename>
            <type>text/plain</type>
            <size>1582</size>
            <attacher name="Nubosch">andreas.kling</attacher>
            
              <data encoding="base64">RnJvbSBkM2Y3N2U4OGRiOWM4ZTE3MGZmM2QzMWE0Yzg4ODRmM2I5MWQ2MGM4IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBBbmR5IEtsaW5nIDxhbmRyZWFzLmtsaW5nQHBlaWtlci1jZWUu
ZGU+CkRhdGU6IFdlZCwgMSBGZWIgMjAxNyAxMTowNzo1MCArMDEwMApTdWJqZWN0OiBbUEFUQ0hd
IGRidXM6IGRvIG5vdCB1c2Ugc3lzdGVtY3RsIGZyb20gJFBBVEggZm9yIGNvbmZpZ3VyZQoKICBp
ZiBwYWNrYWdlIGNvbmZpZyB1c2VyLXNlc3Npb24gaXMgZW5hYmxlZCB1c2VyIGRidXMuc29ja2V0
IGNvbnRhaW5zCiAgcGF0aCB0byBzeXN0ZW1jdGwgZnJvbSBuYXRpdmUgc3lzcm9vdC4gc3lzdGVt
Y3RsIGlz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