unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#51289] BLAKE3 reference implementation and checksum tool
@ 2021-10-19 16:13 Leo Famulari
  2021-10-19 16:15 ` [bug#51289] [PATCH 1/4] gnu: rust-duct-0.13: Update to 0.13.5 Leo Famulari
  2021-10-31 13:36 ` [bug#51289] BLAKE3 reference implementation and checksum tool Efraim Flashner
  0 siblings, 2 replies; 8+ messages in thread
From: Leo Famulari @ 2021-10-19 16:13 UTC (permalink / raw)
  To: 51289

These patches add the BLAKE3 reference implementation and a BLAKE3
checksum tool, b3sum.

It's *very* fast, much faster than SHA256 and even BLAKE2.




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

* [bug#51289] [PATCH 1/4] gnu: rust-duct-0.13: Update to 0.13.5.
  2021-10-19 16:13 [bug#51289] BLAKE3 reference implementation and checksum tool Leo Famulari
@ 2021-10-19 16:15 ` Leo Famulari
  2021-10-19 16:15   ` [bug#51289] [PATCH 2/4] gnu: rust-os-pipe: Update to 0.9.2 Leo Famulari
                     ` (2 more replies)
  2021-10-31 13:36 ` [bug#51289] BLAKE3 reference implementation and checksum tool Efraim Flashner
  1 sibling, 3 replies; 8+ messages in thread
From: Leo Famulari @ 2021-10-19 16:15 UTC (permalink / raw)
  To: 51289

* gnu/packages/crates-io.scm (rust-duct-0.13): Update to 0.13.5.
[arguments]<cargo-inputs>: Use rust-os-pipe-0.9 instead of rust-os-pipe-0.8.
<cargo-development-inputs>: Remove key.
---
 gnu/packages/crates-io.scm | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 089b9f456c..4add0eef43 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -14774,7 +14774,7 @@ (define-public rust-dtparse-1
 (define-public rust-duct-0.13
   (package
     (name "rust-duct")
-    (version "0.13.0")
+    (version "0.13.5")
     (source
      (origin
        (method url-fetch)
@@ -14783,17 +14783,15 @@ (define-public rust-duct-0.13
         (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "1ir3884i1yznkfdccqqbcb9v5sdpcgxlv41hgzncrqaljv18r0wj"))))
+         "13bxiy0y1dck3xz28rqw5ylf2ykv6mk8ww6g8408x26hksjs1ihg"))))
     (build-system cargo-build-system)
     (arguments
      `(#:skip-build? #t
        #:cargo-inputs
        (("rust-libc" ,rust-libc-0.2)
         ("rust-once-cell" ,rust-once-cell-1)
-        ("rust-os-pipe" ,rust-os-pipe-0.8)
-        ("rust-shared-child" ,rust-shared-child-0.3))
-       #:cargo-development-inputs
-       (("rust-tempdir" ,rust-tempdir-0.3))))
+        ("rust-os-pipe" ,rust-os-pipe-0.9)
+        ("rust-shared-child" ,rust-shared-child-0.3))))
     (home-page
      "https://github.com/oconnor663/duct.rs")
     (synopsis
-- 
2.33.1





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

* [bug#51289] [PATCH 2/4] gnu: rust-os-pipe: Update to 0.9.2.
  2021-10-19 16:15 ` [bug#51289] [PATCH 1/4] gnu: rust-duct-0.13: Update to 0.13.5 Leo Famulari
@ 2021-10-19 16:15   ` Leo Famulari
  2021-10-19 16:15   ` [bug#51289] [PATCH 3/4] gnu: Add BLAKE3 Rust implementation Leo Famulari
  2021-10-19 16:15   ` [bug#51289] [PATCH 4/4] gnu: Add BLAKE3 command line tool Leo Famulari
  2 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2021-10-19 16:15 UTC (permalink / raw)
  To: 51289

* gnu/packages/crates-io.scm (rust-os-pipe-0.8): Replace with ...
(rust-os-pipe-0.9): ... new variable.
(arguments)<#:cargo-inputs>: Replace rust-nix-0.15 with rust-libc-0.2.
---
 gnu/packages/crates-io.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 4add0eef43..447dedde2d 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -31962,10 +31962,10 @@ (define-public rust-os-info-3
      "This library detects the operating system type and version.")
     (license license:expat)))
 
-(define-public rust-os-pipe-0.8
+(define-public rust-os-pipe-0.9
   (package
     (name "rust-os-pipe")
-    (version "0.8.2")
+    (version "0.9.2")
     (source
      (origin
        (method url-fetch)
@@ -31974,12 +31974,12 @@ (define-public rust-os-pipe-0.8
         (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "049ax8shxik7mm68r2nf7xnrcq3z3p7hz54sbrcxwywxqsjdzs41"))))
+         "04yjs1hf88jjm17g8a2lr7ibxyyg460rzbgcw9f1yzihq833y8zv"))))
     (build-system cargo-build-system)
     (arguments
      `(#:skip-build? #t
        #:cargo-inputs
-       (("rust-nix" ,rust-nix-0.15)
+       (("rust-libc" ,rust-libc-0.2)
         ("rust-winapi" ,rust-winapi-0.3))))
     (home-page
      "https://github.com/oconnor663/os_pipe.rs")
-- 
2.33.1





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

* [bug#51289] [PATCH 3/4] gnu: Add BLAKE3 Rust implementation.
  2021-10-19 16:15 ` [bug#51289] [PATCH 1/4] gnu: rust-duct-0.13: Update to 0.13.5 Leo Famulari
  2021-10-19 16:15   ` [bug#51289] [PATCH 2/4] gnu: rust-os-pipe: Update to 0.9.2 Leo Famulari
@ 2021-10-19 16:15   ` Leo Famulari
  2021-10-19 16:15   ` [bug#51289] [PATCH 4/4] gnu: Add BLAKE3 command line tool Leo Famulari
  2 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2021-10-19 16:15 UTC (permalink / raw)
  To: 51289

* gnu/packages/crypto.scm (rust-blake3-0.3): New variable.
---
 gnu/packages/crypto.scm | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 823b888b82..3b5957ef23 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 David Thompson <davet@gnu.org>
 ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016, 2017, 2018, 2019 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016, 2017, 2018, 2019, 2021 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox>
 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
@@ -1500,3 +1500,37 @@ (define-public cryfs
 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+)))
+
+(define-public rust-blake3-0.3
+  (package
+    (name "rust-blake3")
+    ;; Version 1 requires Rust >= 1.51.
+    ;; <https://github.com/BLAKE3-team/BLAKE3/releases/tag/1.0.0>
+    (version "0.3.8")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "blake3" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "1cr5l5szgxm632px41kavl6cgils8h6yhdfkm6jsc5jgiivqai5n"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build? #t
+        #:cargo-inputs
+        (("rust-arrayref" ,rust-arrayref-0.3)
+         ("rust-arrayvec" ,rust-arrayvec-0.5)
+         ("rust-cc" ,rust-cc-1)
+         ("rust-cfg-if" ,rust-cfg-if-0.1)
+         ("rust-constant-time-eq" ,rust-constant-time-eq-0.1)
+         ("rust-crypto-mac" ,rust-crypto-mac-0.8)
+         ("rust-digest" ,rust-digest-0.9)
+         ("rust-rayon" ,rust-rayon-1))))
+    (home-page "https://github.com/BLAKE3-team/BLAKE3")
+    (synopsis "BLAKE3 hash function Rust implementation")
+    (description "This crate provides the official Rust implementation of the
+BLAKE3 cryptographic hash function.  BLAKE3 is faster than MD5, SHA-1, SHA-2,
+SHA-3, and BLAKE2.")
+    ;; Users may choose between these two licenses when redistributing the
+    ;; program provided by this package.
+    (license (list license:cc0 license:asl2.0))))
-- 
2.33.1





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

* [bug#51289] [PATCH 4/4] gnu: Add BLAKE3 command line tool.
  2021-10-19 16:15 ` [bug#51289] [PATCH 1/4] gnu: rust-duct-0.13: Update to 0.13.5 Leo Famulari
  2021-10-19 16:15   ` [bug#51289] [PATCH 2/4] gnu: rust-os-pipe: Update to 0.9.2 Leo Famulari
  2021-10-19 16:15   ` [bug#51289] [PATCH 3/4] gnu: Add BLAKE3 Rust implementation Leo Famulari
@ 2021-10-19 16:15   ` Leo Famulari
  2 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2021-10-19 16:15 UTC (permalink / raw)
  To: 51289

* gnu/packages/crypto.scm (b3sum): New variable.
---
 gnu/packages/crypto.scm | 49 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 3b5957ef23..1b4906dc31 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -1534,3 +1534,52 @@ (define-public rust-blake3-0.3
     ;; Users may choose between these two licenses when redistributing the
     ;; program provided by this package.
     (license (list license:cc0 license:asl2.0))))
+
+(define-public b3sum
+  (package
+    (name "b3sum")
+    ;; Version 1 requires Rust >= 1.51.
+    ;; <https://github.com/BLAKE3-team/BLAKE3/releases/tag/1.0.0>
+    (version "0.3.8")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "b3sum" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "0h3fz16q5lk6mg7r8kjkjrq5hd4injngn5m7pswjbf2pyzjmg4b4"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(;; Install the source so that Cargo.toml is installed, because that is
+        ;; the only reference to the license information.
+        #:install-source? #t
+        #:phases
+        (modify-phases %standard-phases
+          (add-before 'check 'patch-tests
+            (lambda _
+              (substitute* "tests/cli_tests.rs"
+                (("/bin/sh") (which "sh")))))
+          (add-after 'install 'install-doc
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((out (assoc-ref outputs "out"))
+                     (doc (string-append out "/share/doc/" ,name "-"
+                                         ,(package-version this-package))))
+                (install-file "README.md" doc)))))
+        #:cargo-inputs
+        (("rust-anyhow" ,rust-anyhow-1)
+         ("rust-blake3" ,rust-blake3-0.3)
+         ("rust-clap" ,rust-clap-2)
+         ("rust-hex" ,rust-hex-0.4)
+         ("rust-memmap" ,rust-memmap-0.7)
+         ("rust-rayon" ,rust-rayon-1)
+         ("rust-wild" ,rust-wild-2))
+        #:cargo-development-inputs
+        (("rust-duct" ,rust-duct-0.13)
+         ("rust-tempfile" ,rust-tempfile-3))))
+    (home-page "https://github.com/BLAKE3-team/BLAKE3")
+    (synopsis "Command line BLAKE3 checksum tool")
+    (description "This package provides @code{b3sum}, a command line
+checksum tool based on the BLAKE3 cryptographic hash function.")
+    ;; Users may choose between these two licenses when redistributing the
+    ;; program provided by this package.
+    (license (list license:cc0 license:asl2.0))))
-- 
2.33.1





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

* [bug#51289] BLAKE3 reference implementation and checksum tool
  2021-10-19 16:13 [bug#51289] BLAKE3 reference implementation and checksum tool Leo Famulari
  2021-10-19 16:15 ` [bug#51289] [PATCH 1/4] gnu: rust-duct-0.13: Update to 0.13.5 Leo Famulari
@ 2021-10-31 13:36 ` Efraim Flashner
  2021-11-04 15:53   ` Leo Famulari
  1 sibling, 1 reply; 8+ messages in thread
From: Efraim Flashner @ 2021-10-31 13:36 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 51289

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

On Tue, Oct 19, 2021 at 12:13:11PM -0400, Leo Famulari wrote:
> These patches add the BLAKE3 reference implementation and a BLAKE3
> checksum tool, b3sum.
> 
> It's *very* fast, much faster than SHA256 and even BLAKE2.

I'd rather not remove the development-inputs for rust-duct but other
than that it looks fine to me. Didn't try building or running it though.

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

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

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

* [bug#51289] BLAKE3 reference implementation and checksum tool
  2021-10-31 13:36 ` [bug#51289] BLAKE3 reference implementation and checksum tool Efraim Flashner
@ 2021-11-04 15:53   ` Leo Famulari
  2021-11-10 16:37     ` bug#51289: " Leo Famulari
  0 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2021-11-04 15:53 UTC (permalink / raw)
  To: Efraim Flashner, 51289

On Sun, Oct 31, 2021 at 03:36:13PM +0200, Efraim Flashner wrote:
> I'd rather not remove the development-inputs for rust-duct but other
> than that it looks fine to me. Didn't try building or running it though.

Thanks, I'll remove that part of the rust-duct commit.

I also realized that the commits changing rust-duct and rust-os-pipe
need to be in the opposite order: We have to create rust-os-pipe-0.9
before using it in the updated rust-duct-0.13.

I'll test again and push soon.




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

* bug#51289: BLAKE3 reference implementation and checksum tool
  2021-11-04 15:53   ` Leo Famulari
@ 2021-11-10 16:37     ` Leo Famulari
  0 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2021-11-10 16:37 UTC (permalink / raw)
  To: Efraim Flashner, 51289-done

On Thu, Nov 04, 2021 at 11:53:52AM -0400, Leo Famulari wrote:
> I'll test again and push soon.

Pushed as 650dcc18e7f840a789a6aa06533b4a4ffc06af59




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

end of thread, other threads:[~2021-11-10 16:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 16:13 [bug#51289] BLAKE3 reference implementation and checksum tool Leo Famulari
2021-10-19 16:15 ` [bug#51289] [PATCH 1/4] gnu: rust-duct-0.13: Update to 0.13.5 Leo Famulari
2021-10-19 16:15   ` [bug#51289] [PATCH 2/4] gnu: rust-os-pipe: Update to 0.9.2 Leo Famulari
2021-10-19 16:15   ` [bug#51289] [PATCH 3/4] gnu: Add BLAKE3 Rust implementation Leo Famulari
2021-10-19 16:15   ` [bug#51289] [PATCH 4/4] gnu: Add BLAKE3 command line tool Leo Famulari
2021-10-31 13:36 ` [bug#51289] BLAKE3 reference implementation and checksum tool Efraim Flashner
2021-11-04 15:53   ` Leo Famulari
2021-11-10 16:37     ` bug#51289: " Leo Famulari

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).