From nobody Mon Oct 25 10:33:53 2021 X-Original-To: dev-commits-ports-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 97350181D49E; Mon, 25 Oct 2021 10:33:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HdBBn3vQHz3r5k; Mon, 25 Oct 2021 10:33:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65C1227147; Mon, 25 Oct 2021 10:33:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19PAXrbI033245; Mon, 25 Oct 2021 10:33:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19PAXrhs033244; Mon, 25 Oct 2021 10:33:53 GMT (envelope-from git) Date: Mon, 25 Oct 2021 10:33:53 GMT Message-Id: <202110251033.19PAXrhs033244@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Philip Paeps Subject: git: 7c6c750a793c - 2021Q4 - net/fort: new port: FORT Validator List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q4 X-Git-Reftype: branch X-Git-Commit: 7c6c750a793c21ac10c5ce3cb33f61bc0f8aaa4e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch 2021Q4 has been updated by philip: URL: https://cgit.FreeBSD.org/ports/commit/?id=7c6c750a793c21ac10c5ce3cb33f61bc0f8aaa4e commit 7c6c750a793c21ac10c5ce3cb33f61bc0f8aaa4e Author: Philip Paeps AuthorDate: 2021-10-22 05:53:47 +0000 Commit: Philip Paeps CommitDate: 2021-10-25 10:32:37 +0000 net/fort: new port: FORT Validator FORT Validator is an open source RPKI validator. This solution allows operators to validate BGP routing information against the RPKI repository for use in router configuration and resolution. Submitted by: Toni Kalombo (maintainer) Tested by: Mark Tinka (cherry picked from commit a679f9da38655155d6293ba194ce140f7531609c) --- net/Makefile | 1 + net/fort/Makefile | 41 +++++++++++++++++++++++++++++++ net/fort/distinfo | 3 +++ net/fort/files/fort.in | 47 ++++++++++++++++++++++++++++++++++++ net/fort/files/patch-src_Makefile.am | 11 +++++++++ net/fort/files/pkg-message.in | 25 +++++++++++++++++++ net/fort/pkg-descr | 7 ++++++ net/fort/pkg-plist | 5 ++++ 8 files changed, 140 insertions(+) diff --git a/net/Makefile b/net/Makefile index d5df5e4db1d6..449ad8cc492e 100644 --- a/net/Makefile +++ b/net/Makefile @@ -155,6 +155,7 @@ SUBDIR += findomain SUBDIR += flower SUBDIR += foreman-proxy + SUBDIR += fort SUBDIR += fpc-ldap SUBDIR += fpc-libenet SUBDIR += fpc-pcap diff --git a/net/fort/Makefile b/net/fort/Makefile new file mode 100644 index 000000000000..dd163a3ca597 --- /dev/null +++ b/net/fort/Makefile @@ -0,0 +1,41 @@ +PORTNAME= fort +DISTVERSION= 1.5.2 +CATEGORIES= net + +MAINTAINER= toni@devboks.com +COMMENT= FORT Validator is an open source RPKI validator + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libcurl.so:ftp/curl libjansson.so:devel/jansson \ + libxml2.so:textproc/libxml2 +RUN_DEPENDS= ${LOCALBASE}/bin/rsync:net/rsync + +USES= autoreconf pkgconfig ssl +USE_GCC= yes +USE_GITHUB= yes +USE_RC_SUBR= fort + +GH_ACCOUNT= NICMx +GH_PROJECT= FORT-validator + +GNU_CONFIGURE= yes + +SUB_FILES= pkg-message + +post-patch: + @${REINPLACE_CMD} -e "s|/tmp/fort|${ETCDIR}|" \ + ${WRKSRC}/examples/config.json + @${REINPLACE_CMD} -e "s|/usr/local/ssl|/etc/ssl|" \ + ${WRKSRC}/examples/config.json + @${REINPLACE_CMD} -e "s|rsync\",|${LOCALBASE}/bin/rsync\",|" \ + ${WRKSRC}/examples/config.json + @${REINPLACE_CMD} -e "/\"daemon\": false,/d" \ + ${WRKSRC}/examples/config.json +post-install: + @${MKDIR} ${STAGEDIR}${ETCDIR}/repository ${STAGEDIR}${ETCDIR}/tal + ${INSTALL_DATA} ${WRKSRC}/examples/config.json \ + ${STAGEDIR}${ETCDIR}/fort-config.json.sample + +.include diff --git a/net/fort/distinfo b/net/fort/distinfo new file mode 100644 index 000000000000..9a35cf2481e2 --- /dev/null +++ b/net/fort/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1634812159 +SHA256 (NICMx-FORT-validator-1.5.2_GH0.tar.gz) = c49b7badcf6dae05b7c9ae9cb3b1514d2b742d868b83f8b8deb0d7ae0a3e6bf2 +SIZE (NICMx-FORT-validator-1.5.2_GH0.tar.gz) = 482094 diff --git a/net/fort/files/fort.in b/net/fort/files/fort.in new file mode 100644 index 000000000000..57350ee26020 --- /dev/null +++ b/net/fort/files/fort.in @@ -0,0 +1,47 @@ +#!/bin/sh + +# PROVIDE: fort +# REQUIRE: DAEMON fort +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Define fort_enable in /etc/rc.conf[.local] to enable it. +# +# fort_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable fort. + +. /etc/rc.subr + +name="fort" +rcvar=fort_enable +start_precmd=check_init +command="%%PREFIX%%/bin/${name}" + +load_rc_config $name +: ${fort_enable="NO"} +: ${wrkdir:="%%ETCDIR%%"} + + +fort_config=${fort_conf:-"%%ETCDIR%%/fort-config.json"} +required_file=${fort_config} +command_args="--configuration-file=${fort_config} --daemon=true" + +check_init() { + if [ ! -d ${wrkdir}/tal ]; then + echo + echo -n "Need to initialize fort with tals, " + echo "see man fort" + echo + exit 1 + fi + if [ ! -f ${fort_config} ]; then + echo + echo -n "Configuration file not found at ${fort_config} " + echo "Please create one before starting Fort, " + echo "see man fort" + echo + exit 1 + fi +} + +run_rc_command "$1" diff --git a/net/fort/files/patch-src_Makefile.am b/net/fort/files/patch-src_Makefile.am new file mode 100644 index 000000000000..7455183d1f5b --- /dev/null +++ b/net/fort/files/patch-src_Makefile.am @@ -0,0 +1,11 @@ +--- src/Makefile.am.orig 2021-09-20 02:51:17 UTC ++++ src/Makefile.am +@@ -130,7 +130,7 @@ fort_SOURCES += $(ASN_MODULE_SRCS) $(ASN_MODULE_HDRS) + fort_CFLAGS = -Wall -Wno-cpp -Wpedantic + # Feel free to temporarily remove this one if you're not using gcc 7.3.0. + #fort_CFLAGS += $(GCC_WARNS) +-fort_CFLAGS += -std=gnu11 -O2 -g $(FORT_FLAGS) ${XML2_CFLAGS} ++fort_CFLAGS += -std=gnu11 -O2 -g $(FORT_FLAGS) ${XML2_CFLAGS} ${JANSSON_CFLAGS} + fort_LDFLAGS = $(LDFLAGS_DEBUG) + fort_LDADD = ${JANSSON_LIBS} ${CURL_LIBS} ${XML2_LIBS} + diff --git a/net/fort/files/pkg-message.in b/net/fort/files/pkg-message.in new file mode 100644 index 000000000000..f9994a632db0 --- /dev/null +++ b/net/fort/files/pkg-message.in @@ -0,0 +1,25 @@ +[ +{ type: install + message: <