Skip to content

Commit 4522d9f

Browse files
committed
package/netd: rename NETD_FRR to NETD_FRR_GRPC, select FRR_GRPC
Rename BR2_PACKAGE_NETD_FRR to BR2_PACKAGE_NETD_FRR_GRPC to match the naming convention of the other FRR backends (VTYSH, CONF) and make the intent self-evident. Have the gRPC backend select BR2_PACKAGE_FRR_GRPC so FRR is built with gRPC support when — and only when — this backend is chosen. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent c559b8f commit 4522d9f

7 files changed

Lines changed: 18 additions & 7 deletions

File tree

buildroot

package/netd/Config.in

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,11 @@ config BR2_PACKAGE_NETD_FRR_CONF
3939

4040
Provides full routing support (static routes, RIP, OSPF).
4141

42-
config BR2_PACKAGE_NETD_FRR
42+
config BR2_PACKAGE_NETD_FRR_GRPC
4343
bool "FRR gRPC"
4444
depends on BR2_PACKAGE_FRR
45-
select BR2_PACKAGE_PROTOBUF
46-
select BR2_PACKAGE_GRPC
45+
select BR2_PACKAGE_FRR_GRPC
4746
select BR2_PACKAGE_HOST_PROTOBUF
48-
select BR2_PACKAGE_HOST_GRPC
4947
help
5048
Enable FRR integration via gRPC northbound API.
5149
Provides full routing support (static routes, RIP, OSPF).

package/netd/netd.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ NETD_CONF_OPTS += --with-frr-conf
2424
else ifeq ($(BR2_PACKAGE_NETD_FRR_VTYSH),y)
2525
NETD_DEPENDENCIES += frr
2626
NETD_CONF_OPTS += --with-frr-vtysh
27-
else ifeq ($(BR2_PACKAGE_NETD_FRR),y)
27+
else ifeq ($(BR2_PACKAGE_NETD_FRR_GRPC),y)
2828
NETD_DEPENDENCIES += frr grpc host-grpc protobuf
2929
NETD_CONF_ENV += \
3030
PROTOC="$(HOST_DIR)/bin/protoc" \

package/skeleton-init-finit/skeleton-init-finit.mk

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,19 @@ define SKELETON_INIT_FINIT_SET_FRR
101101
endef
102102
endif
103103
SKELETON_INIT_FINIT_POST_INSTALL_TARGET_HOOKS += SKELETON_INIT_FINIT_SET_FRR
104+
105+
ifeq ($(BR2_PACKAGE_FRR_GRPC),y)
106+
define SKELETON_INIT_FINIT_SET_FRR_MGMTD_GRPC
107+
cp $(SKELETON_INIT_FINIT_PKGDIR)/skeleton/etc/default/mgmtd $(TARGET_DIR)/etc/default/mgmtd
108+
$(SED) 's/\(MGMTD_ARGS="[^"]*\)"/\1 -M grpc"/' $(TARGET_DIR)/etc/default/mgmtd
109+
endef
110+
else
111+
define SKELETON_INIT_FINIT_SET_FRR_MGMTD_GRPC
112+
cp $(SKELETON_INIT_FINIT_PKGDIR)/skeleton/etc/default/mgmtd $(TARGET_DIR)/etc/default/mgmtd
113+
endef
114+
endif
115+
SKELETON_INIT_FINIT_POST_INSTALL_TARGET_HOOKS += SKELETON_INIT_FINIT_SET_FRR_MGMTD_GRPC
116+
104117
endif # BR2_PACKAGE_FRR
105118

106119
ifeq ($(BR2_PACKAGE_INADYN),y)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
MGMTD_ARGS="-A 127.0.0.1 -u frr -g frr --log syslog --log-level err -M grpc"
1+
MGMTD_ARGS="-A 127.0.0.1 -u frr -g frr --log syslog --log-level err"
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)