From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 SD6mBV6vvmN5rgAAbAwnHQ (envelope-from ) for ; Wed, 11 Jan 2023 13:45:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id wEG9BF6vvmNQLQAAG6o9tA (envelope-from ) for ; Wed, 11 Jan 2023 13:45:18 +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 A31F92811F for ; Wed, 11 Jan 2023 13:45:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFaTZ-0002Rh-MM; Wed, 11 Jan 2023 07:45:05 -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 1pFaTX-0002Qe-0G for guix-patches@gnu.org; Wed, 11 Jan 2023 07:45:03 -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 1pFaTW-0003Hm-Ms for guix-patches@gnu.org; Wed, 11 Jan 2023 07:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pFaTW-0005xR-Iy for guix-patches@gnu.org; Wed, 11 Jan 2023 07:45:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60003] [PATCH 3/3] gnu: Add pass-import. Resent-From: Tobias Kortkamp Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 11 Jan 2023 12:45: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: 60003@debbugs.gnu.org Cc: Tobias Kortkamp Received: via spool by 60003-submit@debbugs.gnu.org id=B60003.167344109022865 (code B ref 60003); Wed, 11 Jan 2023 12:45:02 +0000 Received: (at 60003) by debbugs.gnu.org; 11 Jan 2023 12:44:50 +0000 Received: from localhost ([127.0.0.1]:41894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFaTJ-0005wi-HO for submit@debbugs.gnu.org; Wed, 11 Jan 2023 07:44:50 -0500 Received: from mail-ed1-f47.google.com ([209.85.208.47]:45622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFaTC-0005wM-IS for 60003@debbugs.gnu.org; Wed, 11 Jan 2023 07:44:48 -0500 Received: by mail-ed1-f47.google.com with SMTP id s5so22120883edc.12 for <60003@debbugs.gnu.org>; Wed, 11 Jan 2023 04:44:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mxIMRVFlo4cw3b0XpVHqXm/YtB8SLFs7nr8ot9P+X3I=; b=ExI8XuuBVVDHv2K1pgQ55iHf0XwB73hkrMheL6/tlQ8pDBatYq74kckr68lidiP3yC p+sli3t+tdCQtLUbL/TbbiIwigsmsOahBkG2Cc/mQTO7Z8/AA51vkGNSCdw0irDxit93 FMCvEm09clIg63OSbgEIp1WJm2Dpv0GeSpcgH5A0sQMgWGh0jjwf4BqXM/Ikn+zS2TON Wjnks7U9NOandezw0ldFLqzBNerYsAhXW8Pd2uyKmVQnsv7dcNTRYQ8Z/4VPOm24Sc5D szXUKH7xUnF5ZqmYC9RgxGlU3F9me67kuiR4c0SGkpR49DarVczDlDe81+AVkIXFyvwe +CyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mxIMRVFlo4cw3b0XpVHqXm/YtB8SLFs7nr8ot9P+X3I=; b=NE6HVyH4wHrbOr0TeUYbkY7UUnLx2MWRpBehJQUITfRNEGdMYtis4LcLELYT1xGsIQ AkFl/BGzqHS6e+UOdfZKttzib6QyvWM0kF+T8h5YQIrxlWoAJknoBP/b68iq8NgwEHrY 2d3vuw6cHP9lZ40dAI7j9qrV4YeB7SoekMDeioHGE/3tRRCyZ5wZ4ECfQV8NOUVdQqwm q3ODEWu0lNUTbmBYf6N3LbOlrXacyWiNbiBoYHb4PRdPrYZ2QZNFELvZpxFljt+Xj8pz AooWs5W4YVJXpqG7zBCE5goJbeId9I6XHCoNOxyXVekJNm7cDtDqXt453X95fWMHRmF3 YcTg== X-Gm-Message-State: AFqh2kpNFsmpxcfWBrPSRghhpQ1cKP83GFi9bnEOBpHtd0aX2H95ki6V 8qM60rJIoCtJQQYXbVBYbwtR6R1xNuk= X-Google-Smtp-Source: AMrXdXtLbYdyD6iSZ81HfCGxdJjAlwJi5Y6f1/uRmeUHzaEVSuI12NKFFGdjaBU3iocr8DsxneSA3w== X-Received: by 2002:a05:6402:2484:b0:46c:6ed1:83ac with SMTP id q4-20020a056402248400b0046c6ed183acmr68387641eda.9.1673441076856; Wed, 11 Jan 2023 04:44:36 -0800 (PST) Received: from anubis.kortkamp.xyz (p200300ff7f02ab00046b83ca6c4becd9.dip0.t-ipconnect.de. [2003:ff:7f02:ab00:46b:83ca:6c4b:ecd9]) by smtp.gmail.com with ESMTPSA id s5-20020a170906c30500b008552bc8399dsm2209750ejz.172.2023.01.11.04.44.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 04:44:36 -0800 (PST) From: Tobias Kortkamp Date: Wed, 11 Jan 2023 13:44:28 +0100 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: <40ad2d0262052c5ddac3c957391b2ac2df9fede2.1673440963.git.tobias.kortkamp@gmail.com> References: <40ad2d0262052c5ddac3c957391b2ac2df9fede2.1673440963.git.tobias.kortkamp@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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=1673441117; a=rsa-sha256; cv=none; b=k+M8iCvGoIDdPGnf/q6CE3RJ6ow2xtJr9Ekwnz3Hl0raUJkryD8VM44uamhnO6FjQC2k+B aQ8gARYEqQ+v7xkZVi/Dc/G8ygMlR8imolMBvPXHBYRViciClPiNqKFoQo9dqx2B0kB9ID nFSQF8DatQ6l0ERb3AEUtm3yR8Dvjj0hzCJBekcVsHlSafbhPKyRPV6EcSZcRqWuxisVXd 3i+CONZx/LHog7tLHjTOpxLOYkflwbnEKfhxmAKUtuPqfF+dBffRB1+wZktBrd9Y9pZI7s /F7ohjvY36cZOG4XsKdBhln24czHObrUMNhqxwbY+Po7QIf3nKqqsu3rUiYYPg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ExI8XuuB; 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=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673441117; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=mxIMRVFlo4cw3b0XpVHqXm/YtB8SLFs7nr8ot9P+X3I=; b=hTj/mbD5YrBK/wU/beMiFZIkdWYnfrHKTTdoDjODNPD06e4K96Jj3HUVrdyAffZnVfIe4t RUIp/qxekPbJ9++u33XmC18ymI6z7fH4n53P/pWfRiPOx94fFE3J9RTVDLWQ4izm1ywpA6 8CkMDUHnKTmc6esVA0MOKWoLF2DMYrwvhb4AYP/vqc4tkVR8b7eeK4H0hBmPOOREkRGCSY XnzK1uPjKpG6TKTZsZy2/aux1AbGyYMRX5XyxdN8K5Y2kq5h93p64He/G3YqrewxpHEyGJ Sf6IfWEED6Ify6eNvW4mMW3LWdTxW8k8DyHs8Fp12ssZMWITQcoQWHme9sJTNg== X-Migadu-Spam-Score: -0.49 X-Spam-Score: -0.49 X-Migadu-Queue-Id: A31F92811F X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ExI8XuuB; 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=gmail.com (policy=none) X-TUID: a5/rHJTDwbXA * gnu/packages/password-utils.scm (pass-import): New variable. --- gnu/packages/password-utils.scm | 72 +++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm index 9fc41d9b0a..f84e80e9cb 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -38,6 +38,7 @@ ;;; Copyright © 2022 Maxime Devos ;;; Copyright © 2022 ( ;;; Copyright © 2022 Nicolas Graves +;;; Copyright © 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) @@ -1493,3 +1495,73 @@ (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-import" + "/releases/download/v" version "/pass-import-" + version ".tar.gz")) + (sha256 + (base32 "18vh97h3bmspwqhb9xjkapk3p8hy4rxhazrcc06f6pdz8rb6rxxp")))) + (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") + (search-input-file inputs "/bin/python3"))) + (substitute* '("setup.py") + (("base = '/usr'") + (string-append "base = '" #$output "'")) + (("sys\\.prefix") + (string-append "'" #$output "'"))))) + (add-after 'install 'wrap-extension + (lambda _ + (let ((pylib (string-append #$output "/lib/python" + #$(version-major+minor + (package-version python)) + "/site-packages")) + (extension "/lib/password-store/extensions/import.bash")) + (wrap-program (string-append #$output extension) + (list "GUIX_PYTHONPATH" ":" + 'prefix + (list (getenv "GUIX_PYTHONPATH") + pylib)))))) + (add-before 'check 'disable-lastpass-and-dbus-tests + (lambda _ + (substitute* '("tests/imports/test_parse.py") + ;; requires running D-Bus session + (("test_import_gnome_keyring") "disabled_test_import_gnome_keyring") + ;; requires lastpass + (("test_import_lastpass") "disabled_test_import_lastpass")) + (substitute* '("tests/exports/test_lastpass.py") + (("test_import_lastpass") "disabled_test_import_lastpass") + (("test_lastpass_exist") "disabled_test_lastpass_exist") + (("test_lastpass_insert") "disabled_test_lastpass_insert") + (("test_lastpass_show") "disabled_test_lastpass_show") + (("test_lastpass_list") "disabled_test_lastpass_list") + (("test_lastpass_isvalid") "disabled_test_lastpass_isvalid"))))))) + (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 many password +managers. @command{pimport} can be used to export data to other password managers +like gopass or keepassxc.") + (license license:gpl3+))) -- 2.38.1