Message ID | 20230212170320.284295-1-f_l_k@t-online.de |
---|---|
State | Under Review |
Headers | show |
Series | [meta-oe,1/2] fwupd: fix polkit rules.d permissions | expand |
it seems to fail in do_install https://errors.yoctoproject.org/Errors/Details/689713/ On Sun, Feb 12, 2023 at 9:03 AM Markus Volk <f_l_k@t-online.de> wrote: > > This fixes: > > Error: Transaction test error: > file /usr/share/polkit-1/rules.d conflicts between attempted installs of fwupd-1.8.9-r0.intel_corei7_64 and polkit-122-r0.corei7_64 > file /usr/share/polkit-1/rules.d conflicts between attempted installs of flatpak-1.15.1-r0.corei7_64 and fwupd-1.8.9-r0.intel_corei7_64 > > Signed-off-by: Markus Volk <f_l_k@t-online.de> > --- > meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb b/meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb > index 0f889ca8f..c0f695753 100644 > --- a/meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb > +++ b/meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb > @@ -13,7 +13,7 @@ UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" > # Machine-specific as we examine MACHINE_FEATURES to decide whether to build the UEFI plugins > PACKAGE_ARCH = "${MACHINE_ARCH}" > > -inherit meson vala gobject-introspection systemd bash-completion pkgconfig gi-docgen ptest manpages > +inherit meson vala gobject-introspection systemd bash-completion pkgconfig gi-docgen ptest manpages useradd > > GIDOCGEN_MESON_OPTION = 'docs' > GIDOCGEN_MESON_ENABLE_FLAG = 'docgen' > @@ -115,6 +115,15 @@ DISABLE_NON_X86:x86 = "" > DISABLE_NON_X86:x86-64 = "" > PACKAGECONFIG:remove = "${DISABLE_NON_X86}" > > +USERADD_PACKAGES = "${PN}" > +USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 --shell /bin/nologin polkitd" > + > +do_install:append() { > + #Fix up permissions on polkit rules.d to work with rpm4 constraints > + chmod 700 ${D}/${datadir}/polkit-1/rules.d > + chown polkitd:root ${D}/${datadir}/polkit-1/rules.d > +} > + > FILES:${PN} += "${libdir}/fwupd-plugins-* \ > ${libdir}/fwupd-${PV} \ > ${systemd_unitdir} \ > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#101054): https://lists.openembedded.org/g/openembedded-devel/message/101054 > Mute This Topic: https://lists.openembedded.org/mt/96918159/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Am So, 12. Feb 2023 um 21:48:10 -0800 schrieb Khem Raj
<raj.khem@gmail.com>:
> it seems to fail in do_install
I've sent a v2 that changes the permissions only if polkit is enabled.
That should hopefully fix the do_install issue.
diff --git a/meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb b/meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb index 0f889ca8f..c0f695753 100644 --- a/meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb +++ b/meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb @@ -13,7 +13,7 @@ UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" # Machine-specific as we examine MACHINE_FEATURES to decide whether to build the UEFI plugins PACKAGE_ARCH = "${MACHINE_ARCH}" -inherit meson vala gobject-introspection systemd bash-completion pkgconfig gi-docgen ptest manpages +inherit meson vala gobject-introspection systemd bash-completion pkgconfig gi-docgen ptest manpages useradd GIDOCGEN_MESON_OPTION = 'docs' GIDOCGEN_MESON_ENABLE_FLAG = 'docgen' @@ -115,6 +115,15 @@ DISABLE_NON_X86:x86 = "" DISABLE_NON_X86:x86-64 = "" PACKAGECONFIG:remove = "${DISABLE_NON_X86}" +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 --shell /bin/nologin polkitd" + +do_install:append() { + #Fix up permissions on polkit rules.d to work with rpm4 constraints + chmod 700 ${D}/${datadir}/polkit-1/rules.d + chown polkitd:root ${D}/${datadir}/polkit-1/rules.d +} + FILES:${PN} += "${libdir}/fwupd-plugins-* \ ${libdir}/fwupd-${PV} \ ${systemd_unitdir} \
This fixes: Error: Transaction test error: file /usr/share/polkit-1/rules.d conflicts between attempted installs of fwupd-1.8.9-r0.intel_corei7_64 and polkit-122-r0.corei7_64 file /usr/share/polkit-1/rules.d conflicts between attempted installs of flatpak-1.15.1-r0.corei7_64 and fwupd-1.8.9-r0.intel_corei7_64 Signed-off-by: Markus Volk <f_l_k@t-online.de> --- meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)