From owner-freebsd-ports@FreeBSD.ORG Thu Dec 24 13:47:29 2009 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 3799910656A3 for ; Thu, 24 Dec 2009 13:47:29 +0000 (UTC) (envelope-from scode@scode.org) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id D322E8FC13 for ; Thu, 24 Dec 2009 13:47:28 +0000 (UTC) Received: by ewy26 with SMTP id 26so4788777ewy.3 for ; Thu, 24 Dec 2009 05:47:27 -0800 (PST) MIME-Version: 1.0 Sender: scode@scode.org Received: by 10.216.87.83 with SMTP id x61mr3918866wee.7.1261660763621; Thu, 24 Dec 2009 05:19:23 -0800 (PST) X-Originating-IP: [213.114.147.18] Date: Thu, 24 Dec 2009 14:19:23 +0100 X-Google-Sender-Auth: 1687235969263f1f Message-ID: <5a1151760912240519j274a4509g42027e3bb6bcb69d@mail.gmail.com> From: Peter Schuller To: ports@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: Subject: ruby gemcutter ports - how to handle fetching? 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, 24 Dec 2009 13:47:29 -0000 Hello, I recently submitted two ports with master site set to http://gemcutter.ogr/gems/ because rubyforge did not have the .gem files. The ruby community seems to be transitioning to gemcutter, so it would be good if gemcutter gems were easily maintained in ports. I suppose gemcutter should be added to bsd.sites.mk (see patch below), but the other problem is that I ended up adding to my port Makefile: # we care about not passing -A FETCH_ARGS= -pRr While this works it is not maintainable (what if fetch isn't used? what if other FETCH_ARGS overrides are in effect? etc). The problem is that the official location of gemcutter gem downloads return (correctly) 302 redirects - currently to Amazon S3. But the default FETCH_ARG:s contain -A, which means this is treated as a failure. I understand that many times a 302 is just some broken site and we do not want to follow it. The question is how this is supposed to be handled in a maintainable way? Suggestion: * Create FETCH_DISTFILE_REDIRECTS which, if yes, implies that when fetching redirects must be followed. * Define USE_GEMCUTTER=yes which would imply FETCH_DISTFILE_REDIRECTS (is a USE_* appropriate for this?). * Have bsd.port.mk add -A only if FETCH_DISTFILES_REDIRECTS is not yes. Thoughts? bsd.sites.mk patch for gemcutter follows (will probably be mangled by gmail). Should one add as a fall-back the current direct destination being used? In other words, although it is presumably an implementation detail of gemcutter, should one add, in this case, http://s3.amazonaws.com/gemcutter_production/gems/ to the master sites so that fetching has a high chance of working even if gemcutter is down (as long as S3 is up, which should be reliable)? --- bsd.sites.mk.orig 2009-12-24 13:53:17.958746367 +0100 +++ bsd.sites.mk 2009-12-24 13:56:57.472840650 +0100 @@ -458,6 +458,11 @@ ftp://mirror.aarnet.edu.au/pub/gcc/%SUBDIR%/ .endif +.if !defined(IGNORE_MASTER_SITE_GEMCUTTER) +MASTER_SITE_GEMCUTTER+= \ + http://gemcutter.org/gems/ +.endif + .if !defined(IGNORE_MASTER_SITE_GENTOO) MASTER_SITE_GENTOO+= \ http://ftp.roedu.net/pub/mirrors/gentoo.org/%SUBDIR%/ \ -- / Peter Schuller