On Thu, 2019-07-18 at 15:53 +0200, Jelle Licht wrote:
> Thomas Haller <[email protected]> writes:
> 
> > On Thu, 2019-07-18 at 13:27 +0200, Jelle Licht wrote:
> > > Thomas Haller <[email protected]> writes:
> > > 
> > > > On Wed, 2019-07-17 at 11:46 +0200, Jelle Licht wrote:
> > > > [snip]
> > > > But the daemon runs as root, so setting NM_VPN_PLUGIN_DIR
> > > > requires
> > > > you
> > > > to become root, to restart the daemon, and to set the
> > > > environment
> > > > variable (in the systemd service file). At that point, you
> > > > could
> > > > just
> > > > as well copy the .name file to /usr/lib/NetworkManager/VPN. Why
> > > > is
> > > > that
> > > > not sufficient?
> > > 
> > > As you say, we do set NM_VPN_PLUGIN_DIR for our networkmanager
> > > daemon.
> > > 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
> > > in.
> > > 
> > > Put another way, do you know of a way to pass vpn plugin
> > > locations to
> > > NM
> > > at runtime?
> > 
> > Hi,
> > 
> > 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. 

if you have

  /gnu/store/123verylonghash-networkmanager-1.18.2/
  /gnu/store/234verylonghash-networkmanager-1.20.0/

and

  /gnu/store/345verylonghash-networkmanager-openvpn-1.2.8/

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
> > the
> > right place? Possibly we could add a configure option to make that
> > easier.
> 
> 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.

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
build-option?


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
> 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'.
> 
> > Thomas
> 
> Thanks,
> Jelle

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

_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to