• Mike Fleetwood's avatar
    Add required polkit action file (#776437) · f35e734a
    Mike Fleetwood authored
    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
    [2] Automake Manual, 27.10 Installing to Hard-Coded Locations
        "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
        "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
    Bug 776437 - GParted fails to run as root under Wayland
org.gnome.gparted.policy.in.in 929 Bytes