Merge pull request #1418 from kernelkit/simplify-build

Simplify build
This commit is contained in:
Tobias Waldekranz
2026-02-27 08:33:46 +01:00
committed by GitHub
8 changed files with 28 additions and 10 deletions
+2 -4
View File
@@ -39,13 +39,11 @@ config BR2_PACKAGE_NETD_FRR_CONF
Provides full routing support (static routes, RIP, OSPF).
config BR2_PACKAGE_NETD_FRR
config BR2_PACKAGE_NETD_FRR_GRPC
bool "FRR gRPC"
depends on BR2_PACKAGE_FRR
select BR2_PACKAGE_PROTOBUF
select BR2_PACKAGE_GRPC
select BR2_PACKAGE_FRR_GRPC
select BR2_PACKAGE_HOST_PROTOBUF
select BR2_PACKAGE_HOST_GRPC
help
Enable FRR integration via gRPC northbound API.
Provides full routing support (static routes, RIP, OSPF).
+1 -1
View File
@@ -24,7 +24,7 @@ NETD_CONF_OPTS += --with-frr-conf
else ifeq ($(BR2_PACKAGE_NETD_FRR_VTYSH),y)
NETD_DEPENDENCIES += frr
NETD_CONF_OPTS += --with-frr-vtysh
else ifeq ($(BR2_PACKAGE_NETD_FRR),y)
else ifeq ($(BR2_PACKAGE_NETD_FRR_GRPC),y)
NETD_DEPENDENCIES += frr grpc host-grpc protobuf
NETD_CONF_ENV += \
PROTOC="$(HOST_DIR)/bin/protoc" \
@@ -101,6 +101,19 @@ define SKELETON_INIT_FINIT_SET_FRR
endef
endif
SKELETON_INIT_FINIT_POST_INSTALL_TARGET_HOOKS += SKELETON_INIT_FINIT_SET_FRR
ifeq ($(BR2_PACKAGE_FRR_GRPC),y)
define SKELETON_INIT_FINIT_SET_FRR_MGMTD_GRPC
cp $(SKELETON_INIT_FINIT_PKGDIR)/skeleton/etc/default/mgmtd $(TARGET_DIR)/etc/default/mgmtd
$(SED) 's/\(MGMTD_ARGS="[^"]*\)"/\1 -M grpc"/' $(TARGET_DIR)/etc/default/mgmtd
endef
else
define SKELETON_INIT_FINIT_SET_FRR_MGMTD_GRPC
cp $(SKELETON_INIT_FINIT_PKGDIR)/skeleton/etc/default/mgmtd $(TARGET_DIR)/etc/default/mgmtd
endef
endif
SKELETON_INIT_FINIT_POST_INSTALL_TARGET_HOOKS += SKELETON_INIT_FINIT_SET_FRR_MGMTD_GRPC
endif # BR2_PACKAGE_FRR
ifeq ($(BR2_PACKAGE_INADYN),y)
@@ -1 +1 @@
MGMTD_ARGS="-A 127.0.0.1 -u frr -g frr --log syslog --log-level err -M grpc"
MGMTD_ARGS="-A 127.0.0.1 -u frr -g frr --log syslog --log-level err"
+10 -3
View File
@@ -38,13 +38,20 @@ def parallel(*fns):
def until(fn, attempts=10, interval=1):
last_exc = None
for attempt in range(attempts):
result = fn()
try:
result = fn()
except Exception as e:
last_exc = e
result = False
if result:
return result
time.sleep(interval)
if last_exc:
raise last_exc
raise Exception("Expected condition did not materialize")
@@ -116,7 +123,7 @@ def curl(url, timeout=10, silent=False):
try:
with urllib.request.urlopen(url, timeout=timeout) as response:
return response.read().decode('utf-8', errors='replace')
except (urllib.error.URLError, ConnectionResetError, UnicodeEncodeError) as e:
except (urllib.error.URLError, ConnectionResetError, UnicodeEncodeError, TimeoutError) as e:
if not silent:
print(f"[WARN] curl: failed to fetch {url}: {e}")
return ""
return ""