Skip to contentSkip to conversation

package/bird: add optional protocols

PATCH New Adrien Gallouët 2 participants 3 messages Mar 20, 2019 – Mar 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/bird: add optional protocols

---
 package/bird/Config.in | 46 ++++++++++++++++++++++++++++++++++++++++++
 package/bird/bird.mk   | 16 +++++++++++++++
 2 files changed, 62 insertions(+)
package/bird/Config.in +46 -0
index a69551f94e..298348d098 100644
@@ -20,4 +20,50 @@ config BR2_PACKAGE_BIRD_CLIENT
 	help
 	  Enable the BIRD client
 
+config BR2_PACKAGE_BIRD_BABEL
+	bool "babel"
+	help
+	  Enable Babel protocol.
+
+config BR2_PACKAGE_BIRD_BFD
+	bool "bfd"
+	help
+	  Enable BFD protocol.
+
+config BR2_PACKAGE_BIRD_BGP
+	bool "bgp"
+	default y
+	help
+	  Enable BGP protocol.
+
+config BR2_PACKAGE_BIRD_MRT
+	bool "mrt"
+	help
+	  Enable MRT protocol.
+
+config BR2_PACKAGE_BIRD_OSPF
+	bool "ospf"
+	help
+	  Enable OSPFv2 and OSPFv3 protocol.
+
+config BR2_PACKAGE_BIRD_PERF
+	bool "perf"
+	help
+	  Enable Perf protocol.
+
+config BR2_PACKAGE_BIRD_PIPE
+	bool "pipe"
+	help
+	  Enable Pipe protocol.
+
+config BR2_PACKAGE_BIRD_RADV
+	bool "radv"
+	help
+	  Enable RAdv protocol.
+
+config BR2_PACKAGE_BIRD_STATIC
+	bool "static"
+	help
+	  Enable Static protocol.
+
 endif
package/bird/bird.mk +16 -0
index e165be61c0..26bec01ebf 100644
@@ -17,4 +17,20 @@ else
 BIRD_CONF_OPTS += --disable-client
 endif
 
+# BUG: RIP is needed for now
+BR2_PACKAGE_BIRD_RIP=y
+
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_BFD),bfd,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_BABEL),babel,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_BGP),bgp,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_MRT),mrt,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_OSPF),ospf,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_PERF),perf,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_PIPE),pipe,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_RADV),radv,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_RIP),rip,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_STATIC),static,)
+
+BIRD_CONF_OPTS += --with-protocols=$(subst $(space),$(comma),$(strip $(BR2_PACKAGE_BIRD_PROTOCOLS)))
+
 $(eval $(autotools-package))
Signature · 1 line
2.19.1
#1 lore raw

PATCH 1/1 package/bird: add optional protocols

Hello,

Quoted 5 lines · On Wed, 20 Mar 2019 21:09:44 +0000 Adrien Gallou?t <[email protected]> wrote:
---
 package/bird/Config.in | 46 ++++++++++++++++++++++++++++++++++++++++++
 package/bird/bird.mk   | 16 +++++++++++++++
 2 files changed, 62 insertions(+)

I've applied, but I had to fix a number of things, see below.

package/bird/Config.in config BR2_PACKAGE_BIRD_CLIENT · line 21

Quoted 8 lines
package/bird/Config.in +0 -0
index a69551f94e..298348d098 100644
@@ -20,4 +20,50 @@ config BR2_PACKAGE_BIRD_CLIENT
 	help
 	  Enable the BIRD client

I added a Config.in comment here to make it clear the below options are for configuring the list of supported protocols.

package/bird/Config.in config BR2_PACKAGE_BIRD_CLIENT · line 23

Quoted 2 lines
package/bird/Config.in +2 -0
+# BUG: RIP is needed for now
+BR2_PACKAGE_BIRD_RIP=y

BR2_PACKAGE_* is reserved for config options. Variables in a package should be prefixed by the package name.

package/bird/Config.in config BR2_PACKAGE_BIRD_CLIENT · line 35

Quoted 12 lines
package/bird/Config.in +12 -0
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_BFD),bfd,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_BABEL),babel,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_BGP),bgp,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_MRT),mrt,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_OSPF),ospf,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_PERF),perf,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_PIPE),pipe,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_RADV),radv,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_RIP),rip,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_STATIC),static,)
+
+BIRD_CONF_OPTS += --with-protocols=$(subst $(space),$(comma),$(strip $(BR2_PACKAGE_BIRD_PROTOCOLS)))

So I've changed all of this by:

# BUG: RIP is mandatory for now

BIRD_PROTOCOLS = \
        rip \
        $(if $(BR2_PACKAGE_BIRD_BFD),bfd) \
        $(if $(BR2_PACKAGE_BIRD_BABEL),babel) \
        $(if $(BR2_PACKAGE_BIRD_BGP),bgp) \
        $(if $(BR2_PACKAGE_BIRD_MRT),mrt) \
        $(if $(BR2_PACKAGE_BIRD_OSPF),ospf) \
        $(if $(BR2_PACKAGE_BIRD_PERF),perf) \
        $(if $(BR2_PACKAGE_BIRD_PIPE),pipe) \
        $(if $(BR2_PACKAGE_BIRD_RADV),radv) \
        $(if $(BR2_PACKAGE_BIRD_RIP),rip) \
        $(if $(BR2_PACKAGE_BIRD_STATIC),static)

BIRD_CONF_OPTS += --with-protocols=$(subst $(space),$(comma),$(strip $(BIRD_PROTOCOLS)))

and applied to master.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/bird: add optional protocols

Quoted 65 lines · Thomas Petazzoni

Hello,

Quoted 5 lines · On Wed, 20 Mar 2019 21:09:44 +0000 Adrien Gallou?t <[email protected]> wrote:
---
 package/bird/Config.in | 46 ++++++++++++++++++++++++++++++++++++++++++
 package/bird/bird.mk   | 16 +++++++++++++++
 2 files changed, 62 insertions(+)

I've applied, but I had to fix a number of things, see below.

package/bird/Config.in config BR2_PACKAGE_BIRD_CLIENT · line 21

Quoted 8 lines
package/bird/Config.in +0 -0
index a69551f94e..298348d098 100644
@@ -20,4 +20,50 @@ config BR2_PACKAGE_BIRD_CLIENT
      help
        Enable the BIRD client

I added a Config.in comment here to make it clear the below options are for configuring the list of supported protocols.

package/bird/Config.in config BR2_PACKAGE_BIRD_CLIENT · line 23

Quoted 2 lines
package/bird/Config.in +2 -0
+# BUG: RIP is needed for now
+BR2_PACKAGE_BIRD_RIP=y

BR2_PACKAGE_* is reserved for config options. Variables in a package should be prefixed by the package name.

package/bird/Config.in config BR2_PACKAGE_BIRD_CLIENT · line 35

Quoted 12 lines
package/bird/Config.in +12 -0
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_BFD),bfd,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_BABEL),babel,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_BGP),bgp,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_MRT),mrt,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_OSPF),ospf,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_PERF),perf,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_PIPE),pipe,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_RADV),radv,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_RIP),rip,)
+BR2_PACKAGE_BIRD_PROTOCOLS += $(if $(BR2_PACKAGE_BIRD_STATIC),static,)
+
+BIRD_CONF_OPTS += --with-protocols=$(subst $(space),$(comma),$(strip $(BR2_PACKAGE_BIRD_PROTOCOLS)))

So I've changed all of this by:

# BUG: RIP is mandatory for now

BIRD_PROTOCOLS = \
        rip \
        $(if $(BR2_PACKAGE_BIRD_BFD),bfd) \
        $(if $(BR2_PACKAGE_BIRD_BABEL),babel) \
        $(if $(BR2_PACKAGE_BIRD_BGP),bgp) \
        $(if $(BR2_PACKAGE_BIRD_MRT),mrt) \
        $(if $(BR2_PACKAGE_BIRD_OSPF),ospf) \
        $(if $(BR2_PACKAGE_BIRD_PERF),perf) \
        $(if $(BR2_PACKAGE_BIRD_PIPE),pipe) \
        $(if $(BR2_PACKAGE_BIRD_RADV),radv) \
        $(if $(BR2_PACKAGE_BIRD_RIP),rip) \
        $(if $(BR2_PACKAGE_BIRD_STATIC),static)

BIRD_CONF_OPTS += --with-protocols=$(subst $(space),$(comma),$(strip $(BIRD_PROTOCOLS)))

and applied to master.

Quoted 7 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Hi Thomas,
Thanks to you!