]> git.puffer.fish Git - matthieu/frr.git/commitdiff
redhat: Add option to build pkg with grpc support
authorMartin Winter <mwinter@opensourcerouting.org>
Wed, 29 May 2024 17:13:19 +0000 (19:13 +0200)
committerMartin Winter <mwinter@opensourcerouting.org>
Thu, 20 Jun 2024 10:14:56 +0000 (12:14 +0200)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
doc/developer/packaging-redhat.rst
redhat/frr.spec.in

index d88f449926b32e267b551042a37a694270beaa3b..8037873461a532cfe1275d93c04772d3b914adc6 100644 (file)
@@ -67,24 +67,27 @@ Tested on CentOS 6, CentOS 7, CentOS 8 and Fedora 24.
 
       ############### FRRouting (FRR) configure options #################
       # with-feature options
-      %{!?with_pam:           %global  with_pam           0 }
-      %{!?with_ospfclient:    %global  with_ospfclient    1 }
-      %{!?with_ospfapi:       %global  with_ospfapi       1 }
-      %{!?with_irdp:          %global  with_irdp          1 }
-      %{!?with_rtadv:         %global  with_rtadv         1 }
+      %{!?with_babeld:        %global  with_babeld        1 }
+      %{!?with_bfdd:          %global  with_bfdd          1 }
+      %{!?with_bgp_vnc:       %global  with_bgp_vnc       0 }
+      %{!?with_cumulus:       %global  with_cumulus       0 }
+      %{!?with_eigrpd:        %global  with_eigrpd        1 }
+      %{!?with_fpm:           %global  with_fpm           1 }
+      %{!?with_mgmtd_test_be_client: %global with_mgmtd_test_be_client 0 }
       %{!?with_ldpd:          %global  with_ldpd          1 }
-      %{!?with_nhrpd:         %global  with_nhrpd         1 }
-      %{!?with_eigrp:         %global  with_eigrpd        1 }
-      %{!?with_shared:        %global  with_shared        1 }
       %{!?with_multipath:     %global  with_multipath     256 }
-      %{!?frr_user:           %global  frr_user           frr }
-      %{!?vty_group:          %global  vty_group          frrvty }
-      %{!?with_fpm:           %global  with_fpm           0 }
-      %{!?with_watchfrr:      %global  with_watchfrr      1 }
-      %{!?with_bgp_vnc:       %global  with_bgp_vnc       0 }
+      %{!?with_nhrpd:         %global  with_nhrpd         1 }
+      %{!?with_ospfapi:       %global  with_ospfapi       1 }
+      %{!?with_ospfclient:    %global  with_ospfclient    1 }
+      %{!?with_pam:           %global  with_pam           0 }
+      %{!?with_pbrd:          %global  with_pbrd          1 }
       %{!?with_pimd:          %global  with_pimd          1 }
       %{!?with_pim6d:         %global  with_pim6d         1 }
-      %{!?with_rpki:          %global  with_rpki          0 }
+      %{!?with_vrrpd:         %global  with_vrrpd         1 }
+      %{!?with_rtadv:         %global  with_rtadv         1 }
+      %{!?with_watchfrr:      %global  with_watchfrr      1 }
+      %{!?with_pathd:         %global  with_pathd         1 }
+      %{!?with_grpc:          %global  with_grpc          0 }
 
 8. Build the RPM::
 
index f42079cd50415040d0024f387272711e98fc4eef..d6775e6e9cae56717c1d367dd88273251edabdc9 100644 (file)
@@ -30,6 +30,7 @@
 %{!?with_rtadv:         %global  with_rtadv         1 }
 %{!?with_watchfrr:      %global  with_watchfrr      1 }
 %{!?with_pathd:         %global  with_pathd         1 }
+%{!?with_grpc:          %global  with_grpc          0 }
 
 # user and group
 %{!?frr_user:           %global  frr_user           frr }
@@ -201,6 +202,12 @@ BuildRequires:  python3-devel
 BuildRequires:  python3-sphinx
 %endif
 %endif
+%if %{with_grpc}
+BuildRequires:  grpc-devel >= 1.16.1
+BuildRequires:  protobuf-devel >= 3.6.1
+BuildRequires:  protobuf-compiler >= 3.6.1
+BuildRequires:  protobuf-c-devel
+%endif
 %if 0%{?rhel} > 7
 #platform-python-devel is needed for /usr/bin/pathfix.py
 BuildRequires:  platform-python-devel
@@ -301,6 +308,17 @@ through the AgentX protocol.  Provides read-only access to current
 routing state through standard SNMP MIBs.
 
 
+%if %{with_grpc}
+%package grpc
+Summary: GRPC support for FRR daemons
+Group: System Environment/Daemons
+License: GPLv3+
+Requires: %{name} = %{version}-%{release}
+
+%description grpc
+Adds GRPC support to the individual FRR daemons.
+%endif
+
 %prep
 %setup -q -n frr-%{frrversion}
 
@@ -424,6 +442,11 @@ routing state through standard SNMP MIBs.
     --enable-pathd \
 %else
     --disable-pathd \
+%endif
+%if %{with_grpc}
+    --enable-grpc \
+%else
+    --disable-grpc \
 %endif
     --enable-snmp
     # end
@@ -783,6 +806,12 @@ sed -i 's/ -M rpki//' %{_sysconfdir}/frr/daemons
 %{_libdir}/frr/modules/*snmp.so
 
 
+%if %{with_grpc}
+%files grpc
+%{_libdir}/libfrrgrpc_pb.*
+%{_libdir}/frr/modules/grpc.so
+%endif
+
 %files devel
 %{_libdir}/lib*.so
 %dir %{_includedir}/%{name}