1

Topic: [SOLVED] Unable to build "msgfmt: cannot locate ITS rules for org..."

I'm trying to update debian to gparted 1.5, and the build fails with:

/usr/bin/msgfmt: cannot locate ITS rules for org.gnome.gparted.policy.in.

Google finds many people with similar errors building gnome programs and they said to install the appstream package, but this has not helped.  Does anyone have any idea what bloody file msgfmt is looking for?

2

Re: [SOLVED] Unable to build "msgfmt: cannot locate ITS rules for org..."

That error means these files are missing:

/usr/share/gettext/its/policy.its
/usr/share/gettext/its/policy.loc

On my Debian 11 VM they are provided by package policykit-1.

3

Re: [SOLVED] Unable to build "msgfmt: cannot locate ITS rules for org..."

Ahh, great... it appears that these files exist in no package in Debian 12.  What are these files for and how does gparted come to depend on them?  Are many other gnome apps using gettext going to be affected as well, or is there something in this org.gnome.gparted.policy.in file that directs gettext to these files?

If this is a general thing that gettext needs, why wasn't it packaged as part of gettext before?  Why were these files part of policykit?

4

Re: [SOLVED] Unable to build "msgfmt: cannot locate ITS rules for org..."

It sounds like this is a config file that gparted uses to tell pkexec how to run it as root, and policykit used to ship these ITS files to assist with the translation of such config files, but during the current policykit transition, these files got lost and are no longer in any binary package.  I've filed a bug in debian to hopefully get that fixed.

5

Re: [SOLVED] Unable to build "msgfmt: cannot locate ITS rules for org..."

It's from GParted implementing GNOME Goal: Gettext Migration from 2016 to change from using intltool to gettext translation.
(GParted merge request MR !107 "Migrate from intltool to gettext translation").


Those missing files tell gettext what elements to translate in PolicyKit's .policy XML files at build time.  Some distros put those files into a separate PolicyKit development package.

6

Re: [SOLVED] Unable to build "msgfmt: cannot locate ITS rules for org..."

Sorry.  I've made a typo.  The needed file names are:

/usr/share/gettext/its/polkit.its
/usr/share/gettext/its/polkit.loc

"polkit" not "policy".

I've downloaded Debian 12 Live and apt-file search reports those files are available in the polkitd package.

7

Re: [SOLVED] Unable to build "msgfmt: cannot locate ITS rules for org..."

Ahh, apparently that is now located in the libpolkit-gobject-1-dev package.