aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian <sko@rostwald.de>2023-11-12 19:31:32 +0000
committerKurt Jaeger <pi@FreeBSD.org>2023-11-12 19:31:32 +0000
commit03f1984975e79fcd362158107685c733d701a8bf (patch)
treebbc3b80bcd569844f01bbdf7dba1795fe7794dad
parent8407a5cef895c8ddadf1fb439f91faccf62a7605 (diff)
downloadports-03f1984975e79fcd362158107685c733d701a8bf.tar.gz
ports-03f1984975e79fcd362158107685c733d701a8bf.zip
net/openbgpd8: New port based on openbgpd7 port
PR: 272383 Author: Sebastian <sko@rostwald.de>
-rw-r--r--net/Makefile1
-rw-r--r--net/openbgpd8/Makefile28
-rw-r--r--net/openbgpd8/distinfo3
-rw-r--r--net/openbgpd8/files/COPYING19
-rw-r--r--net/openbgpd8/files/openbgpd.in32
-rw-r--r--net/openbgpd8/files/patch-Makefile.am26
-rw-r--r--net/openbgpd8/files/pkg-message.in10
-rw-r--r--net/openbgpd8/pkg-descr3
-rw-r--r--net/openbgpd8/pkg-plist8
9 files changed, 130 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index 7199f7f9b3b8..82f8618a7054 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -570,6 +570,7 @@
SUBDIR += openbgpd
SUBDIR += openbgpd6
SUBDIR += openbgpd7
+ SUBDIR += openbgpd8
SUBDIR += openldap25-client
SUBDIR += openldap25-server
SUBDIR += openldap26-client
diff --git a/net/openbgpd8/Makefile b/net/openbgpd8/Makefile
new file mode 100644
index 000000000000..fc05babc0eb4
--- /dev/null
+++ b/net/openbgpd8/Makefile
@@ -0,0 +1,28 @@
+PORTNAME= openbgpd
+PORTVERSION= 8.3
+CATEGORIES= net
+MASTER_SITES= OPENBSD/OpenBGPD
+PKGNAMESUFFIX= 8
+
+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}
+
+GNU_CONFIGURE= yes
+
+SUB_FILES= pkg-message
+
+USERS= _bgpd
+GROUPS= _bgpd
+
+CONFLICTS= zebra quagga
+
+.include <bsd.port.mk>
diff --git a/net/openbgpd8/distinfo b/net/openbgpd8/distinfo
new file mode 100644
index 000000000000..af67b3c44387
--- /dev/null
+++ b/net/openbgpd8/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1699816051
+SHA256 (openbgpd-8.3.tar.gz) = a1e4e59694c16f82e551ee74499000807e218731ec549b8f495c7ada942ec3fe
+SIZE (openbgpd-8.3.tar.gz) = 839081
diff --git a/net/openbgpd8/files/COPYING b/net/openbgpd8/files/COPYING
new file mode 100644
index 000000000000..0e9cfc51f9c0
--- /dev/null
+++ b/net/openbgpd8/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/openbgpd8/files/openbgpd.in b/net/openbgpd8/files/openbgpd.in
new file mode 100644
index 000000000000..ccf78428ebd0
--- /dev/null
+++ b/net/openbgpd8/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/openbgpd8/files/patch-Makefile.am b/net/openbgpd8/files/patch-Makefile.am
new file mode 100644
index 000000000000..3a4e448bb7da
--- /dev/null
+++ b/net/openbgpd8/files/patch-Makefile.am
@@ -0,0 +1,26 @@
+--- Makefile.am.orig 2023-11-12 20:11:09.365947000 +0100
++++ Makefile.am 2023-11-12 20:16:27.510527000 +0100
+@@ -23,16 +23,19 @@
+ 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/openbgpd8/files/pkg-message.in b/net/openbgpd8/files/pkg-message.in
new file mode 100644
index 000000000000..4e6b1eb8a3be
--- /dev/null
+++ b/net/openbgpd8/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/openbgpd8/pkg-descr b/net/openbgpd8/pkg-descr
new file mode 100644
index 000000000000..7c8dc68201de
--- /dev/null
+++ b/net/openbgpd8/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/openbgpd8/pkg-plist b/net/openbgpd8/pkg-plist
new file mode 100644
index 000000000000..b49cb6c5c3c0
--- /dev/null
+++ b/net/openbgpd8/pkg-plist
@@ -0,0 +1,8 @@
+sbin/bgpctl
+sbin/bgpd
+sbin/bgplgd
+man/man5/bgpd.conf.5.gz
+man/man8/bgpctl.8.gz
+man/man8/bgpd.8.gz
+man/man8/bgplgd.8.gz
+@sample etc/bgpd.conf.sample