From 8ac6e208b01b1f21ec557a1ee82e81ea70dab54d Mon Sep 17 00:00:00 2001 From: Alarig Le Lay Date: Sat, 28 Dec 2024 01:33:44 +0100 Subject: [PATCH] net-misc/stayrtr: new package, add 0.6.1 Signed-off-by: Alarig Le Lay --- metadata/md5-cache/acct-group/stayrtr-0 | 8 +++++ metadata/md5-cache/acct-user/stayrtr-0 | 9 ++++++ metadata/md5-cache/net-misc/stayrtr-0.6.1 | 15 +++++++++ net-misc/stayrtr/Manifest | 2 ++ net-misc/stayrtr/files/stayrtr-conf.d | 2 ++ net-misc/stayrtr/files/stayrtr-init.d | 13 ++++++++ net-misc/stayrtr/files/stayrtr.service | 12 +++++++ net-misc/stayrtr/stayrtr-0.6.1.ebuild | 38 +++++++++++++++++++++++ 8 files changed, 99 insertions(+) create mode 100644 metadata/md5-cache/acct-group/stayrtr-0 create mode 100644 metadata/md5-cache/acct-user/stayrtr-0 create mode 100644 metadata/md5-cache/net-misc/stayrtr-0.6.1 create mode 100644 net-misc/stayrtr/Manifest create mode 100644 net-misc/stayrtr/files/stayrtr-conf.d create mode 100644 net-misc/stayrtr/files/stayrtr-init.d create mode 100644 net-misc/stayrtr/files/stayrtr.service create mode 100644 net-misc/stayrtr/stayrtr-0.6.1.ebuild diff --git a/metadata/md5-cache/acct-group/stayrtr-0 b/metadata/md5-cache/acct-group/stayrtr-0 new file mode 100644 index 0000000..fe4be9e --- /dev/null +++ b/metadata/md5-cache/acct-group/stayrtr-0 @@ -0,0 +1,8 @@ +DEFINED_PHASES=install preinst pretend +DESCRIPTION=System group: stayrtr +EAPI=8 +INHERIT=acct-group +KEYWORDS=~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris +SLOT=0 +_eclasses_=user-info 9951b1a0e4f026d16c33a001fd2d5cdf acct-group c2bb1fc7bada6e119b3ce202ca42476f +_md5_=08e5588d022d727901f27c7706d761c9 diff --git a/metadata/md5-cache/acct-user/stayrtr-0 b/metadata/md5-cache/acct-user/stayrtr-0 new file mode 100644 index 0000000..63dcc8d --- /dev/null +++ b/metadata/md5-cache/acct-user/stayrtr-0 @@ -0,0 +1,9 @@ +DEFINED_PHASES=install postinst preinst prerm pretend +DESCRIPTION=User for net-misc/stayrtr +EAPI=8 +INHERIT=acct-user +KEYWORDS=~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris +RDEPEND=acct-group/stayrtr +SLOT=0 +_eclasses_=user-info 9951b1a0e4f026d16c33a001fd2d5cdf acct-user a4bf64e6c32b95705287346a2b678ae1 +_md5_=96c35a0240ccdf91e196b2ce3a133467 diff --git a/metadata/md5-cache/net-misc/stayrtr-0.6.1 b/metadata/md5-cache/net-misc/stayrtr-0.6.1 new file mode 100644 index 0000000..d3de3ef --- /dev/null +++ b/metadata/md5-cache/net-misc/stayrtr-0.6.1 @@ -0,0 +1,15 @@ +BDEPEND=>=dev-lang/go-1.20:= app-arch/unzip virtual/pkgconfig +DEFINED_PHASES=compile install unpack +DEPEND=acct-user/stayrtr net-misc/rpki-client +DESCRIPTION=RPKI-To-Router server implementation in Go +EAPI=8 +HOMEPAGE=https://github.com/bgp/stayrtr +INHERIT=go-module systemd +KEYWORDS=~amd64 +LICENSE=BSD +RDEPEND=acct-user/stayrtr net-misc/rpki-client +RESTRICT=strip +SLOT=0 +SRC_URI=https://github.com/bgp/stayrtr/archive/v0.6.1.tar.gz -> stayrtr-0.6.1.gh.tar.gz https://herbizarre.swordarmor.fr/garbage/stayrtr-0.6.1-deps.tar.xz +_eclasses_=multiprocessing 1e32df7deee68372153dca65f4a7c21f toolchain-funcs fa554cc3cff825d21dfe3f24841e29cf multilib b2a329026f2e404e9e371097dda47f96 flag-o-matic f14aba975c94ccaa9f357a27e3b17ffe go-env 90efbc8636d2f02d9654183330e84cf7 go-module df32d29550d40a92da723d3b8e17b467 systemd 54bd206bb5c4efac6ae28b6b006713b0 +_md5_=460a1be26adfdcf6b02d12f52e2f7561 diff --git a/net-misc/stayrtr/Manifest b/net-misc/stayrtr/Manifest new file mode 100644 index 0000000..b37753d --- /dev/null +++ b/net-misc/stayrtr/Manifest @@ -0,0 +1,2 @@ +DIST stayrtr-0.6.1-deps.tar.xz 9663352 BLAKE2B bdc871a30dca0f939e7394af091a909b49a2e5169a3c296715f3fd191f8907b1c9801a956bbb5470cbbc6632990e7ec5e05aea70cfede2ec616fcda2c1e3c651 SHA512 c5879b4e8cb394d5ae125bfcbba83ef5b0e46b1b15a14fbaf1c2f3c13306a4c8c8d763f81e161684cafd6f97eaef0cc80ce86c5730f36890020bdea7049a3f9b +DIST stayrtr-0.6.1.gh.tar.gz 1200023 BLAKE2B 0a09d9391d4700727c52b78cedf086d51789733bd12b2288a459215bbf69bebe9c942bc6febb4faaeb93389529a3a3052589159fe18a11de6b9a9be8f638db81 SHA512 4307cebef25a062eb68e0a3382f9a57381fd949a58bda6dea6b1cff4711c7ac75c9a655858f92e0880ea55551818dbbf7ab6cc32d89c94fa0d069cd49257e856 diff --git a/net-misc/stayrtr/files/stayrtr-conf.d b/net-misc/stayrtr/files/stayrtr-conf.d new file mode 100644 index 0000000..057bf5d --- /dev/null +++ b/net-misc/stayrtr/files/stayrtr-conf.d @@ -0,0 +1,2 @@ +# Please refer to the README.md of the options +STAYRTR_OPTS="-bind :323 -cache /var/db/rpki-client/json" diff --git a/net-misc/stayrtr/files/stayrtr-init.d b/net-misc/stayrtr/files/stayrtr-init.d new file mode 100644 index 0000000..3634885 --- /dev/null +++ b/net-misc/stayrtr/files/stayrtr-init.d @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +name="stayrtr daemon" +description="RPKI-To-Router server implementation in Go" +command=/usr/bin/stayrtr +command_args="${STAYRTR_OPTS}" + +depend() { + use net + use logger +} diff --git a/net-misc/stayrtr/files/stayrtr.service b/net-misc/stayrtr/files/stayrtr.service new file mode 100644 index 0000000..641aa25 --- /dev/null +++ b/net-misc/stayrtr/files/stayrtr.service @@ -0,0 +1,12 @@ +[Unit] +Description=RPKI-To-Router server implementation in Go +After=network.target + +[Service] +User=stayrtr +Group=mautrix +Restart=always +ExecStart=/usr/bin/stayrtr -bind :323 -cache /var/db/rpki-client/json + +[Install] +WantedBy=multi-user.target diff --git a/net-misc/stayrtr/stayrtr-0.6.1.ebuild b/net-misc/stayrtr/stayrtr-0.6.1.ebuild new file mode 100644 index 0000000..06b0f8e --- /dev/null +++ b/net-misc/stayrtr/stayrtr-0.6.1.ebuild @@ -0,0 +1,38 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module systemd + +DESCRIPTION="RPKI-To-Router server implementation in Go" +HOMEPAGE="https://github.com/bgp/stayrtr" +SRC_URI="https://github.com/bgp/stayrtr/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz + https://herbizarre.swordarmor.fr/garbage/${P}-deps.tar.xz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + acct-user/${PN} + net-misc/rpki-client +" +DEPEND="${RDEPEND}" + +src_compile() { + ego build -trimpath -ldflags "-X main.version=${PV}" ${GOFLAGS} ./cmd/stayrtr/stayrtr.go + ego build -trimpath -ldflags "-X main.version=${PV}" ${GOFLAGS} ./cmd/rtrdump/rtrdump.go + ego build -trimpath -ldflags "-X main.version=${PV}" ${GOFLAGS} ./cmd/rtrmon/rtrmon.go +} + +src_install() { + dobin stayrtr + dobin rtrdump + dobin rtrmon + + newinitd "${FILESDIR}/${PN}-init.d" ${PN} + newconfd "${FILESDIR}/${PN}-conf.d" ${PN} + systemd_dounit "${FILESDIR}/${PN}.service" +}