RFC: svn for make fetch

Thomas Sandford freebsduser at paradisegreen.co.uk
Mon Nov 9 15:57:04 UTC 2009


Doug Barton wrote:
> Eitan Adler wrote:
>> I was hoping to get a bit more of a response to a recent posting of
>> mine with regard to using svn to fetch files for ports
>> My proposal: http://www.mail-archive.com/freebsd-ports@freebsd.org/msg23776.html
>> A summary of what has been going on:
>> http://wiki.freebsd.org/EitanAdler/ports-svn
> 
> I was really hoping that others would have more to say as well. My
> chief concern is that unless I'm missing something there is no way to
> provide checksums for the source files, correct? If that's true my gut
> reaction is "no freakin' way" but I'm willing to listen to arguments
> as to why this should be ok.
> 
> I tend to agree with the other sentiments already expressed that in
> cases where svn is the only way a project distributes its source that
> maintainers ought to be putting together tarballs of specific
> versions. I don't really see that this is an overwhelming burden, but
> again I'm open to arguments as to why I might be wrong about this.

OK - "I think you might be wrong about this"

A classic example is the net/freeswitch port where the porter has done 
exactly what you say.

(IMHO they've not done it in an optimal way but...)

1) It is not clear from the Makefile what version they are actually using.

2) It is indeed unclear from the Makefile what the provenance of the 
fetched tarball is at all.

3) It is very difficult for anyone other than the maintainer to create 
an update of the port either for local use or for submission of a patch.

(and writing this I note that (4) the distfile location has dropped off 
the net)

(1) and (2) could be _improved_ by more documentation in the Makefile 
and better choice of versioning scheme but 3 is fairly fundamental.

What _I'd_ like to see is a development of a combination of "method 1" & 
"method 2" from the wiki page referenced above.

Running "make fetch" would perform an svn export, and would generate a 
tarball from this in ${DISTDIR} named as ${PORTNAME}-${PORTVERSION}.t[gb]z.

A maintainer can then upload this (or the ports distfile handling system 
at freebsd.org could even be modified to do this automagically) BUT it 
now exists on the users system which means that all the rest of the 
ports system including

* _not_ refetching every time the port is built _unless_ the distfile 
has changed
* the ability to checksum the (generated) distfile
* (depending on the exact implementation of the new fetch target) the 
ability to fallback on fetching a distfile copy from 
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/[distfile]

works as for a "normal" port.

However it is now:
* transparent exactly what is being fetched.
* easy to update the port to fetch a later version by a one line 
Makefile edit followed by "make makesum" as is the case for a "standard" 
port.

(Obviously the editor of the Makefile needs to carry out checks to 
ensure that the PLIST doesn't need to be updated, or other changes made, 
to work with the updated revision - as for any other port update).

-- 
Thomas Sandford


More information about the freebsd-ports mailing list