dlenski / gp-saml-gui

Interactively authenticate to GlobalProtect VPNs that require SAML
GNU General Public License v3.0
293 stars 66 forks source link

Ubuntu 24.04 support #98

Closed roworu closed 4 months ago

roworu commented 4 months ago

Hello. I found out, that on Ubuntu 24.04, that is planned to release in a few weeks, there is an issue during installation of dependencies:

sudo apt install python3-gi gir1.2-gtk-3.0 gir1.2-webkit2-4.0

E: Package 'gir1.2-webkit2-4.0' has no installation candidate

But there is a newer package version, installed by default:

apt search gir1.2-webkit2 
Sorting... Done
Full Text Search... Done
gir1.2-webkit2-4.1/noble,now 2.44.0-2 amd64 [installed]
  Web content engine library for GTK - GObject introspection data

And therefore, we getting an error during startup due to this line in code:

gi.require_version('WebKit2', '4.0')

If I just change it to 4.1 program starts and working fine.

Do we need to just update requirements? Or remove this line?

AFAIK, not all distros ship webkit2 version 4.1, so there might be reason to add additional check, if one of them (4.1 or 4.0) is presented.

roworu commented 4 months ago

@dlenski , please, comment on which way you think is best, I would be happy to provide PR. Thank you.

eitzenbe commented 4 months ago

any updates on this issue? recently set up a new laptop and am now blocked from access our company internals

roworu commented 4 months ago

@eitzenbe , as a temporal solution, you could just comment these lines:

try:
    import gi
    gi.require_version('Gtk', '3.0')
#    gi.require_version('WebKit2', '4.0')
    from gi.repository import Gtk, WebKit2, GLib
except ImportError:
    try:
        import pgi as gi
        gi.require_version('Gtk', '3.0')
#        gi.require_version('WebKit2', '4.0')
        from pgi.repository import Gtk, WebKit2, GLib
    except ImportError:
        gi = None
if gi is None:

In gp_saml_gui.py file, usually located somewhere here:

/home/user/.local/lib/python3.12/site-packages/gp_saml_gui.py

eitzenbe commented 4 months ago

Global-protect releases a new version for 24.04 all sorted out thanks

pboushy commented 4 months ago

This is resolved in https://github.com/dlenski/gp-saml-gui/commit/adf8261424a5287124dde7daa99a94675a89f5e8

dlenski commented 4 months ago

Duplicate of #92, resolved now via https://github.com/dlenski/gp-saml-gui/commit/adf8261424a5287124dde7daa99a94675a89f5e8