From nobody Fri Jan 17 12:37:29 2025
X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YZK4p42Rlz5kw7Y;
	Fri, 17 Jan 2025 12:37:30 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4YZK4n6vrrz3fYR;
	Fri, 17 Jan 2025 12:37:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1737117450;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=osRy2eqXLpC60kV1R8L+ZPWxPqz6h46Xo/3Ug6wh8p4=;
	b=saeJuSM7J4aRxgcW4tcgLoINjLCnz4Tq01ws5gunY7p5yAbjLydAGPUrJEmTsJ53Hv0j81
	MrUwJ9GqkwE2MgEJN/OxxOJo0SFCM3EqGBR+5LxfspoIiDrvYwJ5pc9m2TTe7Db5GU0kXt
	LtEV+1sHGZGtGjyR+kj6XvrjGnu+iioLz4NVKa1Kj37bE64QqD7OGrVkgFbB22kTaRgHkW
	gbqScUKkz7ww6UJJRIKyOuTF4D6aabyhuY/1k9rsQxfHnKV9kwQSSbxHYMCrn2YIG8+CVh
	ifWUCkB12B8bzunA4QCqRXe7yL6+mlAY9y3/W61sK6o2aDk1agoyR9oLgriuGw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1737117450;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=osRy2eqXLpC60kV1R8L+ZPWxPqz6h46Xo/3Ug6wh8p4=;
	b=Ku0xVxbx1KGyip4XOWE3hDdiHat4viNGcq6MmXXxX0N1WTOPMbl/uk6lmvKAzc70T3+DHA
	XrmI6OjgXH+aiCejyAkuZtfDmy/MGwlMM+bN5+dVYveLHN0X1t+hexc0FyXhoUuMRLRveL
	+nOonQt18P1MPlDC0iZcFpMsZde3K7jvsROOhbgV0vv7jQpYJazPtqjFYAO6BaCvREjYes
	bMqKdvD+se6fY8cdgrfUuoFLFQeyOklcoKVTPpKFvaXLD5AavZsBSPO+r6tompAPT809Ib
	bkxe9MlvOKgoR9WPcfrO1vFNuIXA67goLBcqkwUJ3ZklHmJ1wmKFyJbJpIoZCA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737117450; a=rsa-sha256; cv=none;
	b=KUxxk3uCSC/pW7zMG/+epDvTb4d0/ZBgINNZ3Ax5JDQ0XvOvuyG/icisGR5/JaAF1clm8I
	RLfgRnFbNyYtZcIq871Fxtn/T3XxEofdpW0zk8uIu+wPhrAExNA0Rv4GUblygcUE7TTv/e
	kwkPCbwSk0gwmw8yUsna1/xaFbDiNsv6zitYZTNgh+JQsDyMemdFz3nSZQF4k5K8k08M4y
	eX2s+TOoTk7GWaxSMSBKWeBUEce1fsbksvRPK3d5mpLjB/lp9a+1guENfUc5+QU0KMkp9h
	pbSclRB9tRdZimZvr+ca+HevM+FlsmPfJmt2KNt10L1I3y9XdwuHcog9B8Q0cw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YZK4n6Jn0z2q3;
	Fri, 17 Jan 2025 12:37:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50HCbTou073041;
	Fri, 17 Jan 2025 12:37:29 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50HCbTNW073038;
	Fri, 17 Jan 2025 12:37:29 GMT
	(envelope-from git)
Date: Fri, 17 Jan 2025 12:37:29 GMT
Message-Id: <202501171237.50HCbTNW073038@gitrepo.freebsd.org>
To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org,
        dev-commits-ports-main@FreeBSD.org
From: Robert Clausecker <fuz@FreeBSD.org>
Subject: git: c19a49d41d8b - main - dns/kadnode: update 2.3.0 ->
  2.4.1, un-deprecate
List-Id: Commit messages for all branches of the ports repository <dev-commits-ports-all.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all
List-Help: <mailto:dev-commits-ports-all+help@freebsd.org>
List-Post: <mailto:dev-commits-ports-all@freebsd.org>
List-Subscribe: <mailto:dev-commits-ports-all+subscribe@freebsd.org>
List-Unsubscribe: <mailto:dev-commits-ports-all+unsubscribe@freebsd.org>
X-BeenThere: dev-commits-ports-all@freebsd.org
Sender: owner-dev-commits-ports-all@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: fuz
X-Git-Repository: ports
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: c19a49d41d8b1227e7d4663e9ddc9a01adebb646
Auto-Submitted: auto-generated

The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c19a49d41d8b1227e7d4663e9ddc9a01adebb646

commit c19a49d41d8b1227e7d4663e9ddc9a01adebb646
Author:     Älven <alster@vinterdalen.se>
AuthorDate: 2025-01-09 10:15:35 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-01-17 12:34:54 +0000

    dns/kadnode: update 2.3.0 -> 2.4.1, un-deprecate
    
    Upstream is alive and active, has 1-st class FreeBSD support.
    They had switched to mbedtls3 since version 2.4.0.
    Using their ready-to-use port with minor changes:
    
    * Fix files/kadnode.in mode (0755 -> 0644)
    * Improve pkg-descr
    * Some linting
    
    PR:             283954
    Reviewed by:    diizzy
    Approved by:    moritzwarning@web.de (maintainer)
---
 dns/kadnode/Makefile                   | 23 +++++++----------------
 dns/kadnode/distinfo                   |  6 +++---
 dns/kadnode/files/kadnode.conf.in      |  8 ++++----
 dns/kadnode/files/kadnode.in           |  4 +++-
 dns/kadnode/files/patch-src_peerfile.c | 10 ----------
 dns/kadnode/files/patch-src_upnp.c     | 16 ----------------
 dns/kadnode/pkg-descr                  | 33 ++++++++++++++++++++++++++++++---
 dns/kadnode/pkg-message                |  8 +-------
 dns/kadnode/pkg-plist                  |  1 -
 9 files changed, 48 insertions(+), 61 deletions(-)

diff --git a/dns/kadnode/Makefile b/dns/kadnode/Makefile
index 3c221619e0da..85de7b2e6d72 100644
--- a/dns/kadnode/Makefile
+++ b/dns/kadnode/Makefile
@@ -1,18 +1,16 @@
 PORTNAME=	kadnode
 DISTVERSIONPREFIX=	v
-DISTVERSION=	2.3.0
-PORTREVISION=	5
+DISTVERSION=	2.4.1
 CATEGORIES=	dns
 
 MAINTAINER=	moritzwarning@web.de
 COMMENT=	P2P name resolution daemon
-WWW=		https://github.com/mwarning/KadNode
+WWW=		https://github.com/mwarning/KadNode/
 
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
 USES=		cpe gmake
-CPE_VENDOR=	${PORTNAME}_project
 USE_GITHUB=	yes
 GH_ACCOUNT=	mwarning
 GH_PROJECT=	KadNode
@@ -34,7 +32,8 @@ NATPMP_DESC=	NAT-PMP support (remote port forwarding on the router)
 NSS_DESC=	Name Service Switch support to intercept host queries
 UPNP_DESC=	UPnP support (remote port forwarding on the router)
 
-AUTH_LIB_DEPENDS=	libmbedtls.so:security/mbedtls2
+AUTH_LIB_DEPENDS=	libmbedtls.so:security/mbedtls3
+AUTH_USES=		localbase:ldflags
 AUTH_VARS=		FEATURES+="bob tls"
 
 CMD_VARS=		FEATURES+="cmd"
@@ -51,6 +50,7 @@ NATPMP_VARS=		FEATURES+="natpmp"
 NSS_VARS=		FEATURES+="nss"
 
 UPNP_LIB_DEPENDS=	libminiupnpc.so:net/miniupnpc
+UPNP_USES=		localbase:ldflags
 UPNP_VARS=		FEATURES+="upnp"
 
 do-install:
@@ -62,19 +62,10 @@ do-install:
 	${INSTALL_DATA} ${WRKDIR}/kadnode.conf \
 		${STAGEDIR}${ETCDIR}/kadnode.conf.sample
 	${INSTALL_MAN} ${WRKSRC}/misc/manpage \
-		${STAGEDIR}${PREFIX}/share/man/man1/kadnode.1
+		${STAGEDIR}${MANDIRS}/man1/kadnode.1
 
 do-install-NSS-on:
-	${INSTALL_LIB} ${WRKSRC}/build/libnss_kadnode-2.0.so \
+	${INSTALL_LIB} ${WRKSRC}/build/libnss_kadnode.so \
 		${STAGEDIR}${PREFIX}/lib/nss_kadnode.so.1
-	${RLN} ${STAGEDIR}${PREFIX}/lib/nss_kadnode.so.1 \
-		${STAGEDIR}${PREFIX}/lib/nss_kadnode.so
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MAUTH}
-DEPRECATED=	Depends on expired security/mbedtls2
-EXPIRATION_DATE=2025-03-31
-.endif
 
 .include <bsd.port.mk>
diff --git a/dns/kadnode/distinfo b/dns/kadnode/distinfo
index 0564288d0229..bfb6e6894a6d 100644
--- a/dns/kadnode/distinfo
+++ b/dns/kadnode/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1581337724
-SHA256 (mwarning-KadNode-v2.3.0_GH0.tar.gz) = abb2ca66fb525fab53157d5486bbb43e3a522a4bdc9280a3dcb8cb403ee08583
-SIZE (mwarning-KadNode-v2.3.0_GH0.tar.gz) = 450082
+TIMESTAMP = 1736416439
+SHA256 (mwarning-KadNode-v2.4.1_GH0.tar.gz) = 748c8917134ad9c127f05a32369aa5726482c9de98d71ef5e722b2a9d588a5e9
+SIZE (mwarning-KadNode-v2.4.1_GH0.tar.gz) = 464380
diff --git a/dns/kadnode/files/kadnode.conf.in b/dns/kadnode/files/kadnode.conf.in
index d5eed3d68489..42768121c485 100644
--- a/dns/kadnode/files/kadnode.conf.in
+++ b/dns/kadnode/files/kadnode.conf.in
@@ -6,15 +6,15 @@
 # --tls-server-cert mydomain.crt,mydomain.key
 # The domain in the Common Name field of the certificate will be announced.
 #
-# For domain lookup, we need to provide appropiate CA certificates.
+# For domain lookup, we need to provide appropriate CA certificates.
 # Try various locations:
---tls-client-cert %%LOCALBASE%%/share/certs
+--tls-client-cert /usr/share/certs/trusted
 
 # As an alternative, create a secret/public key via 'kadnode --bob-create-key'
 # and load the secret keys as PEM file:
 # --bob-load-key <secret-key-pem-file>
 #
-# Other nodes can use <public-key-hex>.p2p in the browser to resolve the node.
+# Other nodes can use <public-key>.p2p in the browser to resolve the node.
 
 # Enable DNS proxy behavior. Reads /etc/resolv.conf by default.
 # --dns-proxy-enable
@@ -23,7 +23,7 @@
 # --dns-proxy-server <IP-address>
 
 # Disable UPnP/NAT-PMP support
-# --disable-forwarding
+# --fwd-disable
 
 # Disable multicast peer discovery
 # --lpd-disable
diff --git a/dns/kadnode/files/kadnode.in b/dns/kadnode/files/kadnode.in
index 4fcb15744bdd..ca900cb5e0c0 100644
--- a/dns/kadnode/files/kadnode.in
+++ b/dns/kadnode/files/kadnode.in
@@ -12,8 +12,10 @@ rcvar=kadnode_enable
 
 pidfile="/var/run/kadnode.pid"
 required_files="%%PREFIX%%/etc/kadnode/kadnode.conf"
+configfile="%%PREFIX%%/etc/kadnode/kadnode.conf"
 command="%%PREFIX%%/bin/kadnode"
-command_args="--config %%PREFIX%%/etc/kadnode/kadnode.conf --pidfile $pidfile --daemon"
+
+command_args="--config $configfile --pidfile $pidfile --daemon"
 
 load_rc_config $name
 : ${kadnode_enable:=yes}
diff --git a/dns/kadnode/files/patch-src_peerfile.c b/dns/kadnode/files/patch-src_peerfile.c
deleted file mode 100644
index fbba78625216..000000000000
--- a/dns/kadnode/files/patch-src_peerfile.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/peerfile.c.orig	2020-02-09 21:48:57 UTC
-+++ src/peerfile.c
-@@ -4,6 +4,7 @@
- #include <string.h>
- #include <errno.h>
- #include <netdb.h>
-+#include <sys/socket.h>
- 
- #include "main.h"
- #include "conf.h"
diff --git a/dns/kadnode/files/patch-src_upnp.c b/dns/kadnode/files/patch-src_upnp.c
deleted file mode 100644
index f23f8487aa04..000000000000
--- a/dns/kadnode/files/patch-src_upnp.c
+++ /dev/null
@@ -1,16 +0,0 @@
---- src/upnp.c.orig	2020-02-09 21:48:57 UTC
-+++ src/upnp.c
-@@ -134,8 +134,13 @@ int upnp_handler(struct upnp_handle_t *handle, uint16_
- 			handle->retry = now + (10 * 60);
- 			handle->state = UPNP_STATE_DISCOVER_GATEWAY;
- 			return PF_RETRY;
-+#if (MINIUPNPC_API_VERSION >= 18)
- 		} else if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data,
-+				handle->addr, sizeof(handle->addr), NULL, 0) == 1) {
-+#else
-+		} else if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data,
- 				handle->addr, sizeof(handle->addr)) == 1) {
-+#endif                  
- 			freeUPNPDevlist(devlist);
- 			log_info("UPnP: Found gateway device \"%s\".", handle->urls.controlURL);
- 			handle->state = UPNP_STATE_GET_PORTMAPPING;
diff --git a/dns/kadnode/pkg-descr b/dns/kadnode/pkg-descr
index c04528edeb36..6262a4f5cf4a 100644
--- a/dns/kadnode/pkg-descr
+++ b/dns/kadnode/pkg-descr
@@ -1,3 +1,30 @@
-KadNode is a small decentralized DNS resolver that can use existing
-public key infrastructures. It utilizes the BitTorrent P2P network
-and mbedtls for TLS/crypto support.
+KadNode finds the IP address of other instances on the Internet or local
+network. It is used like DNS, but is based on the decentralized BitTorrent
+network.
+
+KadNode intercepts .p2p domain queries on the systems level and resolves them
+using a decentralized Kademlia DHT network. Additionally, TLS authentication can
+be used to make sure the correct IP address was found. If successful, the IP
+address is passed to the application making the request.
+
+Features:
+
+* Support for two kinds of domains:
+**  public key domains as <public-key>.p2p
+***   No need to exchange any further keys/certificates
+***   Uses secp256r1 ECC key pairs
+**  named domains like yourdomain.com.p2p
+***   Needs pre-shared certificates (self-signed root certificates or e.g.
+      Let's Encrypt)
+***   Uses TLS session handshake for authentication
+* IPv4/IPv6 support
+* UPnP/NAT-PMP support
+* Local peer discovery
+* Small size / ~100KB depending on features / ~50KB compressed
+* Command line control program
+* NSS support through /etc/nsswitch.conf
+* DNS server interface and DNS proxy
+**  Handles A (IPv4 address),AAAA (IPv6), and SRV requests
+* Packages for ArchLinux, Debian, FreeBSD, MacOSX, OpenWrt, Windows
+* Peer file import/export on startup/shutdown and every 24h
+* Uses sha256 hash method
diff --git a/dns/kadnode/pkg-message b/dns/kadnode/pkg-message
index 617527a20ba8..0bb4c19c9c2d 100644
--- a/dns/kadnode/pkg-message
+++ b/dns/kadnode/pkg-message
@@ -1,12 +1,6 @@
-[
-{ type: install
-  message: <<EOM
 In order to resolve domains using kadnode all over the system, add this
 line to your /etc/nsswitch.conf:
 
-hosts: kadnode dns
+hosts: files kadnode dns
 
 If the hosts line already exists, just add kadnode before the dns entry.
-EOM
-}
-]
diff --git a/dns/kadnode/pkg-plist b/dns/kadnode/pkg-plist
index 9fe10135e07b..d099acc21ef7 100644
--- a/dns/kadnode/pkg-plist
+++ b/dns/kadnode/pkg-plist
@@ -2,6 +2,5 @@ bin/kadnode
 bin/kadnode-ctl
 @sample %%ETCDIR%%/kadnode.conf.sample
 @sample %%ETCDIR%%/peers.txt.sample
-%%NSS%%lib/nss_kadnode.so
 %%NSS%%lib/nss_kadnode.so.1
 share/man/man1/kadnode.1.gz