aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-bsp
diff options
context:
space:
mode:
authorMarkus Volk <f_l_k@t-online.de>2023-02-13 10:25:57 +0100
committerKhem Raj <raj.khem@gmail.com>2023-02-13 14:35:35 -0800
commit4c1f83d2724dd87af4bbaf1b322dbcf106654a16 (patch)
tree00583f2c24952606248efb9b5b5313ef33e5bc17 /meta-oe/recipes-bsp
parent1f2825ed40b2a943b8397eac15beb84bb7e50e51 (diff)
downloadmeta-openembedded-4c1f83d2724dd87af4bbaf1b322dbcf106654a16.tar.gz
fwupd: fix polkit rules.d permissions
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> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-bsp')
-rw-r--r--meta-oe/recipes-bsp/fwupd/fwupd_1.8.9.bb13
1 files changed, 12 insertions, 1 deletions
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 0f889ca8fc..14d83ec521 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,17 @@ 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() {
+ if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
+ #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
+ fi
+}
+
FILES:${PN} += "${libdir}/fwupd-plugins-* \
${libdir}/fwupd-${PV} \
${systemd_unitdir} \