From patchwork Mon Sep 6 13:34:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brendan Tildesley X-Patchwork-Id: 32666 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A17C727BBE3; Mon, 6 Sep 2021 14:36:30 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0203027BBE1 for ; Mon, 6 Sep 2021 14:36:30 +0100 (BST) Received: from localhost ([::1]:34214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNEnU-0002lr-Va for patchwork@mira.cbaines.net; Mon, 06 Sep 2021 09:36:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNEn4-0002h6-Ix for guix-patches@gnu.org; Mon, 06 Sep 2021 09:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNEn4-00035j-2z for guix-patches@gnu.org; Mon, 06 Sep 2021 09:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNEn3-0003TY-Rp for guix-patches@gnu.org; Mon, 06 Sep 2021 09:36:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50428] [PATCH] gnu: Add cryfs Resent-From: Brendan Tildesley Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Sep 2021 13:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50428 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50428@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163093532113306 (code B ref -1); Mon, 06 Sep 2021 13:36:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Sep 2021 13:35:21 +0000 Received: from localhost ([127.0.0.1]:52411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNEmK-0003SU-Da for submit@debbugs.gnu.org; Mon, 06 Sep 2021 09:35:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:34942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNEmI-0003SM-C5 for submit@debbugs.gnu.org; Mon, 06 Sep 2021 09:35:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNEmH-0000yG-A2 for guix-patches@gnu.org; Mon, 06 Sep 2021 09:35:14 -0400 Received: from mout-p-102.mailbox.org ([2001:67c:2050::465:102]:22586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1mNEmA-00022U-Ti for guix-patches@gnu.org; Mon, 06 Sep 2021 09:35:12 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4H38XM5g2XzQjgT for ; Mon, 6 Sep 2021 15:34:59 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot; s=MBO0001; t=1630935298; 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; bh=Hd+iIyz2f4KXtXg7QKAu7CbtJgGnit8zFcLXVOckaAs=; b=IyNn+/EIOSVKUVgo4+ynCVUMw8WP6Nj53uv1qpNWBfxJR2zvpJ+2Gqj2CnkRsz2UJQAjKr kA+Y7UPZhqwxRSbyI/bAraBoOHervsIPQ1z0tXU6fyFEtcCeqvCeL368CEczdofeUjRGLd LBu3LbG46OIoZOfLjrr++ezJiooAyKyfFXDASKLaZ8tYed7vnsBxFFXBzEVI+j46AE/sGF hmRr5hVvRvRjsRlrkAg6D5GexHq2gWMsRInCmaYojGo8uWHWSfIxicN8PKwst7u62fHKvG 5oAxdxaxkTnApZ2Vocehwee5Iknl+NJ2AaQ6+GBOEhvk+aVCIPtd0a1UbMls5g== From: Brendan Tildesley Date: Mon, 6 Sep 2021 23:34:37 +1000 Message-Id: <20210906133437.3691-1-mail@brendan.scot> MIME-Version: 1.0 X-Rspamd-Queue-Id: D3CDD1899 Received-SPF: pass client-ip=2001:67c:2050::465:102; envelope-from=mail@brendan.scot; helo=mout-p-102.mailbox.org X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/crypto.scm (cryfs): New variable. --- gnu/packages/crypto.scm | 75 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index c511d0a711..7f4f8590f5 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -21,6 +21,7 @@ ;;; Copyright © 2020 pukkamustard ;;; Copyright © 2021 Ellis Kenyő ;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021 Brendan Tildesley ;;; ;;; This file is part of GNU Guix. ;;; @@ -46,8 +47,10 @@ #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cpp) #:use-module (gnu packages crates-io) #:use-module (gnu packages cryptsetup) + #:use-module (gnu packages curl) #:use-module (gnu packages documentation) #:use-module (gnu packages gettext) #:use-module (gnu packages gnupg) @@ -58,6 +61,7 @@ #:use-module (gnu packages libbsd) #:use-module (gnu packages libffi) #:use-module (gnu packages linux) + #:use-module (gnu packages logging) #:use-module (gnu packages lsof) #:use-module (gnu packages man) #:use-module (gnu packages multiprecision) @@ -1385,3 +1389,74 @@ them out. The process will degrade gracefully, so even people without your encryption password can safely commit changes to the repository's non-encrypted files.") (license license:expat))) + +(define-public cryfs + (package + (name "cryfs") + (version "0.11.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/cryfs/cryfs/releases/download/" + version "/cryfs-" version ".tar.xz")) + (sha256 + (base32 "0dxphbj5sssm82rkkdb71algrcki16qlpzlvrjyvvm6b7x7zi0sm")))) + (build-system cmake-build-system) + (arguments + '(#:configure-flags + `("-DCRYFS_UPDATE_CHECKS=OFF" ;; Note: This also disables checking for security issues. + "-DCMAKE_BUILD_TYPE=Release" ;; Build man pages. + ;; This helps us use some dependencies from Guix instead of conan. + ;; crypto++ is still bundled: https://github.com/cryfs/cryfs/issues/369 + ,(string-append "-DDEPENDENCY_CONFIG=" (getcwd) + "/cmake-utils/DependenciesFromLocalSystem.cmake")) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'fix-configure + (lambda* (#:key tests? #:allow-other-keys) + (chdir "..") + (delete-file-recursively ".circleci") + (when tests? + (substitute* "CMakeLists.txt" + (("option.BUILD_TESTING .build test cases. OFF.") + "option(BUILD_TESTING \"build test cases\" ON)"))))) + (replace 'check + (lambda* (#:key tests? outputs #:allow-other-keys) + (use-modules (srfi srfi-1)) + (when tests? + (with-directory-excursion "/tmp/build/test" + (let ((tests (find-files "." "-test$")) + (tests-output (assoc-ref outputs "tests"))) + ;; Install tests to a separate output so users can run them. + (copy-recursively "." tests-output) + ;; XXX: Disable failing tests. Unfortunately there are a + ;; few. Some only fail in the build environment. ;; build + ;; environment. + (for-each invoke + (lset-difference string-contains + tests + '("cpp-utils-test" + "cryfs-cli-test" + "blobstore-test" + "fspp-test")))))) + #t))))) + (outputs '("out" "tests")) + (native-inputs + `(("python" ,python-wrapper) + ("pkg-config" ,pkg-config))) + (inputs + `(("boost" ,boost) + ("curl" ,curl) + ("fuse" ,fuse) + ("range-v3" ,range-v3) + ("spdlog" ,spdlog))) + (home-page "https://www.cryfs.org/") + (synopsis "Encrypted FUSE filesystem for the cloud") + (description "CryFS encrypts your files, so you can safely store them anywhere. + It works well together with cloud services like Dropbox, iCloud, OneDrive and +others. CryFS creates an encrypted userspace filesystem that can be mounted +via FUSE without root permissions. It is similar to EncFS, but provides +additional security and privacy measures such as hiding file sizes and directory +structure. However CryFS is not considered stable yet by the developers.") + (license license:lgpl3+)))