Package Details: openconnect-git 1:9.12.r225.g8ed0761-1

Git Clone URL: https://aur.archlinux.org/openconnect-git.git (read-only, click to copy)
Package Base: openconnect-git
Description: Open client for Cisco AnyConnect VPN
Upstream URL: https://www.infradead.org/openconnect/
Licenses: LGPL2.1
Conflicts: openconnect
Provides: libopenconnect.so, openconnect
Submitter: bidulock
Maintainer: astehlik
Last Packager: astehlik
Votes: 11
Popularity: 0.53
First Submitted: 2016-04-18 09:23 (UTC)
Last Updated: 2025-08-26 21:29 (UTC)

Required by (22)

Sources (1)

Latest Comments

1 2 Next › Last »

astehlik commented on 2025-08-26 21:30 (UTC)

Thank you for your insights :)

The version pinning is now removed.

SammysHP commented on 2025-08-25 07:28 (UTC)

I added most of them now and mentioned you as author. I hope this is OK.

Thanks!

The following points should be fixed in the upstream repo IMO

Indeed, makes sense.

I'm a bit unsure about the version Pinning. I get the point that it should always build the latest version. But I would also like to provide an easy possibility to install older versions if something breaks in the latest.

VCS packages in the AUR (-git, -svn, …) should always build the latest version. The regular package can be built from an archive or from a VCS repository, where pinning is indeed the right solution.

I'm also a bit unsure how this works with the pkgver. When I always use the latest commit instead of the specific hash the version number in the PKGBUILD file will no longer match the commit that is used. Is that a problem?

makepkg will automatically pull the source and run pkgver() to update the version string. The version shown in the AUR doesn't really matter for VCS packages and it's not uncommon to have packages with a version string many years old, that still build fine with a much more recent version from VCS. I think you can do the same for the regular GitHub repo. It's always possible to checkout a specific version in the sources and run makepkg -e.

astehlik commented on 2025-08-22 10:12 (UTC) (edited on 2025-08-22 10:18 (UTC) by astehlik)

Thank you for your comments and your suggestions.

I added most of them now and mentioned you as author. I hope this is OK.

I also mirror this repo over at GitHub: https://github.com/astehlik/aur-openconnect-git where you can create issues / pull requests.

The repo is based on the original openconnect package maintained by Arch: https://gitlab.archlinux.org/archlinux/packaging/packages/openconnect

The following points should be fixed in the upstream repo IMO:

  • Use proper SPDX license identifier
  • Sort fields according to PKGBUILD template

I'll try to get a GitLab account to create a MR there.

I'm a bit unsure about the version Pinning. I get the point that it should always build the latest version. But I would also like to provide an easy possibility to install older versions if something breaks in the latest.

There is a weekly Workflow set up in the GitHub repo that will automatically create a new version if there are new commits. With this approach you can check out an older commit of the repo and install an a version based on an older commit.

I'm thinking about keeping this approach for the GitHub repo and changing the AUR repo to the latest version. Do you think that makes sense?

Edit: I'm also a bit unsure how this works with the pkgver. When I always use the latest commit instead of the specific hash the version number in the PKGBUILD file will no longer match the commit that is used. Is that a problem?

SammysHP commented on 2025-08-19 06:18 (UTC)

Thank you for maintaining this package. Here are a few suggestions:

  • Use proper SPDX license identifier
  • Remove extended version info from provides
  • Remove version pinning (this is a git package and should always build the latest version)
  • Remove unnecessary pwd
  • Sort fields according to PKGBUILD template

Unfortunately you already introduced an epoch field now, so we can't remove it anymore.

This includes suggestions from @dosychev from below.

diff --git a/PKGBUILD b/PKGBUILD
index a68d60a..5bb1ccb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,30 @@
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Maintainer: astehlik <alex+arch@stehlik-online.de>
+# Contributor: Sven Greiner <sven@sammyshp.de>
+# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
 # Contributor: Ionut Biru <ibiru@archlinux.org>
 # Contributor: Felix Yan <felixonmars@archlinux.org>

 pkgname=openconnect-git
-conflicts=('openconnect')
 pkgver=9.12.r221.g5895606
 pkgrel=1
 epoch=1
 pkgdesc='Open client for Cisco AnyConnect VPN'
-url='https://www.infradead.org/openconnect/'
 arch=('x86_64')
-license=('LGPL2.1')
+url='https://www.infradead.org/openconnect/'
+license=('LGPL-2.1-only')
 depends=('libxml2' 'gnutls' 'libproxy' 'vpnc' 'krb5' 'lz4' 'pcsclite'
-  'stoken' 'tpm2-tss' 'oath-toolkit' 'libproxy' 'libp11-kit'
-  'xdg-utils'
-  libstoken.so libtss2-esys.so libtss2-mu.so libtss2-tctildr.so
-  libxml2.so libproxy.so libhogweed.so libp11-kit.so libpskc.so
-  libgssapi_krb5.so libpcsclite.so)
+         'stoken' 'tpm2-tss' 'oath-toolkit' 'libproxy' 'libp11-kit'
+         'xdg-utils'
+         libstoken.so libtss2-esys.so libtss2-mu.so libtss2-tctildr.so
+         libxml2.so libproxy.so libhogweed.so libp11-kit.so libpskc.so
+         libgssapi_krb5.so libpcsclite.so)
 makedepends=('git' 'intltool' 'python')
 checkdepends=('python-flask')
 optdepends=('python: tncc-wrapper')
-provides=("openconnect=${pkgver}" 'libopenconnect.so')
+provides=("openconnect=${pkgver%.r*}" 'libopenconnect.so')
+conflicts=('openconnect')
 options=('!emptydirs')
-_commithash=589560612d41001d5cdc0585c921a4f4d42249b4
-source=("$pkgname::git+https://gitlab.com/openconnect/openconnect.git#commit=${_commithash}")
+source=("$pkgname::git+https://gitlab.com/openconnect/openconnect.git")
 sha256sums=('SKIP')

 pkgver() {
@@ -32,7 +33,6 @@ pkgver() {
 }

 build() {
-  pwd
   cd "$pkgname"
   ./autogen.sh
   PYTHON=/usr/bin/python \

dosychev commented on 2025-04-05 19:56 (UTC)

This is PKGBUILD based on current official package with minimal editions to make it -git package.

pkgname=openconnect-git
pkgver=9.12.r201.gf17fe20
pkgrel=1
pkgdesc='Open client for Cisco AnyConnect VPN (git version)'
url='https://www.infradead.org/openconnect/'
arch=('x86_64')
license=('LGPL2.1')
depends=('libxml2' 'gnutls' 'libproxy' 'vpnc' 'krb5' 'lz4' 'pcsclite'
         'stoken' 'tpm2-tss' 'oath-toolkit' 'libproxy' 'libp11-kit'
         'xdg-utils'
         libstoken.so libtss2-esys.so libtss2-mu.so libtss2-tctildr.so
         libxml2.so libproxy.so libhogweed.so libp11-kit.so libpskc.so
         libgssapi_krb5.so libpcsclite.so)
makedepends=('intltool' 'python')
checkdepends=('python-flask')
optdepends=('python: tncc-wrapper')
conflicts=('openconnect')
provides=("openconnect=${pkgver%.r*}" 'libopenconnect.so')
options=('!emptydirs')
source=("${pkgname}::git://git.infradead.org/users/dwmw2/${pkgname%-*}.git")
md5sums=('SKIP')

pkgver() {
  cd "${pkgname}"
  git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd ${pkgname}
  ./autogen.sh
  PYTHON=/usr/bin/python \
    ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --libexecdir=/usr/lib \
    --disable-static
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd ${pkgname}
  make check
}

package() {
  cd ${pkgname}
  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:

fredizzimo commented on 2024-11-18 07:52 (UTC)

Why does this package list several sources, including links to personal mirrors?

source=("$pkgname::git+https://gitlab.com/openconnect/$_pkgname.git/")should be enough.

The depends list is also different from the official package https://gitlab.archlinux.org/archlinux/packaging/packages/openconnect/-/blob/main/PKGBUILD?ref_type=heads

It would also be worth aligning the build options with the official package, that one builds against GnuTLS, while the aur versions builds against OpenSSL, with the --without-gnutls option.

There are some other build differences as well

@@ -30,10 +33,8 @@ build() {
       --sbindir=/usr/bin \
       --libexecdir=/usr/lib \
       --disable-static \
-      --without-gnutls \
-      --with-vpnc-script=/etc/vpnc/vpnc-script
   # Fight unused direct deps
-  sed -i -e "s/ -shared / $LDFLAGS\0 /g" libtool
+  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
   make V=0
 }

TTimo commented on 2023-11-26 14:44 (UTC) (edited on 2023-11-26 14:45 (UTC) by TTimo)

(fix submitted upstream in case you want to pick it up early in the AUR https://gitlab.com/openconnect/openconnect/-/merge_requests/505)

may want to add libxml2 in the depends line also?

TTimo commented on 2023-11-25 00:45 (UTC)

I've started getting a compile error:

gpst.c: In function 'gpst_xml_or_error':
gpst.c:242:19: error: implicit declaration of function 'xmlReadMemory'; did you mean 'xmlInitMemory'? [-Werror=implicit-function-declaration]
  242 |         xml_doc = xmlReadMemory(response, strlen(response), NULL, NULL,
      |                   ^~~~~~~~~~~~~
      |                   xmlInitMemory

tleydxdy commented on 2022-01-24 03:37 (UTC)

seems like configure need to add --libexecdir=/usr/lib, since the package now places some files under /usr/libexec which is not a thing on arch.

jvybihal commented on 2021-10-07 07:55 (UTC) (edited on 2021-10-07 07:55 (UTC) by jvybihal)

@bidulock great! One more request, please add provides=($_pkgname 'libopenconnect.so') so it can be used with networkmanager-openconnect :) Thank you.