librelist archives

« back to archive

[PATCH 0/1] Borg 0.25 packaged for Guix

[PATCH 0/1] Borg 0.25 packaged for Guix

From:
Leo Famulari
Date:
2015-09-18 @ 01:12
Hi,

This is a package definition of Borg 0.25 for the Guix package manager [1].

I have not submitted this patch to Guix yet because I am wary of including a
rapidly changing backup program into an operating system's official
repositories.  I appreciate the motivations for forking from Attic and I look
forward to the improvements being developed in Borg but in the meantime I
prefer my backup system to be rather boring. However, I am not sure if Borg is
actually unstable or not. I would like some advice on this matter.

Nevertheless, I have found Guix to be a great way to install and manage
software on my systems. It offers a lot of improvements to established package
managers like apt and yum. It also provides a much-needed replacement for the 
dismal experience of language-specific package managers. I have been watching
Borg's progress from afar because I am not interested in installing, learning,
and maintaining another package manager just for Python programs.

This package is not yet included in the official Guix repos, but if you are
using Guix and have a working development environment, you can apply the patch
like so from the root of your Guix source tree:
$ patch -p1 < 0001-gnu-Add-Borg-backup-program.patch

Then, you can install it for testing and use. Please note that this might
involve building lz4 from source, and that will take a while due to lz4's test
suite.
$ guix environment guix
$ ./pre-inst-env guix package --install borg

Now that I have this package definition, I can start testing different versions
of Borg easily.

I hope that some will find this patch useful, and also that some will have a
nice introduction to Guix.

[1] http://www.gnu.org/software/guix/
Guix is a package manager (and operating system called GuixSD) based on the Nix 
package manager. It uses Guile Scheme instead of the Nix DSL and is focused on
free software. You can run it on top of another Linux distribution without
conflicting or interacting with that distribution's package management.

Leo Famulari (1):
  gnu: Add Borg backup program.

 gnu/packages/backup.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

-- 
2.4.3

[PATCH 1/1] gnu: Add Borg backup program.

From:
Leo Famulari
Date:
2015-09-18 @ 01:12
* gnu/packages/backup.scm (borg): New variable.
---
 gnu/packages/backup.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 84d27c0..5363bef 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -352,3 +352,40 @@ deduplication technique used makes Attic suitable for
daily backups since only
 changes are stored.")
     (home-page "https://attic-backup.org/")
     (license license:bsd-3)))
+
+(define-public borg
+  (package
+    (name "borg")
+    (version "0.25.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://pypi.python.org/packages/source/b/borgbackup/"
+                    "borgbackup-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1q5dbrya6bwbbmhyg0yxj81h1frsbjdwqml3s8n30ff4f0z5p77q"))))
+    (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)))))
+    (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.")
+    (home-page "https://borgbackup.github.io/borgbackup/")
+    (license license:bsd-3)))
-- 
2.4.3

Re: [borgbackup] [PATCH 0/1] Borg 0.25 packaged for Guix

From:
Leo Famulari
Date:
2015-09-18 @ 01:32
One more thing that I forgot to mention: this package definition does
not run
the tests. I need to fix that, especially because I get intermittent
FUSE errors
with `borg mount`. And when those errors happen, I can reproduce them
with
`attic mount`.

On Thu, Sep 17, 2015, at 21:12, Leo Famulari wrote:
> Hi,
> 
> This is a package definition of Borg 0.25 for the Guix package manager
> [1].
> 
> I have not submitted this patch to Guix yet because I am wary of
> including a
> rapidly changing backup program into an operating system's official
> repositories.  I appreciate the motivations for forking from Attic and I
> look
> forward to the improvements being developed in Borg but in the meantime I
> prefer my backup system to be rather boring. However, I am not sure if
> Borg is
> actually unstable or not. I would like some advice on this matter.
> 
> Nevertheless, I have found Guix to be a great way to install and manage
> software on my systems. It offers a lot of improvements to established
> package
> managers like apt and yum. It also provides a much-needed replacement for
> the 
> dismal experience of language-specific package managers. I have been
> watching
> Borg's progress from afar because I am not interested in installing,
> learning,
> and maintaining another package manager just for Python programs.
> 
> This package is not yet included in the official Guix repos, but if you
> are
> using Guix and have a working development environment, you can apply the
> patch
> like so from the root of your Guix source tree:
> $ patch -p1 < 0001-gnu-Add-Borg-backup-program.patch
> 
> Then, you can install it for testing and use. Please note that this might
> involve building lz4 from source, and that will take a while due to lz4's
> test
> suite.
> $ guix environment guix
> $ ./pre-inst-env guix package --install borg
> 
> Now that I have this package definition, I can start testing different
> versions
> of Borg easily.
> 
> I hope that some will find this patch useful, and also that some will
> have a
> nice introduction to Guix.
> 
> [1] http://www.gnu.org/software/guix/
> Guix is a package manager (and operating system called GuixSD) based on
> the Nix 
> package manager. It uses Guile Scheme instead of the Nix DSL and is
> focused on
> free software. You can run it on top of another Linux distribution
> without
> conflicting or interacting with that distribution's package management.
> 
> Leo Famulari (1):
>   gnu: Add Borg backup program.
> 
>  gnu/packages/backup.scm | 37 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
> 
> -- 
> 2.4.3
>