From owner-freebsd-ports-bugs@freebsd.org Thu May 10 15:30:23 2018 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1072FCDACE for ; Thu, 10 May 2018 15:30:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 0189F74732 for ; Thu, 10 May 2018 15:30:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id B6AD0FCDAC8; Thu, 10 May 2018 15:30:22 +0000 (UTC) Delivered-To: ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92E1EFCDAC6 for ; Thu, 10 May 2018 15:30:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B97574725 for ; Thu, 10 May 2018 15:30:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 36BCF1F6AA for ; Thu, 10 May 2018 15:30:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w4AFULvX052084 for ; Thu, 10 May 2018 15:30:21 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w4AFULF7052083 for ports-bugs@FreeBSD.org; Thu, 10 May 2018 15:30:21 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 225924] [NEW PORT] dns/kadnode: P2P DNS resolver Date: Thu, 10 May 2018 15:30:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: tobik@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 15:30:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225924 Tobias Kortkamp changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tobik@freebsd.org --- Comment #1 from Tobias Kortkamp --- Hi, thanks for your submission. Unfortunately it's not in a committable state right now. Some comments below. In general the order of variables is wrong. Please see [1] for how to order them. XPORTNAME=3D kadnode XPORTVERSION=3D 2.2.0 XPORTREVISION=3D 1 We start port revisions at zero, so either remove PORTREVISION or set it to 0. XCATEGORIES=3D dns XDISTDIR=3D ${PWD} This doesn't make sense. Please do not set DISTDIR. It's not a variable that ports should overwrite. The ports tree could be mounted read-only and then the build would fail. It's always mounted read-only in Poudriere jails which is what we use to build the packages on pkg.FreeBSD.o= rg. XMAINTAINER=3D moritzwarning@web.de XCOMMENT=3D P2P name resolution daemon XLICENSE=3D MIT Add LICENSE_FILE if there is one in the tarball. XUSES=3D gmake XWRKSRC=3D ${WRKDIR}/KadNode-${PORTVERSION} XMASTER_SITES=3D https://github.com/mwarning/KadNode/archive/ XDISTNAME=3D v${PORTVERSION} Please look into USE_GITHUB in the porter's handbook. XCATEGORIES=3D dns Already set above. XOPTIONS_DEFINE=3D AUTH CMD DEBUG DNS LPD NATPMP NSS UPNP XAUTH_DESC=3D Authorization support based on mbedtls. XCMD_DESC=3D Command line control tool kadnode-ctl. XDEBUG_DESC=3D Build with debug messages and symbols. DEBUG already has a description in bsd.options.desc.mk so please remove this one. XDNS_DESC=3D Include local DNS interface. XLPD_DESC=3D Local peer discovery. XNATPMP_DESC=3D NAT-PMP support. Enables remote port forwarding on the ro= uter. XNSS_DESC=3D Name Service Switch support to intercept host queries (/etc/nsswitch.conf). XUPNP_DESC=3D UPnP support. Enable remote port forwarding on the router. X XOPTIONS_DEFAULT=3D AUTH CMD LPD NSS X X.include X X.if ${PORT_OPTIONS:MAUTH} XFEATURES+=3Dbob tls XDEPENDS+=3D ${PORTSDIR}/security/mbedtls X.endif Please look into options helpers. Also I'm not sure what DEPENDS does? X X.if ${PORT_OPTIONS:MCMD} XFEATURES+=3Dcmd X.endif X X.if ${PORT_OPTIONS:MDEBUG} XFEATURES+=3Ddebug X.endif X X.if ${PORT_OPTIONS:MDNS} XFEATURES+=3Ddns X.endif X X.if ${PORT_OPTIONS:MLPD} XFEATURES+=3Dlpd X.endif X X.if ${PORT_OPTIONS:MNATPMP} XFEATURES+=3Dnatpmp XLIB_DEPENDS+=3D libnatpmp.so:${PORTSDIR}/net/libnatpmp X.endif Please remove the ${PORTSDIR}/ prefix from dependency specs. It hasn't been required in a long time now. If you set DEVELOPER=3Dyes in /etc/make.conf during port development then you'll get warnings about things like this. X X.if ${PORT_OPTIONS:MNSS} XFEATURES+=3Dnss X.endif X X.if ${PORT_OPTIONS:MUPNP} XFEATURES+=3Dupnp XLIB_DEPENDS+=3D libminiupnpc.so:${PORTSDIR}/net/miniupnpc X.endif X XMAKE_ENV+=3D FEATURES=3D"${FEATURES}" X Xdo-install: X ${MKDIR} ${STAGEDIR}/usr/bin X ${INSTALL_PROGRAM} ${WRKSRC}/build/kadnode ${STAGEDIR}${PREFIX}/bin/ X ${LN} -sf kadnode ${STAGEDIR}${PREFIX}/bin/kadnode-ctl X X ${INSTALL_LIB} ${WRKSRC}/build/libnss_kadnode.so.2 ${STAGEDIR}${PREFIX}/lib/nss_kadnode.so X ${LN} -sf ${STAGEDIR}${PREFIX}/lib/nss_kadnode.so ${STAGEDIR}${PREFIX}/lib/nss_kadnode.so.1 Use ${RLN} instead. This points into the non-existing STAGEDIR (after make clean) otherwise. X X ${MKDIR} ${STAGEDIR}/etc/kadnode X ${INSTALL_DATA} ${WRKSRC}/misc/peers.txt ${STAGEDIR}/etc/kadnode/ X ${INSTALL_DATA} ${WRKSRC}/misc/kadnode.conf ${STAGEDIR}/etc/kadnode/ The config files need to go into ${STAGEDIR}${ETCDIR}. Putting files into /etc from the base system is off-limits for ports. X ${MKDIR} ${STAGEDIR}/etc/rc.d/ X ${INSTALL_SCRIPT} ${WRKSRC}/freebsd/files/kadnode.init ${STAGEDIR}/etc/rc.d/kadnode rc.d scripts needs to go into ${STAGEDIR}${PREFIX}/etc/rc.d. Look into USE_RC_SUBR for this. echo x - kadnode/pkg-descr sed 's/^X//' >kadnode/pkg-descr << '3923b8a530675a9c5ca9607acba3d1c2' XKadNode is a small decentralized DNS resolver that can use existing public= key infrastructures. XIt utilizes the BitTorrent P2P network and mbedtls for TLS/crypto support. X XWWW: https://github.com/mwarning/KadNode Please wrap this to 72 columns. 3923b8a530675a9c5ca9607acba3d1c2 echo x - kadnode/pkg-plist sed 's/^X//' >kadnode/pkg-plist << 'ee61f23e7c6fbbf7d4eed6f11c8b046c' Xbin/kadnode Xbin/kadnode-ctl Xlib/nss_kadnode.so Xlib/nss_kadnode.so.1 Xman/man1/kadnode.1.gz X/etc/rc.d/kadnode X/etc/kadnode/kadnode.conf X/etc/kadnode/peers.txt X@dir /etc/kadnode ee61f23e7c6fbbf7d4eed6f11c8b046c echo c - kadnode/files mkdir -p kadnode/files > /dev/null 2>&1 echo x - kadnode/files/kadnode.init sed 's/^X//' >kadnode/files/kadnode.init << '0ee9ae9bd1c603ce26dc9c2f7241d3= 06' X#!/bin/sh X X# PROVIDE: kadnode X# REQUIRE: SERVERS X# BEFORE: DAEMON X# KEYWORD: shutdown X X. /etc/rc.subr X Xname=3Dkadnode Xrcvar=3Dkadnode_enable X Xpidfile=3D"/var/run/${name}.pid" X Xcommand=3D"/usr/local/bin/${name}" Xkadnode_flags=3D"--config /etc/kadnode/kadnode.conf --pidfile $pidfile --d= aemon" X Xrequired_files=3D"/etc/kadnode/${name}.conf" X X#add/remove kadnode from /etc/nsswitch.conf Xstart_precmd=3D"kadnode_precmd" Xstop_postcmd=3D"kadnode_postcmd" X Xkadnode_precmd() { X sed -i -e '/kadnode/!s/^\(hosts:.*\)dns\(.*\)/\1kadnode dns\2/' /etc/nsswitch.conf X} X Xkadnode_postcmd() { X sed -i -e 's/^\(hosts:.*\)kadnode \(.*\)/\1\2/' /etc/nsswitch.conf X} This is not good. rc.d scripts should not modify system files. Leave it for the user to setup. Maybe write a pkg-message to explain how. [1] https://www.freebsd.org/doc/en/books/porters-handbook/porting-order.html --=20 You are receiving this mail because: You are the assignee for the bug.=