Date: Thu, 24 Dec 2009 14:19:23 +0100 From: Peter Schuller <peter.schuller@infidyne.com> To: ports@freebsd.org Subject: ruby gemcutter ports - how to handle fetching? Message-ID: <5a1151760912240519j274a4509g42027e3bb6bcb69d@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5a1151760912240519j274a4509g42027e3bb6bcb69d>