[Pkg-privacy-commits] [mat] 03/04: New patch: disable PDF support. (Closes: #826101)

Intrigeri intrigeri at moszumanska.debian.org
Fri Aug 26 09:02:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch master
in repository mat.

commit a87b93e13c148479e376f028ec7185b935318b56
Author: intrigeri <intrigeri at boum.org>
Date:   Fri Aug 26 08:39:12 2016 +0000

    New patch: disable PDF support. (Closes: #826101)
    
    mat doesn't remove metadata in embedded images in PDFs
    (https://0xacab.org/mat/mat/issues/11067).
    
    Until this is fixed upstream, we should not let users believe that they can
    safely clean metadata from PDF files using MAT.
---
 .../Disable-PDF-support.-Closes-826101.patch       | 85 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 86 insertions(+)

diff --git a/debian/patches/Disable-PDF-support.-Closes-826101.patch b/debian/patches/Disable-PDF-support.-Closes-826101.patch
new file mode 100644
index 0000000..2240fb1
--- /dev/null
+++ b/debian/patches/Disable-PDF-support.-Closes-826101.patch
@@ -0,0 +1,85 @@
+From: intrigeri <intrigeri at boum.org>
+Date: Fri, 26 Aug 2016 08:38:03 +0000
+Subject: Disable PDF support. (Closes: #826101)
+
+Bug-Debian: https://bugs.debian.org/826101
+Bug-Upstream: https://0xacab.org/mat/mat/issues/11067
+Forwarded: not-needed
+---
+ data/FORMATS        | 10 ----------
+ libmat/strippers.py | 27 ---------------------------
+ test/test.py        |  2 +-
+ 3 files changed, 1 insertion(+), 38 deletions(-)
+
+diff --git a/data/FORMATS b/data/FORMATS
+index 50a3a92..d5222a9 100644
+--- a/data/FORMATS
++++ b/data/FORMATS
+@@ -50,16 +50,6 @@
+     </format>
+ 
+     <format>
+-        <name>Portable Document Fileformat</name>
+-        <extension>.pdf</extension>
+-        <mimetype>application/pdf</mimetype>
+-        <support>Full</support>
+-        <metadata>A lot</metadata>
+-        <method>Rendering of the PDF file on a cairo surface with the help of poppler.</method>
+-        <remaining>None</remaining>
+-    </format>
+-
+-    <format>
+         <name>Tape ARchive</name>
+         <extension>.tar, .tar.bz2, .tar.gz</extension>
+         <mimetype>application/x-tar, application/x-gzip, application/x-bzip2</mimetype>
+diff --git a/libmat/strippers.py b/libmat/strippers.py
+index 6a51aa8..6ec4ed2 100644
+--- a/libmat/strippers.py
++++ b/libmat/strippers.py
+@@ -22,33 +22,6 @@ STRIPPERS = {
+ 
+ logging.basicConfig(level=mat.LOGGING_LEVEL)
+ 
+-# PDF support
+-pdfSupport = True
+-try:
+-    import gi
+-    gi.require_version('Poppler', '0.18')
+-    from gi.repository import Poppler
+-except ImportError:
+-    logging.error('Unable to import Poppler: no PDF support')
+-    pdfSupport = False
+-
+-try:
+-    import cairo
+-except ImportError:
+-    logging.error('Unable to import python-cairo: no PDF support')
+-    pdfSupport = False
+-
+-try:
+-    import pdfrw
+-except ImportError:
+-    logging.error('Unable to import python-pdfrw: no PDF support')
+-    pdfSupport = False
+-
+-if pdfSupport:
+-    STRIPPERS['application/x-pdf'] = office.PdfStripper
+-    STRIPPERS['application/pdf'] = office.PdfStripper
+-
+-
+ # audio format support with mutagen-python
+ try:
+     import mutagen
+diff --git a/test/test.py b/test/test.py
+index 58e7ec7..8cccf40 100644
+--- a/test/test.py
++++ b/test/test.py
+@@ -23,7 +23,7 @@ clean.sort()
+ dirty = glob.glob('dirty*')
+ dirty.sort()
+ 
+-FILE_LIST = zip(clean, dirty)
++FILE_LIST = [pair for pair in zip(clean, dirty) if not pair[0].endswith('pdf')]
+ 
+ try:  # PDF render processing
+     import cairo
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..880ac31
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+Disable-PDF-support.-Closes-826101.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/mat.git



More information about the Pkg-privacy-commits mailing list