Skip to content

Instantly share code, notes, and snippets.

@olegvg
Last active February 17, 2021 14:56
Show Gist options
  • Save olegvg/f64218afa9a43ab4b6234c6e252030a3 to your computer and use it in GitHub Desktop.
Save olegvg/f64218afa9a43ab4b6234c6e252030a3 to your computer and use it in GitHub Desktop.
From c21d49e3585562a72590270d4b0be82018aa8186 Mon Sep 17 00:00:00 2001
From: Oleg Gaidukov <ogaidukov@gmail.com>
Date: Wed, 17 Feb 2021 02:19:38 +0300
Subject: [PATCH] build grpc plugin for debian/ubuntu
---
debian/control | 17 +++++++++++++++++
debian/frr-grpc.install | 2 ++
debian/frr.install | 3 +++
debian/rules | 3 ++-
4 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 debian/frr-grpc.install
diff --git a/debian/control b/debian/control
index b9e96b55d..257d5d2ce 100644
--- a/debian/control
+++ b/debian/control
@@ -19,6 +19,11 @@ Build-Depends: bison,
libpython3-dev,
libreadline-dev,
librtr-dev <!pkg.frr.nortrlib>,
+ libgrpc-dev,
+ libgrpc++-dev,
+ libprotobuf-dev,
+ libprotobuf-c-dev,
+ libprotobuf-c1,
libsnmp-dev,
libssh-dev <!pkg.frr.nortrlib>,
libsystemd-dev <!pkg.frr.nosystemd>,
@@ -28,6 +33,8 @@ Build-Depends: bison,
python3,
python3-dev,
python3-pytest <!nocheck>,
+ protobuf-c-compiler,
+ protobuf-compiler-grpc,
python3-sphinx,
texinfo (>= 4.7),
liblua5.3-dev <pkg.frr.lua>
@@ -126,3 +133,13 @@ Description: FRRouting suite - Python tools
.
Without this package installed, "reload" (as a systemd or init script
invocation) will not work for the FRR daemons.
+
+Package: frr-grpc
+Architecture: linux-any
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+ frr (= ${binary:Version})
+Description: FRRouting suite - Experimental gRPC northbound plugin
+ This plugin provides an easy-to-use interface to configure and monitor
+ FRR programmatically, using a variety of different programming language.
\ No newline at end of file
diff --git a/debian/frr-grpc.install b/debian/frr-grpc.install
new file mode 100644
index 000000000..d006439e6
--- /dev/null
+++ b/debian/frr-grpc.install
@@ -0,0 +1,2 @@
+usr/lib/*/frr/libfrrgrpc_pb.*
+usr/lib/*/frr/modules/grpc.so
diff --git a/debian/frr.install b/debian/frr.install
index cefc3135b..6898c305d 100644
--- a/debian/frr.install
+++ b/debian/frr.install
@@ -2,6 +2,8 @@ debian/frr.conf usr/lib/tmpfiles.d
etc/
tools/frr-reload usr/lib/frr/
usr/bin/mtracebis
+usr/lib/*/frr/libfrr_pb.*
+usr/lib/*/frr/libfrrfpm_pb.*
usr/bin/vtysh
usr/lib/*/frr/libfrr.*
usr/lib/*/frr/libfrrcares.*
@@ -9,6 +11,7 @@ usr/lib/*/frr/libfrrospfapiclient.*
usr/lib/*/frr/modules/bgpd_bmp.so
usr/lib/*/frr/modules/dplane_fpm_nl.so
usr/lib/*/frr/modules/zebra_cumulus_mlag.so
+usr/lib/*/frr/libmlag_pb.*
usr/lib/*/frr/modules/zebra_fpm.so
usr/lib/*/frr/modules/zebra_irdp.so
usr/lib/frr/*.sh
diff --git a/debian/rules b/debian/rules
index 25ae04261..b9171d7b9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -61,7 +61,8 @@ override_dh_auto_configure:
--enable-doc-html \
--enable-snmp \
--enable-fpm \
- --disable-protobuf \
+ --enable-protobuf \
+ --enable-grpc \
--disable-zeromq \
--enable-ospfapi \
--enable-bgp-vnc \
--
2.30.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment