From owner-freebsd-ports@FreeBSD.ORG Mon Mar 3 22:04:23 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AAF5E28 for ; Mon, 3 Mar 2014 22:04:23 +0000 (UTC) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id 6D35885F for ; Mon, 3 Mar 2014 22:04:21 +0000 (UTC) Received: (qmail 4521 invoked by uid 89); 3 Mar 2014 22:04:13 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@88.217.180.167) by mail.grem.de with ESMTPA; 3 Mar 2014 22:04:13 -0000 Date: Mon, 3 Mar 2014 23:04:12 +0100 From: Michael Gmelin To: David Thiel Subject: Re: dns/djbdns [do-package] Error code 1 Message-ID: <20140303230412.552cb65d@bsd64.grem.de> In-Reply-To: <20140227194751.GV32062@redundancy.redundancy.org> References: <5304F8A5.9040209@ccsys.com> <20140219185040.GW8859@redundancy.redundancy.org> <5305003C.1080908@ccsys.com> <530F16E6.1070202@ccsys.com> <20140227194751.GV32062@redundancy.redundancy.org> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.18; amd64-portbld-freebsd9.1) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/jkK7wq1uSZ=haB4So=w3BrW" Cc: "bapt@FreeBSD.org" , "Chad J. Milios" , "freebsd-ports@freebsd.org" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2014 22:04:23 -0000 --MP_/jkK7wq1uSZ=haB4So=w3BrW Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thu, 27 Feb 2014 11:47:51 -0800 David Thiel wrote: > On 02/27, Michael Gmelin wrote: > > I stumbled over the same problem today on 10.0, make NO_STAGE=1 > > install worked for me on the first attempt though. I can also > > confirm the problem with dnscache-conf when installing the binary > > package using "pkg install". > > Can you confirm the exact version you installed via pkg install, > including PORTREVISION? [3/3] Installing djbdns-1.05_17,1... done pkg info djbdns configuration file djbdns-1.05_17,1 Name : djbdns Version : 1.05_17,1 Installed on : Mon Mar 3 20:24:26 UTC 2014 Origin : dns/djbdns Architecture : freebsd:10:x86:64 Prefix : /usr/local Categories : dns Maintainer : lx@FreeBSD.org WWW : http://cr.yp.to/djbdns.html Comment : Collection of secure and reliable DNS tools Options : ADD_USERS : off DNSCURVE : off DUMPCACHE : off IGNOREIP : off IP6 : off JUMBO : off MAN : on PERSISTENT_MMAP: off SRV : off Flat size : 801KiB Description : Bapt's latest fixes (1.05_18,1) seem to solve this, *but*... > > > I'm not certain about the maintainer situation of the port, if you > > want me to I could take a closer look at this in a few days. > > The difficulty here is that the maintainer can't reproduce the problem > at all, and I'm not intimately familiar with the internals of stage > support. I don't see anything in the port that looks timing-dependent, > so I'm not sure where to go. unfortunately now it seems like staging is not working reliably. I noticed this while building on a host that actually runs dnscache (it's reproducible about 90% of the time): # make clean stage ... ===> Generating temporary packing list ./install install: fatal: unable to write .../bin/dnscache: text busy *** Error code 111 Stop. make[2]: stopped in /usr/ports/dns/djbdns/work/djbdns-1.05 *** Error code 1 Stop. make[1]: stopped in /usr/ports/dns/djbdns *** Error code 1 Stop. make: stopped in /usr/ports/dns/djbdns Which simply means, that ./install is trying to overwrite the running /usr/local/bin/dnscache. MAKE_JOBS_UNSAFE works here, so there's probably a parallel execution problem which messes up the conf-home logic/workaround. If I introduce "sleep 1" to the pre-install target things work as expected. Also, if I run "make clean; make; sleep 1; make stage" everything is ok. My theory is, that overwriting ${WRKSRC}/conf-home only results in the desired effect, if its new timestamp is clearly newer to trigger rebuilds of all dependencies. When comparing build outputs, I noticed that in a working build "./auto-str auto_home `head -1 conf-home > auto_home.c`" got called, while on malfunctioning builds it wouldn't. Rebuilding auto_home.c depends directly on auto-str and conf-home. My trivial solution is to also remove auto_home.c as part of the pre-install target, which *seems* to fix the problem, since it makes sure that conf-home gets turned into a news auto_home.c which in turn is used when creating auto_home.o and linking install and instcheck. Makes sense? Patch (also attached for those receiving this directly): --- ../djbdns.orig/Makefile 2014-03-03 21:50:54.283547363 +0000 +++ Makefile 2014-03-03 21:52:48.982536754 +0000 @@ -134,7 +134,7 @@ pre-install: @${MV} -f ${WRKSRC}/conf-home ${WRKSRC}/conf-home.sav @echo "${STAGEDIR}${PREFIX}" > ${WRKSRC}/conf-home - @cd ${WRKSRC} ; ${RM} -f install instcheck install.o instcheck.o hier.o auto_home.o + @cd ${WRKSRC} ; ${RM} -f install instcheck install.o instcheck.o hier.o auto_home.o auto_home.c @cd ${WRKSRC} ; ${MAKE_CMD} install instcheck @${MV} -f ${WRKSRC}/conf-home.sav ${WRKSRC}/conf-home -- Michael Gmelin --MP_/jkK7wq1uSZ=haB4So=w3BrW Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=djbdns.patch --- ../djbdns.orig/Makefile 2014-03-03 21:50:54.283547363 +0000 +++ Makefile 2014-03-03 21:52:48.982536754 +0000 @@ -134,7 +134,7 @@ pre-install: @${MV} -f ${WRKSRC}/conf-home ${WRKSRC}/conf-home.sav @echo "${STAGEDIR}${PREFIX}" > ${WRKSRC}/conf-home - @cd ${WRKSRC} ; ${RM} -f install instcheck install.o instcheck.o hier.o auto_home.o + @cd ${WRKSRC} ; ${RM} -f install instcheck install.o instcheck.o hier.o auto_home.o auto_home.c @cd ${WRKSRC} ; ${MAKE_CMD} install instcheck @${MV} -f ${WRKSRC}/conf-home.sav ${WRKSRC}/conf-home --MP_/jkK7wq1uSZ=haB4So=w3BrW--