add redmine package

+849
+100
pkgs/applications/version-management/redmine/2002_FHS_through_env_vars.patch
··· 1 + Description: FHS through env vars 2 + Forwarded: not-needed 3 + Author: Jérémy Lal <kapouer@melix.org> 4 + Last-Update: 2013-09-28 5 + --- redmine.orig/app/models/attachment.rb 6 + +++ redmine/app/models/attachment.rb 7 + @@ -46,10 +46,10 @@ class Attachment < ActiveRecord::Base 8 + "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"} 9 + 10 + cattr_accessor :storage_path 11 + - @@storage_path = Redmine::Configuration['attachments_storage_path'] || File.join(Rails.root, "files") 12 + + @@storage_path = Redmine::Configuration['attachments_storage_path'] || ENV['RAILS_VAR'] ? File.join(ENV['RAILS_VAR'], "files") : File.join(Rails.root, "files") 13 + 14 + cattr_accessor :thumbnails_storage_path 15 + - @@thumbnails_storage_path = File.join(Rails.root, "tmp", "thumbnails") 16 + + @@thumbnails_storage_path = ENV['RAILS_TMP'] ? File.join(ENV['RAILS_TMP'], "thumbnails") : File.join(Rails.root, "tmp", "thumbnails") 17 + 18 + before_save :files_to_final_location 19 + after_destroy :delete_from_disk 20 + --- redmine.orig/lib/redmine/configuration.rb 21 + +++ redmine/lib/redmine/configuration.rb 22 + @@ -32,7 +32,7 @@ module Redmine 23 + # * <tt>:file</tt>: the configuration file to load (default: config/configuration.yml) 24 + # * <tt>:env</tt>: the environment to load the configuration for (default: Rails.env) 25 + def load(options={}) 26 + - filename = options[:file] || File.join(Rails.root, 'config', 'configuration.yml') 27 + + filename = options[:file] || ENV['RAILS_ETC'] ? File.join(ENV['RAILS_ETC'], 'configuration.yml') : File.join(Rails.root, 'config', 'configuration.yml') 28 + env = options[:env] || Rails.env 29 + 30 + @config = @defaults.dup 31 + @@ -103,7 +103,7 @@ module Redmine 32 + end 33 + 34 + def load_deprecated_email_configuration(env) 35 + - deprecated_email_conf = File.join(Rails.root, 'config', 'email.yml') 36 + + deprecated_email_conf = ENV['RAILS_ETC'] ? File.join(ENV['RAILS_ETC'], 'email.yml') : File.join(Rails.root, 'config', 'email.yml') 37 + if File.file?(deprecated_email_conf) 38 + warn "Storing outgoing emails configuration in config/email.yml is deprecated. You should now store it in config/configuration.yml using the email_delivery setting." 39 + @config.merge!({'email_delivery' => load_from_yaml(deprecated_email_conf, env)}) 40 + --- redmine.orig/lib/redmine/export/pdf.rb 41 + +++ redmine/lib/redmine/export/pdf.rb 42 + @@ -38,7 +38,7 @@ module Redmine 43 + attr_accessor :footer_date 44 + 45 + def initialize(lang, orientation='P') 46 + - @@k_path_cache = Rails.root.join('tmp', 'pdf') 47 + + @@k_path_cache = ENV['RAILS_TMP'] ? File.join(ENV['RAILS_TMP'], 'pdf') : Rails.root.join('tmp', 'pdf') 48 + FileUtils.mkdir_p @@k_path_cache unless File::exist?(@@k_path_cache) 49 + set_language_if_valid lang 50 + pdf_encoding = l(:general_pdf_encoding).upcase 51 + --- redmine.orig/config/application.rb 52 + +++ redmine/config/application.rb 53 + @@ -52,8 +63,21 @@ module RedmineApp 54 + # Do not include all helpers 55 + config.action_controller.include_all_helpers = false 56 + 57 + + # move tmp directory to RAILS_TMP 58 + + config.paths['tmp'] = ENV['RAILS_TMP'] 59 + + 60 + config.session_store :cookie_store, :key => '_redmine_session' 61 + 62 + + # log path 63 + + config.paths['log'] = File.join(ENV['RAILS_LOG'], "#{Rails.env}.log") unless !ENV['RAILS_LOG'] 64 + + 65 + + config.paths['public'] = ENV['RAILS_PUBLIC'] unless !ENV['RAILS_PUBLIC'] 66 + + 67 + + config.cache_store = :file_store, File.join(ENV['RAILS_TMP'], "cache") 68 + + 69 + + # Set Active Record's database.yml path 70 + + config.paths['config/database'] = File.join(ENV['RAILS_ETC'], 'database.yml') unless !ENV['RAILS_ETC'] 71 + + 72 + if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) 73 + instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb')) 74 + end 75 + --- redmine.orig/lib/plugins/rfpdf/lib/tcpdf.rb 76 + +++ redmine/lib/plugins/rfpdf/lib/tcpdf.rb 77 + @@ -89,10 +89,10 @@ class TCPDF 78 + @@k_small_ratio = 2/3.0 79 + 80 + cattr_accessor :k_path_cache 81 + - @@k_path_cache = Rails.root.join('tmp') 82 + + @@k_path_cache = ENV['RAILS_TMP'] ? ENV['RAILS_TMP'] : Rails.root.join('tmp') 83 + 84 + cattr_accessor :k_path_url_cache 85 + - @@k_path_url_cache = Rails.root.join('tmp') 86 + + @@k_path_url_cache = ENV['RAILS_TMP'] ? ENV['RAILS_TMP'] : Rails.root.join('tmp') 87 + 88 + attr_accessor :barcode 89 + 90 + --- redmine.orig/lib/redmine/scm/adapters/abstract_adapter.rb 91 + +++ redmine/lib/redmine/scm/adapters/abstract_adapter.rb 92 + @@ -222,7 +222,7 @@ module Redmine 93 + if @stderr_log_file.nil? 94 + writable = false 95 + path = Redmine::Configuration['scm_stderr_log_file'].presence 96 + - path ||= Rails.root.join("log/#{Rails.env}.scm.stderr.log").to_s 97 + + path ||= ENV['RAILS_LOG'] ? File.join(ENV['RAILS_LOG'], "#{Rails.env}.scm.stderr.log").to_s : Rails.root.join("log/#{Rails.env}.scm.stderr.log").to_s 98 + if File.exists?(path) 99 + if File.file?(path) && File.writable?(path) 100 + writable = true
+72
pkgs/applications/version-management/redmine/2003_externalize_session_config.patch
··· 1 + Description: Externalize session config to yml in /etc 2 + Forwarded: not-needed 3 + Author: Jérémy Lal <kapouer@melix.org> 4 + Last-Update: 2010-01-10 5 + --- redmine.orig/lib/tasks/initializers.rake 6 + +++ redmine/lib/tasks/initializers.rake 7 + @@ -1,11 +1,12 @@ 8 + desc 'Generates a secret token for the application.' 9 + +task :generate_secret_token do 10 + 11 + -file 'config/initializers/secret_token.rb' do 12 + - path = File.join(Rails.root, 'config', 'initializers', 'secret_token.rb') 13 + - secret = SecureRandom.hex(40) 14 + - File.open(path, 'w') do |f| 15 + - f.write <<"EOF" 16 + -# This file was generated by 'rake generate_secret_token', and should 17 + +filename = ENV['YML_SESSION_FILENAME'] ? ENV['YML_SESSION_FILENAME'] : 'session.yml' 18 + +path = File.join(ENV['RAILS_ETC'] ? ENV['RAILS_ETC'] : File.join(Rails.root, 'config'), filename) 19 + +secret = SecureRandom.hex(40) 20 + +File.open(path, 'w') do |f| 21 + + f.write <<"EOF" 22 + +# This file was generated by 'rake generate_session_store', 23 + # not be made visible to public. 24 + # If you have a load-balancing Redmine cluster, you will need to use the 25 + # same version of this file on each machine. And be sure to restart your 26 + @@ -15,10 +18,18 @@ file 'config/initializers/secret_token.r 27 + # change this key, all old sessions will become invalid! Make sure the 28 + # secret is at least 30 characters and all random, no regular words or 29 + # you'll be exposed to dictionary attacks. 30 + -RedmineApp::Application.config.secret_token = '#{secret}' 31 + + 32 + +production: 33 + + key: _redmine_ 34 + + secret: #{secret} 35 + + 36 + +development: 37 + + key: _redmine_ 38 + + secret: #{secret} 39 + + 40 + +test: 41 + + key: _redmine_ 42 + + secret: #{secret} 43 + EOF 44 + end 45 + end 46 + - 47 + -desc 'Generates a secret token for the application.' 48 + -task :generate_secret_token => ['config/initializers/secret_token.rb'] 49 + --- redmine.orig/config/application.rb 50 + +++ redmine/config/application.rb 51 + @@ -66,7 +66,20 @@ module RedmineApp 52 + # move tmp directory to RAILS_TMP 53 + config.paths['tmp'] = ENV['RAILS_TMP'] 54 + 55 + - config.session_store :cookie_store, :key => '_redmine_session' 56 + + # loads cookie based session session and secret keys 57 + + # this is needed here because initializers are loaded after plugins, 58 + + # and some plugins initialize ActionController which requires a secret to be set. 59 + + # crash if file not found 60 + + relativeUrlRoot = ENV['RAILS_RELATIVE_URL_ROOT'] 61 + + filename = ENV['RAILS_ETC'] ? File.join(ENV['RAILS_ETC'], 'session.yml') : File.join(File.dirname(__FILE__), '..', 'session.yml') 62 + + if File.exists?(filename) 63 + + sessionconfig = YAML::load_file(filename) 64 + + config.session_store :cookie_store, :key => sessionconfig[Rails.env]['key'], :path => (relativeUrlRoot.blank?) ? '/' : relativeUrlRoot 65 + + config.secret_token = sessionconfig[Rails.env]['secret'] 66 + + else 67 + + # temporary settings before session.yml is created 68 + + config.session_store :cookie_store, :key => '_redmine_session', :path => (relativeUrlRoot.blank?) ? '/' : relativeUrlRoot 69 + + end 70 + 71 + # log path 72 + config.paths['log'] = File.join(ENV['RAILS_LOG'], "#{Rails.env}.log") unless !ENV['RAILS_LOG']
+11
pkgs/applications/version-management/redmine/2004_FHS_plugins_assets.patch
··· 1 + --- redmine.orig/lib/redmine/plugin.rb 2 + +++ redmine/lib/redmine/plugin.rb 3 + @@ -47,7 +47,7 @@ module Redmine #:nodoc: 4 + self.directory = File.join(Rails.root, 'plugins') 5 + 6 + cattr_accessor :public_directory 7 + - self.public_directory = File.join(Rails.root, 'public', 'plugin_assets') 8 + + self.public_directory = ENV['RAILS_TMP'] ? File.join(ENV['RAILS_TMP'], 'plugin_assets') : File.join(Rails.root, 'public', 'plugin_assets') 9 + 10 + @registered_plugins = {} 11 + class << self
+152
pkgs/applications/version-management/redmine/Gemfile.lock
··· 1 + GEM 2 + remote: https://rubygems.org/ 3 + specs: 4 + actionmailer (3.2.19) 5 + actionpack (= 3.2.19) 6 + mail (~> 2.5.4) 7 + actionpack (3.2.19) 8 + activemodel (= 3.2.19) 9 + activesupport (= 3.2.19) 10 + builder (~> 3.0.0) 11 + erubis (~> 2.7.0) 12 + journey (~> 1.0.4) 13 + rack (~> 1.4.5) 14 + rack-cache (~> 1.2) 15 + rack-test (~> 0.6.1) 16 + sprockets (~> 2.2.1) 17 + activemodel (3.2.19) 18 + activesupport (= 3.2.19) 19 + builder (~> 3.0.0) 20 + activerecord (3.2.19) 21 + activemodel (= 3.2.19) 22 + activesupport (= 3.2.19) 23 + arel (~> 3.0.2) 24 + tzinfo (~> 0.3.29) 25 + activeresource (3.2.19) 26 + activemodel (= 3.2.19) 27 + activesupport (= 3.2.19) 28 + activesupport (3.2.19) 29 + i18n (~> 0.6, >= 0.6.4) 30 + multi_json (~> 1.0) 31 + arel (3.0.3) 32 + awesome_nested_set (2.1.6) 33 + activerecord (>= 3.0.0) 34 + builder (3.0.0) 35 + capybara (2.1.0) 36 + mime-types (>= 1.16) 37 + nokogiri (>= 1.3.3) 38 + rack (>= 1.0.0) 39 + rack-test (>= 0.5.4) 40 + xpath (~> 2.0) 41 + childprocess (0.5.5) 42 + ffi (~> 1.0, >= 1.0.11) 43 + coderay (1.1.0) 44 + erubis (2.7.0) 45 + fastercsv (1.5.5) 46 + ffi (1.9.5) 47 + hike (1.2.3) 48 + i18n (0.6.11) 49 + journey (1.0.4) 50 + jquery-rails (2.0.3) 51 + railties (>= 3.1.0, < 5.0) 52 + thor (~> 0.14) 53 + json (1.8.1) 54 + mail (2.5.4) 55 + mime-types (~> 1.16) 56 + treetop (~> 1.4.8) 57 + metaclass (0.0.4) 58 + mime-types (1.25.1) 59 + mini_portile (0.6.0) 60 + mocha (1.0.0) 61 + metaclass (~> 0.0.1) 62 + multi_json (1.10.1) 63 + net-ldap (0.3.1) 64 + nokogiri (1.6.3.1) 65 + mini_portile (= 0.6.0) 66 + pg (0.17.1) 67 + polyglot (0.3.5) 68 + rack (1.4.5) 69 + rack-cache (1.2) 70 + rack (>= 0.4) 71 + rack-openid (1.4.2) 72 + rack (>= 1.1.0) 73 + ruby-openid (>= 2.1.8) 74 + rack-ssl (1.3.4) 75 + rack 76 + rack-test (0.6.2) 77 + rack (>= 1.0) 78 + rails (3.2.19) 79 + actionmailer (= 3.2.19) 80 + actionpack (= 3.2.19) 81 + activerecord (= 3.2.19) 82 + activeresource (= 3.2.19) 83 + activesupport (= 3.2.19) 84 + bundler (~> 1.0) 85 + railties (= 3.2.19) 86 + railties (3.2.19) 87 + actionpack (= 3.2.19) 88 + activesupport (= 3.2.19) 89 + rack-ssl (~> 1.3.2) 90 + rake (>= 0.8.7) 91 + rdoc (~> 3.4) 92 + thor (>= 0.14.6, < 2.0) 93 + rake (10.1.1) 94 + rdoc (3.12.2) 95 + json (~> 1.4) 96 + redcarpet (2.3.0) 97 + rmagick (2.13.3) 98 + ruby-openid (2.3.0) 99 + rubyzip (1.1.6) 100 + selenium-webdriver (2.43.0) 101 + childprocess (~> 0.5) 102 + multi_json (~> 1.0) 103 + rubyzip (~> 1.0) 104 + websocket (~> 1.0) 105 + shoulda (3.3.2) 106 + shoulda-context (~> 1.0.1) 107 + shoulda-matchers (~> 1.4.1) 108 + shoulda-context (1.0.2) 109 + shoulda-matchers (1.4.1) 110 + activesupport (>= 3.0.0) 111 + sprockets (2.2.2) 112 + hike (~> 1.2) 113 + multi_json (~> 1.0) 114 + rack (~> 1.0) 115 + tilt (~> 1.1, != 1.3.0) 116 + thor (0.19.1) 117 + tilt (1.4.1) 118 + treetop (1.4.15) 119 + polyglot 120 + polyglot (>= 0.3.1) 121 + tzinfo (0.3.41) 122 + websocket (1.2.1) 123 + xpath (2.0.0) 124 + nokogiri (~> 1.3) 125 + yard (0.8.7.4) 126 + 127 + PLATFORMS 128 + ruby 129 + 130 + DEPENDENCIES 131 + activerecord-jdbc-adapter (~> 1.3.2) 132 + activerecord-jdbcpostgresql-adapter 133 + awesome_nested_set (= 2.1.6) 134 + builder (= 3.0.0) 135 + capybara (~> 2.1.0) 136 + coderay (~> 1.1.0) 137 + fastercsv (~> 1.5.0) 138 + jquery-rails (~> 2.0.2) 139 + mime-types 140 + mocha (~> 1.0.0) 141 + net-ldap (~> 0.3.1) 142 + pg (>= 0.11.0) 143 + rack-openid 144 + rails (= 3.2.19) 145 + rake (~> 10.1.1) 146 + rdoc (>= 2.4.2) 147 + redcarpet (~> 2.3.0) 148 + rmagick (>= 2.0.0) 149 + ruby-openid (~> 2.3.0) 150 + selenium-webdriver 151 + shoulda (~> 3.3.2) 152 + yard
+332
pkgs/applications/version-management/redmine/Gemfile.nix
··· 1 + [ 2 + { 3 + name = "actionmailer"; 4 + hash = "cd9f0b22f755b0adeae13cf949adaf63fa1c068c72d0a100572c6a11aecd3ba7"; 5 + url = "http://rubygems.org/downloads/actionmailer-3.2.19.gem"; 6 + version = "3.2.19"; 7 + } 8 + { 9 + name = "actionpack"; 10 + hash = "c58ca2342aff2062f4f478551ce46d81918ac93200bc62d099764d2cd7499fcd"; 11 + url = "http://rubygems.org/downloads/actionpack-3.2.19.gem"; 12 + version = "3.2.19"; 13 + } 14 + { 15 + name = "activemodel"; 16 + hash = "4ea3abf790eca9ee8228e9e2a465350e258294270a639b63f0e1dfad236fe70e"; 17 + url = "http://rubygems.org/downloads/activemodel-3.2.19.gem"; 18 + version = "3.2.19"; 19 + } 20 + { 21 + name = "activerecord"; 22 + hash = "052945ad510744aaa3e35a817a6f515a2316e7dd96df6460f75b36067bb60372"; 23 + url = "http://rubygems.org/downloads/activerecord-3.2.19.gem"; 24 + version = "3.2.19"; 25 + } 26 + { 27 + name = "activeresource"; 28 + hash = "8617d24537ca937cc67aac46aaa29782510d66136605426d0a23a3585a839daf"; 29 + url = "http://rubygems.org/downloads/activeresource-3.2.19.gem"; 30 + version = "3.2.19"; 31 + } 32 + { 33 + name = "activesupport"; 34 + hash = "2c837a59250da14b12a6b0cfb6774f0afae90aa749fd96ad4347344d8417ad3d"; 35 + url = "http://rubygems.org/downloads/activesupport-3.2.19.gem"; 36 + version = "3.2.19"; 37 + } 38 + { 39 + name = "arel"; 40 + hash = "c0006e2169deee3b8cc2d258296388822eeb2db59832450b9b7316e1387d0da4"; 41 + url = "http://rubygems.org/downloads/arel-3.0.3.gem"; 42 + version = "3.0.3"; 43 + } 44 + { 45 + name = "awesome_nested_set"; 46 + hash = "0dcd801aea5048f5ab907b62b4174b6763b191eaa4e1e11bb83f996f01349af8"; 47 + url = "http://rubygems.org/downloads/awesome_nested_set-2.1.6.gem"; 48 + version = "2.1.6"; 49 + } 50 + { 51 + name = "builder"; 52 + hash = "fbd3e15e5de02245f7d649b3415b2c2875cdc9a14dccde89aa30fc14a314618e"; 53 + url = "http://rubygems.org/downloads/builder-3.0.0.gem"; 54 + version = "3.0.0"; 55 + } 56 + { 57 + name = "capybara"; 58 + hash = "a9a19f8d6bb2dfcb1f05ea3e1727cb556d1cba0d234d1712b481e8d4f7bbb91e"; 59 + url = "http://rubygems.org/downloads/capybara-2.1.0.gem"; 60 + version = "2.1.0"; 61 + } 62 + { 63 + name = "childprocess"; 64 + hash = "9b583295a11932d2eeffa1e8f5b8fb2fb0064a2f0111ad98c3b752b94f80bf33"; 65 + url = "http://rubygems.org/downloads/childprocess-0.5.5.gem"; 66 + version = "0.5.5"; 67 + } 68 + { 69 + name = "coderay"; 70 + hash = "5a943c59e36f7ef9dd2677855735656413af02e3f302431e9c548aabe89f3c15"; 71 + url = "http://rubygems.org/downloads/coderay-1.1.0.gem"; 72 + version = "1.1.0"; 73 + } 74 + { 75 + name = "erubis"; 76 + hash = "63653f5174a7997f6f1d6f465fbe1494dcc4bdab1fb8e635f6216989fb1148ba"; 77 + url = "http://rubygems.org/downloads/erubis-2.7.0.gem"; 78 + version = "2.7.0"; 79 + } 80 + { 81 + name = "fastercsv"; 82 + hash = "d098199e62e4e10eec436a9ea9b8c189dacd5c06f2825f00d1e0f1c29fdbc3b5"; 83 + url = "http://rubygems.org/downloads/fastercsv-1.5.5.gem"; 84 + version = "1.5.5"; 85 + } 86 + { 87 + name = "ffi"; 88 + hash = "0d2ef90163eef8545689e8dfc27fb1245a2d82e3500d587de1e38290629e662f"; 89 + url = "http://rubygems.org/downloads/ffi-1.9.5.gem"; 90 + version = "1.9.5"; 91 + } 92 + { 93 + name = "hike"; 94 + hash = "154e2f2593845e5bcd8ed2ba3092600c55c6ad8c630722857de3fdaf334ccc44"; 95 + url = "http://rubygems.org/downloads/hike-1.2.3.gem"; 96 + version = "1.2.3"; 97 + } 98 + { 99 + name = "i18n"; 100 + hash = "b37dda25b30484f2674a851e24ae098a38564a61c976fa91a34bf8fceaa3923b"; 101 + url = "http://rubygems.org/downloads/i18n-0.6.11.gem"; 102 + version = "0.6.11"; 103 + } 104 + { 105 + name = "journey"; 106 + hash = "7454b8612530784000fbb17ea2df749a71b70702a0ac8ebef4a1e7f05aecc10f"; 107 + url = "http://rubygems.org/downloads/journey-1.0.4.gem"; 108 + version = "1.0.4"; 109 + } 110 + { 111 + name = "jquery-rails"; 112 + hash = "cc4eab342fb3b1fcbb2fc1c9a61b09ecd86d795b1f74d607994b0bc6fd5ef444"; 113 + url = "http://rubygems.org/downloads/jquery-rails-2.0.3.gem"; 114 + version = "2.0.3"; 115 + } 116 + { 117 + name = "json"; 118 + hash = "961bfbbfa9fda1e857e9c791e964e6664e0d43bf687b19669dfbc7cdbc5e0200"; 119 + url = "http://rubygems.org/downloads/json-1.8.1.gem"; 120 + version = "1.8.1"; 121 + } 122 + { 123 + name = "mail"; 124 + hash = "446585c38b062121252688dcc9cc70af1f470822e30db021bb97d185969e257c"; 125 + url = "http://rubygems.org/downloads/mail-2.5.4.gem"; 126 + version = "2.5.4"; 127 + } 128 + { 129 + name = "metaclass"; 130 + hash = "8569685c902108b1845be4e5794d646f2a8adcb0280d7651b600dab0844fe942"; 131 + url = "http://rubygems.org/downloads/metaclass-0.0.4.gem"; 132 + version = "0.0.4"; 133 + } 134 + { 135 + name = "mime-types"; 136 + hash = "88ef3c596481678710ffd4018fa40f1999b02d97babea39682ba7d5badd21f56"; 137 + url = "http://rubygems.org/downloads/mime-types-1.25.1.gem"; 138 + version = "1.25.1"; 139 + } 140 + { 141 + name = "mini_portile"; 142 + hash = "762b3e241362de24b2eb2bb1b98638399b931e9e51bece5f8e2df7611eb16c26"; 143 + url = "http://rubygems.org/downloads/mini_portile-0.6.0.gem"; 144 + version = "0.6.0"; 145 + } 146 + { 147 + name = "mocha"; 148 + hash = "788fd93c8009a7e0eebd155509953e5987f4681902aad666a294283baa09899a"; 149 + url = "http://rubygems.org/downloads/mocha-1.0.0.gem"; 150 + version = "1.0.0"; 151 + } 152 + { 153 + name = "multi_json"; 154 + hash = "2c98979877e87df0b338ebf5c86091b390f53d62c11a8232bd51ca007e0b82d2"; 155 + url = "http://rubygems.org/downloads/multi_json-1.10.1.gem"; 156 + version = "1.10.1"; 157 + } 158 + { 159 + name = "net-ldap"; 160 + hash = "953551665fb0d398740a72a26314c6d34bd70fa35419c96dc58351f17d9a5081"; 161 + url = "http://rubygems.org/downloads/net-ldap-0.3.1.gem"; 162 + version = "0.3.1"; 163 + } 164 + { 165 + name = "nokogiri"; 166 + hash = "91761a654439406b5bed71adf6092d49829e26332b4c0e7c8a23a2e628442585"; 167 + url = "http://rubygems.org/downloads/nokogiri-1.6.3.1.gem"; 168 + version = "1.6.3.1"; 169 + } 170 + { 171 + name = "pg"; 172 + hash = "e7933e8f7f184c28e820ed85ddfb3ad8a13933b2b2ab8656aa8f81cb0aa610a6"; 173 + url = "http://rubygems.org/downloads/pg-0.17.1.gem"; 174 + version = "0.17.1"; 175 + } 176 + { 177 + name = "polyglot"; 178 + hash = "59d66ef5e3c166431c39cb8b7c1d02af419051352f27912f6a43981b3def16af"; 179 + url = "http://rubygems.org/downloads/polyglot-0.3.5.gem"; 180 + version = "0.3.5"; 181 + } 182 + { 183 + name = "rack"; 184 + hash = "f7bf3faa8e09a2ff26475372de36a724e7470d6bdc33d189a0ec34b49605f308"; 185 + url = "http://rubygems.org/downloads/rack-1.4.5.gem"; 186 + version = "1.4.5"; 187 + } 188 + { 189 + name = "rack-cache"; 190 + hash = "02bfed05f8b3266db804f2fa445801636ca2c6d211a3137ec796f88af5756e1c"; 191 + url = "http://rubygems.org/downloads/rack-cache-1.2.gem"; 192 + version = "1.2"; 193 + } 194 + { 195 + name = "rack-openid"; 196 + hash = "8cd2305e738463a7da98791f9ac4df4cf3f6ed27908d982350430694ac2fe869"; 197 + url = "http://rubygems.org/downloads/rack-openid-1.4.2.gem"; 198 + version = "1.4.2"; 199 + } 200 + { 201 + name = "rack-ssl"; 202 + hash = "d703764fa2a0d44a2163d6add65be89f5dba4477d1959b90d3727682a9c37dcf"; 203 + url = "http://rubygems.org/downloads/rack-ssl-1.3.4.gem"; 204 + version = "1.3.4"; 205 + } 206 + { 207 + name = "rack-test"; 208 + hash = "7e920b6aac888e4a3846e5997fb1cbf456bdb5846322b58dc31697a54a38b306"; 209 + url = "http://rubygems.org/downloads/rack-test-0.6.2.gem"; 210 + version = "0.6.2"; 211 + } 212 + { 213 + name = "rails"; 214 + hash = "33b64cf78dfcf3206d961ce03e8fe6d260081da696e60da39d0b2a4a160fe22b"; 215 + url = "http://rubygems.org/downloads/rails-3.2.19.gem"; 216 + version = "3.2.19"; 217 + } 218 + { 219 + name = "railties"; 220 + hash = "c569009ee5c005190d208ac228087fdc094b10c6f0cf209f1d12c552b447cc10"; 221 + url = "http://rubygems.org/downloads/railties-3.2.19.gem"; 222 + version = "3.2.19"; 223 + } 224 + { 225 + name = "rake"; 226 + hash = "85e446590871dd3469c80dfe70a0296c20b76a9006af6b728c1f47d0b460412d"; 227 + url = "http://rubygems.org/downloads/rake-10.1.1.gem"; 228 + version = "10.1.1"; 229 + } 230 + { 231 + name = "rdoc"; 232 + hash = "a8e2b78f7e5ec4cc4716cd863975645f2f2377dc6db267a15e427e5fae2633ed"; 233 + url = "http://rubygems.org/downloads/rdoc-3.12.2.gem"; 234 + version = "3.12.2"; 235 + } 236 + { 237 + name = "redcarpet"; 238 + hash = "5c9bcc307fba97ff5a25eec74f08365c17e929d2a5c707db32d6fc99ec81f0b9"; 239 + url = "http://rubygems.org/downloads/redcarpet-2.3.0.gem"; 240 + version = "2.3.0"; 241 + } 242 + { 243 + name = "rmagick"; 244 + hash = "109f3b8be90afdea9abbdd2a79a955cd808b5cad65d937ed12676da22870d3b4"; 245 + url = "http://rubygems.org/downloads/rmagick-2.13.3.gem"; 246 + version = "2.13.3"; 247 + } 248 + { 249 + name = "ruby-openid"; 250 + hash = "f69ed004e95f7094e23bfd8bc9ebfb1dc88a7b46637252ca2907a1189870ea7b"; 251 + url = "http://rubygems.org/downloads/ruby-openid-2.3.0.gem"; 252 + version = "2.3.0"; 253 + } 254 + { 255 + name = "rubyzip"; 256 + hash = "a996435ee9698be6a09d3748f4d23ee15aaf45cbfef1749def165af6ea3c0a9e"; 257 + url = "http://rubygems.org/downloads/rubyzip-1.1.6.gem"; 258 + version = "1.1.6"; 259 + } 260 + { 261 + name = "selenium-webdriver"; 262 + hash = "09fe4374d1541cb45403ad1238c2d88129f3afb985218635af087a06c99a521a"; 263 + url = "http://rubygems.org/downloads/selenium-webdriver-2.43.0.gem"; 264 + version = "2.43.0"; 265 + } 266 + { 267 + name = "shoulda"; 268 + hash = "52e70b71cbfb7c01dace14e268a62d86c21ddd1e5ec0116c8b1e632d8e04e412"; 269 + url = "http://rubygems.org/downloads/shoulda-3.3.2.gem"; 270 + version = "3.3.2"; 271 + } 272 + { 273 + name = "shoulda-context"; 274 + hash = "ee5559aa13248c70fdec6868a3c144adf7438c904c59d1a76b04a002e5151de5"; 275 + url = "http://rubygems.org/downloads/shoulda-context-1.0.2.gem"; 276 + version = "1.0.2"; 277 + } 278 + { 279 + name = "shoulda-matchers"; 280 + hash = "c35693cbfa84213212dffbc2c87487427ef364927340151329a842f0a06086b9"; 281 + url = "http://rubygems.org/downloads/shoulda-matchers-1.4.1.gem"; 282 + version = "1.4.1"; 283 + } 284 + { 285 + name = "sprockets"; 286 + hash = "fae893b7e86e83c1936f6f2a64db3550510f86eabdd5fa9f0f23fb25d7e0cf96"; 287 + url = "http://rubygems.org/downloads/sprockets-2.2.2.gem"; 288 + version = "2.2.2"; 289 + } 290 + { 291 + name = "thor"; 292 + hash = "9ff834f031b5550c743bb8a3139317fefdae9cdebd02d60de376658f427fe522"; 293 + url = "http://rubygems.org/downloads/thor-0.19.1.gem"; 294 + version = "0.19.1"; 295 + } 296 + { 297 + name = "tilt"; 298 + hash = "39820562c4f5db45fe18de87ccc30a0e77a998bf5334b1d8c10a2f7dbc1f5903"; 299 + url = "http://rubygems.org/downloads/tilt-1.4.1.gem"; 300 + version = "1.4.1"; 301 + } 302 + { 303 + name = "treetop"; 304 + hash = "ffa68f201c0f62c26b0a1d13233d73194400596964696843f87ebb5d812f12ff"; 305 + url = "http://rubygems.org/downloads/treetop-1.4.15.gem"; 306 + version = "1.4.15"; 307 + } 308 + { 309 + name = "tzinfo"; 310 + hash = "381b22fd1744a35d0a0239f563f505773681e626e6d900063b14cb9b1b68e98c"; 311 + url = "http://rubygems.org/downloads/tzinfo-0.3.41.gem"; 312 + version = "0.3.41"; 313 + } 314 + { 315 + name = "websocket"; 316 + hash = "e626c8c3e8593735d900265fb1fc3439fd06b394069860177d8f40733b12ae9e"; 317 + url = "http://rubygems.org/downloads/websocket-1.2.1.gem"; 318 + version = "1.2.1"; 319 + } 320 + { 321 + name = "xpath"; 322 + hash = "9ca4a1cc88d9ab16c591468cce7b5d00ee06a8a76b841f8438970c7a44c86c12"; 323 + url = "http://rubygems.org/downloads/xpath-2.0.0.gem"; 324 + version = "2.0.0"; 325 + } 326 + { 327 + name = "yard"; 328 + hash = "e65a26f9b9dc6e2aa9b1d1d2e1a45bee3edf540a6a7e6c30fa6aa1df7f7a29b4"; 329 + url = "http://rubygems.org/downloads/yard-0.8.7.4.gem"; 330 + version = "0.8.7.4"; 331 + } 332 + ]
+6
pkgs/applications/version-management/redmine/README
··· 1 + to regenerate Gemfile.nix and Gemfile.lock you need to 2 + 3 + % nix-build bootstrap.nix 4 + % cp result/Gemfile.nix ./ 5 + % cp result/Gemfile.lock ./ 6 +
+45
pkgs/applications/version-management/redmine/bootstrap.nix
··· 1 + { pkgs ? import <nixpkgs> {} 2 + }: 3 + 4 + with pkgs; 5 + 6 + let 7 + 8 + in stdenv.mkDerivation rec { 9 + version = "2.5.2"; 10 + name = "redmine-${version}"; 11 + __noChroot = true; 12 + src = fetchurl { 13 + url = "http://www.redmine.org/releases/${name}.tar.gz"; 14 + sha256 = "0x0zwxyj4dwbk7l64s3lgny10mjf0ba8jwrbafsm4d72sncmacv0"; 15 + }; 16 + buildInputs = [ 17 + ruby rubyLibs.bundler libiconv libxslt libxml2 pkgconfig 18 + libffi imagemagickBig postgresql which stdenv 19 + ]; 20 + installPhase = '' 21 + unset http_proxy 22 + unset ftp_proxy 23 + 24 + cp -R . $out 25 + cp ${./generate_nix_requirements.rb} $out/generate_nix_requirements.rb 26 + cd $out 27 + 28 + cat > config/database.yml <<EOF 29 + production: 30 + adapter: postgresql 31 + EOF 32 + 33 + bundle config --local build.nokogiri --use-system-libraries \ 34 + --with-iconv-dir=${libiconv} \ 35 + --with-xslt-dir=${libxslt} \ 36 + --with-xml2-dir=${libxml2} \ 37 + --with-pkg-config \ 38 + --with-pg-config=${postgresql}/bin/pg_config 39 + 40 + bundle install --verbose --without development test rmagick --path /tmp/redmine-${version} 41 + 42 + HOME="/tmp/redmine-${version}" ruby generate_nix_requirements.rb 43 + rm -R /tmp/gems 44 + ''; 45 + }
+73
pkgs/applications/version-management/redmine/default.nix
··· 1 + { stdenv, fetchurl, ruby, rubyLibs, libiconv, libxslt, libxml2, pkgconfig, libffi, imagemagickBig, postgresql }: 2 + 3 + let 4 + gemspec = map (gem: fetchurl { url=gem.url; sha256=gem.hash; }) (import ./Gemfile.nix); 5 + in stdenv.mkDerivation rec { 6 + version = "2.5.2"; 7 + name = "redmine-${version}"; 8 + 9 + src = fetchurl { 10 + url = "http://www.redmine.org/releases/${name}.tar.gz"; 11 + sha256 = "0x0zwxyj4dwbk7l64s3lgny10mjf0ba8jwrbafsm4d72sncmacv0"; 12 + }; 13 + 14 + # taken from redmine (2.5.1-2~bpo70+3) in debian wheezy-backports 15 + # needed to separate run-time and build-time directories 16 + patches = [ 17 + ./2002_FHS_through_env_vars.patch 18 + ./2004_FHS_plugins_assets.patch 19 + ./2003_externalize_session_config.patch 20 + ]; 21 + postPatch = '' 22 + substituteInPlace lib/redmine/plugin.rb --replace "File.join(Rails.root, 'plugins')" "ENV['RAILS_PLUGINS']" 23 + substituteInPlace lib/redmine/plugin.rb --replace "File.join(Rails.root, 'plugins', id.to_s, 'db', 'migrate')" "File.join(ENV['RAILS_PLUGINS'], id.to_s, 'db', 'migrate')" 24 + substituteInPlace config/routes.rb --replace '"plugins/*", Rails.root' 'ENV["RAILS_PLUGINS"] + "/*"' 25 + ''; 26 + 27 + buildInputs = [ 28 + ruby rubyLibs.bundler libiconv libxslt libxml2 pkgconfig libffi 29 + imagemagickBig postgresql 30 + ]; 31 + 32 + installPhase = '' 33 + mkdir -p $out/share/redmine/ 34 + cp -R . $out/share/redmine/ 35 + cd $out/share/redmine 36 + ln -s ${./Gemfile.lock} Gemfile.lock 37 + export HOME=$(pwd) 38 + 39 + cat > config/database.yml <<EOF 40 + production: 41 + adapter: postgresql 42 + EOF 43 + 44 + mkdir -p vendor/cache 45 + ${stdenv.lib.concatStrings (map (gem: "ln -s ${gem} vendor/cache/${gem.name};") gemspec)} 46 + 47 + bundle config build.nokogiri \ 48 + --use-system-libraries \ 49 + --with-iconv-dir=${libiconv} \ 50 + --with-xslt-dir=${libxslt} \ 51 + --with-xml2-dir=${libxml2} \ 52 + --with-pkg-config \ 53 + --with-pg-config=${postgresql}/bin/pg_config 54 + 55 + bundle install --verbose --local --deployment 56 + 57 + # make sure we always load pg package 58 + echo "gem \"pg\"" >> Gemfile 59 + 60 + # make rails server happy 61 + mkdir -p tmp/pids 62 + 63 + # cleanup 64 + rm config/database.yml 65 + ''; 66 + 67 + meta = with stdenv.lib; { 68 + homepage = http://www.redmine.org/; 69 + platforms = platforms.linux; 70 + maintainers = [ maintainers.garbas ]; 71 + license = licenses.gpl2; 72 + }; 73 + }
+56
pkgs/applications/version-management/redmine/generate_nix_requirements.rb
··· 1 + #!/usr/bin/env ruby 2 + 3 + require 'rubygems' 4 + require 'bundler' 5 + require 'fileutils' 6 + require 'net/http' 7 + require 'net/https' 8 + require 'uri' 9 + 10 + TMP_DIR = "/tmp/gems" 11 + 12 + FileUtils.rm_rf(TMP_DIR) if File.exists?(TMP_DIR) 13 + FileUtils.mkdir TMP_DIR 14 + 15 + GEMSERVER = "http://rubygems.org" 16 + 17 + # inspect Gemfile.lock 18 + lockfile = Bundler::LockfileParser.new(Bundler.read_file("Gemfile.lock")) 19 + 20 + to_mirror = {} 21 + 22 + uri = URI(GEMSERVER) 23 + http = Net::HTTP.new(uri.host, uri.port) 24 + http.use_ssl = uri.scheme == 'https' 25 + 26 + requirements = {} 27 + 28 + lockfile.specs.each do |s| 29 + possible_gem_name = "#{s.name}-#{s.version.to_s}.gem" 30 + 31 + Dir.chdir TMP_DIR do 32 + filename = `gem fetch #{s.name} -v #{s.version.to_s}`.split()[1] 33 + hash = `sha256sum #{filename}.gem` 34 + url = "#{GEMSERVER}/downloads/#{filename}.gem" 35 + puts url 36 + requirements[s.name] = { :version => s.version.to_s, 37 + :hash => hash.split().first, 38 + :url => url,} 39 + 40 + end 41 + end 42 + 43 + filename = 'Gemfile.nix' 44 + 45 + File.open(filename, 'w') do |file| 46 + file.puts "[" 47 + requirements.each do |name, info| 48 + file.puts "{" 49 + file.puts ['name = ', '"', name, '";'].join('') 50 + file.puts ['hash = ', '"', info[:hash], '";'].join('') 51 + file.puts ['url = ', '"', info[:url], '";'].join('') 52 + file.puts ['version = ', '"', info[:version], '";'].join('') 53 + file.puts "}" 54 + end 55 + file.puts "]" 56 + end
+2
pkgs/top-level/all-packages.nix
··· 2081 2081 2082 2082 privateer = callPackage ../games/privateer { }; 2083 2083 2084 + redmine = callPackage ../applications/version-management/redmine { }; 2085 + 2084 2086 rtmpdump = callPackage ../tools/video/rtmpdump { }; 2085 2087 2086 2088 reaverwps = callPackage ../tools/networking/reaver-wps {};