Package Details: ocserv 1.3.0-1

Git Clone URL: https://aur.archlinux.org/ocserv.git (read-only, click to copy)
Package Base: ocserv
Description: OpenConnect VPN Server
Upstream URL: https://gitlab.com/openconnect/ocserv
Licenses: GPL-2.0-or-later
Submitter: bidulock
Maintainer: bidulock
Last Packager: bidulock
Votes: 14
Popularity: 0.000000
First Submitted: 2013-07-06 00:46 (UTC)
Last Updated: 2025-01-09 17:14 (UTC)

Latest Comments

1 2 3 Next › Last »

KawaiDesu commented on 2026-05-20 14:05 (UTC) (edited on 2026-05-20 15:06 (UTC) by KawaiDesu)

Fresh patch which:
- Uses enchancements from previous comment
- Bumps to 1.4.2
- Migrates to meson because upstream did
- Patches code so it woks with nettle v4 library in archlinux

Works on my machine (c)

diff --git a/PKGBUILD b/PKGBUILD
index 4b3c995..e170b6b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
 # Maintainer: Brian Bidulock <bidulock@openss7.org>
 pkgname=ocserv
-pkgver=1.3.0
+pkgver=1.4.2
 pkgrel=1
 pkgdesc="OpenConnect VPN Server"
 arch=('i686' 'x86_64')
@@ -8,25 +8,32 @@ url="https://gitlab.com/openconnect/ocserv"
 license=(GPL-2.0-or-later)
 depends=('autogen' 'http-parser' 'libnl' 'libsystemd' 'protobuf-c' 'talloc' 'libseccomp' 'freeradius-client' 'libev' 'oath-toolkit' 'geoip')
 makedepends=('freeradius' 'gperf' 'ipcalc')
-backup=('etc/ocserv.config' 'etc/ocserv-passwd')
-source=("https://gitlab.com/openconnect/ocserv/-/archive/$pkgver/$pkgname-$pkgver.tar.gz")
-sha256sums=('69795a7a0a4376a80f03bb4fd1fd3a99095ba9cafd54323d582e8ab5006015d3')
+backup=('etc/ocserv/ocserv.conf'
+        'etc/ocserv/ocpasswd')
+source=("https://gitlab.com/openconnect/ocserv/-/archive/$pkgver/$pkgname-$pkgver.tar.gz"
+        "nettle4.patch")
+sha256sums=('d9de84f5ae09a8b2270227ace5a09a51d85b1e09983e75934f1d91c74c079636'
+            '264d544949b5966b92f1f143397253187ef5523467afdb42aae420418de94979')

 prepare() {
   cd ${pkgname}-${pkgver}
-  autoreconf -fi
+  patch -p1 < ../nettle4.patch
 }

 build() {
   cd ${pkgname}-${pkgver}
-  ./configure --prefix=/usr --sbindir=/usr/bin --libexecdir=/usr/lib
-  make
+  meson setup --prefix=/usr --sbindir=/usr/bin --libexecdir=/usr/lib build
+  ninja -C build
 }

+#test(){
+#  meson test -C build
+#}
+
 package() {
   cd ${pkgname}-${pkgver}
-  make DESTDIR="$pkgdir" install
-  install -Dm0644 doc/sample.config "$pkgdir/etc/ocserv.config"
-  install -Dm0600 doc/sample.passwd "$pkgdir/etc/ocserv-passwd"
+  meson install -C build --no-rebuild --destdir="$pkgdir"
+  install -Dm0644 doc/sample.config "$pkgdir/etc/ocserv/ocserv.conf"
+  install -Dm0600 doc/sample.passwd "$pkgdir/etc/ocserv/ocpasswd"
   install -Dm0644 doc/systemd/standalone/ocserv.service "$pkgdir/usr/lib/systemd/system/ocserv.service"
 }
diff --git a/nettle4.patch b/nettle4.patch
new file mode 100644
index 0000000..00ff01a
--- /dev/null
+++ b/nettle4.patch
@@ -0,0 +1,22 @@
+--- a/src/common/common.c      2026-04-17 00:27:59.000000000 +0300
++++ b/src/common/common.c      2026-05-20 15:38:16.490112537 +0300
+@@ -59,7 +59,7 @@
+       sha1_init(&ctx);
+
+       sha1_update(&ctx, data_size, data);
+-      sha1_digest(&ctx, 20, output);
++      sha1_digest(&ctx, output);
+ }
+
+
+--- a/src/common/hmac.c        2026-04-17 00:27:59.000000000 +0300
++++ b/src/common/hmac.c        2026-05-20 15:39:30.171791183 +0300
+@@ -51,7 +51,7 @@
+               }
+       }
+
+-      hmac_sha256_digest(&ctx, HMAC_DIGEST_SIZE, digest);
++      hmac_sha256_digest(&ctx, digest);
+
+       safe_memset(&ctx, 0, sizeof(ctx));
+ }

starx commented on 2024-12-12 11:01 (UTC) (edited on 2024-12-12 11:23 (UTC) by starx)

https://github.com/SuzukiHonoka/ocserv/commit/8bf7925269f9a9717665847042d1592ac38511a0.patch fix deps and bump ocserv to 1.3.0

From 8bf7925269f9a9717665847042d1592ac38511a0 Mon Sep 17 00:00:00 2001
From: Suzukihonoka <sakurafirex@gmail.com>
Date: Thu, 12 Dec 2024 18:58:25 +0800
Subject: [PATCH] fix deps and bump ocserv to 1.3.0

---
 PKGBUILD | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index 65af319..c06a29a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,16 +1,16 @@
 # Maintainer: Brian Bidulock <bidulock@openss7.org>
 pkgname=ocserv
-pkgver=1.2.4
+pkgver=1.3.0
 pkgrel=1
 pkgdesc="OpenConnect VPN Server"
 arch=('i686' 'x86_64')
 url="https://gitlab.com/openconnect/ocserv"
 license=(GPL-2.0-or-later)
-depends=('autogen' 'http-parser' 'libnl' 'libsystemd' 'protobuf-c' 'talloc' 'libseccomp' 'freeradius-client' 'libev' 'oath-toolkit' 'geoip')
+depends=('autogen' 'http-parser' 'libnl' 'libsystemd' 'protobuf-c' 'talloc' 'libseccomp' 'freeradius' 'libev' 'oath-toolkit' 'geoip' 'ipcalc')
 makedepends=('freeradius' 'gperf')
-backup=('etc/ocserv.config' 'etc/ocserv-passwd')
+backup=('etc/ocserv/ocserv.conf' 'etc/ocserv/ocpasswd')
 source=("https://gitlab.com/openconnect/ocserv/-/archive/$pkgver/$pkgname-$pkgver.tar.gz")
-sha256sums=('4a159f1750925c52c2a8afbc898fb7df3bb486afe7a440fb9e57b557758473a5')
+sha256sums=('69795a7a0a4376a80f03bb4fd1fd3a99095ba9cafd54323d582e8ab5006015d3')

 prepare() {
   cd ${pkgname}-${pkgver}
@@ -26,7 +26,7 @@ build() {
 package() {
   cd ${pkgname}-${pkgver}
   make DESTDIR="$pkgdir" install
-  install -Dm0644 doc/sample.config "$pkgdir/etc/ocserv.config"
-  install -Dm0600 doc/sample.passwd "$pkgdir/etc/ocserv-passwd"
+  install -Dm0644 doc/sample.config "$pkgdir/etc/ocserv/ocserv.conf"
+  install -Dm0600 doc/sample.passwd "$pkgdir/etc/ocserv/ocpasswd"
   install -Dm0644 doc/systemd/standalone/ocserv.service "$pkgdir/usr/lib/systemd/system/ocserv.service"
 }

MarsSeed commented on 2023-10-20 19:38 (UTC)

Please remove depends=libpcl; that library is unmaintained, and was last released in 2010. The AUR package is also defunct.

There's a better solution: ocserv's source tree contains the project's own maintenance fork of pcl, which at this point should be the preferred version to use. If an external pcl is not provided at build-time, the included pcl library will be built and used.

Vanilla commented on 2019-01-12 13:47 (UTC) (edited on 2019-01-12 13:47 (UTC) by Vanilla)

Installing ocserv.{config, passwd} into /etc/ocserv would be better? The default conf path in the systemd service is /etc/ocserv/ocserv.conf . And the

biax commented on 2018-12-16 19:55 (UTC) (edited on 2018-12-16 19:56 (UTC) by biax)

@bidulock

after updating from 0.11.x to 0.12.0 as well as pacman -Syu after several months..

i get a lot of these:

ocserv[2329]: GnuTLS error (at worker-vpn.c:795): Error in the pull function. ocserv[2346]: worker[user]: x.x.x.x worker-vpn.c:1446: GnuTLS error (at worker-vpn.c:1446): Error in the pull function ocserv[2476]: GnuTLS error (at worker-vpn.c:795): Error decoding the received TLS packet.

i think the client is an iphone. android seem to have no issues.

what seems to be the issue?

bidulock commented on 2018-07-15 03:22 (UTC)

@zynaps, you need to build and install the packages on which ocserv depends. Both libpcl and freeradius-client are available on the AUR and must be built and installed before you attempt to build ocserv. makepkg -s will not install packages from the AUR on which ocserv depends.

zynaps commented on 2018-07-14 11:05 (UTC)

build fail on fresh installed system:

igor@border ocserv (master) % makepkg --cleanbuild --syncdeps --install --needed --clean ==> Making package: ocserv 0.12.0-1 (Sat 14 Jul 2018 11:00:38 AM UTC) ==> Checking runtime dependencies... ==> Installing missing dependencies... error: target not found: libpcl error: target not found: freeradius-client ==> ERROR: 'pacman' failed to install missing dependencies. igor@border ocserv (master) %

bidulock commented on 2017-01-11 20:16 (UTC)

Ah, sorry, 0.11.6-2 should work ok.

moparisthebest commented on 2017-01-11 19:18 (UTC) (edited on 2017-01-11 19:18 (UTC) by moparisthebest)

That doesn't appear to be the issue, even though you have pkgver=0.11.6 you still have source=("$pkgname-$pkgver.tar.gz::https://gitlab.com/ocserv/ocserv/repository/archive.tar.gz?ref=ocserv_0_11_4") and should be source=("$pkgname-$pkgver.tar.gz::https://gitlab.com/ocserv/ocserv/repository/archive.tar.gz?ref=ocserv_0_11_6") It built fine when I changed that and the checksum