Re: [PATCH] vpn-manager: respect NM_VPN_PLUGIN_DIR

On Thu, 2019-07-18 at 15:53 +0200, Jelle Licht wrote:
Thomas Haller <thaller redhat com> writes:

On Thu, 2019-07-18 at 13:27 +0200, Jelle Licht wrote:
Thomas Haller <thaller redhat com> writes:

On Wed, 2019-07-17 at 11:46 +0200, Jelle Licht wrote:
But the daemon runs as root, so setting NM_VPN_PLUGIN_DIR
to become root, to restart the daemon, and to set the
variable (in the systemd service file). At that point, you
as well copy the .name file to /usr/lib/NetworkManager/VPN. Why
not sufficient?

As you say, we do set NM_VPN_PLUGIN_DIR for our networkmanager
I was trying to have networkmanager vpn plugins simply work for
System, which does not follow FHS. As such, there is no
`/usr/lib` to
speak of, or any of the other default locations networkmanager

Put another way, do you know of a way to pass vpn plugin
locations to
at runtime?


Hm. /usr/lib/NetworkManager/VPN is relevant to all the VPN plugins
your system.

So, even if you don't use /usr/lib, then all plugins still need to
agree on one location where to place their .name files? Or how is
supposed to work on Guix?

The simplified story is that guix builds and installs software in an
immutable store, with unfriendly looking paths such as
`/gnu/store/123verylonghash-networkmanager-4.3.1/`. These are then
symlinked into a so-called profile, which can be activated which
that the right environment variables are set so systems can actually
softare installed in the store. NM and each nm vpn plugin has their
own 'unfriendly' store path as well.

We have services in guix that are akin to a daemon along with its
configuration. It is at this point we decide which vpn plugins to
enable, and only at this point where we know which paths should be
visible to nm in order to properly 'see' the vpn plugins. 

if you have




then the plugin should work with both versions of NetworkManager. How
would you solve that if you don't have a well known path where VPN
plugins announce their existance (by putting their .name file there).

At that point, can you not patch NetworkManager source to look at
right place? Possibly we could add a configure option to make that

To summarize and directly address your point; there is indeed *one*
location where we put all of our vpn plugins, but this location is
known after building each of nm and the selected vpn plugins.

When switching NetworkManager you have to rebuild all plugins? That
seems unnecessary and diamentral. At most you need to run a script to
put the .name files in the new location.

Also, if you anyway rebuild everything, why do you need an environment
variable? If you can set the environment variable, can you not set the

I guess, if you switch between NetworkManager versions, you would
change the environment variable. But that is not enough. The VPN
plugins need to copy their name files to the new location. And at that
point, what does the environment variable help?

This is a
consequence of the Guix software model. As such, directly patching
source or having a configure option would not help us here.

NB, we could hardcode a location such as
as well, but this would require a hack that would not be acceptable
inclusion in `Guix proper'.



Attachment: signature.asc
Description: This is a digitally signed message part

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