net-misc/FORT-validator

This commit is contained in:
Alarig Le Lay 2020-02-16 22:38:09 +01:00
parent 922777e17f
commit 61720bbc35
4 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,54 @@
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools user fcaps
DESCRIPTION="FORT validator is an open source RPKI validator."
HOMEPAGE="https://fortproject.net/validator?2"
SRC_URI="https://github.com/NICMx/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
MY_PN="fort"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="caps libressl"
DEPEND="
caps? ( sys-libs/libcap )
dev-libs/jansson
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
net-misc/rsync
"
RDEPEND="${DEPEND}"
BDEPEND="
sys-devel/autoconf
sys-devel/automake
"
src_prepare() {
default
eautoreconf
}
pkg_setup() {
enewgroup fort
enewuser fort -1 /bin/sh /var/lib/${MY_PN}/ fort
}
src_install() {
newinitd "${FILESDIR}/${MY_PN}-initd" ${MY_PN}
newconfd "${FILESDIR}/${MY_PN}-confd" ${MY_PN}
emake DESTDIR="${D}" install
insinto /usr/share/${MY_PN}/tal
doins tal/*
}
pkg_postinst() {
fcaps cap_net_bind_service usr/bin/fort
}

View file

@ -0,0 +1,4 @@
AUX fort-confd 226 BLAKE2B 226cfed1b974860094c3001b9ca8b68478e7377b4cf989ca0e93101a9ffd2993afb0ca6d80b58eeba153104e5c6e423d7bcf605570931a3de3ebb18d2d107252 SHA512 e7edc1c06c6d70f8813060bafe7b288ea310c73af6a13f5db3c0d332d2142c11091e239ec457b25a0710c2469c0e9aec9c333ae2db5fec3d2b419c7b1c5dd6c1
AUX fort-initd 430 BLAKE2B 05347ac6b3a679721d3b85cf82d3de1d6b56c10eff687690d342e576a5b21ece6962a60ccff70164d41414f8f1d3113a66daa165d9258c568d6183ab067ce227 SHA512 8d9bdafd0d5060e0db04b87e323e6eb63288e6cf4cc91e29a42eea759902d36fc48ed4e7453bc4b6d4916c048e5f139406ce18f6da0c515d3d22eb9e0dc78a73
DIST FORT-validator-1.1.3.tar.gz 383459 BLAKE2B 80523058fb7e7b7f8d8a1d3737321f33a1795ed7f659bd8f0f0f107df3abfd36508bff1bf03ee3964ba4ad61faa9df29ea19c81f4533666b5a01e2dabf904172 SHA512 6d34e96c1f1d710914593620e848281d427cfcbefddfe355be8b36fb3b3451bc48113c968ddc25c18ea6df23fb182e7bb4951743de2ab0aa8d84d764040ca617
EBUILD FORT-validator-1.1.3.ebuild 1004 BLAKE2B 1daf660be91c446e1c65a2b41ba57f5142e0916169d4ef69a71011d19185dc146b03f65350d2a9a5bcba96e5facbe69b2b4a16b51b50690bf61794150b72d3d1 SHA512 a089d9d6210af971fb7648ce9e13c7ae27c721a08035e475677070b8d275e3567880918bfea8882967ec0c5d52487dadf03c751792fde1bb85abc214a6d02cc2

View file

@ -0,0 +1,9 @@
# /etc/init.d/fort
# Options to pass to the routinator process
# See routinator man for options
FORT_BASEDIR="/var/lib/fort/"
FORT_OPTS="--tal /usr/share/fort/tal/ \
--local-repository ${FORT_BASEDIR}
--log.output syslog"

View file

@ -0,0 +1,19 @@
#!/sbin/openrc-run
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
name="fort validator daemon"
description="FORT validator is an open source RPKI validator."
command=/usr/bin/fort
command_args="${FORT_OPTS}"
command_user="fort"
pidfile="/run/${RC_SVCNAME}.pid"
command_background=true
depend() {
need net
}
start_pre() {
checkpath -d -m 0750 -o fort:fort ${FORT_BASEDIR}
}