Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 May 2018 20:09:21 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r470325 - in head/dns: . kadnode kadnode/files
Message-ID:  <201805182009.w4IK9LbM075932@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Fri May 18 20:09:20 2018
New Revision: 470325
URL: https://svnweb.freebsd.org/changeset/ports/470325

Log:
  New port: dns/kadnode
  
  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.
  
  WWW: https://github.com/mwarning/KadNode
  
  PR:		225924
  Submitted by:	moritzwarning@web.de

Added:
  head/dns/kadnode/
  head/dns/kadnode/Makefile   (contents, props changed)
  head/dns/kadnode/distinfo   (contents, props changed)
  head/dns/kadnode/files/
  head/dns/kadnode/files/kadnode.conf.in   (contents, props changed)
  head/dns/kadnode/files/kadnode.in   (contents, props changed)
  head/dns/kadnode/pkg-descr   (contents, props changed)
  head/dns/kadnode/pkg-message   (contents, props changed)
  head/dns/kadnode/pkg-plist   (contents, props changed)
Modified:
  head/dns/Makefile

Modified: head/dns/Makefile
==============================================================================
--- head/dns/Makefile	Fri May 18 19:51:28 2018	(r470324)
+++ head/dns/Makefile	Fri May 18 20:09:20 2018	(r470325)
@@ -87,6 +87,7 @@
     SUBDIR += inadyn-mt
     SUBDIR += ipcheck
     SUBDIR += ironsides
+    SUBDIR += kadnode
     SUBDIR += kf5-kdnssd
     SUBDIR += knot-resolver
     SUBDIR += knot1

Added: head/dns/kadnode/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/kadnode/Makefile	Fri May 18 20:09:20 2018	(r470325)
@@ -0,0 +1,74 @@
+# Created by: Moritz Warning <moritzwarning@web.de>
+# $FreeBSD$
+
+PORTNAME=	kadnode
+DISTVERSIONPREFIX=	v
+DISTVERSION=	2.2.1
+PORTREVISION=	0
+CATEGORIES=	dns
+
+MAINTAINER=	moritzwarning@web.de
+COMMENT=	P2P name resolution daemon
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		gmake
+USE_GITHUB=	yes
+GH_ACCOUNT=	mwarning
+GH_PROJECT=	KadNode
+USE_RC_SUBR=	kadnode
+
+MAKE_ENV=	FEATURES="${FEATURES}"
+SUB_FILES=	kadnode.conf
+
+OPTIONS_DEFINE=	AUTH CMD DEBUG DNS LPD NATPMP NSS UPNP
+OPTIONS_DEFAULT=	AUTH CMD LPD NSS
+OPTIONS_SUB=	yes
+
+AUTH_DESC=	Authorization support based on mbedtls
+CMD_DESC=	Command line control tool kadnode-ctl
+DEBUG_DESC=	Build with debug messages and symbols
+DNS_DESC=	Include local DNS interface
+LPD_DESC=	Local peer discovery
+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/mbedtls
+AUTH_VARS=		FEATURES+="bob tls"
+
+CMD_VARS=		FEATURES+="cmd"
+
+DEBUG_VARS=		FEATURES+="debug"
+
+DNS_VARS=		FEATURES+="dns"
+
+LPD_VARS=		FEATURES+="lpd"
+
+NATPMP_LIB_DEPENDS=	libnatpmp.so:net/libnatpmp
+NATPMP_VARS=		FEATURES+="natpmp"
+
+NSS_VARS=		FEATURES+="nss"
+
+UPNP_LIB_DEPENDS=	libminiupnpc.so:net/miniupnpc
+UPNP_VARS=		FEATURES+="upnp"
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/build/kadnode ${STAGEDIR}${PREFIX}/bin/
+	${RLN} ${STAGEDIR}${PREFIX}/bin/kadnode ${STAGEDIR}${PREFIX}/bin/kadnode-ctl
+	${MKDIR} ${STAGEDIR}${ETCDIR}
+	${INSTALL_DATA} ${WRKSRC}/misc/peers.txt \
+		${STAGEDIR}${ETCDIR}/peers.txt.sample
+	${INSTALL_DATA} ${WRKDIR}/kadnode.conf \
+		${STAGEDIR}${ETCDIR}/kadnode.conf.sample
+	${INSTALL_MAN} ${WRKSRC}/misc/manpage \
+		${STAGEDIR}${MANPREFIX}/man/man1/kadnode.1
+
+do-install-NSS-on:
+	${INSTALL_LIB} ${WRKSRC}/build/libnss_kadnode.so.2 \
+		${STAGEDIR}${PREFIX}/lib/nss_kadnode.so.1
+	${RLN} ${STAGEDIR}${PREFIX}/lib/nss_kadnode.so.1 \
+		${STAGEDIR}${PREFIX}/lib/nss_kadnode.so
+
+.include <bsd.port.mk>

Added: head/dns/kadnode/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/kadnode/distinfo	Fri May 18 20:09:20 2018	(r470325)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1526664594
+SHA256 (mwarning-KadNode-v2.2.1_GH0.tar.gz) = 517f99145a7e64510e211d166ccda8b344dcc29e3ccdddb82d533c08321bf412
+SIZE (mwarning-KadNode-v2.2.1_GH0.tar.gz) = 449450

Added: head/dns/kadnode/files/kadnode.conf.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/kadnode/files/kadnode.conf.in	Fri May 18 20:09:20 2018	(r470325)
@@ -0,0 +1,29 @@
+# Load peers at startup from this file and save peers to this file at shutdown
+--peerfile %%PREFIX%%/etc/kadnode/peers.txt
+
+# For authentication via TLS, x509 certificates need to be provided.
+# The server needs a tuple of the certificate file and private key file:
+# --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.
+# Try various locations:
+--tls-client-cert %%LOCALBASE%%/share/certs
+
+# 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.
+
+# Enable DNS proxy behavior. Reads /etc/resolv.conf by default.
+# --dns-proxy-enable
+#
+# Or specify a DNS server by IP address:
+# --dns-proxy-server <IP-address>
+
+# Disable UPnP/NAT-PMP support
+# --disable-forwarding
+
+# Disable multicast peer discovery
+# --lpd-disable

Added: head/dns/kadnode/files/kadnode.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/kadnode/files/kadnode.in	Fri May 18 20:09:20 2018	(r470325)
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# PROVIDE: kadnode
+# REQUIRE: SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name=kadnode
+rcvar=kadnode_enable
+
+command="%%PREFIX%%/bin/kadnode"
+command_args="--config %%PREFIX%%/etc/kadnode/kadnode.conf --pidfile $pidfile --daemon"
+pidfile="/var/run/kadnode.pid"
+required_files="%%PREFIX%%/etc/kadnode/kadnode.conf"
+
+load_rc_config $name
+: ${kadnode_enable:=yes}
+run_rc_command "$1"

Added: head/dns/kadnode/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/kadnode/pkg-descr	Fri May 18 20:09:20 2018	(r470325)
@@ -0,0 +1,5 @@
+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.
+
+WWW: https://github.com/mwarning/KadNode

Added: head/dns/kadnode/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/kadnode/pkg-message	Fri May 18 20:09:20 2018	(r470325)
@@ -0,0 +1,6 @@
+In order to resolve domains using kadnode all over the system, add this
+line to your /etc/nsswitch.conf:
+
+hosts: kadnode dns
+
+If the hosts line already exists, just add kadnode before the dns entry.

Added: head/dns/kadnode/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/dns/kadnode/pkg-plist	Fri May 18 20:09:20 2018	(r470325)
@@ -0,0 +1,7 @@
+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
+man/man1/kadnode.1.gz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805182009.w4IK9LbM075932>