X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/fb9a23a3f3ad3d7b5b7f03b2007baf27684d6bbd..b06d5f54c9e3f6f8d416155541a053eb96c0ba23:/gnu/packages/backup.scm diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index b7ca8e171e..6a5080bcf8 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2014, 2015 Eric Bavier ;;; Copyright © 2014 Ian Denhardt ;;; Copyright © 2015, 2016, 2017 Leo Famulari -;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2017 Arun Isaac ;;; Copyright © 2017 Kei Kebreau @@ -11,8 +11,11 @@ ;;; Copyright © 2017 Rutger Helling ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2018 Oleg Pykhalov -;;; Copyright © 2018, 2019 Ricardo Wurmus +;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus ;;; Copyright © 2019 Alex Vong +;;; Copyright © 2019 Marius Bakke +;;; Copyright © 2019 Mathieu Othacehe +;;; Copyright © 2020 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. ;;; @@ -35,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) @@ -58,9 +62,11 @@ #:use-module (gnu packages linux) #:use-module (gnu packages mcrypt) #:use-module (gnu packages nettle) + #:use-module (gnu packages onc-rpc) #: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) @@ -89,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) @@ -97,8 +104,7 @@ `(("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" @@ -185,7 +191,8 @@ can even repair them.") `(#:configure-flags `(,(string-append "--sbindir=" (assoc-ref %outputs "out") "/bin")) #:tests? #f)) - (home-page "http://archive.miek.nl/projects/hdup/index.html") + (home-page (string-append "http://web.archive.org/web/20150925223424/" + "http://archive.miek.nl/projects/hdup/index.html")) (synopsis "Simple incremental backup tool") (description "Hdup2 is a backup utility, its aim is to make backup really simple. The @@ -197,28 +204,30 @@ 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 - `(("zlib" ,zlib) - ("nettle" ,nettle) - ("lzo" ,lzo) - ("bzip2" ,bzip2) + `(("bzip2" ,bzip2) ("libxml2" ,libxml2) - ("xz" ,xz))) + ("lzo" ,lzo) + ("nettle" ,nettle) + ("xz" ,xz) + ("zlib" ,zlib) + ("zstd" ,zstd "lib"))) (arguments - `(#:phases + `(#:configure-flags '("--disable-static") + #:phases (modify-phases %standard-phases (add-before 'build 'patch-pwd (lambda _ @@ -226,17 +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. - ;; - ;; 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")) @@ -245,8 +271,11 @@ backups (called chunks) to allow easy burning to CD/DVD.") (libxml2 (assoc-ref inputs "libxml2")) (xz (assoc-ref inputs "xz")) (zlib (assoc-ref inputs "zlib")) + (zstd (assoc-ref inputs "zstd")) (bzip2 (assoc-ref inputs "bzip2"))) - (substitute* (string-append lib "/pkgconfig/libarchive.pc") + ;; Embed absolute references to these inputs to avoid propagation. + (substitute* (list (string-append lib "/pkgconfig/libarchive.pc") + (string-append lib "/libarchive.la")) (("-lnettle") (string-append "-L" nettle "/lib -lnettle")) (("-lxml2") @@ -255,6 +284,8 @@ backups (called chunks) to allow easy burning to CD/DVD.") (string-append "-L" xz "/lib -llzma")) (("-lz") (string-append "-L" zlib "/lib -lz")) + (("-lzstd") + (string-append "-L" zstd "/lib -lzstd")) (("-lbz2") (string-append "-L" bzip2 "/lib -lbz2"))) #t)))))) @@ -276,13 +307,13 @@ random access nor for in-place modification.") (version "1.1.15") (source (origin - (method url-fetch) - (file-name (string-append name "-" version ".tar.gz")) - (uri (string-append "https://github.com/miekg/rdup/archive/" - version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/miekg/rdup.git") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 - "1jr91hgcf0rrpanqlwws72ql9db6d6grs2i122ki1s4bx0vqqyvq")))) + (base32 "0bzyv6qmnivxnv9nw7lnfn46k0m1dlxcjj53zcva6v8y8084l1iw")))) (build-system gnu-build-system) (native-inputs `(("autoconf" ,autoconf) @@ -292,11 +323,14 @@ random access nor for in-place modification.") ;; For tests. ("dejagnu" ,dejagnu))) (inputs + ;; XXX Compiling with nettle (encryption) support requires patching out + ;; -Werror from GNUmakefile.in. Then, rdup-tr-{en,de}crypt tests fail: + ;; free(): invalid pointer + ;; ** rdup-tr: SIGPIPE received, exiting `(("glib" ,glib) ("pcre" ,pcre) ("libarchive" ,libarchive) - ("mcrypt" ,mcrypt) - ("nettle" ,nettle))) + ("mcrypt" ,mcrypt))) (arguments `(#:parallel-build? #f ;race conditions #:phases @@ -312,6 +346,13 @@ random access nor for in-place modification.") ;; Avoid frivolous dependency on ‘which’ with a shell builtin. (("which") "command -v")) #t)) + (add-before 'check 'disable-encryption-tests + (lambda _ + (for-each delete-file + (list "testsuite/rdup/rdup.rdup-tr-crypt.exp" + "testsuite/rdup/rdup.rdup-tr-decrypt.exp" + "testsuite/rdup/rdup.rdup-tr-encrypt.exp")) + #t)) (add-before 'check 'pre-check (lambda _ (setenv "HOME" (getcwd)) @@ -397,7 +438,7 @@ rdiff-backup is easy to use and settings have sensible defaults.") (define-public rsnapshot (package (name "rsnapshot") - (version "1.4.2") + (version "1.4.3") (source (origin (method url-fetch) @@ -405,8 +446,7 @@ rdiff-backup is easy to use and settings have sensible defaults.") "https://github.com/rsnapshot/rsnapshot/releases/download/" version "/rsnapshot-" version ".tar.gz")) (sha256 - (base32 - "05jfy99a0xs6lvsjfp3wz21z0myqhmwl2grn3jr9clijbg282ah4")))) + (base32 "1lavqmmsf53pim0nvming7fkng6p0nk2a51k2c2jdq0l7snpl31b")))) (build-system gnu-build-system) (arguments `(#:phases @@ -418,11 +458,15 @@ rdiff-backup is easy to use and settings have sensible defaults.") "t/backup_exec/conf/backup_exec.conf") (("/bin/true") (which "true")) (("/bin/false") (which "false"))) + + ;; Disable a test that tries to connect to localhost on port 22. + (delete-file "t/ssh_args/ssh_args.t.in") + (invoke "make" "test")))))) (inputs `(("perl" ,perl) ("rsync" ,rsync))) - (home-page "http://rsnapshot.org") + (home-page "https://rsnapshot.org") (synopsis "Deduplicating snapshot backup utility based on rsync") (description "rsnapshot is a file system snapshot utility based on rsync. rsnapshot makes it easy to make periodic snapshots of local machines, and @@ -441,10 +485,26 @@ rsnapshot uses hard links to deduplicate identical files.") (sha256 (base32 "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g")) - (patches (search-patches "diffutils-gets-undeclared.patch")))) + (patches (search-patches "diffutils-gets-undeclared.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Include all the libtirpc headers necessary to get the + ;; definitions of 'u_int', etc. + (substitute* '("src/block-server.c" + "include/chop/block-server.h" + "utils/chop-block-server.c") + (("#include " _ header) + (string-append "#include \n" + "#include \n" + "#include \n"))) + #t)))) (build-system gnu-build-system) (arguments - '(#:phases (modify-phases %standard-phases + '(;; Link against libtirpc. + #:configure-flags '("LDFLAGS=-ltirpc -Wl,--as-needed") + + #:phases (modify-phases %standard-phases (add-before 'configure 'adjust-configure-script (lambda _ ;; Mimic upstream commit @@ -454,6 +514,15 @@ rsnapshot uses hard links to deduplicate identical files.") (string-append "GUILE=" middle "--variable bindir`/guile"))) #t)) + (add-before 'build 'set-libtirpc-include-path + (lambda* (#:key inputs #:allow-other-keys) + ;; Allow & co. to be found. + (let ((libtirpc (assoc-ref inputs "libtirpc"))) + (setenv "CPATH" + (string-append (getenv "CPATH") + ":" libtirpc + "/include/tirpc")) + #t))) (add-before 'check 'skip-test (lambda _ ;; XXX: This test fails (1) because current GnuTLS no @@ -464,10 +533,12 @@ rsnapshot uses hard links to deduplicate identical files.") (native-inputs `(("guile" ,guile-2.0) ("gperf" ,gperf-3.0) ;see - ("pkg-config" ,pkg-config))) + ("pkg-config" ,pkg-config) + ("rpcsvc-proto" ,rpcsvc-proto))) ;for 'rpcgen' (inputs `(("guile" ,guile-2.0) ("util-linux" ,util-linux) + ("libtirpc" ,libtirpc) ("gnutls" ,gnutls) ("tdb" ,tdb) ("bdb" ,bdb) @@ -491,13 +562,14 @@ detection, and lossless compression.") (define-public borg (package (name "borg") - (version "1.1.10") + (version "1.1.11") (source (origin (method url-fetch) (uri (pypi-uri "borgbackup" version)) (sha256 - (base32 "1pp70p4n5kamvcbl4d8021ggrxhyykmg9isjg4yd3wags8b19d7g")) + (base32 + "190gjzx83b6p64nqj840x382dgz9gfv0gm7wj585lnkrpa90j29n")) (modules '((guix build utils))) (snippet '(begin @@ -606,7 +678,7 @@ detection, and lossless compression.") ;; transitional package for now: ;; ("python-msgpack" ,python-msgpack-transitional) - ("zstd" ,zstd))) + ("zstd" ,zstd "lib"))) (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 @@ -695,63 +767,6 @@ NTFS volumes using @code{ntfs-3g}, preserving NTFS-specific attributes.") license:lgpl3+ license:cc0)))) -(define-public obnam - (package - (name "obnam") - (version "1.21") - (source - (origin - (method url-fetch) - (uri (string-append - "http://code.liw.fi/debian/pool/main/o/obnam/obnam_" - version ".orig.tar.xz")) - (sha256 - (base32 - "0qlipsq50hca71zc0dp1mg9zs12qm0sbblw7qfzl0hj6mk2rv1by")))) - (build-system python-build-system) - (arguments - `(#:python ,python-2 - #:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - (substitute* "obnamlib/vfs_local_tests.py" - ;; Check for the nobody user instead of root. - (("self.fs.get_username\\(0\\), 'root'") - "self.fs.get_username(65534), 'nobody'") - ;; Disable tests checking for root group. - (("self.fs.get_groupname\\(0\\)") "'root'")) - (substitute* "obnamlib/vfs_local.py" - ;; Don't cover get_groupname function. - (("def get_groupname\\(self, gid\\):") - "def get_groupname(self, gid): # pragma: no cover")) - ;; Can't run network tests. - (invoke "./check" "--unit-tests")))))) - (inputs - `(("python2-cliapp" ,python2-cliapp) - ("python2-larch" ,python2-larch) - ("python2-paramiko" ,python2-paramiko) - ("python2-pyaml" ,python2-pyaml) - ("python2-tracing" ,python2-tracing) - ("python2-ttystatus" ,python2-ttystatus))) - (native-inputs - `(("gnupg" ,gnupg) - ("python2-coverage" ,python2-coverage) - ("python2-coverage-test-runner" ,python2-coverage-test-runner) - ("python2-pep8" ,python2-pep8) - ("python2-pylint" ,python2-pylint))) - (home-page "https://obnam.org/") - (synopsis "Retired backup program") - (description - "Warning: @uref{https://blog.liw.fi/posts/2017/08/13/retiring_obnam/, -the Obnam project is retired}. You should use another backup solution instead. - -Obnam was an easy, secure backup program. Features included snapshot backups, -data de-duplication and encrypted backups using GnuPG. Backups can be stored on -local hard disks, or online via the SSH SFTP protocol. The backup server, if -used, does not require any special software, on top of SSH.") - (license license:gpl3+))) - (define-public dirvish (package (name "dirvish") @@ -862,7 +877,7 @@ is like a time machine for your data. ") (define-public restic (package (name "restic") - (version "0.9.5") + (version "0.9.6") ;; TODO Try packaging the bundled / vendored dependencies in the 'vendor/' ;; directory. (source (origin @@ -873,7 +888,7 @@ is like a time machine for your data. ") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0afl3dv7gzwdc9klikk3fsb57d0px2fwihb0xxb7zq7d8vlhh8p2")))) + "1zmh42aah32ah8w5n6ilz9bci0y2xrf8p7qshy3yf1lzm5gnbj0w")))) (build-system go-build-system) (arguments `(#:import-path "github.com/restic/restic" @@ -975,18 +990,64 @@ 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.6") + (version "2.3.24") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/burp/burp-" version "/burp-" version ".tar.bz2")) (sha256 (base32 - "101nn30apcbmy9k0wksdf8d4ccw7sfcqzkasgg17a5y332x2imr9")))) + "0dmahqx8ldqdrx9b47r7ag3m801n7h3kclcqja1cc1jzhfhfq27w")))) (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'extend-test-time-outs + ;; The defaults are far too low for busy boxes & spinning storage. + (lambda _ + (substitute* (find-files "utest" "\\.c$") + (("(tcase_set_timeout\\(tc_core,)[ 0-9]*(\\);.*)$" _ prefix suffix) + (string-append prefix " 3600" suffix "\n"))) + #t))))) (inputs `(("librsync" ,librsync) ("openssl" ,openssl)