[Pkg-privacy-commits] [Git][pkg-privacy-team/mat2][debian/0.3.1-1] 9 commits: debian/patches: Add patch to remove failing tests
Georg Faerber
gitlab at salsa.debian.org
Mon Oct 1 22:24:24 BST 2018
Georg Faerber pushed to branch debian/0.3.1-1 at Privacy Maintainers / mat2
Commits:
956ef887 by Georg Faerber at 2018-10-01T21:21:47Z
debian/patches: Add patch to remove failing tests
- - - - -
aaeb69f9 by Georg Faerber at 2018-10-01T21:21:53Z
debian/control: Depends: Drop python-nautilus, see bug #907591
- - - - -
fcfdfc18 by Georg Faerber at 2018-10-01T21:21:53Z
debian/mat2.install: Don't install nautilus extension for now (#907591)
- - - - -
35c1a109 by Georg Faerber at 2018-10-01T21:21:53Z
debian/mat2.install: Rename mat2.py to mat2
- - - - -
fc0aa302 by Georg Faerber at 2018-10-01T21:21:53Z
debian/mat2.manpages: Install manpage for mat2
- - - - -
ffd14207 by Georg Faerber at 2018-10-01T21:21:54Z
debian/rules: Check DEB_BUILD_OPTIONS for 'nocheck' before running tests
- - - - -
ea56f7f6 by Georg Faerber at 2018-10-01T21:21:54Z
debian/control: Section: Use 'utils' instead of 'python'
- - - - -
645bca4b by Georg Faerber at 2018-10-01T21:21:54Z
debian/control: BD: Require debhelper >= 11~
- - - - -
731c77aa by Georg Faerber at 2018-10-01T21:21:54Z
debian/changelog: Debian release 0.3.1-1
- - - - -
7 changed files:
- debian/changelog
- debian/control
- debian/mat2.install
- + debian/mat2.manpages
- + debian/patches/0001-drop-failing-tests.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -1,5 +1,6 @@
-mat2 (0.1.1-1) unstable; urgency=medium
+mat2 (0.3.1-1) unstable; urgency=medium
+ [ Jonas Meurer ]
* Initial release. (Closes: #898622)
- -- Jonas Meurer <jonas at freesources.org> Fri, 18 May 2018 21:14:19 +0200
+ -- Georg Faerber <georg at riseup.net> Sun, 30 Sep 2018 17:56:43 +0000
=====================================
debian/control
=====================================
@@ -1,10 +1,10 @@
Source: mat2
-Section: python
+Section: utils
Priority: optional
Maintainer: Debian Privacy Tools Maintainers <pkg-privacy-maintainers at lists.alioth.debian.org>
Uploaders: Georg Faerber <georg at riseup.net>,
Jonas Meurer <jonas at freesources.org>,
-Build-Depends: debhelper (>= 11),
+Build-Depends: debhelper (>= 11~),
dh-exec,
dh-python,
gir1.2-gdkpixbuf-2.0,
@@ -26,7 +26,6 @@ Depends: ${misc:Depends}, ${python3:Depends}
Recommends: gir1.2-gdkpixbuf-2.0,
gir1.2-poppler-0.18,
libimage-exiftool-perl,
- python-nautilus,
python3-gi-cairo,
python3-mutagen,
Description: Metadata anonymisation toolkit v2
=====================================
debian/mat2.install
=====================================
@@ -1,3 +1,2 @@
#!/usr/bin/dh-exec
-mat2.py => /usr/bin/mat2
-nautilus/nautilus_mat2.py => /usr/share/nautilus-python/extensions/mat2.py
+mat2 => /usr/bin/mat2
=====================================
debian/mat2.manpages
=====================================
@@ -0,0 +1 @@
+doc/mat2.1
=====================================
debian/patches/0001-drop-failing-tests.patch
=====================================
@@ -0,0 +1,170 @@
+Description: Drop failing tests
+ The tests fail during build time, as they invoke './mat2'. This fails,
+ as the executable is not stored in the same directory from which the
+ tests are invoked.
+Author: Georg Faerber <georg at riseup.net>
+Last-Update: 2018-09-30
+--
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/tests/test_climat2.py
++++ /dev/null
+@@ -1,159 +0,0 @@
+-import os
+-import shutil
+-import subprocess
+-import unittest
+-
+-
+-class TestHelp(unittest.TestCase):
+- def test_help(self):
+- proc = subprocess.Popen(['./mat2', '--help'], stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertIn(b'usage: mat2 [-h] [-v] [-l] [-c] [-V] [-s | -L] [files [files ...]]', stdout)
+-
+- def test_no_arg(self):
+- proc = subprocess.Popen(['./mat2'], stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertIn(b'usage: mat2 [-h] [-v] [-l] [-c] [-V] [-s | -L] [files [files ...]]', stdout)
+-
+-
+-class TestVersion(unittest.TestCase):
+- def test_version(self):
+- proc = subprocess.Popen(['./mat2', '--version'], stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertTrue(stdout.startswith(b'MAT2 '))
+-
+-class TestDependencies(unittest.TestCase):
+- def test_dependencies(self):
+- proc = subprocess.Popen(['./mat2', '--check-dependencies'], stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertTrue(b'MAT2' in stdout)
+-
+-class TestReturnValue(unittest.TestCase):
+- def test_nonzero(self):
+- ret = subprocess.call(['./mat2', './mat2'], stdout=subprocess.DEVNULL)
+- self.assertEqual(255, ret)
+-
+- ret = subprocess.call(['./mat2', '--whololo'], stderr=subprocess.DEVNULL)
+- self.assertEqual(2, ret)
+-
+- def test_zero(self):
+- ret = subprocess.call(['./mat2'], stdout=subprocess.DEVNULL)
+- self.assertEqual(0, ret)
+-
+- ret = subprocess.call(['./mat2', '--show', './mat2'], stdout=subprocess.DEVNULL)
+- self.assertEqual(0, ret)
+-
+-
+-class TestCleanFolder(unittest.TestCase):
+- def test_jpg(self):
+- os.mkdir('./tests/data/folder/')
+- shutil.copy('./tests/data/dirty.jpg', './tests/data/folder/clean1.jpg')
+- shutil.copy('./tests/data/dirty.jpg', './tests/data/folder/clean2.jpg')
+-
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/folder/'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertIn(b'Comment: Created with GIMP', stdout)
+-
+- proc = subprocess.Popen(['./mat2', './tests/data/folder/'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+-
+- os.remove('./tests/data/folder/clean1.jpg')
+- os.remove('./tests/data/folder/clean2.jpg')
+-
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/folder/'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertNotIn(b'Comment: Created with GIMP', stdout)
+-
+- shutil.rmtree('./tests/data/folder/')
+-
+-
+-
+-class TestCleanMeta(unittest.TestCase):
+- def test_jpg(self):
+- shutil.copy('./tests/data/dirty.jpg', './tests/data/clean.jpg')
+-
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/clean.jpg'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertIn(b'Comment: Created with GIMP', stdout)
+-
+- proc = subprocess.Popen(['./mat2', './tests/data/clean.jpg'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+-
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/clean.cleaned.jpg'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertNotIn(b'Comment: Created with GIMP', stdout)
+-
+- os.remove('./tests/data/clean.jpg')
+-
+-
+-class TestIsSupported(unittest.TestCase):
+- def test_pdf(self):
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/dirty.pdf'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertNotIn(b"isn't supported", stdout)
+-
+-class TestGetMeta(unittest.TestCase):
+- def test_pdf(self):
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/dirty.pdf'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertIn(b'producer: pdfTeX-1.40.14', stdout)
+-
+- def test_png(self):
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/dirty.png'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertIn(b'Comment: This is a comment, be careful!', stdout)
+-
+- def test_jpg(self):
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/dirty.jpg'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertIn(b'Comment: Created with GIMP', stdout)
+-
+- def test_docx(self):
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/dirty.docx'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertIn(b'Application: LibreOffice/5.4.5.1$Linux_X86_64', stdout)
+- self.assertIn(b'creator: julien voisin', stdout)
+- self.assertIn(b'revision: 1', stdout)
+-
+- def test_odt(self):
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/dirty.odt'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertIn(b'generator: LibreOffice/3.3$Unix', stdout)
+- self.assertIn(b'creator: jvoisin', stdout)
+- self.assertIn(b'date_time: 2011-07-26 02:40:16', stdout)
+-
+- def test_mp3(self):
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/dirty.mp3'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertIn(b'TALB: harmfull', stdout)
+- self.assertIn(b'COMM::: Thank you for using MAT !', stdout)
+-
+- def test_flac(self):
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/dirty.flac'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertIn(b'comments: Thank you for using MAT !', stdout)
+- self.assertIn(b'genre: Python', stdout)
+- self.assertIn(b'title: I am so', stdout)
+-
+- def test_ogg(self):
+- proc = subprocess.Popen(['./mat2', '--show', './tests/data/dirty.ogg'],
+- stdout=subprocess.PIPE)
+- stdout, _ = proc.communicate()
+- self.assertIn(b'comments: Thank you for using MAT !', stdout)
+- self.assertIn(b'genre: Python', stdout)
+- self.assertIn(b'i am a : various comment', stdout)
+- self.assertIn(b'artist: jvoisin', stdout)
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+0001-drop-failing-tests.patch
=====================================
debian/rules
=====================================
@@ -6,5 +6,7 @@ export DH_VERBOSE=1
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
python3 -m unittest discover
dh_auto_test
+endif
View it on GitLab: https://salsa.debian.org/pkg-privacy-team/mat2/compare/3f4ceb7d9a8437f2a19813464983d353eb8464d0...731c77aa25328add5a72e1574f60c1428c8ba144
--
View it on GitLab: https://salsa.debian.org/pkg-privacy-team/mat2/compare/3f4ceb7d9a8437f2a19813464983d353eb8464d0...731c77aa25328add5a72e1574f60c1428c8ba144
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-privacy-commits/attachments/20181001/018bb6e7/attachment-0001.html>
More information about the Pkg-privacy-commits
mailing list