From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AMsEEoV/iGGe+gAAgWs5BA (envelope-from ) for ; Mon, 08 Nov 2021 02:38:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CPi6DYV/iGFGHwAA1q6Kng (envelope-from ) for ; Mon, 08 Nov 2021 01:38:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7F4FB2E97F for ; Mon, 8 Nov 2021 02:38:11 +0100 (CET) Received: from [::1] (port=33014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjtbt-0007qd-Gb for larch@yhetil.org; Sun, 07 Nov 2021 20:38:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjtbm-0007qK-6T for guix-patches@gnu.org; Sun, 07 Nov 2021 20:38:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjtbl-00020Z-Ug for guix-patches@gnu.org; Sun, 07 Nov 2021 20:38:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjtbl-0002Gv-JU for guix-patches@gnu.org; Sun, 07 Nov 2021 20:38:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#31307] [PATCH] Add MAT, the Metadata Anonymisation Toolkit References: <87wowrj9kq.fsf@gmail.com> In-Reply-To: <87wowrj9kq.fsf@gmail.com> Resent-From: Denis 'GNUtoo' Carikli Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Nov 2021 01:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 31307@debbugs.gnu.org Received: via spool by 31307-submit@debbugs.gnu.org id=B31307.16363354318679 (code B ref 31307); Mon, 08 Nov 2021 01:38:01 +0000 Received: (at 31307) by debbugs.gnu.org; 8 Nov 2021 01:37:11 +0000 Received: from localhost ([127.0.0.1]:55433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjtas-0002Fq-9x for submit@debbugs.gnu.org; Sun, 07 Nov 2021 20:37:11 -0500 Received: from cyberdimension.org ([80.67.179.20]:40162 helo=gnutoo.cyberdimension.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjtaq-0002Fg-6B for 31307@debbugs.gnu.org; Sun, 07 Nov 2021 20:37:05 -0500 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id fa2d6397 for <31307@debbugs.gnu.org>; Mon, 8 Nov 2021 01:26:50 +0000 (UTC) Received: from primarylaptop.localdomain (localhost.localdomain [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 0e6f24f8 for <31307@debbugs.gnu.org>; Mon, 8 Nov 2021 01:26:50 +0000 (UTC) Date: Mon, 8 Nov 2021 02:34:16 +0100 From: Denis 'GNUtoo' Carikli Message-ID: <20211108023416.6b7609f9@primary_laptop> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.24; i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/4A3swd2TxaSw7TYQcmXpy35"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636335493; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=7r1j8JI4432ZruWQ1DqjrSJTksy5aNnKW7ou59nWla4=; b=lTMnXI+WyAb5qLf48+8/03kNej6opJ89J9X4WVHKILomlZf29JcVPTr0EXcYyKDCH4XeuN 3iHUjlqwExVq500NQy58qUQmM5yOtp72YWs4cuHZ8DE2BryG7iu+HPTsgnLGG0zfj9CWGD K8+lMpTNhAeuGtY0pjUrfHvrUXUQkJKkzrjL8oKglv8ZZ3zRQwj8EUSMDo/rtWnid5U5eZ s/jKGUmbsU9jmy5Nnz4y1iCfZ2a1wvrkvKNZMF9caQaGaxX7z81h9at0/u6i9jqe3ckxQe ylwZrtgRrSbYgJQHtPJ03R5h1a27GG414FkkoXi9kRaifxSoFvoM4lvkfiBiBg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636335493; a=rsa-sha256; cv=none; b=QP6tSnu43gwt1AvCzctJTr7+/l2CLQ/W5anXsBXBzuiftUppBZCOOJJOvIsH2Ac6U9eL8L C3IwqKA+BtMLJSX3ccIIL7H19no1zLWzMZ2B3p+yV2XRGTIe1ep0AcJsQyGMJtv4oWV9rD r2405WqYxmZDA/0nPmV3VvGq2h91pfZ6UzNVMTdGb3JQkvCyjA9lDaB4J4nrwk62qJnl5m RNrymxP5Ttd0gUO7U9eqKlgZ+wA9IJAHjENbYUGEcyosyMk5Jhg9Agc/Jh24hdZG6dKcWP G38VAWKZ/qV39iVaDjhshmCLlObTtcIwanC1nny8096px0xBFWSy4vOsfpOhfw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 7F4FB2E97F X-Spam-Score: -3.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: qsDaL7tActuY --Sig_/4A3swd2TxaSw7TYQcmXpy35 Content-Type: multipart/mixed; boundary="MP_/Xclbpkvit4ZKA6Cg=MVFV6Q" --MP_/Xclbpkvit4ZKA6Cg=MVFV6Q Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I found while browsing debbugs.gnu.org, and I've started working on adding MAT2. I've got it working, so I'm attaching my work as-is to avoid duplication of work. Tests probably need to be disabled for it to work. I didn't submit it yet because not only the package needs some cleanups (that could have been fixed), but more importantly I also wanted to make tests work as I was afraid that getting this package wrong could have bad consequences for people if for some reasons it didn't cleanup the metadata due to packaging issues. Denis. --MP_/Xclbpkvit4ZKA6Cg=MVFV6Q Content-Type: text/x-scheme Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=mat2.scm ;;; Copyright =C2=A9 2021 Denis Carikli ;;; ;;; This file is not part of GNU Guix (yet). ;;; ;;; This file is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; This file is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages mat2) #:use-module (guix build-system python) #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages music) #:use-module (gnu packages pdf) #:use-module (gnu packages photo) #:use-module (gnu packages video) #:use-module (gnu packages virtualization)) (define-public mat2 (package (name "mat2") (version "0.12.1") (source (origin (method url-fetch) (uri (string-append ;; Also available at ;; http://wmj5kiic7b6kjplpbvwadnht2nh2qnkbnqtcv3dyvpqtz7ssbssftxid.oni= on "https://0xacab.org/jvoisin/mat2/-/archive/0.12.0/mat2-" version ".tar.bz2")) (sha256 (base32 "0lfip7g0rjvjspvwxyizknq2ccgrhfqp4ji7v0cch76srz12yb05")))) (build-system python-build-system) ;; - `python3-mutagen` for audio support ;; - `python3-gi-cairo` and `gir1.2-poppler-0.18` for PDF support ;; - `gir1.2-gdkpixbuf-2.0` for images support ;; - `gir1.2-rsvg-2.0` for svg support ;; - `FFmpeg`, optionally, for video support ;; - `libimage-exiftool-perl` for everything else ;; - `bubblewrap`, optionally, for sandboxing (inputs `(("python-mutagen" ,python-mutagen) ;; for audio support ("python-pycairo" ,python-pycairo) ;; for PDF support ("poppler", poppler) ;; for PDF support ("gdk-pixbuf", gdk-pixbuf) ;; for images support ("librsvg" ,librsvg) ;; for svg support ("ffmpeg" ,ffmpeg) ;; optional, for video = support ("perl-image-exiftool", perl-image-exiftool) ;; for everything else ;; ("bubblewrap", bubblewrap) ;; optional, for sand= boxing ("python-pygobject" ,python-pygobject) ;; used in tests )) ;; TODO (native-inputs `(("python-mutagen" ,python-mutagen) ;; for audio support ("python-pycairo" ,python-pycairo) ;; for PDF support ("poppler", poppler) ;; for PDF support ("gdk-pixbuf", gdk-pixbuf) ;; for images support ("librsvg" ,librsvg) ;; for svg support ("ffmpeg" ,ffmpeg) ;; optional, for video = support ("perl-image-exiftool", perl-image-exiftool) ;; for everything else ;; ("bubblewrap", bubblewrap) ;; optional, for sand= boxing ("python-pygobject" ,python-pygobject) ;; used in tests )) ;; TODO (propagated-inputs `(("python-mutagen" ,python-mutagen) ;; for audio support ("python-pycairo" ,python-pycairo) ;; for PDF support ("poppler", poppler) ;; for PDF support ("gdk-pixbuf", gdk-pixbuf) ;; for images support ("librsvg" ,librsvg) ;; for svg support ("ffmpeg" ,ffmpeg) ;; optional, for video = support ("perl-image-exiftool", perl-image-exiftool) ;; for everything else ;; ("bubblewrap", bubblewrap) ;; optional, for sand= boxing ("python-pygobject" ,python-pygobject) ;; used in tests )) ;; TODO ;; (arguments ;; `(#:tests? #f )) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'fix-tests (lambda _ (substitute* "libmat2/exiftool.py" (("/usr/bin/vendor_perl/exiftool") (which "exiftool"))) ;; (substitute* "libmat2/bubblewrap.py" ;; (("shutil.which\\('bwrap'\\)") ;; (string-append "'" ;; (which "bwrap") ;; we have no bwrap for now ;; "'"))) (substitute* "libmat2/exiftool.py" (("shutil.which\\('exiftool'\\)") (string-append "'" (which "exiftool") "'"))) (substitute* "libmat2/video.py" (("shutil.which\\('ffmpeg'\\)") (string-append "'" (which "ffmpeg") "'"))) (substitute* (find-files "tests" "\\.py") (("^#!/usr/bin/env python3$") (which "python3"))) =20 #t)) (delete 'check) (add-after 'install 'check (lambda _ ;; The Archlinux PKGBUILD uses that command for tests: (invoke "python" "-m" "unittest" "discover" "-v") #t))))) (synopsis "Metadata removal tool") (description "Metadata removal tool, supporting a wide range of commonly used file = formats") (home-page "https://0xacab.org/jvoisin/mat2") (license license:gpl3+))) --MP_/Xclbpkvit4ZKA6Cg=MVFV6Q-- --Sig_/4A3swd2TxaSw7TYQcmXpy35 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmGIfpgACgkQX138wUF3 4mOWxBAAn16mNWQBIZgeF2IFLit1Y68Fnnr8HVEgDGjkqTUbXAw7ToRBHyIVzCaS bm8K1IHGkP+yG1KCEZmY7H3Sle0/RFYTMEQUhYYlI4VlHgWMkTVOOloiYD7Z6r+d WbeivZOsGBq8tDr20/crl24Gxo9HG41G5q6+fF1k8HBKQGgqsq0qbuk4epRoNehU SSmfTNPy0lHKlJfHgSo87e3aJ9wpDz7jIyrp12BA5TwCnvDMoMtY3Yk+b/38yCF4 gLOuiRepxVN1rImeF/1165MC3Ko975cecYtn9t+RHt7+wFHZ3A8Z3UeAgjBrBCRz GSbovM3NfEQm1vcgWsHiCRAOKDMIRKFtKw7bR2MXL6phT7ahghgPK+eoGxgL2lQ4 0N/yk/KIHU1x07v++3xx/Dd0ztU2sTMgDwnPGMtTQzfn4oOu8PmS0FEQ53dTuX4K 5cWYiNGSUY/t7ZBYz0AvnAoKFytoqOVJAyQaf/f7v3gdBIdLe31rvGNoh08qBumq WgULl6SGKQdWZEl0V111y9EwE/oSer0HVn+VTSY/N51fbzDJjzfcz8+cFkeZhirm m5DYpMQNZ5r4diFI6UILQePQrv9JpASIG965hz5icaxuFtVf5oO3qCcZj7gT/X8k MIHnuXioX4dVxad4TGnb01PqyTnYJL2gAJPrqPAb6BOaO9RWFgc= =dwdY -----END PGP SIGNATURE----- --Sig_/4A3swd2TxaSw7TYQcmXpy35--