Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Nov 2009 13:26:49 +0200
From:      Eitan Adler <eitanadlerlist@gmail.com>
To:        Brooks Davis <brooks@freebsd.org>
Cc:        ports@freebsd.org
Subject:   Re: using svn to fetch for ports (yet again!)
Message-ID:  <a0777e080911060326j12f007ccrc517a6565257de4c@mail.gmail.com>
In-Reply-To: <20091105203457.GA92771@lor.one-eyed-alien.net>
References:  <a0777e080911041023n24da042u4263375ced487fb8@mail.gmail.com>  <20091104234438.GB42953@lor.one-eyed-alien.net> <a0777e080911051217l11987c48g590da749a926f278@mail.gmail.com>  <20091105203457.GA92771@lor.one-eyed-alien.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 5, 2009 at 10:34 PM, Brooks Davis <brooks@freebsd.org> 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} ; \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a0777e080911060326j12f007ccrc517a6565257de4c>