[packages/ruby-rails] - disable sprockets (unable to build execjs deps) - updated deps

baggins baggins at pld-linux.org
Thu Sep 4 20:53:36 CEST 2014


commit 96bf0031423145758732fb9f4e7617cb363997e5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Sep 4 20:23:53 2014 +0200

    - disable sprockets (unable to build execjs deps)
    - updated deps

 disable-sprockets.patch |  11 ++
 ruby-rails-paths.patch  | 333 ------------------------------------------------
 ruby-rails.spec         |  48 ++++---
 3 files changed, 41 insertions(+), 351 deletions(-)
---
diff --git a/ruby-rails.spec b/ruby-rails.spec
index 2c848d2..7f27d0f 100644
--- a/ruby-rails.spec
+++ b/ruby-rails.spec
@@ -12,42 +12,49 @@ Source0:	http://rubygems.org/downloads/railties-%{version}.gem
 Source1:	http://rubygems.org/downloads/rails-%{version}.gem
 # Source1-md5:	3545800bc87637a368eb9614b5309a4e
 URL:		http://www.rubyonrails.org/
+Patch0:		system-bundle.patch
+Patch1:		disable-sprockets.patch
 BuildRequires:	rpmbuild(macros) >= 1.277
 BuildRequires:	ruby-bundler >= 1.0.3
 BuildRequires:	ruby-modules >= 1.9.2
-Requires:	ruby-modules >= 1.9.2
-Requires:	ruby-railties = %{version}-%{release}
 Requires:	ruby-actionmailer = %{version}
 Requires:	ruby-actionpack = %{version}
 Requires:	ruby-activerecord = %{version}
 Requires:	ruby-activeresource = %{version}
 Requires:	ruby-activesupport = %{version}
-Requires:	ruby-multi_json >= 1.0
+Requires:	ruby-arel >= 3.0.2
 Requires:	ruby-builder >= 3.0.0
+Requires:	ruby-erubis >= 2.7.0
 Requires:	ruby-i18n >= 0.6.4
+Requires:	ruby-journey >= 1.0.4
+Requires:	ruby-mail >= 2.5.4
+Requires:	ruby-modules >= 1.9.2
+Requires:	ruby-multi_json >= 1.0
+Requires:	ruby-polyglot >= 0.3.1
 Requires:	ruby-rack >= 1.4.5
+Requires:	ruby-rack-cache >= 1.2
 Requires:	ruby-rack-test >= 0.6.1
+Requires:	ruby-railties = %{version}-%{release}
+Requires:	ruby-treetop >= 1.4.8
+Requires:	ruby-tzinfo >= 0.3.29
+Conflicts:	ruby-arel >= 3.1
+Conflicts:	ruby-builder >= 4.0
+Conflicts:	ruby-erubis >= 2.8.0
+Conflicts:	ruby-i18n >= 1.0
+Conflicts:	ruby-journey >= 1.1
+Conflicts:	ruby-mail >= 2.6
+Conflicts:	ruby-multi_json >= 2.0
 Conflicts:	ruby-rack >= 1.5
+Conflicts:	ruby-rack-cache >= 2.0
 Conflicts:	ruby-rack-test >= 0.7
-Conflicts:	ruby-multi_json >= 2.0
-Conflicts:	ruby-i18n >= 1.0
-Conflicts:	ruby-builder >= 4.0
+Conflicts:	ruby-treetop >= 1.5
+Conflicts:	ruby-tzinfo >= 0.4
 Obsoletes:	railties
 Obsoletes:	ruby-Rails
-#BuildArch:	noarch
+BuildArch:	noarch
 %{?ruby_mod_ver_requires_eq}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-#journey ~> 1.0.4
-#rack-cache (~> 1.2)
-#sprockets (~> 2.2.1)
-#erubis (~> 2.7.0)
-#arel (~> 3.0.2)
-#tzinfo (~> 0.3.29)
-#mail (~> 2.5.4)
-#treetop (~> 1.4.8)
-#polyglot (>= 0.3.1)
-
 # nothing to be placed there. we're not noarc only because of ruby packaging
 %define		_enable_debug_packages	0
 
@@ -72,7 +79,9 @@ Requires:	ruby-coffee-rails >= 3.2.1
 Requires:	ruby-jquery-rails
 Requires:	ruby-sass-rails >= 3.2.3
 Requires:	ruby-sqlite3
-Requires:	uglifier >= 1.0.3
+#Suggests:	ruby-uglifier >= 1.0.3
+#Suggests:	ruby-sprockets >= 2.2.1
+#Conflicts:	ruby-sprockets >= 2.3
 Conflicts:	ruby-coffee-rails >= 3.3
 Conflicts:	sass-rails >= 3.3
 
@@ -112,6 +121,9 @@ Dokumentacji w formacie ri dla %{pkgname}.
 install -d railgem
 %{__tar} xf %{SOURCE1} -C railgem/
 
+%patch0 -p1
+%patch1 -p1
+
 find -newer README.rdoc -o -print | xargs touch --reference %{SOURCE0}
 
 %{__grep} -rl '/usr/bin/env' . | xargs %{__sed} -i -e '
diff --git a/disable-sprockets.patch b/disable-sprockets.patch
new file mode 100644
index 0000000..c2af2ce
--- /dev/null
+++ b/disable-sprockets.patch
@@ -0,0 +1,11 @@
+--- rails-3.2.19/lib/rails/generators/app_base.rb~	2014-09-04 01:19:44.000000000 +0200
++++ rails-3.2.19/lib/rails/generators/app_base.rb	2014-09-04 20:15:51.501465339 +0200
+@@ -37,7 +37,7 @@
+         class_option :skip_active_record, :type => :boolean, :aliases => "-O", :default => false,
+                                           :desc => "Skip Active Record files"
+ 
+-        class_option :skip_sprockets,     :type => :boolean, :aliases => "-S", :default => false,
++        class_option :skip_sprockets,     :type => :boolean, :aliases => "-S", :default => true,
+                                           :desc => "Skip Sprockets files"
+ 
+         class_option :database,           :type => :string, :aliases => "-d", :default => "sqlite3",
diff --git a/ruby-rails-paths.patch b/ruby-rails-paths.patch
deleted file mode 100644
index 033a461..0000000
--- a/ruby-rails-paths.patch
+++ /dev/null
@@ -1,333 +0,0 @@
- bin/rails                                          |    9 +-
- environments/boot.rb                               |   55 +--------
- lib/initializer.rb                                 |   20 +++-
- lib/rails/backtrace_cleaner.rb                     |    2 +-
- lib/rails/gem_builder.rb                           |    7 +-
- lib/rails/vendor_gem_source_index.rb               |    5 +-
- lib/rails_generator.rb                             |   10 +--
- .../generators/applications/app/app_generator.rb   |    6 +-
- lib/rubyprof_ext.rb                                |   35 ------
- lib/tasks/framework.rake                           |    2 +-
- 20 files changed, 57 insertions(+), 280 deletions(-)
-
-diff --git a/bin/rails b/bin/rails
-index 6a0c675..9cd410a 100755
---- a/bin/rails
-+++ b/bin/rails
-@@ -1,7 +1,8 @@
--require File.dirname(__FILE__) + '/../lib/ruby_version_check'
-+#!/usr/bin/ruby
-+
- Signal.trap("INT") { puts; exit }
- 
--require File.dirname(__FILE__) + '/../lib/rails/version'
-+require 'rails/version'
- if %w(--version -v).include? ARGV.first
-   puts "Rails #{Rails::VERSION::STRING}"
-   exit(0)
-@@ -11,10 +12,10 @@ freeze   = ARGV.any? { |option| %w(--freeze -f).include?(option) }
- 
- app_path = ARGV.first
- 
--require File.dirname(__FILE__) + '/../lib/rails_generator'
-+require 'rails_generator'
- 
- require 'rails_generator/scripts/generate'
- Rails::Generator::Base.use_application_sources!
- Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app')
- 
--Dir.chdir(app_path) { `rake rails:freeze:gems`; puts "froze" } if freeze
-\ No newline at end of file
-+Dir.chdir(app_path) { `rake rails:freeze:gems`; puts "froze" } if freeze
-diff --git a/environments/boot.rb b/environments/boot.rb
-index dd5e3b6..c39a225 100644
---- a/environments/boot.rb
-+++ b/environments/boot.rb
-@@ -17,7 +17,7 @@ module Rails
-     end
- 
-     def pick_boot
--      (vendor_rails? ? VendorBoot : GemBoot).new
-+      (vendor_rails? ? VendorBoot : SystemBoot).new
-     end
- 
-     def vendor_rails?
-@@ -48,61 +48,10 @@ module Rails
-     end
-   end
- 
--  class GemBoot < Boot
-+  class SystemBoot < Boot
-     def load_initializer
--      self.class.load_rubygems
--      load_rails_gem
-       require 'initializer'
-     end
--
--    def load_rails_gem
--      if version = self.class.gem_version
--        gem 'rails', version
--      else
--        gem 'rails'
--      end
--    rescue Gem::LoadError => load_error
--      $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
--      exit 1
--    end
--
--    class << self
--      def rubygems_version
--        Gem::RubyGemsVersion rescue nil
--      end
--
--      def gem_version
--        if defined? RAILS_GEM_VERSION
--          RAILS_GEM_VERSION
--        elsif ENV.include?('RAILS_GEM_VERSION')
--          ENV['RAILS_GEM_VERSION']
--        else
--          parse_gem_version(read_environment_rb)
--        end
--      end
--
--      def load_rubygems
--        min_version = '1.3.2'
--        require 'rubygems'
--        unless rubygems_version >= min_version
--          $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
--          exit 1
--        end
--
--      rescue LoadError
--        $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
--        exit 1
--      end
--
--      def parse_gem_version(text)
--        $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
--      end
--
--      private
--        def read_environment_rb
--          File.read("#{RAILS_ROOT}/config/environment.rb")
--        end
--    end
-   end
- end
- 
-diff --git a/lib/initializer.rb b/lib/initializer.rb
-index 196bd93..ac973a6 100644
---- a/lib/initializer.rb
-+++ b/lib/initializer.rb
-@@ -1,13 +1,19 @@
-+begin
-+  # Sooner or later rubygems will be loaded.  Better do it early.
-+  require 'rubygems'
-+  CAN_HAS_GEMS = true
-+rescue LoadError
-+  CAN_HAS_GEMS = false
-+end
- require 'logger'
- require 'set'
- require 'pathname'
- 
--$LOAD_PATH.unshift File.dirname(__FILE__)
- require 'railties_path'
- require 'rails/version'
- require 'rails/plugin/locator'
- require 'rails/plugin/loader'
--require 'rails/gem_dependency'
-+require 'rails/gem_dependency' if CAN_HAS_GEMS
- require 'rails/rack'
- 
- 
-@@ -215,6 +221,7 @@ module Rails
-     # Active Resource. This allows Gem plugins to depend on Rails even when
-     # the Gem version of Rails shouldn't be loaded.
-     def install_gem_spec_stubs
-+      return unless CAN_HAS_GEMS
-       unless Rails.respond_to?(:vendor_rails?)
-         abort %{Your config/boot.rb is outdated: Run "rake rails:update".}
-       end
-@@ -295,6 +302,7 @@ module Rails
-     end
- 
-     def add_gem_load_paths
-+      return unless CAN_HAS_GEMS
-       Rails::GemDependency.add_frozen_gem_path
-       unless @configuration.gems.empty?
-         require "rubygems"
-@@ -328,6 +336,10 @@ Run `rake gems:build` to build the unbuilt gems.
-     end
- 
-     def check_gem_dependencies
-+      unless CAN_HAS_GEMS
-+        @gems_dependencies_loaded = true
-+        return
-+      end
-       unloaded_gems = @configuration.gems.reject { |g| g.loaded? }
-       if unloaded_gems.size > 0
-         @gems_dependencies_loaded = false
-@@ -1052,12 +1064,12 @@ Run `rake gems:install` to install the missing gems.
-       end
- 
-       def default_plugin_paths
--        ["#{root_path}/vendor/plugins"]
-+        ["#{root_path}/vendor/plugins", "#{RAILTIES_PATH}/plugins"]
-       end
- 
-       def default_plugin_locators
-         locators = []
--        locators << Plugin::GemLocator if defined? Gem
-+        locators << Plugin::GemLocator if CAN_HAS_GEMS
-         locators << Plugin::FileSystemLocator
-       end
- 
-diff --git a/lib/rails/backtrace_cleaner.rb b/lib/rails/backtrace_cleaner.rb
-index 923ed8b..41c15fe 100644
---- a/lib/rails/backtrace_cleaner.rb
-+++ b/lib/rails/backtrace_cleaner.rb
-@@ -19,7 +19,7 @@ module Rails
-       add_filter   { |line| line.sub(ERB_METHOD_SIG, '') }
-       add_filter   { |line| line.sub('./', '/') } # for tests
- 
--      add_gem_filters
-+      add_gem_filters if defined? Gem
- 
-       add_silencer { |line| ALL_NOISE.any? { |dir| line.include?(dir) } }
-       add_silencer { |line| RAILS_GEMS.any? { |gem| line =~ /^#{gem} / } }
-diff --git a/lib/rails/gem_builder.rb b/lib/rails/gem_builder.rb
-index 79c61cc..801ebad 100644
---- a/lib/rails/gem_builder.rb
-+++ b/lib/rails/gem_builder.rb
-@@ -1,5 +1,8 @@
--require 'rubygems'
--require 'rubygems/installer'
-+begin
-+  require 'rubygems'
-+  require 'rubygems/installer'
-+rescue LoadError
-+end
- 
- module Rails
-   
-diff --git a/lib/rails/vendor_gem_source_index.rb b/lib/rails/vendor_gem_source_index.rb
-index 5b7721f..5d9f66b 100644
---- a/lib/rails/vendor_gem_source_index.rb
-+++ b/lib/rails/vendor_gem_source_index.rb
-@@ -1,4 +1,7 @@
--require 'rubygems'
-+begin
-+  require 'rubygems'
-+rescue LoadError
-+end
- require 'yaml'
- 
- module Rails
-diff --git a/lib/rails_generator.rb b/lib/rails_generator.rb
-index 9f0ffc1..2fbcfa6 100644
---- a/lib/rails_generator.rb
-+++ b/lib/rails_generator.rb
-@@ -21,15 +21,7 @@
- # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- #++
- 
--$:.unshift(File.dirname(__FILE__))
--$:.unshift(File.dirname(__FILE__) + "/../../activesupport/lib")
--
--begin
--  require 'active_support'  
--rescue LoadError
--  require 'rubygems'
--  gem 'activesupport'
--end
-+require 'active_support'  
- 
- require 'rails_generator/base'
- require 'rails_generator/lookup'
-diff --git a/lib/rails_generator/generators/applications/app/app_generator.rb b/lib/rails_generator/generators/applications/app/app_generator.rb
-index c8c2239..14beeb8 100644
---- a/lib/rails_generator/generators/applications/app/app_generator.rb
-+++ b/lib/rails_generator/generators/applications/app/app_generator.rb
-@@ -1,6 +1,7 @@
- require 'rbconfig'
- require File.dirname(__FILE__) + '/template_runner'
- require 'digest/md5' 
-+require 'railties_path'
- require 'active_support/secure_random'
- 
- class AppGenerator < Rails::Generator::Base
-@@ -9,11 +10,10 @@ class AppGenerator < Rails::Generator::Base
-   DATABASES        = %w( mysql oracle postgresql sqlite2 sqlite3 frontbase ibm_db )
-   DEFAULT_DATABASE = 'sqlite3'
- 
--  mandatory_options :source => "#{File.dirname(__FILE__)}/../../../../.."
-+  mandatory_options :source => RAILTIES_PATH
-   default_options   :db => (ENV["RAILS_DEFAULT_DATABASE"] || DEFAULT_DATABASE),
-     :shebang => DEFAULT_SHEBANG, :with_dispatchers => false, :freeze => false
- 
--
-   def initialize(runtime_args, runtime_options = {})
-     super
- 
-@@ -260,4 +260,4 @@ class AppGenerator < Rails::Generator::Base
-         "/opt/lampp/var/mysql/mysql.sock"         # xampp for linux
-       ].find { |f| File.exist?(f) } unless RUBY_PLATFORM =~ /(:?mswin|mingw)/
-     end
--end
-\ No newline at end of file
-+end
-diff --git a/lib/rubyprof_ext.rb b/lib/rubyprof_ext.rb
-deleted file mode 100644
-index f6e9035..0000000
---- a/lib/rubyprof_ext.rb
-+++ /dev/null
-@@ -1,35 +0,0 @@
--require 'prof'
--
--module Prof #:nodoc:
--  # Adapted from Shugo Maeda's unprof.rb
--  def self.print_profile(results, io = $stderr)
--    total = results.detect { |i|
--      i.method_class.nil? && i.method_id == :"#toplevel"
--    }.total_time
--    total = 0.001 if total < 0.001
--
--    io.puts "  %%   cumulative   self              self     total"
--    io.puts " time   seconds   seconds    calls  ms/call  ms/call  name"
--
--    sum = 0.0
--    for r in results
--      sum += r.self_time
--
--      name =  if r.method_class.nil?
--                r.method_id.to_s
--              elsif r.method_class.is_a?(Class)
--                "#{r.method_class}##{r.method_id}"
--              else
--                "#{r.method_class}.#{r.method_id}"
--              end
--      io.printf "%6.2f %8.3f  %8.3f %8d %8.2f %8.2f  %s\n",
--        r.self_time / total * 100,
--        sum,
--        r.self_time,
--        r.count,
--        r.self_time * 1000 / r.count,
--        r.total_time * 1000 / r.count,
--        name
--    end
--  end
--end
-diff --git a/lib/tasks/framework.rake b/lib/tasks/framework.rake
-index 191c936..fc3108c 100644
---- a/lib/tasks/framework.rake
-+++ b/lib/tasks/framework.rake
-@@ -90,7 +90,7 @@ namespace :rails do
-     desc "Add new scripts to the application script/ directory"
-     task :scripts do
-       local_base = "script"
--      edge_base  = "#{File.dirname(__FILE__)}/../../bin"
-+      edge_base  = "#{RAILTIES_PATH}/bin"
- 
-       local = Dir["#{local_base}/**/*"].reject { |path| File.directory?(path) }
-       edge  = Dir["#{edge_base}/**/*"].reject { |path| File.directory?(path) }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby-rails.git/commitdiff/58e11fa52344f8235f6a936fd39368a77270b84f



More information about the pld-cvs-commit mailing list