commit: c13f501d73285d9d9d3937ce60e9f392b81759a9 Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> AuthorDate: Sat Feb 28 16:22:10 2026 +0000 Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> CommitDate: Sat Feb 28 18:33:15 2026 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c13f501d
net-vpn/amneziawg-modules: add 1.0.20260210 Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in> net-vpn/amneziawg-modules/Manifest | 1 + .../amneziawg-modules-1.0.20260210.ebuild | 68 ++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/net-vpn/amneziawg-modules/Manifest b/net-vpn/amneziawg-modules/Manifest index 835048d064..e28807919b 100644 --- a/net-vpn/amneziawg-modules/Manifest +++ b/net-vpn/amneziawg-modules/Manifest @@ -1 +1,2 @@ DIST amneziawg-modules-1.0.20251009.tar.gz 406841 BLAKE2B ed7649619506d16f10e79e8ea13f24f7b22bd65c3cbbf66a19391ebc3b9fe3db744dee09ebf2b538bf1881c6b79084e16b5871d9b76a9673f45395d8291c0366 SHA512 1c807df0e54fa79f50c055229fe75a4289febd272c304528f5cfe57271aecfe2fb5a8c4480c82f527e1b0272bfae73e03b5b06119769e98d37bb4df65844f2ff +DIST amneziawg-modules-1.0.20260210.tar.gz 407303 BLAKE2B 537d7cc3d811e2a3e81b3031c0e4abb22dec3db0f8d3a609f6eea83791306350fbf0a9c82e438fdb76b13f49eb7b8fa9355968653bfedc036150b7cfb40b74e3 SHA512 705fbbb13e5d2f456fb321942ecd404420c5e54c75fbd28b7fd34583c9d6b0ca3b63e3eb18ddbb49f34354ffa0c042745fe2a0c97946a4dab65b52ebc864d5b5 diff --git a/net-vpn/amneziawg-modules/amneziawg-modules-1.0.20260210.ebuild b/net-vpn/amneziawg-modules/amneziawg-modules-1.0.20260210.ebuild new file mode 100644 index 0000000000..16e9b167fd --- /dev/null +++ b/net-vpn/amneziawg-modules/amneziawg-modules-1.0.20260210.ebuild @@ -0,0 +1,68 @@ +# Copyright 2025-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-mod-r1 + +DESCRIPTION="AmneziaWG Linux kernel module" +HOMEPAGE="https://github.com/amnezia-vpn/amneziawg-linux-kernel-module" +SRC_URI="https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +S="${WORKDIR}/amneziawg-linux-kernel-module-${PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="debug" + +CONFIG_CHECK="NET INET NET_UDP_TUNNEL CRYPTO_ALGAPI" + +pkg_setup() { + linux-mod-r1_pkg_setup + if kernel_is -lt 3 10 0; then + die "This version of ${PN} requires Linux >= 3.10." + fi +} + +src_compile() { + local modlist=( amneziawg=net:src::module ) + local modargs=( + KERNELDIR=${KV_OUT_DIR} + ) + use debug && modargs+=( CONFIG_AMNEZIAWG_DEBUG=y ) + linux-mod-r1_src_compile +} + +src_install() { + linux-mod-r1_src_install +} + +pkg_postinst() { + linux-mod-r1_pkg_postinst + local old new + if [[ $(uname -r) != "${KV_FULL}" ]]; then + ewarn + ewarn "You have just built AmneziaWG for kernel ${KV_FULL}, yet the currently running" + ewarn "kernel is $(uname -r). If you intend to use this AmneziaWG module on the currently" + ewarn "running machine, you will first need to reboot it into the kernel ${KV_FULL}, for" + ewarn "which this module was built." + ewarn + elif [[ -f /sys/module/amneziawg/version ]] && \ + old="$(</sys/module/amneziawg/version)" && \ + new="$(modinfo -F version "${ROOT}/lib/modules/${KV_FULL}/net/amneziawg.ko" 2>/dev/null)" && \ + [[ $old != "$new" ]]; then + ewarn + ewarn "You appear to have just upgraded AmneziaWG from version v$old to v$new." + ewarn "However, the old version is still running on your system. In order to use the" + ewarn "new version, you will need to remove the old module and load the new one. As" + ewarn "root, you can accomplish this with the following commands:" + ewarn + ewarn " # rmmod amneziawg" + ewarn " # modprobe amneziawg" + ewarn + ewarn "Do note that doing this will remove current AmneziaWG interfaces, so you may want" + ewarn "to gracefully remove them yourself prior." + ewarn + fi +}
