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