[DRE-commits] r4171 - in trunk/redmine/debian: . doc/examples patches

Jérémy Lal kapouer-guest at alioth.debian.org
Sat Sep 19 14:17:40 UTC 2009


Author: kapouer-guest
Date: 2009-09-19 14:17:39 +0000 (Sat, 19 Sep 2009)
New Revision: 4171

Modified:
   trunk/redmine/debian/README.Debian
   trunk/redmine/debian/changelog
   trunk/redmine/debian/doc/examples/apache2-alias.conf
   trunk/redmine/debian/doc/examples/apache2-host.conf
   trunk/redmine/debian/doc/examples/lighttpd-host-alias.conf
   trunk/redmine/debian/doc/examples/lighttpd-host.conf
   trunk/redmine/debian/doc/examples/lighttpd-socket-alias.conf
   trunk/redmine/debian/doc/examples/lighttpd-socket.conf
   trunk/redmine/debian/patches/01_paths.patch
   trunk/redmine/debian/postinst
Log:
Fixes:
- Standards-Version not up-to-date
- errors when installing : /var/lib/dpkg/info/redmine.config: line 112: [: =: unary operator expected
- The tip in README.Debian about starting webrick doesn't work
- Please ship an apache2 config file that works on Debian. The examples work now, provided the admin read them.

Modified: trunk/redmine/debian/README.Debian
===================================================================
--- trunk/redmine/debian/README.Debian	2009-09-19 14:17:36 UTC (rev 4170)
+++ trunk/redmine/debian/README.Debian	2009-09-19 14:17:39 UTC (rev 4171)
@@ -13,7 +13,7 @@
 
 To test redmine without installing a web server :
 cd /usr/share/redmine/
-ruby script/server webrick -e production
+ruby script/server webrick -e production X_DEBIAN_SITEID="default"
 and point your browser to http://localhost:3000
 
 Email settings are not automatically configured, for a quick setup, copy

Modified: trunk/redmine/debian/changelog
===================================================================
--- trunk/redmine/debian/changelog	2009-09-19 14:17:36 UTC (rev 4170)
+++ trunk/redmine/debian/changelog	2009-09-19 14:17:39 UTC (rev 4171)
@@ -1,54 +1,11 @@
 redmine (0.9.0~svn2886-1) UNRELEASED; urgency=low
 
-Problems:
+Fixes:
 - Standards-Version not up-to-date
-- errors when installing (due to dash as /bin/sh?):
-Database type to be used by redmine/instances/default: 1
+- errors when installing : /var/lib/dpkg/info/redmine.config: line 112: [: =: unary operator expected
+- The tip in README.Debian about starting webrick doesn't work
+- Please ship an apache2 config file that works on Debian. The examples work now, provided the admin read them.
 
-
-/var/lib/dpkg/info/redmine.config: line 112: [: =: unary operator expected
-/var/lib/dpkg/info/redmine.config: line 112: [: =: unary operator expected
-/var/lib/dpkg/info/redmine.config: line 112: [: =: unary operator expected
-/var/lib/dpkg/info/redmine.config: line 112: [: =: unary operator expected
-/var/lib/dpkg/info/redmine.config: line 112: [: =: unary operator expected
-/var/lib/dpkg/info/redmine.config: line 112: [: =: unary operator expected
-[...]
-
-The tip in README.Debian about starting webrick doesn't work:
-beothuk:/usr/share/redmine# ruby script/server webrick -e production
-=> Booting WEBrick...
-/usr/share/redmine/vendor/rails/railties/lib/initializer.rb:819:in `read': No such file or directory - /usr/share/redmine/config/database.yml (Errno::ENOENT)
-	from /usr/share/redmine/vendor/rails/railties/lib/initializer.rb:819:in `database_configuration'
-	from /usr/share/redmine/vendor/rails/railties/lib/initializer.rb:391:in `initialize_database'
-	from /usr/share/redmine/vendor/rails/railties/lib/initializer.rb:139:in `process'
-	from /usr/share/redmine/vendor/rails/railties/lib/initializer.rb:112:in `send'
-	from /usr/share/redmine/vendor/rails/railties/lib/initializer.rb:112:in `run'
-	from /usr/share/redmine/config/environment.rb:23
-	from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
-	from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
-	from /usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
-	from /usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
-	from /usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
-	from /usr/share/redmine/vendor/rails/railties/lib/commands/servers/webrick.rb:59
-	from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
-	from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
-	from /usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
-	from /usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
-	from /usr/share/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
-	from /usr/share/redmine/vendor/rails/railties/lib/commands/server.rb:49
-	from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
-	from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
-	from script/server:3
-
-
-Please ship an apache2 config file that works on Debian. The examples
-don't. For example, with apache2-host.conf, I get:
-beothuk:/usr/share/doc/redmine/examples# /etc/init.d/apache2 restart
-Restarting web server: apache2We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now! ... (warning).
- ... waiting Syntax error on line 3 of /etc/apache2/sites-enabled/apache2-host.conf:
-Invalid command 'DefaultInitEnv', perhaps misspelled or defined by a module not included in the server configuration
- failed!
-
   * Initial release (Closes: #478741)
 
  -- Jérémy Lal <kapouer at melix.org>  Wed, 08 Jul 2009 21:26:01 +0200

Modified: trunk/redmine/debian/doc/examples/apache2-alias.conf
===================================================================
--- trunk/redmine/debian/doc/examples/apache2-alias.conf	2009-09-19 14:17:36 UTC (rev 4170)
+++ trunk/redmine/debian/doc/examples/apache2-alias.conf	2009-09-19 14:17:39 UTC (rev 4171)
@@ -1,10 +1,10 @@
 <VirtualHost localhost>
-	# DefaultInitEnv may not work, in that case, replace it with SetEnv
+	# DefaultInitEnv for module mod_fcgid
 	DefaultInitEnv RAILS_RELATIVE_URL_ROOT "/redmine"
-	DefaultInitEnv RAILS_ETC "/etc/redmine/default"
-	DefaultInitEnv RAILS_LOG "/var/log/redmine/default"
-	DefaultInitEnv RAILS_VAR "/var/lib/redmine/default"
-	DefaultInitEnv RAILS_CACHE "/var/cache/redmine/default"
+	DefaultInitEnv X_DEBIAN_SITEID "default"
+	# SetEnv for module mod_fastcgi
+	# SetEnv RAILS_RELATIVE_URL_ROOT "/redmine"
+	# SetEnv X_DEBIAN_SITEID "default"
 
 	# the fcgid socket path
 	SocketPath "/var/run/redmine/sockets/default"

Modified: trunk/redmine/debian/doc/examples/apache2-host.conf
===================================================================
--- trunk/redmine/debian/doc/examples/apache2-host.conf	2009-09-19 14:17:36 UTC (rev 4170)
+++ trunk/redmine/debian/doc/examples/apache2-host.conf	2009-09-19 14:17:39 UTC (rev 4171)
@@ -1,10 +1,9 @@
 <VirtualHost localhost>
-	# DefaultInitEnv may not work, in that case, replace it with SetEnv
-	DefaultInitEnv RAILS_RELATIVE_URL_ROOT "/redmine"
-	DefaultInitEnv RAILS_ETC "/etc/redmine/default"
-	DefaultInitEnv RAILS_LOG "/var/log/redmine/default"
-	DefaultInitEnv RAILS_VAR "/var/lib/redmine/default"
-	DefaultInitEnv RAILS_CACHE "/var/cache/redmine/default"
+	# DefaultInitEnv for module mod_fcgid
+	DefaultInitEnv X_DEBIAN_SITEID "default"
+	# SetEnv for module mod_fastcgi
+	# SetEnv X_DEBIAN_SITEID "default"
+	
 	# the fcgid socket path
 	SocketPath "/var/run/redmine/sockets/default"
 	DocumentRoot /usr/share/redmine/public

Modified: trunk/redmine/debian/doc/examples/lighttpd-host-alias.conf
===================================================================
--- trunk/redmine/debian/doc/examples/lighttpd-host-alias.conf	2009-09-19 14:17:36 UTC (rev 4170)
+++ trunk/redmine/debian/doc/examples/lighttpd-host-alias.conf	2009-09-19 14:17:39 UTC (rev 4171)
@@ -14,10 +14,7 @@
 					"bin-path"        => "/usr/share/redmine/public/dispatch.fcgi",
 					"bin-environment" => (
 						"RAILS_RELATIVE_URL_ROOT" => "/redmine",
-						"RAILS_ETC" => "/etc/redmine/default",
-						"RAILS_LOG" => "/var/log/redmine/default",
-						"RAILS_VAR" => "/var/lib/redmine/default",
-						"RAILS_CACHE" => "/var/cache/redmine/default"
+						"X_DEBIAN_SITEID" => "default"
 					),
 					"check-local"    => "disable",
 					"kill-signal" => 10 # this is because programs linked against libfcgi need USR1 kill-signal

Modified: trunk/redmine/debian/doc/examples/lighttpd-host.conf
===================================================================
--- trunk/redmine/debian/doc/examples/lighttpd-host.conf	2009-09-19 14:17:36 UTC (rev 4170)
+++ trunk/redmine/debian/doc/examples/lighttpd-host.conf	2009-09-19 14:17:39 UTC (rev 4171)
@@ -12,10 +12,7 @@
 				"socket"          => "/var/run/redmine/sockets/default/fcgi.socket",
 				"bin-path"        => "/usr/share/redmine/public/dispatch.fcgi",
 				"bin-environment" => (
-					"RAILS_ETC" => "/etc/redmine/default",
-					"RAILS_LOG" => "/var/log/redmine/default",
-					"RAILS_VAR" => "/var/lib/redmine/default",
-					"RAILS_CACHE" => "/var/cache/redmine/default"
+					"X_DEBIAN_SITEID" => "default"
 				),
 				"kill-signal" => 10 # this is because programs linked against libfcgi need USR1 kill-signal
 			)

Modified: trunk/redmine/debian/doc/examples/lighttpd-socket-alias.conf
===================================================================
--- trunk/redmine/debian/doc/examples/lighttpd-socket-alias.conf	2009-09-19 14:17:36 UTC (rev 4170)
+++ trunk/redmine/debian/doc/examples/lighttpd-socket-alias.conf	2009-09-19 14:17:39 UTC (rev 4171)
@@ -14,10 +14,7 @@
 					"bin-path"        => "/usr/share/redmine/public/dispatch.fcgi",
 					"bin-environment" => (
 						"RAILS_RELATIVE_URL_ROOT" => "/redmine",
-						"RAILS_ETC" => "/etc/redmine/default",
-						"RAILS_LOG" => "/var/log/redmine/default",
-						"RAILS_VAR" => "/var/lib/redmine/default",
-						"RAILS_CACHE" => "/var/cache/redmine/default"
+						"X_DEBIAN_SITEID" => "default"
 					),
 					"check-local"    => "disable",
 					"kill-signal" => 10 # this is because programs linked against libfcgi need USR1 kill-signal

Modified: trunk/redmine/debian/doc/examples/lighttpd-socket.conf
===================================================================
--- trunk/redmine/debian/doc/examples/lighttpd-socket.conf	2009-09-19 14:17:36 UTC (rev 4170)
+++ trunk/redmine/debian/doc/examples/lighttpd-socket.conf	2009-09-19 14:17:39 UTC (rev 4171)
@@ -12,10 +12,7 @@
 				"socket"          => "/var/run/redmine/sockets/default/fcgi.socket",
 				"bin-path"        => "/usr/share/redmine/public/dispatch.fcgi",
 				"bin-environment" => (
-					"RAILS_ETC" => "/etc/redmine/default",
-					"RAILS_LOG" => "/var/log/redmine/default",
-					"RAILS_VAR" => "/var/lib/redmine/default",
-					"RAILS_CACHE" => "/var/cache/redmine/default"
+					"X_DEBIAN_SITEID" => "default"
 				),
 				"kill-signal" => 10 # this is because programs linked against libfcgi need USR1 kill-signal
 			)

Modified: trunk/redmine/debian/patches/01_paths.patch
===================================================================
--- trunk/redmine/debian/patches/01_paths.patch	2009-09-19 14:17:36 UTC (rev 4170)
+++ trunk/redmine/debian/patches/01_paths.patch	2009-09-19 14:17:39 UTC (rev 4171)
@@ -1,8 +1,6 @@
-Allows path configuration through environment variables RAILS_LOG, RAILS_VAR, RAILS_ETC, RAILS_CACHE
-
-diff -Nur redmine-0.9.0/app/models/attachment.rb redmine-0.9.0.new/app/models/attachment.rb
---- redmine-0.9.0/app/models/attachment.rb	2009-04-25 11:31:36.000000000 +0200
-+++ redmine-0.9.0.new/app/models/attachment.rb	2009-07-20 10:10:20.577250208 +0200
+diff -Nur redmine-0.9.0~svn2886/app/models/attachment.rb redmine-0.9.0~svn2886.new/app/models/attachment.rb
+--- redmine-0.9.0~svn2886/app/models/attachment.rb	2009-09-19 13:43:38.878242839 +0200
++++ redmine-0.9.0~svn2886.new/app/models/attachment.rb	2009-09-19 13:44:46.990243705 +0200
 @@ -43,7 +43,7 @@
                                                          "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"}
  
@@ -12,22 +10,26 @@
    
    def validate
      if self.filesize > Setting.attachment_max_size.to_i.kilobytes
-diff -Nur redmine-0.9.0/config/environment.rb redmine-0.9.0.new/config/environment.rb
---- redmine-0.9.0/config/environment.rb	2009-05-17 11:55:13.000000000 +0200
-+++ redmine-0.9.0.new/config/environment.rb	2009-07-20 10:03:30.529220583 +0200
-@@ -2,7 +2,10 @@
+diff -Nur redmine-0.9.0~svn2886/config/environment.rb redmine-0.9.0~svn2886.new/config/environment.rb
+--- redmine-0.9.0~svn2886/config/environment.rb	2009-09-19 13:43:38.926218973 +0200
++++ redmine-0.9.0~svn2886.new/config/environment.rb	2009-09-19 13:57:45.417218964 +0200
+@@ -2,7 +2,14 @@
  
  # 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'
-+#not needed ENV['RAILS_LOG'] ||= '/var/log/redmine'
-+#not needed ENV['RAILS_ETC'] ||= '/etc/redmine'
-+ENV['RAILS_CACHE'] ||= "#{RAILS_ROOT}/cache"
++
++# for debian package : setup proper environment variables and paths
++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.2.2' unless defined? RAILS_GEM_VERSION
-@@ -30,9 +33,18 @@
+@@ -30,9 +37,18 @@
    # (by default production uses :info, the others :debug)
    # config.log_level = :debug
  
@@ -46,9 +48,9 @@
    
    # Activate observers that should always be running
    # config.active_record.observers = :cacher, :garbage_collector
-diff -Nur redmine-0.9.0/config/initializers/10-patches.rb redmine-0.9.0.new/config/initializers/10-patches.rb
---- redmine-0.9.0/config/initializers/10-patches.rb	2009-02-22 15:46:32.000000000 +0100
-+++ redmine-0.9.0.new/config/initializers/10-patches.rb	2009-07-20 10:12:30.665222136 +0200
+diff -Nur redmine-0.9.0~svn2886/config/initializers/10-patches.rb redmine-0.9.0~svn2886.new/config/initializers/10-patches.rb
+--- redmine-0.9.0~svn2886/config/initializers/10-patches.rb	2009-09-19 13:43:38.986234942 +0200
++++ redmine-0.9.0~svn2886.new/config/initializers/10-patches.rb	2009-09-19 13:44:46.990243705 +0200
 @@ -78,3 +78,6 @@
  end
  
@@ -56,9 +58,9 @@
 +
 +# the session store
 +ActionController::Base.session_options[:tmpdir] = File.join(ENV['RAILS_VAR'], 'sessions') unless !ENV['RAILS_VAR']
-diff -Nur redmine-0.9.0/config/initializers/40-email.rb redmine-0.9.0.new/config/initializers/40-email.rb
---- redmine-0.9.0/config/initializers/40-email.rb	2008-07-04 20:55:45.000000000 +0200
-+++ redmine-0.9.0.new/config/initializers/40-email.rb	2009-07-20 10:06:39.470459347 +0200
+diff -Nur redmine-0.9.0~svn2886/config/initializers/40-email.rb redmine-0.9.0~svn2886.new/config/initializers/40-email.rb
+--- redmine-0.9.0~svn2886/config/initializers/40-email.rb	2009-09-19 13:43:38.954242586 +0200
++++ redmine-0.9.0~svn2886.new/config/initializers/40-email.rb	2009-09-19 13:44:46.990243705 +0200
 @@ -1,7 +1,7 @@
  # Loads action_mailer settings from email.yml
  # and turns deliveries on if configuration file is found
@@ -68,9 +70,9 @@
  if File.file?(filename)
    mailconfig = YAML::load_file(filename)
  
-diff -Nur redmine-0.9.0/public/dispatch.fcgi.example redmine-0.9.0.new/public/dispatch.fcgi.example
---- redmine-0.9.0/public/dispatch.fcgi.example	2008-11-11 14:54:10.000000000 +0100
-+++ redmine-0.9.0.new/public/dispatch.fcgi.example	2009-07-20 10:14:50.137220270 +0200
+diff -Nur redmine-0.9.0~svn2886/public/dispatch.fcgi.example redmine-0.9.0~svn2886.new/public/dispatch.fcgi.example
+--- redmine-0.9.0~svn2886/public/dispatch.fcgi.example	2009-09-19 13:43:38.906218680 +0200
++++ redmine-0.9.0~svn2886.new/public/dispatch.fcgi.example	2009-09-19 13:44:46.990243705 +0200
 @@ -20,5 +20,8 @@
  #
  require File.dirname(__FILE__) + "/../config/environment"

Modified: trunk/redmine/debian/postinst
===================================================================
--- trunk/redmine/debian/postinst	2009-09-19 14:17:36 UTC (rev 4170)
+++ trunk/redmine/debian/postinst	2009-09-19 14:17:39 UTC (rev 4171)
@@ -143,9 +143,9 @@
 			if [ $withdb -eq 1 ]; then
 		   	db_get redmine/instances/${lInstance}/default-language && DEFAULT_LANGUAGE="$RET"
 				# handle rake install
-				rake -s db:migrate RAILS_ENV=$fRailsEnv RAILS_ETC="$fRailsEtc" RAILS_LOG="$fRailsLog" RAILS_VAR="$fRailsVar" RAILS_CACHE="$fRailsCache" VERBOSE=$RAKE_VERBOSE
-				rake -s redmine:load_default_data RAILS_ENV=$fRailsEnv RAILS_ETC="$fRailsEtc" RAILS_LOG="$fRailsLog" RAILS_VAR="$fRailsVar" RAILS_CACHE="$fRailsCache" REDMINE_LANG=$DEFAULT_LANGUAGE
-				rake -s config/initializers/session_store.rb RAILS_ENV=$fRailsEnv RAILS_ETC="$fRailsEtc" RAILS_LOG="$fRailsLog" RAILS_VAR="$fRailsVar" RAILS_CACHE="$fRailsCache"
+				rake -s db:migrate RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" VERBOSE=$RAKE_VERBOSE
+				rake -s redmine:load_default_data RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" REDMINE_LANG=$DEFAULT_LANGUAGE
+				rake -s config/initializers/session_store.rb RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}"
 				# because rake task is executed as root here, and this file is used later by web server, make sure owner is www-data
 				chown -f www-data:www-data ${fRailsLog}/production.log
 			else
@@ -161,9 +161,9 @@
 			if [ $withdb -eq 1 ]; then
 				savedir="`pwd`"
 				cd /usr/share/redmine
-				rake -s db:migrate RAILS_ENV=$fRailsEnv RAILS_ETC="$fRailsEtc" RAILS_LOG="$fRailsLog" RAILS_VAR="$fRailsVar" RAILS_CACHE="$fRailsCache" VERBOSE=$RAKE_VERBOSE
-				rake -s tmp:cache:clear RAILS_ENV=$fRailsEnv RAILS_ETC="$fRailsEtc" RAILS_LOG="$fRailsLog" RAILS_VAR="$fRailsVar" RAILS_CACHE="$fRailsCache"
-				rake -s tmp:sessions:clear RAILS_ENV=$fRailsEnv RAILS_ETC="$fRailsEtc" RAILS_LOG="$fRailsLog" RAILS_VAR="$fRailsVar" RAILS_CACHE="$fRailsCache"
+				rake -s db:migrate RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" VERBOSE=$RAKE_VERBOSE
+				rake -s tmp:cache:clear RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}"
+				rake -s tmp:sessions:clear RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}"
 				# because rake task is executed as root, make sure owner is www-data
 				chown -f www-data:www-data ${fRailsLog}/production.log
 				cd $savedir




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