Date: Thu, 22 Jul 2010 08:32:30 -0700 From: Chip Camden <sterling@camdensoftware.com> To: ports@FreeBSD.org Subject: Re: MASTER_SITE defined by google search result Message-ID: <20100722153230.GA97685@libertas.local.camdensoftware.com> In-Reply-To: <20100722121731.34b47a2a.ehaupt@FreeBSD.org> References: <20100722121731.34b47a2a.ehaupt@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoth Emanuel Haupt on Thursday, 22 July 2010: > 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): >=20 > intitle:"index of" rsync-3.0.7.tar.gz >=20 > 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). >=20 > I thought, why not automate this and I came up with a simple perl > script (requires www/p5-Google-Search): >=20 > http://people.freebsd.org/~ehaupt/distfile-search/distfile-search >=20 > Adding the following make magic to /etc/make.conf >=20 > # distfile search > .if defined(DISTFILE_SEARCH_BACKUP) > pre-fetch-script: > MASTER_SITE_BACKUP+=3D `/root/bin/distfile-search ${ALLFILES}` > .elif defined(DISTFILE_SEARCH_OVERRIDE) > pre-fetch-script: > MASTER_SITE_OVERRIDE=3D `/root/bin/distfile-search ${ALLFILES}` > .endif >=20 > will let you choose whether you want to overwrite the pre defined > MASTER_SITES: >=20 > root@foo: /usr/ports/x11/xorg/ $ make -DDISTFILE_SEARCH_OVERRIDE fetch >=20 > or add the search result as backup MASTER_SITES: >=20 > root@foo: /usr/ports/x11/xorg/ $ make -DDISTFILE_SEARCH_BACKUP fetch >=20 > In the later example you even might want to define > DISTFILE_SEARCH_BACKUP globally. >=20 > As a proof of concept I was able to download all distfiles for x11/xorg > with this method (make -DDISTFILE_SEARCH_OVERRIDE fetch-recursive). >=20 > Please let me know what you think. >=20 > Emanuel Pretty cool! Of course, if DISTFILE_SEARCH_BACKUP is defined, make will always execute a search even if it isn't needed -- but it appears to be fast so perhaps that isn't a problem. --=20 Sterling (Chip) Camden | sterling@camdensoftware.com | 2048D/3A978E4F http://camdensoftware.com | http://chipstips.com | http://chipsquips= .com --tThc/1wpZn/ma/RB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iQEcBAEBAgAGBQJMSGSOAAoJEIpckszW26+RbzYH/R7FgGC9L8ZhVkanXjrHIAN6 hs/ZRaXtiyDm+R0qUE5YT08c6vZZr4fkseCWPLwEuLqG5qbPflS5wiBbMB2XMIT4 Dhv7EZHSNJk3npQd/mVneF5vVVrQFi1VLZgBABrLLfun2tmnqwAKClPnLoNIQu+X NhcGcg23oCCDKFBbIum0eH1YXHsRBV+wV+Qq6NkLKRhlI3p109qNYl5P/YhtPkQw S0OWulW4YPO6SO6PlMgDXZsUNDb3w0376HAd5uz+OuaMVd7XqegD+iSb3zFJ+QIp aqYnHZeZ8ZNQUTVXYMrOYm/N5y7Sb204ooE7qPi/XSDxPYRUdgsQYveAU61xxy0= =n5ZO -----END PGP SIGNATURE----- --tThc/1wpZn/ma/RB--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100722153230.GA97685>