From owner-freebsd-ports@FreeBSD.ORG Thu Jul 22 16:33:28 2010 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 4A426106564A for ; Thu, 22 Jul 2010 16:33:28 +0000 (UTC) (envelope-from sterling@camdensoftware.com) Received: from wh2.interactivevillages.com (wh2.interactivevillages.com [75.125.250.34]) by mx1.freebsd.org (Postfix) with ESMTP id 136CD8FC0A for ; Thu, 22 Jul 2010 16:33:27 +0000 (UTC) Received: from 174-21-99-21.tukw.qwest.net ([174.21.99.21] helo=_HOSTNAME_) by wh2.interactivevillages.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1ObxZV-0004gS-Qg for ports@FreeBSD.org; Thu, 22 Jul 2010 08:20:31 -0700 Received: by _HOSTNAME_ (sSMTP sendmail emulation); Thu, 22 Jul 2010 08:32:30 -0700 Date: Thu, 22 Jul 2010 08:32:30 -0700 From: Chip Camden To: ports@FreeBSD.org Message-ID: <20100722153230.GA97685@libertas.local.camdensoftware.com> Mail-Followup-To: ports@FreeBSD.org References: <20100722121731.34b47a2a.ehaupt@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tThc/1wpZn/ma/RB" Content-Disposition: inline In-Reply-To: <20100722121731.34b47a2a.ehaupt@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Company: Camden Software Consulting URL: http://camdensoftware.com X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - wh2.interactivevillages.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - camdensoftware.com Cc: Subject: Re: MASTER_SITE defined by google search result 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: Thu, 22 Jul 2010 16:33:28 -0000 --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--