[DRE-commits] r6016 - in trunk/redmine/debian: . patches

Jérémy Lal kapouer-guest at alioth.debian.org
Wed Jan 26 17:46:31 UTC 2011


Author: kapouer-guest
Date: 2011-01-26 17:46:30 +0000 (Wed, 26 Jan 2011)
New Revision: 6016

Added:
   trunk/redmine/debian/patches/2001_fix_shebang_interpreter.patch
   trunk/redmine/debian/patches/2002_FHS_through_env_vars.patch
   trunk/redmine/debian/patches/2003_externalize_session_config.patch
   trunk/redmine/debian/patches/2004_FHS_plugins_assets.patch
   trunk/redmine/debian/patches/2005_FHS_schema_dump.patch
   trunk/redmine/debian/patches/2006_fix_shebang_interpreter.patch
   trunk/redmine/debian/patches/2007_disable_deprecation_warnings.patch
   trunk/redmine/debian/patches/2008_force_table_encoding_mysql.patch
   trunk/redmine/debian/patches/2009_FHS_thin_config.patch
   trunk/redmine/debian/patches/2010_use_i18n_0.4.1.patch
Removed:
   trunk/redmine/debian/patches/0008-Wrong-path-for-interpreter.patch
   trunk/redmine/debian/patches/0009-Allows-environment-variables-to-setup-debian-paths.patch
   trunk/redmine/debian/patches/0014-Move-session-configuration-to-YML-file-next-to-datab.patch
   trunk/redmine/debian/patches/0016-plugin_assets_in_var_dir.patch
   trunk/redmine/debian/patches/0017-dump_schema_to_cache_dir.patch
   trunk/redmine/debian/patches/0018-remove-shebang.patch
   trunk/redmine/debian/patches/disable-deprecations.patch
   trunk/redmine/debian/patches/i18n_0.4.1.patch
   trunk/redmine/debian/patches/mysql_create_table_utf8.patch
   trunk/redmine/debian/patches/thin_x_debian_siteid.patch
Modified:
   trunk/redmine/debian/changelog
   trunk/redmine/debian/patches/series
Log:
Upstream update, rename and use DEP-3 for patches.

Modified: trunk/redmine/debian/changelog
===================================================================
--- trunk/redmine/debian/changelog	2011-01-24 20:42:01 UTC (rev 6015)
+++ trunk/redmine/debian/changelog	2011-01-26 17:46:30 UTC (rev 6016)
@@ -1,3 +1,10 @@
+redmine (1.1.0-1) experimental; urgency=low
+
+  * New upstream release.
+  * All patches follow DEP-3 format. 
+
+ -- Jérémy Lal <kapouer at melix.org>  Wed, 26 Jan 2011 11:26:59 +0100
+
 redmine (1.0.5-1) unstable; urgency=low
 
   * New upstream release

Deleted: trunk/redmine/debian/patches/0008-Wrong-path-for-interpreter.patch
===================================================================
--- trunk/redmine/debian/patches/0008-Wrong-path-for-interpreter.patch	2011-01-24 20:42:01 UTC (rev 6015)
+++ trunk/redmine/debian/patches/0008-Wrong-path-for-interpreter.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -1,19 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Sat, 9 Jan 2010 23:57:26 +0100
-Subject: [PATCH] Wrong path for interpreter.
-
----
- lib/faster_csv.rb |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/lib/faster_csv.rb b/lib/faster_csv.rb
-index 9c3a406..13a48ef 100644
---- a/lib/faster_csv.rb
-+++ b/lib/faster_csv.rb
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/ruby -w
-+#!/usr/bin/ruby -w
- 
- # = faster_csv.rb -- Faster CSV Reading and Writing
- #
--- 

Deleted: trunk/redmine/debian/patches/0009-Allows-environment-variables-to-setup-debian-paths.patch
===================================================================
--- trunk/redmine/debian/patches/0009-Allows-environment-variables-to-setup-debian-paths.patch	2011-01-24 20:42:01 UTC (rev 6015)
+++ trunk/redmine/debian/patches/0009-Allows-environment-variables-to-setup-debian-paths.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -1,97 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Sun, 10 Jan 2010 00:03:57 +0100
-Subject: [PATCH] Allows environment variables to setup debian paths.
-
----
- app/models/attachment.rb          |    2 +-
- config/environment.rb             |   19 ++++++++++++++++++-
- config/initializers/10-patches.rb |    3 +++
- config/initializers/40-email.rb   |    2 +-
- public/dispatch.fcgi.example      |    7 +++++--
- 5 files changed, 28 insertions(+), 5 deletions(-)
-
---- a/app/models/attachment.rb
-+++ b/app/models/attachment.rb
-@@ -43,7 +43,7 @@
-                                                         "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"}
- 
-   cattr_accessor :storage_path
--  @@storage_path = "#{RAILS_ROOT}/files"
-+  @@storage_path = ENV['RAILS_VAR'] ? File.join(ENV['RAILS_VAR'], 'files') : "#{RAILS_ROOT}/files"
-   
-   def validate
-     if self.filesize > Setting.attachment_max_size.to_i.kilobytes
---- a/config/environment.rb
-+++ b/config/environment.rb
-@@ -2,7 +2,15 @@
- 
- # Uncomment below to force Rails into production mode when 
- # you don't control web/app server and can't set it the proper way
--# ENV['RAILS_ENV'] ||= 'production'
-+ENV['RAILS_ENV'] ||= 'production'
-+
-+# for debian package : setup proper environment variables and paths
-+# To run redmine as unprivileged user, see /usr/share/doc/redmine/README.Debian
-+ENV['X_DEBIAN_SITEID'] ||= 'default'
-+ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
-+ENV['RAILS_LOG'] ||= "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"
-+ENV['RAILS_VAR'] ||= "/var/lib/redmine/#{ENV['X_DEBIAN_SITEID']}"
-+ENV['RAILS_CACHE'] ||= "/var/cache/redmine/#{ENV['X_DEBIAN_SITEID']}"
- 
- # Specifies gem version of Rails to use when vendor/rails is not present
- RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
-@@ -30,9 +38,18 @@
-   # (by default production uses :info, the others :debug)
-   # config.log_level = :debug
- 
-+  # log path
-+  config.log_path = File.join(ENV['RAILS_LOG'], "#{ENV['RAILS_ENV']}.log") unless !ENV['RAILS_LOG']
-+
-   # Enable page/fragment caching by setting a file-based store
-   # (remember to create the caching directory and make it readable to the application)
-   # config.action_controller.cache_store = :file_store, "#{RAILS_ROOT}/tmp/cache"
-+
-+  # the file cache store
-+  config.cache_store = :file_store, ENV['RAILS_CACHE']
-+  
-+  # Set Active Record's database.yml path
-+  config.database_configuration_file = File.join(ENV['RAILS_ETC'], 'database.yml') unless !ENV['RAILS_ETC']
-   
-   # Activate observers that should always be running
-   # config.active_record.observers = :cacher, :garbage_collector
---- a/config/initializers/10-patches.rb
-+++ b/config/initializers/10-patches.rb
-@@ -79,6 +79,9 @@
- 
- ActionMailer::Base.send :include, AsynchronousMailer
- 
-+# the session store
-+ActionController::Base.session_options[:tmpdir] = File.join(ENV['RAILS_VAR'], 'sessions') unless !ENV['RAILS_VAR']
-+
- # TODO: Hack to support i18n 4.x on Rails 2.3.5.  Remove post 2.3.6.
- # See http://www.redmine.org/issues/6428 and http://www.redmine.org/issues/5608
- module I18n
---- a/config/initializers/40-email.rb
-+++ b/config/initializers/40-email.rb
-@@ -1,7 +1,7 @@
- # Loads action_mailer settings from email.yml
- # and turns deliveries on if configuration file is found
- 
--filename = File.join(File.dirname(__FILE__), '..', 'email.yml')
-+filename = ENV['RAILS_ETC'] ? File.join(ENV['RAILS_ETC'], 'email.yml') : File.join(File.dirname(__FILE__), '..', 'email.yml')
- if File.file?(filename)
-   mailconfig = YAML::load_file(filename)
- 
---- a/public/dispatch.fcgi.example
-+++ b/public/dispatch.fcgi.example
-@@ -20,5 +20,8 @@
- #
- require File.dirname(__FILE__) + "/../config/environment"
- require 'fcgi_handler'
--
--RailsFCGIHandler.process!
-+if ENV['RAILS_LOG']
-+  RailsFCGIHandler.process! File.join(ENV['RAILS_LOG'], 'fastcgi.crash.log')
-+else
-+  RailsFCGIHandler.process!
-+end

Deleted: trunk/redmine/debian/patches/0014-Move-session-configuration-to-YML-file-next-to-datab.patch
===================================================================
--- trunk/redmine/debian/patches/0014-Move-session-configuration-to-YML-file-next-to-datab.patch	2011-01-24 20:42:01 UTC (rev 6015)
+++ trunk/redmine/debian/patches/0014-Move-session-configuration-to-YML-file-next-to-datab.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -1,86 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Sun, 10 Jan 2010 00:30:02 +0100
-Subject: [PATCH] Move session configuration to YML file, next to database.yml path.
-
----
-
---- a/config/environment.rb
-+++ b/config/environment.rb
-@@ -18,6 +18,20 @@
- # Bootstrap the Rails environment, frameworks, and default configuration
- require File.join(File.dirname(__FILE__), 'boot')
- 
-+# loads cookie based session session and secret keys
-+# this is needed here because initializers are loaded after plugins,
-+# and some plugins initialize ActionController which requires a secret to be set.
-+# crash if file not found
-+filename = ENV['RAILS_ETC'] ? File.join(ENV['RAILS_ETC'], 'session.yml') : File.join(File.dirname(__FILE__), '..', 'session.yml')
-+sessionconfig = YAML::load_file(filename)
-+require 'action_controller'
-+relativeUrlRoot = ENV['RAILS_RELATIVE_URL_ROOT']
-+ActionController::Base.session = {
-+  :key => sessionconfig[Rails.env]['key'],
-+  :secret => sessionconfig[Rails.env]['secret'],
-+  :path => (relativeUrlRoot.blank?) ? '/' : relativeUrlRoot
-+}
-+
- # Load Engine plugin if available
- begin
-   require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
---- a/lib/tasks/initializers.rake
-+++ b/lib/tasks/initializers.rake
-@@ -1,11 +1,14 @@
- desc 'Generates a configuration file for cookie store sessions.'
-+task :generate_session_store do
- 
--file 'config/initializers/session_store.rb' do
--  path = File.join(RAILS_ROOT, 'config', 'initializers', 'session_store.rb')
--  secret = ActiveSupport::SecureRandom.hex(40)
--  File.open(path, 'w') do |f|
--    f.write <<"EOF"
--# This file was generated by 'rake config/initializers/session_store.rb',
-+ENV['X_DEBIAN_SITEID'] ||= 'default'
-+ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
-+filename = ENV['YML_SESSION_FILENAME'] ? ENV['YML_SESSION_FILENAME'] : 'session.yml'
-+path = File.join(ENV['RAILS_ETC'] ? ENV['RAILS_ETC'] : File.join(RAILS_ROOT, 'config'), filename)
-+secret = ActiveSupport::SecureRandom.hex(40)
-+File.open(path, 'w') do |f|
-+  f.write <<"EOF"
-+# This file was generated by 'rake generate_session_store',
- # and should not be made visible to public.
- # If you have a load-balancing Redmine cluster, you will need to use the
- # same version of this file on each machine. And be sure to restart your
-@@ -15,20 +18,19 @@
- # change this key, all old sessions will become invalid! Make sure the
- # secret is at least 30 characters and all random, no regular words or
- # you'll be exposed to dictionary attacks.
--ActionController::Base.session = {
--  :session_key => '_redmine_session',
--  #
--  # Uncomment and edit the :session_path below if are hosting your Redmine
--  # at a suburi and don't want the top level path to access the cookies
--  #
--  # See: http://www.redmine.org/issues/3968
--  #
--  # :session_path => '/url_path_to/your/redmine/',
--  :secret => '#{secret}'
--}
-+
-+production:
-+  key: _redmine_#{ENV['X_DEBIAN_SITEID']}
-+  secret: #{secret}
-+
-+development:
-+  key: _redmine_#{ENV['X_DEBIAN_SITEID']}
-+  secret: #{secret}
-+
-+test:
-+  key: _redmine_#{ENV['X_DEBIAN_SITEID']}
-+  secret: #{secret}
-+
- EOF
-   end
- end
--
--desc 'Generates a configuration file for cookie store sessions.'
--task :generate_session_store => ['config/initializers/session_store.rb']

Deleted: trunk/redmine/debian/patches/0016-plugin_assets_in_var_dir.patch
===================================================================
--- trunk/redmine/debian/patches/0016-plugin_assets_in_var_dir.patch	2011-01-24 20:42:01 UTC (rev 6015)
+++ trunk/redmine/debian/patches/0016-plugin_assets_in_var_dir.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -1,17 +0,0 @@
-Author: Jérémy Lal <kapouer at melix.org>
-Bug-Debian: http://bugs.debian.org/570308
-
----
-Engines plugin writes to /usr/share/redmine/public/plugin_assets
-at runtime. This patch makes it write to a proper directory.
-
---- a/config/environment.rb
-+++ b/config/environment.rb
-@@ -35,6 +35,7 @@
- # Load Engine plugin if available
- begin
-   require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
-+  Engines::public_directory = "#{ENV['RAILS_CACHE']}/plugin_assets"
- rescue LoadError
-   # Not available
- end

Deleted: trunk/redmine/debian/patches/0017-dump_schema_to_cache_dir.patch
===================================================================
--- trunk/redmine/debian/patches/0017-dump_schema_to_cache_dir.patch	2011-01-24 20:42:01 UTC (rev 6015)
+++ trunk/redmine/debian/patches/0017-dump_schema_to_cache_dir.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -1,19 +0,0 @@
-Author: Jérémy Lal <kapouer at melix.org>
-
----
-rake task db:migrate calls db:schema:dump, which writes to
-/usr/share/redmine/db, independently of the X_DEBIAN_SITEID instance.
-This patch makes it write to (by default)
-/var/cache/redmine/${X_DEBIAN_SITEID}/schema.db
-so that each instance has its own migration dump.
-
---- a/config/environment.rb
-+++ b/config/environment.rb
-@@ -11,6 +11,7 @@
- ENV['RAILS_LOG'] ||= "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"
- ENV['RAILS_VAR'] ||= "/var/lib/redmine/#{ENV['X_DEBIAN_SITEID']}"
- ENV['RAILS_CACHE'] ||= "/var/cache/redmine/#{ENV['X_DEBIAN_SITEID']}"
-+ENV['SCHEMA'] ||= "#{ENV['RAILS_CACHE']}/schema.db"
- 
- # Specifies gem version of Rails to use when vendor/rails is not present
- RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION

Deleted: trunk/redmine/debian/patches/0018-remove-shebang.patch
===================================================================
--- trunk/redmine/debian/patches/0018-remove-shebang.patch	2011-01-24 20:42:01 UTC (rev 6015)
+++ trunk/redmine/debian/patches/0018-remove-shebang.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -1,10 +0,0 @@
-Description: Remove unnecessary shebang in this coderay file.
-Author: Jérémy Lal <kapouer at melix.org>
-
---- redmine-1.0.0.orig/vendor/plugins/coderay-0.9.2/lib/coderay/helpers/file_type.rb
-+++ redmine-1.0.0/vendor/plugins/coderay-0.9.2/lib/coderay/helpers/file_type.rb
-@@ -1,4 +1,3 @@
--#!/usr/bin/env ruby
- module CodeRay
- 
- # = FileType

Added: trunk/redmine/debian/patches/2001_fix_shebang_interpreter.patch
===================================================================
--- trunk/redmine/debian/patches/2001_fix_shebang_interpreter.patch	                        (rev 0)
+++ trunk/redmine/debian/patches/2001_fix_shebang_interpreter.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -0,0 +1,13 @@
+Description: Fix shebang interpreter
+Forwarded: not-needed
+Author: Jérémy Lal <kapouer at melix.org>
+Last-Update: 2010-01-09
+--- a/lib/faster_csv.rb
++++ b/lib/faster_csv.rb
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/ruby -w
++#!/usr/bin/ruby -w
+ 
+ # = faster_csv.rb -- Faster CSV Reading and Writing
+ #
+-- 

Copied: trunk/redmine/debian/patches/2002_FHS_through_env_vars.patch (from rev 5990, trunk/redmine/debian/patches/0009-Allows-environment-variables-to-setup-debian-paths.patch)
===================================================================
--- trunk/redmine/debian/patches/2002_FHS_through_env_vars.patch	                        (rev 0)
+++ trunk/redmine/debian/patches/2002_FHS_through_env_vars.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -0,0 +1,89 @@
+Description: FHS through env vars
+Forwarded: not-needed
+Author: Jérémy Lal <kapouer at melix.org>
+Last-Update: 2010-01-10
+--- a/app/models/attachment.rb
++++ b/app/models/attachment.rb
+@@ -43,7 +43,7 @@
+                                                         "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"}
+ 
+   cattr_accessor :storage_path
+-  @@storage_path = "#{RAILS_ROOT}/files"
++  @@storage_path = ENV['RAILS_VAR'] ? File.join(ENV['RAILS_VAR'], 'files') : "#{RAILS_ROOT}/files"
+   
+   def validate
+     if self.filesize > Setting.attachment_max_size.to_i.kilobytes
+--- a/config/environment.rb
++++ b/config/environment.rb
+@@ -2,7 +2,15 @@
+ 
+ # Uncomment below to force Rails into production mode when 
+ # you don't control web/app server and can't set it the proper way
+-# ENV['RAILS_ENV'] ||= 'production'
++ENV['RAILS_ENV'] ||= 'production'
++
++# for debian package : setup proper environment variables and paths
++# To run redmine as unprivileged user, see /usr/share/doc/redmine/README.Debian
++ENV['X_DEBIAN_SITEID'] ||= 'default'
++ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['RAILS_LOG'] ||= "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['RAILS_VAR'] ||= "/var/lib/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['RAILS_CACHE'] ||= "/var/cache/redmine/#{ENV['X_DEBIAN_SITEID']}"
+ 
+ # Specifies gem version of Rails to use when vendor/rails is not present
+ RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
+@@ -30,9 +38,18 @@
+   # (by default production uses :info, the others :debug)
+   # config.log_level = :debug
+ 
++  # log path
++  config.log_path = File.join(ENV['RAILS_LOG'], "#{ENV['RAILS_ENV']}.log") unless !ENV['RAILS_LOG']
++
+   # Enable page/fragment caching by setting a file-based store
+   # (remember to create the caching directory and make it readable to the application)
+   # config.action_controller.cache_store = :file_store, "#{RAILS_ROOT}/tmp/cache"
++
++  # the file cache store
++  config.cache_store = :file_store, ENV['RAILS_CACHE']
++  
++  # Set Active Record's database.yml path
++  config.database_configuration_file = File.join(ENV['RAILS_ETC'], 'database.yml') unless !ENV['RAILS_ETC']
+   
+   # Activate observers that should always be running
+   # config.active_record.observers = :cacher, :garbage_collector
+--- a/config/initializers/10-patches.rb
++++ b/config/initializers/10-patches.rb
+@@ -79,6 +79,9 @@
+ 
+ ActionMailer::Base.send :include, AsynchronousMailer
+ 
++# the session store
++ActionController::Base.session_options[:tmpdir] = File.join(ENV['RAILS_VAR'], 'sessions') unless !ENV['RAILS_VAR']
++
+ # TODO: Hack to support i18n 4.x on Rails 2.3.5.  Remove post 2.3.6.
+ # See http://www.redmine.org/issues/6428 and http://www.redmine.org/issues/5608
+ module I18n
+--- a/config/initializers/40-email.rb
++++ b/config/initializers/40-email.rb
+@@ -1,7 +1,7 @@
+ # Loads action_mailer settings from email.yml
+ # and turns deliveries on if configuration file is found
+ 
+-filename = File.join(File.dirname(__FILE__), '..', 'email.yml')
++filename = ENV['RAILS_ETC'] ? File.join(ENV['RAILS_ETC'], 'email.yml') : File.join(File.dirname(__FILE__), '..', 'email.yml')
+ if File.file?(filename)
+   mailconfig = YAML::load_file(filename)
+ 
+--- a/public/dispatch.fcgi.example
++++ b/public/dispatch.fcgi.example
+@@ -20,5 +20,8 @@
+ #
+ require File.dirname(__FILE__) + "/../config/environment"
+ require 'fcgi_handler'
+-
+-RailsFCGIHandler.process!
++if ENV['RAILS_LOG']
++  RailsFCGIHandler.process! File.join(ENV['RAILS_LOG'], 'fastcgi.crash.log')
++else
++  RailsFCGIHandler.process!
++end

Copied: trunk/redmine/debian/patches/2003_externalize_session_config.patch (from rev 5990, trunk/redmine/debian/patches/0014-Move-session-configuration-to-YML-file-next-to-datab.patch)
===================================================================
--- trunk/redmine/debian/patches/2003_externalize_session_config.patch	                        (rev 0)
+++ trunk/redmine/debian/patches/2003_externalize_session_config.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -0,0 +1,84 @@
+Description: Externalize session config to yml in /etc
+Forwarded: not-needed
+Author: Jérémy Lal <kapouer at melix.org>
+Last-Update: 2010-01-10
+--- a/config/environment.rb
++++ b/config/environment.rb
+@@ -18,6 +18,20 @@
+ # Bootstrap the Rails environment, frameworks, and default configuration
+ require File.join(File.dirname(__FILE__), 'boot')
+ 
++# loads cookie based session session and secret keys
++# this is needed here because initializers are loaded after plugins,
++# and some plugins initialize ActionController which requires a secret to be set.
++# crash if file not found
++filename = ENV['RAILS_ETC'] ? File.join(ENV['RAILS_ETC'], 'session.yml') : File.join(File.dirname(__FILE__), '..', 'session.yml')
++sessionconfig = YAML::load_file(filename)
++require 'action_controller'
++relativeUrlRoot = ENV['RAILS_RELATIVE_URL_ROOT']
++ActionController::Base.session = {
++  :key => sessionconfig[Rails.env]['key'],
++  :secret => sessionconfig[Rails.env]['secret'],
++  :path => (relativeUrlRoot.blank?) ? '/' : relativeUrlRoot
++}
++
+ # Load Engine plugin if available
+ begin
+   require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
+--- a/lib/tasks/initializers.rake
++++ b/lib/tasks/initializers.rake
+@@ -1,11 +1,14 @@
+ desc 'Generates a configuration file for cookie store sessions.'
++task :generate_session_store do
+ 
+-file 'config/initializers/session_store.rb' do
+-  path = File.join(RAILS_ROOT, 'config', 'initializers', 'session_store.rb')
+-  secret = ActiveSupport::SecureRandom.hex(40)
+-  File.open(path, 'w') do |f|
+-    f.write <<"EOF"
+-# This file was generated by 'rake config/initializers/session_store.rb',
++ENV['X_DEBIAN_SITEID'] ||= 'default'
++ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
++filename = ENV['YML_SESSION_FILENAME'] ? ENV['YML_SESSION_FILENAME'] : 'session.yml'
++path = File.join(ENV['RAILS_ETC'] ? ENV['RAILS_ETC'] : File.join(RAILS_ROOT, 'config'), filename)
++secret = ActiveSupport::SecureRandom.hex(40)
++File.open(path, 'w') do |f|
++  f.write <<"EOF"
++# This file was generated by 'rake generate_session_store',
+ # and should not be made visible to public.
+ # If you have a load-balancing Redmine cluster, you will need to use the
+ # same version of this file on each machine. And be sure to restart your
+@@ -15,20 +18,19 @@
+ # change this key, all old sessions will become invalid! Make sure the
+ # secret is at least 30 characters and all random, no regular words or
+ # you'll be exposed to dictionary attacks.
+-ActionController::Base.session = {
+-  :key => '_redmine_session',
+-  #
+-  # Uncomment and edit the :session_path below if are hosting your Redmine
+-  # at a suburi and don't want the top level path to access the cookies
+-  #
+-  # See: http://www.redmine.org/issues/3968
+-  #
+-  # :session_path => '/url_path_to/your/redmine/',
+-  :secret => '#{secret}'
+-}
++
++production:
++  key: _redmine_#{ENV['X_DEBIAN_SITEID']}
++  secret: #{secret}
++
++development:
++  key: _redmine_#{ENV['X_DEBIAN_SITEID']}
++  secret: #{secret}
++
++test:
++  key: _redmine_#{ENV['X_DEBIAN_SITEID']}
++  secret: #{secret}
++
+ EOF
+   end
+ end
+-
+-desc 'Generates a configuration file for cookie store sessions.'
+-task :generate_session_store => ['config/initializers/session_store.rb']

Copied: trunk/redmine/debian/patches/2004_FHS_plugins_assets.patch (from rev 5990, trunk/redmine/debian/patches/0016-plugin_assets_in_var_dir.patch)
===================================================================
--- trunk/redmine/debian/patches/2004_FHS_plugins_assets.patch	                        (rev 0)
+++ trunk/redmine/debian/patches/2004_FHS_plugins_assets.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -0,0 +1,17 @@
+Description: FHS plugins assets
+ Engines plugin writes to /usr/share/redmine/public/plugin_assets by default.
+ Instead, use per-instance cache directory.
+Forwarded: not-needed
+Author: Jérémy Lal <kapouer at melix.org>
+Bug-Debian: http://bugs.debian.org/570308
+Last-Update: 2010-02-18
+--- a/config/environment.rb
++++ b/config/environment.rb
+@@ -35,6 +35,7 @@
+ # Load Engine plugin if available
+ begin
+   require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
++  Engines::public_directory = "#{ENV['RAILS_CACHE']}/plugin_assets"
+ rescue LoadError
+   # Not available
+ end

Copied: trunk/redmine/debian/patches/2005_FHS_schema_dump.patch (from rev 5990, trunk/redmine/debian/patches/0017-dump_schema_to_cache_dir.patch)
===================================================================
--- trunk/redmine/debian/patches/2005_FHS_schema_dump.patch	                        (rev 0)
+++ trunk/redmine/debian/patches/2005_FHS_schema_dump.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -0,0 +1,16 @@
+Description: FHS schema dump
+ db:schema:dump, called by rake db:migrate, writes to /usr/share/redmine/db.
+ Instead, use per-instance cache directory.
+Forwarded: not-needed
+Author: Jérémy Lal <kapouer at melix.org>
+Last-Update: 2010-05-25
+--- a/config/environment.rb
++++ b/config/environment.rb
+@@ -11,6 +11,7 @@
+ ENV['RAILS_LOG'] ||= "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"
+ ENV['RAILS_VAR'] ||= "/var/lib/redmine/#{ENV['X_DEBIAN_SITEID']}"
+ ENV['RAILS_CACHE'] ||= "/var/cache/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['SCHEMA'] ||= "#{ENV['RAILS_CACHE']}/schema.db"
+ 
+ # Specifies gem version of Rails to use when vendor/rails is not present
+ RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION

Copied: trunk/redmine/debian/patches/2006_fix_shebang_interpreter.patch (from rev 5990, trunk/redmine/debian/patches/0018-remove-shebang.patch)
===================================================================
--- trunk/redmine/debian/patches/2006_fix_shebang_interpreter.patch	                        (rev 0)
+++ trunk/redmine/debian/patches/2006_fix_shebang_interpreter.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -0,0 +1,11 @@
+Description: Fix shebang interpreter
+Forwarded: not-needed
+Author: Jérémy Lal <kapouer at melix.org>
+Last-Update: 2010-02-28
+--- redmine-1.0.0.orig/vendor/plugins/coderay-0.9.2/lib/coderay/helpers/file_type.rb
++++ redmine-1.0.0/vendor/plugins/coderay-0.9.2/lib/coderay/helpers/file_type.rb
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env ruby
+ module CodeRay
+ 
+ # = FileType

Copied: trunk/redmine/debian/patches/2007_disable_deprecation_warnings.patch (from rev 5990, trunk/redmine/debian/patches/disable-deprecations.patch)
===================================================================
--- trunk/redmine/debian/patches/2007_disable_deprecation_warnings.patch	                        (rev 0)
+++ trunk/redmine/debian/patches/2007_disable_deprecation_warnings.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -0,0 +1,29 @@
+Description: Disable deprecation warnings
+Forwarded: not-needed
+Author: Jérémy Lal <kapouer at melix.org>
+Last-Update: 2010-11-28
+--- a/config/environment.rb
++++ b/config/environment.rb
+@@ -19,6 +19,11 @@
+ # Bootstrap the Rails environment, frameworks, and default configuration
+ require File.join(File.dirname(__FILE__), 'boot')
+ 
++# Disable deprecation warnings
++if Gem::Dependency.respond_to?('warned_version_requirement')
++  Gem::Dependency.warned_version_requirement = true
++end
++
+ # loads cookie based session session and secret keys
+ # this is needed here because initializers are loaded after plugins,
+ # and some plugins initialize ActionController which requires a secret to be set.
+--- a/config/initializers/10-patches.rb
++++ b/config/initializers/10-patches.rb
+@@ -89,7 +89,7 @@
+     module Base
+       def warn_syntax_deprecation!(*args)
+         return if @skip_syntax_deprecation
+-        warn "The {{key}} interpolation syntax in I18n messages is deprecated and will be removed in Redmine 1.2. Please use %{key} instead, see http://www.redmine.org/issues/7013 for more information."
++        #warn "The {{key}} interpolation syntax in I18n messages is deprecated and will be removed in Redmine 1.2. Please use %{key} instead, see http://www.redmine.org/issues/7013 for more information."
+         @skip_syntax_deprecation = true
+       end
+     end

Copied: trunk/redmine/debian/patches/2008_force_table_encoding_mysql.patch (from rev 5990, trunk/redmine/debian/patches/mysql_create_table_utf8.patch)
===================================================================
--- trunk/redmine/debian/patches/2008_force_table_encoding_mysql.patch	                        (rev 0)
+++ trunk/redmine/debian/patches/2008_force_table_encoding_mysql.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -0,0 +1,34 @@
+Description: Force table encoding in mysql
+ mysql default encoding is not UTF8, but forcing table encoding is possible.
+ dbconfig-common does not provide appropriate configuration variable,
+ so here the mysql adapter is modified to respect encoding set in database.yml
+Forwarded: not-needed
+Author: Jérémy Lal <kapouer at melix.org>
+Bug-Debian: http://bugs.debian.org/599374
+Bug-Rails: http://rails.lighthouseapp.com/projects/8994/tickets/5830
+Last-Update: 2010-10-17
+--- a/config/initializers/10-patches.rb
++++ b/config/initializers/10-patches.rb
+@@ -1,6 +1,22 @@
+ 
+ require 'active_record'
+ 
++require 'active_record/connection_adapters/abstract_adapter'
++module ActiveRecord
++  module ConnectionAdapters
++    class MysqlAdapter < AbstractAdapter
++      def create_table(table_name, options = {}) #:nodoc:
++        encoding = @config[:encoding]
++        if encoding
++          options = options.reverse_merge(:options => "DEFAULT CHARSET=#{encoding}")
++        end
++        super(table_name, options.reverse_merge(:options => "ENGINE=InnoDB"))
++      end
++    end
++  end
++end
++
++
+ module ActiveRecord
+   class Base
+     include Redmine::I18n

Copied: trunk/redmine/debian/patches/2009_FHS_thin_config.patch (from rev 5990, trunk/redmine/debian/patches/thin_x_debian_siteid.patch)
===================================================================
--- trunk/redmine/debian/patches/2009_FHS_thin_config.patch	                        (rev 0)
+++ trunk/redmine/debian/patches/2009_FHS_thin_config.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -0,0 +1,15 @@
+Description: FHS support for thin config
+ See debian/doc/examples/thin-redmine.yml
+Forwarded: not-needed
+Author: Jérémy Lal <kapouer at melix.org>
+Last-Update: 2010-11-01
+--- a/config/environment.rb
++++ b/config/environment.rb
+@@ -6,6 +6,7 @@
+ 
+ # for debian package : setup proper environment variables and paths
+ # To run redmine as unprivileged user, see /usr/share/doc/redmine/README.Debian
++ObjectSpace.each_object(Thin::Runner){|x| ENV["X_DEBIAN_SITEID"] = x.options[:x_debian_siteid] if x.options[:x_debian_siteid]} if defined?(Thin)
+ ENV['X_DEBIAN_SITEID'] ||= 'default'
+ ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
+ ENV['RAILS_LOG'] ||= "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"

Copied: trunk/redmine/debian/patches/2010_use_i18n_0.4.1.patch (from rev 5990, trunk/redmine/debian/patches/i18n_0.4.1.patch)
===================================================================
--- trunk/redmine/debian/patches/2010_use_i18n_0.4.1.patch	                        (rev 0)
+++ trunk/redmine/debian/patches/2010_use_i18n_0.4.1.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -0,0 +1,43 @@
+Description: Use i18n 0.4.1 gem
+ 0.4.2 is not the rails 2.3.5 default
+ Some hack is needed to support the backport.
+Forwarded: not-needed
+Author: Jérémy Lal <kapouer at melix.org>
+Last-Update: 2010-12-24
+--- a/config/boot.rb
++++ b/config/boot.rb
+@@ -110,13 +110,13 @@
+ # Loads i18n 0.4.2 before Rails loads any more recent gem
+ # 0.5.0 is not compatible with the old interpolation syntax
+ # Plugins will have to migrate to the new syntax for 1.2.0
+-require 'rubygems'
+-begin
+-  gem 'i18n', '0.4.2'
+-rescue Gem::LoadError => load_error
+-  $stderr.puts %(Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`)
+-  exit 1
+-end
++#require 'rubygems'
++#begin
++#  gem 'i18n', '0.4.2'
++#rescue Gem::LoadError => load_error
++#  $stderr.puts %(Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`)
++#  exit 1
++#end
+ 
+ # All that for this:
+ Rails.boot!
+--- a/config/initializers/10-patches.rb
++++ b/config/initializers/10-patches.rb
+@@ -121,3 +121,11 @@
+     end
+   end
+ end
++
++# Second hack to support redmine transition to i18n 0.4.2
++class I18n::Backend::Simple
++  def interpolate(locale, string, values = {})
++    interpolate_without_deprecated_syntax(locale, string, values)
++ end
++end
++

Deleted: trunk/redmine/debian/patches/disable-deprecations.patch
===================================================================
--- trunk/redmine/debian/patches/disable-deprecations.patch	2011-01-24 20:42:01 UTC (rev 6015)
+++ trunk/redmine/debian/patches/disable-deprecations.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -1,29 +0,0 @@
-Description: Deprecation warnings are not interesting for production use.
- The debian redmine maintainers are supposed to run the test suite
- before release (see README.source), so the warnings won't be missed.
-
---- a/config/environment.rb
-+++ b/config/environment.rb
-@@ -19,6 +19,11 @@
- # Bootstrap the Rails environment, frameworks, and default configuration
- require File.join(File.dirname(__FILE__), 'boot')
- 
-+# Disable deprecation warnings
-+if Gem::Dependency.respond_to?('warned_version_requirement')
-+  Gem::Dependency.warned_version_requirement = true
-+end
-+
- # loads cookie based session session and secret keys
- # this is needed here because initializers are loaded after plugins,
- # and some plugins initialize ActionController which requires a secret to be set.
---- a/config/initializers/10-patches.rb
-+++ b/config/initializers/10-patches.rb
-@@ -89,7 +89,7 @@
-     module Base
-       def warn_syntax_deprecation!(*args)
-         return if @skip_syntax_deprecation
--        warn "The {{key}} interpolation syntax in I18n messages is deprecated and will be removed in Redmine 1.2. Please use %{key} instead, see http://www.redmine.org/issues/7013 for more information."
-+        #warn "The {{key}} interpolation syntax in I18n messages is deprecated and will be removed in Redmine 1.2. Please use %{key} instead, see http://www.redmine.org/issues/7013 for more information."
-         @skip_syntax_deprecation = true
-       end
-     end

Deleted: trunk/redmine/debian/patches/i18n_0.4.1.patch
===================================================================
--- trunk/redmine/debian/patches/i18n_0.4.1.patch	2011-01-24 20:42:01 UTC (rev 6015)
+++ trunk/redmine/debian/patches/i18n_0.4.1.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -1,38 +0,0 @@
-Disable loading of i18n 0.4.2 gem : 0.4.1 is available by default in rails 2.3.5.
---- a/config/boot.rb
-+++ b/config/boot.rb
-@@ -110,13 +110,13 @@
- # Loads i18n 0.4.2 before Rails loads any more recent gem
- # 0.5.0 is not compatible with the old interpolation syntax
- # Plugins will have to migrate to the new syntax for 1.2.0
--require 'rubygems'
--begin
--  gem 'i18n', '0.4.2'
--rescue Gem::LoadError => load_error
--  $stderr.puts %(Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`)
--  exit 1
--end
-+#require 'rubygems'
-+#begin
-+#  gem 'i18n', '0.4.2'
-+#rescue Gem::LoadError => load_error
-+#  $stderr.puts %(Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`)
-+#  exit 1
-+#end
- 
- # All that for this:
- Rails.boot!
---- a/config/initializers/10-patches.rb
-+++ b/config/initializers/10-patches.rb
-@@ -111,3 +111,11 @@
-     end
-   end
- end
-+
-+# Second hack to support redmine transition to i18n 0.4.2
-+class I18n::Backend::Simple
-+  def interpolate(locale, string, values = {})
-+    interpolate_without_deprecated_syntax(locale, string, values)
-+ end
-+end
-+

Deleted: trunk/redmine/debian/patches/mysql_create_table_utf8.patch
===================================================================
--- trunk/redmine/debian/patches/mysql_create_table_utf8.patch	2011-01-24 20:42:01 UTC (rev 6015)
+++ trunk/redmine/debian/patches/mysql_create_table_utf8.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -1,34 +0,0 @@
-Description: Mysql is unfortunately not configured by default to create UTF8 databases,
- and dbconfig-common is missing a configuration variable too :
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599374
- Mysql is to blame, but at least it is possible to create a table with a
- default charset, though libactiverecord does not take advantage of that fact.
- This patch address the issue in ActiveRecord, forwarded upstream :
- http://rails.lighthouseapp.com/projects/8994/tickets/5830-mysql-adapter-should-create-table-with-default-charset
-Author: Jérémy Lal <kapouer at melix.org>
-
---- a/config/initializers/10-patches.rb
-+++ b/config/initializers/10-patches.rb
-@@ -1,6 +1,22 @@
- 
- require 'active_record'
- 
-+require 'active_record/connection_adapters/abstract_adapter'
-+module ActiveRecord
-+  module ConnectionAdapters
-+    class MysqlAdapter < AbstractAdapter
-+      def create_table(table_name, options = {}) #:nodoc:
-+        encoding = @config[:encoding]
-+        if encoding
-+          options = options.reverse_merge(:options => "DEFAULT CHARSET=#{encoding}")
-+        end
-+        super(table_name, options.reverse_merge(:options => "ENGINE=InnoDB"))
-+      end
-+    end
-+  end
-+end
-+
-+
- module ActiveRecord
-   class Base
-     include Redmine::I18n

Modified: trunk/redmine/debian/patches/series
===================================================================
--- trunk/redmine/debian/patches/series	2011-01-24 20:42:01 UTC (rev 6015)
+++ trunk/redmine/debian/patches/series	2011-01-26 17:46:30 UTC (rev 6016)
@@ -1,10 +1,10 @@
-0008-Wrong-path-for-interpreter.patch
-0009-Allows-environment-variables-to-setup-debian-paths.patch
-0014-Move-session-configuration-to-YML-file-next-to-datab.patch
-0016-plugin_assets_in_var_dir.patch
-0017-dump_schema_to_cache_dir.patch
-0018-remove-shebang.patch
-disable-deprecations.patch
-mysql_create_table_utf8.patch
-thin_x_debian_siteid.patch
-i18n_0.4.1.patch
+2001_fix_shebang_interpreter.patch
+2002_FHS_through_env_vars.patch
+2003_externalize_session_config.patch
+2004_FHS_plugins_assets.patch
+2005_FHS_schema_dump.patch
+2006_fix_shebang_interpreter.patch
+2007_disable_deprecation_warnings.patch
+2008_force_table_encoding_mysql.patch
+2009_FHS_thin_config.patch
+2010_use_i18n_0.4.1.patch
\ No newline at end of file

Deleted: trunk/redmine/debian/patches/thin_x_debian_siteid.patch
===================================================================
--- trunk/redmine/debian/patches/thin_x_debian_siteid.patch	2011-01-24 20:42:01 UTC (rev 6015)
+++ trunk/redmine/debian/patches/thin_x_debian_siteid.patch	2011-01-26 17:46:30 UTC (rev 6016)
@@ -1,14 +0,0 @@
-Description: adds support for "x_debian_siteid" configuration option for thin yaml config file.
- See also debian/doc/examples/thin-redmine.yml
-Author: Jérémy Lal <kapouer at melix.org>
-
---- a/config/environment.rb
-+++ b/config/environment.rb
-@@ -6,6 +6,7 @@
- 
- # for debian package : setup proper environment variables and paths
- # To run redmine as unprivileged user, see /usr/share/doc/redmine/README.Debian
-+ObjectSpace.each_object(Thin::Runner){|x| ENV["X_DEBIAN_SITEID"] = x.options[:x_debian_siteid] if x.options[:x_debian_siteid]} if defined?(Thin)
- ENV['X_DEBIAN_SITEID'] ||= 'default'
- ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
- ENV['RAILS_LOG'] ||= "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"




More information about the Pkg-ruby-extras-commits mailing list