diff options
| author | Sebastian Oswald <sko@rostwald.de> | 2026-02-04 12:39:48 +0000 |
|---|---|---|
| committer | Kurt Jaeger <pi@FreeBSD.org> | 2026-02-04 12:44:31 +0000 |
| commit | ad89514c026b5ec89cf15e5fcac39837fd81a507 (patch) | |
| tree | b62a7158400739510537bd980d37f057578c26db | |
| parent | 0ec5b138075ea01bff7e1d29c30301f18a6f2369 (diff) | |
net/openbgpd9: New port
OpenBGPD is a FREE implementation of the Border Gateway Protocol, Version 4.
It allows ordinary machines to be used as routers exchanging routes with
other systems speaking the BGP protocol.
This version will replace openbgp8 some time in the future.
PR: 292055
| -rw-r--r-- | net/Makefile | 1 | ||||
| -rw-r--r-- | net/openbgpd9/Makefile | 40 | ||||
| -rw-r--r-- | net/openbgpd9/distinfo | 3 | ||||
| -rw-r--r-- | net/openbgpd9/files/COPYING | 19 | ||||
| -rw-r--r-- | net/openbgpd9/files/openbgpd.in | 32 | ||||
| -rw-r--r-- | net/openbgpd9/files/openbgplgd.in | 31 | ||||
| -rw-r--r-- | net/openbgpd9/files/patch-Makefile.am | 26 | ||||
| -rw-r--r-- | net/openbgpd9/files/patch-src_bgplgd_bgplgd.8.in | 20 | ||||
| -rw-r--r-- | net/openbgpd9/files/pkg-message.in | 10 | ||||
| -rw-r--r-- | net/openbgpd9/pkg-descr | 3 | ||||
| -rw-r--r-- | net/openbgpd9/pkg-plist | 8 |
11 files changed, 193 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index baf348a4e4e0..a8cb07dc1128 100644 --- a/net/Makefile +++ b/net/Makefile @@ -577,6 +577,7 @@ SUBDIR += open-isns SUBDIR += openbgpd7 SUBDIR += openbgpd8 + SUBDIR += openbgpd9 SUBDIR += openldap25-client SUBDIR += openldap25-server SUBDIR += openldap26-client diff --git a/net/openbgpd9/Makefile b/net/openbgpd9/Makefile new file mode 100644 index 000000000000..1d593c0599f7 --- /dev/null +++ b/net/openbgpd9/Makefile @@ -0,0 +1,40 @@ +PORTNAME= openbgpd +PORTVERSION= 9.0 +CATEGORIES= net +MASTER_SITES= OPENBSD/OpenBGPD +PKGNAMESUFFIX= 9 + +MAINTAINER= pi@FreeBSD.org +COMMENT= Free implementation of the Border Gateway Protocol, Version 4 +WWW= https://www.openbgpd.org/ + +LICENSE= MIT +LICENSE_FILE= ${FILESDIR}/COPYING + +LIB_DEPENDS= libevent.so:devel/libevent + +USES= autoreconf libtool localbase pathfix uidfix +USE_RC_SUBR= ${PORTNAME} openbgplgd + +GNU_CONFIGURE= yes +GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share +CONFIGURE_ARGS= "--with-wwwrunstatedir=/var/run" + +CONFLICTS= quagga zebra + +SUB_FILES= pkg-message + +USERS= _bgpd +GROUPS= _bgpd + +OPTIONS_DEFINE= BGPLGD +OPTIONS_DEFAULT= BGPLGD +OPTIONS_SUB= BGPLGD + +BGPLGD_DESC= Build with Looking Glass Daemon +BGPLGD_CONFIGURE_WITH= bgplgd + +BGPLGD_GROUPS= _bgplgd +BGPLGD_USERS= _bgplgd + +.include <bsd.port.mk> diff --git a/net/openbgpd9/distinfo b/net/openbgpd9/distinfo new file mode 100644 index 000000000000..d2f3b5be09d9 --- /dev/null +++ b/net/openbgpd9/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1767128476 +SHA256 (openbgpd-9.0.tar.gz) = e097c4f351a26f1de5339212d9e10d4cf5abc4b8105e4f1c488ef065a903f615 +SIZE (openbgpd-9.0.tar.gz) = 879179 diff --git a/net/openbgpd9/files/COPYING b/net/openbgpd9/files/COPYING new file mode 100644 index 000000000000..0e9cfc51f9c0 --- /dev/null +++ b/net/openbgpd9/files/COPYING @@ -0,0 +1,19 @@ +Copyright (c) 2003-2007 Henning Brauer <henning@openbsd.org> +Copyright (c) 2002 Daniel Hartmeier <dhartmei@openbsd.org> +Copyright (c) 2003, 2004, 2006 Claudio Jeker <claudio@openbsd.org> +Copyright (c) 2003, 2004 Markus Friedl <markus@openbsd.org> +Copyright (c) 2004 Damien Miller <djm@openbsd.org> +Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org> +Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org> + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/net/openbgpd9/files/openbgpd.in b/net/openbgpd9/files/openbgpd.in new file mode 100644 index 000000000000..ccf78428ebd0 --- /dev/null +++ b/net/openbgpd9/files/openbgpd.in @@ -0,0 +1,32 @@ +#!/bin/sh + +# PROVIDE: bgpd dynamicrouting +# REQUIRE: LOGIN abi +# BEFORE: securelevel +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable openbgpd: +# +# openbgpd_enable="YES" +# openbgpd_flags="<set as needed>" +# +# See bgpd(8) for openbgpd_flags + +. /etc/rc.subr + +name=openbgpd +rcvar=openbgpd_enable + +extra_commands=reload +command="%%PREFIX%%/sbin/bgpd" +required_files="%%PREFIX%%/etc/bgpd.conf" + +: ${openbgpd_enable=NO} + +check_process() +{ + /bin/pgrep -j none -U 0 -f %%PREFIX%%/sbin/bgpd +} + +load_rc_config $name +run_rc_command "$1" diff --git a/net/openbgpd9/files/openbgplgd.in b/net/openbgpd9/files/openbgplgd.in new file mode 100644 index 000000000000..535ce580b561 --- /dev/null +++ b/net/openbgpd9/files/openbgplgd.in @@ -0,0 +1,31 @@ +#!/bin/sh + +# PROVIDE: bgplgd +# REQUIRE: LOGIN abi +# BEFORE: securelevel +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable openbgpd: +# +# openbgplgd_enable="YES" +# openbgplgd_flags="<set as needed>" +# +# See bgplgd(8) for openbgplgd_flags + +. /etc/rc.subr + +name=openbgpdlgd +rcvar=openbgplgd_enable + +extra_commands=reload +command="%%PREFIX%%/sbin/bgplgd" + +: ${openbgplgd_enable=NO} + +check_process() +{ + /bin/pgrep -j none -U 0 -f %%PREFIX%%/sbin/bgplgd +} + +load_rc_config $name +run_rc_command "$1" diff --git a/net/openbgpd9/files/patch-Makefile.am b/net/openbgpd9/files/patch-Makefile.am new file mode 100644 index 000000000000..211e3e1a91da --- /dev/null +++ b/net/openbgpd9/files/patch-Makefile.am @@ -0,0 +1,26 @@ +--- Makefile.am.orig 2026-02-04 12:05:52 UTC ++++ Makefile.am +@@ -23,16 +23,19 @@ install-data-hook: + EXTRA_DIST = README.md LICENSE VERSION bgpd.conf + + install-data-hook: +- @if [ ! -d "$(DESTDIR)$(runstatedir)" ]; then \ ++ if [ ! -d "$(DESTDIR)$(runstatedir)" ]; then \ + $(INSTALL) -m 755 -d "$(DESTDIR)$(runstatedir)"; \ + fi +- @if [ X"$(wwwrunstatedir)" != X -a ! -d "$(DESTDIR)$(wwwrunstatedir)" ]; then \ ++ if [ X"$(wwwrunstatedir)" != X -a ! -d "$(DESTDIR)$(wwwrunstatedir)" ]; then \ + $(INSTALL) -m 755 -d "$(DESTDIR)$(wwwrunstatedir)"; \ + fi +- @if [ ! -d "$(DESTDIR)$(sysconfdir)" ]; then \ ++ if [ ! -d "$(DESTDIR)$(sysconfdir)" ]; then \ + $(INSTALL) -m 755 -d "$(DESTDIR)$(sysconfdir)"; \ + fi +- @if [ ! -f "$(DESTDIR)$(sysconfdir)/bgpd.conf" ]; then \ ++ if [ ! -f "$(DESTDIR)$(sysconfdir)/bgpd.conf.sample" ]; then \ ++ $(INSTALL) -m 644 "$(srcdir)/bgpd.conf" "$(DESTDIR)$(sysconfdir)/bgpd.conf.sample"; \ ++ fi ++ if [ ! -f "$(DESTDIR)$(sysconfdir)/bgpd.conf" ]; then \ + $(INSTALL) -m 644 "$(srcdir)/bgpd.conf" "$(DESTDIR)$(sysconfdir)/bgpd.conf"; \ + else \ + echo; \ diff --git a/net/openbgpd9/files/patch-src_bgplgd_bgplgd.8.in b/net/openbgpd9/files/patch-src_bgplgd_bgplgd.8.in new file mode 100644 index 000000000000..76aa94e709cb --- /dev/null +++ b/net/openbgpd9/files/patch-src_bgplgd_bgplgd.8.in @@ -0,0 +1,20 @@ +--- src/bgplgd/bgplgd.8.in.orig 2025-12-30 12:25:56 UTC ++++ src/bgplgd/bgplgd.8.in +@@ -194,7 +194,7 @@ An example setup in + .Dl socket \&"@RUNSTATEDIR@/bgpd.rsock\&" restricted + .Pp + An example setup in +-.Xr httpd 8 ++.Xr obhttpd 8 + is: + .Bd -literal -offset indent + location "/bgplgd/*" { +@@ -205,7 +205,7 @@ is: + .Sh SEE ALSO + .Xr bgpctl 8 , + .Xr bgpd 8 , +-.Xr httpd 8 ++.Xr obhttpd 8 + .Sh HISTORY + The + .Nm diff --git a/net/openbgpd9/files/pkg-message.in b/net/openbgpd9/files/pkg-message.in new file mode 100644 index 000000000000..4e6b1eb8a3be --- /dev/null +++ b/net/openbgpd9/files/pkg-message.in @@ -0,0 +1,10 @@ +[ +{ type: install + message: <<EOM +OpenBGPD has been successfully installed. + +Configuration file must be created at %%PREFIX%%/etc/bgpd.conf +and permission set to 0600. +EOM +} +] diff --git a/net/openbgpd9/pkg-descr b/net/openbgpd9/pkg-descr new file mode 100644 index 000000000000..7c8dc68201de --- /dev/null +++ b/net/openbgpd9/pkg-descr @@ -0,0 +1,3 @@ +OpenBGPD is a FREE implementation of the Border Gateway Protocol, Version 4. +It allows ordinary machines to be used as routers exchanging routes with +other systems speaking the BGP protocol. diff --git a/net/openbgpd9/pkg-plist b/net/openbgpd9/pkg-plist new file mode 100644 index 000000000000..99c99ebae8d2 --- /dev/null +++ b/net/openbgpd9/pkg-plist @@ -0,0 +1,8 @@ +sbin/bgpctl +sbin/bgpd +%%BGPLGD%%sbin/bgplgd +share/man/man5/bgpd.conf.5.gz +share/man/man8/bgpctl.8.gz +share/man/man8/bgpd.8.gz +%%BGPLGD%%share/man/man8/bgplgd.8.gz +@sample etc/bgpd.conf.sample |
