-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit introduces the `bird3` package to OpenWrt's routing feed. The package is primarily based on the existing `bird2` package, with minor modifications to accommodate the updates and changes in BIRD 3.0.0. I have also added myself as the maintainer for this package. BIRD 3.0.0 is a major release that brings multithreading support, enabling better performance for protocols like BGP, BMP, RPKI, and others. The internal rework has introduced significant changes to the table and channel implementations, while protocol-level functionality remains largely consistent with BIRD 2.16. Although there are minor breaking changes in configuration and CLI, most existing setups should be reusable. Memory usage has increased in this version, with improvements planned for subsequent releases. Migration documentation is available in `doc/migration-bird3.md` from the official BIRD repository. For more details, see the official announcement: https://trubka.network.cz/pipermail/bird-users/2024-December/017973.html Signed-off-by: Nick Hainke <[email protected]>
- Loading branch information
1 parent
478626b
commit 5998119
Showing
3 changed files
with
151 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
|
||
include $(TOPDIR)/rules.mk | ||
|
||
PKG_NAME:=bird3 | ||
PKG_VERSION:=3.0.0 | ||
PKG_RELEASE:=1 | ||
|
||
PKG_SOURCE:=bird-$(PKG_VERSION).tar.gz | ||
PKG_SOURCE_URL:=https://bird.network.cz/download/ | ||
PKG_HASH:=8130440a2e273ba6456df2fb3acb43da7cb4d566f94a294a3a52a1b118f2512a | ||
|
||
PKG_MAINTAINER:=Toke Høiland-Jørgensen <[email protected]>, Nick Hainke <[email protected]> | ||
PKG_LICENSE:=GPL-2.0-or-later | ||
|
||
PKG_BUILD_DEPENDS:=ncurses readline | ||
PKG_BUILD_DIR:=$(BUILD_DIR)/bird-$(PKG_VERSION) | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
|
||
define Package/bird3/Default/description | ||
BIRD is an internet routing daemon which manages TCP/IP routing tables | ||
with support of modern routing protocols, easy to use configuration | ||
interface and powerful route filtering language. It is lightweight and | ||
efficient and therefore appropriate for small embedded routers. | ||
|
||
endef | ||
|
||
define Package/bird3 | ||
TITLE:=The BIRD Internet Routing Daemon (v3) | ||
URL:=http://bird.network.cz/ | ||
SECTION:=net | ||
CATEGORY:=Network | ||
SUBMENU:=Routing and Redirection | ||
DEPENDS:=+libpthread +libatomic | ||
CONFLICTS:=bird2 | ||
endef | ||
|
||
define Package/bird3c | ||
TITLE:=The BIRD command-line client (v3) | ||
URL:=http://bird.network.cz/ | ||
SECTION:=net | ||
CATEGORY:=Network | ||
SUBMENU:=Routing and Redirection | ||
DEPENDS:=+bird3 +libreadline +libncurses | ||
CONFLICTS:=bird2 | ||
endef | ||
|
||
define Package/bird3cl | ||
TITLE:=The BIRD lightweight command-line client (v2) | ||
URL:=http://bird.network.cz/ | ||
SECTION:=net | ||
CATEGORY:=Network | ||
SUBMENU:=Routing and Redirection | ||
DEPENDS:=+bird3 | ||
CONFLICTS:=bird2 | ||
endef | ||
|
||
define Package/bird3/description | ||
$(call Package/bird3/Default/description) | ||
|
||
BIRD supports OSPFv2, RIPv2, Babel and BGP protocols for IPv4 and | ||
OSPFv3, RIPng, Babel and BGP protocols for IPv6. | ||
|
||
In BGP, BIRD supports communities, multiprotocol extensions, MD5 | ||
authentication, 32bit AS numbers and could act as a route server or a | ||
route reflector. BIRD also supports multiple RIBs, multiple kernel | ||
routing tables and redistribution between the protocols with a powerful | ||
configuration syntax. | ||
|
||
This is the 3.0 branch of Bird which is a multithreaded rewrite. | ||
endef | ||
|
||
define Package/bird3c/description | ||
$(call Package/bird3/Default/description) | ||
|
||
This is a BIRD command-line client. It is used to send commands to BIRD, | ||
commands can perform simple actions such as enabling/disabling of | ||
protocols, telling BIRD to show various information, telling it to show | ||
a routing table filtered by a filter, or asking BIRD to reconfigure. | ||
|
||
Unless you can't afford dependency on ncurses and readline, you | ||
should install BIRD command-line client together with BIRD. | ||
endef | ||
|
||
define Package/bird3cl/description | ||
$(call Package/bird3/Default/description) | ||
|
||
This is a BIRD lightweight command-line client. It is used to send commands | ||
to BIRD, commands can perform simple actions such as enabling/disabling of | ||
protocols, telling BIRD to show various information, telling it to show | ||
a routing table filtered by a filter, or asking BIRD to reconfigure. | ||
endef | ||
|
||
CONFIGURE_ARGS += --disable-libssh | ||
TARGET_LDFLAGS += -latomic | ||
|
||
define Package/bird3/conffiles | ||
/etc/bird.conf | ||
/etc/bird4.conf | ||
/etc/bird6.conf | ||
endef | ||
|
||
define Package/bird3/install | ||
$(INSTALL_DIR) $(1)/usr/sbin | ||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bird $(1)/usr/sbin/ | ||
$(INSTALL_DIR) $(1)/etc | ||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/bird.conf.example $(1)/etc/bird.conf | ||
$(INSTALL_DIR) $(1)/etc/init.d | ||
$(INSTALL_BIN) ./files/bird.init $(1)/etc/init.d/bird | ||
endef | ||
|
||
define Package/bird3c/install | ||
$(INSTALL_DIR) $(1)/usr/sbin | ||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/birdc $(1)/usr/sbin/ | ||
endef | ||
|
||
define Package/bird3cl/install | ||
$(INSTALL_DIR) $(1)/usr/sbin | ||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/birdcl $(1)/usr/sbin/ | ||
endef | ||
|
||
$(eval $(call BuildPackage,bird3)) | ||
$(eval $(call BuildPackage,bird3c)) | ||
$(eval $(call BuildPackage,bird3cl)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh /etc/rc.common | ||
# Copyright (C) 2010-2017 OpenWrt.org | ||
|
||
USE_PROCD=1 | ||
START=70 | ||
STOP=10 | ||
|
||
BIRD_BIN="/usr/sbin/bird" | ||
BIRD_CONF="/etc/bird.conf" | ||
BIRD_PID_FILE="/var/run/bird.pid" | ||
|
||
start_service() { | ||
mkdir -p /var/run | ||
procd_open_instance | ||
procd_set_param command $BIRD_BIN -f -c $BIRD_CONF -P $BIRD_PID_FILE | ||
procd_set_param file "$BIRD_CONF" | ||
procd_set_param stdout 1 | ||
procd_set_param stderr 1 | ||
procd_set_param respawn | ||
procd_close_instance | ||
} | ||
|
||
reload_service() { | ||
procd_send_signal bird | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bird --version 2>&1 | grep "$PKG_VERSION" |