[Pkg-privacy-commits] [mat] 02/04: New patch: disable PDF support. (Closes: #826101)
Intrigeri
intrigeri at moszumanska.debian.org
Fri Oct 28 12:28:04 UTC 2016
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to branch jessie
in repository mat.
commit 6f0596549a4ba5037afe1e585e716cf41e9bfc17
Author: intrigeri <intrigeri at boum.org>
Date: Mon Oct 24 11:40:17 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 | 83 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 84 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..07ef3b6
--- /dev/null
+++ b/debian/patches/Disable-PDF-support.-Closes-826101.patch
@@ -0,0 +1,83 @@
+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
+---
+ MAT/strippers.py | 25 -------------------------
+ data/FORMATS | 10 ----------
+ test/test.py | 2 +-
+ 3 files changed, 1 insertion(+), 36 deletions(-)
+
+diff --git a/MAT/strippers.py b/MAT/strippers.py
+index aea98da..62e7584 100644
+--- a/MAT/strippers.py
++++ b/MAT/strippers.py
+@@ -24,31 +24,6 @@ STRIPPERS = {
+
+ logging.basicConfig(level=mat.LOGGING_LEVEL)
+
+-# PDF support
+-pdfSupport = True
+-try:
+- from gi.repository import Poppler
+-except ImportError:
+- logging.info('Unable to import Poppler: no PDF support')
+- pdfSupport = False
+-
+-try:
+- import cairo
+-except ImportError:
+- logging.info('Unable to import python-cairo: no PDF support')
+- pdfSupport = False
+-
+-try:
+- import pdfrw
+-except ImportError:
+- logging.info('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/data/FORMATS b/data/FORMATS
+index b398be1..0af8d58 100644
+--- a/data/FORMATS
++++ b/data/FORMATS
+@@ -40,16 +40,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/test/test.py b/test/test.py
+index ed68e13..405d901 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