Merge pull request #45353 from aanderse/redmine

redmine: 2.5.2 -> 3.4.6

authored by Michael Raskin and committed by GitHub 980cbff9 abfd2143

+916 -960
+148 -138
nixos/modules/services/misc/redmine.nix
··· 1 { config, lib, pkgs, ... }: 2 3 - # TODO: support non-postgresql 4 - 5 with lib; 6 7 let 8 cfg = config.services.redmine; 9 10 - ruby = pkgs.ruby; 11 12 - databaseYml = '' 13 production: 14 - adapter: postgresql 15 - database: ${cfg.databaseName} 16 - host: ${cfg.databaseHost} 17 - password: ${cfg.databasePassword} 18 - username: ${cfg.databaseUsername} 19 - encoding: utf8 20 ''; 21 22 - configurationYml = '' 23 default: 24 - # Absolute path to the directory where attachments are stored. 25 - # The default is the 'files' directory in your Redmine instance. 26 - # Your Redmine instance needs to have write permission on this 27 - # directory. 28 - # Examples: 29 - # attachments_storage_path: /var/redmine/files 30 - # attachments_storage_path: D:/redmine/files 31 - attachments_storage_path: ${cfg.stateDir}/files 32 - 33 - # Absolute path to the SCM commands errors (stderr) log file. 34 - # The default is to log in the 'log' directory of your Redmine instance. 35 - # Example: 36 - # scm_stderr_log_file: /var/log/redmine_scm_stderr.log 37 - scm_stderr_log_file: ${cfg.stateDir}/redmine_scm_stderr.log 38 39 - ${cfg.extraConfig} 40 ''; 41 42 - unpackTheme = unpack "theme"; 43 - unpackPlugin = unpack "plugin"; 44 - unpack = id: (name: source: 45 - pkgs.stdenv.mkDerivation { 46 - name = "redmine-${id}-${name}"; 47 - buildInputs = [ pkgs.unzip ]; 48 - buildCommand = '' 49 - mkdir -p $out 50 - cd $out 51 - unpackFile ${source} 52 - ''; 53 - }); 54 - 55 - in { 56 57 options = { 58 services.redmine = { 59 enable = mkOption { 60 type = types.bool; 61 default = false; 62 - description = '' 63 - Enable the redmine service. 64 - ''; 65 }; 66 67 stateDir = mkOption { 68 type = types.str; 69 - default = "/var/redmine"; 70 - description = "The state directory, logs and plugins are stored here"; 71 }; 72 73 extraConfig = mkOption { 74 type = types.lines; 75 default = ""; 76 - description = "Extra configuration in configuration.yml"; 77 - }; 78 79 - themes = mkOption { 80 - type = types.attrsOf types.path; 81 - default = {}; 82 - description = "Set of themes"; 83 }; 84 85 - plugins = mkOption { 86 - type = types.attrsOf types.path; 87 - default = {}; 88 - description = "Set of plugins"; 89 - }; 90 91 - #databaseType = mkOption { 92 - # type = types.str; 93 - # default = "postgresql"; 94 - # description = "Type of database"; 95 - #}; 96 97 - databaseHost = mkOption { 98 - type = types.str; 99 - default = "127.0.0.1"; 100 - description = "Database hostname"; 101 - }; 102 103 - databasePassword = mkOption { 104 - type = types.str; 105 - default = ""; 106 - description = "Database user password"; 107 - }; 108 109 - databaseName = mkOption { 110 - type = types.str; 111 - default = "redmine"; 112 - description = "Database name"; 113 - }; 114 115 - databaseUsername = mkOption { 116 - type = types.str; 117 - default = "redmine"; 118 - description = "Database user"; 119 }; 120 }; 121 }; ··· 123 config = mkIf cfg.enable { 124 125 assertions = [ 126 - { assertion = cfg.databasePassword != ""; 127 - message = "services.redmine.databasePassword must be set"; 128 } 129 ]; 130 131 - users.users = [ 132 - { name = "redmine"; 133 - group = "redmine"; 134 - uid = config.ids.uids.redmine; 135 - } ]; 136 - 137 - users.groups = [ 138 - { name = "redmine"; 139 - gid = config.ids.gids.redmine; 140 - } ]; 141 142 systemd.services.redmine = { 143 - after = [ "network.target" "postgresql.service" ]; 144 wantedBy = [ "multi-user.target" ]; 145 environment.RAILS_ENV = "production"; 146 - environment.RAILS_ETC = "${cfg.stateDir}/config"; 147 - environment.RAILS_LOG = "${cfg.stateDir}/log"; 148 - environment.RAILS_VAR = "${cfg.stateDir}/var"; 149 environment.RAILS_CACHE = "${cfg.stateDir}/cache"; 150 - environment.RAILS_PLUGINS = "${cfg.stateDir}/plugins"; 151 - environment.RAILS_PUBLIC = "${cfg.stateDir}/public"; 152 - environment.RAILS_TMP = "${cfg.stateDir}/tmp"; 153 - environment.SCHEMA = "${cfg.stateDir}/cache/schema.db"; 154 - environment.HOME = "${pkgs.redmine}/share/redmine"; 155 environment.REDMINE_LANG = "en"; 156 - environment.GEM_HOME = "${pkgs.redmine}/share/redmine/vendor/bundle/ruby/1.9.1"; 157 - environment.GEM_PATH = "${pkgs.bundler}/${pkgs.bundler.ruby.gemPath}"; 158 path = with pkgs; [ 159 imagemagickBig 160 - subversion 161 - mercurial 162 cvs 163 - config.services.postgresql.package 164 - bazaar 165 gitAndTools.git 166 - # once we build binaries for darc enable it 167 - #darcs 168 ]; 169 preStart = '' 170 - # TODO: use env vars 171 - for i in plugins public/plugin_assets db files log config cache var/files tmp; do 172 mkdir -p ${cfg.stateDir}/$i 173 done 174 175 - chown -R redmine:redmine ${cfg.stateDir} 176 - chmod -R 755 ${cfg.stateDir} 177 178 - rm -rf ${cfg.stateDir}/public/* 179 - cp -R ${pkgs.redmine}/share/redmine/public/* ${cfg.stateDir}/public/ 180 - for theme in ${concatStringsSep " " (mapAttrsToList unpackTheme cfg.themes)}; do 181 - ln -fs $theme/* ${cfg.stateDir}/public/themes/ 182 - done 183 184 - rm -rf ${cfg.stateDir}/plugins/* 185 - for plugin in ${concatStringsSep " " (mapAttrsToList unpackPlugin cfg.plugins)}; do 186 - ln -fs $plugin/* ${cfg.stateDir}/plugins/''${plugin##*-redmine-plugin-} 187 - done 188 189 - ln -fs ${pkgs.writeText "database.yml" databaseYml} ${cfg.stateDir}/config/database.yml 190 - ln -fs ${pkgs.writeText "configuration.yml" configurationYml} ${cfg.stateDir}/config/configuration.yml 191 192 - if [ "${cfg.databaseHost}" = "127.0.0.1" ]; then 193 - if ! test -e "${cfg.stateDir}/db-created"; then 194 - psql postgres -c "CREATE ROLE redmine WITH LOGIN NOCREATEDB NOCREATEROLE ENCRYPTED PASSWORD '${cfg.databasePassword}'" 195 - ${config.services.postgresql.package}/bin/createdb --owner redmine redmine || true 196 - touch "${cfg.stateDir}/db-created" 197 - fi 198 fi 199 200 - cd ${pkgs.redmine}/share/redmine/ 201 - ${ruby}/bin/rake db:migrate 202 - ${ruby}/bin/rake redmine:plugins:migrate 203 - ${ruby}/bin/rake redmine:load_default_data 204 - ${ruby}/bin/rake generate_secret_token 205 ''; 206 207 serviceConfig = { 208 PermissionsStartOnly = true; # preStart must be run as root 209 Type = "simple"; 210 - User = "redmine"; 211 - Group = "redmine"; 212 TimeoutSec = "300"; 213 WorkingDirectory = "${pkgs.redmine}/share/redmine"; 214 - ExecStart="${ruby}/bin/ruby ${pkgs.redmine}/share/redmine/script/rails server webrick -e production -P ${cfg.stateDir}/redmine.pid"; 215 }; 216 217 }; 218 219 }; 220
··· 1 { config, lib, pkgs, ... }: 2 3 with lib; 4 5 let 6 cfg = config.services.redmine; 7 8 + bundle = "${pkgs.redmine}/share/redmine/bin/bundle"; 9 10 + databaseYml = pkgs.writeText "database.yml" '' 11 production: 12 + adapter: ${cfg.database.type} 13 + database: ${cfg.database.name} 14 + host: ${cfg.database.host} 15 + port: ${toString cfg.database.port} 16 + username: ${cfg.database.user} 17 + password: #dbpass# 18 ''; 19 20 + configurationYml = pkgs.writeText "configuration.yml" '' 21 default: 22 + scm_subversion_command: ${pkgs.subversion}/bin/svn 23 + scm_mercurial_command: ${pkgs.mercurial}/bin/hg 24 + scm_git_command: ${pkgs.gitAndTools.git}/bin/git 25 + scm_cvs_command: ${pkgs.cvs}/bin/cvs 26 + scm_bazaar_command: ${pkgs.bazaar}/bin/bzr 27 + scm_darcs_command: ${pkgs.darcs}/bin/darcs 28 29 + ${cfg.extraConfig} 30 ''; 31 32 + in 33 34 + { 35 options = { 36 services.redmine = { 37 enable = mkOption { 38 type = types.bool; 39 default = false; 40 + description = "Enable the Redmine service."; 41 + }; 42 + 43 + user = mkOption { 44 + type = types.str; 45 + default = "redmine"; 46 + description = "User under which Redmine is ran."; 47 + }; 48 + 49 + group = mkOption { 50 + type = types.str; 51 + default = "redmine"; 52 + description = "Group under which Redmine is ran."; 53 }; 54 55 stateDir = mkOption { 56 type = types.str; 57 + default = "/var/lib/redmine"; 58 + description = "The state directory, logs and plugins are stored here."; 59 }; 60 61 extraConfig = mkOption { 62 type = types.lines; 63 default = ""; 64 + description = '' 65 + Extra configuration in configuration.yml. 66 67 + See https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration 68 + ''; 69 }; 70 71 + database = { 72 + type = mkOption { 73 + type = types.enum [ "mysql2" "postgresql" ]; 74 + example = "postgresql"; 75 + default = "mysql2"; 76 + description = "Database engine to use."; 77 + }; 78 79 + host = mkOption { 80 + type = types.str; 81 + default = "127.0.0.1"; 82 + description = "Database host address."; 83 + }; 84 85 + port = mkOption { 86 + type = types.int; 87 + default = 3306; 88 + description = "Database host port."; 89 + }; 90 91 + name = mkOption { 92 + type = types.str; 93 + default = "redmine"; 94 + description = "Database name."; 95 + }; 96 97 + user = mkOption { 98 + type = types.str; 99 + default = "redmine"; 100 + description = "Database user."; 101 + }; 102 103 + password = mkOption { 104 + type = types.str; 105 + default = ""; 106 + description = '' 107 + The password corresponding to <option>database.user</option>. 108 + Warning: this is stored in cleartext in the Nix store! 109 + Use <option>database.passwordFile</option> instead. 110 + ''; 111 + }; 112 + 113 + passwordFile = mkOption { 114 + type = types.nullOr types.path; 115 + default = null; 116 + example = "/run/keys/redmine-dbpassword"; 117 + description = '' 118 + A file containing the password corresponding to 119 + <option>database.user</option>. 120 + ''; 121 + }; 122 }; 123 }; 124 }; ··· 126 config = mkIf cfg.enable { 127 128 assertions = [ 129 + { assertion = cfg.database.passwordFile != null || cfg.database.password != ""; 130 + message = "either services.redmine.database.passwordFile or services.redmine.database.password must be set"; 131 } 132 ]; 133 134 + environment.systemPackages = [ pkgs.redmine ]; 135 136 systemd.services.redmine = { 137 + after = [ "network.target" (if cfg.database.type == "mysql2" then "mysql.service" else "postgresql.service") ]; 138 wantedBy = [ "multi-user.target" ]; 139 + environment.HOME = "${pkgs.redmine}/share/redmine"; 140 environment.RAILS_ENV = "production"; 141 environment.RAILS_CACHE = "${cfg.stateDir}/cache"; 142 environment.REDMINE_LANG = "en"; 143 + environment.SCHEMA = "${cfg.stateDir}/cache/schema.db"; 144 path = with pkgs; [ 145 imagemagickBig 146 + bazaar 147 cvs 148 + darcs 149 gitAndTools.git 150 + mercurial 151 + subversion 152 ]; 153 preStart = '' 154 + # start with a fresh config directory every time 155 + rm -rf ${cfg.stateDir}/config 156 + cp -r ${pkgs.redmine}/share/redmine/config.dist ${cfg.stateDir}/config 157 + 158 + # create the basic state directory layout pkgs.redmine expects 159 + mkdir -p /run/redmine 160 + 161 + for i in config files log plugins tmp; do 162 mkdir -p ${cfg.stateDir}/$i 163 + ln -fs ${cfg.stateDir}/$i /run/redmine/$i 164 done 165 166 + # ensure cache directory exists for db:migrate command 167 + mkdir -p ${cfg.stateDir}/cache 168 169 + # link in the application configuration 170 + ln -fs ${configurationYml} ${cfg.stateDir}/config/configuration.yml 171 172 + chmod -R ug+rwX,o-rwx+x ${cfg.stateDir}/ 173 174 + # handle database.passwordFile 175 + DBPASS=$(head -n1 ${cfg.database.passwordFile}) 176 + cp -f ${databaseYml} ${cfg.stateDir}/config/database.yml 177 + sed -e "s,#dbpass#,$DBPASS,g" -i ${cfg.stateDir}/config/database.yml 178 + chmod 440 ${cfg.stateDir}/config/database.yml 179 180 + # generate a secret token if required 181 + if ! test -e "${cfg.stateDir}/config/initializers/secret_token.rb"; then 182 + ${bundle} exec rake generate_secret_token 183 + chmod 440 ${cfg.stateDir}/config/initializers/secret_token.rb 184 fi 185 186 + # ensure everything is owned by ${cfg.user} 187 + chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir} 188 + 189 + ${bundle} exec rake db:migrate 190 + ${bundle} exec rake redmine:load_default_data 191 ''; 192 193 serviceConfig = { 194 PermissionsStartOnly = true; # preStart must be run as root 195 Type = "simple"; 196 + User = cfg.user; 197 + Group = cfg.group; 198 TimeoutSec = "300"; 199 WorkingDirectory = "${pkgs.redmine}/share/redmine"; 200 + ExecStart="${bundle} exec rails server webrick -e production -P ${cfg.stateDir}/redmine.pid"; 201 }; 202 203 }; 204 + 205 + users.extraUsers = optionalAttrs (cfg.user == "redmine") (singleton 206 + { name = "redmine"; 207 + group = cfg.group; 208 + home = cfg.stateDir; 209 + createHome = true; 210 + uid = config.ids.uids.redmine; 211 + }); 212 + 213 + users.extraGroups = optionalAttrs (cfg.group == "redmine") (singleton 214 + { name = "redmine"; 215 + gid = config.ids.gids.redmine; 216 + }); 217 + 218 + warnings = optional (cfg.database.password != "") 219 + ''config.services.redmine.database.password will be stored as plaintext 220 + in the Nix store. Use database.passwordFile instead.''; 221 + 222 + # Create database passwordFile default when password is configured. 223 + services.redmine.database.passwordFile = 224 + (mkDefault (toString (pkgs.writeTextFile { 225 + name = "redmine-database-password"; 226 + text = cfg.database.password; 227 + }))); 228 229 }; 230
-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
···
+120
pkgs/applications/version-management/redmine/Gemfile
···
··· 1 + source 'https://rubygems.org' 2 + 3 + if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.5.0') 4 + abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).\nPlease update with 'gem update bundler'." 5 + end 6 + 7 + gem "rails", "4.2.8" 8 + gem "addressable", "2.4.0" if RUBY_VERSION < "2.0" 9 + if RUBY_VERSION < "2.1" 10 + gem "public_suffix", (RUBY_VERSION < "2.0" ? "~> 1.4" : "~> 2.0.5") 11 + end 12 + gem "jquery-rails", "~> 3.1.4" 13 + gem "coderay", "~> 1.1.1" 14 + gem "request_store", "1.0.5" 15 + gem "mime-types", (RUBY_VERSION >= "2.0" ? "~> 3.0" : "~> 2.99") 16 + gem "protected_attributes" 17 + gem "actionpack-xml_parser" 18 + gem "roadie-rails", "~> 1.1.1" 19 + gem "roadie", "~> 3.2.1" 20 + gem "mimemagic" 21 + gem "mail", "~> 2.6.4" 22 + 23 + gem "nokogiri", (RUBY_VERSION >= "2.1" ? "~> 1.8.1" : "~> 1.6.8") 24 + gem "i18n", "~> 0.7.0" 25 + gem "ffi", "1.9.14", :platforms => :mingw if RUBY_VERSION < "2.0" 26 + 27 + # Request at least rails-html-sanitizer 1.0.3 because of security advisories 28 + gem "rails-html-sanitizer", ">= 1.0.3" 29 + 30 + # Windows does not include zoneinfo files, so bundle the tzinfo-data gem 31 + gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin] 32 + gem "rbpdf", "~> 1.19.3" 33 + 34 + # Optional gem for LDAP authentication 35 + group :ldap do 36 + gem "net-ldap", "~> 0.12.0" 37 + end 38 + 39 + # Optional gem for OpenID authentication 40 + group :openid do 41 + gem "ruby-openid", "~> 2.3.0", :require => "openid" 42 + gem "rack-openid" 43 + end 44 + 45 + platforms :mri, :mingw, :x64_mingw do 46 + # Optional gem for exporting the gantt to a PNG file, not supported with jruby 47 + group :rmagick do 48 + gem "rmagick", ">= 2.14.0" 49 + end 50 + 51 + # Optional Markdown support, not for JRuby 52 + group :markdown do 53 + gem "redcarpet", "~> 3.4.0" 54 + end 55 + end 56 + 57 + # Include database gems for the adapters found in the database 58 + # configuration file 59 + require 'erb' 60 + require 'yaml' 61 + 62 + # NixOS - manually added to ensure mysql and postgres will always be include 63 + gem "mysql2", "~> 0.4.6", :platforms => [:mri, :mingw, :x64_mingw] 64 + gem "pg", "~> 0.18.1", :platforms => [:mri, :mingw, :x64_mingw] 65 + 66 + database_file = File.join(File.dirname(__FILE__), "config/database.yml") 67 + if File.exist?(database_file) 68 + database_config = YAML::load(ERB.new(IO.read(database_file)).result) 69 + adapters = database_config.values.map {|c| c['adapter']}.compact.uniq 70 + if adapters.any? 71 + adapters.each do |adapter| 72 + case adapter 73 + when 'mysql2' 74 + gem "mysql2", "~> 0.4.6", :platforms => [:mri, :mingw, :x64_mingw] 75 + when /postgresql/ 76 + gem "pg", "~> 0.18.1", :platforms => [:mri, :mingw, :x64_mingw] 77 + when /sqlite3/ 78 + gem "sqlite3", (RUBY_VERSION < "2.0" && RUBY_PLATFORM =~ /mingw/ ? "1.3.12" : "~>1.3.12"), 79 + :platforms => [:mri, :mingw, :x64_mingw] 80 + when /sqlserver/ 81 + gem "tiny_tds", (RUBY_VERSION >= "2.0" ? "~> 1.0.5" : "~> 0.7.0"), :platforms => [:mri, :mingw, :x64_mingw] 82 + gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw, :x64_mingw] 83 + else 84 + warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems") 85 + end 86 + end 87 + else 88 + warn("No adapter found in config/database.yml, please configure it first") 89 + end 90 + else 91 + warn("Please configure your config/database.yml first") 92 + end 93 + 94 + # NixOS - manually removed because I couldn't figure out how to get "bundle exec rails server webrick -e production" to ignore these groups 95 + #group :development do 96 + # gem "rdoc", "~> 4.3" 97 + # gem "yard" 98 + #end 99 + 100 + #group :test do 101 + # gem "minitest" 102 + # gem "rails-dom-testing" 103 + # gem "mocha" 104 + # gem "simplecov", "~> 0.9.1", :require => false 105 + # # TODO: remove this after upgrading to Rails 5 106 + # gem "test_after_commit", "~> 0.4.2" 107 + # # For running UI tests 108 + # gem "capybara" 109 + # gem "selenium-webdriver", "~> 2.53.4" 110 + #end 111 + 112 + local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") 113 + if File.exists?(local_gemfile) 114 + eval_gemfile local_gemfile 115 + end 116 + 117 + # Load plugins' Gemfiles 118 + Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file| 119 + eval_gemfile file 120 + end
+144 -134
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.3) 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
··· 1 GEM 2 remote: https://rubygems.org/ 3 specs: 4 + actionmailer (4.2.8) 5 + actionpack (= 4.2.8) 6 + actionview (= 4.2.8) 7 + activejob (= 4.2.8) 8 + mail (~> 2.5, >= 2.5.4) 9 + rails-dom-testing (~> 1.0, >= 1.0.5) 10 + actionpack (4.2.8) 11 + actionview (= 4.2.8) 12 + activesupport (= 4.2.8) 13 + rack (~> 1.6) 14 + rack-test (~> 0.6.2) 15 + rails-dom-testing (~> 1.0, >= 1.0.5) 16 + rails-html-sanitizer (~> 1.0, >= 1.0.2) 17 + actionpack-xml_parser (1.0.2) 18 + actionpack (>= 4.0.0, < 5) 19 + actionview (4.2.8) 20 + activesupport (= 4.2.8) 21 + builder (~> 3.1) 22 erubis (~> 2.7.0) 23 + rails-dom-testing (~> 1.0, >= 1.0.5) 24 + rails-html-sanitizer (~> 1.0, >= 1.0.3) 25 + activejob (4.2.8) 26 + activesupport (= 4.2.8) 27 + globalid (>= 0.3.0) 28 + activemodel (4.2.8) 29 + activesupport (= 4.2.8) 30 + builder (~> 3.1) 31 + activerecord (4.2.8) 32 + activemodel (= 4.2.8) 33 + activesupport (= 4.2.8) 34 + arel (~> 6.0) 35 + activesupport (4.2.8) 36 + i18n (~> 0.7) 37 + minitest (~> 5.1) 38 + thread_safe (~> 0.3, >= 0.3.4) 39 + tzinfo (~> 1.1) 40 + addressable (2.5.2) 41 + public_suffix (>= 2.0.2, < 4.0) 42 + arel (6.0.4) 43 + builder (3.2.3) 44 + coderay (1.1.2) 45 + concurrent-ruby (1.0.5) 46 + crass (1.0.4) 47 + css_parser (1.6.0) 48 + addressable 49 erubis (2.7.0) 50 + globalid (0.4.1) 51 + activesupport (>= 4.2.0) 52 + htmlentities (4.3.4) 53 + i18n (0.7.0) 54 + jquery-rails (3.1.5) 55 + railties (>= 3.0, < 5.0) 56 + thor (>= 0.14, < 2.0) 57 + loofah (2.2.2) 58 + crass (~> 1.0.2) 59 + nokogiri (>= 1.5.9) 60 + mail (2.6.6) 61 + mime-types (>= 1.16, < 4) 62 + mime-types (3.2.2) 63 + mime-types-data (~> 3.2015) 64 + mime-types-data (3.2018.0812) 65 + mimemagic (0.3.2) 66 + mini_portile2 (2.3.0) 67 + minitest (5.11.3) 68 + mysql2 (0.4.10) 69 + net-ldap (0.12.1) 70 + nokogiri (1.8.4) 71 + mini_portile2 (~> 2.3.0) 72 + pg (0.18.4) 73 + protected_attributes (1.1.4) 74 + activemodel (>= 4.0.1, < 5.0) 75 + public_suffix (3.0.3) 76 + rack (1.6.10) 77 rack-openid (1.4.2) 78 rack (>= 1.1.0) 79 ruby-openid (>= 2.1.8) 80 + rack-test (0.6.3) 81 rack (>= 1.0) 82 + rails (4.2.8) 83 + actionmailer (= 4.2.8) 84 + actionpack (= 4.2.8) 85 + actionview (= 4.2.8) 86 + activejob (= 4.2.8) 87 + activemodel (= 4.2.8) 88 + activerecord (= 4.2.8) 89 + activesupport (= 4.2.8) 90 + bundler (>= 1.3.0, < 2.0) 91 + railties (= 4.2.8) 92 + sprockets-rails 93 + rails-deprecated_sanitizer (1.0.3) 94 + activesupport (>= 4.2.0.alpha) 95 + rails-dom-testing (1.0.9) 96 + activesupport (>= 4.2.0, < 5.0) 97 + nokogiri (~> 1.6) 98 + rails-deprecated_sanitizer (>= 1.0.1) 99 + rails-html-sanitizer (1.0.4) 100 + loofah (~> 2.2, >= 2.2.2) 101 + railties (4.2.8) 102 + actionpack (= 4.2.8) 103 + activesupport (= 4.2.8) 104 rake (>= 0.8.7) 105 + thor (>= 0.18.1, < 2.0) 106 + rake (12.3.1) 107 + rbpdf (1.19.5) 108 + htmlentities 109 + rbpdf-font (~> 1.19.0) 110 + rbpdf-font (1.19.1) 111 + redcarpet (3.4.0) 112 + request_store (1.0.5) 113 + rmagick (2.16.0) 114 + roadie (3.2.2) 115 + css_parser (~> 1.4) 116 + nokogiri (~> 1.5) 117 + roadie-rails (1.1.1) 118 + railties (>= 3.0, < 5.1) 119 + roadie (~> 3.1) 120 ruby-openid (2.3.0) 121 + sprockets (3.7.2) 122 + concurrent-ruby (~> 1.0) 123 + rack (> 1, < 3) 124 + sprockets-rails (3.2.1) 125 + actionpack (>= 4.0) 126 + activesupport (>= 4.0) 127 + sprockets (>= 3.0.0) 128 + thor (0.20.0) 129 + thread_safe (0.3.6) 130 + tzinfo (1.2.5) 131 + thread_safe (~> 0.1) 132 133 PLATFORMS 134 ruby 135 136 DEPENDENCIES 137 + actionpack-xml_parser 138 + coderay (~> 1.1.1) 139 + i18n (~> 0.7.0) 140 + jquery-rails (~> 3.1.4) 141 + mail (~> 2.6.4) 142 + mime-types (~> 3.0) 143 + mimemagic 144 + mysql2 (~> 0.4.6) 145 + net-ldap (~> 0.12.0) 146 + nokogiri (~> 1.8.1) 147 + pg (~> 0.18.1) 148 + protected_attributes 149 rack-openid 150 + rails (= 4.2.8) 151 + rails-html-sanitizer (>= 1.0.3) 152 + rbpdf (~> 1.19.3) 153 + redcarpet (~> 3.4.0) 154 + request_store (= 1.0.5) 155 + rmagick (>= 2.14.0) 156 + roadie (~> 3.2.1) 157 + roadie-rails (~> 1.1.1) 158 ruby-openid (~> 2.3.0) 159 + tzinfo-data 160 + 161 + BUNDLED WITH 162 + 1.16.1
-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 = "1nsby6ry8l9xg3yw4adlhk2pnc7i0h0rznvcss4vk3v74qg0k8lc"; 119 - url = "http://rubygems.org/downloads/json-1.8.3.gem"; 120 - version = "1.8.3"; 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 -
···
-47
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 - 17 - nativeBuildInputs = [ pkgconfig ]; 18 - buildInputs = [ 19 - ruby bundler libiconv libxslt libxml2 20 - libffi imagemagickBig postgresql which stdenv 21 - ]; 22 - installPhase = '' 23 - unset http_proxy 24 - unset ftp_proxy 25 - 26 - cp -R . $out 27 - cp ${./generate_nix_requirements.rb} $out/generate_nix_requirements.rb 28 - cd $out 29 - 30 - cat > config/database.yml <<EOF 31 - production: 32 - adapter: postgresql 33 - EOF 34 - 35 - bundle config --local build.nokogiri --use-system-libraries \ 36 - --with-iconv-dir=${libiconv} \ 37 - --with-xslt-dir=${libxslt.out} \ 38 - --with-xml2-dir=${libxml2.out} \ 39 - --with-pkg-config \ 40 - --with-pg-config=${postgresql}/bin/pg_config 41 - 42 - bundle install --verbose --without development test rmagick --path /tmp/redmine-${version} 43 - 44 - HOME="/tmp/redmine-${version}" ruby generate_nix_requirements.rb 45 - rm -R /tmp/gems 46 - ''; 47 - }
···
+32 -64
pkgs/applications/version-management/redmine/default.nix
··· 1 - { stdenv, fetchurl, ruby, bundler, 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 = "https://www.redmine.org/releases/${name}.tar.gz"; 11 - sha256 = "0x0zwxyj4dwbk7l64s3lgny10mjf0ba8jwrbafsm4d72sncmacv0"; 12 }; 13 - 14 - hardeningDisable = [ "format" ]; 15 - 16 - # taken from redmine (2.5.1-2~bpo70+3) in debian wheezy-backports 17 - # needed to separate run-time and build-time directories 18 - patches = [ 19 - ./2002_FHS_through_env_vars.patch 20 - ./2004_FHS_plugins_assets.patch 21 - ./2003_externalize_session_config.patch 22 - ]; 23 - 24 - postPatch = '' 25 - substituteInPlace lib/redmine/plugin.rb --replace "File.join(Rails.root, 'plugins')" "ENV['RAILS_PLUGINS']" 26 - 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')" 27 - substituteInPlace config/routes.rb --replace '"plugins/*", Rails.root' 'ENV["RAILS_PLUGINS"] + "/*"' 28 - ''; 29 - 30 - buildInputs = [ 31 - ruby bundler libiconv 32 - libxslt libxml2 pkgconfig libffi 33 - imagemagickBig postgresql 34 - ]; 35 - 36 - installPhase = '' 37 - mkdir -p $out/share/redmine/ 38 - cp -R . $out/share/redmine/ 39 - cd $out/share/redmine 40 - ln -s ${./Gemfile.lock} Gemfile.lock 41 - export HOME=$(pwd) 42 - 43 - cat > config/database.yml <<EOF 44 - production: 45 - adapter: postgresql 46 - EOF 47 - 48 - mkdir -p vendor/cache 49 - ${stdenv.lib.concatStrings (map (gem: "ln -s ${gem} vendor/cache/${gem.name};") gemspec)} 50 51 - bundle config build.nokogiri --use-system-libraries --with-iconv-dir="${libiconv}" --with-xslt-dir="${libxslt.dev}" --with-xml2-dir="${libxml2.dev}" 52 53 - bundle install --verbose --local --deployment 54 55 - # make sure we always load pg package 56 - echo "gem \"pg\"" >> Gemfile 57 58 - # make rails server happy 59 - mkdir -p tmp/pids 60 61 - # cleanup 62 - rm config/database.yml 63 - ''; 64 65 - meta = with stdenv.lib; { 66 - homepage = http://www.redmine.org/; 67 - platforms = platforms.linux; 68 - maintainers = [ maintainers.garbas ]; 69 - license = licenses.gpl2; 70 - # Marked as broken due to needing an update for security issues. 71 - # See: https://github.com/NixOS/nixpkgs/issues/18856 72 - broken = true; 73 - }; 74 - }
··· 1 + { stdenv, fetchurl, bundlerEnv, ruby }: 2 3 let 4 + version = "3.4.6"; 5 + rubyEnv = bundlerEnv { 6 + name = "redmine-env-${version}"; 7 8 + inherit ruby; 9 + gemdir = ./.; 10 }; 11 + in 12 + stdenv.mkDerivation rec { 13 + name = "redmine-${version}"; 14 15 + src = fetchurl { 16 + url = "https://www.redmine.org/releases/${name}.tar.gz"; 17 + sha256 = "15akq6pn42w7cf7dg45xmvw06fixck1qznp7s8ix7nyxlmcyvcg3"; 18 + }; 19 20 + buildInputs = [ rubyEnv rubyEnv.wrappedRuby rubyEnv.bundler ]; 21 22 + buildPhase = '' 23 + mv config config.dist 24 + ''; 25 26 + installPhase = '' 27 + mkdir -p $out/share 28 + cp -r . $out/share/redmine 29 30 + for i in config files log plugins tmp; do 31 + rm -rf $out/share/redmine/$i 32 + ln -fs /run/redmine/$i $out/share/redmine/ 33 + done 34 + ''; 35 36 + meta = with stdenv.lib; { 37 + homepage = http://www.redmine.org/; 38 + platforms = platforms.linux; 39 + maintainers = [ maintainers.garbas ]; 40 + license = licenses.gpl2; 41 + }; 42 + }
+472
pkgs/applications/version-management/redmine/gemset.nix
···
··· 1 + { 2 + actionmailer = { 3 + dependencies = ["actionpack" "actionview" "activejob" "mail" "rails-dom-testing"]; 4 + source = { 5 + remotes = ["https://rubygems.org"]; 6 + sha256 = "0pr3cmr0bpgg5d0f6wy1z6r45n14r9yin8jnr4hi3ssf402xpc0q"; 7 + type = "gem"; 8 + }; 9 + version = "4.2.8"; 10 + }; 11 + actionpack = { 12 + dependencies = ["actionview" "activesupport" "rack" "rack-test" "rails-dom-testing" "rails-html-sanitizer"]; 13 + source = { 14 + remotes = ["https://rubygems.org"]; 15 + sha256 = "09fbazl0ja80na2wadfp3fzmdmdy1lsb4wd2yg7anbj0zk0ap7a9"; 16 + type = "gem"; 17 + }; 18 + version = "4.2.8"; 19 + }; 20 + actionpack-xml_parser = { 21 + dependencies = ["actionpack"]; 22 + source = { 23 + remotes = ["https://rubygems.org"]; 24 + sha256 = "17am4nd7x6g8x7f8i35rzzv2qrxlkc230rbgzg98af0yf50j8gka"; 25 + type = "gem"; 26 + }; 27 + version = "1.0.2"; 28 + }; 29 + actionview = { 30 + dependencies = ["activesupport" "builder" "erubis" "rails-dom-testing" "rails-html-sanitizer"]; 31 + source = { 32 + remotes = ["https://rubygems.org"]; 33 + sha256 = "1mg4a8143q2wjhjq4mngl69jkv249z5jvg0jkdribdv4zkg586rp"; 34 + type = "gem"; 35 + }; 36 + version = "4.2.8"; 37 + }; 38 + activejob = { 39 + dependencies = ["activesupport" "globalid"]; 40 + source = { 41 + remotes = ["https://rubygems.org"]; 42 + sha256 = "0kazbpfgzz6cdmwjnlb9m671ps4qgggwv2hy8y9xi4h96djyyfqz"; 43 + type = "gem"; 44 + }; 45 + version = "4.2.8"; 46 + }; 47 + activemodel = { 48 + dependencies = ["activesupport" "builder"]; 49 + source = { 50 + remotes = ["https://rubygems.org"]; 51 + sha256 = "11vhh7zmp92880s5sx8r32v2p0b7xg039mfr92pjynpkz4q901ld"; 52 + type = "gem"; 53 + }; 54 + version = "4.2.8"; 55 + }; 56 + activerecord = { 57 + dependencies = ["activemodel" "activesupport" "arel"]; 58 + source = { 59 + remotes = ["https://rubygems.org"]; 60 + sha256 = "1kk4dhn8jfhqfsf1dmb3a183gix6k46xr6cjkxj0rp51w2za1ns0"; 61 + type = "gem"; 62 + }; 63 + version = "4.2.8"; 64 + }; 65 + activesupport = { 66 + dependencies = ["i18n" "minitest" "thread_safe" "tzinfo"]; 67 + source = { 68 + remotes = ["https://rubygems.org"]; 69 + sha256 = "0wibdzd2f5l5rlsw1a1y3j3fhw2imrrbkxggdraa6q9qbdnc66hi"; 70 + type = "gem"; 71 + }; 72 + version = "4.2.8"; 73 + }; 74 + addressable = { 75 + dependencies = ["public_suffix"]; 76 + source = { 77 + remotes = ["https://rubygems.org"]; 78 + sha256 = "0viqszpkggqi8hq87pqp0xykhvz60g99nwmkwsb0v45kc2liwxvk"; 79 + type = "gem"; 80 + }; 81 + version = "2.5.2"; 82 + }; 83 + arel = { 84 + source = { 85 + remotes = ["https://rubygems.org"]; 86 + sha256 = "0nfcrdiys6q6ylxiblky9jyssrw2xj96fmxmal7f4f0jj3417vj4"; 87 + type = "gem"; 88 + }; 89 + version = "6.0.4"; 90 + }; 91 + builder = { 92 + source = { 93 + remotes = ["https://rubygems.org"]; 94 + sha256 = "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1"; 95 + type = "gem"; 96 + }; 97 + version = "3.2.3"; 98 + }; 99 + coderay = { 100 + source = { 101 + remotes = ["https://rubygems.org"]; 102 + sha256 = "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"; 103 + type = "gem"; 104 + }; 105 + version = "1.1.2"; 106 + }; 107 + concurrent-ruby = { 108 + source = { 109 + remotes = ["https://rubygems.org"]; 110 + sha256 = "183lszf5gx84kcpb779v6a2y0mx9sssy8dgppng1z9a505nj1qcf"; 111 + type = "gem"; 112 + }; 113 + version = "1.0.5"; 114 + }; 115 + crass = { 116 + source = { 117 + remotes = ["https://rubygems.org"]; 118 + sha256 = "0bpxzy6gjw9ggjynlxschbfsgmx8lv3zw1azkjvnb8b9i895dqfi"; 119 + type = "gem"; 120 + }; 121 + version = "1.0.4"; 122 + }; 123 + css_parser = { 124 + dependencies = ["addressable"]; 125 + source = { 126 + remotes = ["https://rubygems.org"]; 127 + sha256 = "0gwvf8mc8gnz4aizfijplv3594998h2j44ydakpzsdmkivs07v61"; 128 + type = "gem"; 129 + }; 130 + version = "1.6.0"; 131 + }; 132 + erubis = { 133 + source = { 134 + remotes = ["https://rubygems.org"]; 135 + sha256 = "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"; 136 + type = "gem"; 137 + }; 138 + version = "2.7.0"; 139 + }; 140 + globalid = { 141 + dependencies = ["activesupport"]; 142 + source = { 143 + remotes = ["https://rubygems.org"]; 144 + sha256 = "02smrgdi11kziqi9zhnsy9i6yr2fnxrqlv3lllsvdjki3cd4is38"; 145 + type = "gem"; 146 + }; 147 + version = "0.4.1"; 148 + }; 149 + htmlentities = { 150 + source = { 151 + remotes = ["https://rubygems.org"]; 152 + sha256 = "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"; 153 + type = "gem"; 154 + }; 155 + version = "4.3.4"; 156 + }; 157 + i18n = { 158 + source = { 159 + remotes = ["https://rubygems.org"]; 160 + sha256 = "1i5z1ykl8zhszsxcs8mzl8d0dxgs3ylz8qlzrw74jb0gplkx6758"; 161 + type = "gem"; 162 + }; 163 + version = "0.7.0"; 164 + }; 165 + jquery-rails = { 166 + dependencies = ["railties" "thor"]; 167 + source = { 168 + remotes = ["https://rubygems.org"]; 169 + sha256 = "1lk7xqmms45czylxs22kv5khlbm7a0yqcchqijxb9m10zsqc6lp5"; 170 + type = "gem"; 171 + }; 172 + version = "3.1.5"; 173 + }; 174 + loofah = { 175 + dependencies = ["crass" "nokogiri"]; 176 + source = { 177 + remotes = ["https://rubygems.org"]; 178 + sha256 = "0yjs6wbcj3n06d3xjqpy3qbpx0bfa12h3x2rbpc2k33ldjlkx6zy"; 179 + type = "gem"; 180 + }; 181 + version = "2.2.2"; 182 + }; 183 + mail = { 184 + dependencies = ["mime-types"]; 185 + source = { 186 + remotes = ["https://rubygems.org"]; 187 + sha256 = "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9"; 188 + type = "gem"; 189 + }; 190 + version = "2.6.6"; 191 + }; 192 + mime-types = { 193 + dependencies = ["mime-types-data"]; 194 + source = { 195 + remotes = ["https://rubygems.org"]; 196 + sha256 = "0fjxy1jm52ixpnv3vg9ld9pr9f35gy0jp66i1njhqjvmnvq0iwwk"; 197 + type = "gem"; 198 + }; 199 + version = "3.2.2"; 200 + }; 201 + mime-types-data = { 202 + source = { 203 + remotes = ["https://rubygems.org"]; 204 + sha256 = "07wvp0aw2gjm4njibb70as6rh5hi1zzri5vky1q6jx95h8l56idc"; 205 + type = "gem"; 206 + }; 207 + version = "3.2018.0812"; 208 + }; 209 + mimemagic = { 210 + source = { 211 + remotes = ["https://rubygems.org"]; 212 + sha256 = "00ibc1mhvdfyfyl103xwb45621nwyqxf124cni5hyfhag0fn1c3q"; 213 + type = "gem"; 214 + }; 215 + version = "0.3.2"; 216 + }; 217 + mini_portile2 = { 218 + source = { 219 + remotes = ["https://rubygems.org"]; 220 + sha256 = "13d32jjadpjj6d2wdhkfpsmy68zjx90p49bgf8f7nkpz86r1fr11"; 221 + type = "gem"; 222 + }; 223 + version = "2.3.0"; 224 + }; 225 + minitest = { 226 + source = { 227 + remotes = ["https://rubygems.org"]; 228 + sha256 = "0icglrhghgwdlnzzp4jf76b0mbc71s80njn5afyfjn4wqji8mqbq"; 229 + type = "gem"; 230 + }; 231 + version = "5.11.3"; 232 + }; 233 + mysql2 = { 234 + source = { 235 + remotes = ["https://rubygems.org"]; 236 + sha256 = "0qjd97w6a0w9aldsrhb2y6jrc4wnnlbj5j8kcl7pp7vviwa0r5iq"; 237 + type = "gem"; 238 + }; 239 + version = "0.4.10"; 240 + }; 241 + net-ldap = { 242 + source = { 243 + remotes = ["https://rubygems.org"]; 244 + sha256 = "0z1j0zklbbx3vi91zcd2v0fnkfgkvq3plisa6hxaid8sqndyak46"; 245 + type = "gem"; 246 + }; 247 + version = "0.12.1"; 248 + }; 249 + nokogiri = { 250 + dependencies = ["mini_portile2"]; 251 + source = { 252 + remotes = ["https://rubygems.org"]; 253 + sha256 = "1h9nml9h3m0mpvmh8jfnqvblnz5n5y3mmhgfc38avfmfzdrq9bgc"; 254 + type = "gem"; 255 + }; 256 + version = "1.8.4"; 257 + }; 258 + pg = { 259 + source = { 260 + remotes = ["https://rubygems.org"]; 261 + sha256 = "07dv4ma9xd75xpsnnwwg1yrpwpji7ydy0q1d9dl0yfqbzpidrw32"; 262 + type = "gem"; 263 + }; 264 + version = "0.18.4"; 265 + }; 266 + protected_attributes = { 267 + dependencies = ["activemodel"]; 268 + source = { 269 + remotes = ["https://rubygems.org"]; 270 + sha256 = "18lvrvmcwjvjr2mrn20vaf68a0q6mg4cy9f0m1i7x83p0ljhhyar"; 271 + type = "gem"; 272 + }; 273 + version = "1.1.4"; 274 + }; 275 + public_suffix = { 276 + source = { 277 + remotes = ["https://rubygems.org"]; 278 + sha256 = "08q64b5br692dd3v0a9wq9q5dvycc6kmiqmjbdxkxbfizggsvx6l"; 279 + type = "gem"; 280 + }; 281 + version = "3.0.3"; 282 + }; 283 + rack = { 284 + source = { 285 + remotes = ["https://rubygems.org"]; 286 + sha256 = "0in0amn0kwvzmi8h5zg6ijrx5wpsf8h96zrfmnk1kwh2ql4sxs2q"; 287 + type = "gem"; 288 + }; 289 + version = "1.6.10"; 290 + }; 291 + rack-openid = { 292 + dependencies = ["rack" "ruby-openid"]; 293 + source = { 294 + remotes = ["https://rubygems.org"]; 295 + sha256 = "0sg85yn981j3a0iri3ch4znzdwscvz29l7vrk3dafqw4fdg31llc"; 296 + type = "gem"; 297 + }; 298 + version = "1.4.2"; 299 + }; 300 + rack-test = { 301 + dependencies = ["rack"]; 302 + source = { 303 + remotes = ["https://rubygems.org"]; 304 + sha256 = "0h6x5jq24makgv2fq5qqgjlrk74dxfy62jif9blk43llw8ib2q7z"; 305 + type = "gem"; 306 + }; 307 + version = "0.6.3"; 308 + }; 309 + rails = { 310 + dependencies = ["actionmailer" "actionpack" "actionview" "activejob" "activemodel" "activerecord" "activesupport" "railties" "sprockets-rails"]; 311 + source = { 312 + remotes = ["https://rubygems.org"]; 313 + sha256 = "0dpbf3ybzbhqqkwg5vi60121860cr8fybvchrxk5wy3f2jcj0mch"; 314 + type = "gem"; 315 + }; 316 + version = "4.2.8"; 317 + }; 318 + rails-deprecated_sanitizer = { 319 + dependencies = ["activesupport"]; 320 + source = { 321 + remotes = ["https://rubygems.org"]; 322 + sha256 = "0qxymchzdxww8bjsxj05kbf86hsmrjx40r41ksj0xsixr2gmhbbj"; 323 + type = "gem"; 324 + }; 325 + version = "1.0.3"; 326 + }; 327 + rails-dom-testing = { 328 + dependencies = ["activesupport" "nokogiri" "rails-deprecated_sanitizer"]; 329 + source = { 330 + remotes = ["https://rubygems.org"]; 331 + sha256 = "0wssfqpn00byhvp2372p99mphkcj8qx6pf6646avwr9ifvq0q1x6"; 332 + type = "gem"; 333 + }; 334 + version = "1.0.9"; 335 + }; 336 + rails-html-sanitizer = { 337 + dependencies = ["loofah"]; 338 + source = { 339 + remotes = ["https://rubygems.org"]; 340 + sha256 = "1gv7vr5d9g2xmgpjfq4nxsqr70r9pr042r9ycqqnfvw5cz9c7jwr"; 341 + type = "gem"; 342 + }; 343 + version = "1.0.4"; 344 + }; 345 + railties = { 346 + dependencies = ["actionpack" "activesupport" "rake" "thor"]; 347 + source = { 348 + remotes = ["https://rubygems.org"]; 349 + sha256 = "0bavl4hj7bnl3ryqi9rvykm410kflplgingkcxasfv1gdilddh4g"; 350 + type = "gem"; 351 + }; 352 + version = "4.2.8"; 353 + }; 354 + rake = { 355 + source = { 356 + remotes = ["https://rubygems.org"]; 357 + sha256 = "1idi53jay34ba9j68c3mfr9wwkg3cd9qh0fn9cg42hv72c6q8dyg"; 358 + type = "gem"; 359 + }; 360 + version = "12.3.1"; 361 + }; 362 + rbpdf = { 363 + dependencies = ["htmlentities" "rbpdf-font"]; 364 + source = { 365 + remotes = ["https://rubygems.org"]; 366 + sha256 = "021fda3gcz9pyydxnn40vs1nrkycwslb9ip4q0yg3hlip41k1b49"; 367 + type = "gem"; 368 + }; 369 + version = "1.19.5"; 370 + }; 371 + rbpdf-font = { 372 + source = { 373 + remotes = ["https://rubygems.org"]; 374 + sha256 = "0pxlr0l4vf785qpy55m439dyii63a26l0sd0yyhbwwcy9zm9hd1v"; 375 + type = "gem"; 376 + }; 377 + version = "1.19.1"; 378 + }; 379 + redcarpet = { 380 + source = { 381 + remotes = ["https://rubygems.org"]; 382 + sha256 = "0h9qz2hik4s9knpmbwrzb3jcp3vc5vygp9ya8lcpl7f1l9khmcd7"; 383 + type = "gem"; 384 + }; 385 + version = "3.4.0"; 386 + }; 387 + request_store = { 388 + source = { 389 + remotes = ["https://rubygems.org"]; 390 + sha256 = "1ky19wb6mpq6dxb81a0h4hnzx7a4ka99n9ay2syi68djbr4bkbbh"; 391 + type = "gem"; 392 + }; 393 + version = "1.0.5"; 394 + }; 395 + rmagick = { 396 + source = { 397 + remotes = ["https://rubygems.org"]; 398 + sha256 = "0m9x15cdlkcb9826s3s2jd97hxf50hln22p94x8hcccxi1lwklq6"; 399 + type = "gem"; 400 + }; 401 + version = "2.16.0"; 402 + }; 403 + roadie = { 404 + dependencies = ["css_parser" "nokogiri"]; 405 + source = { 406 + remotes = ["https://rubygems.org"]; 407 + sha256 = "0frp5yb07ib9y1k43shd4xjkb9a6wavhqq892l8yi9y73qi2cqbc"; 408 + type = "gem"; 409 + }; 410 + version = "3.2.2"; 411 + }; 412 + roadie-rails = { 413 + dependencies = ["railties" "roadie"]; 414 + source = { 415 + remotes = ["https://rubygems.org"]; 416 + sha256 = "1hxgl5marq2hi6lcc73f7g6afd7dz4w893rrgrbh7m3k8zrwjyk1"; 417 + type = "gem"; 418 + }; 419 + version = "1.1.1"; 420 + }; 421 + ruby-openid = { 422 + source = { 423 + remotes = ["https://rubygems.org"]; 424 + sha256 = "0yzaf2c1i88757554wk38rxqmj0xzgmwk2zx7gi98w2zx42d17pn"; 425 + type = "gem"; 426 + }; 427 + version = "2.3.0"; 428 + }; 429 + sprockets = { 430 + dependencies = ["concurrent-ruby" "rack"]; 431 + source = { 432 + remotes = ["https://rubygems.org"]; 433 + sha256 = "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"; 434 + type = "gem"; 435 + }; 436 + version = "3.7.2"; 437 + }; 438 + sprockets-rails = { 439 + dependencies = ["actionpack" "activesupport" "sprockets"]; 440 + source = { 441 + remotes = ["https://rubygems.org"]; 442 + sha256 = "0ab42pm8p5zxpv3sfraq45b9lj39cz9mrpdirm30vywzrwwkm5p1"; 443 + type = "gem"; 444 + }; 445 + version = "3.2.1"; 446 + }; 447 + thor = { 448 + source = { 449 + remotes = ["https://rubygems.org"]; 450 + sha256 = "0nmqpyj642sk4g16nkbq6pj856adpv91lp4krwhqkh2iw63aszdl"; 451 + type = "gem"; 452 + }; 453 + version = "0.20.0"; 454 + }; 455 + thread_safe = { 456 + source = { 457 + remotes = ["https://rubygems.org"]; 458 + sha256 = "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"; 459 + type = "gem"; 460 + }; 461 + version = "0.3.6"; 462 + }; 463 + tzinfo = { 464 + dependencies = ["thread_safe"]; 465 + source = { 466 + remotes = ["https://rubygems.org"]; 467 + sha256 = "1fjx9j327xpkkdlxwmkl3a8wqj7i4l4jwlrv3z13mg95z9wl253z"; 468 + type = "gem"; 469 + }; 470 + version = "1.2.5"; 471 + }; 472 + }
-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
···