1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-31 10:46:16 +00:00

New port: net/frr7 (7.0)

PR:		236508
Reported by:	pautina@kharkiv.net
This commit is contained in:
Olivier Cochard 2019-04-15 21:34:22 +00:00
parent d60a48a4be
commit a82511a28c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=499060
14 changed files with 522 additions and 4 deletions

View File

@ -171,6 +171,7 @@
SUBDIR += frr4
SUBDIR += frr5
SUBDIR += frr6
SUBDIR += frr7
SUBDIR += fspclient
SUBDIR += fspd
SUBDIR += fsplib

View File

@ -16,7 +16,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= gawk:lang/gawk
LIB_DEPENDS= libjson-c.so:devel/json-c
CONFLICTS= openbgpd openospfd zebra quagga frr4 frr5 frr6
CONFLICTS= openbgpd openospfd zebra quagga frr4 frr5 frr6 frr7
USE_GITHUB= yes
GH_ACCOUNT= FRRouting

View File

@ -16,7 +16,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= gawk:lang/gawk
LIB_DEPENDS= libjson-c.so:devel/json-c
CONFLICTS= openbgpd openospfd zebra quagga frr3 frr5 frr6
CONFLICTS= openbgpd openospfd zebra quagga frr3 frr5 frr6 frr7
USES= autoreconf bison compiler:c++11-lang gmake pkgconfig libtool \
makeinfo python:2.7,build readline

View File

@ -16,7 +16,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= gawk:lang/gawk
LIB_DEPENDS= libjson-c.so:devel/json-c
CONFLICTS= openbgpd openospfd zebra quagga frr3 frr4 frr6
CONFLICTS= openbgpd openospfd zebra quagga frr3 frr4 frr6 frr7
USES= autoreconf bison compiler:c++11-lang gmake pkgconfig libtool \
makeinfo python:2.7,build readline

View File

@ -19,7 +19,7 @@ LIB_DEPENDS= libjson-c.so:devel/json-c
USES= autoreconf bison compiler:c++11-lang gmake pkgconfig libtool \
makeinfo python:2.7,build readline
CONFLICTS= openbgpd openospfd zebra quagga frr3 frr4 frr5
CONFLICTS= openbgpd openospfd zebra quagga frr3 frr4 frr5 frr7
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip

97
net/frr7/Makefile Normal file
View File

@ -0,0 +1,97 @@
# $FreeBSD$
PORTNAME= frr
PORTVERSION= 7.0
DISTVERSIONPREFIX= frr-
CATEGORIES= net ipv6
PKGNAMESUFFIX= 7
MAINTAINER= olivier@FreeBSD.org
COMMENT= IP routing protocol suite including BGP, IS-IS, OSPF and RIP
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= gawk:lang/gawk
LIB_DEPENDS= libjson-c.so:devel/json-c \
libyang.so:net/libyang
USES= autoreconf bison compiler:c++11-lang gmake pkgconfig libtool \
makeinfo python:3.6+,build readline
BINARY_ALIAS= python=${PYTHON_VERSION}
CONFLICTS= openbgpd openospfd zebra quagga frr3 frr4 frr5 frr6
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= FRRouting
INFO= frr
OPTIONS_DEFINE= CONFIGROLLBACKS FPM DATACENTER LDPD PAM SHELLACCESS \
TCPSOCKETS VTYSH MANPAGES MULTIPATH TCMALLOC RPKI SNMP
OPTIONS_DEFAULT= VTYSH RPKI FPM MANPAGES
OPTIONS_SUB= yes
CONFIGROLLBACKS_DESC= Enable configuration rollback support
FPM_DESC= Enable Forwarding Plane Manager support
DATACENTER_DESC= Use reduced BGP timers
LDPD_DESC= Build ldpd
MULTIPATH_DESC= Enable multipath function
PAM_DESC= Use libpam for PAM support in vtysh
RPKI_DESC= Add BGP RPKI (RFC 6810) support
SHELLACCESS_DESC= Allow users to access shell/telnet/ssh
SNMP_DESC= SNMP support
TCMALLOC_DESC= Use tcmalloc
TCPSOCKETS_DESC= Use TCP/IP sockets for protocol daemons
VTYSH_DESC= Build integrated vty shell
USERS= frr
GROUPS= frr frrvty
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
# PIM compile but didn't work on FreeBSD
CONFIGURE_ARGS= --enable-user=frr \
--enable-group=frr \
--enable-vty-group=frrvty \
--disable-doc-html \
--sysconfdir=${ETCDIR} \
--localstatedir=/var/run/frr \
--disable-nhrpd \
--disable-pimd
MANPAGES_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=0:textproc/py-sphinx@${PY_FLAVOR}
MANPAGES_CONFIGURE_OFF= --disable-doc
CONFIGROLLBACKS_LIB_DEPENDS= libsqlite3.so:databases/sqlite3
CONFIGROLLBACKS_CONFIGURE_ENABLE= config-rollbacks
DATACENTER_CONFIGURE_ENABLE= datacenter
SHELLACCESS_CONFIGURE_ENABLE= shell-access
FPM_CONFIGURE_ENABLE= fpm
PAM_CONFIGURE_WITH= libpam
LDPD_CONFIGURE_ENABLE= ldpd
MULTIPATH_CONFIGURE_ON= --enable-multipath=64
RPKI_CONFIGURE_ENABLE= rpki
RPKI_LIB_DEPENDS= librtr.so:net-mgmt/rtrlib \
libssh.so:security/libssh
TCMALLOC_CONFIGURE_ENABLE= tcmalloc
TCMALLOC_LIB_DEPENDS= libtcmalloc.so:devel/google-perftools
SNMP_CONFIGURE_ENABLE= snmp
SNMP_CFLAGS= "-std=gnu99"
SNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
TCPSOCKETS_CONFIGURE_ENABLE= tcp-zebra
VTYSH_CONFIGURE_ENABLE= vtysh
USE_RC_SUBR= frr watchfrr
SHEBANG_FILES= yang/embedmodel.py
post-install:
${MKDIR} ${STAGEDIR}/var/run/frr
.include <bsd.port.mk>

3
net/frr7/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1552596106
SHA256 (FRRouting-frr-frr-7.0_GH0.tar.gz) = 15b62dc0c52531e4bcefa6b830e9b9b07d1d0f189c2110307dbc19d80b719354
SIZE (FRRouting-frr-frr-7.0_GH0.tar.gz) = 5234123

164
net/frr7/files/frr.in Normal file
View File

@ -0,0 +1,164 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: frr
# REQUIRE: netif routing
# KEYWORD: nojailvnet shutdown
# Add the following line to /etc/rc.conf to enable frr:
# frr_enable="YES"
#
# You may also wish to use the following variables to fine-tune startup:
# frr_flags=""
# frr_daemons="zebra babeld bfdd bgpd eigrpd fabricd isisd ospfd ospf6d ripd ripngd staticd"
# frr_vtysh_boot="YES"
# Per daemon tuning may be done with daemon_name_flags
# zebra_flags="-P 0"
# bgpd_flags="-nrP 0" and so on
# If you want to give the routing deamons a chance to catchup before
# continueing, set frr_wait_for to a "default" or certain prefix.
# frr_wait_for="default"
# Set the time limit for the wait.
# frr_wait_seconds="90"
#
# If the frr daemons require additional shared libraries to start,
# use the following variable to run ldconfig(8) in advance:
# frr_extralibs_path="/usr/local/lib ..."
#
# This RC script was adapted from the net/quagga port
. /etc/rc.subr
name=frr
rcvar=$name_enable
start_postcmd=start_postcmd
stop_postcmd="rm -f $pidfile"
configtest_cmd=check_config
extra_commands=configtest
command_args="-d"
load_rc_config $name
: ${frr_enable:="NO"}
: ${frr_flags:=""}
: ${frr_daemons:="zebra babeld bfdd bgpd eigrpd fabricd isisd ospfd ospf6d ripd ripngd staticd"}
: ${frr_vtysh_boot:="NO"}
: ${frr_wait_for:=""}
: ${frr_wait_seconds:="90"}
check_config()
{
echo "Checking $daemon.conf"
# pimd doesn't support -C
if [ "$daemon" = "pimd" ]; then
echo "Ignored"
else
$command $daemon_flags -C
result=$?
if [ "$result" -eq "0" ]; then
echo "OK"
else
echo "FAILED"
exit
fi
fi
}
start_postcmd()
{
local waited_for
waited_for=0
# Wait only when last daemon has started.
if [ "${frr_daemons}" = "${frr_daemons% ${name}}" ]; then
return;
fi
if [ -n "${frr_wait_for}" ]; then
echo Waiting for ${frr_wait_for} route...
while [ ${waited_for} -lt ${frr_wait_seconds} ]; do
/sbin/route -n get ${frr_wait_for} >/dev/null 2>&1 && break;
waited_for=$((waited_for+1))
sleep 1;
done
[ ${waited_for} -lt ${frr_wait_seconds} ] || echo Giving up...
fi
}
do_cmd()
{
local ret
ret=0
frr_cmd=$1
if checkyesno frr_vtysh_boot && ( [ ${frr_cmd} = "restart" ] || [ ${frr_cmd} = "start" ] ); then
echo "Checking intergrated config..."
daemon="vtysh"
daemon_flags=""
command=%%PREFIX%%/bin/${daemon}
check_config
fi
for daemon in ${frr_daemons}; do
command=%%PREFIX%%/sbin/${daemon}
pidfile=/var/run/frr/${daemon}.pid
if ! checkyesno frr_vtysh_boot; then
required_files=%%ETCDIR%%/${daemon}.conf
if [ ${frr_cmd} = "restart" ] || [ ${frr_cmd} = "start" ]; then
check_config
fi
if [ ${frr_cmd} = "start" ] && ! [ -f ${required_files} ]; then
continue
fi
fi
if [ ${frr_cmd} = "stop" ] && [ -z $(check_process ${command}) ]; then
continue
fi
eval flags=\$\{${daemon}_flags:-\"${frr_flags}\"\}
name=${daemon}
_rc_restart_done=false
run_rc_command "$1" || ret=1
done
if checkyesno frr_vtysh_boot && ( [ ${frr_cmd} = "restart" ] || [ ${frr_cmd} = "start" ] ); then
echo "Booting for integrated-vtysh-config..."
%%PREFIX%%/bin/vtysh -b
fi
return ${ret}
}
frr_cmd=$1
case "$1" in
force*)
frr_cmd=${frr_cmd#force}
;;
fast*)
frr_cmd=${frr_cmd#fast}
;;
esac
shift
if [ $# -ge 1 ]; then
frr_daemons="$*"
fi
case "${frr_cmd}" in
start|quietstart)
if [ -n "${frr_extralibs_path}" ]; then
/sbin/ldconfig -m ${frr_extralibs_path}
fi
# Why should I need to add this check ?
checkyesno frr_enable && do_cmd "start"
;;
stop)
frr_daemons=$(reverse_list ${frr_daemons})
do_cmd "stop"
;;
restart)
frr_daemons=$(reverse_list ${frr_daemons})
do_cmd "stop"
frr_daemons=$(reverse_list ${frr_daemons})
checkyesno frr_enable && do_cmd "start"
;;
*)
do_cmd "${frr_cmd}"
;;
esac

View File

@ -0,0 +1,11 @@
--- Makefile.am.orig 2019-03-14 23:20:16 UTC
+++ Makefile.am
@@ -123,7 +123,7 @@ include zebra/subdir.am
include watchfrr/subdir.am
include qpb/subdir.am
include fpm/subdir.am
-include tools/subdir.am
+#include tools/subdir.am
include solaris/subdir.am
include bgpd/subdir.am

View File

@ -0,0 +1,11 @@
--- configure.ac.orig 2019-02-28 23:32:04 UTC
+++ configure.ac
@@ -391,7 +391,7 @@ AC_ARG_WITH([pkg-git-version],
[ test "x$withval" != "xno" && with_pkg_git_version="yes" ])
AC_ARG_WITH([vtysh_pager],
AS_HELP_STRING([--with-vtysh-pager=PAGER], [control what pager is compiled in as default]),
- VTYSH_PAGER=$withval, VTYSH_PAGER="more")
+ VTYSH_PAGER=$withval, VTYSH_PAGER="cat")
AC_ARG_ENABLE([vtysh],
AS_HELP_STRING([--disable-vtysh], [do not build integrated vty shell for FRR]))
AC_ARG_ENABLE([doc],

View File

@ -0,0 +1,33 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: watchfrr
# REQUIRE: NETWORKING frr
# KEYWORD: nojailvtnet shutdown
# Add the following line to /etc/rc.conf to enable watchfrr:
# watchfrr_enable="YES"
#
# You may also wish to use the following variables to fine-tune startup:
# watchfrr_flags
# Example of flags usage:
# watchfrr_flags=" -d -r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB -t 30 zebra ripd ripngd ospfd ospf6d bgpd isisd eigrpd babeld bfdd staticd"
. /etc/rc.subr
name=watchfrr
rcvar=${name}_enable
load_rc_config $name
stop_postcmd="rm -f $pidfile"
watchfrr_enable=${watchfrr_enable:-"NO"}
watchfrr_flags=${watchfrr_flags:-"-d -r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB -t 30 zebra babeld bfdd bgpd eigrpd fabricd isisd ospfd ospf6d ripd ripngd staticd"}
command=%%PREFIX%%/sbin/watchfrr
pidfile=/var/run/frr/watchfrr.pid
run_rc_command "$1"

5
net/frr7/pkg-descr Normal file
View File

@ -0,0 +1,5 @@
FRRouting (FRR) is an IP routing protocol suite for Linux and Unix platforms
which includes protocol daemons for BGP, IS-IS, OSPF and RIP. FRR has its roots
in the Quagga project.
WWW: https://frrouting.org/

7
net/frr7/pkg-message Normal file
View File

@ -0,0 +1,7 @@
FRR's OSPF daemons tries to allocate big socket buffer, so generate warning
messages like:
"setsockopt_so_sendbuf: fd 6: SO_SNDBUF set to 1048576 (requested 8388608)"
To prevent such message kern.ipc.maxsockbuf can be increased:
sysctl kern.ipc.maxsockbuf=16777216
Error message "ifam_read() doesn't read all socket data" is under investigation

186
net/frr7/pkg-plist Normal file
View File

@ -0,0 +1,186 @@
%%VTYSH%%bin/vtysh
include/frr/agg_table.h
include/frr/yang.h
include/frr/yang_translator.h
include/frr/yang_wrappers.h
include/frr/bfd.h
include/frr/bitfield.h
include/frr/buffer.h
include/frr/checksum.h
include/frr/command.h
include/frr/command_graph.h
include/frr/command_match.h
include/frr/compiler.h
include/frr/csv.h
include/frr/db.h
include/frr/debug.h
include/frr/distribute.h
include/frr/eigrpd/eigrp_dump.h
include/frr/eigrpd/eigrp_topology.h
include/frr/eigrpd/eigrpd.h
include/frr/event_counter.h
include/frr/ferr.h
include/frr/fifo.h
include/frr/filter.h
include/frr/freebsd-queue.h
include/frr/frr_pthread.h
include/frr/frratomic.h
include/frr/frrstr.h
include/frr/getopt.h
include/frr/graph.h
include/frr/hash.h
include/frr/hook.h
include/frr/id_alloc.h
include/frr/if.h
include/frr/if_rmap.h
include/frr/imsg.h
include/frr/ipaddr.h
include/frr/jhash.h
include/frr/json.h
include/frr/keychain.h
include/frr/lib_errors.h
include/frr/libfrr.h
include/frr/libospf.h
include/frr/linklist.h
include/frr/log.h
include/frr/logicalrouter.h
include/frr/lua.h
include/frr/md5.h
include/frr/memory.h
include/frr/memory_vty.h
include/frr/module.h
include/frr/monotime.h
include/frr/mpls.h
include/frr/network.h
include/frr/nexthop.h
include/frr/nexthop_group.h
include/frr/northbound.h
include/frr/northbound_cli.h
include/frr/northbound_db.h
include/frr/ns.h
include/frr/openbsd-queue.h
include/frr/openbsd-tree.h
include/frr/ospfapi/ospf_apiclient.h
include/frr/ospfd/ospf_api.h
include/frr/ospfd/ospf_asbr.h
include/frr/ospfd/ospf_dump.h
include/frr/ospfd/ospf_dump_api.h
include/frr/ospfd/ospf_ism.h
include/frr/ospfd/ospf_lsa.h
include/frr/ospfd/ospf_lsdb.h
include/frr/ospfd/ospf_nsm.h
include/frr/ospfd/ospf_opaque.h
include/frr/ospfd/ospfd.h
include/frr/pbr.h
include/frr/plist.h
include/frr/pqueue.h
include/frr/prefix.h
include/frr/privs.h
include/frr/ptm_lib.h
include/frr/pw.h
include/frr/queue.h
include/frr/qobj.h
include/frr/ringbuf.h
include/frr/route_types.h
include/frr/routemap.h
include/frr/sbuf.h
include/frr/sha256.h
include/frr/sigevent.h
include/frr/smux.h
include/frr/spf_backoff.h
include/frr/skiplist.h
include/frr/sockopt.h
include/frr/sockunion.h
include/frr/srcdest_table.h
include/frr/stream.h
include/frr/systemd.h
include/frr/table.h
include/frr/termtable.h
include/frr/thread.h
include/frr/vector.h
include/frr/version.h
include/frr/vlan.h
include/frr/vrf_int.h
include/frr/vrf.h
include/frr/vty.h
include/frr/vxlan.h
include/frr/wheel.h
include/frr/workqueue.h
include/frr/zassert.h
include/frr/zclient.h
include/frr/zebra.h
lib/libfrr.a
lib/libfrr.so
lib/libfrr.so.0
lib/libfrr.so.0.0.0
lib/libfrrospfapiclient.a
lib/libfrrospfapiclient.so
lib/libfrrospfapiclient.so.0
lib/libfrrospfapiclient.so.0.0.0
%%SNMP%%lib/frr/modules/bgpd_snmp.so
%%SNMP%%lib/frr/modules/ospf6d_snmp.so
%%SNMP%%lib/frr/modules/ospfd_snmp.so
%%SNMP%%lib/frr/modules/ripd_snmp.so
%%SNMP%%lib/frr/modules/zebra_snmp.so
%%FPM%%lib/frr/modules/zebra_fpm.so
%%SNMP%%lib/libfrrsnmp.a
%%SNMP%%lib/libfrrsnmp.so
%%SNMP%%lib/libfrrsnmp.so.0
%%SNMP%%lib/libfrrsnmp.so.0.0.0
%%RPKI%%lib/frr/modules/bgpd_rpki.so
%%MANPAGES%%man/man1/frr.1.gz
%%MANPAGES%%man/man8/bfdd.8.gz
%%MANPAGES%%man/man8/eigrpd.8.gz
%%MANPAGES%%man/man8/isisd.8.gz
%%MANPAGES%%man/man8/staticd.8.gz
%%MANPAGES%%man/man8/watchfrr.8.gz
%%MANPAGES%%%%VTYSH%%man/man1/vtysh.1.gz
%%MANPAGES%%man/man8/bgpd.8.gz
%%MANPAGES%%%%LDPD%%man/man8/ldpd.8.gz
%%MANPAGES%%man/man8/ospf6d.8.gz
%%MANPAGES%%man/man8/ospfclient.8.gz
%%MANPAGES%%man/man8/ospfd.8.gz
%%MANPAGES%%man/man8/pbrd.8.gz
%%MANPAGES%%man/man8/ripd.8.gz
%%MANPAGES%%man/man8/ripngd.8.gz
%%MANPAGES%%man/man8/zebra.8.gz
sbin/babeld
sbin/bfdd
sbin/bgpd
%%LDPD%%sbin/ldpd
sbin/eigrpd
sbin/fabricd
sbin/ospf6d
sbin/ospfd
sbin/pbrd
sbin/ripd
sbin/ripngd
sbin/staticd
sbin/zebra
sbin/isisd
sbin/watchfrr
share/yang/frr-interface.yang
share/yang/frr-isisd.yang
share/yang/frr-module-translator.yang
share/yang/frr-ripd.yang
share/yang/frr-ripngd.yang
share/yang/frr-route-types.yang
share/yang/frr-test-module.yang
%%ETCDIR%%/babeld.conf.sample
%%ETCDIR%%/bfdd.conf.sample
%%ETCDIR%%/bgpd.conf.sample
%%ETCDIR%%/bgpd.conf.sample2
%%ETCDIR%%/bgpd.conf.vnc.sample
%%ETCDIR%%/eigrpd.conf.sample
%%ETCDIR%%/fabricd.conf.sample
%%ETCDIR%%/isisd.conf.sample
%%LDPD%%%%ETCDIR%%/ldpd.conf.sample
%%ETCDIR%%/ospf6d.conf.sample
%%ETCDIR%%/ospfd.conf.sample
%%ETCDIR%%/pbrd.conf.sample
%%ETCDIR%%/ripd.conf.sample
%%ETCDIR%%/ripngd.conf.sample
%%ETCDIR%%/staticd.conf.sample
%%VTYSH%%%%ETCDIR%%/vtysh.conf.sample
%%ETCDIR%%/zebra.conf.sample
@dir(frr,frr,750) /var/run/frr