<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"><<a href="mailto:jason.wessel@windriver.com" target="_blank">jason.wessel@windriver.com</a>></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 <<a href="mailto:jason.wessel@windriver.com">jason.wessel@windriver.com</a>><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 [ "${@bb.utils.contains('<wbr>PACKAGECONFIG', 'polkit', 'polkit', '', d)}" = "polkit" ] ; 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} += "${@bb.utils.contains('<wbr>PACKAGECONFIG', 'timesyncd', '--sy<br>
USERADD_PARAM_${PN} += "${@bb.utils.contains('<wbr>PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"<br>
USERADD_PARAM_${PN} += "${@bb.utils.contains('<wbr>PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"<br>
USERADD_PARAM_${PN} += "${@bb.utils.contains('<wbr>PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"<br>
+USERADD_PARAM_${PN} += "${@bb.utils.contains('<wbr>PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"<br>
GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"<br>
USERADD_PARAM_${PN}-extra-<wbr>utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;"<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>