Commit graph

4 commits

Author SHA1 Message Date
Mike Fleetwood f35e734a0c 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-09-01 10:14:20 -06:00
Mike Fleetwood 0841b0274b Exclude 2 gtest files from translation (#781978)
Running 'make check' is failing, reporting that 2 of the Google Test
files need to be translated.

    $ make check
    ...
    Making check in po
    make[1]: Entering directory `/home/centos/programming/c/gparted/po'
    rm -f missing notexist
    srcdir=. /usr/bin/intltool-update -m
    The following files contain translations and are currently not in use. Please
    consider adding these to the POTFILES.in file, located in the po/ directory.

    lib/gtest/include/gtest/internal/gtest-filepath.h
    lib/gtest/src/gtest.cc

    If some of these files are left out on purpose then please add them to
    POTFILES.skip instead of POTFILES.in. A file 'missing' containing this list
    of left out files has been written in the current directory.
    Please report to https://bugzilla.gnome.org/enter_bug.cgi?product=gparted
    if [ -r missing -o -r notexist ]; then \
      exit 1; \
    fi
    make[1]: *** [check] Error 1
    make[1]: Leaving directory `/home/centos/programming/c/gparted/po'
    make: *** [check-recursive] Error 1
    'make check' is failing

This is not true, the files do not contain translatable strings.  This
is a match for known intltool bug:

    False positives from intltool-update -m
    https://bugs.launchpad.net/intltool/+bug/545862

Fix by adding the problem file names into POTFILES.skip.

Bug 781978 - Add Google Test C++ test framework
2017-06-02 10:13:16 -06:00
Curtis Gedak 4cc5103dbd Work around make distcheck issue (#778628)
The command 'make distcheck' runs a build in dist directory subdirs
and then runs intltool -m which in turn complains about translations
in a built file:

  The following files contain translations and are currently not in
  use. Please consider adding these to the POTFILES.in file, located
  in the po/ directory.

  sub/gparted.desktop.in

See also upstream intltool issue bug report:

  intltool confused by separate build-dir
  https://bugs.launchpad.net/intltool/+bug/1117944

Bug 778628 - Work around automake-1.15 & intltool complaining about
             translations in build dir
2017-02-15 14:05:22 +00:00
Curtis Gedak 605e1f4cdc Fixed bug #324220 with the following changes:
- Removed gparted-disable-automount.fdi handling.
- Renamed gparted binary to gpartedbin to permit a calling script to be named gparted.
- Added new calling script gparted.in to permit using hal-lock to acuiqre device locks to prevent automounting while executing gpartedbin.
- Renamed gparted.desktop.in to gparted.desktop.in.in to permit parsing installdir.

svn path=/trunk/; revision=826
2008-04-21 15:22:00 +00:00