* [bug#30007] [PATCH 0/2] gnu: borg: Unbundle libb2.
@ 2018-01-06 15:51 Tobias Geerinckx-Rice
2018-01-06 15:54 ` [bug#30007] [PATCH 1/2] gnu: Add libb2 Tobias Geerinckx-Rice
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-06 15:51 UTC (permalink / raw)
To: 30007
Guix,
This adds a libb2 (BLAKE2) package and makes borg use that instead of
its bundled copy.
Not sure whether it belongs in crypto.scm or the new digest.scm wherein
I randomly plonked it. Not sure whether it matters.
Kind regards,
T G-R
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#30007] [PATCH 1/2] gnu: Add libb2.
2018-01-06 15:51 [bug#30007] [PATCH 0/2] gnu: borg: Unbundle libb2 Tobias Geerinckx-Rice
@ 2018-01-06 15:54 ` Tobias Geerinckx-Rice
2018-01-06 15:54 ` [bug#30007] [PATCH 2/2] gnu: borg: Unbundle libb2 Tobias Geerinckx-Rice
2018-01-06 17:49 ` [bug#30007] [PATCH 1/2] gnu: Add libb2 Leo Famulari
2018-01-06 17:47 ` [bug#30007] [PATCH 0/2] gnu: borg: Unbundle libb2 Leo Famulari
2018-01-08 14:13 ` bug#30007: " Tobias Geerinckx-Rice
2 siblings, 2 replies; 8+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-06 15:54 UTC (permalink / raw)
To: 30007
* gnu/packages/digest.scm (libb2): New public variable.
---
gnu/packages/digest.scm | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/digest.scm b/gnu/packages/digest.scm
index 5f14ab913..456980ea5 100644
--- a/gnu/packages/digest.scm
+++ b/gnu/packages/digest.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,9 +17,11 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages digest)
+ #:use-module (gnu packages autotools)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu))
(define-public xxhash
@@ -53,3 +55,47 @@ The code is highly portable, and hashes of the same length are identical on all
platforms (both big and little endian).")
(license (list license:bsd-2 ; xxhash library (xxhash.[ch])
license:gpl2+)))) ; xxhsum.c
+
+(define-public libb2
+ (let ((revision "1") ; upstream doesn't ‘do’ releases
+ (commit "60ea749837362c226e8501718f505ab138e5c19d"))
+ (package
+ (name "libb2")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/BLAKE2/libb2")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "07a2m8basxrsj9dsp5lj24y8jraj85lfy56756a7za1nfkgy04z7"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)))
+ (arguments
+ `(#:configure-flags
+ (list "--enable-fat" ; detect optimisations at run time...
+ "--disable-native") ; ...not build time
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'bootstrap
+ (lambda _
+ (invoke "sh" "autogen.sh")
+ #t)))))
+ (home-page "https://blake2.net/")
+ (synopsis "Library implementing the BLAKE2 family of hash functions")
+ (description
+ "libb2 is a portable implementation of the BLAKE2 family of cryptographic
+hash functions. It includes optimised implementations for IA-32 and AMD64
+processors, and an interface layer that automatically selects the best
+implementation for the processor it is run on.
+
+@dfn{BLAKE2} (RFC 7693) is a family of high-speed cryptographic hash functions
+that are faster than MD5, SHA-1, SHA-2, and SHA-3, yet are at least as secure
+as the latest standard, SHA-3. It is an improved version of the SHA-3 finalist
+BLAKE.")
+ (license license:public-domain))))
--
2.15.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#30007] [PATCH 2/2] gnu: borg: Unbundle libb2.
2018-01-06 15:54 ` [bug#30007] [PATCH 1/2] gnu: Add libb2 Tobias Geerinckx-Rice
@ 2018-01-06 15:54 ` Tobias Geerinckx-Rice
2018-01-06 17:49 ` Leo Famulari
2018-01-06 17:49 ` [bug#30007] [PATCH 1/2] gnu: Add libb2 Leo Famulari
1 sibling, 1 reply; 8+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-06 15:54 UTC (permalink / raw)
To: 30007
* gnu/packages/backup.scm (borg)[source]: Remove bundled libb2 in snippet.
[inputs]: Add libb2.
[arguments]: Use it.
---
gnu/packages/backup.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 2fba1a9e7..19a26dc9a 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
@@ -37,6 +37,7 @@
#:use-module (gnu packages base)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages digest)
#:use-module (gnu packages databases)
#:use-module (gnu packages dejagnu)
#:use-module (gnu packages ftp)
@@ -483,7 +484,7 @@ detection, and lossless compression.")
;; Remove bundled shared libraries.
(with-directory-excursion "src/borg/algorithms"
(for-each delete-file-recursively
- (list "lz4" "zstd")))))))
+ (list "blake2" "lz4" "zstd")))))))
(build-system python-build-system)
(arguments
`(#:modules ((srfi srfi-26) ; for cut
@@ -494,9 +495,11 @@ detection, and lossless compression.")
(add-after 'unpack 'set-env
(lambda* (#:key inputs #:allow-other-keys)
(let ((openssl (assoc-ref inputs "openssl"))
+ (libb2 (assoc-ref inputs "libb2"))
(lz4 (assoc-ref inputs "lz4"))
(zstd (assoc-ref inputs "zstd")))
(setenv "BORG_OPENSSL_PREFIX" openssl)
+ (setenv "BORG_LIBB2_PREFIX" libb2)
(setenv "BORG_LIBLZ4_PREFIX" lz4)
(setenv "BORG_LIBZSTD_PREFIX" zstd)
(setenv "PYTHON_EGG_CACHE" "/tmp")
@@ -558,6 +561,7 @@ detection, and lossless compression.")
("python-guzzle-sphinx-theme" ,python-guzzle-sphinx-theme)))
(inputs
`(("acl" ,acl)
+ ("libb2" ,libb2)
("lz4" ,lz4)
("openssl" ,openssl)
("python-llfuse" ,python-llfuse)
--
2.15.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#30007] [PATCH 0/2] gnu: borg: Unbundle libb2.
2018-01-06 15:51 [bug#30007] [PATCH 0/2] gnu: borg: Unbundle libb2 Tobias Geerinckx-Rice
2018-01-06 15:54 ` [bug#30007] [PATCH 1/2] gnu: Add libb2 Tobias Geerinckx-Rice
@ 2018-01-06 17:47 ` Leo Famulari
2018-01-08 14:13 ` bug#30007: " Tobias Geerinckx-Rice
2 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2018-01-06 17:47 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: 30007
[-- Attachment #1: Type: text/plain, Size: 402 bytes --]
On Sat, Jan 06, 2018 at 04:51:01PM +0100, Tobias Geerinckx-Rice wrote:
> Guix,
>
> This adds a libb2 (BLAKE2) package and makes borg use that instead of
> its bundled copy.
Okay!
> Not sure whether it belongs in crypto.scm or the new digest.scm wherein
> I randomly plonked it. Not sure whether it matters.
I'd put it in crypto.scm since it is supposed to be cryptographically
secure.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#30007] [PATCH 1/2] gnu: Add libb2.
2018-01-06 15:54 ` [bug#30007] [PATCH 1/2] gnu: Add libb2 Tobias Geerinckx-Rice
2018-01-06 15:54 ` [bug#30007] [PATCH 2/2] gnu: borg: Unbundle libb2 Tobias Geerinckx-Rice
@ 2018-01-06 17:49 ` Leo Famulari
2018-01-06 18:12 ` Tobias Geerinckx-Rice
1 sibling, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2018-01-06 17:49 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: 30007
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
On Sat, Jan 06, 2018 at 04:54:17PM +0100, Tobias Geerinckx-Rice wrote:
> * gnu/packages/digest.scm (libb2): New public variable.
> + (name "libb2")
> + (version (string-append "0.0.0-" revision "." (string-take commit 7)))
Use the (git-version) procedure here
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/BLAKE2/libb2")
> + (commit commit)))
> + (file-name (string-append name "-" version "-checkout"))
And (git-file-name)
> + (add-after 'unpack 'bootstrap
> + (lambda _
> + (invoke "sh" "autogen.sh")
> + #t)))))
(invoke) should raise an exception if something goes wrong;
otherwise it returns #t. Do we need that extra #t?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#30007] [PATCH 2/2] gnu: borg: Unbundle libb2.
2018-01-06 15:54 ` [bug#30007] [PATCH 2/2] gnu: borg: Unbundle libb2 Tobias Geerinckx-Rice
@ 2018-01-06 17:49 ` Leo Famulari
0 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2018-01-06 17:49 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: 30007
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
On Sat, Jan 06, 2018 at 04:54:18PM +0100, Tobias Geerinckx-Rice wrote:
> * gnu/packages/backup.scm (borg)[source]: Remove bundled libb2 in snippet.
> [inputs]: Add libb2.
> [arguments]: Use it.
LGTM, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#30007] [PATCH 1/2] gnu: Add libb2.
2018-01-06 17:49 ` [bug#30007] [PATCH 1/2] gnu: Add libb2 Leo Famulari
@ 2018-01-06 18:12 ` Tobias Geerinckx-Rice
0 siblings, 0 replies; 8+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-06 18:12 UTC (permalink / raw)
To: leo; +Cc: 30007
[-- Attachment #1.1: Type: text/plain, Size: 573 bytes --]
Leo,
Leo Famulari wrote on 06/01/18 at 18:49:
> Use the (git-version) procedure here
> And (git-file-name)
Both new to me. Thanks!
>> + (add-after 'unpack 'bootstrap
>> + (lambda _
>> + (invoke "sh" "autogen.sh")
>> + #t)))))
>
> (invoke) should raise an exception if something goes wrong;
> otherwise it returns #t. Do we need that extra #t?
Nope, the whole point of (invoke) was to replace my original use of
(system*), and the #t just got left in. Thanks for spotting!
Kind regards,
T G-R
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 248 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#30007: [PATCH 0/2] gnu: borg: Unbundle libb2.
2018-01-06 15:51 [bug#30007] [PATCH 0/2] gnu: borg: Unbundle libb2 Tobias Geerinckx-Rice
2018-01-06 15:54 ` [bug#30007] [PATCH 1/2] gnu: Add libb2 Tobias Geerinckx-Rice
2018-01-06 17:47 ` [bug#30007] [PATCH 0/2] gnu: borg: Unbundle libb2 Leo Famulari
@ 2018-01-08 14:13 ` Tobias Geerinckx-Rice
2 siblings, 0 replies; 8+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-08 14:13 UTC (permalink / raw)
To: 30007-done
Tobias Geerinckx-Rice wrote on 06/01/18 at 16:51:
> This adds a libb2 (BLAKE2) package and makes borg use that instead of
> its bundled copy.
Pushed with suggested modifications as
c6220b13014f47a0aeb29975cdcf3c3b2b880b9d et al.
Thanks for the reviews,
T G-R
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-01-08 14:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-06 15:51 [bug#30007] [PATCH 0/2] gnu: borg: Unbundle libb2 Tobias Geerinckx-Rice
2018-01-06 15:54 ` [bug#30007] [PATCH 1/2] gnu: Add libb2 Tobias Geerinckx-Rice
2018-01-06 15:54 ` [bug#30007] [PATCH 2/2] gnu: borg: Unbundle libb2 Tobias Geerinckx-Rice
2018-01-06 17:49 ` Leo Famulari
2018-01-06 17:49 ` [bug#30007] [PATCH 1/2] gnu: Add libb2 Leo Famulari
2018-01-06 18:12 ` Tobias Geerinckx-Rice
2018-01-06 17:47 ` [bug#30007] [PATCH 0/2] gnu: borg: Unbundle libb2 Leo Famulari
2018-01-08 14:13 ` bug#30007: " Tobias Geerinckx-Rice
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).