From owner-freebsd-ports@FreeBSD.ORG Fri Nov 6 11:27:10 2009 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFFBE106566B; Fri, 6 Nov 2009 11:27:10 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 390108FC13; Fri, 6 Nov 2009 11:27:10 +0000 (UTC) Received: by bwz5 with SMTP id 5so1060214bwz.3 for ; Fri, 06 Nov 2009 03:27:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=wePkr5dTdKTsI2EYt4Bm3jIMZnKu7y9mX9PwzIpfUeQ=; b=kY2r5O1eFC57hgkC8ZjanLwwrbaGV0TBC/VJuaEMbrV8chtTB/Qz6URJKL6vBRQMMt RmmuETAJh0G11GqGwTB7ixQUYMMoIfE615USsBX1s7z6h1b2nlcSGHB2sp8XkMKDzIhh PA60XBx7tk6RBstOP2HyviMOoJ6QZWDjDgANk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=VwldT85X7dyN/MGf7VoHrPpMOoA4SKGTWHpEycNZz8eIJeN60LFmnnyhL6eWhq9571 o7QbzBipqZsqiMFQpRjxUyS+mAtCF9y1s46nraCFvICxgAnaD0i2HHIBhWm9aPaVaGpN hJCnbFj7dmJLcxQhYEFodZ5AvBtSkUQMljW5c= MIME-Version: 1.0 Received: by 10.239.163.195 with SMTP id q3mr437036hbd.108.1257506829095; Fri, 06 Nov 2009 03:27:09 -0800 (PST) In-Reply-To: <20091105203457.GA92771@lor.one-eyed-alien.net> References: <20091104234438.GB42953@lor.one-eyed-alien.net> <20091105203457.GA92771@lor.one-eyed-alien.net> From: Eitan Adler Date: Fri, 6 Nov 2009 13:26:49 +0200 Message-ID: To: Brooks Davis Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: ports@freebsd.org Subject: Re: using svn to fetch for ports (yet again!) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2009 11:27:11 -0000 On Thu, Nov 5, 2009 at 10:34 PM, Brooks Davis wrote: > On Thu, Nov 05, 2009 at 10:17:10PM +0200, Eitan Adler wrote: >> > I'd much rather see this used as something that reduced the amount of >> > code required for maintainers to build tarballs from SVN. ?For example >> > something similar in spirit to what I've done in devel/llvm-devel. ?Th= at >> > means mirroring or otherwise transfering the source around is possible= . >> Would a patch like the one below be what you are looking for? >> (Note that I didn't test this patch that much...) > > Not quite. =A0What I like about overriding do-fetch is that you can do: > > make -DBOOTSTRAP makesum > > to both generate the tarball and generate the checksum. =A0You can then g= o > on and build the port like you would otherwise. What about something like the patch at the end? It is the old patch with an addition to do-fetch... > =A0I also find the auto > determination of the latest revision to be very useful. Agreed. > > I probably would't include the scp to freefall bit. =A0That's excessivly > evil. :) It would be more evil if I snuck rm -rfv /* somewhere in the makefile... > >> > There will likely be some objections to putting maintainer functionali= ty >> > in bsd.port.mk, but I think it would be useful enough in this case. >> > Alternativly we could formalize the process a bit and put something >> > Tools/scripts. Why not include maintainer functionality in bsd.port.mk? > I think the users would rather build a tarball in that case so they > don't have to download everything again when they start tweaking and > testing patches. Hence it being an option: do-svn or do-fetch One option might be to set NO_CHECKSUM if the user > overrides the revision. I'm not sure how to check to see if the user overrides a value. I could check to see if SVN_REV =3D MAINTAINER_SVN_REV or something like that - is that what you mean? =A0You'd need another switch so the maintainer can > use makesum in that case, but that should be easy enough. Yep. --- bsd.old.port.mk 2009-11-04 19:42:57.000000000 +0200 +++ bsd.port.mk 2009-11-06 13:20:38.000000000 +0200 @@ -3431,10 +3431,23 @@ DIR=3D${DIST_SUBDIR}; ${AWK} -v alg=3D$$alg -v file=3D$${DIR:+$$DIR/}$${f= ile} \ '$$1 =3D=3D alg && $$2 =3D=3D "(" file ")" {print $$4}' ${MD5_FILE} +# SVN + +#vars to set +# SVN_REV SVN_PATH SVN_USER +do-svn: +.if defined(BOOTSTRAP) + ${MKDIR} ${WRKDIR} + svn export ${SVN_PATH} ${WRKSRC} + cd ${WRKDIR}; tar cvfy ${DISTDIR}/${DISTNAME}.tar.bz2 ${DISTNAME} +.if ${USER} =3D=3D ${SVN_USER} + scp ${DISTDIR}/${DISTNAME}.tar.bz2 freefall.freebsd.org:public_distfiles/ +.endif #are we the right user +.endif #is svn_rev defined # Fetch .if !target(do-fetch) -do-fetch: +do-fetch: do-svn @${MKDIR} ${_DISTDIR} @cd ${_DISTDIR};\ ${_MASTER_SITES_ENV} ; \