gnu: sway: Update to 1.4
[jackhill/guix/guix.git] / gnu / packages / backup.scm
index 6c1d712..6a5080b 100644 (file)
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
-;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2019 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,6 +38,7 @@
   #:use-module (guix git-download)
   #:use-module (guix download)
   #:use-module (guix utils)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system python)
@@ -63,6 +66,7 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
@@ -91,6 +95,7 @@
        ("par2cmdline" ,par2cmdline)
        ("python-pexpect" ,python2-pexpect)
        ("python-fasteners" ,python2-fasteners)
+       ("tzdata" ,tzdata-for-tests)
        ("mock" ,python2-mock)))
     (propagated-inputs
      `(("lockfile" ,python2-lockfile)
      `(("librsync" ,librsync-0.9)
        ("lftp" ,lftp)
        ("gnupg" ,gnupg)                 ; gpg executable needed
-       ("util-linux" ,util-linux)       ; for setsid
-       ("tzdata" ,tzdata)))
+       ("util-linux" ,util-linux)))     ; for setsid
     (arguments
      `(#:python ,python-2               ; setup assumes Python 2
        #:test-target "test"
@@ -200,18 +204,18 @@ backups (called chunks) to allow easy burning to CD/DVD.")
 (define-public libarchive
   (package
     (name "libarchive")
-    (version "3.4.0")
+    (version "3.4.2")
     (source
      (origin
        (method url-fetch)
        (uri (list (string-append "https://libarchive.org/downloads/libarchive-"
-                                 version ".tar.gz")
+                                 version ".tar.xz")
                   (string-append "https://github.com/libarchive/libarchive"
                                  "/releases/download/v" version "/libarchive-"
-                                 version ".tar.gz")))
+                                 version ".tar.xz")))
        (sha256
         (base32
-         "0pl25mmz1b1cnwf35kxmygyy9g7z7hslxbx329a9yx8csh7dahw6"))))
+         "18dd01ahs2hv74xm7axjc3yhq839p0x0s4vssvlmm8fknja09qfq"))))
     (build-system gnu-build-system)
     (inputs
      `(("bzip2" ,bzip2)
@@ -231,24 +235,34 @@ backups (called chunks) to allow easy burning to CD/DVD.")
                (("/bin/pwd") (which "pwd")))
              #t))
          (replace 'check
-           (lambda _
-             ;; XXX: The test_owner_parse, test_read_disk, and
-             ;; test_write_disk_lookup tests expect user 'root' to exist, but
-             ;; the chroot's /etc/passwd doesn't have it.  Turn off those tests.
-             ;;
-             ;; XXX: Adjust test that fails with zstd 1.4.1 because the default
-             ;; options compresses two bytes better than this test expects.
-             ;; https://github.com/libarchive/libarchive/issues/1226
-             (substitute* "libarchive/test/test_write_filter_zstd.c"
-               (("compression-level\", \"6\"")
-                "compression-level\", \"7\""))
-
-             ;; The tests allow one to disable tests matching a globbing pattern.
-             (invoke "make" "libarchive_test" "bsdcpio_test" "bsdtar_test")
-             ;; XXX: This glob disables too much.
-             (invoke "./libarchive_test" "^test_*_disk*")
-             (invoke "./bsdcpio_test" "^test_owner_parse")
-             (invoke "./bsdtar_test")))
+           (lambda* (#:key (tests? #t) #:allow-other-keys)
+             (if tests?
+                ;; XXX: The test_owner_parse, test_read_disk, and
+                ;; test_write_disk_lookup tests expect user 'root' to
+                ;; exist, but the chroot's /etc/passwd doesn't have
+                ;; it.  Turn off those tests.
+                ;;
+                ;; XXX: Adjust test that fails with zstd 1.4.1
+                ;; because the default options compresses two bytes
+                ;; better than this test expects.
+                ;; https://github.com/libarchive/libarchive/issues/1226
+                 (begin
+                   (substitute* "libarchive/test/test_write_filter_zstd.c"
+                    (("compression-level\", \"6\"")
+                     "compression-level\", \"7\""))
+
+                  ;; The tests allow one to disable tests matching a globbing pattern.
+                  (invoke "make"
+                          "libarchive_test"
+                          "bsdcpio_test"
+                          "bsdtar_test")
+
+                  ;; XXX: This glob disables too much.
+                  (invoke "./libarchive_test" "^test_*_disk*")
+                  (invoke "./bsdcpio_test" "^test_owner_parse")
+                  (invoke "./bsdtar_test"))
+                 ;; Tests may be disabled if cross-compiling.
+                 (format #t "Test suite not run.~%"))))
          (add-after 'install 'add--L-in-libarchive-pc
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out     (assoc-ref outputs "out"))
@@ -976,17 +990,53 @@ precious backup space.
 @end itemize")
     (license license:bsd-2)))
 
+(define-public zbackup
+  (package
+    (name "zbackup")
+    (version "1.4.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/zbackup/zbackup.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "14l1kyxg7pccpax3d6qcpmdycb70kn3fxp1a59w64hqy2493hngl"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f))                    ;no test
+    (inputs
+     `(("lzo" ,lzo)
+       ("libressl" ,libressl)
+       ("protobuf" ,protobuf)
+       ("xz" ,xz)
+       ("zlib" ,zlib)))
+    (home-page "http://zbackup.org")
+    (synopsis "Versatile deduplicating backup tool")
+    (description
+     "ZBackup is a globally-deduplicating backup tool, based on the
+ideas found in Rsync.  Feed a large @file{.tar} into it, and it will
+store duplicate regions of it only once, then compress and optionally
+encrypt the result.  Feed another @file{.tar} file, and it will also
+re-use any data found in any previous backups.  This way only new
+changes are stored, and as long as the files are not very different,
+the amount of storage required is very low.  Any of the backup files
+stored previously can be read back in full at any time.  The program
+is format-agnostic, so you can feed virtually any files to it.")
+    (license license:gpl2+)))
+
 (define-public burp
   (package
     (name "burp")
-    (version "2.3.20")
+    (version "2.3.24")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/burp/burp-" version
                                   "/burp-" version ".tar.bz2"))
               (sha256
                (base32
-                "0dm2y76z7pg17kfv6ahmh4mf2r3pg7mlwd69lvmjwssnd9vs1nn5"))))
+                "0dmahqx8ldqdrx9b47r7ag3m801n7h3kclcqja1cc1jzhfhfq27w"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases