[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#772021: unblock: redmine/3.0~20140825-3



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package redmine

This fixes an important bug where Redmine will crash at every request
under some specific issue management configurations.

Attached you will find:

- redmine-full.diff: full diff between testing and unstable
- redmine.diff: diff between previously unblocked version (#771611) and
  this new one.

unblock redmine/3.0~20140825-3

-- System Information:
Debian Release: 8.0
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Antonio Terceiro <terceiro@debian.org>
diff -Nru redmine-3.0~20140825/debian/changelog redmine-3.0~20140825/debian/changelog
--- redmine-3.0~20140825/debian/changelog	2014-11-30 21:20:48.000000000 -0200
+++ redmine-3.0~20140825/debian/changelog	2014-12-04 09:44:34.000000000 -0200
@@ -1,3 +1,10 @@
+redmine (3.0~20140825-3) unstable; urgency=medium
+
+  * debian/patches/avoid-crash-on-issues.diff: apply upstream patch to avoid
+    crashes in some issue management configurations (Closes: #771849)
+
+ -- Antonio Terceiro <terceiro@debian.org>  Thu, 04 Dec 2014 09:41:50 -0200
+
 redmine (3.0~20140825-2) unstable; urgency=medium
 
   * README.Debian: update instructions to run redmine without a webserver
diff -Nru redmine-3.0~20140825/debian/patches/avoid-crash-on-issues.diff redmine-3.0~20140825/debian/patches/avoid-crash-on-issues.diff
--- redmine-3.0~20140825/debian/patches/avoid-crash-on-issues.diff	1969-12-31 21:00:00.000000000 -0300
+++ redmine-3.0~20140825/debian/patches/avoid-crash-on-issues.diff	2014-12-04 09:44:34.000000000 -0200
@@ -0,0 +1,48 @@
+Description: fix crashes in some issue management configurations
+Author: Jean-Philippe Lang <jp_lang@yahoo.fr>
+Origin: upstream
+Bug: http://www.redmine.org/issues/18275
+Bug-Debian: https://bugs.debian.org/771849
+Reviewed-by: Antonio Terceiro <terceiro@debian.org>
+Last-Update: 2014-11-04
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/test/functional/repositories_controller_test.rb
++++ b/test/functional/repositories_controller_test.rb
+@@ -166,6 +166,18 @@ class RepositoriesControllerTest < Actio
+     assert_equal "1", assigns(:changeset).revision
+   end
+ 
++  def test_revision_should_show_add_related_issue_form
++    Role.find(1).add_permission! :manage_related_issues
++    @request.session[:user_id] = 2
++
++    get :revision, :id => 1, :rev => 1
++    assert_response :success
++
++    assert_select 'form[action=?]', '/projects/ecookbook/repository/revisions/1/issues' do
++      assert_select 'input[name=?]', 'issue_id'
++    end
++  end
++
+   def test_revision_should_not_change_the_project_menu_link
+     get :revision, :id => 1, :rev => 1
+     assert_response :success
+--- a/app/views/repositories/_related_issues.html.erb
++++ b/app/views/repositories/_related_issues.html.erb
+@@ -24,12 +24,12 @@
+ </ul>
+ 
+ <% if manage_allowed %>
+-  <%= form_for(@issue, :as => :issue, :remote => true,
+-       :url => {:controller => 'repositories', :action => 'add_related_issue',
++  <%= form_tag({:controller => 'repositories', :action => 'add_related_issue',
+                 :id => @project, :repository_id => @repository.identifier_param,
+                 :rev => @changeset.identifier},
++       :remote => true,
+        :method => :post,
+-       :html => {:id => 'new-relation-form', :style => (@issue ? '' : 'display: none;')}) do |f| %>
++       :id => 'new-relation-form', :style => (@issue ? '' : 'display: none;')) do |f| %>
+   <%= l(:label_issue) %> #<%= text_field_tag 'issue_id', '', :size => 10 %>
+   <%= submit_tag l(:button_add) %>
+   <%= toggle_link l(:button_cancel), 'new-relation-form'%>
diff -Nru redmine-3.0~20140825/debian/patches/series redmine-3.0~20140825/debian/patches/series
--- redmine-3.0~20140825/debian/patches/series	2014-11-30 21:20:48.000000000 -0200
+++ redmine-3.0~20140825/debian/patches/series	2014-12-04 09:44:34.000000000 -0200
@@ -9,3 +9,4 @@
 gemfile-adjustments.patch
 drop-update_all.patch
 invalidate-language-cache-from-older-versions.diff
+avoid-crash-on-issues.diff
diff -Nru redmine-3.0~20140825/debian/changelog redmine-3.0~20140825/debian/changelog
--- redmine-3.0~20140825/debian/changelog	2014-09-30 18:40:43.000000000 -0300
+++ redmine-3.0~20140825/debian/changelog	2014-12-04 09:44:34.000000000 -0200
@@ -1,3 +1,29 @@
+redmine (3.0~20140825-3) unstable; urgency=medium
+
+  * debian/patches/avoid-crash-on-issues.diff: apply upstream patch to avoid
+    crashes in some issue management configurations (Closes: #771849)
+
+ -- Antonio Terceiro <terceiro@debian.org>  Thu, 04 Dec 2014 09:41:50 -0200
+
+redmine (3.0~20140825-2) unstable; urgency=medium
+
+  * README.Debian: update instructions to run redmine without a webserver
+    (Closes: #765498)
+  * Make Gemfile.lock a symlink to /dev/null, so that bundler will not
+    abort on upgrades of minor versions (Closes: #767548)
+  * debian/redmine.triggers: reconfigure package whenever a plugin is
+    installed; so plugins database setup scripts are automatically applied
+    when they are installed.
+  * debian/patches/drop-update_all.patch: apply upstream patch to fix upgrades
+    from wheezy (Closes: #765466)
+  * debian/patches/invalidate-language-cache-from-older-versions.diff: avoid
+    using cached language list created by earlier versions, which is in a
+    incompatible data structure (Closes: #764230)
+  * Added Italian translation for Debconf prompts, thanks to Beatrice Torracca
+    (Closes: #768575)
+
+ -- Antonio Terceiro <terceiro@debian.org>  Sun, 30 Nov 2014 21:20:40 -0200
+
 redmine (3.0~20140825-1) unstable; urgency=medium
 
   * New upstream snapshot
diff -Nru redmine-3.0~20140825/debian/links redmine-3.0~20140825/debian/links
--- redmine-3.0~20140825/debian/links	2014-07-21 14:59:33.000000000 -0300
+++ redmine-3.0~20140825/debian/links	2014-12-04 09:44:34.000000000 -0200
@@ -4,3 +4,5 @@
 usr/share/javascript/scriptaculous/controls.js usr/share/redmine/public/javascripts/controls.js
 usr/share/javascript/scriptaculous/dragdrop.js usr/share/redmine/public/javascripts/dragdrop.js
 usr/share/javascript/scriptaculous/effects.js usr/share/redmine/public/javascripts/effects.js
+
+/dev/null                                     usr/share/redmine/Gemfile.lock
diff -Nru redmine-3.0~20140825/debian/patches/avoid-crash-on-issues.diff redmine-3.0~20140825/debian/patches/avoid-crash-on-issues.diff
--- redmine-3.0~20140825/debian/patches/avoid-crash-on-issues.diff	1969-12-31 21:00:00.000000000 -0300
+++ redmine-3.0~20140825/debian/patches/avoid-crash-on-issues.diff	2014-12-04 09:44:34.000000000 -0200
@@ -0,0 +1,48 @@
+Description: fix crashes in some issue management configurations
+Author: Jean-Philippe Lang <jp_lang@yahoo.fr>
+Origin: upstream
+Bug: http://www.redmine.org/issues/18275
+Bug-Debian: https://bugs.debian.org/771849
+Reviewed-by: Antonio Terceiro <terceiro@debian.org>
+Last-Update: 2014-11-04
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/test/functional/repositories_controller_test.rb
++++ b/test/functional/repositories_controller_test.rb
+@@ -166,6 +166,18 @@ class RepositoriesControllerTest < Actio
+     assert_equal "1", assigns(:changeset).revision
+   end
+ 
++  def test_revision_should_show_add_related_issue_form
++    Role.find(1).add_permission! :manage_related_issues
++    @request.session[:user_id] = 2
++
++    get :revision, :id => 1, :rev => 1
++    assert_response :success
++
++    assert_select 'form[action=?]', '/projects/ecookbook/repository/revisions/1/issues' do
++      assert_select 'input[name=?]', 'issue_id'
++    end
++  end
++
+   def test_revision_should_not_change_the_project_menu_link
+     get :revision, :id => 1, :rev => 1
+     assert_response :success
+--- a/app/views/repositories/_related_issues.html.erb
++++ b/app/views/repositories/_related_issues.html.erb
+@@ -24,12 +24,12 @@
+ </ul>
+ 
+ <% if manage_allowed %>
+-  <%= form_for(@issue, :as => :issue, :remote => true,
+-       :url => {:controller => 'repositories', :action => 'add_related_issue',
++  <%= form_tag({:controller => 'repositories', :action => 'add_related_issue',
+                 :id => @project, :repository_id => @repository.identifier_param,
+                 :rev => @changeset.identifier},
++       :remote => true,
+        :method => :post,
+-       :html => {:id => 'new-relation-form', :style => (@issue ? '' : 'display: none;')}) do |f| %>
++       :id => 'new-relation-form', :style => (@issue ? '' : 'display: none;')) do |f| %>
+   <%= l(:label_issue) %> #<%= text_field_tag 'issue_id', '', :size => 10 %>
+   <%= submit_tag l(:button_add) %>
+   <%= toggle_link l(:button_cancel), 'new-relation-form'%>
diff -Nru redmine-3.0~20140825/debian/patches/drop-update_all.patch redmine-3.0~20140825/debian/patches/drop-update_all.patch
--- redmine-3.0~20140825/debian/patches/drop-update_all.patch	1969-12-31 21:00:00.000000000 -0300
+++ redmine-3.0~20140825/debian/patches/drop-update_all.patch	2014-12-04 09:44:34.000000000 -0200
@@ -0,0 +1,68 @@
+Description: replace usage of deprecated #update_all method in migrations
+Author: Toshi MARUYAMA <marutosijp2@yahoo.co.jp>
+Origin: upstream
+Bug: http://www.redmine.org/issues/18132
+Bug-Debian: https://bugs.debian.org/765466
+Reviewed-by: Antonio Terceiro <terceiro@debian.org>
+Last-Update: 2014-11-30
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/db/migrate/072_add_enumerations_position.rb
++++ b/db/migrate/072_add_enumerations_position.rb
+@@ -4,7 +4,7 @@ class AddEnumerationsPosition < ActiveRe
+     Enumeration.all.group_by(&:opt).each do |opt, enums|
+       enums.each_with_index do |enum, i|
+         # do not call model callbacks
+-        Enumeration.update_all "position = #{i+1}", {:id => enum.id}
++        Enumeration.where({:id => enum.id}).update_all("position = #{i+1}")
+       end
+     end
+   end
+--- a/db/migrate/078_add_custom_fields_position.rb
++++ b/db/migrate/078_add_custom_fields_position.rb
+@@ -4,7 +4,7 @@ class AddCustomFieldsPosition < ActiveRe
+     CustomField.all.group_by(&:type).each  do |t, fields|
+       fields.each_with_index do |field, i|
+         # do not call model callbacks
+-        CustomField.update_all "position = #{i+1}", {:id => field.id}
++        CustomField.where({:id => field.id}).update_all("position = #{i+1}")
+       end
+     end
+   end
+--- a/db/migrate/101_populate_changesets_user_id.rb
++++ b/db/migrate/101_populate_changesets_user_id.rb
+@@ -7,7 +7,7 @@ class PopulateChangesetsUserId < ActiveR
+         username, email = $1.strip, $3
+         u = User.find_by_login(username)
+         u ||= User.find_by_mail(email) unless email.blank?
+-        Changeset.update_all("user_id = #{u.id}", ["committer = ?", committer]) unless u.nil?
++        Changeset.where(["committer = ?", committer]).update_all("user_id = #{u.id}") unless u.nil?
+       end
+     end
+   end
+--- a/db/migrate/20091225164732_remove_enumerations_opt.rb
++++ b/db/migrate/20091225164732_remove_enumerations_opt.rb
+@@ -5,8 +5,8 @@ class RemoveEnumerationsOpt < ActiveReco
+ 
+   def self.down
+     add_column :enumerations, :opt, :string, :limit => 4, :default => '', :null => false
+-    Enumeration.update_all("opt = 'IPRI'", "type = 'IssuePriority'")
+-    Enumeration.update_all("opt = 'DCAT'", "type = 'DocumentCategory'")
+-    Enumeration.update_all("opt = 'ACTI'", "type = 'TimeEntryActivity'")
++    Enumeration.where("type = 'IssuePriority'").update_all("opt = 'IPRI'")
++    Enumeration.where("type = 'DocumentCategory'").update_all("opt = 'DCAT'")
++    Enumeration.where("type = 'TimeEntryActivity'").update_all("opt = 'ACTI'")
+   end
+ end
+--- a/db/migrate/20130215111141_populate_issues_closed_on.rb
++++ b/db/migrate/20130215111141_populate_issues_closed_on.rb
+@@ -15,7 +15,8 @@ class PopulateIssuesClosedOn < ActiveRec
+ 
+       # Then set closed_on for closed issues that weren't up updated by the above UPDATE
+       # No journal was found so we assume that they were closed on creation
+-      Issue.update_all "closed_on = created_on", {:status_id => closed_status_ids, :closed_on => nil}
++      Issue.where({:status_id => closed_status_ids, :closed_on => nil}).
++               update_all("closed_on = created_on")
+     end
+   end
+ 
diff -Nru redmine-3.0~20140825/debian/patches/invalidate-language-cache-from-older-versions.diff redmine-3.0~20140825/debian/patches/invalidate-language-cache-from-older-versions.diff
--- redmine-3.0~20140825/debian/patches/invalidate-language-cache-from-older-versions.diff	1969-12-31 21:00:00.000000000 -0300
+++ redmine-3.0~20140825/debian/patches/invalidate-language-cache-from-older-versions.diff	2014-12-04 09:44:34.000000000 -0200
@@ -0,0 +1,20 @@
+Description: Make sure that invalid cache from older versions is not used for languages_options
+Author: Jean-Philippe Lang <jp_lang@yahoo.fr>
+Origin: upstream
+Bug-Debian: https://bugs.debian.org/764230
+Applied-Upstream: https://www.redmine.org/projects/redmine/repository/revisions/13544
+Reviewed-by: Antonio Terceiro <terceiro@debian.org>
+Last-Update: 2014-11-30
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/lib/redmine/i18n.rb
++++ b/lib/redmine/i18n.rb
+@@ -92,7 +92,7 @@ module Redmine
+     #
+     # The result is cached to prevent from loading all translations files.
+     def languages_options
+-      ActionController::Base.cache_store.fetch "i18n/languages_options" do
++      ActionController::Base.cache_store.fetch "i18n/languages_options/#{Redmine::VERSION}" do
+         valid_languages.map {|lang| [ll(lang.to_s, :general_lang_name), lang.to_s]}.sort {|x,y| x.first <=> y.first }
+       end
+     end
diff -Nru redmine-3.0~20140825/debian/patches/series redmine-3.0~20140825/debian/patches/series
--- redmine-3.0~20140825/debian/patches/series	2014-08-29 04:31:39.000000000 -0300
+++ redmine-3.0~20140825/debian/patches/series	2014-12-04 09:44:34.000000000 -0200
@@ -7,3 +7,6 @@
 1001_Parsedate.parsedate.patch
 2020_load_awesome_nested_set.patch
 gemfile-adjustments.patch
+drop-update_all.patch
+invalidate-language-cache-from-older-versions.diff
+avoid-crash-on-issues.diff
diff -Nru redmine-3.0~20140825/debian/po/it.po redmine-3.0~20140825/debian/po/it.po
--- redmine-3.0~20140825/debian/po/it.po	1969-12-31 21:00:00.000000000 -0300
+++ redmine-3.0~20140825/debian/po/it.po	2014-12-04 09:44:34.000000000 -0200
@@ -0,0 +1,124 @@
+# Italian translation of redmine debconf messages
+# Copyright (C) 2014 redmine package copyright holder
+# This file is distributed under the same license as the redmine package.
+# Beatrice Torracca <beatricet@libero.it>, 2014.
+msgid ""
+msgstr ""
+"Project-Id-Version: redmine\n"
+"Report-Msgid-Bugs-To: redmine@packages.debian.org\n"
+"POT-Creation-Date: 2010-08-13 14:00+0200\n"
+"PO-Revision-Date: 2014-11-08 14:42+0200\n"
+"Last-Translator: Beatrice Torracca <beatricet@libero.it>\n"
+"Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Virtaal 0.7.1\n"
+
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid "Redmine package now supports multiple instances"
+msgstr "Il pacchetto redmine ora supporta più istanze"
+
+# Lasciato "default" invariato perché in seguito viene usata una variabile per il nome di istanza e un identificatore di istanza e penso sia letteralmente "default"
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid ""
+"You are migrating from an unsupported version. The current instance will be "
+"now called the \"default\" instance. Please check your web server "
+"configuration files, see README.Debian."
+msgstr ""
+"Si sta eseguendo la migrazione da una versione non supportata. L'istanza "
+"corrente verrà ora chiamata istanza «default». Controllare i propri file di "
+"configurazione del server web, vedere README.Debian."
+
+#. Type: string
+#. Description
+#: ../templates:2001
+msgid "Redmine instances to be deconfigured:"
+msgstr "Istanze di redmine da deconfigurare:"
+
+#. Type: string
+#. Description
+#: ../templates:2001
+msgid "Configuration files for these instances will be removed."
+msgstr "I file di configurazione per queste istanze saranno rimossi."
+
+#. Type: string
+#. Description
+#: ../templates:2001
+msgid "Database (de)configuration will be asked accordingly."
+msgstr ""
+"Verranno poste, se necessario, domande sulla (de)configurazione dei database."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Redmine instances to be configured or upgraded:"
+msgstr "Istanze di redmine da configurare o aggiornare:"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Space-separated list of instances identifiers."
+msgstr "Elenco separato da spazi di identificatori di istanza."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Each instance has its configuration files in /etc/redmine/<instance-"
+"identifier>/"
+msgstr ""
+"Ogni istanza ha i propri file di configurazione in /etc/redmine/"
+"<identificatore-istanza>/"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "To deconfigure an instance, remove its identifier from this list."
+msgstr ""
+"Per deconfigurare un'istanza, rimuovere il suo identificatore da questo "
+"elenco."
+
+#. Type: select
+#. Description
+#: ../templates:4001
+msgid "Default redmine language:"
+msgstr "Lingua predefinita per redmine:"
+
+#. Type: error
+#. Description
+#: ../templates:5001
+msgid "redmine-${dbtype} package required"
+msgstr "Richiesto il pacchetto redmine-${dbtype}"
+
+#. Type: error
+#. Description
+#: ../templates:5001
+msgid ""
+"Redmine instance ${instance} is configured to use database type ${dbtype}, "
+"but the corresponding redmine-${dbtype} package is not installed."
+msgstr ""
+"L'istanza ${instance} di redmine è configurata per usare il tipo di database "
+"${dbtype}, ma il pacchetto redmine-${dbtype} corrispondente non è installato."
+
+#. Type: error
+#. Description
+#: ../templates:5001
+msgid "Configuration of instance ${instance} is aborted."
+msgstr "Configurazione dell'istanza ${instance} abbandonata."
+
+#. Type: error
+#. Description
+#: ../templates:5001
+msgid ""
+"To finish that configuration, please install the redmine-${dbtype} package, "
+"and reconfigure redmine using:"
+msgstr ""
+"Per completare tale configurazione installare il pacchetto redmine-${dbtype} "
+"e riconfigurare redmine usando:"
diff -Nru redmine-3.0~20140825/debian/postinst redmine-3.0~20140825/debian/postinst
--- redmine-3.0~20140825/debian/postinst	2014-09-14 14:30:33.000000000 -0300
+++ redmine-3.0~20140825/debian/postinst	2014-12-04 09:44:34.000000000 -0200
@@ -88,7 +88,7 @@
 		cd $savedir
 	;;
 
-	abort-upgrade|abort-remove|abort-deconfigure)
+	abort-upgrade|abort-remove|abort-deconfigure|triggered)
 	;;
 
 	*)
@@ -213,7 +213,7 @@
 		lInstall=0
 	fi
 	case "$1" in
-		configure|reconfigure)
+		configure|reconfigure|triggered)
 			if dpkg --compare-versions "$2" lt "2.3.0+dfsg1-3~"; then
 			    rm -rf $fRailsCache
 			fi
diff -Nru redmine-3.0~20140825/debian/README.Debian redmine-3.0~20140825/debian/README.Debian
--- redmine-3.0~20140825/debian/README.Debian	2014-09-22 10:34:39.000000000 -0300
+++ redmine-3.0~20140825/debian/README.Debian	2014-12-04 09:44:34.000000000 -0200
@@ -62,14 +62,11 @@
 To test redmine without installing a web server, run as root :
 
     cd /usr/share/redmine/
-    mkdir tmp
-    chown www-data:www-data tmp
-    mkdir log
-    touch log/production.log
-    chown www-data:www-data log/production.log
-    sudo -u www-data X_DEBIAN_SITEID="default" ruby script/rails server -e production
+    mkdir tmp log
+    chown www-data:www-data tmp log
+    sudo -u www-data X_DEBIAN_SITEID="default" rackup -E production
 
-and point your browser to http://localhost:3000
+and point your browser to http://localhost:9292
 When done, remove /usr/share/redmine/tmp
 
 NOTICE :
diff -Nru redmine-3.0~20140825/debian/redmine.triggers redmine-3.0~20140825/debian/redmine.triggers
--- redmine-3.0~20140825/debian/redmine.triggers	1969-12-31 21:00:00.000000000 -0300
+++ redmine-3.0~20140825/debian/redmine.triggers	2014-12-04 09:44:34.000000000 -0200
@@ -0,0 +1 @@
+interest /usr/share/redmine/plugins

Attachment: signature.asc
Description: Digital signature


Reply to: