From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GJ+9FybrtmP6swAAbAwnHQ (envelope-from ) for ; Thu, 05 Jan 2023 16:22:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QNS6FybrtmNSFgEAauVa8A (envelope-from ) for ; Thu, 05 Jan 2023 16:22:14 +0100 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 F02E9294BA for ; Thu, 5 Jan 2023 16:22:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDS4G-0005wn-Ha; Thu, 05 Jan 2023 10:22:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDS4E-0005w2-AV for guix-patches@gnu.org; Thu, 05 Jan 2023 10:22:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDS4A-0005iy-Mi for guix-patches@gnu.org; Thu, 05 Jan 2023 10:22:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDS4A-0004C9-5o for guix-patches@gnu.org; Thu, 05 Jan 2023 10:22:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60003] [PATCH 3/3] gnu: Add pass-import. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Jan 2023 15:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60003 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Kortkamp , 60003@debbugs.gnu.org Received: via spool by 60003-submit@debbugs.gnu.org id=B60003.167293207616063 (code B ref 60003); Thu, 05 Jan 2023 15:22:02 +0000 Received: (at 60003) by debbugs.gnu.org; 5 Jan 2023 15:21:16 +0000 Received: from localhost ([127.0.0.1]:52638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDS3Q-0004B0-3l for submit@debbugs.gnu.org; Thu, 05 Jan 2023 10:21:16 -0500 Received: from mail1.fsfe.org ([217.69.89.151]:54760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDS3N-0004Aq-Cs for 60003@debbugs.gnu.org; Thu, 05 Jan 2023 10:21:14 -0500 From: Jelle Licht DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1672932070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yws+XV0tTsVhgvD7nBByHIg6QS+6IQw65tIzEOmYlQw=; b=RHwBeV5nHORNdQhUxIjWvILiOtSeDcjV5RG8ozun95eyjiwsJlivXwMXw6E6nkwqcj6gmp DnPGhjfqwXtQxExHtA1ovcV7D6HgqcUNEnL4PXgspcuDiaxmU8vk+Xc51LsXO+hfFZxXlX hLnXu/4avfeRfwpOqIP+6j5qiwzbyoE= In-Reply-To: References: Date: Thu, 05 Jan 2023 16:21:09 +0100 Message-ID: <878rih2eje.fsf@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672932134; a=rsa-sha256; cv=none; b=VJP5WXhUgYinTruXtjb4uESM8xcSle+RYwxxjUovMV4Ap4OcT6pg7L8lk7wtL2MW2FpPU+ JsfgSFZrocu6lSFP8fGMLUEhmeZW+LrmpPKhaqZiIOqVkzlRImiCz109BukyE4NPxPDG/U +rVQ1mTKPZPDFpk9l7sRw/xdcReLJar3o6vIbramtUa42C4wlnp9PMQOTyN7tmaL0Kt4Dt B1l2wipcHN9/QzyW39FS+//EiJNnSxESBLSOkjypoDbLDx3/TH615Od8JoSMsfJ5XyIDA5 ZZEtm747XyZRBZdDQlLvEOGQ8UkKCehoLkovTebof1e6G+tNnAcTdca25oF8+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fsfe.org header.s=2021100501 header.b=RHwBeV5n; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fsfe.org (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672932134; 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: content-transfer-encoding:content-transfer-encoding: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:dkim-signature; bh=Yws+XV0tTsVhgvD7nBByHIg6QS+6IQw65tIzEOmYlQw=; b=jAFCTWOaKkrjHGJvm8h6zJXcQpxPrsamdk7ersoHUEBkNt2q0uNLNyUzgI/Qm50bYd43ej VstNB2YK/GfO2UjGZBlKmy5HuhwuWmlgjnDaNNIerbBGsaU1qEZfDFKD4lYERw6pvSUhDY II1wZ3u69FWUmlVWTU08Thu6bE965Mm5TNwzMPQYO+k/fpsvCA3g6jmYYoH3kgoZzpaiRD QxlAu6kM/sCSPUYJC+Ik6q3kajnh34Fl51IniLCmDQGAZjNwVoK+XxrvjkpMVnZQgksg/O L1c/Px5aIzLLkkYxeW8OKZ4dWNSwPljtT8dfyuLJUzq717Vz2vay88i72IoC0g== X-Spam-Score: -0.96 X-Migadu-Queue-Id: F02E9294BA Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fsfe.org header.s=2021100501 header.b=RHwBeV5n; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fsfe.org (policy=none) X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -0.96 X-TUID: fLt6gjRFJHaV Hello Tobias, Tobias Kortkamp writes: > * gnu/packages/password-utils.scm (pass-import): New variable. > --- > gnu/packages/password-utils.scm | 71 +++++++++++++++++++++++++++++++++ > 1 file changed, 71 insertions(+) > > diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-util= s.scm > index aab0a3f2a4..79781ed9e6 100644 > --- a/gnu/packages/password-utils.scm > +++ b/gnu/packages/password-utils.scm > @@ -38,6 +38,7 @@ > ;;; Copyright =C2=A9 2022 Maxime Devos > ;;; Copyright =C2=A9 2022 ( > ;;; Copyright =C2=A9 2022 Nicolas Graves > +;;; Copyright =C2=A9 2022 Tobias Kortkamp > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -101,6 +102,7 @@ (define-module (gnu packages password-utils) > #:use-module (gnu packages perl) > #:use-module (gnu packages pkg-config) > #:use-module (gnu packages python) > + #:use-module (gnu packages python-crypto) > #:use-module (gnu packages python-web) > #:use-module (gnu packages python-xyz) > #:use-module (gnu packages readline) > @@ -1492,3 +1494,72 @@ (define-public xkcdpass > license:lgpl2.0 ;finnish word list > license:lgpl2.1 ;portuguese word list > license:mpl1.1)))) ;portuguese word list > + > +(define-public pass-import > + (package > + (name "pass-import") > + (version "3.4") > + (source (origin > + (method url-fetch) > + (uri (string-append "https://github.com/roddhjav/pass-impo= rt" > + "/releases/download/" version "/pass-i= mport-" You missed a "v" here; could you make it "download/v" instead? That works f= or me, with the provided base32 hash. > + version ".tar.gz")) > + (sha256 > + (base32 "18vh97h3bmspwqhb9xjkapk3p8hy4rxhazrcc06f6pdz8rb6= rxxp")))) > + (build-system python-build-system) > + (arguments > + (list #:phases > + #~(modify-phases %standard-phases > + (add-after 'unpack 'patch-paths > + (lambda* (#:key inputs #:allow-other-keys) > + (substitute* '("import.bash") > + (("python3") > + #$(file-append python-wrapper "/bin/python"))) Perhaps someone more experienced with our python-packages can still weigh in, but wouldn't the following work here as well? --8<---------------cut here---------------start------------->8--- (("python3") (search-input-file inputs "/bin/python3"))) --8<---------------cut here---------------end--------------->8--- > + (substitute* '("setup.py") > + (("base =3D '/usr'") > + (string-append "base =3D '" #$output "'")) > + (("sys\\.prefix") > + (string-append "'" #$output "'"))) > + (substitute* '("tests/imports/test_parse.py") > + ;; requires running D-Bus session > + (("test_import_gnome_keyring") "disabled_test_impor= t_gnome_keyring") > + ;; requires lastpass > + (("test_import_lastpass") "disabled_test_import_las= tpass")) > + (substitute* '("tests/exports/test_lastpass.py") > + (("test_import_lastpass") "disabled_test_import_las= tpass") > + (("test_lastpass_exist") "disabled_test_lastpass_ex= ist") > + (("test_lastpass_insert") "disabled_test_lastpass_i= nsert") > + (("test_lastpass_show") "disabled_test_lastpass_sho= w") > + (("test_lastpass_list") "disabled_test_lastpass_lis= t") > + (("test_lastpass_isvalid") "disabled_test_lastpass_= isvalid")))) Nit: in this phase you seem to patch paths and disable tests. Consider spli= tting it up into two phases. I still run into some test failures: --8<---------------cut here---------------start------------->8--- Ran 135 tests in 12.145s FAILED (failures=3D6, errors=3D1, skipped=3D10) Test failed: error: Test failed: Password-pwned-1 Password-pwned-2 Password-pwned-3 Password-pwned-4 Password-pwned-5 Password-pwned-6 Password-pwned-7 --8<---------------cut here---------------end--------------->8--- > + (add-after 'install 'wrap-extension > + (lambda _ > + (let ((pylib (string-append #$output "/lib/python" > + #$(version-major+minor > + (package-version pytho= n)) > + "/site-packages")) > + (extension (string-append #$output > + "/lib/password-store/= extensions/import.bash"))) This line seems to make `./pre-inst-env guix lint pass-import' unhappy, as it is too wide. > + (wrap-program extension > + (list "GUIX_PYTHONPATH" ":" > + 'prefix > + (list (getenv "GUIX_PYTHONPATH") > + pylib))))))))) > + (inputs (list gnupg > + password-store > + python-cryptography > + python-defusedxml > + python-magic > + python-pyaml > + python-pykeepass > + python-requests > + python-secretstorage > + python-zxcvbn)) > + (home-page "https://github.com/roddhjav/pass-import") > + (synopsis > + "Pass extension for importing data from many password managers") > + (description > + "This package provides a pass extension for importing data from man= y password > +managers. @command{pimport} can be used to export data to other password= managers > +like gopass or keepassxc too.") Consider removing superfluous 'too'. Thanks again! - Jelle