gparted/org.gnome.gparted.policy.in.in

24 lines
929 B
Plaintext
Raw Normal View History

Add required polkit action file (#776437) An action file is always needed with polkit to describe the privileged actions that are available to the subject (client program). For GParted the only available action is to run the gparted shell script as root. Note that the polkit action file will be installed into location $(prefix)/share/polkit-1/actions. This is required by the GNU Coding Standards [1] and to prevent 'make distcheck' from failing [2]. However polkit only uses /usr/share/polkit-1/actions for it's action files [3]. This dilemma was discussed in this Bugzilla bug 776437 and on the general Automake discussion email list [4]. The solution is to simply document in the README file that a manual additional installation step may be required. The action file is marked as translatable with the underscore (_) of the _description and _message tags identifying the string to be translated. Use of INTLTOOL_POLICY_RULE in Makefile.am to merge translations into the polkit action file necessitates increasing the minimum version of intltool to 0.36.0 where it was first introduced in intltool.m4. This will prevent GParted building on RedHat/CentOS 5 which only has intltool 0.35.0. But that doesn't matter because RedHat/CentOS 5 reached end of life on 31st March 2017. [1] GNU Coding Standards, 7.2.5 Variables for Installation Directories https://www.gnu.org/prep/standards/standards.html#Directory-Variables [2] Automake Manual, 27.10 Installing to Hard-Coded Locations https://www.gnu.org/software/automake/manual/automake.html#Hard_002dCoded-Install-Paths "My package needs to populate the installation directory of another package at install-time. I can easily compute that installation directory in configure, but if I install files therein, 'make distcheck' fails. How else should I do?" [3] polkit(8), Declaring Actions https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html#polkit-declaring-actions "A mechanism need to declare a set of actions in order to use polkit. Actions correspond to operations that clients can request the mechanism to carry out and are defined in XML files that the mechanism installs into the /usr/share/polkit-1/actions directory." [4] Not installing to hard-coded locations vs polkit's fixed location http://lists.gnu.org/archive/html/automake/2017-08/msg00015.html Bug 776437 - GParted fails to run as root under Wayland
2017-06-24 03:39:37 -06:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>The GParted Project</vendor>
<vendor_url>https://gparted.org</vendor_url>
Add required polkit action file (#776437) An action file is always needed with polkit to describe the privileged actions that are available to the subject (client program). For GParted the only available action is to run the gparted shell script as root. Note that the polkit action file will be installed into location $(prefix)/share/polkit-1/actions. This is required by the GNU Coding Standards [1] and to prevent 'make distcheck' from failing [2]. However polkit only uses /usr/share/polkit-1/actions for it's action files [3]. This dilemma was discussed in this Bugzilla bug 776437 and on the general Automake discussion email list [4]. The solution is to simply document in the README file that a manual additional installation step may be required. The action file is marked as translatable with the underscore (_) of the _description and _message tags identifying the string to be translated. Use of INTLTOOL_POLICY_RULE in Makefile.am to merge translations into the polkit action file necessitates increasing the minimum version of intltool to 0.36.0 where it was first introduced in intltool.m4. This will prevent GParted building on RedHat/CentOS 5 which only has intltool 0.35.0. But that doesn't matter because RedHat/CentOS 5 reached end of life on 31st March 2017. [1] GNU Coding Standards, 7.2.5 Variables for Installation Directories https://www.gnu.org/prep/standards/standards.html#Directory-Variables [2] Automake Manual, 27.10 Installing to Hard-Coded Locations https://www.gnu.org/software/automake/manual/automake.html#Hard_002dCoded-Install-Paths "My package needs to populate the installation directory of another package at install-time. I can easily compute that installation directory in configure, but if I install files therein, 'make distcheck' fails. How else should I do?" [3] polkit(8), Declaring Actions https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html#polkit-declaring-actions "A mechanism need to declare a set of actions in order to use polkit. Actions correspond to operations that clients can request the mechanism to carry out and are defined in XML files that the mechanism installs into the /usr/share/polkit-1/actions directory." [4] Not installing to hard-coded locations vs polkit's fixed location http://lists.gnu.org/archive/html/automake/2017-08/msg00015.html Bug 776437 - GParted fails to run as root under Wayland
2017-06-24 03:39:37 -06:00
<icon_name>gparted</icon_name>
<action id="org.gnome.gparted">
<_description>Run GParted as root</_description>
<_message>Authentication is required to run the GParted Partition Editor as root</_message>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">@bindir@/gparted</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>