Package Details: globalprotect-openconnect-git 2.4.3.r3.gfe3d3df-1

Git Clone URL: https://aur.archlinux.org/globalprotect-openconnect-git.git (read-only, click to copy)
Package Base: globalprotect-openconnect-git
Description: A GUI 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: 7
Popularity: 0.070650
First Submitted: 2021-10-16 07:43 (UTC)
Last Updated: 2025-01-31 10:44 (UTC)

Required by (0)

Sources (1)

Latest Comments

1 2 3 4 Next › Last »

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

MarsSeed commented on 2024-12-08 12:58 (UTC)

@Muflone, a stable globalprotect-openconnect build already exists in [extra] repo (albeit atm still on upstream's v1.4.9 from last year rather than on the current latest v2.x).

yuezk commented on 2024-12-08 12:52 (UTC)

@Muflone I prefer to use the —git package, so I changed the source to use the code from the main branch.

Muflone commented on 2024-12-08 11:09 (UTC)

@yuezk well done

now the issue is the package name:

this is called globalprotect-openconnect-git to indicate it will install the latest commit from the git repository, not a specific version.

this package instead uses a fixed version (2.3.9).

so please rename this package to globalprotect-openconnect (with no -git) to continue to use the fixed version like this package.

To accomplish this, simply recreate the package as globalprotect-openconnect and later file a merge request from globalprotect-openconnect-git to globalprotect-openconnect

yuezk commented on 2024-12-08 05:21 (UTC) (edited on 2024-12-08 06:22 (UTC) by yuezk)

@Muflone I have updated PKGBUILD to build the package from the source code.

Muflone commented on 2024-12-07 23:35 (UTC)

@yuezk this package name ends with -git to indicate this is a VCS package while it's not. Please switch to build from the git sources, using the main branch, or this package is a duplicate of globalprotect-openconnect