From owner-cvs-all@FreeBSD.ORG Wed May 23 18:05:26 2012 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5440D106567B; Wed, 23 May 2012 18:05:26 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id EE08A8FC16; Wed, 23 May 2012 18:05:24 +0000 (UTC) Received: by bkvi18 with SMTP id i18so8425189bkv.13 for ; Wed, 23 May 2012 11:05:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=dZuL/X9Mk/L+DjlxSnC/cFc321B89G83FhG1W2IkW4c=; b=lNpNM7U64Fuwxv/Jh8PwhZJZKBsbEWM9+XMbOffETJkKs6ivvFK0htJv5BC7lunLCC M7RdT7HNTedKOAgDf4WEcuW0tKIMDVWOjpkUtT6cwu5x29toIftcVKYjaUClRhMEJtcu SAQ8GTka74NRXu4YV6oAM3Pbp5GL+NpAaOfnjdLJBBwD5fxlhuOpnRzvJE5PKi4wl6A8 buwiC2xbHxVDF1oJrrtOXvIS9XMLbJV9EvULosQ5n3kzQSlA+qhatIyKXY+lJGmCLOyC qZmgG+DDVoPrJCPRhx0P51IlVL6v5snsqzY2sp2lN0tyJ9OuEDOuKhah9WbgzszhRzgv jPcg== Received: by 10.205.33.136 with SMTP id so8mr11621988bkb.1.1337796323738; Wed, 23 May 2012 11:05:23 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.204.171.138 with HTTP; Wed, 23 May 2012 11:04:52 -0700 (PDT) In-Reply-To: References: <201205231334.q4NDYCMQ078804@repoman.freebsd.org> <1337780396.2024.2.camel@pav.hide.vol.cz> <9b15e44319f017bff90bc3caa1de79d9@bluelife.at> <1337781238.2024.7.camel@pav.hide.vol.cz> <1337781346.2024.8.camel@pav.hide.vol.cz> From: Chris Rees Date: Wed, 23 May 2012 19:04:52 +0100 X-Google-Sender-Auth: AI95-tcdSqbMD1FJsi_qWSbQKMs Message-ID: To: Bernhard Froehlich Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Cc: cvs-ports@freebsd.org, ports-committers@freebsd.org, Pav Lucistnik , cvs-all@freebsd.org, Martin Wilke Subject: Re: cvs commit: ports/databases/pg_filedump Makefile X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2012 18:05:26 -0000 On 23 May 2012 15:39, Bernhard Froehlich wrote: > On 23.05.2012 15:55, Pav Lucistnik wrote: >> >> Pav Lucistnik p=ED=B9e v st 23. 05. 2012 v 15:53 +0200: >>> >>> Bernhard Froehlich p=ED=B9e v st 23. 05. 2012 v 15:47 +0200: >>> > On 23.05.2012 15:39, Pav Lucistnik wrote: >>> > > Martin Wilke p=ED=B9e v st 23. 05. 2012 v 13:34 +0000: >>> > >> miwi =A0 =A0 =A0 =A02012-05-23 13:34:12 UTC >>> > >> >>> > >> =A0 FreeBSD ports repository >>> > >> >>> > >> =A0 Modified files: >>> > >> =A0 =A0 databases/pg_filedump Makefile >>> > >> =A0 Log: >>> > >> =A0 - Switch to FETCH_DEPENDS to fix fetch during build >>> > > >>> > > How is this supposed to work? The log message makes no sense. >>> > >>> > The problem that this fixes is when you are building in jails >>> > and restrict internet access to the "fetch" target like >>> > pointyhat-west, redports.org and poudriere already do. >>> >>> Well, the restriction was put in place for a reason 1*), and now you're >>> working around that very reason. So just remove the restriction from >>> pointyhat and problem solved. >> >> >> On a second read, now I see what you're achieving. But still, the chosen >> solution seems suboptimal. > > > On the list of broken ports there are a handful of ports (including this > one) that depend on another ports code (aka working directory). Right now > those ports are written using a dirty hack like that: > > from databases/mysql-q4m: > > BUILD_DEPENDS=3D > =A0${NONEXISTENT}:${PORTSDIR}/databases/mysql${MYSQL_VER}-server:build > CONFIGURE_ARGS=3D --with-mysql=3D"$$(cd > ${PORTSDIR}/databases/mysql${MYSQL_VER}-server; ${MAKE} -V WRKSRC)" > > We decided to choose the s/BUILD_DEPENDS/FETCH_DEPENDS/ solution because > it doesn't actually make the hack much worse than it already is. The > downside is that it builds during fetch which isn't nice but better than > fetch during build which is a security improvement. > > If someone comes up with a better solution without completely rewriting > all those ports I would be glad to help doing it. Right now it looks like > there are around 5-10 ports of that kind. I'm deeply unhappy about adding ad-hoc fixes like this. Any comments about [1]? I do think that the fixes already put in should be reverted in favour of a proper solution. Alternatively something like (but more hackish): .for dep in ${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS} # Check any dependencies with third tuple full, but don't duplicate. . if !empty(dep:M*\:*\:*) && empty(FETCH_DEPENDS:M*\:${dep:C,[^:]*\:([^:]*)\:[^:]*,\1}:\*) FETCH_DEPENDS+=3D ${dep:C,[^:]*$,fetch} . endif .endfor Which is better? Chris =3D=3D=3D=3D [1] http://www.bayofrum.net/~crees/patches/bsd.port.mk-fetch-depends.diff Index: bsd.port.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /exports/cvsroot-freebsd/ports/Mk/bsd.port.mk,v retrieving revision 1.710 diff -u -r1.710 bsd.port.mk --- bsd.port.mk 23 May 2012 08:17:49 -0000 1.710 +++ bsd.port.mk 23 May 2012 17:44:52 -0000 @@ -4294,7 +4294,7 @@ _PKG_SEQ=3D pkg-depends _FETCH_DEP=3D pkg _FETCH_SEQ=3D 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=3D fetch _EXTRACT_SEQ=3D check-build-conflicts extract-message checksum extract-dep= ends \ pre-extract pre-extract-script do-extract \ @@ -5164,6 +5164,7 @@ _UNIFIED_DEPENDS=3D${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS} _DEPEND_DIRS=3D ${_UNIFIED_DEPENDS:C,^[^:]*:([^:]*).*$,\1,} +_DEPEND_SPECIALS=3D ${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*).*$,\1,:O:= u} all-depends-list: @${ALL-DEPENDS-LIST} @@ -5299,6 +5300,14 @@ done .endif +.if !target(fetch-specials) +fetch-specials: + @${ECHO_MSG} "=3D=3D=3D> Fetching all distfiles required by ${PKGNAME} fo= r building" +. for dir in ${_DEPEND_SPECIALS} + cd $dir; ${MAKE} fetch +. endfor +.endif + .if !target(fetch-recursive) fetch-recursive: @${ECHO_MSG} "=3D=3D=3D> Fetching all distfiles for ${PKGNAME} and depend= encies"