gpclient: restore gpgui.desktop for globalprotectcallback scheme handler

PR #485779 dropped the gpgui.desktop install, reasoning that all gpgui
files require the proprietary gpgui binary. But the desktop file is not
gpgui-only: its Exec is `gpclient launch-gui %u`, the free CLI subcommand
that receives the SAML auth callback. Without it the
x-scheme-handler/globalprotectcallback handler is unregistered, so
external-browser SSO (`gpclient connect --browser <x>`) hangs after login
- the browser opens globalprotectcallback://<data> with nothing to handle
it, and the auth cookie never returns to the waiting connect process.

Reinstall the desktop file on Linux and point Exec at the gpclient in
$out, matching the pre-2.5.1 behaviour.

(cherry picked from commit 4d50d7d087)
This commit is contained in:
Mariappan Ramasamy 2026-06-19 18:47:02 +08:00 committed by github-actions[bot]
commit 3725e26fda

View file

@ -86,6 +86,11 @@ rustPlatform.buildRustPackage {
cp -r packaging/files/usr/lib $out/lib
substituteInPlace $out/lib/NetworkManager/dispatcher.d/pre-down.d/gpclient.down \
--replace-fail /usr/bin/gpclient $out/bin/gpclient
install -Dm644 packaging/files/usr/share/applications/gpgui.desktop \
$out/share/applications/gpgui.desktop
substituteInPlace $out/share/applications/gpgui.desktop \
--replace-fail /usr/bin/gpclient $out/bin/gpclient
'';
postFixup = ''