Re: [PATCH] vpn-manager: respect NM_VPN_PLUGIN_DIR

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 requires
to become root, to restart the daemon, and to set the environment
variable (in the systemd service file). At that point, you could
as well copy the .name file to /usr/lib/NetworkManager/VPN. Why is
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 Guix
System, which does not follow FHS. As such, there is no `/usr/lib` to
speak of, or any of the other default locations networkmanager looks

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 in
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 this
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 means
that the right environment variables are set so systems can actually use
softare installed in the store. NM and each nm vpn plugin has their very
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. 

At that point, can you not patch NetworkManager source to look at the
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 only
known after building each of nm and the selected vpn plugins. This is a
consequence of the Guix software model. As such, directly patching the
source or having a configure option would not help us here.

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



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