aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorpizzamig <pizzamig@FreeBSD.org>2017-09-15 22:17:03 +0800
committerpizzamig <pizzamig@FreeBSD.org>2017-09-15 22:17:03 +0800
commit8f3d88d3969ea2474580cb73cf8e21c71b8386e4 (patch)
tree628d8b488c1f27258ec22438dd8146cd272f30fa /net-mgmt
parent5c91f640eb056ed9657dd84ac654725dd932d239 (diff)
downloadfreebsd-ports-gnome-8f3d88d3969ea2474580cb73cf8e21c71b8386e4.tar.gz
freebsd-ports-gnome-8f3d88d3969ea2474580cb73cf8e21c71b8386e4.tar.zst
freebsd-ports-gnome-8f3d88d3969ea2474580cb73cf8e21c71b8386e4.zip
net-mgmt/openbmp: new port
Adding openBMP, a BGP Monitor Protocol collector Approved by: olivier (mentor) Sponsored by: trivago N.V. Differential Revision: https://reviews.freebsd.org/D12378
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/Makefile1
-rw-r--r--net-mgmt/openbmp/Makefile23
-rw-r--r--net-mgmt/openbmp/distinfo3
-rw-r--r--net-mgmt/openbmp/files/patch-CMakeLists.txt11
-rw-r--r--net-mgmt/openbmp/files/patch-Server_CMakeLists.txt34
-rw-r--r--net-mgmt/openbmp/files/patch-Server_src_Config.cpp10
-rw-r--r--net-mgmt/openbmp/files/patch-Server_src_client__thread.cpp11
-rw-r--r--net-mgmt/openbmp/files/patch-Server_src_kafka_KafkaTopicSelector.cpp17
-rw-r--r--net-mgmt/openbmp/pkg-descr6
-rw-r--r--net-mgmt/openbmp/pkg-plist2
10 files changed, 118 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile
index 23181f684e02..34dfa1dc820d 100644
--- a/net-mgmt/Makefile
+++ b/net-mgmt/Makefile
@@ -210,6 +210,7 @@
SUBDIR += ocsinventory-ng
SUBDIR += omping
SUBDIR += onionlauncher
+ SUBDIR += openbmp
SUBDIR += openlldp
SUBDIR += openvmps
SUBDIR += p0f
diff --git a/net-mgmt/openbmp/Makefile b/net-mgmt/openbmp/Makefile
new file mode 100644
index 000000000000..254a001e0d81
--- /dev/null
+++ b/net-mgmt/openbmp/Makefile
@@ -0,0 +1,23 @@
+# Created by: Luca Pizzamiglio <pizzamig@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= openbmp
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.13.0
+CATEGORIES= net-mgmt
+
+MAINTAINER= pizzamig@FreeBSD.org
+COMMENT= OpenBMP Server Collector
+
+LICENSE= EPL
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= librdkafka.so:net/librdkafka \
+ libsasl2.so:security/cyrus-sasl2 \
+ libyaml-cpp.so:devel/yaml-cpp
+
+USES= cmake:outsource ssl
+USE_GITHUB= yes
+GH_ACCOUNT= OpenBMP
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/openbmp/distinfo b/net-mgmt/openbmp/distinfo
new file mode 100644
index 000000000000..f2c067795400
--- /dev/null
+++ b/net-mgmt/openbmp/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1505339149
+SHA256 (OpenBMP-openbmp-v0.13.0_GH0.tar.gz) = 5eb3cc72553e1be86e47e298da441cdc1d4be9a4c67bd0d02f14fc903a01c307
+SIZE (OpenBMP-openbmp-v0.13.0_GH0.tar.gz) = 3016241
diff --git a/net-mgmt/openbmp/files/patch-CMakeLists.txt b/net-mgmt/openbmp/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..e67f41f43b59
--- /dev/null
+++ b/net-mgmt/openbmp/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig 2017-09-14 09:28:17 UTC
++++ CMakeLists.txt
+@@ -24,6 +24,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL Linux)
+ set(LINUX TRUE)
+ elseif (CMAKE_SYSTEM_NAME STREQUAL Darwin)
+ set(MACOSX TRUE)
++elseif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
++ set(FREEBSD TRUE)
+ else ()
+ Message (FATAL_ERROR "${CMAKE_SYSTEM_NAME} not supported; Must be Linux or Darwin")
+ endif()
diff --git a/net-mgmt/openbmp/files/patch-Server_CMakeLists.txt b/net-mgmt/openbmp/files/patch-Server_CMakeLists.txt
new file mode 100644
index 000000000000..956bb40fd51d
--- /dev/null
+++ b/net-mgmt/openbmp/files/patch-Server_CMakeLists.txt
@@ -0,0 +1,34 @@
+--- Server/CMakeLists.txt.orig 2017-09-14 09:29:16 UTC
++++ Server/CMakeLists.txt
+@@ -24,6 +24,14 @@ find_path(LIBYAML_CPP_INCLUDE_DIR
+ PATH_SUFFIXES
+ include)
+
++find_path(LIBLZ4_CPP_LIBRARY_DIR
++ NAMES
++ liblz4.so
++ HINTS
++ ${HINT_ROOT_DIR}
++ PATH_SUFFIXES
++ lib)
++
+ find_library(LIBYAML_CPP_LIBRARY
+ NAMES
+ libyaml-cpp.a yaml-cpp
+@@ -84,6 +92,7 @@ endif()
+ # Update the include dir
+ include_directories(${LIBRDKAFKA_INCLUDE_DIR} ${LIBYAML_CPP_INCLUDE_DIR} src/ src/bmp src/bgp src/bgp/linkstate src/kafka)
+ #link_directories(${LIBRDKAFKA_LIBRARY})
++link_directories(${LIBLZ4_CPP_LIBRARY_DIR})
+
+
+ # Define the source files to compile
+@@ -134,7 +143,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMA
+ endif()
+
+ # Set the libs to link
+-set (LIBS pthread ${LIBYAML_CPP_LIBRARY} ${LIBRDKAFKA_CPP_LIBRARY} ${LIBRDKAFKA_LIBRARY} z ${SSL_LIBS})
++set (LIBS pthread ${LIBYAML_CPP_LIBRARY} ${LIBRDKAFKA_CPP_LIBRARY} ${LIBRDKAFKA_LIBRARY} z lz4 ${SSL_LIBS})
+
+ # Set the binary
+ add_executable (openbmpd ${SRC_FILES})
diff --git a/net-mgmt/openbmp/files/patch-Server_src_Config.cpp b/net-mgmt/openbmp/files/patch-Server_src_Config.cpp
new file mode 100644
index 000000000000..bb0a05a5cab3
--- /dev/null
+++ b/net-mgmt/openbmp/files/patch-Server_src_Config.cpp
@@ -0,0 +1,10 @@
+--- Server/src/Config.cpp.orig 2017-09-14 09:34:05 UTC
++++ Server/src/Config.cpp
+@@ -15,6 +15,7 @@
+ #include <unistd.h>
+
+ #include <arpa/inet.h>
++#include <sys/socket.h>
+ #include <yaml-cpp/yaml.h>
+ #include <boost/xpressive/xpressive.hpp>
+ #include <boost/exception/all.hpp>
diff --git a/net-mgmt/openbmp/files/patch-Server_src_client__thread.cpp b/net-mgmt/openbmp/files/patch-Server_src_client__thread.cpp
new file mode 100644
index 000000000000..3dfb3c4e5428
--- /dev/null
+++ b/net-mgmt/openbmp/files/patch-Server_src_client__thread.cpp
@@ -0,0 +1,11 @@
+--- Server/src/client_thread.cpp.orig 2017-09-14 09:34:45 UTC
++++ Server/src/client_thread.cpp
+@@ -227,7 +227,7 @@ void *ClientThread(void *arg) {
+ close(sock_fds[0]);
+ close(sock_fds[1]);
+
+-#ifndef __APPLE__
++#if !defined(__APPLE__) and !defined(__FreeBSD__)
+ } catch (abi::__forced_unwind&) {
+ close(sock_fds[0]);
+ close(sock_fds[1]);
diff --git a/net-mgmt/openbmp/files/patch-Server_src_kafka_KafkaTopicSelector.cpp b/net-mgmt/openbmp/files/patch-Server_src_kafka_KafkaTopicSelector.cpp
new file mode 100644
index 000000000000..a3dda3f6b369
--- /dev/null
+++ b/net-mgmt/openbmp/files/patch-Server_src_kafka_KafkaTopicSelector.cpp
@@ -0,0 +1,17 @@
+--- Server/src/kafka/KafkaTopicSelector.cpp.orig 2017-09-14 09:36:00 UTC
++++ Server/src/kafka/KafkaTopicSelector.cpp
+@@ -8,6 +8,7 @@
+ */
+
+ #include <arpa/inet.h>
++#include <sys/socket.h>
+ #include <boost/algorithm/string/replace.hpp>
+
+ #include "KafkaTopicSelector.h"
+@@ -439,4 +440,4 @@ void KafkaTopicSelector::freeTopicMap() {
+ it->second = NULL;
+ }
+ }
+-}
+\ No newline at end of file
++}
diff --git a/net-mgmt/openbmp/pkg-descr b/net-mgmt/openbmp/pkg-descr
new file mode 100644
index 000000000000..dd11b327f339
--- /dev/null
+++ b/net-mgmt/openbmp/pkg-descr
@@ -0,0 +1,6 @@
+OpenBMP is part of the Open BGP Monitoring Protocol collection framework.
+OpenBMP is an open source project that implements draft-ietf-grow-bmp-17.
+BMP protocol version 3 is defined in draft 08, while versions 1 and 2 are
+defined in the previous revisions of the draft.
+
+WWW: https://github.com/OpenBMP/openbmp
diff --git a/net-mgmt/openbmp/pkg-plist b/net-mgmt/openbmp/pkg-plist
new file mode 100644
index 000000000000..4b52448f7bcb
--- /dev/null
+++ b/net-mgmt/openbmp/pkg-plist
@@ -0,0 +1,2 @@
+bin/openbmpd
+%%ETCDIR%%/openbmpd.conf