<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" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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">jason.wessel@windriver.com</a>&gt;<br>
---<br>
 meta/recipes-core/systemd/<a href="http://systemd_234.bb" rel="noreferrer" target="_blank">syst<wbr>emd_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-<wbr>sysv-install.SKELETON ${D}${systemd_unitdir}/<wbr>systemd-sysv-install<br>
+<br>
+       # If polkit is setup fixup permissions and ownership<br>
+       if [ &quot;${@bb.utils.contains(&#39;<wbr>PACKAGECONFIG&#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;<wbr>PACKAGECONFIG&#39;, &#39;timesyncd&#39;, &#39;--sy<br>
 USERADD_PARAM_${PN} += &quot;${@bb.utils.contains(&#39;<wbr>PACKAGECONFIG&#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;<wbr>PACKAGECONFIG&#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;<wbr>PACKAGECONFIG&#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;<wbr>PACKAGECONFIG&#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-<wbr>utils += &quot;--system -d / -M --shell /bin/nologin systemd-bus-proxy;&quot;<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.11.0<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.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>
</font></span></blockquote></div><br></div>