Package Details: amneziawg-dkms 1.0.20260210-1

Git Clone URL: https://aur.archlinux.org/amneziawg-dkms.git (read-only, click to copy)
Package Base: amneziawg-dkms
Description: AmneziaWG is a contemporary version of the popular VPN protocol, WireGuard.
Upstream URL: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module
Licenses: GPLv2
Provides: AMNEZIAWG-MODULE
Submitter: VVL
Maintainer: VVL
Last Packager: VVL
Votes: 11
Popularity: 1.05
First Submitted: 2024-09-30 22:15 (UTC)
Last Updated: 2026-02-15 10:42 (UTC)

Dependencies (2)

Required by (0)

Sources (1)

Latest Comments

1 2 Next › Last »

ftk commented on 2026-02-15 15:12 (UTC) (edited on 2026-02-15 15:16 (UTC) by ftk)

Patch for 6.19: https://github.com/babiulep/my-kernel-patches/blob/main/AMNEZIAWG/blake2s.patch

Source: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/117 https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/138

Also my earlier prepare-sources.sh fix is no longer needed.

FreePenguin commented on 2026-02-13 21:08 (UTC)

No longer builds on 6.19

cookie.c:36:23: error: variable has incomplete type 'struct blake2s_state'
   36 |         struct blake2s_state blake;
      |                              ^
cookie.c:36:9: note: forward declaration of 'struct blake2s_state'
   36 |         struct blake2s_state blake;
      |                ^
cookie.c:80:16: error: incompatible pointer to integer conversion passing 'const void *' to parameter of type 'size_t' (aka 'unsigned long') [-Wint-conversion]
   80 |         blake2s(mac1, message, key, COOKIE_LEN, len, NOISE_SYMMETRIC_KEY_LEN);
      |                       ^~~~~~~
/usr/lib/modules/6.19.0-2-cachyos/build/include/crypto/blake2s.h:145:50: note: passing argument to parameter 'keylen' here
  145 | static inline void blake2s(const u8 *key, size_t keylen,
      |                                                  ^
cookie.c:80:42: error: incompatible integer to pointer conversion passing 'size_t' (aka 'unsigned long') to parameter of type 'u8 *' (aka 'unsigned char *') [-Wint-conversion]
   80 |         blake2s(mac1, message, key, COOKIE_LEN, len, NOISE_SYMMETRIC_KEY_LEN);
      |                                                 ^~~
/usr/lib/modules/6.19.0-2-cachyos/build/include/crypto/blake2s.h:147:11: note: passing argument to parameter 'out' here
  147 |                            u8 *out, size_t outlen)
      |                                ^
cookie.c:88:16: error: incompatible pointer to integer conversion passing 'const void *' to parameter of type 'size_t' (aka 'unsigned long') [-Wint-conversion]
   88 |         blake2s(mac2, message, cookie, COOKIE_LEN, len, COOKIE_LEN);
      |                       ^~~~~~~
/usr/lib/modules/6.19.0-2-cachyos/build/include/crypto/blake2s.h:145:50: note: passing argument to parameter 'keylen' here
  145 | static inline void blake2s(const u8 *key, size_t keylen,
      |                                                  ^
cookie.c:88:45: error: incompatible integer to pointer conversion passing 'size_t' (aka 'unsigned long') to parameter of type 'u8 *' (aka 'unsigned char *') [-Wint-conversion]
   88 |         blake2s(mac2, message, cookie, COOKIE_LEN, len, COOKIE_LEN);
      |                                                    ^~~
/usr/lib/modules/6.19.0-2-cachyos/build/include/crypto/blake2s.h:147:11: note: passing argument to parameter 'out' here
  147 |                            u8 *out, size_t outlen)
      |                                ^
cookie.c:94:23: error: variable has incomplete type 'struct blake2s_state'
   94 |         struct blake2s_state state;
      |                              ^
cookie.c:94:9: note: forward declaration of 'struct blake2s_state'
   94 |         struct blake2s_state state;
      |                ^
6 errors generated.
make[3]: *** [/usr/lib/modules/6.19.0-2-cachyos/build/scripts/Makefile.build:289: cookie.o] Ошибка 1
make[3]: *** Ожидание завершения заданий…
noise.c:39:23: error: variable has incomplete type 'struct blake2s_state'
   39 |         struct blake2s_state blake;
      |                              ^
noise.c:39:9: note: forward declaration of 'struct blake2s_state'
   39 |         struct blake2s_state blake;
      |                ^
noise.c:41:39: error: incompatible pointer to integer conversion passing 'const u8[37]' (aka 'const unsigned char[37]') to parameter of type 'size_t' (aka 'unsigned long') [-Wint-conversion]
   41 |         blake2s(handshake_init_chaining_key, handshake_name, NULL,
      |                                              ^~~~~~~~~~~~~~
/usr/lib/modules/6.19.0-2-cachyos/build/include/crypto/blake2s.h:145:50: note: passing argument to parameter 'keylen' here
  145 | static inline void blake2s(const u8 *key, size_t keylen,
      |                                                  ^
noise.c:42:19: error: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'u8 *' (aka 'unsigned char *') [-Wint-conversion]
   42 |                 NOISE_HASH_LEN, sizeof(handshake_name), 0);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
/usr/lib/modules/6.19.0-2-cachyos/build/include/crypto/blake2s.h:147:11: note: passing argument to parameter 'out' here
  147 |                            u8 *out, size_t outlen)
      |                                ^
noise.c:310:23: error: variable has incomplete type 'struct blake2s_state'
  310 |         struct blake2s_state state;
      |                              ^
noise.c:310:9: note: forward declaration of 'struct blake2s_state'
  310 |         struct blake2s_state state;
      |                ^
noise.c:437:23: error: variable has incomplete type 'struct blake2s_state'
  437 |         struct blake2s_state blake;

Strelok commented on 2025-10-08 11:56 (UTC)

Hi, thanks for maintaining. After last update, package can't build.


Building module(s)
# command: make -j12 KERNELRELEASE=6.17.1-arch1-1 -C /usr/lib/modules/6.17.1-arch1-1/build M=/var/lib/dkms/amneziawg/1.0.0/build
make: вход в каталог «/usr/lib/modules/6.17.1-arch1-1/build»
make[1]: вход в каталог «/var/lib/dkms/amneziawg/1.0.0/build»
  CC [M]  main.o
  CC [M]  noise.o
  CC [M]  device.o
  CC [M]  peer.o
  CC [M]  timers.o
  CC [M]  queueing.o
  CC [M]  send.o
  CC [M]  receive.o
  CC [M]  socket.o
  CC [M]  peerlookup.o
  CC [M]  allowedips.o
  CC [M]  ratelimiter.o
timers.c: В функции «wg_expired_retransmit_handshake»:
timers.c:43:32: ошибка: неявная декларация функции «from_timer»; имелось в виду «mod_timer»? [-Wimplicit-function-declaration]
   43 |         struct wg_peer *peer = from_timer(peer, timer,
      |                                ^~~~~~~~~~
      |                                mod_timer
socket.c: В функции «send4»:
socket.c:85:9: ошибка: too few arguments to function «udp_tunnel_xmit_skb»; expected 13, have 12
   85 |         udp_tunnel_xmit_skb(rt, sock, skb, fl.saddr, fl.daddr, ds,
      |         ^~~~~~~~~~~~~~~~~~~
In file included from socket.c:17:
/usr/lib/modules/6.17.1-arch1-1/build/include/net/udp_tunnel.h:134:6: замечание: объявлено здесь
  134 | void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb,
      |      ^~~~~~~~~~~~~~~~~~~
socket.c: В функции «send6»:
socket.c:152:9: ошибка: too few arguments to function «udp_tunnel6_xmit_skb»; expected 13, have 12
  152 |         udp_tunnel6_xmit_skb(dst, sock, skb, skb->dev, &fl.saddr, &fl.daddr, ds,
      |         ^~~~~~~~~~~~~~~~~~~~

petRUShka commented on 2025-04-17 18:08 (UTC)

Hi there, thanks for maintaining AmneziaWG!

I noticed the PKGBUILD runs wget inside prepare‑sources.sh, pulling an entire kernel tarball during build()/package().

That breaks the Arch packaging rule that “build() and package() must be able to run with no network access; everything must come from source=().” (see Creating packages → “Offline build” section).

Suggested fix (either of the two works):
1. Vendor the needed WireGuard subtree.
* Add the handful of kernel files to the source=() array and patch the Makefile to use them under /usr/src/${pkgname}-${pkgver}/kernel.
* Removes the network call, keeps the DKMS logic intact.
2. Patch AmneziaWG to build against installed linux-headers only (like upstream WireGuard).
* Then you can drop prepare‑sources.sh entirely; no external tarball is needed.

Happy to test a revised PKGBUILD or submit patches if that helps—just let me know.

dronskii commented on 2025-02-05 16:40 (UTC)

diff --git a/PKGBUILD b/PKGBUILD
index 1918a12..aa92c2d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -21,6 +21,18 @@ kernel_major="${1%%[^0-9]*}"
 wget "https://cdn.kernel.org/pub/linux/kernel/v${kernel_major}.x/linux-${kernel}.tar.xz" -O- | tar -xvJf - --wildcards linux-${kernel}/drivers/net/wireguard "linux-${kernel}/K*" linux-${kernel}/include/uapi/linux/
 ln -sf linux-${kernel} kernel;
 EOF
+cat > "${srcdir}/amneziawg-linux-kernel-module-${pkgver}/kernel-tree-scripts/cleanup-sources.sh" <<'EOF'
+#!/bin/bash
+
+AWG_TEMP_DIR="$(cat /var/lib/amnezia/amneziawg/.tempdir 2>/dev/null)"
+PREFIX=${AWG_TEMP_DIR:-/tmp}
+WORKDIR="${PREFIX}/amneziawg"
+
+[ -e kernel ] && rm -rf kernel
+if [[ -d "${WORKDIR}" ]]; then
+        rm -rf "${WORKDIR}";
+fi
+EOF
 cd ${srcdir}/amneziawg-linux-kernel-module-${pkgver}/src
 sed -i 's/MODERN_KERNEL_SOURCES_NOT_FOUND_ERROR/KERNEL_SRC_ABSENT_ERR/g' Makefile
 make DESTDIR=${pkgdir} dkms-install

this fixes "dkms exited with error code 1" for me. Constructs like test && something set return code to 1 when condition is false.

vanyasem commented on 2025-01-15 14:51 (UTC)

thank you <3

VVL commented on 2025-01-14 21:17 (UTC)

@vanyasem

fixed

vanyasem commented on 2025-01-12 01:04 (UTC)

diff --git a/PKGBUILD b/PKGBUILD
index 70ac755..95aa468 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -21,6 +21,7 @@ kernel_major="${1%%[^0-9]*}"
 wget "https://cdn.kernel.org/pub/linux/kernel/v${kernel_major}.x/linux-${kernel}.tar.xz" -O- | tar -xvJf - --wildcards linux-${kernel}/drivers/net/wireguard "linux-${kernel}/K*" linux-${kernel}/include/uapi/linux/
 ln -sf linux-${kernel} kernel;
 EOF
+sed -i 's/MODERN_KERNEL_SOURCES_NOT_FOUND_ERROR/KERNEL_SRC_ABSENT_ERR/g' "${srcdir}/amneziawg-linux-kernel-module-${pkgver}/src/Makefile"
 cd ${srcdir}/amneziawg-linux-kernel-module-${pkgver}/src
 make DESTDIR=${pkgdir} dkms-install
 }

This patch resolves a segmentation failed on make: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/40 The issue is caused by long variable name length. A simple solution is to rename the one variable that's causing the segfault to something shorter. The bug has been fixed since, but is not released to stable make yet: https://savannah.gnu.org/bugs/index.php?65172

VVL commented on 2024-10-18 19:34 (UTC)

Thank you, I've added this fix to PKGBUILD.

ftk commented on 2024-10-13 14:25 (UTC) (edited on 2024-10-13 20:41 (UTC) by ftk)

diff --git a/PKGBUILD b/PKGBUILD
index 32c3d90..050f210 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,6 +13,14 @@ sha512sums=('0499fc3c29ceaa3e57611fd86c943e57b9621aa2db31f8fdafcfe0ff0dfaf5aa073

 package() {
     depends=("dkms")
+    cat > "${srcdir}/amneziawg-linux-kernel-module-${pkgver}/kernel-tree-scripts/prepare-sources.sh" <<'EOF'
+#!/bin/bash -eux
+kernel="${1%%[^0-9.]*}"
+kernel_major="${1%%[^0-9]*}"
+wget "https://cdn.kernel.org/pub/linux/kernel/v${kernel_major}.x/linux-${kernel}.tar.xz" -O- | tar -xvJf - --wildcards linux-${kernel}/drivers/net/wireguard "linux-${kernel}/K*" linux-${kernel}/include/uapi/linux/
+ln -sf linux-${kernel} kernel;
+EOF
+
     cd ${srcdir}/amneziawg-linux-kernel-module-${pkgver}/src
     make DESTDIR=${pkgdir} dkms-install
 }

fixes downloading wireguard sources during install