NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.28k stars 14.26k forks source link

openvpn3 won't work with glib:2-2.76 or superior #235986

Open rafaelsoaresbr opened 1 year ago

rafaelsoaresbr commented 1 year ago

Describe the bug

openvpn3 won't work with glib:2-2.76 or superior

Steps To Reproduce

Steps to reproduce the behavior:

[user@system:~]$ openvpn3 config-start --name myconfig
ERROR ** Failed to disconnect tunnel (object does not exist)

Expected behavior

openvpn3 should establish connection.

Additional context

https://github.com/OpenVPN/openvpn3-linux/issues/171 https://discussion.fedoraproject.org/t/dsommers-openvpn3/4024

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.31, NixOS, 23.05 (Stoat), 23.05.533.c37ca420157`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
MartinLoeper commented 1 year ago

I am monitoring the upstream issue since last week. I would like to work on a fix for this on NixOS as soon as the fixes for other distros are released as announced in the linked upstream issue.

This issue is really annoying as we rely on enterprise vpn with sso at Nesto which is not supported by openvpn2.

fdzuJ commented 1 year ago

Is there any workaround right now?

KFearsoff commented 11 months ago

Oh. Uhh. Sorry, I haven't noticed this issue in time, and nobody pinged me.

I'm currently working on a fix, which will probably just be a boring glib pinning.

KFearsoff commented 11 months ago

So, I have spent time working on this, and I unfortunately couldn't figure out the intricacies of the build process of glib in Nixpkgs. No matter how much I tried, I just wasn't able to make openvpn3 actually depend on the old glib: for some reason it always prefers the newer one, even if its dependencies use the old one correctly.

dsommers commented 10 months ago

There is work in the pipe to fix the glib2 related issues .... See this comment for more details: https://github.com/OpenVPN/openvpn3-linux/issues/171#issuecomment-1858487477

The instructions in that comment is to be used on top of an existing installed version; for the time being it only replaces the first binaries failing with glib2-2.76 - but everything will be migrated to the new D-Bus implementation layer (GDBus++) - when that milestone is reached, the v22_dev release will happen.

fdzuJ commented 5 months ago

@KFearsoff hi! Just pinging you to let you know that v22_dev is released.

JarvisCraft commented 4 months ago

Hi there! Has anyone managed to change pkgs/tools/networking/openvpn3/default.nix for the upstream v22_dev which uses Meson now?

JarvisCraft commented 4 months ago

For those looking for the fix: I've created a PR where I update the system to v22_dev. I've just managed to make it work, but there still are some chores and clean ups I would like to do before creating a PR. E.g., I currently used a forked branch of openvpn3 instead of patches and I haven't made the module to write openvpn3 configs yet, but you already can play with it: https://github.com/JarvisCraft/nixpkgs/pull/1

JarvisCraft commented 4 months ago

There we go, I've created #326623 in which the version is updated to v22_dev.

nixos-discourse commented 4 months ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/4300

nixos-discourse commented 4 months ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1846