package/polkit: fix install of polkit.its
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Tue, 10 Aug 2021 14:58:06 +0000 (16:58 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 12 Aug 2021 21:19:02 +0000 (23:19 +0200)
Install polkit.its in $(HOST_DIR)/share/gettext/its as suggested by
https://gitlab.gnome.org/GNOME/gvfs/-/issues/508 to avoid the following
build failure with gvfs because polkit installs polkit.its in
$(STAGING_DIR)/usr/share/gettext:

FAILED: daemon/org.gtk.vfs.file-operations.policy
/tmp/instance-3/output-1/host/bin/meson --internal msgfmthelper daemon/org.gtk.vfs.file-operations.policy.in daemon/org.gtk.vfs.file-operations.policy xml /tmp/instance-3/output-1/build/gvfs-1.44.1/po
msgfmt: cannot locate ITS rules for daemon/org.gtk.vfs.file-operations.policy.in

Fixes:
 - http://autobuild.buildroot.org/results/ba9a8b31e6e275d4db1905241a9153a0513eb335

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/polkit/polkit.mk

index d5b3955ddbdd8db8820fccf0438e5f53f3d6c79f..23adb534d05768e7a252520fa76929dc1e1f0b48 100644 (file)
@@ -41,6 +41,14 @@ else
 POLKIT_CONF_OPTS += --with-authfw=shadow
 endif
 
+# polkit.its is needed for gvfs and must be installed in $(HOST_DIR)
+# and not $(STAGING_DIR)
+define POLKIT_INSTALL_ITS
+       $(INSTALL) -D -m 644 $(@D)/data/polkit.its \
+               $(HOST_DIR)/share/gettext/its
+endef
+POLKIT_POST_INSTALL_TARGET_HOOKS += POLKIT_INSTALL_ITS
+
 define POLKIT_USERS
        polkitd -1 polkitd -1 * - - - Polkit Daemon
 endef