all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 0/6] Add borg
@ 2016-03-14 23:34 Leo Famulari
  2016-03-14 23:34 ` [PATCH 1/6] gnu: python-msgpack: Update to 0.4.7 Leo Famulari
                   ` (6 more replies)
  0 siblings, 7 replies; 25+ messages in thread
From: Leo Famulari @ 2016-03-14 23:34 UTC (permalink / raw)
  To: guix-devel

These patches add the borg backup program [0], which is a more actively
developed fork of attic [1].

Borg is compatible with the current version of python-llfuse (1.0), but
this required changes in borg [2]. Since attic has not had any updates
since borg was forked, I think it's reasonable to guess that attic still
requires python-llfuse@0.41. So, this patch set updates llfuse while
keeping the old version around.

These patches also update python-msgpack and clean up its python-2
variant.

[0]
http://borgbackup.readthedocs.org/en/latest/

[1]
https://attic-backup.org/

[2]
https://github.com/borgbackup/borg/commit/dbec05ab73b30f655021118e62bc94c547870472

Leo Famulari (6):
  gnu: python-msgpack: Update to 0.4.7.
  gnu: python-msgpack: Use 'python2-variant'.
  gnu: attic: Specify dependency on python-llfuse@0.41.
  gnu: python-llfuse: Update to 1.0, keep 0.41 variant.
  gnu: Add borg.
  gnu: python-llfuse@0.41: Update to 0.41.1.

 gnu/packages/backup.scm | 65 ++++++++++++++++++++++++++++++++++++++++++++++---
 gnu/packages/python.scm | 48 +++++++++++++++++++++++++-----------
 2 files changed, 96 insertions(+), 17 deletions(-)

-- 
2.6.3

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

* [PATCH 1/6] gnu: python-msgpack: Update to 0.4.7.
  2016-03-14 23:34 [PATCH 0/6] Add borg Leo Famulari
@ 2016-03-14 23:34 ` Leo Famulari
  2016-03-14 23:34 ` [PATCH 2/6] gnu: python-msgpack: Use 'python2-variant' Leo Famulari
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 25+ messages in thread
From: Leo Famulari @ 2016-03-14 23:34 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-msgpack, python2-msgpack): Update to 0.4.7.
[source]: Use pypi-uri.
---
 gnu/packages/python.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index af3c60b..075d4fe 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5417,15 +5417,13 @@ should be stored on various operating systems.")
 (define-public python-msgpack
   (package
     (name "python-msgpack")
-    (version "0.4.6")
+    (version "0.4.7")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://pypi.python.org/packages/source/m/"
-                    "msgpack-python/msgpack-python-" version ".tar.gz"))
+              (uri (pypi-uri "msgpack-python" version))
               (sha256
                (base32
-                "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z"))))
+                "0syd7bs83qs9qmxw540jbgsildbqk4yb57fmrlns1021llli402y"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-setuptools" ,python-setuptools)))
-- 
2.6.3

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

* [PATCH 2/6] gnu: python-msgpack: Use 'python2-variant'.
  2016-03-14 23:34 [PATCH 0/6] Add borg Leo Famulari
  2016-03-14 23:34 ` [PATCH 1/6] gnu: python-msgpack: Update to 0.4.7 Leo Famulari
@ 2016-03-14 23:34 ` Leo Famulari
  2016-03-14 23:34 ` [PATCH 3/6] gnu: attic: Specify dependency on python-llfuse@0.41 Leo Famulari
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 25+ messages in thread
From: Leo Famulari @ 2016-03-14 23:34 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-msgpack)[native-inputs]: Remove field.
[properties]: New field.
(python2-msgpack): Use 'strip-python2-variant'.
[native-inputs]: Add python2-setuptools.
---
 gnu/packages/python.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 075d4fe..de2ce34 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5425,14 +5425,19 @@ should be stored on various operating systems.")
                (base32
                 "0syd7bs83qs9qmxw540jbgsildbqk4yb57fmrlns1021llli402y"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (synopsis "MessagePack (de)serializer")
     (description "MessagePack is a fast, compact binary serialization format,
 suitable for similar data to JSON.  This package provides CPython bindings for
 reading and writing MessagePack data.")
     (home-page "https://pypi.python.org/pypi/msgpack-python/")
-    (license asl2.0)))
+    (license asl2.0)
+    (properties `((python2-variant . ,(delay python2-msgpack))))))
+
+(define-public python2-msgpack
+  (package (inherit (package-with-python2
+                     (strip-python2-variant python-msgpack)))
+    (native-inputs
+     `(("python2-setuptools" ,python2-setuptools)))))
 
 (define-public python2-msgpack
   (package-with-python2 python-msgpack))
-- 
2.6.3

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

* [PATCH 3/6] gnu: attic: Specify dependency on python-llfuse@0.41.
  2016-03-14 23:34 [PATCH 0/6] Add borg Leo Famulari
  2016-03-14 23:34 ` [PATCH 1/6] gnu: python-msgpack: Update to 0.4.7 Leo Famulari
  2016-03-14 23:34 ` [PATCH 2/6] gnu: python-msgpack: Use 'python2-variant' Leo Famulari
@ 2016-03-14 23:34 ` Leo Famulari
  2016-03-15  8:58   ` Alex Kost
  2016-03-14 23:34 ` [PATCH 4/6] gnu: python-llfuse: Update to 1.0, keep 0.41 variant Leo Famulari
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-03-14 23:34 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/backup.scm (attic)[inputs]: Specify dependency on
python-llfuse@0.41.
---
 gnu/packages/backup.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index aa8ccbc..88b54f0 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -348,8 +348,16 @@ rdiff-backup is easy to use and settings have sensible defaults.")
     (inputs
      `(("acl" ,acl)
        ("openssl" ,openssl)
-       ("python-llfuse" ,python-llfuse)
-       ("python-msgpack" ,python-msgpack)))
+       ("python-msgpack" ,python-msgpack)
+
+       ;; Attic is probably incompatible with llfuse > 0.41.
+       ;; These links are to discussions of llfuse compatibility from
+       ;; the borg project. Borg is a recent fork of attic, and attic
+       ;; has not been updated since the fork, so it's likely that
+       ;; llfuse compatibility requirements are still the same.
+       ;; https://github.com/borgbackup/borg/issues/642
+       ;; https://github.com/borgbackup/borg/issues/643
+       ("python-llfuse" ,python-llfuse@0.41)))
     (synopsis "Deduplicating backup program")
     (description "Attic is a deduplicating backup program.  The main goal of
 Attic is to provide an efficient and secure way to backup data.  The data
-- 
2.6.3

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

* [PATCH 4/6] gnu: python-llfuse: Update to 1.0, keep 0.41 variant.
  2016-03-14 23:34 [PATCH 0/6] Add borg Leo Famulari
                   ` (2 preceding siblings ...)
  2016-03-14 23:34 ` [PATCH 3/6] gnu: attic: Specify dependency on python-llfuse@0.41 Leo Famulari
@ 2016-03-14 23:34 ` Leo Famulari
  2016-03-15  8:53   ` Alex Kost
  2016-03-14 23:34 ` [PATCH 5/6] gnu: Add borg Leo Famulari
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-03-14 23:34 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-llfuse, python2-llfuse): Update to 1.0.
(python-llfuse)[properties]: New field.
[license]: Remove 'expat'.
(python2-llfuse): Use 'strip-python2-variant'.
[propagated-inputs]: Add python2-contextlib2.
(python-llfuse@0.41): New variable.
---
 gnu/packages/python.scm | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index de2ce34..5aea1b3 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5387,7 +5387,7 @@ should be stored on various operating systems.")
 (define-public python-llfuse
   (package
     (name "python-llfuse")
-    (version "0.41")
+    (version "1.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -5395,7 +5395,7 @@ should be stored on various operating systems.")
                     "llfuse-" version ".tar.bz2"))
               (sha256
                (base32
-                "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
+                "1li7q04ljrvwharw4fblcbfhvk6s0l3lnv8yqb4c22lcgbkiqlps"))))
     (build-system python-build-system)
     (inputs
      `(("fuse" ,fuse)
@@ -5407,12 +5407,29 @@ should be stored on various operating systems.")
     (description
      "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
     (home-page "https://bitbucket.org/nikratio/python-llfuse/")
-    ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed.
-    ;; The rest of the package is licensed under LGPL2.0 or later.
-    (license (list license:expat lgpl2.0+))))
+    (license lgpl2.0+)
+    (properties `((python2-variant . ,(delay python2-llfuse))))))
 
 (define-public python2-llfuse
-  (package-with-python2 python-llfuse))
+  (package (inherit (package-with-python2
+                 (strip-python2-variant python-llfuse)))
+    (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
+
+;; For attic@0.16
+(define-public python-llfuse@0.41
+  (package (inherit python-llfuse)
+    (version "0.41")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://bitbucket.org/nikratio/python-llfuse/downloads/"
+                    "llfuse-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
+    ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
+    ;; licensed.  The rest of the package is licensed under LGPL2.0 or later.
+    (license (list license:expat lgpl2.0+))))
 
 (define-public python-msgpack
   (package
-- 
2.6.3

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

* [PATCH 5/6] gnu: Add borg.
  2016-03-14 23:34 [PATCH 0/6] Add borg Leo Famulari
                   ` (3 preceding siblings ...)
  2016-03-14 23:34 ` [PATCH 4/6] gnu: python-llfuse: Update to 1.0, keep 0.41 variant Leo Famulari
@ 2016-03-14 23:34 ` Leo Famulari
  2016-03-15  9:11   ` Alex Kost
  2016-03-14 23:34 ` [PATCH 6/6] gnu: python-llfuse@0.41: Update to 0.41.1 Leo Famulari
  2016-03-24 21:55 ` [PATCH 0/6] Add borg Leo Famulari
  6 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-03-14 23:34 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/backup.scm (borg): New variable.
---
 gnu/packages/backup.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 52 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 88b54f0..d8f2e87 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
-;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -406,3 +406,54 @@ compression, and more.  The library itself implements storage techniques such
 as content-addressable storage, content hash keys, Merkle trees, similarity
 detection, and lossless compression.")
     (license license:gpl3+)))
+
+(define-public borg
+  (package
+    (name "borg")
+    (version "1.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "borgbackup" version))
+              (sha256
+               (base32
+                "0wa6cvqs3rni5nwrgagigchcly8a53rxk56z0zn8iaii2cqrw2sh"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'set-openssl-prefix
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "BORG_OPENSSL_PREFIX" (assoc-ref inputs "openssl"))
+             #t))
+         (add-before 'build 'set-lz4-prefix
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "BORG_LZ4_PREFIX" (assoc-ref inputs "lz4"))
+             #t))
+         (add-after 'install 'docs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (man (string-append out "/share/man/man1")))
+               (and
+                 (zero? (system* "make" "-C" "docs" "man"))
+                 (install-file "docs/_build/man/borg.1" man)))
+             #t)))))
+    (native-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)
+       ;; For generating the documentation.
+       ("python-sphinx" ,python-sphinx)
+       ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
+    (inputs
+     `(("acl" ,acl)
+       ("lz4" ,lz4)
+       ("openssl" ,openssl)
+       ("python-llfuse" ,python-llfuse)
+       ("python-msgpack" ,python-msgpack)))
+    (synopsis "Deduplicated, encrypted, authenticated and compressed backups")
+    (description "Borg is a deduplicating backup program.  Optionally, it
+supports compression and authenticated encryption.  The main goal of Borg is to
+provide an efficient and secure way to backup data.  The data deduplication
+technique used makes Borg suitable for daily backups since only changes are
+stored.  The authenticated encryption technique makes it suitable for backups
+to not fully trusted targets.  Borg is a fork of Attic.")
+    (home-page "https://borgbackup.github.io/borgbackup/")
+    (license license:bsd-3)))
-- 
2.6.3

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

* [PATCH 6/6] gnu: python-llfuse@0.41: Update to 0.41.1.
  2016-03-14 23:34 [PATCH 0/6] Add borg Leo Famulari
                   ` (4 preceding siblings ...)
  2016-03-14 23:34 ` [PATCH 5/6] gnu: Add borg Leo Famulari
@ 2016-03-14 23:34 ` Leo Famulari
  2016-03-24 21:55 ` [PATCH 0/6] Add borg Leo Famulari
  6 siblings, 0 replies; 25+ messages in thread
From: Leo Famulari @ 2016-03-14 23:34 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-llfuse@0.41): Update to 0.41.1.
---
 gnu/packages/python.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5aea1b3..24cacee 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5418,7 +5418,7 @@ should be stored on various operating systems.")
 ;; For attic@0.16
 (define-public python-llfuse@0.41
   (package (inherit python-llfuse)
-    (version "0.41")
+    (version "0.41.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -5426,7 +5426,7 @@ should be stored on various operating systems.")
                     "llfuse-" version ".tar.bz2"))
               (sha256
                (base32
-                "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
+                "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
     ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
     ;; licensed.  The rest of the package is licensed under LGPL2.0 or later.
     (license (list license:expat lgpl2.0+))))
-- 
2.6.3

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

* Re: [PATCH 4/6] gnu: python-llfuse: Update to 1.0, keep 0.41 variant.
  2016-03-14 23:34 ` [PATCH 4/6] gnu: python-llfuse: Update to 1.0, keep 0.41 variant Leo Famulari
@ 2016-03-15  8:53   ` Alex Kost
  2016-03-15  9:13     ` Leo Famulari
  0 siblings, 1 reply; 25+ messages in thread
From: Alex Kost @ 2016-03-15  8:53 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari (2016-03-15 02:34 +0300) wrote:

[...]
>  (define-public python2-llfuse
> -  (package-with-python2 python-llfuse))
> +  (package (inherit (package-with-python2
> +                 (strip-python2-variant python-llfuse)))
> +    (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
> +
> +;; For attic@0.16
> +(define-public python-llfuse@0.41

All our package variables use '-' to separate name and version.  I think
this is good choice and we shouldn't use '@' in variable names.

-- 
Alex

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

* Re: [PATCH 3/6] gnu: attic: Specify dependency on python-llfuse@0.41.
  2016-03-14 23:34 ` [PATCH 3/6] gnu: attic: Specify dependency on python-llfuse@0.41 Leo Famulari
@ 2016-03-15  8:58   ` Alex Kost
  2016-03-15  9:13     ` Leo Famulari
  0 siblings, 1 reply; 25+ messages in thread
From: Alex Kost @ 2016-03-15  8:58 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari (2016-03-15 02:34 +0300) wrote:

> * gnu/packages/backup.scm (attic)[inputs]: Specify dependency on
> python-llfuse@0.41.
> ---
>  gnu/packages/backup.scm | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
>
>
> diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
> index aa8ccbc..88b54f0 100644
> --- a/gnu/packages/backup.scm
> +++ b/gnu/packages/backup.scm
> @@ -348,8 +348,16 @@ rdiff-backup is easy to use and settings have sensible defaults.")
>      (inputs
>       `(("acl" ,acl)
>         ("openssl" ,openssl)
> -       ("python-llfuse" ,python-llfuse)
> -       ("python-msgpack" ,python-msgpack)))
> +       ("python-msgpack" ,python-msgpack)
> +
> +       ;; Attic is probably incompatible with llfuse > 0.41.
> +       ;; These links are to discussions of llfuse compatibility from
> +       ;; the borg project. Borg is a recent fork of attic, and attic
> +       ;; has not been updated since the fork, so it's likely that
> +       ;; llfuse compatibility requirements are still the same.
> +       ;; https://github.com/borgbackup/borg/issues/642
> +       ;; https://github.com/borgbackup/borg/issues/643
> +       ("python-llfuse" ,python-llfuse@0.41)))

You use a variable ‘python-llfuse@0.41’ (which should be
‘python-llfuse-0.41’ IMO) that does not exist yet, as it will be
introduced in the next patch.  I think you should swap patches 3 and 4.

-- 
Alex

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

* Re: [PATCH 5/6] gnu: Add borg.
  2016-03-14 23:34 ` [PATCH 5/6] gnu: Add borg Leo Famulari
@ 2016-03-15  9:11   ` Alex Kost
  2016-03-15  9:18     ` Leo Famulari
  0 siblings, 1 reply; 25+ messages in thread
From: Alex Kost @ 2016-03-15  9:11 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari (2016-03-15 02:34 +0300) wrote:

> * gnu/packages/backup.scm (borg): New variable.
> ---
>  gnu/packages/backup.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 52 insertions(+), 1 deletion(-)
[...]
> +(define-public borg
> +  (package
> +    (name "borg")
> +    (version "1.0.0")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "borgbackup" version))
> +              (sha256
> +               (base32
> +                "0wa6cvqs3rni5nwrgagigchcly8a53rxk56z0zn8iaii2cqrw2sh"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-before 'build 'set-openssl-prefix
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (setenv "BORG_OPENSSL_PREFIX" (assoc-ref inputs "openssl"))
> +             #t))
> +         (add-before 'build 'set-lz4-prefix
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (setenv "BORG_LZ4_PREFIX" (assoc-ref inputs "lz4"))
> +             #t))

Would it be better to make a single 'set-env' phase instead?  Or better
yet, are these '..._PREFIX' variables used for make command?  If so,
they should be specified in #:make-flags argument.

> +         (add-after 'install 'docs
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (man (string-append out "/share/man/man1")))
> +               (and
> +                 (zero? (system* "make" "-C" "docs" "man"))
> +                 (install-file "docs/_build/man/borg.1" man)))

Since 'install-file' does not specify a returned value, and we are not
really interested in the returned value, I think it is better to use
'when' instead of 'and' here:

               (when (zero? (system* "make" "-C" "docs" "man"))
                 (install-file "docs/_build/man/borg.1" man))

> +             #t)))))

-- 
Alex

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

* Re: [PATCH 4/6] gnu: python-llfuse: Update to 1.0, keep 0.41 variant.
  2016-03-15  8:53   ` Alex Kost
@ 2016-03-15  9:13     ` Leo Famulari
  2016-03-15 10:12       ` Mathieu Lirzin
  0 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-03-15  9:13 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

On Tue, Mar 15, 2016 at 11:53:33AM +0300, Alex Kost wrote:
> Leo Famulari (2016-03-15 02:34 +0300) wrote:
> 
> [...]
> >  (define-public python2-llfuse
> > -  (package-with-python2 python-llfuse))
> > +  (package (inherit (package-with-python2
> > +                 (strip-python2-variant python-llfuse)))
> > +    (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
> > +
> > +;; For attic@0.16
> > +(define-public python-llfuse@0.41
> 
> All our package variables use '-' to separate name and version.  I think
> this is good choice and we shouldn't use '@' in variable names.

Okay, I replaced all use of '@' with '-'.

Is the '@' syntax is only meant to be used on the command line?

> 
> -- 
> Alex

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

* Re: [PATCH 3/6] gnu: attic: Specify dependency on python-llfuse@0.41.
  2016-03-15  8:58   ` Alex Kost
@ 2016-03-15  9:13     ` Leo Famulari
  0 siblings, 0 replies; 25+ messages in thread
From: Leo Famulari @ 2016-03-15  9:13 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

On Tue, Mar 15, 2016 at 11:58:59AM +0300, Alex Kost wrote:
> Leo Famulari (2016-03-15 02:34 +0300) wrote:
> 
> > * gnu/packages/backup.scm (attic)[inputs]: Specify dependency on
> > python-llfuse@0.41.
> > ---
> >  gnu/packages/backup.scm | 12 ++++++++++--
> >  1 file changed, 10 insertions(+), 2 deletions(-)
> >
> >
> > diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
> > index aa8ccbc..88b54f0 100644
> > --- a/gnu/packages/backup.scm
> > +++ b/gnu/packages/backup.scm
> > @@ -348,8 +348,16 @@ rdiff-backup is easy to use and settings have sensible defaults.")
> >      (inputs
> >       `(("acl" ,acl)
> >         ("openssl" ,openssl)
> > -       ("python-llfuse" ,python-llfuse)
> > -       ("python-msgpack" ,python-msgpack)))
> > +       ("python-msgpack" ,python-msgpack)
> > +
> > +       ;; Attic is probably incompatible with llfuse > 0.41.
> > +       ;; These links are to discussions of llfuse compatibility from
> > +       ;; the borg project. Borg is a recent fork of attic, and attic
> > +       ;; has not been updated since the fork, so it's likely that
> > +       ;; llfuse compatibility requirements are still the same.
> > +       ;; https://github.com/borgbackup/borg/issues/642
> > +       ;; https://github.com/borgbackup/borg/issues/643
> > +       ("python-llfuse" ,python-llfuse@0.41)))
> 
> You use a variable ‘python-llfuse@0.41’ (which should be
> ‘python-llfuse-0.41’ IMO) that does not exist yet, as it will be
> introduced in the next patch.  I think you should swap patches 3 and 4.

Thank you for catching this. Fixed.

> 
> -- 
> Alex

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

* Re: [PATCH 5/6] gnu: Add borg.
  2016-03-15  9:11   ` Alex Kost
@ 2016-03-15  9:18     ` Leo Famulari
  2016-03-21 21:31       ` Leo Famulari
  0 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-03-15  9:18 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

On Tue, Mar 15, 2016 at 12:11:15PM +0300, Alex Kost wrote:
> Leo Famulari (2016-03-15 02:34 +0300) wrote:
> 
> > * gnu/packages/backup.scm (borg): New variable.
> > ---
> >  gnu/packages/backup.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 52 insertions(+), 1 deletion(-)
> [...]
> > +(define-public borg
> > +  (package
> > +    (name "borg")
> > +    (version "1.0.0")
> > +    (source (origin
> > +              (method url-fetch)
> > +              (uri (pypi-uri "borgbackup" version))
> > +              (sha256
> > +               (base32
> > +                "0wa6cvqs3rni5nwrgagigchcly8a53rxk56z0zn8iaii2cqrw2sh"))))
> > +    (build-system python-build-system)
> > +    (arguments
> > +     `(#:phases
> > +       (modify-phases %standard-phases
> > +         (add-before 'build 'set-openssl-prefix
> > +           (lambda* (#:key inputs #:allow-other-keys)
> > +             (setenv "BORG_OPENSSL_PREFIX" (assoc-ref inputs "openssl"))
> > +             #t))
> > +         (add-before 'build 'set-lz4-prefix
> > +           (lambda* (#:key inputs #:allow-other-keys)
> > +             (setenv "BORG_LZ4_PREFIX" (assoc-ref inputs "lz4"))
> > +             #t))
> 
> Would it be better to make a single 'set-env' phase instead?  Or better
> yet, are these '..._PREFIX' variables used for make command?  If so,
> they should be specified in #:make-flags argument.

Thank you, that makes the recipe shorter and clearer.

> 
> > +         (add-after 'install 'docs
> > +           (lambda* (#:key outputs #:allow-other-keys)
> > +             (let* ((out (assoc-ref outputs "out"))
> > +                    (man (string-append out "/share/man/man1")))
> > +               (and
> > +                 (zero? (system* "make" "-C" "docs" "man"))
> > +                 (install-file "docs/_build/man/borg.1" man)))
> 
> Since 'install-file' does not specify a returned value, and we are not
> really interested in the returned value, I think it is better to use
> 'when' instead of 'and' here:
> 
>                (when (zero? (system* "make" "-C" "docs" "man"))
>                  (install-file "docs/_build/man/borg.1" man))

Okay, that makes sense.

> 
> > +             #t)))))
> 
> -- 
> Alex

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

* Re: [PATCH 4/6] gnu: python-llfuse: Update to 1.0, keep 0.41 variant.
  2016-03-15  9:13     ` Leo Famulari
@ 2016-03-15 10:12       ` Mathieu Lirzin
  2016-03-15 16:25         ` Ludovic Courtès
  0 siblings, 1 reply; 25+ messages in thread
From: Mathieu Lirzin @ 2016-03-15 10:12 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel, Alex Kost

Leo Famulari <leo@famulari.name> writes:

> On Tue, Mar 15, 2016 at 11:53:33AM +0300, Alex Kost wrote:
>> Leo Famulari (2016-03-15 02:34 +0300) wrote:
>> 
>> [...]
>> >  (define-public python2-llfuse
>> > -  (package-with-python2 python-llfuse))
>> > +  (package (inherit (package-with-python2
>> > +                 (strip-python2-variant python-llfuse)))
>> > +    (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
>> > +
>> > +;; For attic@0.16
>> > +(define-public python-llfuse@0.41
>> 
>> All our package variables use '-' to separate name and version.  I think
>> this is good choice and we shouldn't use '@' in variable names.
>
> Okay, I replaced all use of '@' with '-'.
>
> Is the '@' syntax is only meant to be used on the command line?

This syntax has appeared to solve some limitations in the command line
interface which was failing to properly match package names containing
numbers.

I think it is OK to use it elsewhere as long as it does not break
things.  However in the case of scheme variables, I think it is not a
good idea to use '@' because it could lead people into thinking that
there is a strong relation between typing ‘guix build foo@14’ and
defining a variable named ‘foo@14’.

-- 
Mathieu Lirzin

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

* Re: [PATCH 4/6] gnu: python-llfuse: Update to 1.0, keep 0.41 variant.
  2016-03-15 10:12       ` Mathieu Lirzin
@ 2016-03-15 16:25         ` Ludovic Courtès
  2016-03-21  2:49           ` Leo Famulari
  0 siblings, 1 reply; 25+ messages in thread
From: Ludovic Courtès @ 2016-03-15 16:25 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel, Alex Kost

Mathieu Lirzin <mthl@gnu.org> skribis:

> Leo Famulari <leo@famulari.name> writes:
>
>> On Tue, Mar 15, 2016 at 11:53:33AM +0300, Alex Kost wrote:
>>> Leo Famulari (2016-03-15 02:34 +0300) wrote:
>>> 
>>> [...]
>>> >  (define-public python2-llfuse
>>> > -  (package-with-python2 python-llfuse))
>>> > +  (package (inherit (package-with-python2
>>> > +                 (strip-python2-variant python-llfuse)))
>>> > +    (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
>>> > +
>>> > +;; For attic@0.16
>>> > +(define-public python-llfuse@0.41
>>> 
>>> All our package variables use '-' to separate name and version.  I think
>>> this is good choice and we shouldn't use '@' in variable names.
>>
>> Okay, I replaced all use of '@' with '-'.
>>
>> Is the '@' syntax is only meant to be used on the command line?
>
> This syntax has appeared to solve some limitations in the command line
> interface which was failing to properly match package names containing
> numbers.
>
> I think it is OK to use it elsewhere as long as it does not break
> things.  However in the case of scheme variables, I think it is not a
> good idea to use '@' because it could lead people into thinking that
> there is a strong relation between typing ‘guix build foo@14’ and
> defining a variable named ‘foo@14’.

Furthermore ‘@’ (at sign) has a special meaning in Guile (info "(guile)
Using Guile Modules"), so even though it’s currently valid within an
identifier, I’d suggest avoiding it.

Ludo’.

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

* Re: [PATCH 4/6] gnu: python-llfuse: Update to 1.0, keep 0.41 variant.
  2016-03-15 16:25         ` Ludovic Courtès
@ 2016-03-21  2:49           ` Leo Famulari
  2016-03-21  8:52             ` Alex Kost
  0 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-03-21  2:49 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Alex Kost

On Tue, Mar 15, 2016 at 05:25:58PM +0100, Ludovic Courtès wrote:
> Mathieu Lirzin <mthl@gnu.org> skribis:
> 
> > Leo Famulari <leo@famulari.name> writes:
> >
> >> On Tue, Mar 15, 2016 at 11:53:33AM +0300, Alex Kost wrote:
> >>> Leo Famulari (2016-03-15 02:34 +0300) wrote:
> >>> 
> >>> [...]
> >>> >  (define-public python2-llfuse
> >>> > -  (package-with-python2 python-llfuse))
> >>> > +  (package (inherit (package-with-python2
> >>> > +                 (strip-python2-variant python-llfuse)))
> >>> > +    (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
> >>> > +
> >>> > +;; For attic@0.16
> >>> > +(define-public python-llfuse@0.41
> >>> 
> >>> All our package variables use '-' to separate name and version.  I think
> >>> this is good choice and we shouldn't use '@' in variable names.
> >>
> >> Okay, I replaced all use of '@' with '-'.
> >>
> >> Is the '@' syntax is only meant to be used on the command line?
> >
> > This syntax has appeared to solve some limitations in the command line
> > interface which was failing to properly match package names containing
> > numbers.
> >
> > I think it is OK to use it elsewhere as long as it does not break
> > things.  However in the case of scheme variables, I think it is not a
> > good idea to use '@' because it could lead people into thinking that
> > there is a strong relation between typing ‘guix build foo@14’ and
> > defining a variable named ‘foo@14’.
> 
> Furthermore ‘@’ (at sign) has a special meaning in Guile (info "(guile)
> Using Guile Modules"), so even though it’s currently valid within an
> identifier, I’d suggest avoiding it.

Thanks for the explanation everybody!

I've made all the requested changes. Any more comments on this patch
series?

> 
> Ludo’.

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

* Re: [PATCH 4/6] gnu: python-llfuse: Update to 1.0, keep 0.41 variant.
  2016-03-21  2:49           ` Leo Famulari
@ 2016-03-21  8:52             ` Alex Kost
  0 siblings, 0 replies; 25+ messages in thread
From: Alex Kost @ 2016-03-21  8:52 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari (2016-03-21 05:49 +0300) wrote:

> On Tue, Mar 15, 2016 at 05:25:58PM +0100, Ludovic Courtès wrote:
[...]
>> Furthermore ‘@’ (at sign) has a special meaning in Guile (info "(guile)
>> Using Guile Modules"), so even though it’s currently valid within an
>> identifier, I’d suggest avoiding it.
>
> Thanks for the explanation everybody!
>
> I've made all the requested changes. Any more comments on this patch
> series?

I don't have more comments :-)

-- 
Alex

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

* Re: [PATCH 5/6] gnu: Add borg.
  2016-03-15  9:18     ` Leo Famulari
@ 2016-03-21 21:31       ` Leo Famulari
  2016-03-21 22:35         ` Leo Famulari
  0 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-03-21 21:31 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

On Tue, Mar 15, 2016 at 05:18:45AM -0400, Leo Famulari wrote:
> On Tue, Mar 15, 2016 at 12:11:15PM +0300, Alex Kost wrote:
> > Leo Famulari (2016-03-15 02:34 +0300) wrote:
> > > +       (modify-phases %standard-phases
> > > +         (add-before 'build 'set-openssl-prefix
> > > +           (lambda* (#:key inputs #:allow-other-keys)
> > > +             (setenv "BORG_OPENSSL_PREFIX" (assoc-ref inputs "openssl"))
> > > +             #t))
> > > +         (add-before 'build 'set-lz4-prefix
> > > +           (lambda* (#:key inputs #:allow-other-keys)
> > > +             (setenv "BORG_LZ4_PREFIX" (assoc-ref inputs "lz4"))
> > > +             #t))
> > 
> > Would it be better to make a single 'set-env' phase instead?  Or better
> > yet, are these '..._PREFIX' variables used for make command?  If so,
> > they should be specified in #:make-flags argument.
> 
> Thank you, that makes the recipe shorter and clearer.

I didn't test the change before replying ;)

There is no #:make-flags for the python-build-system, so I have used a
single set-env phase instead.

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

* Re: [PATCH 5/6] gnu: Add borg.
  2016-03-21 21:31       ` Leo Famulari
@ 2016-03-21 22:35         ` Leo Famulari
  2016-03-21 22:52           ` Leo Famulari
  0 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-03-21 22:35 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

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

On Mon, Mar 21, 2016 at 05:31:15PM -0400, Leo Famulari wrote:
> On Tue, Mar 15, 2016 at 05:18:45AM -0400, Leo Famulari wrote:
> > On Tue, Mar 15, 2016 at 12:11:15PM +0300, Alex Kost wrote:
> > > Leo Famulari (2016-03-15 02:34 +0300) wrote:
> > > > +       (modify-phases %standard-phases
> > > > +         (add-before 'build 'set-openssl-prefix
> > > > +           (lambda* (#:key inputs #:allow-other-keys)
> > > > +             (setenv "BORG_OPENSSL_PREFIX" (assoc-ref inputs "openssl"))
> > > > +             #t))
> > > > +         (add-before 'build 'set-lz4-prefix
> > > > +           (lambda* (#:key inputs #:allow-other-keys)
> > > > +             (setenv "BORG_LZ4_PREFIX" (assoc-ref inputs "lz4"))
> > > > +             #t))
> > > 
> > > Would it be better to make a single 'set-env' phase instead?  Or better
> > > yet, are these '..._PREFIX' variables used for make command?  If so,
> > > they should be specified in #:make-flags argument.
> > 
> > Thank you, that makes the recipe shorter and clearer.
> 
> I didn't test the change before replying ;)
> 
> There is no #:make-flags for the python-build-system, so I have used a
> single set-env phase instead.

I asked upstream about some warnings during the docs generation, and
they pointed out that I needed to add a command line. I've attached a
revised patch.

Can I get some feedback on it?

[-- Attachment #2: 0005-gnu-Add-borg.patch --]
[-- Type: text/x-diff, Size: 3667 bytes --]

From f5e9039a6d161d8b834b33a660e865d043627684 Mon Sep 17 00:00:00 2001
Message-Id: <f5e9039a6d161d8b834b33a660e865d043627684.1458599643.git.leo@famulari.name>
In-Reply-To: <90ce1642eb4e527227b4c2bce25dcf25b484e22f.1458599643.git.leo@famulari.name>
References: <90ce1642eb4e527227b4c2bce25dcf25b484e22f.1458599643.git.leo@famulari.name>
From: Leo Famulari <leo@famulari.name>
Date: Mon, 14 Mar 2016 19:34:25 -0400
Subject: [PATCH 5/6] gnu: Add borg.

* gnu/packages/backup.scm (borg): New variable.
---
 gnu/packages/backup.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 53 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 4a69b7a..d5c304b 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
-;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -406,3 +406,55 @@ compression, and more.  The library itself implements storage techniques such
 as content-addressable storage, content hash keys, Merkle trees, similarity
 detection, and lossless compression.")
     (license license:gpl3+)))
+
+(define-public borg
+  (package
+    (name "borg")
+    (version "1.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "borgbackup" version))
+              (sha256
+               (base32
+                "0wa6cvqs3rni5nwrgagigchcly8a53rxk56z0zn8iaii2cqrw2sh"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'set-env
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((openssl (assoc-ref inputs "openssl"))
+                   (lz4 (assoc-ref inputs "lz4")))
+               (setenv "BORG_OPENSSL_PREFIX" openssl)
+               (setenv "BORG_LZ4_PREFIX" lz4)
+               (setenv "PYTHON_EGG_CACHE" "/tmp")
+             #t)))
+         (add-after 'install 'docs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (man (string-append out "/share/man/man1")))
+               (and
+                 (zero? (system* "python3" "setup.py" "build_ext" "--inplace"))
+                 (zero? (system* "make" "-C" "docs" "man"))
+                 (install-file "docs/_build/man/borg.1" man)))
+             #t)))))
+    (native-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)
+       ;; For generating the documentation.
+       ("python-sphinx" ,python-sphinx)
+       ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
+    (inputs
+     `(("acl" ,acl)
+       ("lz4" ,lz4)
+       ("openssl" ,openssl)
+       ("python-llfuse" ,python-llfuse)
+       ("python-msgpack" ,python-msgpack)))
+    (synopsis "Deduplicated, encrypted, authenticated and compressed backups")
+    (description "Borg is a deduplicating backup program.  Optionally, it
+supports compression and authenticated encryption.  The main goal of Borg is to
+provide an efficient and secure way to backup data.  The data deduplication
+technique used makes Borg suitable for daily backups since only changes are
+stored.  The authenticated encryption technique makes it suitable for backups
+to not fully trusted targets.  Borg is a fork of Attic.")
+    (home-page "https://borgbackup.github.io/borgbackup/")
+    (license license:bsd-3)))
-- 
2.7.3


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

* Re: [PATCH 5/6] gnu: Add borg.
  2016-03-21 22:35         ` Leo Famulari
@ 2016-03-21 22:52           ` Leo Famulari
  2016-03-22 20:20             ` Alex Kost
  0 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-03-21 22:52 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

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

On Mon, Mar 21, 2016 at 06:35:19PM -0400, Leo Famulari wrote:
> I asked upstream about some warnings during the docs generation, and
> they pointed out that I needed to add a command line. I've attached a
> revised patch.
> 
> Can I get some feedback on it?

Based on feedback on #guix, I've revised it again. Attached...

[-- Attachment #2: 0005-gnu-Add-borg.patch --]
[-- Type: text/x-diff, Size: 3701 bytes --]

From 5e43672e45e6b9bbe7c0ed0d954a44285e55b173 Mon Sep 17 00:00:00 2001
Message-Id: <5e43672e45e6b9bbe7c0ed0d954a44285e55b173.1458600724.git.leo@famulari.name>
In-Reply-To: <90ce1642eb4e527227b4c2bce25dcf25b484e22f.1458600724.git.leo@famulari.name>
References: <90ce1642eb4e527227b4c2bce25dcf25b484e22f.1458600724.git.leo@famulari.name>
From: Leo Famulari <leo@famulari.name>
Date: Mon, 14 Mar 2016 19:34:25 -0400
Subject: [PATCH 5/6] gnu: Add borg.

* gnu/packages/backup.scm (borg): New variable.
---
 gnu/packages/backup.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 54 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 4a69b7a..0993c76 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
-;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -406,3 +406,56 @@ compression, and more.  The library itself implements storage techniques such
 as content-addressable storage, content hash keys, Merkle trees, similarity
 detection, and lossless compression.")
     (license license:gpl3+)))
+
+(define-public borg
+  (package
+    (name "borg")
+    (version "1.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "borgbackup" version))
+              (sha256
+               (base32
+                "0wa6cvqs3rni5nwrgagigchcly8a53rxk56z0zn8iaii2cqrw2sh"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'set-env
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((openssl (assoc-ref inputs "openssl"))
+                   (lz4 (assoc-ref inputs "lz4")))
+               (setenv "BORG_OPENSSL_PREFIX" openssl)
+               (setenv "BORG_LZ4_PREFIX" lz4)
+               (setenv "PYTHON_EGG_CACHE" "/tmp")
+             #t)))
+         (add-after 'install 'docs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (man (string-append out "/share/man/man1")))
+               (and
+                 (zero? (system* "python3" "setup.py" "build_ext" "--inplace"))
+                 (zero? (system* "make" "-C" "docs" "man"))
+                 (begin
+                   (install-file "docs/_build/man/borg.1" man)
+                   #t))))))))
+    (native-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)
+       ;; For generating the documentation.
+       ("python-sphinx" ,python-sphinx)
+       ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
+    (inputs
+     `(("acl" ,acl)
+       ("lz4" ,lz4)
+       ("openssl" ,openssl)
+       ("python-llfuse" ,python-llfuse)
+       ("python-msgpack" ,python-msgpack)))
+    (synopsis "Deduplicated, encrypted, authenticated and compressed backups")
+    (description "Borg is a deduplicating backup program.  Optionally, it
+supports compression and authenticated encryption.  The main goal of Borg is to
+provide an efficient and secure way to backup data.  The data deduplication
+technique used makes Borg suitable for daily backups since only changes are
+stored.  The authenticated encryption technique makes it suitable for backups
+to not fully trusted targets.  Borg is a fork of Attic.")
+    (home-page "https://borgbackup.github.io/borgbackup/")
+    (license license:bsd-3)))
-- 
2.7.3


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

* Re: [PATCH 5/6] gnu: Add borg.
  2016-03-21 22:52           ` Leo Famulari
@ 2016-03-22 20:20             ` Alex Kost
  2016-03-22 21:25               ` Leo Famulari
  0 siblings, 1 reply; 25+ messages in thread
From: Alex Kost @ 2016-03-22 20:20 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari (2016-03-22 01:52 +0300) wrote:

> On Mon, Mar 21, 2016 at 06:35:19PM -0400, Leo Famulari wrote:
>> I asked upstream about some warnings during the docs generation, and
>> they pointed out that I needed to add a command line. I've attached a
>> revised patch.
>>
>> Can I get some feedback on it?
>
> Based on feedback on #guix, I've revised it again. Attached...

> From: Leo Famulari <leo@famulari.name>
> Date: Mon, 14 Mar 2016 19:34:25 -0400
> Subject: [PATCH 5/6] gnu: Add borg.
>
> * gnu/packages/backup.scm (borg): New variable.

[...]
> +(define-public borg
> +  (package
> +    (name "borg")
> +    (version "1.0.0")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "borgbackup" version))
> +              (sha256
> +               (base32
> +                "0wa6cvqs3rni5nwrgagigchcly8a53rxk56z0zn8iaii2cqrw2sh"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'set-env
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (let ((openssl (assoc-ref inputs "openssl"))
> +                   (lz4 (assoc-ref inputs "lz4")))
> +               (setenv "BORG_OPENSSL_PREFIX" openssl)
> +               (setenv "BORG_LZ4_PREFIX" lz4)
> +               (setenv "PYTHON_EGG_CACHE" "/tmp")
> +             #t)))

If you keep #t inside 'let', then align it to (setenv ...), or move it
away from 'let':

           (lambda* (#:key inputs #:allow-other-keys)
             (let ((openssl (assoc-ref inputs "openssl"))
                   (lz4     (assoc-ref inputs "lz4")))
               (setenv "BORG_OPENSSL_PREFIX" openssl)
               (setenv "BORG_LZ4_PREFIX" lz4)
               (setenv "PYTHON_EGG_CACHE" "/tmp"))
             #t)

Note the difference: another ')' after the last (setenv ...).

> +         (add-after 'install 'docs

Perhaps it is better to call this phase 'install-doc'.  It's a usual
name that can be met in other recipes.  There is also
'install-man-pages' phase name, but I prefer 'install-doc'.

The rest looks good to me, so if you checked that this program works, I
think you can push this patchset.

-- 
Alex

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

* Re: [PATCH 5/6] gnu: Add borg.
  2016-03-22 20:20             ` Alex Kost
@ 2016-03-22 21:25               ` Leo Famulari
  2016-03-23  8:14                 ` Alex Kost
  0 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-03-22 21:25 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

On Tue, Mar 22, 2016 at 11:20:37PM +0300, Alex Kost wrote:
> Leo Famulari (2016-03-22 01:52 +0300) wrote:
> 
> > On Mon, Mar 21, 2016 at 06:35:19PM -0400, Leo Famulari wrote:
> >> I asked upstream about some warnings during the docs generation, and
> >> they pointed out that I needed to add a command line. I've attached a
> >> revised patch.
> >>
> >> Can I get some feedback on it?
> >
> > Based on feedback on #guix, I've revised it again. Attached...
> 
> > From: Leo Famulari <leo@famulari.name>
> > Date: Mon, 14 Mar 2016 19:34:25 -0400
> > Subject: [PATCH 5/6] gnu: Add borg.
> >
> > * gnu/packages/backup.scm (borg): New variable.
> 
> [...]
> > +(define-public borg
> > +  (package
> > +    (name "borg")
> > +    (version "1.0.0")
> > +    (source (origin
> > +              (method url-fetch)
> > +              (uri (pypi-uri "borgbackup" version))
> > +              (sha256
> > +               (base32
> > +                "0wa6cvqs3rni5nwrgagigchcly8a53rxk56z0zn8iaii2cqrw2sh"))))
> > +    (build-system python-build-system)
> > +    (arguments
> > +     `(#:phases
> > +       (modify-phases %standard-phases
> > +         (add-after 'unpack 'set-env
> > +           (lambda* (#:key inputs #:allow-other-keys)
> > +             (let ((openssl (assoc-ref inputs "openssl"))
> > +                   (lz4 (assoc-ref inputs "lz4")))
> > +               (setenv "BORG_OPENSSL_PREFIX" openssl)
> > +               (setenv "BORG_LZ4_PREFIX" lz4)
> > +               (setenv "PYTHON_EGG_CACHE" "/tmp")
> > +             #t)))
> 
> If you keep #t inside 'let', then align it to (setenv ...), or move it
> away from 'let':
> 
>            (lambda* (#:key inputs #:allow-other-keys)
>              (let ((openssl (assoc-ref inputs "openssl"))
>                    (lz4     (assoc-ref inputs "lz4")))
>                (setenv "BORG_OPENSSL_PREFIX" openssl)
>                (setenv "BORG_LZ4_PREFIX" lz4)
>                (setenv "PYTHON_EGG_CACHE" "/tmp"))
>              #t)
> 
> Note the difference: another ')' after the last (setenv ...).
> 
> > +         (add-after 'install 'docs
> 
> Perhaps it is better to call this phase 'install-doc'.  It's a usual
> name that can be met in other recipes.  There is also
> 'install-man-pages' phase name, but I prefer 'install-doc'.

Sure, I'll take your advice!

> 
> The rest looks good to me, so if you checked that this program works, I
> think you can push this patchset.

I've been using this program for a few months without problems (yes, I
do restore from time to time).

It's being developed very rapidly for something so critical as a backup
program, so I think that it's still a bit experimental. I could allude
to that in the description. What do you think?

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

* Re: [PATCH 5/6] gnu: Add borg.
  2016-03-22 21:25               ` Leo Famulari
@ 2016-03-23  8:14                 ` Alex Kost
  2016-03-23 20:49                   ` Efraim Flashner
  0 siblings, 1 reply; 25+ messages in thread
From: Alex Kost @ 2016-03-23  8:14 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari (2016-03-23 00:25 +0300) wrote:

> On Tue, Mar 22, 2016 at 11:20:37PM +0300, Alex Kost wrote:
[...]
>> The rest looks good to me, so if you checked that this program works, I
>> think you can push this patchset.
>
> I've been using this program for a few months without problems (yes, I
> do restore from time to time).
>
> It's being developed very rapidly for something so critical as a backup
> program, so I think that it's still a bit experimental. I could allude
> to that in the description. What do you think?

I don't know :-)  Do what seems appropriate to you, I think it will be
OK in any case.

-- 
Alex

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

* Re: [PATCH 5/6] gnu: Add borg.
  2016-03-23  8:14                 ` Alex Kost
@ 2016-03-23 20:49                   ` Efraim Flashner
  0 siblings, 0 replies; 25+ messages in thread
From: Efraim Flashner @ 2016-03-23 20:49 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

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

On Wed, Mar 23, 2016 at 11:14:24AM +0300, Alex Kost wrote:
> Leo Famulari (2016-03-23 00:25 +0300) wrote:
> 
> > On Tue, Mar 22, 2016 at 11:20:37PM +0300, Alex Kost wrote:
> [...]
> >> The rest looks good to me, so if you checked that this program works, I
> >> think you can push this patchset.
> >
> > I've been using this program for a few months without problems (yes, I
> > do restore from time to time).
> >
> > It's being developed very rapidly for something so critical as a backup
> > program, so I think that it's still a bit experimental. I could allude
> > to that in the description. What do you think?
> 
> I don't know :-)  Do what seems appropriate to you, I think it will be
> OK in any case.
> 

I've been using attic for about 2 months. I checked the github and it
looks like they've recently hit their 1.0.0 release, and they've
commited to keeping API-compatability to at least 2.0. If their software
is as widely used and developed upon as they say it is, their own
developer-users won't likely break their own backup chain
easily/lightly.

-- 
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: 819 bytes --]

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

* Re: [PATCH 0/6] Add borg
  2016-03-14 23:34 [PATCH 0/6] Add borg Leo Famulari
                   ` (5 preceding siblings ...)
  2016-03-14 23:34 ` [PATCH 6/6] gnu: python-llfuse@0.41: Update to 0.41.1 Leo Famulari
@ 2016-03-24 21:55 ` Leo Famulari
  6 siblings, 0 replies; 25+ messages in thread
From: Leo Famulari @ 2016-03-24 21:55 UTC (permalink / raw)
  To: guix-devel

On Mon, Mar 14, 2016 at 07:34:20PM -0400, Leo Famulari wrote:
> These patches add the borg backup program [0], which is a more actively
> developed fork of attic [1].

Applied, with changes, as 229b36617a

> 
> Borg is compatible with the current version of python-llfuse (1.0), but
> this required changes in borg [2]. Since attic has not had any updates
> since borg was forked, I think it's reasonable to guess that attic still
> requires python-llfuse@0.41. So, this patch set updates llfuse while
> keeping the old version around.
> 
> These patches also update python-msgpack and clean up its python-2
> variant.
> 
> [0]
> http://borgbackup.readthedocs.org/en/latest/
> 
> [1]
> https://attic-backup.org/
> 
> [2]
> https://github.com/borgbackup/borg/commit/dbec05ab73b30f655021118e62bc94c547870472
> 
> Leo Famulari (6):
>   gnu: python-msgpack: Update to 0.4.7.
>   gnu: python-msgpack: Use 'python2-variant'.
>   gnu: attic: Specify dependency on python-llfuse@0.41.
>   gnu: python-llfuse: Update to 1.0, keep 0.41 variant.
>   gnu: Add borg.
>   gnu: python-llfuse@0.41: Update to 0.41.1.
> 
>  gnu/packages/backup.scm | 65 ++++++++++++++++++++++++++++++++++++++++++++++---
>  gnu/packages/python.scm | 48 +++++++++++++++++++++++++-----------
>  2 files changed, 96 insertions(+), 17 deletions(-)
> 
> -- 
> 2.6.3
> 
> 

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

end of thread, other threads:[~2016-03-24 21:55 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-14 23:34 [PATCH 0/6] Add borg Leo Famulari
2016-03-14 23:34 ` [PATCH 1/6] gnu: python-msgpack: Update to 0.4.7 Leo Famulari
2016-03-14 23:34 ` [PATCH 2/6] gnu: python-msgpack: Use 'python2-variant' Leo Famulari
2016-03-14 23:34 ` [PATCH 3/6] gnu: attic: Specify dependency on python-llfuse@0.41 Leo Famulari
2016-03-15  8:58   ` Alex Kost
2016-03-15  9:13     ` Leo Famulari
2016-03-14 23:34 ` [PATCH 4/6] gnu: python-llfuse: Update to 1.0, keep 0.41 variant Leo Famulari
2016-03-15  8:53   ` Alex Kost
2016-03-15  9:13     ` Leo Famulari
2016-03-15 10:12       ` Mathieu Lirzin
2016-03-15 16:25         ` Ludovic Courtès
2016-03-21  2:49           ` Leo Famulari
2016-03-21  8:52             ` Alex Kost
2016-03-14 23:34 ` [PATCH 5/6] gnu: Add borg Leo Famulari
2016-03-15  9:11   ` Alex Kost
2016-03-15  9:18     ` Leo Famulari
2016-03-21 21:31       ` Leo Famulari
2016-03-21 22:35         ` Leo Famulari
2016-03-21 22:52           ` Leo Famulari
2016-03-22 20:20             ` Alex Kost
2016-03-22 21:25               ` Leo Famulari
2016-03-23  8:14                 ` Alex Kost
2016-03-23 20:49                   ` Efraim Flashner
2016-03-14 23:34 ` [PATCH 6/6] gnu: python-llfuse@0.41: Update to 0.41.1 Leo Famulari
2016-03-24 21:55 ` [PATCH 0/6] Add borg Leo Famulari

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.