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

Bug#711551: pu: package redmine/1.4.4+dfsg1-2



On 07/06/2013 22:48, Adam D. Barratt wrote:
> Control: tags -1 + moreinfo wheezy
> 
> On Fri, 2013-06-07 at 22:20 +0200, Jérémy Lal wrote:
>> 1.4.4+dfsg1-2+deb7u1 backports upstream fixes.
>> See attached debdiff (containing only two quilt patches).
> 
> Am I reading the log for #700754 correctly, in that it fixes things for
> Ruby 1.9 but also breaks the use of 1.8? (Which is technically a valid
> use-case according to the "ruby | ruby-interpreter" dependency.)

Here is a fixed patch.

Jérémy.


diff -Nru redmine-1.4.4+dfsg1/debian/changelog redmine-1.4.4+dfsg1/debian/changelog
--- redmine-1.4.4+dfsg1/debian/changelog	2013-01-19 15:54:09.000000000 +0100
+++ redmine-1.4.4+dfsg1/debian/changelog	2013-06-10 01:01:48.000000000 +0200
@@ -1,3 +1,14 @@
+redmine (1.4.4+dfsg1-2+deb7u1) proposed-updates; urgency=low
+
+  [ Ondřej Surý ]
+  * Pull upstream fixes for Ruby 1.9 as default interpreter:
+    + Use DateTime.parse as alternative to ParseDate.parsedate,
+      fixing time series and schedule SVG graphs. (Closes: #700754)
+    + Use ::Time from global namespace, fixing REST Issue API.
+      (Closes: #700009)
+
+ -- Jérémy Lal <kapouer@melix.org>  Fri, 07 Jun 2013 21:09:13 +0200
+
 redmine (1.4.4+dfsg1-2) unstable; urgency=low
 
   * Manage and set dbuser default value like dbname. (Closes: #695774)
diff -Nru redmine-1.4.4+dfsg1/debian/patches/1001_Parsedate.parsedate.patch redmine-1.4.4+dfsg1/debian/patches/1001_Parsedate.parsedate.patch
--- redmine-1.4.4+dfsg1/debian/patches/1001_Parsedate.parsedate.patch	1970-01-01 01:00:00.000000000 +0100
+++ redmine-1.4.4+dfsg1/debian/patches/1001_Parsedate.parsedate.patch	2013-06-10 00:54:25.000000000 +0200
@@ -0,0 +1,40 @@
+Description: Use DateTime.parse for ruby1.9, ParseDate.parsedate for ruby1.8 (Closes: #700754)
+Origin: upstream, http://www.redmine.org/projects/redmine/repository/revisions/10439
+Origin: upstream, http://www.redmine.org/projects/redmine/repository/revisions/11091
+Last-Update: 2013-06-10
+--- a/lib/SVG/Graph/Schedule.rb
++++ b/lib/SVG/Graph/Schedule.rb
+@@ -159,8 +159,13 @@
+           if im3 == 0
+             y << data[:data][i]
+           else
+-            arr = ParseDate.parsedate( data[:data][i] )
+-            t = Time.local( *arr[0,6].compact )
++            t = data[:data][i]
++            if DateTime.respond_to?(:parse)
++              t = DateTime.parse( t ).to_time
++            else
++              arr = ParseDate.parsedate( t )
++              t = Time.local( *arr[0,6].compact )
++            end
+             (im3 == 1 ? x_start : x_end) << t.to_i
+           end
+         }
+--- a/lib/SVG/Graph/TimeSeries.rb
++++ b/lib/SVG/Graph/TimeSeries.rb
+@@ -157,8 +157,13 @@
+         y = []
+         data[:data].each_index {|i|
+           if i%2 == 0
+-            arr = ParseDate.parsedate( data[:data][i] )
+-            t = Time.local( *arr[0,6].compact )
++            t = data[:data][i]
++            if DateTime.respond_to?(:parse)
++              t = DateTime.parse( t ).to_time
++            else
++              arr = ParseDate.parsedate( t )
++              t = Time.local( *arr[0,6].compact )
++            end
+             x << t.to_i
+           else
+             y << data[:data][i]
diff -Nru redmine-1.4.4+dfsg1/debian/patches/1002_REST_API_ruby1.9.3.patch redmine-1.4.4+dfsg1/debian/patches/1002_REST_API_ruby1.9.3.patch
--- redmine-1.4.4+dfsg1/debian/patches/1002_REST_API_ruby1.9.3.patch	1970-01-01 01:00:00.000000000 +0100
+++ redmine-1.4.4+dfsg1/debian/patches/1002_REST_API_ruby1.9.3.patch	2013-05-11 16:27:48.000000000 +0200
@@ -0,0 +1,14 @@
+Description: Fix broken REST API (Closes: #700009)
+Origin: upstream, http://www.redmine.org/projects/redmine/repository/revisions/10299
+Last-Update: 2013-02-26
+--- a/lib/redmine/views/builders/xml.rb
++++ b/lib/redmine/views/builders/xml.rb
+@@ -29,7 +29,7 @@ module Redmine
+         end
+ 
+         def method_missing(sym, *args, &block)
+-          if args.size == 1 && args.first.is_a?(Time)
++          if args.size == 1 && args.first.is_a?(::Time)
+             __send__ sym, args.first.xmlschema, &block
+           else
+             super
diff -Nru redmine-1.4.4+dfsg1/debian/patches/series redmine-1.4.4+dfsg1/debian/patches/series
--- redmine-1.4.4+dfsg1/debian/patches/series	2013-01-19 11:33:48.000000000 +0100
+++ redmine-1.4.4+dfsg1/debian/patches/series	2013-05-11 16:27:48.000000000 +0200
@@ -5,3 +5,5 @@
 2008_force_table_encoding_mysql.patch
 2009_FHS_thin_config.patch
 2017_Gemfile_debian.patch
+1001_Parsedate.parsedate.patch
+1002_REST_API_ruby1.9.3.patch

Reply to: