pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/misc/rubygems Update rubygems to 1.1.0. Changes from ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a30d0167e268
branches:  trunk
changeset: 540172:a30d0167e268
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Mar 31 15:40:43 2008 +0000

description:
Update rubygems to 1.1.0.  Changes from version 1.0.1 include:

+ Port patches to allow gems to be installed into an "installion root"
  from 1.0.1nb2.

+ Rename the --build-root option to --install-root, which more accurately
  reflects the purpose of the option.

+ Update rubygem.mk to work with rubygems-1.1.0.
  + Require 1.1.0 as the minimum rubygems version for the build.
  + Remove GEM_FORMAT and special code to extract the gemspec file
    from a gem archive -- `gem spec' can now do it correctly by itself.
  + Rename various *buildroot* targets to *install-root* to match the
    name of the `gem' option.

* RubyGems now uses persistent connections on index updates and only
  updates from a latest index by default, cutting candidate gems for
  updates to roughly 1/4 (at present).  Index updates are much faster
  now.

* `gem list -r` may only show the latest version of a gem, add --all to
  see all gems.

* `gem spec` now extracts specifications from .gem files.

* `gem query --installed` to aid automation of checking for gems.

This update has been tested with the 3 packages in pkgsrc that install
using the ``gem'' command:

        devel/rubyforge
        misc/ruby-gem_plugin
        www/mongrel

This update has also been tested with the 129 packages in my local
tree that install using the ``gem'' command.

diffstat:

 misc/rubygems/Makefile         |  11 ++---
 misc/rubygems/PLIST            |  15 ++++++--
 misc/rubygems/distinfo         |  21 ++++++-----
 misc/rubygems/patches/patch-aa |  10 ++---
 misc/rubygems/patches/patch-ab |  61 ++++++++++++++++++++--------------
 misc/rubygems/patches/patch-ac |  18 +++------
 misc/rubygems/patches/patch-ad |  54 +++++++++++++++++++++--------
 misc/rubygems/patches/patch-ae |  52 ++++++++++++++---------------
 misc/rubygems/patches/patch-af |  16 ++++++++
 misc/rubygems/patches/patch-ag |  29 ++++++++++++++++
 misc/rubygems/patches/patch-ah |  19 ++++++++++
 misc/rubygems/rubygem.mk       |  75 +++++++++++++----------------------------
 12 files changed, 227 insertions(+), 154 deletions(-)

diffs (truncated from 633 to 300 lines):

diff -r d40e4cef10f1 -r a30d0167e268 misc/rubygems/Makefile
--- a/misc/rubygems/Makefile    Mon Mar 31 15:32:36 2008 +0000
+++ b/misc/rubygems/Makefile    Mon Mar 31 15:40:43 2008 +0000
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.18 2008/03/18 03:47:07 jlam Exp $
+# $NetBSD: Makefile,v 1.19 2008/03/31 15:40:43 jlam Exp $
 
-DISTNAME=      rubygems-1.0.1
-PKGREVISION=   2
+DISTNAME=      rubygems-1.1.0
 CATEGORIES=    misc ruby
-MASTER_SITES=  http://rubyforge.org/frs/download.php/29548/
+MASTER_SITES=  http://rubyforge.org/frs/download.php/34638/
 EXTRACT_SUFX=  .tgz
 
 MAINTAINER=    minskim%NetBSD.org@localhost
@@ -48,9 +47,9 @@
 INSTALL_ENV+=          GEM_HOME=${DESTDIR}${GEM_HOME}
 
 INSTALL_TARGET=                install
-INSTALL_TARGET+=       --format-executable
+INSTALL_TARGET+=       --no-format-executable  # "bin/gem", not "bin/gem18"
 .if ${_USE_DESTDIR} != "no"
-INSTALL_TARGET+=       --buildroot=${DESTDIR:Q}
+INSTALL_TARGET+=       --install-root=${DESTDIR:Q}
 .endif
 
 # rubygem's setup.rb is not the typical setup.rb -- manually run the
diff -r d40e4cef10f1 -r a30d0167e268 misc/rubygems/PLIST
--- a/misc/rubygems/PLIST       Mon Mar 31 15:32:36 2008 +0000
+++ b/misc/rubygems/PLIST       Mon Mar 31 15:40:43 2008 +0000
@@ -1,6 +1,5 @@
-@comment $NetBSD: PLIST,v 1.7 2008/03/13 18:46:20 jlam Exp $
+@comment $NetBSD: PLIST,v 1.8 2008/03/31 15:40:43 jlam Exp $
 bin/gem
-bin/update_rubygems
 ${RUBY_SITELIBDIR}/rbconfig/datadir.rb
 ${RUBY_SITELIBDIR}/rubygems.rb
 ${RUBY_SITELIBDIR}/rubygems/builder.rb
@@ -50,12 +49,12 @@
 ${RUBY_SITELIBDIR}/rubygems/ext/ext_conf_builder.rb
 ${RUBY_SITELIBDIR}/rubygems/ext/rake_builder.rb
 ${RUBY_SITELIBDIR}/rubygems/format.rb
-${RUBY_SITELIBDIR}/rubygems/gem_open_uri.rb
 ${RUBY_SITELIBDIR}/rubygems/gem_openssl.rb
 ${RUBY_SITELIBDIR}/rubygems/gem_path_searcher.rb
 ${RUBY_SITELIBDIR}/rubygems/gem_runner.rb
 ${RUBY_SITELIBDIR}/rubygems/indexer.rb
 ${RUBY_SITELIBDIR}/rubygems/indexer/abstract_index_builder.rb
+${RUBY_SITELIBDIR}/rubygems/indexer/latest_index_builder.rb
 ${RUBY_SITELIBDIR}/rubygems/indexer/marshal_index_builder.rb
 ${RUBY_SITELIBDIR}/rubygems/indexer/master_index_builder.rb
 ${RUBY_SITELIBDIR}/rubygems/indexer/quick_index_builder.rb
@@ -63,8 +62,14 @@
 ${RUBY_SITELIBDIR}/rubygems/installer.rb
 ${RUBY_SITELIBDIR}/rubygems/local_remote_options.rb
 ${RUBY_SITELIBDIR}/rubygems/old_format.rb
-${RUBY_SITELIBDIR}/rubygems/open-uri.rb
 ${RUBY_SITELIBDIR}/rubygems/package.rb
+${RUBY_SITELIBDIR}/rubygems/package/f_sync_dir.rb
+${RUBY_SITELIBDIR}/rubygems/package/tar_header.rb
+${RUBY_SITELIBDIR}/rubygems/package/tar_input.rb
+${RUBY_SITELIBDIR}/rubygems/package/tar_output.rb
+${RUBY_SITELIBDIR}/rubygems/package/tar_reader.rb
+${RUBY_SITELIBDIR}/rubygems/package/tar_reader/entry.rb
+${RUBY_SITELIBDIR}/rubygems/package/tar_writer.rb
 ${RUBY_SITELIBDIR}/rubygems/platform.rb
 ${RUBY_SITELIBDIR}/rubygems/remote_fetcher.rb
 ${RUBY_SITELIBDIR}/rubygems/require_paths_builder.rb
@@ -83,6 +88,8 @@
 ${RUBY_SITELIBDIR}/rubygems/version.rb
 ${RUBY_SITELIBDIR}/rubygems/version_option.rb
 ${RUBY_SITELIBDIR}/ubygems.rb
+@dirrm ${RUBY_SITELIBDIR}/rubygems/package/tar_reader
+@dirrm ${RUBY_SITELIBDIR}/rubygems/package
 @dirrm ${RUBY_SITELIBDIR}/rubygems/indexer
 @dirrm ${RUBY_SITELIBDIR}/rubygems/ext
 @dirrm ${RUBY_SITELIBDIR}/rubygems/digest
diff -r d40e4cef10f1 -r a30d0167e268 misc/rubygems/distinfo
--- a/misc/rubygems/distinfo    Mon Mar 31 15:32:36 2008 +0000
+++ b/misc/rubygems/distinfo    Mon Mar 31 15:40:43 2008 +0000
@@ -1,10 +1,13 @@
-$NetBSD: distinfo,v 1.14 2008/03/12 15:07:47 jlam Exp $
+$NetBSD: distinfo,v 1.15 2008/03/31 15:40:43 jlam Exp $
 
-SHA1 (rubygems-1.0.1.tgz) = 232750fa59917ea9baf03797fdb10a22d29ebad9
-RMD160 (rubygems-1.0.1.tgz) = b75fdf2aa252f84972495502b4b91f9e6d4c7e7c
-Size (rubygems-1.0.1.tgz) = 246165 bytes
-SHA1 (patch-aa) = 10cd33875708ec59e0a2c4a7f644de999860e810
-SHA1 (patch-ab) = bb20e3613e59ccc5b83c18e865eb5d7fc043c45c
-SHA1 (patch-ac) = 28f9792eda2a8e9c9fd80f0de551c5228c623432
-SHA1 (patch-ad) = 46718895573a6d6e82a1df6eb38aa93a22aeaa87
-SHA1 (patch-ae) = e33e4ffa7fba3e73f62cc234d0aebe38f7cb242d
+SHA1 (rubygems-1.1.0.tgz) = 2379e510267ed1c979987a618c9f139e58266d28
+RMD160 (rubygems-1.1.0.tgz) = 934b6ee3dfcd68b4ac93616ce40c4921d3f2e766
+Size (rubygems-1.1.0.tgz) = 426191 bytes
+SHA1 (patch-aa) = 43d31663301d537f4fb25df61f499e59efefc60c
+SHA1 (patch-ab) = 7713e164288dd8010867808085acba8e55b50845
+SHA1 (patch-ac) = e007358881509523f2c2821ced208f5bd9b5a232
+SHA1 (patch-ad) = b7e9a459ccb0305591db97ab7214ddc5befa24f0
+SHA1 (patch-ae) = 033fc1465fd689a5c814f7a58843945bc2fe020f
+SHA1 (patch-af) = c18ecbbf52cdd68543cd1e11742045f0295dc337
+SHA1 (patch-ag) = 699d5830c20f0f026b074e5ef4546853df022136
+SHA1 (patch-ah) = da89120c46f4f5dda46861af06bce7e6e8595c4f
diff -r d40e4cef10f1 -r a30d0167e268 misc/rubygems/patches/patch-aa
--- a/misc/rubygems/patches/patch-aa    Mon Mar 31 15:32:36 2008 +0000
+++ b/misc/rubygems/patches/patch-aa    Mon Mar 31 15:40:43 2008 +0000
@@ -1,14 +1,12 @@
-$NetBSD: patch-aa,v 1.3 2008/03/08 00:43:55 jlam Exp $
+$NetBSD: patch-aa,v 1.4 2008/03/31 15:40:43 jlam Exp $
 
-Patch by Marcus Rueckert for staged installation of gems.
-
---- lib/rubygems/commands/install_command.rb.orig      2007-12-12 19:43:02.000000000 -0500
+--- lib/rubygems/commands/install_command.rb.orig      2008-03-28 17:29:50.000000000 -0400
 +++ lib/rubygems/commands/install_command.rb
 @@ -60,6 +60,7 @@ class Gem::Commands::InstallCommand < Ge
        :format_executable => options[:format_executable],
        :ignore_dependencies => options[:ignore_dependencies],
        :install_dir => options[:install_dir],
-+      :build_root => options[:build_root],
++      :install_root => options[:install_root],
        :security_policy => options[:security_policy],
        :wrappers => options[:wrappers],
-     }
+       :bin_dir => options[:bin_dir]
diff -r d40e4cef10f1 -r a30d0167e268 misc/rubygems/patches/patch-ab
--- a/misc/rubygems/patches/patch-ab    Mon Mar 31 15:32:36 2008 +0000
+++ b/misc/rubygems/patches/patch-ab    Mon Mar 31 15:40:43 2008 +0000
@@ -1,41 +1,52 @@
-$NetBSD: patch-ab,v 1.5 2008/03/12 15:07:47 jlam Exp $
+$NetBSD: patch-ab,v 1.6 2008/03/31 15:40:43 jlam Exp $
 
-Patch by Marcus Rueckert for staged installation of gems.
-Additional changes by Johnny C. Lam to download remote gems
-into the cache directory in @build_root if specified.
-
---- lib/rubygems/dependency_installer.rb.orig  2007-12-17 22:45:04.000000000 -0500
+--- lib/rubygems/dependency_installer.rb.orig  2008-03-20 21:00:57.000000000 -0400
 +++ lib/rubygems/dependency_installer.rb
-@@ -44,6 +44,7 @@ class Gem::DependencyInstaller
+@@ -33,6 +33,7 @@ class Gem::DependencyInstaller
+   # :format_executable:: See Gem::Installer#initialize.
+   # :ignore_dependencies: Don't install any dependencies.
+   # :install_dir: See Gem::Installer#install.
++  # :install_root: See Gem::Installer#install.
+   # :security_policy: See Gem::Installer::new and Gem::Security.
+   # :wrappers: See Gem::Installer::new
+   def initialize(options = {})
+@@ -43,6 +44,7 @@ class Gem::DependencyInstaller
      @format_executable = options[:format_executable]
      @ignore_dependencies = options[:ignore_dependencies]
      @install_dir = options[:install_dir] || Gem.dir
-+    @build_root = options[:build_root]
++    @install_root = options[:install_root]
      @security_policy = options[:security_policy]
      @wrappers = options[:wrappers]
+     @bin_dir = options[:bin_dir]
+@@ -177,7 +179,12 @@ class Gem::DependencyInstaller
  
-@@ -121,9 +122,14 @@ class Gem::DependencyInstaller
-   # always replaced.
-   def download(spec, source_uri)
-     gem_file_name = "#{spec.full_name}.gem"
--    local_gem_path = File.join @install_dir, 'cache', gem_file_name
-+    installdir = @install_dir
-+    unless @build_root.nil? or @build_root == ""
-+      installdir = File.join(@build_root, @install_dir)
+     gather_dependencies
+ 
+-    spec_dir = File.join @install_dir, 'specifications'
++    install_dir = @install_dir
++    unless @install_root.nil? or @install_root == ""
++      install_dir = File.join(@install_root, @install_dir)
 +    end
 +
-+    local_gem_path = File.join installdir, 'cache', gem_file_name
++    spec_dir = File.join install_dir, 'specifications'
+     source_index = Gem::SourceIndex.from_gems_in spec_dir
+ 
+     @gems_to_install.each do |spec|
+@@ -189,7 +196,8 @@ class Gem::DependencyInstaller
+       say "Installing gem #{spec.full_name}" if Gem.configuration.really_verbose
  
--    Gem.ensure_gem_subdirectories @install_dir
-+    Gem.ensure_gem_subdirectories installdir
+       _, source_uri = @specs_and_sources.assoc spec
+-      local_gem_path = Gem::RemoteFetcher.fetcher.download spec, source_uri
++      local_gem_path = Gem::RemoteFetcher.fetcher.download spec, source_uri,
++                                                           install_dir
  
-     source_uri = URI.parse source_uri unless URI::Generic === source_uri
-     scheme = source_uri.scheme
-@@ -230,6 +236,7 @@ class Gem::DependencyInstaller
+       inst = Gem::Installer.new local_gem_path,
+                                 :env_shebang => @env_shebang,
+@@ -197,6 +205,7 @@ class Gem::DependencyInstaller
                                  :format_executable => @format_executable,
                                  :ignore_dependencies => @ignore_dependencies,
                                  :install_dir => @install_dir,
-+                                :build_root => @build_root,
++                                :install_root => @install_root,
                                  :security_policy => @security_policy,
-                                 :wrappers => @wrappers
- 
+                                 :wrappers => @wrappers,
+                                 :bin_dir => @bin_dir
diff -r d40e4cef10f1 -r a30d0167e268 misc/rubygems/patches/patch-ac
--- a/misc/rubygems/patches/patch-ac    Mon Mar 31 15:32:36 2008 +0000
+++ b/misc/rubygems/patches/patch-ac    Mon Mar 31 15:40:43 2008 +0000
@@ -1,18 +1,14 @@
-$NetBSD: patch-ac,v 1.1 2008/03/08 00:43:55 jlam Exp $
-
-Patch by Marcus Rueckert for staged installation of gems.
+$NetBSD: patch-ac,v 1.2 2008/03/31 15:40:43 jlam Exp $
 
---- lib/rubygems/install_update_options.rb.orig        2007-12-12 18:36:15.000000000 -0500
+--- lib/rubygems/install_update_options.rb.orig        2008-02-20 14:27:40.000000000 -0500
 +++ lib/rubygems/install_update_options.rb
-@@ -25,6 +25,13 @@ module Gem::InstallUpdateOptions
-       options[:install_dir] = File.expand_path(value)
+@@ -31,6 +31,11 @@ module Gem::InstallUpdateOptions
+       options[:bin_dir] = File.expand_path(value)
      end
  
-+    add_option(:"Install", '-B', '--build-root DIR',
-+               'Temporary installation root. Useful for',
-+               'building packages. Do not use when installing',
-+               'remote gems.') do |value, options|
-+      options[:build_root] = File.expand_path(value)
++    add_option(:"Install", '-B', '--install-root DIR',
++               'Root directory for gem files on install') do |value, options|
++      options[:install_root] = File.expand_path(value)
 +    end
 +
      add_option(:"Install/Update", '-d', '--[no-]rdoc',
diff -r d40e4cef10f1 -r a30d0167e268 misc/rubygems/patches/patch-ad
--- a/misc/rubygems/patches/patch-ad    Mon Mar 31 15:32:36 2008 +0000
+++ b/misc/rubygems/patches/patch-ad    Mon Mar 31 15:40:43 2008 +0000
@@ -1,30 +1,54 @@
-$NetBSD: patch-ad,v 1.1 2008/03/08 00:43:55 jlam Exp $
-
-Patch by Marcus Rueckert for staged installation of gems.
+$NetBSD: patch-ad,v 1.2 2008/03/31 15:40:43 jlam Exp $
 
---- lib/rubygems/installer.rb.orig     2007-12-20 19:43:06.000000000 -0500
+--- lib/rubygems/installer.rb.orig     2008-03-28 21:10:33.000000000 -0400
 +++ lib/rubygems/installer.rb
-@@ -73,6 +73,14 @@ class Gem::Installer
+@@ -51,6 +51,9 @@ class Gem::Installer
+   #          for a signed-gems-only policy.
+   # :ignore_dependencies:: Don't raise if a dependency is missing.
+   # :install_dir:: The directory to install the gem into.
++  # :install_root:: The directory to use as a buildroot for "destdir"-style
++  #             installation.  All paths during installation are relative
++  #               to the buildroot.
+   # :format_executable:: Format the executable the same as the ruby executable.
+   #                      If your ruby is ruby18, foo_exec will be installed as
+   #                      foo_exec18.
+@@ -62,6 +65,7 @@ class Gem::Installer
+     options = {
+       :force => false,
+       :install_dir => Gem.dir,
++      :install_root => nil,
+       :exec_format => false,
+       :env_shebang => false,
+       :bin_dir => nil
+@@ -70,12 +74,17 @@ class Gem::Installer
+     @env_shebang = options[:env_shebang]
+     @force = options[:force]
+     gem_home = options[:install_dir]
+-    @gem_home = Pathname.new(gem_home).expand_path
++    @gem_home = File.expand_path gem_home
+     @ignore_dependencies = options[:ignore_dependencies]
      @format_executable = options[:format_executable]
      @security_policy = options[:security_policy]
      @wrappers = options[:wrappers]
-+    @build_root = options[:build_root]
-+    @bin_dir = Gem.bindir @gem_home
-+    unless @build_root.nil? or @build_root == ""
-+      @build_root = Pathname.new(@build_root).expand_path
-+      @gem_home = File.join(@build_root, @gem_home)
-+      @bin_dir = File.join(@build_root, @bin_dir)
+     @bin_dir = options[:bin_dir]
++    install_root = options[:install_root]
++    unless install_root.nil? or install_root == ""
++      @install_root = File.expand_path install_root
++      @gem_home = File.join(@install_root, @gem_home)
 +    end
-+
  
      begin
        @format = Gem::Format.from_file_by_path @gem, @security_policy
-@@ -224,7 +232,7 @@ class Gem::Installer
+@@ -227,7 +236,11 @@ class Gem::Installer
      # If the user has asked for the gem to be installed in a directory that is
      # the system gem directory, then use the system bin directory, else create
      # (or use) a new bin dir under the gem_home.
--    bindir = Gem.bindir @gem_home
-+    bindir = @bin_dir



Home | Main Index | Thread Index | Old Index