Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Dear release team, Please unblock mat2 0.12.1-3. It ships improved support of XLSX files and a fix adressing problems if printing cleaned PDF files. It's a key package, as doxygen build-depends on it, but so far regressions haven't been reported, and autopkgtest looks good as well. Histogramm of the diff: ~ debdiff mat2_0.12.1-2.dsc mat2_0.12.1-3.dsc | diffstat changelog | 12 ++++ patches/0001-improve-support-for-xlsx-files.patch | 28 +++++++++-- patches/0002-fix-printing-of-cleaned-pdf-files.patch | 48 +++++++++++++++++++ patches/series | 1 4 files changed, 84 insertions(+), 5 deletions(-) Please find the full debdiff attached. unblock mat2/0.12.1-3 Thanks for your work, cheers, Georg
diff -Nru mat2-0.12.1/debian/changelog mat2-0.12.1/debian/changelog --- mat2-0.12.1/debian/changelog 2021-05-24 15:01:29.000000000 +0000 +++ mat2-0.12.1/debian/changelog 2021-07-29 16:21:06.000000000 +0000 @@ -1,3 +1,15 @@ +mat2 (0.12.1-3) unstable; urgency=medium + + * debian/patches: + - Pull in upstream patch to improve support of OpenXML (xlsx) files. + This patch extends the one introduced in the previous upload, 0.12.1-2. + This approach is chosen to limit the diff, as both patches target the + same area of the source code. + - Pull in upstream patch to fix issues if printing cleaned Portable + Document Format (pdf) files. + + -- Georg Faerber <ge...@debian.org> Thu, 29 Jul 2021 16:21:06 +0000 + mat2 (0.12.1-2) unstable; urgency=medium * debian/patches: diff -Nru mat2-0.12.1/debian/patches/0001-improve-support-for-xlsx-files.patch mat2-0.12.1/debian/patches/0001-improve-support-for-xlsx-files.patch --- mat2-0.12.1/debian/patches/0001-improve-support-for-xlsx-files.patch 2021-05-24 15:01:29.000000000 +0000 +++ mat2-0.12.1/debian/patches/0001-improve-support-for-xlsx-files.patch 2021-07-29 16:21:06.000000000 +0000 @@ -1,19 +1,37 @@ Description: Improve support of Open XML (xlsx) files Origin: upstream -Applied-Upstream: bf0c777cb9159e220f636b0c019fe4957e4fea75 +Applied-Upstream: bf0c777cb9159e220f636b0c019fe4957e4fea75, 0b094b594bd1db017ed3d063a10714f6b2a7b9f3 Reviewed-by: Georg Faerber <ge...@debian.org> -Last-Update: 2021-05-24 +Last-Update: 2021-07-29 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ Index: mat2/libmat2/office.py =================================================================== ---- mat2.orig/libmat2/office.py 2021-05-19 11:26:06.093187321 +0000 -+++ mat2/libmat2/office.py 2021-05-24 14:44:33.698488246 +0000 -@@ -107,6 +107,7 @@ +--- mat2.orig/libmat2/office.py 2021-07-29 15:56:40.307190532 +0000 ++++ mat2/libmat2/office.py 2021-07-29 15:58:33.200905419 +0000 +@@ -88,6 +88,7 @@ + r'^\[Content_Types\]\.xml$', + r'^_rels/\.rels$', + r'^xl/sharedStrings\.xml$', # https://docs.microsoft.com/en-us/office/open-xml/working-with-the-shared-string-table ++ r'^xl/calcChain\.xml$', + r'^(?:word|ppt|xl)/_rels/document\.xml\.rels$', + r'^(?:word|ppt|xl)/_rels/footer[0-9]*\.xml\.rels$', + r'^(?:word|ppt|xl)/_rels/header[0-9]*\.xml\.rels$', +@@ -107,6 +108,9 @@ # TODO: check if p:bgRef can be randomized r'^ppt/slideMasters/slideMaster[0-9]+\.xml', r'^ppt/slideMasters/_rels/slideMaster[0-9]+\.xml\.rels', + r'^xl/worksheets/_rels/sheet[0-9]+\.xml\.rels', ++ r'^xl/drawings/vmlDrawing[0-9]+\.vml', ++ r'^xl/drawings/drawing[0-9]+\.xml', })) self.files_to_omit = set(map(re.compile, { # type: ignore r'^\[trash\]/', +@@ -123,6 +127,7 @@ + # Additional presentation-wide properties like printing properties, + # presentation show properties etc. + r'^(?:word|ppt|xl)/presProps\.xml$', ++ r'^(?:word|ppt|xl)/comments[0-9]+\.xml$', + + # we have an allowlist in self.files_to_keep, + # so we can trash everything else diff -Nru mat2-0.12.1/debian/patches/0002-fix-printing-of-cleaned-pdf-files.patch mat2-0.12.1/debian/patches/0002-fix-printing-of-cleaned-pdf-files.patch --- mat2-0.12.1/debian/patches/0002-fix-printing-of-cleaned-pdf-files.patch 1970-01-01 00:00:00.000000000 +0000 +++ mat2-0.12.1/debian/patches/0002-fix-printing-of-cleaned-pdf-files.patch 2021-07-29 16:21:06.000000000 +0000 @@ -0,0 +1,48 @@ +Description: Fix issues if printing cleaned pdf file + pyCairo by default renders the PDF surfaces with a resolution of 72 + dpi which is so low that the bitmap gets blurred compared to original. + Since pyCairo 1.12.0, a new method set_device_scale(x_scale, y_scale) + is added, which allows changing the canvas resolution. +Origin: upstream +Applied-Upstream: 3b094ae449afbb2c375454c1ee76b76aa98648d4 +Reviewed-by: Georg Faerber <ge...@debian.org> +Last-Update: 2021-07-29 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: mat2/libmat2/pdf.py +=================================================================== +--- mat2.orig/libmat2/pdf.py 2021-07-29 16:11:46.254777280 +0000 ++++ mat2/libmat2/pdf.py 2021-07-29 16:12:42.239485144 +0000 +@@ -32,7 +32,7 @@ + def __init__(self, filename): + super().__init__(filename) + self.uri = 'file://' + os.path.abspath(self.filename) +- self.__scale = 2 # how much precision do we want for the render ++ self.__scale = 200 / 72.0 # how much precision do we want for the render + try: # Check now that the file is valid, to avoid surprises later + Poppler.Document.new_from_file(self.uri, None) + except GLib.GError: # Invalid PDF +@@ -90,8 +90,8 @@ + page_width, page_height = page.get_size() + logging.info("Rendering page %d/%d", pagenum + 1, pages_count) + +- width = int(page_width) * self.__scale +- height = int(page_height) * self.__scale ++ width = int(page_width * self.__scale) ++ height = int(page_height * self.__scale) + img_surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height) + img_context = cairo.Context(img_surface) + +@@ -105,7 +105,11 @@ + buf.seek(0) + + img = cairo.ImageSurface.create_from_png(buf) +- pdf_surface.set_size(page_width*self.__scale, page_height*self.__scale) ++ if cairo.version_info < (1, 12, 0): ++ pdf_surface.set_size(width, height) ++ else: ++ pdf_surface.set_size(page_width, page_height) ++ pdf_surface.set_device_scale(1 / self.__scale, 1 / self.__scale) + pdf_context.set_source_surface(img, 0, 0) + pdf_context.paint() + pdf_context.show_page() # draw pdf_context on pdf_surface diff -Nru mat2-0.12.1/debian/patches/series mat2-0.12.1/debian/patches/series --- mat2-0.12.1/debian/patches/series 2021-05-24 15:01:29.000000000 +0000 +++ mat2-0.12.1/debian/patches/series 2021-07-29 16:21:06.000000000 +0000 @@ -1 +1,2 @@ +0002-fix-printing-of-cleaned-pdf-files.patch 0001-improve-support-for-xlsx-files.patch