From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCcjy-0003pc-E8 for guix-patches@gnu.org; Sat, 28 Apr 2018 23:11:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fCcju-0007vs-JA for guix-patches@gnu.org; Sat, 28 Apr 2018 23:11:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34537) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fCcju-0007vj-Cl for guix-patches@gnu.org; Sat, 28 Apr 2018 23:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fCcju-0005Ss-7P for guix-patches@gnu.org; Sat, 28 Apr 2018 23:11:02 -0400 Subject: [bug#31307] [PATCH] Add MAT, the Metadata Anonymisation Toolkit from Boum Resent-Message-ID: From: Chris Marusich References: <87wowrj9kq.fsf@gmail.com> <20180428221104.dd4aoulvdk4zxhvu@abyayala> Date: Sat, 28 Apr 2018 20:09:52 -0700 In-Reply-To: <20180428221104.dd4aoulvdk4zxhvu@abyayala> (Nils Gillmann's message of "Sat, 28 Apr 2018 22:11:04 +0000") Message-ID: <87muxmzp1b.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 Nils Gillmann writes: >> In addition, I notice that the license is GPL 2, but it seems the author >> did not specify whether "any later version" can be used. Therefore, I >> have listed this as gpl2, instead of gpl2+. > > The tails people (iirc it is a tails project, who are hosted on boum.org = infra) > are generally okay with questions, I think you should ask about wether > it's GPL2 or GPL2+. > > We could also ask them about the state of MAT, as once upon a time they u= sed to > include it in Tails. No idea if they stil do. I've sent an email to tails-dev@boum.org. I Cc'd you on it. I wasn't sure if the people of the tails-dev@boum.org email list would appreciate it if I arranged for their replies to automatically be recorded in our bug tracker, so I opted not to Cc this bug report on the email. We'll see what they say! >> +;; TODO: Add inputs for PDF support (e.g., Poppler, python-pdfrw). >> +;; TODO: Add inputs for GUI support (e.g., gi). >> +;; TODO: Fix some hard-coded paths. For example, get_datafile_path emb= eds >> +;; paths like "/usr/local/share/mat", which we should probably rewrite = so that >> +;; they point to mat's output directory in the store. This specific ex= ample >> +;; causes "mat --list" to fail with an exception. > > I'm all for making it less hard for a package to get initially into Guix,= but > shouldn't at least hardcoded paths that make an often used function(?) be= fixed > first? On the other hand it is functional as you wrote. I've fixed this in the latest patch version (see attached)! While testing, I also discovered that the -b feature of the CLI tool does not work because of what appears to be a simple bug in MAT. I suppose I will report that upstream if they get back to me and they're still maintaining it. >> +(define-public python2-mat >> + (package >> + (name "python2-mat") > > Since people will expect this as "MAT" or "mat" and not "python2-mat", an= d to my > knowledge there is no python3 variant, we should name it just mat. On this topic, the precedent goes both ways, and I haven't seen any guidance yet on the email lists or in the manual. For example, see packages like awscli, python2-s3cmd, jupyter, and python-ansi2html. I think that if a package provides only an application, it makes sense to give it a name without the "python" or "python2" prefix. However, if the package provides a library, or it provides a library in addition to an application, then I think it's better to refer to it using the "python" or "python2" prefix, as described in the section titled "Python Modules" in the Guix manual. I also think this aligns with Guix's trend towards (usually) keeping libraries in the default "out" output of a package, rather than putting libraries in a separate "lib" output or a separate "devel" package. =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=20c34de8c711b9a61b43a003ebf44423a2af6138a4 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 | 64 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index 2c0c2313f..79bb0f58b 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,64 @@ 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, python-pdfrw). +;; TODO: Add inputs for GUI support (e.g., gi). +;; TODO: Fix some hard-coded paths. For example, get_datafile_path embeds +;; paths like "/usr/local/share/mat", which we should probably rewrite so = that +;; they point to mat's output directory in the store. This specific examp= le +;; causes "mat --list" to fail with an exception. +(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 'patch-absolute-paths + (lambda* (#:key outputs #:allow-other-keys) + ;; MAT tries to find things in /usr/local/share and /usr/shar= e. + ;; However, the things it's looking for are actually in the + ;; /share directory of its output, instead. + (substitute* "libmat/mat.py" + (("(\"|')/usr(/local)?/share" _ quote-mark) + (string-append + quote-mark (assoc-ref outputs "out") "/share")))))))) + (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+x3UCaFdgiRp0FAlrlN4AACgkQ3UCaFdgi Rp2nwA/9GZt8lX+00IC95CPBlC5JF9HR/OOndoG4Zgvmkax29Il+MgP2lJY1wJer AicDV/w043BUt9sGX7Z9BrN/MgCYkRasKA7uuOlMF8jPZgpmkheuV/YhgaIThkm/ v+PTagrVHvxzygDCRAclfBuhDCs7ycJA9AJP0khEqT+Y3hmj8cv6y8W3M/3v2Dnp 0Y6xq8bvJXgIpgGJ1Qs3mEBKRNtrets8tbofsQtDR/qRL2K1kXlE/rZ0nUvQbiU3 OZlZRJKzPSPObzL3Lt1OAlL7NWOUUxLUx7L5WB/+lgxJL4E23KUxIPALQIzCcGkB XczulI0HHD0ZLkI/HHt5LiZj7mAEsiGZ2uRWWs8d0CtRMyDzj1L519TpQbVty4K3 DwVODu1uaSZiYG3CwEdGW5jGZZosOtBhTrOgsAvIbycGew5EU/qr7k5hxT8ZAPEe BKeMs4zij38wRayo2cHrxvMzCtQfAaXtRZWPRcmlJgTpWJLcK6N7KfQRemQOfV+U BGj8mHWijSpGrbRkx0XADHdI5aHn1YbObjSXqN5laJid5zywtAw4gYtQMFiV+v7o aavMqt0MeUAFiFcJgmSjnY1Cz/RjBtU91CzkW+QH8EiMpvW4SLgCg6VxmKl8f7Qj IytRBtsYIP86dnQ0Gfq5QTNFAnD7dvH6cm+yk23RPmBmtmkzuUI= =GDed -----END PGP SIGNATURE----- --==-=-=--