From 2dc4426514a9f2dd47bfaf3b30624cc095459352 Mon Sep 17 00:00:00 2001 From: Sergey Alirzaev Date: Sun, 1 Mar 2026 16:39:03 +0100 Subject: [PATCH] net-p2p/yggdrasil-go: bump up to 0.5.13 Signed-off-by: Sergey Alirzaev --- net-p2p/yggdrasil-go/Manifest | 1 + .../yggdrasil-go/yggdrasil-go-0.5.13.ebuild | 79 +++++++++++++++++++ net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild | 6 +- 3 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 net-p2p/yggdrasil-go/yggdrasil-go-0.5.13.ebuild diff --git a/net-p2p/yggdrasil-go/Manifest b/net-p2p/yggdrasil-go/Manifest index bff4b1c380..2089e4159b 100644 --- a/net-p2p/yggdrasil-go/Manifest +++ b/net-p2p/yggdrasil-go/Manifest @@ -1 +1,2 @@ DIST yggdrasil-0.5.12-vendored.tar.gz 2848276 BLAKE2B cc85fffc9bed3da62f23ccedb3e8f821a53deec3d1017bd9e3a1c2a1e1bee7970919b76534807d6d1a31b2e1db5648ae1b47ed9287f0eac4341dda61dfcd6cce SHA512 01ba5af5b950e2e0c377839775a7b4fc127b3f9509214283a2b751069d0198f0686e43a565d2eed2378d24c1468747b9a80317b61da3b26cf4cedc09fc28b87b +DIST yggdrasil-0.5.13-vendored.tar.gz 2904569 BLAKE2B 193344b4df1f1d2445b6a906cd2c89fb8ad1f621306b67cd588683b876c6f7436628ba6ad1618ad646ec677124a9f9d21e06185d29c01e71f481dd67faa90bc9 SHA512 6e8ea953c82c6ab96a60663e373b71952ff36a72cd94495f5b5f00c1a8f6de129f42a6540146113d038866e2af2909164c928aa3c22c845a0aed900b282dde02 diff --git a/net-p2p/yggdrasil-go/yggdrasil-go-0.5.13.ebuild b/net-p2p/yggdrasil-go/yggdrasil-go-0.5.13.ebuild new file mode 100644 index 0000000000..3daa9760db --- /dev/null +++ b/net-p2p/yggdrasil-go/yggdrasil-go-0.5.13.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit fcaps go-module linux-info systemd + +DESCRIPTION="An experiment in scalable routing as an encrypted IPv6 overlay network" +HOMEPAGE="https://yggdrasil-network.github.io/" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/yggdrasil-network/yggdrasil-go" + inherit git-r3 +else + SRC_URI=" + https://github.com/yggdrasil-network/yggdrasil-go/releases/download/v${PV}/yggdrasil-${PV}-vendored.tar.gz + " + S="${WORKDIR}" + KEYWORDS="~amd64 ~arm64" +fi + +LICENSE="LGPL-3 MIT Apache-2.0 BSD ZLIB" +SLOT="0" + +RESTRICT="mirror" + +BDEPEND=">=dev-lang/go-1.24" +RDEPEND=" + acct-user/yggdrasil + acct-group/yggdrasil +" + +DOCS=( "README.md" "CHANGELOG.md" ) + +FILECAPS=( + cap_net_admin,cap_net_bind_service "usr/bin/yggdrasil" +) + +CONFIG_CHECK="~TUN" +ERROR_TUN="Your kernel lacks TUN support." + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + go-module_live_vendor + fi + go-module_src_unpack +} + +src_compile() { + GOFLAGS+=" -mod=vendor -trimpath" + + local src="github.com/yggdrasil-network/yggdrasil-go/src/version" + local name version + if [[ ${PV} == 9999 ]]; then + chmod +x ./contrib/semver/{name,version}.sh || die + name="$(./contrib/semver/name.sh || die)" + version="$(./contrib/semver/version.sh || die)" + else + name="yggdrasil" + version="v${PV}" + fi + local custom_name_version_flags="-X ${src}.buildName=${name} -X ${src}.buildVersion=${version}" + + local go_ldflags="-s -linkmode external -extldflags \"${LDFLAGS}\" ${custom_name_version_flags}" + + for cmd in yggdrasil{,ctl} genkeys; do + ego build ${GOFLAGS} -ldflags="${go_ldflags}" ./cmd/${cmd} + done +} + +src_install() { + dobin yggdrasil{,ctl} genkeys + einstalldocs + + systemd_dounit "contrib/systemd/yggdrasil.service" + systemd_dounit "contrib/systemd/yggdrasil-default-config.service" + doinitd "contrib/openrc/yggdrasil" +} diff --git a/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild b/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild index 09454a92f4..3daa9760db 100644 --- a/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild +++ b/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -24,8 +24,8 @@ SLOT="0" RESTRICT="mirror" -BDEPEND=">=dev-lang/go-1.23" -DEPEND=" +BDEPEND=">=dev-lang/go-1.24" +RDEPEND=" acct-user/yggdrasil acct-group/yggdrasil "