[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Not installing to hard-coded locations vs polkit's fixed location

From: Nick Bowler
Subject: Re: Not installing to hard-coded locations vs polkit's fixed location
Date: Mon, 21 Aug 2017 10:06:43 -0400


On 2017-08-21, Mike Fleetwood <address@hidden> wrote:
> I'm working on adding installation of a polkit action file into
> GParted's build and install system, however the polkit daemon only
> recongises action files installed into the single location of
> /usr/share/polkit-1/action/.

There is a section about this issue in the Automake manual[1].

> Currently the contains this line:
> (larger fragment of the below)
>     polkit_actiondir = $(datadir)/polkit-1/actions
> Are there any resolutions to this?
> I could:
> 1) Leave things as they are and document it as the builders
>    responsibility, that when prefix defaults to /usr/local, or anything
>    other than /usr, that the polkit action file will need manually
>    installing into the correct location under a unique name so as not to
>    overright any distro package provided copy.

It is pretty much fine as is.  If it matters, the installer can specify
polkit_actiondir when they install your package, for example:

  % make polkit_actiondir=/the/correct/location install

Just include a note about it in your README.

Things get a bit more complicated if you want the default install
location to be something probed at configure time.  This usually
involves some heuristics to get a reasonable user experience.

> 2) Set polkit_actiondir to /usr/share/polkit-1/action but that is
>    against automake guidance and breaks 'make distcheck'.

This is generally a bad idea, as installing to hardcoded locations breaks
many things.  For example, it will prevent successful installation as an
unpriviliged user (unless the user knows to override polkit_actiondir).

> Are there any other solutions which are reasonable?

Another option (which might not be acceptable for you) is to do
nothing: i.e., don't install any files into the external location
by default.  The user can place files manually into the correct
locations as required.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]