From: Emanuel Haupt on 22 Jul 2010 14:11 Ade Lovett <ade(a)freebsd.org> wrote: > > On Jul 22, 2010, at 10:32 , Chip Camden wrote: > > > Quoth Emanuel Haupt on Thursday, 22 July 2010: > >> > >> http://people.freebsd.org/~ehaupt/distfile-search/distfile-search > >> > >> Adding the following make magic to /etc/make.conf > >> > >> # distfile search > >> .if defined(DISTFILE_SEARCH_BACKUP) > >> pre-fetch-script: > >> MASTER_SITE_BACKUP+= `/root/bin/distfile-search ${ALLFILES}` > >> .elif defined(DISTFILE_SEARCH_OVERRIDE) > >> pre-fetch-script: > >> MASTER_SITE_OVERRIDE= `/root/bin/distfile-search ${ALLFILES}` > >> .endif > > This is likely worthy of a bit of cleanup, adding the code somewhere > under ports/Tools/scripts, finding a suitable usage variable, and > hooking it into bsd.port.mk (or bsd.fetch.mk, whenever someone[tm]) > gets around to splitting out all the fetching stuff from > bsd.port.mk ;) That was my first thought but then I thought I first present the idea. A lot more is possible such as adding other search engines. Develop some optional "quality feedback" mechanism for maintainers having ports that required a distfile to be looked up. Also, the script pulls in a lot of p5- dependencies. Makeing the actual script a port and have ports/Mk/* provide the necessary hooks could be a solution. Emanuel _______________________________________________ freebsd-ports(a)freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"
From: Shaun Amott on 23 Jul 2010 13:46
On Thu, Jul 22, 2010 at 12:17:31PM +0200, Emanuel Haupt wrote: > > Usually when I find that a port can't fetch the according distfile I > simply google for the distfile with the following search string (e.g. > for rsync): > > intitle:"index of" rsync-3.0.7.tar.gz > > This approach almost always delivers plenty of results. I then manually > download one of the results into my DISTDIR and restart the normal > build process which then automatically takes care of the integrity > (checksum, size) of the distfile(s). > > I thought, why not automate this and I came up with a simple perl > script (requires www/p5-Google-Search): > > http://people.freebsd.org/~ehaupt/distfile-search/distfile-search > Very cool and wonderfully efficient! One possible enhancement might be to also (conditionally?) search for the size from distinfo; this is particularly useful when dealing with distfiles which lack a version number. -- Shaun Amott // PGP: 0x6B387A9A "A foolish consistency is the hobgoblin of little minds." - Ralph Waldo Emerson _______________________________________________ freebsd-ports(a)freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org" |