Dear all,

At the risk of cross post flaming, I thought I would bring up the matter of
RubyGem ports on the main ports list having heard nothing back from my
initial enquiry on the ruby lists [1], but perhaps since it's really about
ports then this is the right place!

I've noticed that from time to time the general migration of gems from
rubyforge.org to gemcutter.org/rubygems.org [2] (and indeed GitHub[3]) has
been mentioned on the FreeBSD ruby and ports lists, but it would appear
nothing has been changed yet in the bsd.sites.mk file to accommodate this
migration (may have missed a pr in progress of course).  Since I find myself
writing quick gem ports every now and then I thought it would be worth
bringing the matter up for a quick discussion before sending in my suggested
patch as a PR.

I personally think the cleanest thing to do is add anther MASTER_SITE for
RubyGems.org.  Now it would be nice to add their download location directly,
but that does a 302 redirect to Amazon or CloudFiles for the actual
download, so I think we'll need to pop those locations into bsd.sites.mk
directly. Thus:

# See http://rubygems.org/pages/about
.if !defined(IGNORE_MASTER_SITE_RUBYGEMS)
MASTER_SITE_RUBYGEMS+= \
 http://production.s3.rubygems.org/gems/%SUBDIR%/ \
 http://production.cf.rubygems.org/gems/%SUBDIR%/
.endif

Since it will be pretty cool to be able to update many ports by just
s/RF/RG/ in many cases I think we should have an abbreviation for the
RubyGems site thus:

MASTER_SITES_ABBREVS= CPAN:PERL_CPAN \
  SF:SOURCEFORGE \
  SFJP:SOURCEFORGE_JP \
  RG:RUBYGEMS \
  RF:RUBYFORGE

Now one thing I'm not 100% sure on is the use of the '%SUBDIR%' in the
paths, in this case none of the gems will be located in subdirectories since
the gem hosting is flat.  It would appear that the "standard way of doing
things in the bsd.sites.mk is to specify a '%SUBDIR%' element, then if a
pattern is defined in the 'MASTER_SITES_SUBDIRS', that element is replaced.
Is that correct?  So for a RubyForge example, the pattern in
'MASTER_SITES_SUBDIRS' is 'RUBYFORGE:${PORTNAME:L}', which would be the name
of the port lowercased (I guess). So say for 'file-tail' that would make the
download location: 
http://files.rubyforge.vm.bytemark.co.uk/file-tail/file-tail-n.n.n.gem

So it occurs to me that we could either just not have a
'MASTER_SITES_SUBDIRS' entry for the RUBYGEMS site (easy) or we could have
one that was just the 'hardcoded' gems subdirectory, something like this:

  RUBYGEMS:gems \

Like the CENKES entry in the file.  We would then make the
'MASTER_SITE_RUBYGEMS' entries like this:
http://production.s3.rubygems.org/%SUBDIR%/
Not quite sure what the best FreeBSD ports protocol is here.  I personally
feel perhaps that makes it more complicated than it needs to be?


Finally it's a good opportunity to replace the dead mirror in the RubyForge
entry, since 'http://files.rubyforge.mmmultiworks.com' seems to have been
down for some time now.

# See http://rubyforge.org/credits/
.if !defined(IGNORE_MASTER_SITE_RUBYFORGE)
MASTER_SITE_RUBYFORGE+= \
 http://files.rubyforge.vm.bytemark.co.uk/%SUBDIR%/ \
 http://files.ruby.inoack.com/%SUBDIR%/
.endif

Any thoughts, comments, suggestions before I put a PR and associated diff
in?

Regards

Eric

---
[1] http://lists.freebsd.org/pipermail/freebsd-ruby/2010-April/000290.html
[2]
  http://lists.freebsd.org/pipermail/freebsd-ruby/2010-February/000250.html
  http://lists.freebsd.org/pipermail/freebsd-ports/2009-December/058516.html
[3] http://lists.freebsd.org/pipermail/freebsd-ruby/2010-January/000220.html

---
Diff of proposed changes for those interested:

--- bsd.sites.mk.orig    2010-04-06 02:53:13.000000000 +0100
+++ bsd.sites.mk    2010-05-04 14:54:22.000000000 +0100
@@ -1141,8 +1141,15 @@
 # See http://rubyforge.org/credits/
 .if !defined(IGNORE_MASTER_SITE_RUBYFORGE)
 MASTER_SITE_RUBYFORGE+= \
-    http://files.rubyforge.mmmultiworks.com/%SUBDIR%/ \
-    http://files.rubyforge.vm.bytemark.co.uk/%SUBDIR%/
+    http://files.rubyforge.vm.bytemark.co.uk/%SUBDIR%/ \
+    http://files.ruby.inoack.com/%SUBDIR%/
+.endif
+
+# See http://rubygems.org/pages/about
+.if !defined(IGNORE_MASTER_SITE_RUBYGEMS)
+MASTER_SITE_RUBYGEMS+= \
+    http://production.s3.rubygems.org/gems/%SUBDIR%/ \
+    http://production.cf.rubygems.org/gems/%SUBDIR%/
 .endif
 
 .if !defined(IGNORE_MASTER_SITE_SAMBA)
@@ -1493,6 +1500,7 @@
 MASTER_SITES_ABBREVS=    CPAN:PERL_CPAN \
             SF:SOURCEFORGE \
             SFJP:SOURCEFORGE_JP \
+            RG:RUBYGEMS \
             RF:RUBYFORGE
 MASTER_SITES_SUBDIRS=    \
             APACHE_JAKARTA:${PORTNAME:S,-,/,}/source \


_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to