GNU bug report logs - #50428
[PATCH] gnu: Add cryfs

Previous Next

Package: guix-patches;

Reported by: Brendan Tildesley <mail <at> brendan.scot>

Date: Mon, 6 Sep 2021 13:36:01 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50428 in the body.
You can then email your comments to 50428 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#50428; Package guix-patches. (Mon, 06 Sep 2021 13:36:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brendan Tildesley <mail <at> brendan.scot>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 06 Sep 2021 13:36:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <mail <at> brendan.scot>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add cryfs
Date: Mon,  6 Sep 2021 23:34:37 +1000
* 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 <pukkamustard <at> posteo.net>
 ;;; Copyright © 2021 Ellis Kenyő <me <at> elken.dev>
 ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
+;;; Copyright © 2021 Brendan Tildesley <mail <at> brendan.scot>
 ;;;
 ;;; 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+)))
-- 
2.33.0





Removed tag(s) patch. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 14 Sep 2021 09:51:02 GMT) Full text and rfc822 format available.

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 14 Sep 2021 09:51:02 GMT) Full text and rfc822 format available.

Notification sent to Brendan Tildesley <mail <at> brendan.scot>:
bug acknowledged by developer. (Tue, 14 Sep 2021 09:51:03 GMT) Full text and rfc822 format available.

Message #12 received at 50428-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brendan Tildesley <mail <at> brendan.scot>
Cc: 50428-done <at> debbugs.gnu.org
Subject: Re: bug#50428: [PATCH] gnu: Add cryfs
Date: Tue, 14 Sep 2021 11:50:15 +0200
Hi,

Brendan Tildesley <mail <at> brendan.scot> skribis:

> * gnu/packages/crypto.scm (cryfs): New variable.

Overall LGTM modulo the minor issues below:

> +     '(#:configure-flags
> +       `("-DCRYFS_UPDATE_CHECKS=OFF" ;; Note: This also disables checking for security issues.
> +         "-DCMAKE_BUILD_TYPE=Release" ;; Build man pages.

Normally this is set by #:build-type.  It defaults to “RelWithDebInfo”,
which is nice because then you get debugging symbols if you pass
‘--with-debug-info=cryfs’.  So I’d suggest removing this second flag.

> +         (replace 'check
> +           (lambda* (#:key tests? outputs #:allow-other-keys)
> +             (use-modules (srfi srfi-1))

Please use #:modules ((srfi srfi-1) …) instead of this non-top-level
‘use-modules’ form.

> +             (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)

Installing tests is unusual.  Do you really think it’s going to be
useful?

> +                   ;; XXX: Disable failing tests. Unfortunately there are a
> +                   ;; few. Some only fail in the build environment. ;; build
> +                   ;; environment.

Typo.

> +    (description "CryFS encrypts your files, so you can safely store them anywhere.
> + It works well together with cloud services like Dropbox, iCloud, OneDrive and
   ^
Extra space.  :-)

Could you send an updated patch?

Thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#50428; Package guix-patches. (Tue, 14 Sep 2021 12:14:02 GMT) Full text and rfc822 format available.

Message #15 received at 50428 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <mail <at> brendan.scot>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: "50428 <at> debbugs.gnu.org" <50428 <at> debbugs.gnu.org>
Subject: Re: bug#50428: [PATCH] gnu: Add cryfs
Date: Tue, 14 Sep 2021 14:13:11 +0200 (CEST)
[Message part 1 (text/plain, inline)]
Update attached.

> On 09/14/2021 11:50 AM Ludovic Courtès <ludo <at> gnu.org> wrote:
> 
>  
> Hi,
> 
> Brendan Tildesley <mail <at> brendan.scot> skribis:
> 
> > * gnu/packages/crypto.scm (cryfs): New variable.
> 
> Overall LGTM modulo the minor issues below:
> 
> > +     '(#:configure-flags
> > +       `("-DCRYFS_UPDATE_CHECKS=OFF" ;; Note: This also disables checking for security issues.
> > +         "-DCMAKE_BUILD_TYPE=Release" ;; Build man pages.
> 
> Normally this is set by #:build-type.  It defaults to “RelWithDebInfo”,
> which is nice because then you get debugging symbols if you pass
> ‘--with-debug-info=cryfs’.  So I’d suggest removing this second flag.
> 

I found a way to build man pages without it.

> > +         (replace 'check
> > +           (lambda* (#:key tests? outputs #:allow-other-keys)
> > +             (use-modules (srfi srfi-1))
> 
> Please use #:modules ((srfi srfi-1) …) instead of this non-top-level
> ‘use-modules’ form.
> 

done.

> > +             (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)
> 
> Installing tests is unusual.  Do you really think it’s going to be
> useful?

Not sure. I felt since the cryfs is for encrypting peoples files, they may want to run the tests themselves
to see if there any nasty issues. Most of the tests fail due to FUSE not being available, which works outside
the chroot. Anyways I removed installing them.
[0001-gnu-Add-cryfs.patch (text/x-patch, attachment)]

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 16 Sep 2021 09:43:02 GMT) Full text and rfc822 format available.

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 16 Sep 2021 09:43:03 GMT) Full text and rfc822 format available.

Notification sent to Brendan Tildesley <mail <at> brendan.scot>:
bug acknowledged by developer. (Thu, 16 Sep 2021 09:43:03 GMT) Full text and rfc822 format available.

Message #22 received at 50428-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brendan Tildesley <mail <at> brendan.scot>
Cc: 50428-done <at> debbugs.gnu.org
Subject: Re: bug#50428: [PATCH] gnu: Add cryfs
Date: Thu, 16 Sep 2021 11:42:17 +0200
Hi,

Brendan Tildesley <mail <at> brendan.scot> skribis:

> * gnu/packages/crypto.scm (cryfs): New variable.

Overall LGTM modulo the minor issues below:

> +     '(#:configure-flags
> +       `("-DCRYFS_UPDATE_CHECKS=OFF" ;; Note: This also disables checking for security issues.
> +         "-DCMAKE_BUILD_TYPE=Release" ;; Build man pages.

Normally this is set by #:build-type.  It defaults to “RelWithDebInfo”,
which is nice because then you get debugging symbols if you pass
‘--with-debug-info=cryfs’.  So I’d suggest removing this second flag.

> +         (replace 'check
> +           (lambda* (#:key tests? outputs #:allow-other-keys)
> +             (use-modules (srfi srfi-1))

Please use #:modules ((srfi srfi-1) …) instead of this non-top-level
‘use-modules’ form.

> +             (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)

Installing tests is unusual.  Do you really think it’s going to be
useful?

> +                   ;; XXX: Disable failing tests. Unfortunately there are a
> +                   ;; few. Some only fail in the build environment. ;; build
> +                   ;; environment.

Typo.

> +    (description "CryFS encrypts your files, so you can safely store them anywhere.
> + It works well together with cloud services like Dropbox, iCloud, OneDrive and
   ^
Extra space.  :-)

Could you send an updated patch?

Thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#50428; Package guix-patches. (Thu, 16 Sep 2021 19:57:02 GMT) Full text and rfc822 format available.

Message #25 received at 50428-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brendan Tildesley <mail <at> brendan.scot>
Cc: "50428 <at> debbugs.gnu.org" <50428-done <at> debbugs.gnu.org>
Subject: Re: bug#50428: [PATCH] gnu: Add cryfs
Date: Thu, 16 Sep 2021 21:56:46 +0200
Hi,

Brendan Tildesley <mail <at> brendan.scot> skribis:

> From 6604ab84de9a38907ca6d930dcb5c0d79de28d88 Mon Sep 17 00:00:00 2001
> From: Brendan Tildesley <mail <at> brendan.scot>
> Date: Sat, 4 Sep 2021 16:52:23 +1000
> Subject: [PATCH] gnu: Add cryfs.
>
> * gnu/packages/crypto.scm (cryfs): New variable.

Applied, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 15 Oct 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 192 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.