gnu: burp: Update to 2.3.30.
[jackhill/guix/guix.git] / gnu / packages / backup.scm
CommitLineData
d1a5439b 1;;; GNU Guix --- Functional package management for GNU
c4a9182e 2;;; Copyright © 2014, 2015, 2020 Eric Bavier <bavier@posteo.net>
29a7c98a 3;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
d265169b 4;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
22ade268 5;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
0da4f365 6;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
a2fa9c3d 7;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
3c8ba11a 8;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
4ac8d486 9;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
0ff4425c 10;;; Copyright © 2017 Christopher Allan Webber <cwebber@dustycloud.org>
44dd001d 11;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
1a3aa5ba 12;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
f77886c1 13;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
4ac39960 14;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
c824dedf 15;;; Copyright © 2019 Alex Vong <alexvong1995@gmail.com>
80ba43b5 16;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
5fd395db 17;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
61fc72d3 18;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
c1f3382e 19;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
d1a5439b
EB
20;;;
21;;; This file is part of GNU Guix.
22;;;
23;;; GNU Guix is free software; you can redistribute it and/or modify it
24;;; under the terms of the GNU General Public License as published by
25;;; the Free Software Foundation; either version 3 of the License, or (at
26;;; your option) any later version.
27;;;
28;;; GNU Guix is distributed in the hope that it will be useful, but
29;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31;;; GNU General Public License for more details.
32;;;
33;;; You should have received a copy of the GNU General Public License
34;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35
36(define-module (gnu packages backup)
37 #:use-module (guix packages)
b5b73a82 38 #:use-module ((guix licenses) #:prefix license:)
5cdbdc2b 39 #:use-module (guix git-download)
d1a5439b 40 #:use-module (guix download)
29a7c98a 41 #:use-module (guix utils)
4ac39960 42 #:use-module (guix build-system cmake)
2d762953 43 #:use-module (guix build-system gnu)
f77886c1 44 #:use-module (guix build-system go)
d1a5439b
EB
45 #:use-module (guix build-system python)
46 #:use-module (gnu packages)
0c146750 47 #:use-module (gnu packages acl)
f6875394 48 #:use-module (gnu packages autotools)
2d762953 49 #:use-module (gnu packages base)
ac257f12 50 #:use-module (gnu packages check)
2d762953 51 #:use-module (gnu packages compression)
19278d8d 52 #:use-module (gnu packages crypto)
362f496d 53 #:use-module (gnu packages databases)
7b9b203a 54 #:use-module (gnu packages datastructures)
255d1bbe 55 #:use-module (gnu packages dbm)
d42e6122 56 #:use-module (gnu packages dejagnu)
2903ee1e 57 #:use-module (gnu packages ftp)
2d762953 58 #:use-module (gnu packages glib)
d1a5439b 59 #:use-module (gnu packages gnupg)
f77886c1 60 #:use-module (gnu packages golang)
362f496d
LC
61 #:use-module (gnu packages gperf)
62 #:use-module (gnu packages guile)
335bc683 63 #:use-module (gnu packages linux)
2d762953 64 #:use-module (gnu packages mcrypt)
d42e6122 65 #:use-module (gnu packages nettle)
23b39478 66 #:use-module (gnu packages onc-rpc)
d42e6122 67 #:use-module (gnu packages pcre)
0da4f365 68 #:use-module (gnu packages perl)
2d762953 69 #:use-module (gnu packages pkg-config)
e1742318 70 #:use-module (gnu packages protobuf)
0c146750 71 #:use-module (gnu packages python)
cc6f4912 72 #:use-module (gnu packages python-crypto)
1b2f753d 73 #:use-module (gnu packages python-web)
44d10b1f 74 #:use-module (gnu packages python-xyz)
d1a5439b 75 #:use-module (gnu packages rsync)
2d762953 76 #:use-module (gnu packages ssh)
0c146750 77 #:use-module (gnu packages tls)
29a7c98a 78 #:use-module (gnu packages xml))
d1a5439b
EB
79
80(define-public duplicity
81 (package
82 (name "duplicity")
8a859781 83 (version "0.7.19")
d1a5439b
EB
84 (source
85 (origin
86 (method url-fetch)
87 (uri (string-append "https://code.launchpad.net/duplicity/"
29a7c98a 88 (version-major+minor version)
d1a5439b
EB
89 "-series/" version "/+download/duplicity-"
90 version ".tar.gz"))
91 (sha256
8a859781 92 (base32 "0ag9dknslxlasslwfjhqgcqbkb1mvzzx93ry7lch2lfzcdd91am6"))))
d1a5439b
EB
93 (build-system python-build-system)
94 (native-inputs
02489a66 95 `(("util-linux" ,util-linux) ; setsid command, for the tests
8ef8de79 96 ("par2cmdline" ,par2cmdline)
2903ee1e 97 ("python-pexpect" ,python2-pexpect)
2dfb9bbf 98 ("python-fasteners" ,python2-fasteners)
5a8ef3c1 99 ("tzdata" ,tzdata-for-tests)
2903ee1e
TD
100 ("mock" ,python2-mock)))
101 (propagated-inputs
102 `(("lockfile" ,python2-lockfile)
103 ("urllib3" ,python2-urllib3)))
d1a5439b 104 (inputs
584dbd85 105 `(("librsync" ,librsync-0.9)
2903ee1e 106 ("lftp" ,lftp)
02489a66 107 ("gnupg" ,gnupg) ; gpg executable needed
5a8ef3c1 108 ("util-linux" ,util-linux))) ; for setsid
d1a5439b 109 (arguments
02489a66 110 `(#:python ,python-2 ; setup assumes Python 2
d1a5439b 111 #:test-target "test"
ad04bd6b
MB
112 #:phases
113 (modify-phases %standard-phases
7bb7920f 114 (add-before 'build 'use-store-file-names
ad04bd6b 115 (lambda* (#:key inputs #:allow-other-keys)
8ef8de79
MB
116 (substitute* "duplicity/gpginterface.py"
117 (("self.call = 'gpg'")
118 (string-append "self.call = '" (assoc-ref inputs "gnupg") "/bin/gpg'")))
e61f092c 119
8ef8de79
MB
120 (substitute* '("testing/functional/__init__.py"
121 "testing/overrides/bin/lftp")
ad04bd6b 122 (("/bin/sh") (which "sh")))
8ef8de79
MB
123 #t))
124 (add-before 'check 'check-setup
125 (lambda* (#:key inputs #:allow-other-keys)
02489a66
TGR
126 (setenv "HOME" (getcwd)) ; gpg needs to write to $HOME
127 (setenv "TZDIR" ; some timestamp checks need TZDIR
ad04bd6b
MB
128 (string-append (assoc-ref inputs "tzdata")
129 "/share/zoneinfo"))
130 #t)))))
d1a5439b
EB
131 (home-page "http://duplicity.nongnu.org/index.html")
132 (synopsis "Encrypted backup using rsync algorithm")
133 (description
134 "Duplicity backs up directories by producing encrypted tar-format volumes
135and uploading them to a remote or local file server. Because duplicity uses
136librsync, the incremental archives are space efficient and only record the
137parts of files that have changed since the last backup. Because duplicity
138uses GnuPG to encrypt and/or sign these archives, they will be safe from
139spying and/or modification by the server.")
b0e3635e 140 (license license:gpl2+)))
2d762953 141
f6875394
BT
142(define-public par2cmdline
143 (package
144 (name "par2cmdline")
44dd001d 145 (version "0.8.0")
f6875394 146 (source (origin
5cdbdc2b
RW
147 (method git-fetch)
148 (uri (git-reference
b0e7b699 149 (url "https://github.com/Parchive/par2cmdline")
5cdbdc2b
RW
150 (commit (string-append "v" version))))
151 (file-name (git-file-name name version))
f6875394
BT
152 (sha256
153 (base32
5cdbdc2b 154 "0f1jsd5sw2wynjzi7yjqjaf13yhyjfdid91p8yh0jn32y03kjyrz"))))
f6875394
BT
155 (native-inputs
156 `(("automake" ,automake)
157 ("autoconf" ,autoconf)))
158 (build-system gnu-build-system)
f6d59ecf
TGR
159 (synopsis "File verification and repair tools")
160 (description "Par2cmdline uses Reed-Solomon error-correcting codes to
161generate and verify PAR2 recovery files. These files can be distributed
162alongside the source files or stored together with back-ups to protect against
163transmission errors or @dfn{bit rot}, the degradation of storage media over
164time.
165Unlike a simple checksum, PAR2 doesn't merely detect errors: as long as the
a2dd9270
TGR
166damage isn't too extensive (and smaller than the size of the recovery file), it
167can even repair them.")
f6875394
BT
168 (home-page "https://github.com/Parchive/par2cmdline")
169 (license license:gpl3+)))
170
2d762953
EB
171(define-public hdup
172 (package
173 (name "hdup")
174 (version "2.0.14")
175 (source
176 (origin
177 (method url-fetch)
35d28c60 178 (uri "https://fossies.org/linux/privat/old/hdup-2.0.14.tar.bz2")
2d762953
EB
179 (sha256
180 (base32
181 "02bnczg01cyhajmm4rhbnc0ja0dd9ikv9fwv28asxh1rlx9yr0b7"))))
182 (build-system gnu-build-system)
183 (native-inputs `(("pkg-config" ,pkg-config)))
184 (inputs
185 `(("glib" ,glib)
186 ("tar" ,tar)
187 ("lzop" ,lzop)
188 ("mcrypt" ,mcrypt)
189 ("openssh" ,openssh)
190 ("gnupg" ,gnupg-1)))
191 (arguments
192 `(#:configure-flags
193 `(,(string-append "--sbindir=" (assoc-ref %outputs "out") "/bin"))
194 #:tests? #f))
4a635d3d
TGR
195 (home-page (string-append "http://web.archive.org/web/20150925223424/"
196 "http://archive.miek.nl/projects/hdup/index.html"))
2d762953
EB
197 (synopsis "Simple incremental backup tool")
198 (description
69b4ffcf 199 "Hdup2 is a backup utility, its aim is to make backup really simple. The
2d762953
EB
200backup scheduling is done by means of a cron job. It supports an
201include/exclude mechanism, remote backups, encrypted backups and split
202backups (called chunks) to allow easy burning to CD/DVD.")
b0e3635e
LC
203 (license license:gpl2)))
204
205(define-public libarchive
206 (package
207 (name "libarchive")
7e3533a4 208 (version "3.4.2")
b0e3635e
LC
209 (source
210 (origin
211 (method url-fetch)
549f4091 212 (uri (list (string-append "https://libarchive.org/downloads/libarchive-"
ef2782d7 213 version ".tar.xz")
549f4091
MB
214 (string-append "https://github.com/libarchive/libarchive"
215 "/releases/download/v" version "/libarchive-"
ef2782d7 216 version ".tar.xz")))
b0e3635e
LC
217 (sha256
218 (base32
7e3533a4 219 "18dd01ahs2hv74xm7axjc3yhq839p0x0s4vssvlmm8fknja09qfq"))))
b0e3635e
LC
220 (build-system gnu-build-system)
221 (inputs
80ba43b5 222 `(("bzip2" ,bzip2)
b0e3635e 223 ("libxml2" ,libxml2)
80ba43b5
MB
224 ("lzo" ,lzo)
225 ("nettle" ,nettle)
226 ("xz" ,xz)
227 ("zlib" ,zlib)
228 ("zstd" ,zstd "lib")))
b0e3635e 229 (arguments
f8071e9b
MB
230 `(#:configure-flags '("--disable-static")
231 #:phases
4ac8d486
EF
232 (modify-phases %standard-phases
233 (add-before 'build 'patch-pwd
234 (lambda _
235 (substitute* "Makefile"
6266b8bc
EF
236 (("/bin/pwd") (which "pwd")))
237 #t))
4ac8d486 238 (replace 'check
5fd395db
MO
239 (lambda* (#:key (tests? #t) #:allow-other-keys)
240 (if tests?
241 ;; XXX: The test_owner_parse, test_read_disk, and
242 ;; test_write_disk_lookup tests expect user 'root' to
243 ;; exist, but the chroot's /etc/passwd doesn't have
244 ;; it. Turn off those tests.
245 ;;
246 ;; XXX: Adjust test that fails with zstd 1.4.1
247 ;; because the default options compresses two bytes
248 ;; better than this test expects.
249 ;; https://github.com/libarchive/libarchive/issues/1226
250 (begin
251 (substitute* "libarchive/test/test_write_filter_zstd.c"
252 (("compression-level\", \"6\"")
253 "compression-level\", \"7\""))
254
255 ;; The tests allow one to disable tests matching a globbing pattern.
256 (invoke "make"
257 "libarchive_test"
258 "bsdcpio_test"
259 "bsdtar_test")
80ba43b5 260
5fd395db
MO
261 ;; XXX: This glob disables too much.
262 (invoke "./libarchive_test" "^test_*_disk*")
263 (invoke "./bsdcpio_test" "^test_owner_parse")
264 (invoke "./bsdtar_test"))
265 ;; Tests may be disabled if cross-compiling.
266 (format #t "Test suite not run.~%"))))
5294836d
LC
267 (add-after 'install 'add--L-in-libarchive-pc
268 (lambda* (#:key inputs outputs #:allow-other-keys)
269 (let* ((out (assoc-ref outputs "out"))
270 (lib (string-append out "/lib"))
271 (nettle (assoc-ref inputs "nettle"))
272 (libxml2 (assoc-ref inputs "libxml2"))
273 (xz (assoc-ref inputs "xz"))
274 (zlib (assoc-ref inputs "zlib"))
80ba43b5 275 (zstd (assoc-ref inputs "zstd"))
5294836d 276 (bzip2 (assoc-ref inputs "bzip2")))
1664e2ab
MB
277 ;; Embed absolute references to these inputs to avoid propagation.
278 (substitute* (list (string-append lib "/pkgconfig/libarchive.pc")
279 (string-append lib "/libarchive.la"))
5294836d
LC
280 (("-lnettle")
281 (string-append "-L" nettle "/lib -lnettle"))
282 (("-lxml2")
283 (string-append "-L" libxml2 "/lib -lxml2"))
284 (("-llzma")
285 (string-append "-L" xz "/lib -llzma"))
286 (("-lz")
287 (string-append "-L" zlib "/lib -lz"))
80ba43b5
MB
288 (("-lzstd")
289 (string-append "-L" zstd "/lib -lzstd"))
5294836d
LC
290 (("-lbz2")
291 (string-append "-L" bzip2 "/lib -lbz2")))
7ce9139f 292 #t))))))
c824dedf 293 (home-page "https://libarchive.org/")
b0e3635e
LC
294 (synopsis "Multi-format archive and compression library")
295 (description
296 "Libarchive provides a flexible interface for reading and writing
297archives in various formats such as tar and cpio. Libarchive also supports
298reading and writing archives compressed using various compression filters such
299as gzip and bzip2. The library is inherently stream-oriented; readers
300serially iterate through the archive, writers serially add things to the
35b9e423 301archive. In particular, note that there is currently no built-in support for
b0e3635e
LC
302random access nor for in-place modification.")
303 (license license:bsd-2)))
d42e6122
EB
304
305(define-public rdup
306 (package
307 (name "rdup")
fbf210cb 308 (version "1.1.15")
d42e6122
EB
309 (source
310 (origin
658ef2ec
TGR
311 (method git-fetch)
312 (uri (git-reference
b0e7b699 313 (url "https://github.com/miekg/rdup")
658ef2ec
TGR
314 (commit version)))
315 (file-name (git-file-name name version))
d42e6122 316 (sha256
658ef2ec 317 (base32 "0bzyv6qmnivxnv9nw7lnfn46k0m1dlxcjj53zcva6v8y8084l1iw"))))
d42e6122
EB
318 (build-system gnu-build-system)
319 (native-inputs
fbf210cb
TGR
320 `(("autoconf" ,autoconf)
321 ("automake" ,automake)
322 ("pkg-config" ,pkg-config)
323
324 ;; For tests.
d42e6122
EB
325 ("dejagnu" ,dejagnu)))
326 (inputs
d939b295
TGR
327 ;; XXX Compiling with nettle (encryption) support requires patching out
328 ;; -Werror from GNUmakefile.in. Then, rdup-tr-{en,de}crypt tests fail:
329 ;; free(): invalid pointer
330 ;; ** rdup-tr: SIGPIPE received, exiting
d42e6122
EB
331 `(("glib" ,glib)
332 ("pcre" ,pcre)
333 ("libarchive" ,libarchive)
d939b295 334 ("mcrypt" ,mcrypt)))
d42e6122
EB
335 (arguments
336 `(#:parallel-build? #f ;race conditions
dc1d3cde
KK
337 #:phases
338 (modify-phases %standard-phases
fbf210cb
TGR
339 (add-before 'build 'qualify-inputs
340 (lambda* (#:key inputs #:allow-other-keys)
341 ;; This script is full of pitfalls. Fix some that particularly
342 ;; affect Guix users & leave the rest as reader excercises.
343 (substitute* "rdup-simple"
344 ;; Use the input ‘mcrypt’, not whatever's in $PATH at run time.
345 (("([' ])mcrypt " all delimiter)
346 (string-append delimiter (which "mcrypt") " "))
347 ;; Avoid frivolous dependency on ‘which’ with a shell builtin.
348 (("which") "command -v"))
dc1d3cde 349 #t))
d939b295
TGR
350 (add-before 'check 'disable-encryption-tests
351 (lambda _
352 (for-each delete-file
353 (list "testsuite/rdup/rdup.rdup-tr-crypt.exp"
354 "testsuite/rdup/rdup.rdup-tr-decrypt.exp"
355 "testsuite/rdup/rdup.rdup-tr-encrypt.exp"))
356 #t))
dc1d3cde
KK
357 (add-before 'check 'pre-check
358 (lambda _
359 (setenv "HOME" (getcwd))
360 (substitute* "testsuite/rdup/rdup.rdup-up-t-with-file.exp"
361 (("/bin/cat") (which "cat")))
362 #t)))))
fbf210cb 363 (home-page "https://github.com/miekg/rdup")
d42e6122
EB
364 (synopsis "Provide a list of files to backup")
365 (description
366 "Rdup is a utility inspired by rsync and the plan9 way of doing backups.
367Rdup itself does not backup anything, it only print a list of absolute
e881752c 368file names to standard output. Auxiliary scripts are needed that act on this
d42e6122 369list and implement the backup strategy.")
b0e3635e 370 (license license:gpl3+)))
22c24621
EB
371
372(define-public btar
373 (package
374 (name "btar")
375 (version "1.1.1")
376 (source
377 (origin
378 (method url-fetch)
379 (uri (string-append "http://vicerveza.homeunix.net/~viric/soft/btar/"
380 "btar-" version ".tar.gz"))
381 (sha256
382 (base32
383 "0miklk4bqblpyzh1bni4x6lqn88fa8fjn15x1k1n8bxkx60nlymd"))))
384 (build-system gnu-build-system)
385 (inputs
584dbd85 386 `(("librsync" ,librsync-0.9)))
22c24621
EB
387 (arguments
388 `(#:make-flags `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
389 "CC=gcc")
390 #:tests? #f ;test input not distributed
391 #:phases
dc1d3cde
KK
392 ;; no configure phase
393 (modify-phases %standard-phases
394 (delete 'configure))))
22c24621
EB
395 (home-page "http://viric.name/cgi-bin/btar/doc/trunk/doc/home.wiki")
396 (synopsis "Tar-compatible archiver")
397 (description
398 "Btar is a tar-compatible archiver which allows arbitrary compression and
399ciphering, redundancy, differential backup, indexed extraction, multicore
400compression, input and output serialisation, and tolerance to partial archive
401errors.")
b0e3635e 402 (license license:gpl3+)))
bd3fc08c
EB
403
404(define-public rdiff-backup
405 (package
406 (name "rdiff-backup")
c4a9182e 407 (version "2.0.3")
bd3fc08c
EB
408 (source
409 (origin
410 (method url-fetch)
c4a9182e
EB
411 (uri (string-append "https://github.com/rdiff-backup/rdiff-backup/releases/"
412 "download/v" version "/rdiff-backup-" version ".tar.gz"))
bd3fc08c
EB
413 (sha256
414 (base32
c4a9182e 415 "1qfmvwwb942srhg6gw77ncy4z5z54b4wfz8bpd5bpml8hp1d5qh4"))))
bd3fc08c 416 (build-system python-build-system)
c4a9182e
EB
417 (native-inputs
418 `(("python-setuptools-scm" ,python-setuptools-scm)))
bd3fc08c 419 (inputs
c4a9182e
EB
420 `(("python" ,python)
421 ("librsync" ,librsync)))
bd3fc08c 422 (arguments
c4a9182e
EB
423 `(#:tests? #f)) ; Tests require root/sudo
424 (home-page "https://rdiff-backup.net/")
bd3fc08c
EB
425 (synopsis "Local/remote mirroring+incremental backup")
426 (description
427 "Rdiff-backup backs up one directory to another, possibly over a network.
428The target directory ends up a copy of the source directory, but extra reverse
429diffs are stored in a special subdirectory of that target directory, so you
430can still recover files lost some time ago. The idea is to combine the best
431features of a mirror and an incremental backup. Rdiff-backup also preserves
432subdirectories, hard links, dev files, permissions, uid/gid ownership,
433modification times, extended attributes, acls, and resource forks. Also,
434rdiff-backup can operate in a bandwidth efficient manner over a pipe, like
435rsync. Thus you can use rdiff-backup and ssh to securely back a hard drive up
436to a remote location, and only the differences will be transmitted. Finally,
e881752c 437rdiff-backup is easy to use and settings have sensible defaults.")
b0e3635e 438 (license license:gpl2+)))
0c146750 439
0da4f365
TD
440(define-public rsnapshot
441 (package
442 (name "rsnapshot")
c57c648b 443 (version "1.4.3")
0da4f365
TD
444 (source
445 (origin
446 (method url-fetch)
447 (uri (string-append
448 "https://github.com/rsnapshot/rsnapshot/releases/download/"
449 version "/rsnapshot-" version ".tar.gz"))
450 (sha256
c57c648b 451 (base32 "1lavqmmsf53pim0nvming7fkng6p0nk2a51k2c2jdq0l7snpl31b"))))
0da4f365
TD
452 (build-system gnu-build-system)
453 (arguments
454 `(#:phases
455 (modify-phases %standard-phases
456 (replace 'check
457 (lambda _
458 (substitute* '("t/cmd-post_pre-exec/conf/pre-true-post-true.conf"
459 "t/backup_exec/conf/backup_exec_fail.conf"
460 "t/backup_exec/conf/backup_exec.conf")
461 (("/bin/true") (which "true"))
462 (("/bin/false") (which "false")))
c57c648b
TGR
463
464 ;; Disable a test that tries to connect to localhost on port 22.
465 (delete-file "t/ssh_args/ssh_args.t.in")
466
4ce7c1b3 467 (invoke "make" "test"))))))
0da4f365
TD
468 (inputs
469 `(("perl" ,perl)
470 ("rsync" ,rsync)))
7969789e 471 (home-page "https://rsnapshot.org")
0da4f365 472 (synopsis "Deduplicating snapshot backup utility based on rsync")
162a1374 473 (description "rsnapshot is a file system snapshot utility based on rsync.
0da4f365
TD
474rsnapshot makes it easy to make periodic snapshots of local machines, and
475remote machines over SSH. To reduce the disk space required for each backup,
476rsnapshot uses hard links to deduplicate identical files.")
477 (license license:gpl2+)))
478
362f496d
LC
479(define-public libchop
480 (package
481 (name "libchop")
482 (version "0.5.2")
483 (source (origin
484 (method url-fetch)
485 (uri (string-append "mirror://savannah/libchop/libchop-"
486 version ".tar.gz"))
487 (sha256
488 (base32
489 "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g"))
23b39478
LC
490 (patches (search-patches "diffutils-gets-undeclared.patch"))
491 (modules '((guix build utils)))
492 (snippet
493 '(begin
494 ;; Include all the libtirpc headers necessary to get the
495 ;; definitions of 'u_int', etc.
496 (substitute* '("src/block-server.c"
497 "include/chop/block-server.h"
498 "utils/chop-block-server.c")
499 (("#include <rpc/(.*)\\.h>" _ header)
500 (string-append "#include <rpc/types.h>\n"
501 "#include <rpc/rpc.h>\n"
502 "#include <rpc/" header ".h>\n")))
503 #t))))
362f496d 504 (build-system gnu-build-system)
6d1a7ce8 505 (arguments
23b39478
LC
506 '(;; Link against libtirpc.
507 #:configure-flags '("LDFLAGS=-ltirpc -Wl,--as-needed")
508
509 #:phases (modify-phases %standard-phases
6d1a7ce8
LC
510 (add-before 'configure 'adjust-configure-script
511 (lambda _
512 ;; Mimic upstream commit
513 ;; 25750ab5ef82fd3cfce5205d5f1ef07b47098091.
514 (substitute* "configure"
515 (("GUILE=(.*)--variable bindir`" _ middle)
516 (string-append "GUILE=" middle
517 "--variable bindir`/guile")))
518 #t))
23b39478
LC
519 (add-before 'build 'set-libtirpc-include-path
520 (lambda* (#:key inputs #:allow-other-keys)
521 ;; Allow <rpc/rpc.h> & co. to be found.
522 (let ((libtirpc (assoc-ref inputs "libtirpc")))
523 (setenv "CPATH"
524 (string-append (getenv "CPATH")
525 ":" libtirpc
526 "/include/tirpc"))
527 #t)))
6d1a7ce8
LC
528 (add-before 'check 'skip-test
529 (lambda _
530 ;; XXX: This test fails (1) because current GnuTLS no
531 ;; longer supports OpenPGP authentication, and (2) for
532 ;; some obscure reason. Better skip it.
533 (setenv "XFAIL_TESTS" "utils/block-server")
534 #t)))))
362f496d
LC
535 (native-inputs
536 `(("guile" ,guile-2.0)
c9f898cd 537 ("gperf" ,gperf-3.0) ;see <https://bugs.gnu.org/32382>
23b39478
LC
538 ("pkg-config" ,pkg-config)
539 ("rpcsvc-proto" ,rpcsvc-proto))) ;for 'rpcgen'
362f496d
LC
540 (inputs
541 `(("guile" ,guile-2.0)
542 ("util-linux" ,util-linux)
23b39478 543 ("libtirpc" ,libtirpc)
362f496d
LC
544 ("gnutls" ,gnutls)
545 ("tdb" ,tdb)
546 ("bdb" ,bdb)
547 ("gdbm" ,gdbm)
548 ("libgcrypt" ,libgcrypt)
549 ("lzo" ,lzo)
550 ("bzip2" ,bzip2)
551 ("zlib" ,zlib)))
340978d7 552 (home-page "https://nongnu.org/libchop/")
362f496d
LC
553 (synopsis "Tools & library for data backup and distributed storage")
554 (description
555 "Libchop is a set of utilities and library for data backup and
556distributed storage. Its main application is @command{chop-backup}, an
557encrypted backup program that supports data integrity checks, versioning,
558distribution among several sites, selective sharing of stored data, adaptive
559compression, and more. The library itself implements storage techniques such
560as content-addressable storage, content hash keys, Merkle trees, similarity
561detection, and lossless compression.")
562 (license license:gpl3+)))
6fc5c11b
LF
563
564(define-public borg
565 (package
566 (name "borg")
14adb59a 567 (version "1.1.13")
c4556777
TGR
568 (source
569 (origin
570 (method url-fetch)
571 (uri (pypi-uri "borgbackup" version))
572 (sha256
14adb59a 573 (base32 "089q3flmwbz7dc28zlscwylf64kgck3jf1n6lqpwww8hlrk8cjhn"))
c4556777
TGR
574 (modules '((guix build utils)))
575 (snippet
576 '(begin
5a3bf255
LF
577 ;; Delete files generated by Cython. We used to have a regex
578 ;; that created the list of generated files but Borg has
579 ;; added new non-generated C files that cause the regex to
580 ;; generate the wrong list.
c4556777 581 (for-each delete-file
5a3bf255
LF
582 '("src/borg/algorithms/checksums.c"
583 "src/borg/chunker.c"
584 "src/borg/compress.c"
585 "src/borg/crypto/low_level.c"
586 "src/borg/hashindex.c"
587 "src/borg/item.c"
588 "src/borg/platform/darwin.c"
589 "src/borg/platform/freebsd.c"
590 "src/borg/platform/linux.c"
591 "src/borg/platform/posix.c"))
c4556777
TGR
592 ;; Remove bundled shared libraries.
593 (with-directory-excursion "src/borg/algorithms"
594 (for-each delete-file-recursively
d46fc636
TGR
595 (list "blake2" "lz4" "msgpack" "zstd")))
596 ;; Purge some msgpack references from setup.py or the resulting
597 ;; sources will be unbuildable.
598 (substitute* "setup.py"
599 ((".*Extension\\('borg\\.algorithms\\.msgpack\\..*") "")
600 (("msgpack_packer_source, msgpack_unpacker_source") ""))
6cbee49d 601 #t))))
6fc5c11b
LF
602 (build-system python-build-system)
603 (arguments
c21b1a1f
LF
604 `(#:modules ((srfi srfi-26) ; for cut
605 (guix build utils)
606 (guix build python-build-system))
607 #:phases
6fc5c11b
LF
608 (modify-phases %standard-phases
609 (add-after 'unpack 'set-env
610 (lambda* (#:key inputs #:allow-other-keys)
611 (let ((openssl (assoc-ref inputs "openssl"))
19278d8d 612 (libb2 (assoc-ref inputs "libb2"))
c4556777
TGR
613 (lz4 (assoc-ref inputs "lz4"))
614 (zstd (assoc-ref inputs "zstd")))
6fc5c11b 615 (setenv "BORG_OPENSSL_PREFIX" openssl)
19278d8d 616 (setenv "BORG_LIBB2_PREFIX" libb2)
c4556777
TGR
617 (setenv "BORG_LIBLZ4_PREFIX" lz4)
618 (setenv "BORG_LIBZSTD_PREFIX" zstd)
6fc5c11b 619 (setenv "PYTHON_EGG_CACHE" "/tmp")
b4f91d0e
LF
620 ;; The test 'test_return_codes[python]' fails when
621 ;; HOME=/homeless-shelter.
622 (setenv "HOME" "/tmp")
6fc5c11b 623 #t)))
d46fc636
TGR
624 (add-after 'unpack 'use-system-msgpack
625 (lambda _
626 (substitute* "src/borg/helpers.py"
627 (("prefer_system_msgpack = False")
628 "prefer_system_msgpack = True"))
629 #t))
b4f91d0e
LF
630 ;; The tests need to be run after Borg is installed.
631 (delete 'check)
632 (add-after 'install 'check
1d60f7c2
LF
633 (lambda* (#:key inputs outputs #:allow-other-keys)
634 ;; Make the installed package available for the test suite.
635 (add-installed-pythonpath inputs outputs)
8cb3e7e7
LF
636 ;; The tests should be run in an empty directory.
637 (mkdir-p "tests")
638 (with-directory-excursion "tests"
e252ec32
TGR
639 (invoke "py.test" "-v" "--pyargs" "borg.testsuite" "-k"
640 (string-append
641 ;; These tests need to write to '/var'.
642 "not test_get_cache_dir "
643 "and not test_get_config_dir "
644 "and not test_get_keys_dir "
645 "and not test_get_security_dir "
646 ;; These tests assume there is a root user in
647 ;; '/etc/passwd'.
648 "and not test_access_acl "
649 "and not test_default_acl "
650 "and not test_non_ascii_acl "
651 ;; This test needs the unpackaged pytest-benchmark.
652 "and not benchmark "
653 ;; These tests assume the kernel supports FUSE.
654 "and not test_fuse "
655 "and not test_fuse_allow_damaged_files "
14adb59a
TGR
656 "and not test_mount_hardlinks "
657 "and not test_readonly_mount ")))))
6fc5c11b 658 (add-after 'install 'install-doc
6ee4fd2a 659 (lambda* (#:key inputs outputs #:allow-other-keys)
6fc5c11b 660 (let* ((out (assoc-ref outputs "out"))
c21b1a1f
LF
661 (man (string-append out "/share/man/man1"))
662 (misc (string-append out "/share/borg/misc")))
663 (for-each (cut install-file <> misc)
664 '("docs/misc/create_chunker-params.txt"
665 "docs/misc/internals-picture.txt"
666 "docs/misc/prune-example.txt"))
e252ec32
TGR
667 (copy-recursively "docs/man" man)
668 #t))))))
6fc5c11b 669 (native-inputs
f99cfc19
EF
670 `(("python-cython" ,python-cython)
671 ("python-setuptools-scm" ,python-setuptools-scm)
d4c0053e 672 ("python-pytest" ,python-pytest)))
6fc5c11b
LF
673 (inputs
674 `(("acl" ,acl)
19278d8d 675 ("libb2" ,libb2)
6fc5c11b
LF
676 ("lz4" ,lz4)
677 ("openssl" ,openssl)
678 ("python-llfuse" ,python-llfuse)
acb59d99
LF
679 ;; The Python msgpack library changed its name so Borg requires this
680 ;; transitional package for now:
681 ;; <https://bugs.gnu.org/30662>
682 ("python-msgpack" ,python-msgpack-transitional)
ec0de9d8 683 ("zstd" ,zstd "lib")))
6fc5c11b
LF
684 (synopsis "Deduplicated, encrypted, authenticated and compressed backups")
685 (description "Borg is a deduplicating backup program. Optionally, it
686supports compression and authenticated encryption. The main goal of Borg is to
687provide an efficient and secure way to backup data. The data deduplication
688technique used makes Borg suitable for daily backups since only changes are
689stored. The authenticated encryption technique makes it suitable for backups
690to not fully trusted targets. Borg is a fork of Attic.")
18533bcf 691 (home-page "https://www.borgbackup.org/")
6fc5c11b 692 (license license:bsd-3)))
b2fe9183
LF
693
694(define-public attic
695 (package
696 (name "attic")
697 (version "0.16")
698 (source (origin
699 (method url-fetch)
99d17446 700 (uri (pypi-uri "Attic" version))
b2fe9183
LF
701 (sha256
702 (base32
703 "0b5skd36r4c0915lwpkqg5hxm49gls9pprs1b7hc40910wlcsl36"))))
704 (build-system python-build-system)
705 (arguments
1df6d73b
LF
706 `(;; The tests assume they are run as root:
707 ;; https://github.com/jborg/attic/issues/7
708 #:tests? #f
709 #:phases
b2fe9183
LF
710 (modify-phases %standard-phases
711 (add-before
712 'build 'set-openssl-prefix
713 (lambda* (#:key inputs #:allow-other-keys)
714 (setenv "ATTIC_OPENSSL_PREFIX" (assoc-ref inputs "openssl"))
715 #t)))))
716 (inputs
717 `(("acl" ,acl)
718 ("openssl" ,openssl)
719 ("python-msgpack" ,python-msgpack)
720
721 ;; Attic is probably incompatible with llfuse > 0.41.
722 ;; These links are to discussions of llfuse compatibility from
723 ;; the borg project. Borg is a recent fork of attic, and attic
724 ;; has not been updated since the fork, so it's likely that
725 ;; llfuse compatibility requirements are still the same.
726 ;; https://github.com/borgbackup/borg/issues/642
727 ;; https://github.com/borgbackup/borg/issues/643
728 ("python-llfuse" ,python-llfuse-0.41)))
729 (synopsis "Deduplicating backup program")
730 (description "Attic is a deduplicating backup program. The main goal of
731Attic is to provide an efficient and secure way to backup data. The data
732deduplication technique used makes Attic suitable for daily backups since only
733changes are stored.")
734 (home-page "https://attic-backup.org/")
735 (license license:bsd-3)
736 (properties `((superseded . ,borg)))))
3b402139
TGR
737
738(define-public wimlib
739 (package
740 (name "wimlib")
18e86ea9 741 (version "1.13.2")
3b402139
TGR
742 (source (origin
743 (method url-fetch)
744 (uri (string-append "https://wimlib.net/downloads/"
1a05bce2 745 "wimlib-" version ".tar.gz"))
3b402139
TGR
746 (sha256
747 (base32
18e86ea9 748 "0id9ym3hzij4kpdrk0sz3ijxp5r0z1md5jch83pml9hdy1zbx5bj"))))
3b402139
TGR
749 (build-system gnu-build-system)
750 (native-inputs
751 `(("pkg-config" ,pkg-config)))
752 (inputs
753 `(("fuse" ,fuse)
754 ("libxml2" ,libxml2)
755 ("ntfs-3g" ,ntfs-3g)
756 ("openssl" ,openssl)))
757 (arguments
758 `(#:configure-flags (list "--enable-test-support")))
759 (home-page "https://wimlib.net/")
760 (synopsis "WIM file manipulation library and utilities")
761 (description "wimlib is a C library and set of command-line utilities for
762creating, modifying, extracting, and mounting archives in the Windows Imaging
763Format (@dfn{WIM files}). It can capture and apply WIMs directly from and to
764NTFS volumes using @code{ntfs-3g}, preserving NTFS-specific attributes.")
765 ;; wimlib is dual-licenced under version 3 or later of either the GPL or
766 ;; LGPL, except those files explicitly marked as being released into the
767 ;; public domain (CC0) in their headers.
768 (license (list license:gpl3+
769 license:lgpl3+
770 license:cc0))))
a2fa9c3d 771
0ff4425c
CAW
772(define-public dirvish
773 (package
774 (name "dirvish")
775 (version "1.2.1")
776 (build-system gnu-build-system)
777 (source (origin
778 (method url-fetch)
779 (uri (string-append
780 "http://dirvish.org/dirvish-" version ".tgz"))
781 (sha256
782 (base32
783 "1kbxa1irszp2zw8hd5qzqnrrzb4vxfivs1vn64yxnj0lak1jjzvb"))))
784 (arguments
785 `(#:modules ((ice-9 match) (ice-9 rdelim)
786 ,@%gnu-build-system-modules)
787 #:phases
788 ;; This mostly mirrors the steps taken in the install.sh that ships
789 ;; with dirvish, but simplified because we aren't prompting interactively
790 (modify-phases %standard-phases
791 (delete 'configure)
792 (delete 'build)
793 (delete 'check)
794 (replace 'install
795 (lambda* (#:key inputs outputs #:allow-other-keys)
796 ;; These are mostly the same steps the install.sh that comes with
797 ;; dirvish does
798 (let* (;; Files we'll be copying
799 (executables
800 '("dirvish" "dirvish-runall"
801 "dirvish-expire" "dirvish-locate"))
802 (man-pages
803 '(("dirvish" "8") ("dirvish-runall" "8")
804 ("dirvish-expire" "8") ("dirvish-locate" "8")
805 ("dirvish.conf" "5")))
806
807 (output-dir
808 (assoc-ref outputs "out"))
809
810 ;; Just a default... not so useful on guixsd though
811 ;; You probably want to a service with file(s) to point to.
812 (confdir "/etc/dirvish")
813
814 (perl (string-append (assoc-ref %build-inputs "perl")
815 "/bin/perl"))
816 (loadconfig.pl (call-with-input-file "loadconfig.pl"
817 read-string)))
818
819
820 (define (write-pl filename)
821 (define pl-header
822 (string-append "#!" perl "\n\n"
823 "$CONFDIR = \"" confdir "\";\n\n"))
824 (define input-file-location
825 (string-append filename ".pl"))
826 (define target-file-location
827 (string-append output-dir "/bin/" filename ".pl"))
828 (define text-to-write
829 (string-append pl-header
830 (call-with-input-file input-file-location
831 read-string)
832 "\n" loadconfig.pl))
833 (with-output-to-file target-file-location
834 (lambda ()
835 (display text-to-write)))
836 (chmod target-file-location #o755)
837 (wrap-program target-file-location
838 `("PERL5LIB" ":" prefix
839 ,(map (lambda (l) (string-append (assoc-ref %build-inputs l)
840 "/lib/perl5/site_perl"))
841 '("perl-libtime-period"
842 "perl-libtime-parsedate")))))
843
844 (define write-man
845 (match-lambda
846 ((file-base man-num)
847 (let* ((filename
848 (string-append file-base "." man-num))
849 (output-path
850 (string-append output-dir
851 "/share/man/man" man-num
852 "/" filename)))
853 (copy-file filename output-path)))))
854
855 ;; Make directories
856 (mkdir-p (string-append output-dir "/bin/"))
857 (mkdir-p (string-append output-dir "/share/man/man8/"))
858 (mkdir-p (string-append output-dir "/share/man/man5/"))
859
860 ;; Write out executables
861 (for-each write-pl executables)
862 ;; Write out man pages
863 (for-each write-man man-pages)
864 #t))))))
865 (inputs
866 `(("perl" ,perl)
867 ("rsync" ,rsync)
868 ("perl-libtime-period" ,perl-libtime-period)
869 ("perl-libtime-parsedate" ,perl-libtime-parsedate)))
870 (home-page "http://dirvish.org/")
871 (synopsis "Fast, disk based, rotating network backup system")
872 (description
873 "With dirvish you can maintain a set of complete images of your
162a1374 874file systems with unattended creation and expiration. A dirvish backup vault
0ff4425c
CAW
875is like a time machine for your data. ")
876 (license (license:fsf-free "file://COPYING"
877 "Open Software License 2.0"))))
f77886c1 878
f49d6909 879(define-public restic
f77886c1
OP
880 (package
881 (name "restic")
40df1928 882 (version "0.9.6")
f49d6909
LF
883 ;; TODO Try packaging the bundled / vendored dependencies in the 'vendor/'
884 ;; directory.
f77886c1
OP
885 (source (origin
886 (method url-fetch)
887 (uri (string-append
888 "https://github.com/restic/restic/releases/download/"
889 "v" version "/restic-" version ".tar.gz"))
890 (file-name (string-append name "-" version ".tar.gz"))
891 (sha256
892 (base32
40df1928 893 "1zmh42aah32ah8w5n6ilz9bci0y2xrf8p7qshy3yf1lzm5gnbj0w"))))
f77886c1
OP
894 (build-system go-build-system)
895 (arguments
896 `(#:import-path "github.com/restic/restic"
f77886c1
OP
897 ;; We don't need to install the source code for end-user applications.
898 #:install-source? #f
899 #:phases
900 (modify-phases %standard-phases
901 (replace 'build
902 (lambda* (#:key inputs #:allow-other-keys)
fb098182 903 (with-directory-excursion "src/github.com/restic/restic"
9cac043c
TGR
904 ;; Disable 'restic self-update'. It makes little sense in Guix.
905 (substitute* "build.go" (("selfupdate") ""))
15595644 906 (setenv "HOME" (getcwd)) ; for $HOME/.cache/go-build
f77886c1
OP
907 (invoke "go" "run" "build.go"))))
908
4976ebdd
OP
909 (replace 'check
910 (lambda _
fb098182 911 (with-directory-excursion "src/github.com/restic/restic"
77389911
OP
912 ;; Disable FUSE tests.
913 (setenv "RESTIC_TEST_FUSE" "0")
4976ebdd
OP
914 (invoke "go" "run" "build.go" "--test"))))
915
f77886c1
OP
916 (replace 'install
917 (lambda* (#:key outputs #:allow-other-keys)
918 (let ((out (assoc-ref outputs "out"))
fb098182 919 (src "src/github.com/restic/restic"))
f77886c1
OP
920 (install-file (string-append src "/restic")
921 (string-append out "/bin"))
922 #t)))
923
924 (add-after 'install 'install-docs
925 (lambda* (#:key outputs #:allow-other-keys)
926 (let* ((out (assoc-ref outputs "out"))
927 (man "/share/man")
928 (man-section (string-append man "/man"))
fb098182 929 (src "src/github.com/restic/restic/doc/man/"))
f77886c1
OP
930 ;; Install all the man pages to "out".
931 (for-each
932 (lambda (file)
933 (install-file file
934 (string-append out man-section
935 (string-take-right file 1))))
936 (find-files src "\\.[1-9]"))
937 #t)))
938
939 (add-after 'install-docs 'install-shell-completion
940 (lambda* (#:key outputs #:allow-other-keys)
941 (let* ((out (assoc-ref outputs "out"))
942 (bin (string-append out "/bin"))
943 (etc (string-append out "/etc"))
944 (share (string-append out "/share")))
945 (for-each
946 (lambda (shell)
947 (let* ((shell-name (symbol->string shell))
948 (dir (string-append "etc/completion/" shell-name)))
949 (mkdir-p dir)
950 (invoke (string-append bin "/restic") "generate"
951 (string-append "--" shell-name "-completion")
952 (string-append dir "/"
953 (case shell
954 ((bash) "restic")
955 ((zsh) "_restic"))))))
956 '(bash zsh))
957 (with-directory-excursion "etc/completion"
958 (install-file "bash/restic"
959 (string-append etc "/bash_completion.d"))
960 (install-file "zsh/_restic"
961 (string-append share "/zsh/site-functions")))
962 #t))))))
963 (home-page "https://restic.net/")
964 (synopsis "Backup program with multiple revisions, encryption and more")
965 (description "Restic is a program that does backups right and was designed
966with the following principles in mind:
967
968@itemize
969@item Easy: Doing backups should be a frictionless process, otherwise you
970might be tempted to skip it. Restic should be easy to configure and use, so
971that, in the event of a data loss, you can just restore it. Likewise,
972restoring data should not be complicated.
973
974@item Fast: Backing up your data with restic should only be limited by your
975network or hard disk bandwidth so that you can backup your files every day.
976Nobody does backups if it takes too much time. Restoring backups should only
977transfer data that is needed for the files that are to be restored, so that
978this process is also fast.
979
980@item Verifiable: Much more important than backup is restore, so restic
981enables you to easily verify that all data can be restored. @item Secure:
982Restic uses cryptography to guarantee confidentiality and integrity of your
983data. The location the backup data is stored is assumed not to be a trusted
984environment (e.g. a shared space where others like system administrators are
985able to access your backups). Restic is built to secure your data against
986such attackers.
987
988@item Efficient: With the growth of data, additional snapshots should only
989take the storage of the actual increment. Even more, duplicate data should be
990de-duplicated before it is actually written to the storage back end to save
991precious backup space.
992@end itemize")
993 (license license:bsd-2)))
7b9b203a 994
61fc72d3
NG
995(define-public zbackup
996 (package
997 (name "zbackup")
998 (version "1.4.4")
999 (source
1000 (origin
1001 (method git-fetch)
1002 (uri (git-reference
b0e7b699 1003 (url "https://github.com/zbackup/zbackup")
61fc72d3
NG
1004 (commit version)))
1005 (file-name (git-file-name name version))
1006 (sha256
1007 (base32 "14l1kyxg7pccpax3d6qcpmdycb70kn3fxp1a59w64hqy2493hngl"))))
1008 (build-system cmake-build-system)
1009 (arguments
1010 `(#:tests? #f)) ;no test
1011 (inputs
1012 `(("lzo" ,lzo)
1013 ("libressl" ,libressl)
1014 ("protobuf" ,protobuf)
1015 ("xz" ,xz)
1016 ("zlib" ,zlib)))
1017 (home-page "http://zbackup.org")
1018 (synopsis "Versatile deduplicating backup tool")
1019 (description
1020 "ZBackup is a globally-deduplicating backup tool, based on the
1021ideas found in Rsync. Feed a large @file{.tar} into it, and it will
1022store duplicate regions of it only once, then compress and optionally
1023encrypt the result. Feed another @file{.tar} file, and it will also
1024re-use any data found in any previous backups. This way only new
1025changes are stored, and as long as the files are not very different,
1026the amount of storage required is very low. Any of the backup files
1027stored previously can be read back in full at any time. The program
1028is format-agnostic, so you can feed virtually any files to it.")
1029 (license license:gpl2+)))
1030
c1f3382e
MK
1031(define-public dump
1032 (package
1033 (name "dump")
1034 (version "0.4b46")
1035 (source
1036 (origin
1037 (method url-fetch)
1038 (uri (string-append "mirror://sourceforge/dump/dump/"
1039 version "/dump-" version ".tar.gz"))
1040 (sha256
1041 (base32
1042 "15rg5y15ak0ppqlhcih78layvg7cwp6hc16p3c58xs8svlkxjqc0"))))
1043 (build-system gnu-build-system)
1044 (arguments
1045 `(#:configure-flags
1046 `("--sysconfdir=/etc"
1047 "--disable-readline"
1048 "--disable-rmt")))
1049 (native-inputs
1050 `(("pkg-config" ,pkg-config)))
1051 (inputs
1052 `(("openssl" ,openssl-1.0)
1053 ("zlib" ,zlib)
1054 ("util-linux" ,util-linux "lib")
1055 ("e2fsprogs" ,e2fsprogs)))
1056 (home-page "https://dump.sourceforge.io/")
a04deba2
TGR
1057 (synopsis "Ext2/3/4 file system dump/restore utilities")
1058 (description "Dump examines files in a file system, determines which ones
c1f3382e
MK
1059need to be backed up, and copies those files to a specified disk, tape or
1060other storage medium. Subsequent incremental backups can then be layered on
1061top of the full backup. The restore command performs the inverse function of
a04deba2 1062dump; it can restore a full backup of a file system. Single files and
c1f3382e
MK
1063directory subtrees may also be restored from full or partial backups in
1064interractive mode.")
1065 (license license:bsd-3)))
1066
7b9b203a
RW
1067(define-public burp
1068 (package
1069 (name "burp")
5d26ba7e
TGR
1070 (version "2.3.30")
1071 (source
1072 (origin
1073 (method git-fetch)
1074 (uri (git-reference
1075 (url "https://github.com/grke/burp")
1076 (commit version)))
1077 (sha256
1078 (base32 "1f9i5d415psbr03fqd47p162qy25sypra1w8w16ym6jk1pvdjsgx"))
1079 (file-name (git-file-name name version))))
7b9b203a 1080 (build-system gnu-build-system)
22ade268
TGR
1081 (arguments
1082 `(#:phases
1083 (modify-phases %standard-phases
1084 (add-before 'check 'extend-test-time-outs
1085 ;; The defaults are far too low for busy boxes & spinning storage.
1086 (lambda _
1087 (substitute* (find-files "utest" "\\.c$")
1088 (("(tcase_set_timeout\\(tc_core,)[ 0-9]*(\\);.*)$" _ prefix suffix)
1089 (string-append prefix " 3600" suffix "\n")))
1090 #t)))))
7b9b203a
RW
1091 (inputs
1092 `(("librsync" ,librsync)
1093 ("openssl" ,openssl)
1094 ("uthash" ,uthash)
1095 ("zlib" ,zlib)))
1096 (native-inputs
5d26ba7e
TGR
1097 `(("autoconf" ,autoconf)
1098 ("automake" ,automake)
1099 ("check" ,check)
7b9b203a
RW
1100 ("pkg-config" ,pkg-config)))
1101 (home-page "https://burp.grke.org")
1102 (synopsis "Differential backup and restore")
1103 (description "Burp is a network backup and restore program. It attempts
1104to reduce network traffic and the amount of space that is used by each
1105backup.")
1106 (license license:agpl3)))