gnu: perl-tk: Update to 804.034.
[jackhill/guix/guix.git] / gnu / packages / backup.scm
CommitLineData
d1a5439b 1;;; GNU Guix --- Functional package management for GNU
aa90f2cd 2;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
29a7c98a 3;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
6fc5c11b 4;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
3b402139 5;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
0da4f365 6;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
a2fa9c3d 7;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
9034dc8f 8;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org>
d1a5439b
EB
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25(define-module (gnu packages backup)
26 #:use-module (guix packages)
b5b73a82 27 #:use-module ((guix licenses) #:prefix license:)
d1a5439b 28 #:use-module (guix download)
29a7c98a 29 #:use-module (guix utils)
2d762953 30 #:use-module (guix build-system gnu)
d1a5439b
EB
31 #:use-module (guix build-system python)
32 #:use-module (gnu packages)
0c146750 33 #:use-module (gnu packages acl)
f6875394 34 #:use-module (gnu packages autotools)
2d762953
EB
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages compression)
362f496d 37 #:use-module (gnu packages databases)
d42e6122 38 #:use-module (gnu packages dejagnu)
2903ee1e 39 #:use-module (gnu packages ftp)
2d762953 40 #:use-module (gnu packages glib)
d1a5439b 41 #:use-module (gnu packages gnupg)
362f496d
LC
42 #:use-module (gnu packages gperf)
43 #:use-module (gnu packages guile)
335bc683 44 #:use-module (gnu packages linux)
2d762953 45 #:use-module (gnu packages mcrypt)
d42e6122
EB
46 #:use-module (gnu packages nettle)
47 #:use-module (gnu packages pcre)
0da4f365 48 #:use-module (gnu packages perl)
2d762953 49 #:use-module (gnu packages pkg-config)
0c146750 50 #:use-module (gnu packages python)
d1a5439b 51 #:use-module (gnu packages rsync)
2d762953 52 #:use-module (gnu packages ssh)
0c146750 53 #:use-module (gnu packages tls)
29a7c98a 54 #:use-module (gnu packages xml))
d1a5439b
EB
55
56(define-public duplicity
57 (package
58 (name "duplicity")
b8ebbefe 59 (version "0.7.12")
d1a5439b
EB
60 (source
61 (origin
62 (method url-fetch)
63 (uri (string-append "https://code.launchpad.net/duplicity/"
29a7c98a 64 (version-major+minor version)
d1a5439b
EB
65 "-series/" version "/+download/duplicity-"
66 version ".tar.gz"))
67 (sha256
68 (base32
b8ebbefe 69 "1rhgrz2lm9vbfdp2raykrih1c6n2lw5jd572z4dsz488m52avjqi"))))
d1a5439b
EB
70 (build-system python-build-system)
71 (native-inputs
2903ee1e 72 `(("util-linux" ,util-linux) ;setsid command, for the tests
8ef8de79 73 ("par2cmdline" ,par2cmdline)
2903ee1e
TD
74 ("python-pexpect" ,python2-pexpect)
75 ("mock" ,python2-mock)))
76 (propagated-inputs
77 `(("lockfile" ,python2-lockfile)
78 ("urllib3" ,python2-urllib3)))
d1a5439b 79 (inputs
2903ee1e
TD
80 `(("librsync" ,librsync)
81 ("lftp" ,lftp)
82 ("gnupg" ,gnupg) ;gpg executable needed
335bc683
EB
83 ("util-linux" ,util-linux) ;for setsid
84 ("tzdata" ,tzdata)))
d1a5439b
EB
85 (arguments
86 `(#:python ,python-2 ;setup assumes Python 2
87 #:test-target "test"
ad04bd6b
MB
88 #:phases
89 (modify-phases %standard-phases
8ef8de79 90 (add-before 'build 'patch-source
ad04bd6b 91 (lambda* (#:key inputs #:allow-other-keys)
8ef8de79
MB
92 ;; embed gpg store name
93 (substitute* "duplicity/gpginterface.py"
94 (("self.call = 'gpg'")
95 (string-append "self.call = '" (assoc-ref inputs "gnupg") "/bin/gpg'")))
96 (substitute* '("testing/functional/__init__.py"
97 "testing/overrides/bin/lftp")
ad04bd6b 98 (("/bin/sh") (which "sh")))
8ef8de79
MB
99 #t))
100 (add-before 'check 'check-setup
101 (lambda* (#:key inputs #:allow-other-keys)
ad04bd6b
MB
102 (setenv "HOME" (getcwd)) ;gpg needs to write to $HOME
103 (setenv "TZDIR" ;some timestamp checks need TZDIR
104 (string-append (assoc-ref inputs "tzdata")
105 "/share/zoneinfo"))
106 #t)))))
d1a5439b
EB
107 (home-page "http://duplicity.nongnu.org/index.html")
108 (synopsis "Encrypted backup using rsync algorithm")
109 (description
110 "Duplicity backs up directories by producing encrypted tar-format volumes
111and uploading them to a remote or local file server. Because duplicity uses
112librsync, the incremental archives are space efficient and only record the
113parts of files that have changed since the last backup. Because duplicity
114uses GnuPG to encrypt and/or sign these archives, they will be safe from
115spying and/or modification by the server.")
b0e3635e 116 (license license:gpl2+)))
2d762953 117
f6875394
BT
118(define-public par2cmdline
119 (package
120 (name "par2cmdline")
0d200e9f 121 (version "0.7.3")
f6875394
BT
122 (source (origin
123 (method url-fetch)
124 (uri (string-append "https://github.com/Parchive/par2cmdline/archive/v"
125 version ".tar.gz"))
126 (file-name (string-append name "-" version ".tar.gz"))
127 (sha256
128 (base32
0d200e9f 129 "0dqwarc2aw5clgpf24d9dxh43b0k0z3l6kksn30arx9bdlmrk5rx"))))
f6875394
BT
130 (native-inputs
131 `(("automake" ,automake)
132 ("autoconf" ,autoconf)))
133 (build-system gnu-build-system)
134 (arguments
7359cffa 135 `(#:phases
f6875394
BT
136 (modify-phases %standard-phases
137 (add-after 'unpack 'autoreconf
138 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
f6d59ecf
TGR
139 (synopsis "File verification and repair tools")
140 (description "Par2cmdline uses Reed-Solomon error-correcting codes to
141generate and verify PAR2 recovery files. These files can be distributed
142alongside the source files or stored together with back-ups to protect against
143transmission errors or @dfn{bit rot}, the degradation of storage media over
144time.
145Unlike a simple checksum, PAR2 doesn't merely detect errors: as long as the
a2dd9270
TGR
146damage isn't too extensive (and smaller than the size of the recovery file), it
147can even repair them.")
f6875394
BT
148 (home-page "https://github.com/Parchive/par2cmdline")
149 (license license:gpl3+)))
150
2d762953
EB
151(define-public hdup
152 (package
153 (name "hdup")
154 (version "2.0.14")
155 (source
156 (origin
157 (method url-fetch)
35d28c60 158 (uri "https://fossies.org/linux/privat/old/hdup-2.0.14.tar.bz2")
2d762953
EB
159 (sha256
160 (base32
161 "02bnczg01cyhajmm4rhbnc0ja0dd9ikv9fwv28asxh1rlx9yr0b7"))))
162 (build-system gnu-build-system)
163 (native-inputs `(("pkg-config" ,pkg-config)))
164 (inputs
165 `(("glib" ,glib)
166 ("tar" ,tar)
167 ("lzop" ,lzop)
168 ("mcrypt" ,mcrypt)
169 ("openssh" ,openssh)
170 ("gnupg" ,gnupg-1)))
171 (arguments
172 `(#:configure-flags
173 `(,(string-append "--sbindir=" (assoc-ref %outputs "out") "/bin"))
174 #:tests? #f))
175 (home-page "http://archive.miek.nl/projects/hdup/index.html")
176 (synopsis "Simple incremental backup tool")
177 (description
69b4ffcf 178 "Hdup2 is a backup utility, its aim is to make backup really simple. The
2d762953
EB
179backup scheduling is done by means of a cron job. It supports an
180include/exclude mechanism, remote backups, encrypted backups and split
181backups (called chunks) to allow easy burning to CD/DVD.")
b0e3635e
LC
182 (license license:gpl2)))
183
184(define-public libarchive
185 (package
186 (name "libarchive")
27695e22 187 (version "3.3.1")
b0e3635e
LC
188 (source
189 (origin
190 (method url-fetch)
191 (uri (string-append "http://libarchive.org/downloads/libarchive-"
192 version ".tar.gz"))
193 (sha256
194 (base32
27695e22 195 "1rr40hxlm9vy5z2zb5w7pyfkgd1a4s061qapm83s19accb8mpji9"))))
b0e3635e 196 (build-system gnu-build-system)
e3e1ecf6 197 ;; TODO: Add -L/path/to/nettle in libarchive.pc.
b0e3635e
LC
198 (inputs
199 `(("zlib" ,zlib)
200 ("nettle" ,nettle)
201 ("lzo" ,lzo)
202 ("bzip2" ,bzip2)
203 ("libxml2" ,libxml2)
204 ("xz" ,xz)))
205 (arguments
206 `(#:phases
207 (alist-cons-before
208 'build 'patch-pwd
209 (lambda _
210 (substitute* "Makefile"
211 (("/bin/pwd") (which "pwd"))))
212 (alist-replace
213 'check
214 (lambda _
215 ;; XXX: The test_owner_parse, test_read_disk, and
216 ;; test_write_disk_lookup tests expect user 'root' to exist, but
217 ;; the chroot's /etc/passwd doesn't have it. Turn off those tests.
218 ;;
219 ;; The tests allow one to disable tests matching a globbing pattern.
220 (and (zero? (system* "make"
221 "libarchive_test" "bsdcpio_test" "bsdtar_test"))
222 ;; XXX: This glob disables too much.
223 (zero? (system* "./libarchive_test" "^test_*_disk*"))
224 (zero? (system* "./bsdcpio_test" "^test_owner_parse"))
225 (zero? (system* "./bsdtar_test"))))
09cbd53c
EF
226 %standard-phases))
227 ;; libarchive/test/test_write_format_gnutar_filenames.c needs to be
228 ;; compiled with C99 or C11 or a gnu variant.
229 #:configure-flags '("CFLAGS=-O2 -g -std=c99")))
b0e3635e
LC
230 (home-page "http://libarchive.org/")
231 (synopsis "Multi-format archive and compression library")
232 (description
233 "Libarchive provides a flexible interface for reading and writing
234archives in various formats such as tar and cpio. Libarchive also supports
235reading and writing archives compressed using various compression filters such
236as gzip and bzip2. The library is inherently stream-oriented; readers
237serially iterate through the archive, writers serially add things to the
35b9e423 238archive. In particular, note that there is currently no built-in support for
b0e3635e
LC
239random access nor for in-place modification.")
240 (license license:bsd-2)))
d42e6122 241
9034dc8f
KK
242(define libarchive-3.3.1
243 (package
244 (inherit libarchive)
245 (name "libarchive")
246 (version "3.3.1")
247 (source
248 (origin
249 (method url-fetch)
250 (uri (string-append "http://libarchive.org/downloads/libarchive-"
251 version ".tar.gz"))
252 (sha256
253 (base32
254 "1rr40hxlm9vy5z2zb5w7pyfkgd1a4s061qapm83s19accb8mpji9"))))))
255
d42e6122
EB
256(define-public rdup
257 (package
258 (name "rdup")
259 (version "1.1.14")
260 (source
261 (origin
262 (method url-fetch)
263 (uri (string-append "http://archive.miek.nl/projects/rdup/rdup-"
264 version ".tar.bz2"))
265 (sha256
266 (base32
e531172d
EB
267 "0aklwd9v7ix0m4ayl762sil685f42cwljzx3jz5skrnjaq32npmj"))
268 (modules '((guix build utils)))
269 (snippet
270 ;; Some test scripts are missing shebangs, which cause "could not
271 ;; execute" errors. Add shebangs.
272 '(for-each
273 (lambda (testscript)
274 (with-atomic-file-replacement
275 (string-append "testsuite/rdup/" testscript)
276 (lambda (in out)
277 (begin
278 (format out "#!/bin/sh\n" )
279 (dump-port in out)))))
280 '("rdup.hardlink.helper"
281 "rdup.hardlink-strip.helper"
282 "rdup.hardlink-strip2.helper"
283 "rdup.pipeline.helper")))))
d42e6122
EB
284 (build-system gnu-build-system)
285 (native-inputs
286 `(("pkg-config" ,pkg-config)
287 ("dejagnu" ,dejagnu)))
288 (inputs
289 `(("glib" ,glib)
290 ("pcre" ,pcre)
291 ("libarchive" ,libarchive)
292 ("nettle" ,nettle)))
293 (arguments
294 `(#:parallel-build? #f ;race conditions
295 #:phases (alist-cons-before
296 'build 'remove-Werror
297 ;; rdup uses a deprecated function from libarchive
298 (lambda _
299 (substitute* "GNUmakefile"
300 (("^(CFLAGS=.*)-Werror" _ front) front)))
e531172d
EB
301 (alist-cons-before
302 'check 'pre-check
303 (lambda _
304 (setenv "HOME" (getcwd))
305 (substitute* "testsuite/rdup/rdup.rdup-up-t-with-file.exp"
306 (("/bin/cat") (which "cat"))))
e881752c 307
e531172d 308 %standard-phases))))
d42e6122
EB
309 (home-page "http://archive.miek.nl/projects/rdup/index.html")
310 (synopsis "Provide a list of files to backup")
311 (description
312 "Rdup is a utility inspired by rsync and the plan9 way of doing backups.
313Rdup itself does not backup anything, it only print a list of absolute
e881752c 314file names to standard output. Auxiliary scripts are needed that act on this
d42e6122 315list and implement the backup strategy.")
b0e3635e 316 (license license:gpl3+)))
22c24621
EB
317
318(define-public btar
319 (package
320 (name "btar")
321 (version "1.1.1")
322 (source
323 (origin
324 (method url-fetch)
325 (uri (string-append "http://vicerveza.homeunix.net/~viric/soft/btar/"
326 "btar-" version ".tar.gz"))
327 (sha256
328 (base32
329 "0miklk4bqblpyzh1bni4x6lqn88fa8fjn15x1k1n8bxkx60nlymd"))))
330 (build-system gnu-build-system)
331 (inputs
332 `(("librsync" ,librsync)))
333 (arguments
334 `(#:make-flags `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
335 "CC=gcc")
336 #:tests? #f ;test input not distributed
337 #:phases
338 (alist-delete
339 'configure ;no configure phase
340 %standard-phases)))
341 (home-page "http://viric.name/cgi-bin/btar/doc/trunk/doc/home.wiki")
342 (synopsis "Tar-compatible archiver")
343 (description
344 "Btar is a tar-compatible archiver which allows arbitrary compression and
345ciphering, redundancy, differential backup, indexed extraction, multicore
346compression, input and output serialisation, and tolerance to partial archive
347errors.")
b0e3635e 348 (license license:gpl3+)))
bd3fc08c
EB
349
350(define-public rdiff-backup
351 (package
352 (name "rdiff-backup")
353 (version "1.2.8")
354 (source
355 (origin
356 (method url-fetch)
357 (uri (string-append "mirror://savannah/rdiff-backup/rdiff-backup-"
358 version ".tar.gz"))
359 (sha256
360 (base32
361 "1nwmmh816f96h0ff1jxk95ad38ilbhbdl5dgibx1d4cl81dsi48d"))))
362 (build-system python-build-system)
bd3fc08c
EB
363 (inputs
364 `(("python" ,python-2)
365 ("librsync" ,librsync)))
366 (arguments
367 `(#:python ,python-2
368 #:tests? #f))
369 (home-page "http://www.nongnu.org/rdiff-backup/")
370 (synopsis "Local/remote mirroring+incremental backup")
371 (description
372 "Rdiff-backup backs up one directory to another, possibly over a network.
373The target directory ends up a copy of the source directory, but extra reverse
374diffs are stored in a special subdirectory of that target directory, so you
375can still recover files lost some time ago. The idea is to combine the best
376features of a mirror and an incremental backup. Rdiff-backup also preserves
377subdirectories, hard links, dev files, permissions, uid/gid ownership,
378modification times, extended attributes, acls, and resource forks. Also,
379rdiff-backup can operate in a bandwidth efficient manner over a pipe, like
380rsync. Thus you can use rdiff-backup and ssh to securely back a hard drive up
381to a remote location, and only the differences will be transmitted. Finally,
e881752c 382rdiff-backup is easy to use and settings have sensible defaults.")
b0e3635e 383 (license license:gpl2+)))
0c146750 384
0da4f365
TD
385(define-public rsnapshot
386 (package
387 (name "rsnapshot")
388 (version "1.4.2")
389 (source
390 (origin
391 (method url-fetch)
392 (uri (string-append
393 "https://github.com/rsnapshot/rsnapshot/releases/download/"
394 version "/rsnapshot-" version ".tar.gz"))
395 (sha256
396 (base32
397 "05jfy99a0xs6lvsjfp3wz21z0myqhmwl2grn3jr9clijbg282ah4"))))
398 (build-system gnu-build-system)
399 (arguments
400 `(#:phases
401 (modify-phases %standard-phases
402 (replace 'check
403 (lambda _
404 (substitute* '("t/cmd-post_pre-exec/conf/pre-true-post-true.conf"
405 "t/backup_exec/conf/backup_exec_fail.conf"
406 "t/backup_exec/conf/backup_exec.conf")
407 (("/bin/true") (which "true"))
408 (("/bin/false") (which "false")))
409 (zero? (system* "make" "test")))))))
410 (inputs
411 `(("perl" ,perl)
412 ("rsync" ,rsync)))
413 (home-page "http://rsnapshot.org")
414 (synopsis "Deduplicating snapshot backup utility based on rsync")
415 (description "rsnapshot is a filesystem snapshot utility based on rsync.
416rsnapshot makes it easy to make periodic snapshots of local machines, and
417remote machines over SSH. To reduce the disk space required for each backup,
418rsnapshot uses hard links to deduplicate identical files.")
419 (license license:gpl2+)))
420
362f496d
LC
421(define-public libchop
422 (package
423 (name "libchop")
424 (version "0.5.2")
425 (source (origin
426 (method url-fetch)
427 (uri (string-append "mirror://savannah/libchop/libchop-"
428 version ".tar.gz"))
429 (sha256
430 (base32
431 "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g"))
fc1adab1 432 (patches (search-patches "diffutils-gets-undeclared.patch"))))
362f496d
LC
433 (build-system gnu-build-system)
434 (native-inputs
435 `(("guile" ,guile-2.0)
436 ("gperf" ,gperf)
437 ("pkg-config" ,pkg-config)))
438 (inputs
439 `(("guile" ,guile-2.0)
440 ("util-linux" ,util-linux)
441 ("gnutls" ,gnutls)
442 ("tdb" ,tdb)
443 ("bdb" ,bdb)
444 ("gdbm" ,gdbm)
445 ("libgcrypt" ,libgcrypt)
446 ("lzo" ,lzo)
447 ("bzip2" ,bzip2)
448 ("zlib" ,zlib)))
449 (home-page "http://nongnu.org/libchop/")
450 (synopsis "Tools & library for data backup and distributed storage")
451 (description
452 "Libchop is a set of utilities and library for data backup and
453distributed storage. Its main application is @command{chop-backup}, an
454encrypted backup program that supports data integrity checks, versioning,
455distribution among several sites, selective sharing of stored data, adaptive
456compression, and more. The library itself implements storage techniques such
457as content-addressable storage, content hash keys, Merkle trees, similarity
458detection, and lossless compression.")
459 (license license:gpl3+)))
6fc5c11b
LF
460
461(define-public borg
462 (package
463 (name "borg")
cd4f35c3 464 (version "1.0.11")
6fc5c11b
LF
465 (source (origin
466 (method url-fetch)
2d74d94b 467 (uri (pypi-uri "borgbackup" version))
6fc5c11b
LF
468 (sha256
469 (base32
cd4f35c3 470 "14fjk5dfwmjkn7nmkbhhbrk3g1wfrn8arvqd5r9jaij534nzsvpw"))
f99cfc19
EF
471 (modules '((guix build utils)))
472 (snippet
473 '(for-each
474 delete-file (find-files "borg" "^(c|h|p).*\\.c$")))))
6fc5c11b
LF
475 (build-system python-build-system)
476 (arguments
c21b1a1f
LF
477 `(#:modules ((srfi srfi-26) ; for cut
478 (guix build utils)
479 (guix build python-build-system))
480 #:phases
6fc5c11b
LF
481 (modify-phases %standard-phases
482 (add-after 'unpack 'set-env
483 (lambda* (#:key inputs #:allow-other-keys)
484 (let ((openssl (assoc-ref inputs "openssl"))
485 (lz4 (assoc-ref inputs "lz4")))
486 (setenv "BORG_OPENSSL_PREFIX" openssl)
487 (setenv "BORG_LZ4_PREFIX" lz4)
488 (setenv "PYTHON_EGG_CACHE" "/tmp")
b4f91d0e
LF
489 ;; The test 'test_return_codes[python]' fails when
490 ;; HOME=/homeless-shelter.
491 (setenv "HOME" "/tmp")
6fc5c11b 492 #t)))
b4f91d0e
LF
493 ;; The tests need to be run after Borg is installed.
494 (delete 'check)
495 (add-after 'install 'check
1d60f7c2
LF
496 (lambda* (#:key inputs outputs #:allow-other-keys)
497 ;; Make the installed package available for the test suite.
498 (add-installed-pythonpath inputs outputs)
8cb3e7e7
LF
499 ;; The tests should be run in an empty directory.
500 (mkdir-p "tests")
501 (with-directory-excursion "tests"
502 (zero?
503 (system* "py.test" "-v" "--pyargs" "borg.testsuite" "-k"
504 (string-append
505 ;; These tests need to write to '/var'.
506 "not test_get_cache_dir "
507 "and not test_get_keys_dir "
508 "and not test_get_security_dir "
509 ;; These tests assume there is a root user in
510 ;; '/etc/passwd'.
511 "and not test_access_acl "
512 "and not test_default_acl "
513 "and not test_non_ascii_acl "
514 ;; This test needs the unpackaged pytest-benchmark.
515 "and not benchmark "
516 ;; These tests assume the kernel supports FUSE.
517 "and not test_fuse "
518 "and not test_fuse_allow_damaged_files"))))))
6fc5c11b
LF
519 (add-after 'install 'install-doc
520 (lambda* (#:key outputs #:allow-other-keys)
521 (let* ((out (assoc-ref outputs "out"))
c21b1a1f
LF
522 (man (string-append out "/share/man/man1"))
523 (misc (string-append out "/share/borg/misc")))
524 (for-each (cut install-file <> misc)
525 '("docs/misc/create_chunker-params.txt"
526 "docs/misc/internals-picture.txt"
527 "docs/misc/prune-example.txt"))
6fc5c11b
LF
528 (and
529 (zero? (system* "python3" "setup.py" "build_ext" "--inplace"))
530 (zero? (system* "make" "-C" "docs" "man"))
531 (begin
532 (install-file "docs/_build/man/borg.1" man)
533 #t))))))))
534 (native-inputs
f99cfc19
EF
535 `(("python-cython" ,python-cython)
536 ("python-setuptools-scm" ,python-setuptools-scm)
65a3bdf7
LF
537 ;; Borg 1.0.8's test suite uses 'tmpdir_factory', which was introduced in
538 ;; pytest 2.8.
23b9168d 539 ("python-pytest" ,python-pytest-3.0)
6fc5c11b
LF
540 ;; For generating the documentation.
541 ("python-sphinx" ,python-sphinx)
542 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
543 (inputs
544 `(("acl" ,acl)
545 ("lz4" ,lz4)
546 ("openssl" ,openssl)
547 ("python-llfuse" ,python-llfuse)
548 ("python-msgpack" ,python-msgpack)))
549 (synopsis "Deduplicated, encrypted, authenticated and compressed backups")
550 (description "Borg is a deduplicating backup program. Optionally, it
551supports compression and authenticated encryption. The main goal of Borg is to
552provide an efficient and secure way to backup data. The data deduplication
553technique used makes Borg suitable for daily backups since only changes are
554stored. The authenticated encryption technique makes it suitable for backups
555to not fully trusted targets. Borg is a fork of Attic.")
556 (home-page "https://borgbackup.github.io/borgbackup/")
557 (license license:bsd-3)))
b2fe9183
LF
558
559(define-public attic
560 (package
561 (name "attic")
562 (version "0.16")
563 (source (origin
564 (method url-fetch)
565 (uri (string-append
566 "https://pypi.python.org/packages/source/A/Attic/Attic-"
567 version ".tar.gz"))
568 (sha256
569 (base32
570 "0b5skd36r4c0915lwpkqg5hxm49gls9pprs1b7hc40910wlcsl36"))))
571 (build-system python-build-system)
572 (arguments
1df6d73b
LF
573 `(;; The tests assume they are run as root:
574 ;; https://github.com/jborg/attic/issues/7
575 #:tests? #f
576 #:phases
b2fe9183
LF
577 (modify-phases %standard-phases
578 (add-before
579 'build 'set-openssl-prefix
580 (lambda* (#:key inputs #:allow-other-keys)
581 (setenv "ATTIC_OPENSSL_PREFIX" (assoc-ref inputs "openssl"))
582 #t)))))
583 (inputs
584 `(("acl" ,acl)
585 ("openssl" ,openssl)
586 ("python-msgpack" ,python-msgpack)
587
588 ;; Attic is probably incompatible with llfuse > 0.41.
589 ;; These links are to discussions of llfuse compatibility from
590 ;; the borg project. Borg is a recent fork of attic, and attic
591 ;; has not been updated since the fork, so it's likely that
592 ;; llfuse compatibility requirements are still the same.
593 ;; https://github.com/borgbackup/borg/issues/642
594 ;; https://github.com/borgbackup/borg/issues/643
595 ("python-llfuse" ,python-llfuse-0.41)))
596 (synopsis "Deduplicating backup program")
597 (description "Attic is a deduplicating backup program. The main goal of
598Attic is to provide an efficient and secure way to backup data. The data
599deduplication technique used makes Attic suitable for daily backups since only
600changes are stored.")
601 (home-page "https://attic-backup.org/")
602 (license license:bsd-3)
603 (properties `((superseded . ,borg)))))
3b402139
TGR
604
605(define-public wimlib
606 (package
607 (name "wimlib")
ea94aff7 608 (version "1.12.0")
3b402139
TGR
609 (source (origin
610 (method url-fetch)
611 (uri (string-append "https://wimlib.net/downloads/"
612 name "-" version ".tar.gz"))
613 (sha256
614 (base32
ea94aff7 615 "0ks6hq7vwq13ljkzxp3a490bf8dnracgl2azf57rg49ad2fzab45"))))
3b402139
TGR
616 (build-system gnu-build-system)
617 (native-inputs
618 `(("pkg-config" ,pkg-config)))
619 (inputs
620 `(("fuse" ,fuse)
621 ("libxml2" ,libxml2)
622 ("ntfs-3g" ,ntfs-3g)
623 ("openssl" ,openssl)))
624 (arguments
625 `(#:configure-flags (list "--enable-test-support")))
626 (home-page "https://wimlib.net/")
627 (synopsis "WIM file manipulation library and utilities")
628 (description "wimlib is a C library and set of command-line utilities for
629creating, modifying, extracting, and mounting archives in the Windows Imaging
630Format (@dfn{WIM files}). It can capture and apply WIMs directly from and to
631NTFS volumes using @code{ntfs-3g}, preserving NTFS-specific attributes.")
632 ;; wimlib is dual-licenced under version 3 or later of either the GPL or
633 ;; LGPL, except those files explicitly marked as being released into the
634 ;; public domain (CC0) in their headers.
635 (license (list license:gpl3+
636 license:lgpl3+
637 license:cc0))))
a2fa9c3d
AI
638
639(define-public obnam
640 (package
641 (name "obnam")
642 (version "1.21")
643 (source
644 (origin
645 (method url-fetch)
646 (uri (string-append
647 "http://code.liw.fi/debian/pool/main/o/obnam/obnam_"
648 version ".orig.tar.xz"))
649 (sha256
650 (base32
651 "0qlipsq50hca71zc0dp1mg9zs12qm0sbblw7qfzl0hj6mk2rv1by"))))
652 (build-system python-build-system)
653 (arguments
f75b1400
AI
654 `(#:python ,python-2
655 #:phases
656 (modify-phases %standard-phases
657 (replace 'check
658 (lambda _
659 (substitute* "obnamlib/vfs_local_tests.py"
660 ;; Check for the nobody user instead of root
661 (("self.fs.get_username\\(0\\), 'root'")
662 "self.fs.get_username(65534), 'nobody'")
663 ;; Disable tests checking for root group
664 (("self.fs.get_groupname\\(0\\)") "'root'"))
665 (substitute* "obnamlib/vfs_local.py"
666 ;; Don't cover get_groupname function
667 (("def get_groupname\\(self, gid\\):")
668 "def get_groupname(self, gid): # pragma: no cover"))
669 ;; Can't run network tests
670 (zero? (system* "./check" "--unit-tests")))))))
a2fa9c3d
AI
671 (inputs
672 `(("python2-cliapp" ,python2-cliapp)
673 ("python2-larch" ,python2-larch)
674 ("python2-paramiko" ,python2-paramiko)
675 ("python2-pyaml" ,python2-pyaml)
676 ("python2-tracing" ,python2-tracing)
677 ("python2-ttystatus" ,python2-ttystatus)))
f75b1400
AI
678 (native-inputs
679 `(("gnupg" ,gnupg)
680 ("python2-coverage" ,python2-coverage)
681 ("python2-coverage-test-runner" ,python2-coverage-test-runner)
682 ("python2-pep8" ,python2-pep8)
683 ("python2-pylint" ,python2-pylint)))
a2fa9c3d
AI
684 (home-page "https://obnam.org/")
685 (synopsis "Easy and secure backup program")
686 (description "Obnam is an easy, secure backup program. Features
687include snapshot backups, data de-duplication and encrypted backups
688using GnuPG. Backups can be stored on local hard disks, or online via
689the SSH SFTP protocol. The backup server, if used, does not require
690any special software, on top of SSH.")
691 (license license:gpl3+)))