Date: Thu, 10 May 2018 15:30:16 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 225924] [NEW PORT] dns/kadnode: P2P DNS resolver Message-ID: <bug-225924-7788-g8vGVIn6Pv@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-225924-7788@https.bugs.freebsd.org/bugzilla/> References: <bug-225924-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225924 Tobias Kortkamp <tobik@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tobik@freebsd.org --- Comment #1 from Tobias Kortkamp <tobik@freebsd.org> --- 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 <bsd.port.options.mk> 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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-225924-7788-g8vGVIn6Pv>