Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / backup.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
3 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
4 ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
7 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
8 ;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org>
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)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix download)
29 #:use-module (guix utils)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system python)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages acl)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages databases)
38 #:use-module (gnu packages dejagnu)
39 #:use-module (gnu packages ftp)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gnupg)
42 #:use-module (gnu packages gperf)
43 #:use-module (gnu packages guile)
44 #:use-module (gnu packages linux)
45 #:use-module (gnu packages mcrypt)
46 #:use-module (gnu packages nettle)
47 #:use-module (gnu packages pcre)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages python)
51 #:use-module (gnu packages rsync)
52 #:use-module (gnu packages ssh)
53 #:use-module (gnu packages tls)
54 #:use-module (gnu packages xml))
55
56 (define-public duplicity
57 (package
58 (name "duplicity")
59 (version "0.7.12")
60 (source
61 (origin
62 (method url-fetch)
63 (uri (string-append "https://code.launchpad.net/duplicity/"
64 (version-major+minor version)
65 "-series/" version "/+download/duplicity-"
66 version ".tar.gz"))
67 (sha256
68 (base32
69 "1rhgrz2lm9vbfdp2raykrih1c6n2lw5jd572z4dsz488m52avjqi"))))
70 (build-system python-build-system)
71 (native-inputs
72 `(("util-linux" ,util-linux) ;setsid command, for the tests
73 ("par2cmdline" ,par2cmdline)
74 ("python-pexpect" ,python2-pexpect)
75 ("mock" ,python2-mock)))
76 (propagated-inputs
77 `(("lockfile" ,python2-lockfile)
78 ("urllib3" ,python2-urllib3)))
79 (inputs
80 `(("librsync" ,librsync)
81 ("lftp" ,lftp)
82 ("gnupg" ,gnupg) ;gpg executable needed
83 ("util-linux" ,util-linux) ;for setsid
84 ("tzdata" ,tzdata)))
85 (arguments
86 `(#:python ,python-2 ;setup assumes Python 2
87 #:test-target "test"
88 #:phases
89 (modify-phases %standard-phases
90 (add-before 'build 'patch-source
91 (lambda* (#:key inputs #:allow-other-keys)
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")
98 (("/bin/sh") (which "sh")))
99 #t))
100 (add-before 'check 'check-setup
101 (lambda* (#:key inputs #:allow-other-keys)
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)))))
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
111 and uploading them to a remote or local file server. Because duplicity uses
112 librsync, the incremental archives are space efficient and only record the
113 parts of files that have changed since the last backup. Because duplicity
114 uses GnuPG to encrypt and/or sign these archives, they will be safe from
115 spying and/or modification by the server.")
116 (license license:gpl2+)))
117
118 (define-public par2cmdline
119 (package
120 (name "par2cmdline")
121 (version "0.7.3")
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
129 "0dqwarc2aw5clgpf24d9dxh43b0k0z3l6kksn30arx9bdlmrk5rx"))))
130 (native-inputs
131 `(("automake" ,automake)
132 ("autoconf" ,autoconf)))
133 (build-system gnu-build-system)
134 (arguments
135 `(#:phases
136 (modify-phases %standard-phases
137 (add-after 'unpack 'autoreconf
138 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
139 (synopsis "File verification and repair tools")
140 (description "Par2cmdline uses Reed-Solomon error-correcting codes to
141 generate and verify PAR2 recovery files. These files can be distributed
142 alongside the source files or stored together with back-ups to protect against
143 transmission errors or @dfn{bit rot}, the degradation of storage media over
144 time.
145 Unlike a simple checksum, PAR2 doesn't merely detect errors: as long as the
146 damage isn't too extensive (and smaller than the size of the recovery file), it
147 can even repair them.")
148 (home-page "https://github.com/Parchive/par2cmdline")
149 (license license:gpl3+)))
150
151 (define-public hdup
152 (package
153 (name "hdup")
154 (version "2.0.14")
155 (source
156 (origin
157 (method url-fetch)
158 (uri "https://fossies.org/linux/privat/old/hdup-2.0.14.tar.bz2")
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
178 "Hdup2 is a backup utility, its aim is to make backup really simple. The
179 backup scheduling is done by means of a cron job. It supports an
180 include/exclude mechanism, remote backups, encrypted backups and split
181 backups (called chunks) to allow easy burning to CD/DVD.")
182 (license license:gpl2)))
183
184 (define-public libarchive
185 (package
186 (name "libarchive")
187 (version "3.3.1")
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
195 "1rr40hxlm9vy5z2zb5w7pyfkgd1a4s061qapm83s19accb8mpji9"))))
196 (build-system gnu-build-system)
197 ;; TODO: Add -L/path/to/nettle in libarchive.pc.
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"))))
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")))
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
234 archives in various formats such as tar and cpio. Libarchive also supports
235 reading and writing archives compressed using various compression filters such
236 as gzip and bzip2. The library is inherently stream-oriented; readers
237 serially iterate through the archive, writers serially add things to the
238 archive. In particular, note that there is currently no built-in support for
239 random access nor for in-place modification.")
240 (license license:bsd-2)))
241
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
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
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")))))
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)))
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"))))
307
308 %standard-phases))))
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.
313 Rdup itself does not backup anything, it only print a list of absolute
314 file names to standard output. Auxiliary scripts are needed that act on this
315 list and implement the backup strategy.")
316 (license license:gpl3+)))
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
345 ciphering, redundancy, differential backup, indexed extraction, multicore
346 compression, input and output serialisation, and tolerance to partial archive
347 errors.")
348 (license license:gpl3+)))
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)
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.
373 The target directory ends up a copy of the source directory, but extra reverse
374 diffs are stored in a special subdirectory of that target directory, so you
375 can still recover files lost some time ago. The idea is to combine the best
376 features of a mirror and an incremental backup. Rdiff-backup also preserves
377 subdirectories, hard links, dev files, permissions, uid/gid ownership,
378 modification times, extended attributes, acls, and resource forks. Also,
379 rdiff-backup can operate in a bandwidth efficient manner over a pipe, like
380 rsync. Thus you can use rdiff-backup and ssh to securely back a hard drive up
381 to a remote location, and only the differences will be transmitted. Finally,
382 rdiff-backup is easy to use and settings have sensible defaults.")
383 (license license:gpl2+)))
384
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.
416 rsnapshot makes it easy to make periodic snapshots of local machines, and
417 remote machines over SSH. To reduce the disk space required for each backup,
418 rsnapshot uses hard links to deduplicate identical files.")
419 (license license:gpl2+)))
420
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"))
432 (patches (search-patches "diffutils-gets-undeclared.patch"))))
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
453 distributed storage. Its main application is @command{chop-backup}, an
454 encrypted backup program that supports data integrity checks, versioning,
455 distribution among several sites, selective sharing of stored data, adaptive
456 compression, and more. The library itself implements storage techniques such
457 as content-addressable storage, content hash keys, Merkle trees, similarity
458 detection, and lossless compression.")
459 (license license:gpl3+)))
460
461 (define-public borg
462 (package
463 (name "borg")
464 (version "1.0.11")
465 (source (origin
466 (method url-fetch)
467 (uri (pypi-uri "borgbackup" version))
468 (sha256
469 (base32
470 "14fjk5dfwmjkn7nmkbhhbrk3g1wfrn8arvqd5r9jaij534nzsvpw"))
471 (modules '((guix build utils)))
472 (snippet
473 '(for-each
474 delete-file (find-files "borg" "^(c|h|p).*\\.c$")))))
475 (build-system python-build-system)
476 (arguments
477 `(#:modules ((srfi srfi-26) ; for cut
478 (guix build utils)
479 (guix build python-build-system))
480 #:phases
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")
489 ;; The test 'test_return_codes[python]' fails when
490 ;; HOME=/homeless-shelter.
491 (setenv "HOME" "/tmp")
492 #t)))
493 ;; The tests need to be run after Borg is installed.
494 (delete 'check)
495 (add-after 'install 'check
496 (lambda* (#:key inputs outputs #:allow-other-keys)
497 ;; Make the installed package available for the test suite.
498 (add-installed-pythonpath inputs outputs)
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"))))))
519 (add-after 'install 'install-doc
520 (lambda* (#:key outputs #:allow-other-keys)
521 (let* ((out (assoc-ref outputs "out"))
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"))
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
535 `(("python-cython" ,python-cython)
536 ("python-setuptools-scm" ,python-setuptools-scm)
537 ;; Borg 1.0.8's test suite uses 'tmpdir_factory', which was introduced in
538 ;; pytest 2.8.
539 ("python-pytest" ,python-pytest-3.0)
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
551 supports compression and authenticated encryption. The main goal of Borg is to
552 provide an efficient and secure way to backup data. The data deduplication
553 technique used makes Borg suitable for daily backups since only changes are
554 stored. The authenticated encryption technique makes it suitable for backups
555 to not fully trusted targets. Borg is a fork of Attic.")
556 (home-page "https://borgbackup.github.io/borgbackup/")
557 (license license:bsd-3)))
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
573 `(;; The tests assume they are run as root:
574 ;; https://github.com/jborg/attic/issues/7
575 #:tests? #f
576 #:phases
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
598 Attic is to provide an efficient and secure way to backup data. The data
599 deduplication technique used makes Attic suitable for daily backups since only
600 changes are stored.")
601 (home-page "https://attic-backup.org/")
602 (license license:bsd-3)
603 (properties `((superseded . ,borg)))))
604
605 (define-public wimlib
606 (package
607 (name "wimlib")
608 (version "1.10.0")
609 (source (origin
610 (method url-fetch)
611 (uri (string-append "https://wimlib.net/downloads/"
612 name "-" version ".tar.gz"))
613 (sha256
614 (base32
615 "0mbz03smlc054i2m9q2sbqymml9m897kfs84q7g81i26y811p6wq"))))
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
629 creating, modifying, extracting, and mounting archives in the Windows Imaging
630 Format (@dfn{WIM files}). It can capture and apply WIMs directly from and to
631 NTFS 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))))
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
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")))))))
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)))
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)))
684 (home-page "https://obnam.org/")
685 (synopsis "Easy and secure backup program")
686 (description "Obnam is an easy, secure backup program. Features
687 include snapshot backups, data de-duplication and encrypted backups
688 using GnuPG. Backups can be stored on local hard disks, or online via
689 the SSH SFTP protocol. The backup server, if used, does not require
690 any special software, on top of SSH.")
691 (license license:gpl3+)))