Package Details: globalprotect-openconnect-git 2.5.1.r1.g24f9bbb-2

Git Clone URL: https://aur.archlinux.org/globalprotect-openconnect-git.git (read-only, click to copy)
Package Base: globalprotect-openconnect-git
Description: A GUI client for GlobalProtect VPN, based on OpenConnect, supports the SSO authentication method.
Upstream URL: https://github.com/yuezk/GlobalProtect-openconnect
Keywords: globalprotect openconnect saml vpn
Licenses: GPL3
Conflicts: globalprotect-openconnect
Provides: globalprotect-openconnect, gpauth, gpclient, gpgui, gpservice
Submitter: yuezk
Maintainer: yuezk
Last Packager: yuezk
Votes: 8
Popularity: 0.45
First Submitted: 2021-10-16 07:43 (UTC)
Last Updated: 2025-12-23 01:48 (UTC)

Latest Comments

1 2 3 4 Next › Last »

yuezk commented on 2026-01-10 11:02 (UTC)

@fiskhest, I couldn't understand why Claude's solution could fix this. OpenConnect doesn't have the --without=libtspi option.

fiskhest commented on 2026-01-07 07:41 (UTC)

The most recent changes lead to:

error: linking with `cc` failed: exit status: 1
[...]
  = note: /usr/bin/ld: /tmp/rustcLTTV3T/libopenconnect-6efa88a329986429.rlib(libopenconnect_la-gnutls_tpm.o): in function `tpm_sign_fn':
          gnutls_tpm.c:(.text.tpm_sign_fn+0x61): undefined reference to `Tspi_Context_CreateObject'
          /usr/bin/ld: gnutls_tpm.c:(.text.tpm_sign_fn+0x80): undefined reference to `Trspi_Error_String'
          /usr/bin/ld: gnutls_tpm.c:(.text.tpm_sign_fn+0xae): undefined reference to `Tspi_Hash_SetHashValue'
          /usr/bin/ld: gnutls_tpm.c:(.text.tpm_sign_fn+0xc9): undefined reference to `Trspi_Error_String'
          /usr/bin/ld: gnutls_tpm.c:(.text.tpm_sign_fn+0xf0): undefined reference to `Tspi_Context_CloseObject'
          /usr/bin/ld: gnutls_tpm.c:(.text.tpm_sign_fn+0x109): undefined reference to `Tspi_Hash_Sign'
          /usr/bin/ld: gnutls_tpm.c:(.text.tpm_sign_fn+0x11e): undefined reference to `Tspi_Context_CloseObject'
          /usr/bin/ld: gnutls_tpm.c:(.text.tpm_sign_fn+0x153): undefined reference to `Trspi_Error_String'
          /usr/bin/ld: /tmp/rustcLTTV3T/libopenconnect-6efa88a329986429.rlib(libopenconnect_la-gnutls_tpm.o): in function `load_tpm1_key':
          gnutls_tpm.c:(.text.load_tpm1_key+0x130): undefined reference to `Tspi_Context_Create'
          /usr/bin/ld: gnutls_tpm.c:(.text.load_tpm1_key+0x14f): undefined

Claude AI suggested the following, after which the package built and ran successfully

diff --git a/PKGBUILD b/PKGBUILD
index 7e85f3e..ea5bcb3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@

 _pkgname_prefix=globalprotect-openconnect
 pkgname="${_pkgname_prefix}-git"
-pkgver=2.5.1.r1.g24f9bbb
-pkgrel=2
+pkgver=2.5.1.r4.g9777258
+pkgrel=1
 pkgdesc="A GUI client for GlobalProtect VPN, based on OpenConnect, supports the SSO authentication method."
 arch=(x86_64 aarch64)
 url="https://github.com/yuezk/GlobalProtect-openconnect"
@@ -42,6 +42,7 @@ build() {
   unset CFLAGS

   cd "${_pkgname_prefix}"
+  sed -i 's/.with("gnutls-tss2", Some("no"))/.with("gnutls-tss2", Some("no"))\n    .without("libtspi", None)/' crates/openconnect/build.rs
   cargo build --frozen --release
 }

tixwho commented on 2025-12-19 23:57 (UTC)

@yuezk Will do. Thanks for the prompt response!

yuezk commented on 2025-12-19 14:37 (UTC)

Hi @tixwho, I recommend that you install the package from the official repository. This AUR package is outdated, and I don't have an Arch Linux machine at hand. My machine is an Apple M1, which seems to make it difficult to install an Arch Linux VM on. Therefore, I cannot update it promptly.

tixwho commented on 2025-12-19 13:46 (UTC)

Most recent update cannot be installed.

error: failed to run custom build command for `openconnect v2.5.0 (/{$Redacted_XDG_CACHE}/.cache/paru/clone/globalprotect-openconnect-git/src/globalprotect-openconnect/crates/openconnect)`

Caused by:
  process didn't exit successfully: `/{$Redacted_XDG_CACHE}/.cache/paru/clone/globalprotect-openconnect-git/src/globalprotect-openconnect/target/release/build/openconnect-0851b71e6a780add/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=/{$Redacted_XDG_CACHE}/.cache/paru/clone/globalprotect-openconnect-git/src/globalprotect-openconnect/crates/openconnect/../../deps/openconnect
  cargo:rerun-if-changed=/{$Redacted_XDG_CACHE}/.cache/paru/clone/globalprotect-openconnect-git/src/globalprotect-openconnect/crates/openconnect/../../deps/patches/openconnect-gp-version.patch
  can't find file to patch at input line 5
  Perhaps you used the wrong -p or --strip option?
  The text leading up to this was:
  --------------------------
  |diff --git a/gpst.c b/gpst.c
  |index 244aaf04..205bec1d 100644
  |--- a/gpst.c
  |+++ b/gpst.c
  --------------------------
  File to patch: 
  Skip this patch? [y] 
  Skipping patch.
  1 out of 1 hunk ignored
  can't find file to patch at input line 22
  Perhaps you used the wrong -p or --strip option?
  The text leading up to this was:
  --------------------------
  |diff --git a/library.c b/library.c
  |index b5e74e9b..fff28f77 100644
  |--- a/library.c
  |+++ b/library.c
  --------------------------
  File to patch: 
  Skip this patch? [y] 
  Skipping patch.
  2 out of 2 hunks ignored
  can't find file to patch at input line 50
  Perhaps you used the wrong -p or --strip option?
  The text leading up to this was:
  --------------------------
  |diff --git a/openconnect-internal.h b/openconnect-internal.h
  |index abf45bbd..85933f4a 100644
  |--- a/openconnect-internal.h
  |+++ b/openconnect-internal.h
  --------------------------
  File to patch: 
  Skip this patch? [y] 
  Skipping patch.
  1 out of 1 hunk ignored
  can't find file to patch at input line 62
  Perhaps you used the wrong -p or --strip option?
  The text leading up to this was:
  --------------------------
  |diff --git a/openconnect.h b/openconnect.h
  |index 136f181a..67fc1283 100644
  |--- a/openconnect.h
  |+++ b/openconnect.h
  --------------------------
  File to patch: 
  Skip this patch? [y] 
  Skipping patch.
  1 out of 1 hunk ignored

  --- stderr

  thread 'main' panicked at crates/openconnect/build.rs:43:5:
  Failed to apply patch file: /{$Redacted_XDG_CACHE}/.cache/paru/clone/globalprotect-openconnect-git/src/globalprotect-openconnect/crates/openconnect/../../deps/patches/openconnect-gp-version.patch
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'globalprotect-openconnect-git-2.4.3.r3.gfe3d3df-1': 
error: packages failed to build: globalprotect-openconnect-git-2.4.3.r3.gfe3d3df-1

Azertyfun commented on 2025-10-28 08:47 (UTC)

Installing rustup like this conflicts with the system-wide installation and should not be done I don't think.

warn: It looks like you have an existing installation of Rust at:
warn: /usr/bin
warn: It is recommended that rustup be the primary Rust installation.
warn: Otherwise you may have confusion unless you are careful with your PATH.
warn: If you are sure that you want both rustup and your already installed Rust
warn: then please reply `y' or `yes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes
warn: or pass `-y' to ignore all ignorable checks.
error: cannot install while Rust is installed
warn: continuing (because the -y flag is set and the error is ignorable)

I believe the following would be a correct way to package this, although I have never packaged a rust thing on the AUR.

diff --git a/PKGBUILD b/PKGBUILD
index bdddfdf..1017318 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,7 @@
 # Maintainer: Kevin Yue <k3vinyue@gmail.com>

 _pkgname_prefix=globalprotect-openconnect
+_rust_toolchain=1.90
 pkgname="${_pkgname_prefix}-git"
 pkgver=2.4.3.r3.gfe3d3df
 pkgrel=1
@@ -9,7 +10,7 @@ arch=(x86_64 aarch64)
 url="https://github.com/yuezk/GlobalProtect-openconnect"
 license=('GPL3')

-makedepends=(git pkg-config 'openconnect>=8.20' webkit2gtk-4.1 curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg libsecret)
+makedepends=(git pkg-config 'openconnect>=8.20' webkit2gtk-4.1 curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg libsecret cargo rustup)
 depends=('openconnect>=8.20' openssl webkit2gtk-4.1 libappindicator-gtk3 libsecret libxml2)
 optdepends=('wmctrl: for window management')

@@ -31,37 +32,17 @@ pkgver() {
 }

 prepare() {
-  # Install the rust toolchain
-  export RUSTUP_HOME="${srcdir}/.rustup"
-  export CARGO_HOME="${srcdir}/.cargo"
-  export PATH="${CARGO_HOME}/bin:${PATH}"
-
-  curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
-    -y \
-    -q \
-    --profile minimal \
-    --default-toolchain 1.80 \
-    --no-modify-path
-
-  cargo --version
-
   cd "${_pkgname_prefix}"
-  cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
+  rustup run --install $_rust_toolchain cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
 }

 build() {
-  export RUSTUP_HOME="${srcdir}/.rustup"
-  export CARGO_HOME="${srcdir}/.cargo"
-  export PATH="${CARGO_HOME}/bin:${PATH}"
-
-  cargo --version
-
   # Must unset the CFLAGS, otherwise the build fails on linking openssl, don't know why
   unset CFLAGS

   cd "${_pkgname_prefix}"
-  cargo build --frozen --release -p gpclient -p gpservice -p gpauth
-  cargo build --frozen --release -p gpgui-helper --features "tauri/custom-protocol"
+  rustup run $_rust_toolchain cargo build --frozen --release -p gpclient -p gpservice -p gpauth
+  rustup run $_rust_toolchain cargo build --frozen --release -p gpgui-helper --features "tauri/custom-protocol"
 }

 package() {

I don't know if it is a reasonable assumption that the main branch will always be compatible with rust stable; if it is, the following diff can be made trivial by not depending on rustup at all:

diff --git a/PKGBUILD b/PKGBUILD
index bdddfdf..838814f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@ arch=(x86_64 aarch64)
 url="https://github.com/yuezk/GlobalProtect-openconnect"
 license=('GPL3')

-makedepends=(git pkg-config 'openconnect>=8.20' webkit2gtk-4.1 curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg libsecret)
+makedepends=(git pkg-config 'openconnect>=8.20' webkit2gtk-4.1 curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg libsecret cargo)
 depends=('openconnect>=8.20' openssl webkit2gtk-4.1 libappindicator-gtk3 libsecret libxml2)
 optdepends=('wmctrl: for window management')

@@ -31,31 +31,11 @@ pkgver() {
 }

 prepare() {
-  # Install the rust toolchain
-  export RUSTUP_HOME="${srcdir}/.rustup"
-  export CARGO_HOME="${srcdir}/.cargo"
-  export PATH="${CARGO_HOME}/bin:${PATH}"
-
-  curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
-    -y \
-    -q \
-    --profile minimal \
-    --default-toolchain 1.80 \
-    --no-modify-path
-
-  cargo --version
-
   cd "${_pkgname_prefix}"
   cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
 }

 build() {
-  export RUSTUP_HOME="${srcdir}/.rustup"
-  export CARGO_HOME="${srcdir}/.cargo"
-  export PATH="${CARGO_HOME}/bin:${PATH}"
-
-  cargo --version
-
   # Must unset the CFLAGS, otherwise the build fails on linking openssl, don't know why
   unset CFLAGS

yuezk commented on 2024-12-27 15:00 (UTC)

@MarsSeed I’ve updated it to use the main branch.

That said, I understand that using a git tag may not align with the -git suffix, as tags are immutable once released. However, why must it be restricted to the main branch? What if the main branch serves as the release branch in my workflow?

In the end, isn’t this just a matter of branch naming? Functionally, there shouldn't be any difference when using the branch.

MarsSeed commented on 2024-12-27 14:41 (UTC)

@yuezk, this package is only valid for what its pkgname represents if you build it from the 'main' branch, but not when you use a stable release branch or a git tag as source.

Muflone commented on 2024-12-08 13:01 (UTC)

@MarsSeed thanks for pointing this, I missed the package from extra repository

the issue is now solved, as it sources from the git repo

Muflone commented on 2024-12-08 12:59 (UTC)

ok, now it seems fine (I've not tested it), therefore I'm canceling the pending deletion request

thanks yuezk for your prompt collaboration