unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#30974] cryptsetup 2.0.2
@ 2018-03-28 19:01 Marius Bakke
  2018-03-28 20:52 ` Marius Bakke
  0 siblings, 1 reply; 3+ messages in thread
From: Marius Bakke @ 2018-03-28 19:01 UTC (permalink / raw)
  To: 30974


[-- Attachment #1.1: Type: text/plain, Size: 293 bytes --]

Guix,

This patch updates cryptsetup to the latest release.  It Works For Me™,
but I'd like others to try it on their systems before pushing.

The size of "cryptsetup-static" increases from 5 MiB to 11.2 MiB.  Not
sure why, json-c and argon2 are only a few 100 KiB each.  Thoughts?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-cryptsetup-Update-to-2.0.2.patch --]
[-- Type: text/x-patch, Size: 4426 bytes --]

From 8d00660fecb0c23c4ce0ca670979e9d1503eaf16 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Wed, 28 Mar 2018 20:57:40 +0200
Subject: [PATCH] gnu: cryptsetup: Update to 2.0.2.

* gnu/packages/cryptsetup.scm (cryptsetup): Update to 2.0.2.
[source](snippet): Delete bundled argon2.
[arguments]: Add #:configure-flags to use system argon2.
[inputs]: Add ARGON2 and JSON-C.
[native-inputs]: Add PKG-CONFIG.
(cryptsetup-static)[inputs]: Add ARGON2 and JSON-C.
[arguments]: Add "--enable-libargon2" to #:configure-flags.
---
 gnu/packages/cryptsetup.scm | 37 ++++++++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/cryptsetup.scm b/gnu/packages/cryptsetup.scm
index 9df26edc7..a12d238b2 100644
--- a/gnu/packages/cryptsetup.scm
+++ b/gnu/packages/cryptsetup.scm
@@ -25,14 +25,17 @@
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages password-utils)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages python)
-  #:use-module (gnu packages linux))
+  #:use-module (gnu packages web))
 
 (define-public cryptsetup
   (package
    (name "cryptsetup")
-   (version "1.7.5")
+   (version "2.0.2")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://kernel.org/linux/utils/cryptsetup/v"
@@ -40,15 +43,30 @@
                                 "/" name "-" version ".tar.xz"))
             (sha256
              (base32
-              "1gail831j826lmpdx2gsc83lp3br6wfnwh3vqwxaa1nn1lfwsc1b"))))
+              "15wyjfgcqjf0wy5gxnmjj8aah33csv5v6n1hv9c8sxdzygbhb0ag"))
+            (modules '((guix build utils)))
+            (snippet
+             '(begin
+                ;; Delete bundled argon2 library.  Preserve the build files
+                ;; so that we don't trigger 'autoreconf'.
+                (for-each (lambda (file)
+                            (delete-file file))
+                          (find-files "lib/crypto_backend/argon2"
+                                      "(README|LICENSE|\\.[ch])$"))
+                #t))))
    (build-system gnu-build-system)
+   (arguments
+    `(#:configure-flags '("--enable-libargon2")))
    (inputs
-    `(("libgcrypt" ,libgcrypt)
+    `(("argon2" ,argon2)
+      ("json-c" ,json-c)
+      ("libgcrypt" ,libgcrypt)
       ("lvm2" ,lvm2)
       ("util-linux" ,util-linux)
       ("popt" ,popt)))
    (native-inputs
-    `(("python" ,python-wrapper)))
+    `(("pkg-config" ,pkg-config)
+      ("python" ,python-wrapper)))
    (synopsis "Hard disk encryption tool")
    (description
     "LUKS (Linux Unified Key Setup)/Cryptsetup provides a standard on-disk
@@ -80,6 +98,7 @@ files).  This assumes LIBRARY uses Libtool."
     (arguments
      '(#:configure-flags '("--disable-shared"
                            "--enable-static-cryptsetup"
+                           "--enable-libargon2"
 
                            ;; 'libdevmapper.a' pulls in libpthread, libudev and libm.
                            "LIBS=-ludev -pthread -lm")
@@ -109,7 +128,9 @@ files).  This assumes LIBRARY uses Libtool."
                                                                     ".static")
                                                      file)
                                         (remove-store-references file))
-                                      '("sbin/cryptsetup" "sbin/veritysetup"))
+                                      '("sbin/cryptsetup" "sbin/veritysetup"
+                                        "sbin/cryptsetup-reencrypt"
+                                        "sbin/integritysetup"))
                             #t))))))))
     (inputs
      (let ((libgcrypt-static
@@ -117,7 +138,9 @@ files).  This assumes LIBRARY uses Libtool."
               (inherit (static-library libgcrypt))
               (propagated-inputs
                `(("libgpg-error-host" ,(static-library libgpg-error)))))))
-       `(("libgcrypt" ,libgcrypt-static)
+       `(("argon2" ,argon2)
+         ("json-c" ,json-c)
+         ("libgcrypt" ,libgcrypt-static)
          ("lvm2" ,lvm2-static)
          ("util-linux" ,util-linux "static")
          ("util-linux" ,util-linux)
-- 
2.16.3


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#30974] cryptsetup 2.0.2
  2018-03-28 19:01 [bug#30974] cryptsetup 2.0.2 Marius Bakke
@ 2018-03-28 20:52 ` Marius Bakke
  2018-03-30  8:40   ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Marius Bakke @ 2018-03-28 20:52 UTC (permalink / raw)
  To: 30974

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

Marius Bakke <mbakke@fastmail.com> writes:

> The size of "cryptsetup-static" increases from 5 MiB to 11.2 MiB.  Not
> sure why, json-c and argon2 are only a few 100 KiB each.  Thoughts?

This is simply because 2.0 adds two new binaries: "cryptsetup-reencrypt"
and "integritysetup".  The size of the existing executables only
increase slightly.

We definitely don't need the "reencrypt" tool in the initrd, and can
probably get rid of integritysetup and veritysetup as well.  WDYT?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#30974] cryptsetup 2.0.2
  2018-03-28 20:52 ` Marius Bakke
@ 2018-03-30  8:40   ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2018-03-30  8:40 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 30974

Hello!

Marius Bakke <mbakke@fastmail.com> skribis:

> Marius Bakke <mbakke@fastmail.com> writes:
>
>> The size of "cryptsetup-static" increases from 5 MiB to 11.2 MiB.  Not
>> sure why, json-c and argon2 are only a few 100 KiB each.  Thoughts?
>
> This is simply because 2.0 adds two new binaries: "cryptsetup-reencrypt"
> and "integritysetup".  The size of the existing executables only
> increase slightly.
>
> We definitely don't need the "reencrypt" tool in the initrd, and can
> probably get rid of integritysetup and veritysetup as well.  WDYT?

I think we should get rid of both in the ‘cryptsetup-static’ package.

Thank you,
Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-30  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-28 19:01 [bug#30974] cryptsetup 2.0.2 Marius Bakke
2018-03-28 20:52 ` Marius Bakke
2018-03-30  8:40   ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).