<div dir="ltr">I&#39;m sorry for noise, I&#39;ve reproduced it in LuneOS raspberrypi build and the root cause is wrongly used override in this bbappend:<div><br></div><div><a href="https://github.com/webOS-ports/meta-rpi-luneos/blob/3b76e0b7d554e937263e685854819ab8454ebe35/recipes-core/systemd/systemd_%25.bbappend">https://github.com/webOS-ports/meta-rpi-luneos/blob/3b76e0b7d554e937263e685854819ab8454ebe35/recipes-core/systemd/systemd_%25.bbappend</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 14, 2017 at 12:05 AM, Martin Jansa <span dir="ltr">&lt;<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes, you&#39;re right it shouldn&#39;t use passwd/group from host.<div><br></div><div>I&#39;ve tried to reproduce it in different build directory and now I see that it properly adds polkitd user in do_prepare_recipe_sysroot task already:</div><div><div>OE @ ~ $ tail -n 15 /OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/temp/log.do_<wbr>prepare_recipe_sysroot</div><div>DEBUG: SITE files [&#39;endian-little&#39;, &#39;common-linux&#39;, &#39;common-glibc&#39;, &#39;bit-64&#39;, &#39;x86_64-linux&#39;, &#39;common&#39;]</div><div>DEBUG: SITE files [&#39;endian-little&#39;, &#39;common-linux&#39;, &#39;common-glibc&#39;, &#39;bit-64&#39;, &#39;x86_64-linux&#39;, &#39;common&#39;]</div><div>DEBUG: Executing shell function useradd_sysroot</div><div>/OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot-native/usr/sbin/<wbr>useradd</div><div>Running groupadd commands...</div><div>NOTE: systemd: Performing groupadd with [--root /OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot -r lock]</div><div>NOTE: systemd: Performing groupadd with [--root /OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot  -r systemd-journal]</div><div>Running useradd commands...</div><div>NOTE: systemd: Performing useradd with [--root /OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot     --system -d / -M --shell /bin/nologin systemd-timesync]</div><div>NOTE: systemd: Performing useradd with [--root /OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot  --system -d / -M --shell /bin/nologin systemd-network]</div><div>NOTE: systemd: Performing useradd with [--root /OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot   --system -d / -M --shell /bin/nologin systemd-resolve]</div><div>NOTE: systemd: Performing useradd with [--root /OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot  --system --no-create-home --user-group --home-dir /etc/polkit-1 polkitd]</div><div>NOTE: systemd: Performing useradd with [--root /OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot   --system -d / -M --shell /bin/nologin systemd-bus-proxy]</div><div>DEBUG: Shell function useradd_sysroot finished</div><div>DEBUG: Python function useradd_sysroot_sstate finished</div></div><div><br></div><div>tomorrow I&#39;ll try to reproduce it in the directory where it failed before, my guess is that in that build do_prepare_recipe_sysroot wasn&#39;t re-executed correctly and unlike here:</div><div><div>OE @ ~ $ grep -R polkitd /OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot/etc<br></div><div>/OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot/etc/group:polkitd:!:<wbr>994:</div><div>/OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot/etc/group-:polkitd:!:<wbr>994:</div><div>/OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot/etc/passwd-:polkitd:!:<wbr>996:994::/etc/polkit-1:</div><div>/OE/build/oe-core/tmp-glibc/<wbr>work/core2-64-oe-linux/<wbr>systemd/1_234-r0/recipe-<wbr>sysroot/etc/passwd:polkitd:!:<wbr>996:994::/etc/polkit-1:</div></div><div><br></div><div>or there might be another issue in pseudo or something like that.</div><div><br></div><div>Thanks</div><div><div class="h5"><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 13, 2017 at 2:40 PM, Jason Wessel <span dir="ltr">&lt;<a href="mailto:jason.wessel@windriver.com" target="_blank">jason.wessel@windriver.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <div class="m_8062450860135185908gmail-m_-529113778308613453moz-cite-prefix">It should work because it has nothing
      to do with that particular passwd file.   This is builds
      successfully on a ubuntu 16.04 host which has no polkitd user.<br>
      <br>
      Also with the user add stanza in the patch it should be adding the
      user that is required when PACKAGECONFIG has the polkitd added to
      the psuedo passwd file.   We have quite a few configurations
      building properly.  Where I have seen transient failures before is
      when the -native sysroot does not get rebuilt but that is
      typically with other recipes. <br>
      <br>
      Is this still a problem? <br>
      <br>
      <br>
      Jason. <br>
      <br>
      <br>
      On 09/06/2017 01:35 PM, Martin Jansa wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Does this work on hosts without polkitd user?
        <div><br>
        </div>
        <div>Here it failed with:</div>
        <div><br>
        </div>
        <div>
          <div>| chown: invalid user: ‘polkitd:root’</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Aug 15, 2017 at 8:55 PM, Jason
          Wessel <span dir="ltr">&lt;<a href="mailto:jason.wessel@windriver.com" target="_blank">jason.wessel@windriver.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote">The systemd 234 added some
            files to the polkit directory and the<br>
            directory the files live in must be owned by the polkitd
            user, else<br>
            you will receive the following error when the rootfs is
            being<br>
            assembled:<br>
            <br>
            Error: Transaction check error:<br>
              file /usr/share/polkit-1/rules.d conflicts between
            attempted installs of polkit-0.113-r0.15.core2_64 and
            systemd-1:234-r0.0.core2_64<br>
            <br>
            The fix similar to other packages such as libvirt where the
            user must<br>
            exist and the directory must be created with the proper
            attributes.<br>
            <br>
            Signed-off-by: Jason Wessel &lt;<a href="mailto:jason.wessel@windriver.com" target="_blank">jason.wessel@windriver.com</a>&gt;<br>
            ---<br>
             meta/recipes-core/systemd/<a href="http://systemd_234.bb" rel="noreferrer" target="_blank">sys<wbr>temd_234.bb</a>
            | 9 +++++++++<br>
             1 file changed, 9 insertions(+)<br>
            <br>
            diff --git a/meta/recipes-core/systemd/<a href="http://systemd_234.bb" rel="noreferrer" target="_blank">sy<wbr>stemd_234.bb</a>
            b/meta/recipes-core/systemd/<a href="http://systemd_234.bb" rel="noreferrer" target="_blank">sy<wbr>stemd_234.bb</a><br>
            index ad7fc99b90..4560cf4175 100644<br>
            --- a/meta/recipes-core/systemd/<a href="http://systemd_234.bb" rel="noreferrer" target="_blank">sy<wbr>stemd_234.bb</a><br>
            +++ b/meta/recipes-core/systemd/<a href="http://systemd_234.bb" rel="noreferrer" target="_blank">sy<wbr>stemd_234.bb</a><br>
            @@ -245,6 +245,14 @@ do_install() {<br>
                            ln -s ../run/systemd/resolve/resolv.<wbr>conf
            ${D}${sysconfdir}/resolv-conf.<wbr>systemd<br>
                    fi<br>
                    install -Dm 0755 ${S}/src/systemctl/systemd-sys<wbr>v-install.SKELETON
            ${D}${systemd_unitdir}/systemd<wbr>-sysv-install<br>
            +<br>
            +       # If polkit is setup fixup permissions and ownership<br>
            +       if [ &quot;${@bb.utils.contains(&#39;PACKAGE<wbr>CONFIG&#39;,
            &#39;polkit&#39;, &#39;polkit&#39;, &#39;&#39;, d)}&quot; = &quot;polkit&quot; ] ; then<br>
            +           if [ -d ${D}${datadir}/polkit-1/rules.<wbr>d ] ;
            then<br>
            +               chmod 700 ${D}${datadir}/polkit-1/rules.<wbr>d<br>
            +               chown polkitd:root
            ${D}${datadir}/polkit-1/rules.<wbr>d<br>
            +           fi<br>
            +       fi<br>
             }<br>
            <br>
             do_install_ptest () {<br>
            @@ -308,6 +316,7 @@ USERADD_PARAM_${PN} +=
            &quot;${@bb.utils.contains(&#39;PACKAGE<wbr>CONFIG&#39;, &#39;timesyncd&#39;,
            &#39;--sy<br>
             USERADD_PARAM_${PN} += &quot;${@bb.utils.contains(&#39;PACKAGE<wbr>CONFIG&#39;,
            &#39;networkd&#39;, &#39;--system -d / -M --shell /bin/nologin
            systemd-network;&#39;, &#39;&#39;, d)}&quot;<br>
             USERADD_PARAM_${PN} += &quot;${@bb.utils.contains(&#39;PACKAGE<wbr>CONFIG&#39;,
            &#39;coredump&#39;, &#39;--system -d / -M --shell /bin/nologin
            systemd-coredump;&#39;, &#39;&#39;, d)}&quot;<br>
             USERADD_PARAM_${PN} += &quot;${@bb.utils.contains(&#39;PACKAGE<wbr>CONFIG&#39;,
            &#39;resolved&#39;, &#39;--system -d / -M --shell /bin/nologin
            systemd-resolve;&#39;, &#39;&#39;, d)}&quot;<br>
            +USERADD_PARAM_${PN} += &quot;${@bb.utils.contains(&#39;PACKAGE<wbr>CONFIG&#39;,
            &#39;polkit&#39;, &#39;--system --no-create-home --user-group --home-dir
            ${sysconfdir}/polkit-1 polkitd;&#39;, &#39;&#39;, d)}&quot;<br>
             GROUPADD_PARAM_${PN} = &quot;-r lock; -r systemd-journal&quot;<br>
             USERADD_PARAM_${PN}-extra-uti<wbr>ls += &quot;--system -d / -M
            --shell /bin/nologin systemd-bus-proxy;&quot;<span class="m_8062450860135185908gmail-HOEnZb"><font color="#888888"><br>
            <span class="m_8062450860135185908gmail-m_-529113778308613453HOEnZb"><br>
              --<br>
              2.11.0<br>
              <br>
              --<br>
              ______________________________<wbr>_________________<br>
              Openembedded-core mailing list<br>
              <a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openem<wbr>bedded.org</a><br>
              <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
            </span></font></span></blockquote><span class="m_8062450860135185908gmail-HOEnZb"><font color="#888888">
        </font></span></div><span class="m_8062450860135185908gmail-HOEnZb"><font color="#888888">
        <br>
      </font></span></div>
    </blockquote>
    <p><br>
    </p>
  </div>

</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>