From owner-freebsd-ports-bugs@FreeBSD.ORG Mon May 12 05:10:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9934386 for ; Mon, 12 May 2014 05:10:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9388F2874 for ; Mon, 12 May 2014 05:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4C5A0S6009665 for ; Mon, 12 May 2014 05:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4C5A0B5009663; Mon, 12 May 2014 05:10:00 GMT (envelope-from gnats) Resent-Date: Mon, 12 May 2014 05:10:00 GMT Resent-Message-Id: <201405120510.s4C5A0B5009663@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Paul J Murphy 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 F1B4D2C4 for ; Mon, 12 May 2014 05:06:38 +0000 (UTC) Received: from srv00.inetstat.net (srv00.inetstat.net [91.121.154.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "srv00.inetstat.net", Issuer "srv00.inetstat.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CE702853 for ; Mon, 12 May 2014 05:06:37 +0000 (UTC) Received: from srv00.inetstat.net (localhost [127.0.0.1]) by srv00.inetstat.net (Postfix) with ESMTP id 9FBF3D78D2 for ; Mon, 12 May 2014 05:06:28 +0000 (UTC) Received: from srv00.inetstat.net ([IPv6:::1]) by srv00.inetstat.net (srv00.inetstat.net [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id wa54HfLl-beA; Mon, 12 May 2014 05:06:26 +0000 (UTC) Received: by srv00.inetstat.net (Postfix, from userid 1001) id 34DE6D78D1; Mon, 12 May 2014 05:06:26 +0000 (UTC) Message-Id: <20140512050626.34DE6D78D1@srv00.inetstat.net> Date: Mon, 12 May 2014 05:06:26 +0000 (UTC) From: Paul J Murphy Reply-To: Paul J Murphy To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: ports/189694: [patch] ports/Mk/Uses/perl.mk: post-stage fails during "port test" X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 05:10:00 -0000 >Number: 189694 >Category: ports >Synopsis: [patch] ports/Mk/Uses/perl.mk: post-stage fails during "port test" >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 12 05:10:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Paul J Murphy >Release: FreeBSD 10.0-RELEASE-p2 amd64 >Organization: iNetStat.net >Environment: System: FreeBSD srv00.inetstat.net 10.0-RELEASE-p2 FreeBSD 10.0-RELEASE-p2 #0 r265140: Wed Apr 30 12:18:59 UTC 2014 root@srv00.inetstat.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: The problem is triggered by "port test" doing builds with LOCALBASE != PREFIX. perl.mk's post-stage is using: ${STAGEDIR}${SITE_PERL}/... which expands to: ${STAGEDIR}${LOCALBASE}/${SITE_PERL_REL}/... So, either ${SITE_PERL} is incorrectly defined for the context, or post-stage is using the wrong macros for its path. My hunch is that it's the latter, and that the correct path to use in post-stage is: ${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/... Someone more familiar with the dark corners of the build system needs to spend at least 10 minutes considering whether my hunch is probably good, or whether it's actually SITE_PERL that's incorrectly defined in perl.mk, or something else. The symptoms are the "*** Error code 1 (ignored) just before compress-man, then problems with a .packlist in stage-qa, as the previous error was post-stage failing to run. Use "make -dl stage-qa" and "make -dl post-stage" to see what's going on around the point of failure. --- port test output begins here --- ... install -o root -g wheel -m 555 /usr/ports/mail/p5-Mail-DKIM/work/Mail-DKIM-0.40/scripts/dkim*.pl /usr/ports/mail/p5-Mail-DKIM/work/stage/tmp/p5-Mail-DKIM-0.40_1/bin *** Error code 1 (ignored) ====> Compressing man pages (compress-man) ====> Running Q/A tests (stage-qa) Error: 'lib/perl5/site_perl/5.18/mach/auto/Mail/DKIM/.packlist' is referring to /usr/ports/mail/p5-Mail-DKIM/work/stage *** Error code 1 Stop. make: stopped in /usr/ports/mail/p5-Mail-DKIM ===> Error running make stage ===> Cleaning up --- port test output ends here --- >How-To-Repeat: # FreeBSD 10.0-RELEASE-p2 system with SVN /usr/ports svn update /usr/ports # p5-Mail-DKIM is just an example, it hits other perl modules too cd /usr/ports/mail/p5-Mail-DKIM make clean port test # Use this to examine what's going on in post-stage and spot the use of # .../work/stage/usr/local/... when the "port test" build has gone into # .../work/stage/tmp/p5-Mail-DKIM-0.40_1 (i.e. work/stage/PREFIX) make -dl post-stage PREFIX=/tmp/p5-Mail-DKIM-0.40_1 >Fix: This patch fixed it for me, with the following caveats: 1) I've done very little testing to ensure that this doesn't horribly break the build system in other ways. 2) I'm not an expert on the inner workings of the build system, so this should be reviewed carefully by someone who is. --- perl5.mk.diff begins here --- Index: ports/Mk/Uses/perl5.mk =================================================================== --- ports/Mk/Uses/perl5.mk (revision 353739) +++ ports/Mk/Uses/perl5.mk (working copy) @@ -256,7 +256,7 @@ # TODO: change to ${_USE_PERL5:Mconfigure} when M::B creates .packlist .if ${USE_PERL5:Mconfigure} || ${USE_PERL5:Mmodbuildtiny} post-stage:: - -@[ -d ${STAGEDIR}${SITE_PERL}/${PERL_ARCH}/auto ] && ${FIND} ${STAGEDIR}${SITE_PERL}/${PERL_ARCH}/auto -name .packlist -exec ${SED} -i '' 's|^${STAGEDIR}||' '{}' \; + -@[ -d ${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/${PERL_ARCH}/auto ] && ${FIND} ${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/${PERL_ARCH}/auto -name .packlist -exec ${SED} -i '' 's|^${STAGEDIR}||' '{}' \; .endif .if !target(regression-test) --- perl5.mk.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: