From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fChY2-0003I8-1J for guix-patches@gnu.org; Sun, 29 Apr 2018 04:19:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fChXy-0002g1-QX for guix-patches@gnu.org; Sun, 29 Apr 2018 04:19:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34583) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fChXy-0002fp-K9 for guix-patches@gnu.org; Sun, 29 Apr 2018 04:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fChXy-0004JN-31 for guix-patches@gnu.org; Sun, 29 Apr 2018 04:19:02 -0400 Subject: [bug#31307] [PATCH] Add MAT, the Metadata Anonymisation Toolkit from Boum In-Reply-To: <87wowrj9kq.fsf@gmail.com> Resent-Message-ID: From: Chris Marusich References: <87wowrj9kq.fsf@gmail.com> <20180428221104.dd4aoulvdk4zxhvu@abyayala> <87muxmzp1b.fsf@gmail.com> Date: Sun, 29 Apr 2018 01:18:12 -0700 Message-ID: <877eoqzarf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Nils Gillmann Cc: 31307@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Chris Marusich writes: Here's a new patch that fixes a few more things (but not the -b bug). I noticed that when MAT's tests ran, out of 33 tests total, there were 3 failures, and 8 errors. Curiously, this did not cause the build to fail. The 3 failures have something to do with not being able to process a .docx file. The 8 errors seem to occur because a variable "current_file" in the test has an unexpected value (None). If we decide to add this package, we should probably fix or disable the tests and find out why the test failures did not cause the build to fail. I attempted to get MAT's GUI component working, but I was unsuccessful. To build the GUI component, it seems we would first need to add Python bindings for libpoppler, such as python-poppler [1], and python-poppler can't be built without some extra love and patches [2][3]. Footnotes:=20 [1] https://launchpad.net/poppler-python [2] https://bugs.launchpad.net/poppler-python/+bug/1528489 [3] https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-python/python-poppl= er =2D-=20 Chris --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-python2-mat.patch Content-Transfer-Encoding: quoted-printable From=203060d99c1d23287f2090720c669f974cf9b451a5 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sat, 28 Apr 2018 14:03:47 -0700 Subject: [PATCH] gnu: Add python2-mat. * gnu/packages/photo.scm (python2-mat): New variable. =2D-- gnu/packages/photo.scm | 71 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index 2c0c2313f..18dce878e 100644 =2D-- a/gnu/packages/photo.scm +++ b/gnu/packages/photo.scm @@ -6,6 +6,7 @@ ;;; Copyright =C2=A9 2017 Roel Janssen ;;; Copyright =C2=A9 2018 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2018 Leo Famulari +;;; Copyright =C2=A9 2018 Chris Marusich ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) + #:use-module (guix build-system python) #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -52,6 +54,7 @@ #:use-module (gnu packages llvm) #:use-module (gnu packages man) #:use-module (gnu packages maths) + #:use-module (gnu packages music) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages popt) @@ -521,3 +524,71 @@ workflow by facilitating the handling of large numbers= of images. Most raw formats are supported, including Pentax Pixel Shift, Canon Dual-Pixel, and= those from Foveon and X-Trans sensors.") (license license:gpl3+))) + +;; TODO: Add inputs for PDF support (e.g., Poppler bindings, python-pdfrw). +;; TODO: Add inputs for GUI support (e.g., gi - maybe gi is python-gobject= ?). +(define-public python2-mat + (package + (name "python2-mat") + (version "0.6.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://mat.boum.org/files/mat-" version ".tar.xz")) + (sha256 + (base32 + "1faiiq7cjspafjjf4kmm7bbn8m506qgcijbizpgdvlaaapdyg0h7")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:use-setuptools? #f + #:phases + (modify-phases %standard-phases + (add-after 'patch-source-shebangs 'fix-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((share (string-append + (assoc-ref outputs "out") "/share")) + (exiftool (string-append + (assoc-ref inputs "perl-image-exiftool") + "/bin/exiftool")) + (shred (string-append + (assoc-ref inputs "coreutils") "/bin/shred"))) + (substitute* (find-files "." "\\.py$") + ;; MAT tries to find things in /usr/local/share and + ;; /usr/share. However, the things it's looking for are + ;; actually in the /share directory of its output, instea= d. + (("'/usr(/local)?/share") + (string-append "'" share)) + (("'exiftool'") + (string-append "'" exiftool "'")) + (("'g?shred'") + (string-append "'" shred "'"))) + #t)))))) + (propagated-inputs + `(("python2-pycairo" ,python2-pycairo) + ("python2-mutagen" ,python2-mutagen) + ("perl-image-exiftool" ,perl-image-exiftool))) + (native-inputs + `(("python2-distutils-extra" ,python2-distutils-extra) + ("intltool" ,intltool))) + (synopsis "Anonymize/remove metadata from files") + (description + "MAT (Metadata Anonymisation Toolkit) is a toolbox composed of a GUI +application, a CLI application and a library, to anonymize/remove metadata +from files. It supports the following file formats: + +@itemize @bullet +@item Portable Network Graphics (.png) +@item Joint Photographic Experts Group (.jpg, .jpeg, etc.) +@item Tagged Image File Format (.tif, tiff, etc.) +@item Open Documents (.odt, .odx, .ods, etc.) +@item Office OpenXml (.docx, .pptx, .xlsx, etc.) +@item Portable Document Fileformat (.pdf) +@item Tape Archives (.tar, .tar.bz2, etc.) +@item Moving Picture Experts Group (MPEG) (.mp3, .mp2, .mp1, etc.) +@item Ogg Vorbis (.ogg, etc.) +@item Free Lossless Audio Codec (.flac) +@item Torrent (.torrent) +@end itemize") + (home-page "https://mat.boum.org") + (license license:gpl2))) =2D-=20 2.17.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlrlf8QACgkQ3UCaFdgi Rp0zlw//elnTcVyI+ckCYn2x94lqtVum83Lr2pSI7cUafuVGF8qQlNxo2Pbnohqx ZDzH5LCMBqIThRAVkN9NMYbfrhZmj8piU5lSmBdZjKK4Kpuf4EtgZo5NpLb/RVQn 3JqiUSG+MJfn6hO9zImd8skNb36hjZFrbFOqMoU9TddbfxtXjmeS+QTe201ZKkHW MCAxhjwWSErhAHgwxfO+AaBwENbzVnnpH2t0d/zlHHLC+rsotpc9/ZtdZ9NEoTlj Z0XPyAswoqcDN4bui1fxerx+vbYX0dCxwG2bgVbCa/ruAJqoS0L4ZlVgpWTntoU2 5N7rs7GDdS5stKMgCxye6yKwm83b1DJGs0e0dsdLDRYQ9PFB85G7LlQUCGns6AuQ 7F1cg+eCrMZroqlUHwqYSAWPigG/XNVrVA9PFiAFC5ZP8Si2DhO8PAT2V5yO2hCR 1tckMzgbV/r++j/9gNCwYrkx4tmhVdgvGGa9LzwOnQPARds3u/HwWCIanxdq/H+r XqwwkHYDi8Z847TvtZZkAj26v8I1C82eJkK40DGmjRGSS5mBGHg0UlTsBU8jxfhf gYuXwZ9w3Ze7T8IxNwyoFfRqmiwDWapOTao9eaHIui4ZoX270aAwIoGIxIx4vM+O 08+ar3qiHBcZxk9qeXR5R9feYpoSKR8QDWopqnE7msdOHHphkiE= =fahS -----END PGP SIGNATURE----- --==-=-=--