diff --git a/net/kadnode/Makefile b/net/kadnode/Makefile index 323e51c38..9154f5f81 100644 --- a/net/kadnode/Makefile +++ b/net/kadnode/Makefile @@ -4,17 +4,16 @@ # include $(TOPDIR)/rules.mk + PKG_NAME:=kadnode -PKG_VERSION:=2.0.2 +PKG_VERSION:=2.1.0 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/mwarning/KadNode.git -PKG_SOURCE_VERSION:=26dbc9436f8d2c68b899cd32e01bdbe1565294b2 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=67ba2ce03c3dd74b547885891391657aa9d6fae7c14558634776e1111e7cbe57 +PKG_BUILD_DIR:=$(BUILD_DIR)/KadNode-$(PKG_VERSION) +PKG_SOURCE:=v$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/mwarning/KadNode/archive/ +PKG_HASH:=6d8022c8958c14cefbe0adca75f4d1101a586b5f1f0d7aab64c92ae54d864d98 PKG_LICENSE:=MIT PKG_BUILD_PARALLEL:=1 @@ -80,7 +79,7 @@ define Package/kadnode/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/kadnode $(1)/usr/bin/ ifeq ($(CONFIG_KADNODE_ENABLE_CMD),y) - $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/kadnode-ctl $(1)/usr/bin/ + $(LN) /usr/bin/kadnode $(1)/usr/bin/kadnode-ctl endif $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) files/kadnode.init $(1)/etc/init.d/kadnode diff --git a/net/kadnode/files/kadnode.init b/net/kadnode/files/kadnode.init index 7dcd6be52..fb2ad509d 100755 --- a/net/kadnode/files/kadnode.init +++ b/net/kadnode/files/kadnode.init @@ -2,10 +2,17 @@ START=95 USE_PROCD=1 -KADNODE_BIN=/usr/bin/kadnode +PROG=/usr/bin/kadnode OPTS="" +boot() +{ + # Wait for the loopback interface to be ready + ubus -t 30 wait_for network.interface network.loopback 2>/dev/null + rc_procd start_service +} + xappend() { local name="$2" value="$1" OPTS="$OPTS--${name//_/-} ${value//'/\\'} @@ -56,14 +63,14 @@ start_instance() { append_opts_boolean "$cfg" dns_proxy_enable lpd_disable fwd_disable ipv4 ipv6 # Close stdin when cmd feature is present - if [ $($KADNODE_BIN --version | grep -c cmd) -eq 1 ]; then + if [ $($PROG --version | grep -c cmd) -eq 1 ]; then xappend "" "cmd_disable_stdin" fi echo "$OPTS" > $CONFIG_FILE procd_open_instance - procd_set_param command $KADNODE_BIN + procd_set_param command $PROG procd_set_param file $CONFIG_FILE procd_set_param stderr 1 procd_set_param stdout 1 diff --git a/net/kadnode/patches/0001-fix-type-of-returned-address-count.patch b/net/kadnode/patches/0001-fix-type-of-returned-address-count.patch deleted file mode 100644 index f8108b173..000000000 --- a/net/kadnode/patches/0001-fix-type-of-returned-address-count.patch +++ /dev/null @@ -1,46 +0,0 @@ -From a1f9e4e58dcdc7ea4e3b2bd3df110f10d23b437c Mon Sep 17 00:00:00 2001 -From: Moritz Warning -Date: Sun, 14 Jan 2018 21:47:24 +0100 -Subject: [PATCH] fix type of returned address count - ---- - src/ext-dns.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/ext-dns.c b/src/ext-dns.c -index 3394e33..89a2311 100644 ---- a/src/ext-dns.c -+++ b/src/ext-dns.c -@@ -470,9 +470,9 @@ static void setPointerRecord( struct ResourceRecord *rr, const char name[], cons - rr->rd_data.ptr_record.name = domain; - } - --static int dns_setup_msg( struct Message *msg, IP addrs[], size_t addrs_num, const char* hostname ) { -+static int dns_setup_msg( struct Message *msg, IP addrs[], int addrs_num, const char* hostname ) { - const char *qName; -- size_t i, c; -+ int i, c; - - // Header: leave most values intact for response - msg->qr = 1; // This is a response -@@ -606,7 +606,7 @@ static void proxy_forward_response( uint8_t *buffer, ssize_t buflen, uint16_t id - static void dns_handler( int rc, int sock ) { - struct Message msg; - IP clientaddr; -- size_t addrs_num; -+ int addrs_num; - IP addrs[MAX_ADDR_RECORDS]; - socklen_t addrlen_ret; - ssize_t buflen; -@@ -702,7 +702,7 @@ log_info("setup response"); - return; - } - -- log_debug( "DNS: Send back %lu addresses to: %s", -+ log_debug( "DNS: Send back %d addresses to: %s", - addrs_num, str_addr( &clientaddr ) - ); - } --- -2.15.1 -