All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/frr: add options for BMP and NHRPD
@ 2021-12-17 17:39 Arnout Vandecappelle
  0 siblings, 0 replies; only message in thread
From: Arnout Vandecappelle @ 2021-12-17 17:39 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=8b6235af78d68e1ef58c3993725fbe7192dd1633
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

BMP and NHRPD default to enabled. Both of them require c-ares. However,
if BMP and NHRPD are disabled, it is possible to build without c-ares.

Create user-visible configuration options for BMP and NHRPD and only
depend on c-ares if either of them is selected.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 .../0001-configure.ac-fix-enable_bmp-typo.patch    | 29 ++++++++++++++++++++++
 package/frr/Config.in                              | 17 ++++++++++++-
 package/frr/frr.mk                                 | 16 ++++++++++--
 3 files changed, 59 insertions(+), 3 deletions(-)

diff --git a/package/frr/0001-configure.ac-fix-enable_bmp-typo.patch b/package/frr/0001-configure.ac-fix-enable_bmp-typo.patch
new file mode 100644
index 0000000000..c8ce500dfc
--- /dev/null
+++ b/package/frr/0001-configure.ac-fix-enable_bmp-typo.patch
@@ -0,0 +1,29 @@
+From bacabf2476553d0e873b827359e1c8a4216c2f8c Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Thu, 16 Dec 2021 20:10:26 +0100
+Subject: [PATCH] configure.ac: fix enable_bmp typo
+
+enable_bmp doesn't exist, use enable_bgp_bmp
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/FRRouting/frr/pull/10236]
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1bcc42ef8..c7a5f1286 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1806,7 +1806,7 @@ if test "$enable_bgp_vnc" != "no";then
+ fi
+ 
+ bgpd_bmp=false
+-case "${enable_bmp}" in
++case "${enable_bgp_bmp}" in
+   no)
+     ;;
+   yes)
+-- 
+2.33.0
+
diff --git a/package/frr/Config.in b/package/frr/Config.in
index 877b75b107..c2e9577a27 100644
--- a/package/frr/Config.in
+++ b/package/frr/Config.in
@@ -6,7 +6,6 @@ config BR2_PACKAGE_FRR
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c, libyang
 	select BR2_PACKAGE_BASH
 	select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
-	select BR2_PACKAGE_C_ARES
 	select BR2_PACKAGE_LIBYANG
 	select BR2_PACKAGE_LIBNL
 	select BR2_PACKAGE_READLINE
@@ -19,6 +18,22 @@ config BR2_PACKAGE_FRR
 
 	  https://frrouting.org
 
+if BR2_PACKAGE_FRR
+
+config BR2_PACKAGE_FRR_BMP
+	bool "BMP protocol"
+	select BR2_PACKAGE_C_ARES
+	help
+	  Build BGP Monitoring Protocol daemon.
+
+config BR2_PACKAGE_FRR_NHRPD
+	bool "NHRPD protocol"
+	select BR2_PACKAGE_C_ARES
+	help
+	  Build Next Hop Routing Protocol daemon.
+
+endif
+
 comment "frr needs a toolchain w/ threads, dynamic library"
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4
 	depends on BR2_USE_MMU
diff --git a/package/frr/frr.mk b/package/frr/frr.mk
index 97cc735935..3bd587a1cd 100644
--- a/package/frr/frr.mk
+++ b/package/frr/frr.mk
@@ -12,8 +12,8 @@ FRR_CPE_ID_VENDOR = linuxfoundation
 FRR_CPE_ID_PRODUCT = free_range_routing
 FRR_AUTORECONF = YES
 
-FRR_DEPENDENCIES = host-frr readline json-c \
-	libyang libnl c-ares
+FRR_DEPENDENCIES = host-frr readline json-c libyang libnl \
+	$(if $(BR2_PACKAGE_C_ARES),c-ares)
 
 HOST_FRR_DEPENDENCIES = host-flex host-bison host-elfutils host-python3
 
@@ -35,6 +35,18 @@ FRR_CONF_OPTS = --with-clippy=$(HOST_DIR)/bin/clippy \
 
 HOST_FRR_CONF_OPTS = --enable-clippy-only
 
+ifeq ($(BR2_PACKAGE_FRR_BMP),y)
+FRR_CONF_OPTS += --enable-bgp-bmp
+else
+FRR_CONF_OPTS += --disable-bgp-bmp
+endif
+
+ifeq ($(BR2_PACKAGE_FRR_NHRPD),y)
+FRR_CONF_OPTS += --enable-nhrpd
+else
+FRR_CONF_OPTS += --disable-nhrpd
+endif
+
 ifeq ($(BR2_PACKAGE_LIBCAP),y)
 FRR_DEPENDENCIES += libcap
 FRR_CONF_OPTS += --enable-capabilities
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-17 17:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17 17:39 [Buildroot] [git commit] package/frr: add options for BMP and NHRPD Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.