netbird: update to version 0.24.2
authorOskari Rauta <oskari.rauta@gmail.com>
Sun, 19 Nov 2023 03:36:51 +0000 (05:36 +0200)
committerTianling Shen <cnsztl@immortalwrt.org>
Sun, 19 Nov 2023 06:39:50 +0000 (14:39 +0800)
Release notes: https://github.com/netbirdio/netbird/releases/tag/v0.24.2

Also fixes issue of not being able to build with musl (>1.2.4)

Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
(cherry picked from commit 7b3d033ab651dd11e0db5fb099d106c9e09a2dc6)

net/netbird/Makefile
net/netbird/files/netbird.init

index 729564d429034c57d4f58726c4b9014bdd275a6e..606f16c5121d9561cd4c70306d2dc4737812b2a8 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netbird
-PKG_VERSION:=0.23.9
+PKG_VERSION:=0.24.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/netbirdio/netbird/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=1b037f35d3e426d8cbeba17e4d89d12265cd7e6fbd7c975ce552293e468db35a
+PKG_HASH:=7fd90c6004c7fde6393bd618e106410e708f2d84f7884055acda6b016be42858
 
 PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
@@ -33,10 +33,10 @@ define Package/netbird
 endef
 
 define Package/netbird/description
-  NetBird is an open-source VPN management platform built on top of WireGuard® making it easy to create 
+  NetBird is an open-source VPN management platform built on top of WireGuard® making it easy to create
   secure private networks for your organization or home.
 
-  It requires zero configuration effort leaving behind the hassle of opening ports, complex firewall rules, VPN 
+  It requires zero configuration effort leaving behind the hassle of opening ports, complex firewall rules, VPN
   gateways, and so forth.
 endef
 
@@ -44,6 +44,12 @@ define Package/netbird/conffiles
 /etc/netbird/config.json
 endef
 
+# Workaround for musl 1.2.4 compability in mattn/go-sqlite3
+# https://github.com/mattn/go-sqlite3/issues/1164
+ifneq ($(CONFIG_USE_MUSL),)
+       TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
+endif
+
 define Package/netbird/install
        $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
        $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d
index b7ccd2d4b253e70b3c5a96a704ec6ba7d857e3e8..87427c4061c2041588d7cf16003944066e972971 100755 (executable)
@@ -1,11 +1,19 @@
 #!/bin/sh /etc/rc.common
 
+. /lib/netifd/netifd-proto.sh
+
 START=99
 STOP=10
 
 USE_PROCD=1
 
+service_triggers() {
+       procd_add_interface_trigger "interface.*" "wan" /etc/init.d/netbird restart
+}
+
 start_service() {
+       local device
+
        procd_open_instance
        procd_set_param command /usr/bin/netbird
        procd_append_param command service run