From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jul 14 11:00:09 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B238E106566C for ; Sat, 14 Jul 2012 11:00:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 76D258FC0C for ; Sat, 14 Jul 2012 11:00:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6EB09rl079211 for ; Sat, 14 Jul 2012 11:00:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6EB09qR079210; Sat, 14 Jul 2012 11:00:09 GMT (envelope-from gnats) Resent-Date: Sat, 14 Jul 2012 11:00:09 GMT Resent-Message-Id: <201207141100.q6EB09qR079210@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, Chris Rees Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68002106566B for ; Sat, 14 Jul 2012 10:58:05 +0000 (UTC) (envelope-from crees@bayofrum.net) Received: from mk-outboundfilter-2.mail.uk.tiscali.com (mk-outboundfilter-2.mail.uk.tiscali.com [212.74.114.38]) by mx1.freebsd.org (Postfix) with ESMTP id EC34F8FC08 for ; Sat, 14 Jul 2012 10:58:04 +0000 (UTC) Received: from host-2-102-4-87.as13285.net (HELO pegasus.bayofrum.net) ([2.102.4.87]) by smtp.pipex.tiscali.co.uk with ESMTP; 14 Jul 2012 11:56:56 +0100 Received: by pegasus.bayofrum.net (Postfix, from userid 1001) id 70A51FDAF; Sat, 14 Jul 2012 11:56:48 +0100 (BST) Message-Id: <20120714105648.70A51FDAF@pegasus.bayofrum.net> Date: Sat, 14 Jul 2012 11:56:48 +0100 (BST) From: Chris Rees To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/169850: [PATCH] bsd.port.mk -- fix fetch for ports that depend on specific targets X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Chris Rees List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 11:00:09 -0000 >Number: 169850 >Category: ports >Synopsis: [PATCH] bsd.port.mk -- fix fetch for ports that depend on specific targets >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jul 14 11:00:09 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Chris Rees >Release: FreeBSD 9.0-RELEASE amd64 >Organization: >Environment: System: FreeBSD pegasus.bayofrum.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sun Apr 29 12:29:02 BST 2012 root@pegasus.bayofrum.net:/usr/obj/usr/src/sys/PEGASUS amd64 >Description: I've (ab)used the Severity and Priority fields here because I believe that they are appropriate here. Ports that use alternative targets to depend on others, for example: BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/foo/bar:target fail when built in jails that restrict network access during !fetch phase. This patch fixes this problem, and was being tested by miwi until recently; I emailed him 11 days ago, but he appears to be AFK. Before he disappeared he reported that it did fix many ports. Ref: http://lists.freebsd.org/pipermail/cvs-all/2012-May/364241.html (this has an older (wrong) patch >How-To-Repeat: Build a port in jailed Tinderbox/poudriere that uses targeted dependencies >Fix: Check for alternative-target dependencies, and automatically fetch them during fetch phase: --- bsd.port.mk-fetch-depends2.diff begins here --- Index: bsd.port.mk =================================================================== RCS file: /exports/cvsroot-freebsd/ports/Mk/bsd.port.mk,v retrieving revision 1.711 diff -u -r1.711 bsd.port.mk --- bsd.port.mk 24 May 2012 07:11:40 -0000 1.711 +++ bsd.port.mk 25 May 2012 17:36:16 -0000 @@ -4299,7 +4299,7 @@ _PKG_SEQ= pkg-depends _FETCH_DEP= pkg _FETCH_SEQ= fetch-depends pre-fetch pre-fetch-script \ - do-fetch post-fetch post-fetch-script + do-fetch fetch-specials post-fetch post-fetch-script _EXTRACT_DEP= fetch _EXTRACT_SEQ= check-build-conflicts extract-message checksum extract-depends \ pre-extract pre-extract-script do-extract \ @@ -5169,6 +5169,7 @@ _UNIFIED_DEPENDS=${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS} _DEPEND_DIRS= ${_UNIFIED_DEPENDS:C,^[^:]*:([^:]*).*$,\1,} +_DEPEND_SPECIALS= ${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*):.*$,\1,} all-depends-list: @${ALL-DEPENDS-LIST} @@ -5304,6 +5305,14 @@ done .endif +.if !target(fetch-specials) +fetch-specials: + @${ECHO_MSG} "===> Fetching all distfiles required by ${PKGNAME} for building" + @for dir in ${_DEPEND_SPECIALS}; do \ + (cd $$dir; ${MAKE} fetch); \ + done +.endif + .if !target(fetch-recursive) fetch-recursive: @${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies" --- bsd.port.mk-fetch-depends2.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: