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

Re: Re: ocrodjvu_0.4.6-4 for Squeeze point release



-------- Original Message --------
Subject: Re: ocrodjvu_0.4.6-4 for Squeeze point release
Date: Sat, 19 Feb 2011 14:04:05 +0100
From: Daniel Stender <daniel@danielstender.com>
To: Adam D. Barratt <adam@adam-barratt.org.uk>

Hello Adam,

so I've rechecked the changelogs the debdiff of 0.4.6-3 from Stable and 0.4.6-4 from Testing looks
like this (attached), like guessed the s/Added/Updated was a local problem.

Greetings & thanks for checking the packet,
Daniel Stender


On 18.02.2011 14:42, Adam D. Barratt wrote:
>
> We'd consider a tested backport of the fix to the squeeze package (i.e.
> 0.4.6-3+squeeze1 or similar), certainly.
>
>> release, the -4 includes a patch which fixes important bug 611460.
>
> The bug fix itself looks fine, thanks.  I do have some queries on the
> changelog changes in your diff though; the hunk adding a CVE ID isn't an
> issue, but this looks odd:
>
> -  * Added Vcs-fields in debian/control.
> +  * Updated Vcs-fields in debian/control.
>
> - -- Daniel Stender <daniel@danielstender.com>  Thu, 04 Nov 2010 22:49:13
> +0100
> + -- Daniel Stender <daniel@danielstender.com>  Mon, 22 Nov 2010 20:50:03
> +0100
>
> Where does that come from?  It's not included when comparing the -3 and -4
> packages in the archive.
>
> Regards,
>
> Adam
diff -Nru ocrodjvu-0.4.6/debian/changelog ocrodjvu-0.4.6/debian/changelog
--- ocrodjvu-0.4.6/debian/changelog	2010-11-22 20:50:04.000000000 +0100
+++ ocrodjvu-0.4.6/debian/changelog	2011-02-07 17:18:24.000000000 +0100
@@ -1,3 +1,10 @@
+ocrodjvu (0.4.6-4) unstable; urgency=low
+
+  * Fix of upside-down generation of hocr data
+    [upsidedown-hocr.diff] (closes: #611460).
+
+ -- Daniel Stender <daniel@danielstender.com>  Mon, 07 Feb 2011 17:01:39 +0100
+
 ocrodjvu (0.4.6-3) unstable; urgency=low
 
   * New maintainer (closes: #598156).
@@ -13,7 +20,7 @@
     calling external programs (closes: #594385). [preserve-environment.diff]
   * Fix crash on hOCR with image elements (closes: #598139).
     [hocr-no-bbox.diff]
-  * Fix insecure use of temporary files (closes: #598134).
+  * Fix insecure use of temporary files (CVE-2010-4338, closes: #598134).
     [cuneiform-temp-files.diff]
 
  -- Jakub Wilk <jwilk@debian.org>  Mon, 27 Sep 2010 00:13:09 +0200
diff -Nru ocrodjvu-0.4.6/debian/patches/series ocrodjvu-0.4.6/debian/patches/series
--- ocrodjvu-0.4.6/debian/patches/series	2010-11-04 23:05:12.000000000 +0100
+++ ocrodjvu-0.4.6/debian/patches/series	2011-02-01 18:01:43.000000000 +0100
@@ -1,3 +1,4 @@
+upsidedown-hocr.diff
 changelog-0.4.6.diff
 tests-version.diff
 preserve-environment.diff
diff -Nru ocrodjvu-0.4.6/debian/patches/upsidedown-hocr.diff ocrodjvu-0.4.6/debian/patches/upsidedown-hocr.diff
--- ocrodjvu-0.4.6/debian/patches/upsidedown-hocr.diff	1970-01-01 01:00:00.000000000 +0100
+++ ocrodjvu-0.4.6/debian/patches/upsidedown-hocr.diff	2011-02-07 17:18:24.000000000 +0100
@@ -0,0 +1,52 @@
+Description: Fix upside down hocr data generation by djvu2hocr.
+Origin: https://bitbucket.org/jwilk/ocrodjvu/diff/lib/cli/djvu2hocr.py?diff2=8fb4b8b618c1&diff1=4859ae243b5f
+Bug-Debian: http://bugs.debian.org/611460
+Last-Update: 2011-02-06
+
+--- a/lib/_djvu2hocr.py
++++ b/lib/_djvu2hocr.py
+@@ -64,8 +64,9 @@
+ 
+ class Zone(object):
+ 
+-    def __init__(self, sexpr):
+-        self._sexpr = sexpr
++    def __init__(self, sexpr, page_height):
++        self._sexpr = sexpr
++        self._page_height = page_height
+ 
+     @property
+     def type(self):
+@@ -73,7 +74,12 @@
+ 
+     @property
+     def bbox(self):
+-        return hocr.BBox(*(self._sexpr[i].value for i in xrange(1, 5)))
++        return hocr.BBox(
++            self._sexpr[1].value,
++            self._page_height - self._sexpr[4].value,
++            self._sexpr[3].value,
++            self._page_height - self._sexpr[2].value,
++        )
+ 
+     @property
+     def text(self):
+@@ -87,7 +93,7 @@
+     def children(self):
+         for child in self._sexpr[5:]:
+             if isinstance(child, sexpr.ListExpression):
+-                yield Zone(child)
++                yield Zone(child, self._page_height)
+             else:
+                 yield self.text
+                 return
+@@ -313,7 +319,8 @@
+         except sexpr.ExpressionSyntaxError:
+             break
+         print >>sys.stderr, '- Page #%d' % n
+-        process_page(Zone(page_text), options)
++        page_zone = Zone(page_text, page_size[1])
++        process_page(page_zone, options)
+     sys.stdout.write(hocr_footer)
+     djvused.wait()
+ 


Reply to: