diff options
Diffstat (limited to 'gnu/packages/backup.scm')
-rw-r--r-- | gnu/packages/backup.scm | 173 |
1 files changed, 42 insertions, 131 deletions
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 42eebac7fa..4e59f3dd48 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -21,12 +21,13 @@ ;;; Copyright © 2021 Timothy Sample <samplet@ngyro.com> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev> -;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2022 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2022 Feng Shu <tumashu@163.com> ;;; Copyright © 2023 Timo Wilken <guix@twilken.net> ;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr> ;;; Copyright © 2024 jgart <jgart@dismail.de> ;;; Copyright © 2025 Kjartan Oli Agustsson <kjartanoli@outlook.com> +;;; Copyright © 2025 mstenek <mstenek@disroot.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -123,7 +124,7 @@ (file-name (git-file-name name version)) (sha256 (base32 "14x5brpq1l400i9l2hnyqmbn19cc1hnbmj5fn8cs8zzwzbgrfxng")))) - (build-system python-build-system) + (build-system pyproject-build-system) (native-inputs (list gettext-minimal ; for msgfmt gobject-introspection @@ -148,8 +149,7 @@ gnupg ; gpg executable needed util-linux)) ; for setsid (arguments - (list #:test-target "test" - #:phases + (list #:phases #~(modify-phases %standard-phases (add-before 'build 'use-store-file-names (lambda* (#:key inputs #:allow-other-keys) @@ -571,97 +571,6 @@ remote machines over SSH. To reduce the disk space required for each backup, rsnapshot uses hard links to deduplicate identical files.") (license license:gpl2+))) -(define-public libchop - (package - (name "libchop") - (version "0.5.2") - (source (origin - (method url-fetch) - (uri (string-append "mirror://savannah/libchop/libchop-" - version ".tar.gz")) - (sha256 - (base32 - "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Gnulib's <stdio.h> refers to 'gets' for the purposes of - ;; warning against its use, but 'gets' is no longer declared - ;; in glibc's <stdio.h>. Remove that warning. - (substitute* "lib/stdio.in.h" - (("_GL_WARN_ON_USE \\(gets,.*") - "\n/* 'gets' is gone, rejoice! */\n")) - - ;; Include all the libtirpc headers necessary to get the - ;; definitions of 'u_int', etc. - (substitute* '("src/block-server.c" - "include/chop/block-server.h" - "utils/chop-block-server.c") - (("#include <rpc/(.*)\\.h>" _ header) - (string-append "#include <rpc/types.h>\n" - "#include <rpc/rpc.h>\n" - "#include <rpc/" header ".h>\n"))))))) - (build-system gnu-build-system) - (arguments - '(;; Link against libtirpc. - #:configure-flags '("LDFLAGS=-ltirpc -Wl,--as-needed") - - #:phases (modify-phases %standard-phases - (add-before 'configure 'adjust-configure-script - (lambda _ - ;; Mimic upstream commit - ;; 25750ab5ef82fd3cfce5205d5f1ef07b47098091. - (substitute* "configure" - (("GUILE=(.*)--variable bindir`" _ middle) - (string-append "GUILE=" middle - "--variable bindir`/guile"))))) - (add-before 'build 'set-libtirpc-include-path - (lambda* (#:key inputs #:allow-other-keys) - ;; Allow <rpc/rpc.h> & co. to be found. - (let ((tirpc (string-append (assoc-ref inputs "libtirpc") - "/include/tirpc"))) - (if (getenv "CPATH") - (setenv "CPATH" - (string-append (getenv "CPATH") - ":" tirpc)) - (setenv "CPATH" tirpc))))) - (add-before 'check 'adjust-test - (lambda _ - ;; This test uses a weird construct to spawn - ;; 'chop-block-server' in the background. Replace it - ;; with something that actually works. - (substitute* "tests/utils/block-server" - (("chop_fail_if ! chop-block-server") - "chop-block-server") - (("'&'") - "&"))))))) - (native-inputs - (list guile-2.0 gperf-3.0 ;see <https://bugs.gnu.org/32382> - pkg-config rpcsvc-proto)) ;for 'rpcgen' - (inputs - (list guile-2.0 - util-linux - libtirpc - gnutls - tdb - bdb - gdbm - libgcrypt - lzo - bzip2 - zlib)) - (home-page "https://nongnu.org/libchop/") - (synopsis "Tools & library for data backup and distributed storage") - (description - "Libchop is a set of utilities and library for data backup and -distributed storage. Its main application is @command{chop-backup}, an -encrypted backup program that supports data integrity checks, versioning, -distribution among several sites, selective sharing of stored data, adaptive -compression, and more. The library itself implements storage techniques such -as content-addressable storage, content hash keys, Merkle trees, similarity -detection, and lossless compression.") - (license license:gpl3+))) - (define-public borg (package (name "borg") @@ -691,12 +600,37 @@ detection, and lossless compression.") "src/borg/platform/posix.c" "src/borg/platform/syncfilerange.c" "src/borg/platform/windows.c")))))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list #:modules '((srfi srfi-26) ; for cut (guix build utils) - (guix build python-build-system)) + (guix build pyproject-build-system)) + #:test-flags + #~(list "--benchmark-skip" + "--numprocesses" (number->string (parallel-job-count)) + "--pyargs" "borg.testsuite" + "-k" (string-join + ;; These tests need to write to '/var'. + (list "not test_get_cache_dir " + "test_get_config_dir " + "test_get_keys_dir " + "test_get_security_dir " + ;; These tests assume there is a root user in '/etc/passwd'. + "test_access_acl " + "test_default_acl " + "test_get_item_uid_gid " + "test_create_content_from_command " + "test_create_content_from_command_with_failed_command " + "test_create_stdin " + ;; These tests assume the kernel supports FUSE. + "test_fuse " + "test_fuse_allow_damaged_files " + "test_mount_hardlinks " + "test_readonly_mount " + "test_fuse_versions_view " + "test_migrate_lock_alive") + " and not ")) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'set-env @@ -711,35 +645,6 @@ detection, and lossless compression.") (setenv "BORG_LIBLZ4_PREFIX" lz4) (setenv "BORG_LIBXXHASH_PREFIX" xxhash) (setenv "BORG_LIBZSTD_PREFIX" zstd)))) - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - ;; The tests should be run in an empty directory. - (mkdir-p "tests") - (with-directory-excursion "tests" - (invoke "py.test" "-v" "--pyargs" "borg.testsuite" "-k" - (string-append - ;; These tests need to write to '/var'. - "not test_get_cache_dir " - "and not test_get_config_dir " - "and not test_get_keys_dir " - "and not test_get_security_dir " - ;; These tests assume there is a root user in '/etc/passwd'. - "and not test_access_acl " - "and not test_default_acl " - "and not test_get_item_uid_gid " - "and not test_create_content_from_command " - "and not test_create_content_from_command_with_failed_command " - "and not test_create_stdin " - ;; We don't need to run benchmarks - "and not benchmark " - ;; These tests assume the kernel supports FUSE. - "and not test_fuse " - "and not test_fuse_allow_damaged_files " - "and not test_mount_hardlinks " - "and not test_readonly_mount " - "and not test_fuse_versions_view " - "and not test_migrate_lock_alive")))))) (add-after 'install 'install-doc (lambda _ (let ((man (string-append #$output "/share/man/man1")) @@ -763,13 +668,20 @@ detection, and lossless compression.") (install-file "fish/borg.fish" (string-append share "/fish/vendor_completions.d"))))))))) (native-inputs - (list python-cython python-dateutil python-setuptools-scm python-pytest)) + (list python-cython + python-dateutil + python-pytest + python-pytest-benchmark + python-pytest-xdist + python-setuptools + python-setuptools-scm + python-wheel)) (inputs (list acl lz4 openssl ;; This is the latest version of msgpack accepted by 'setup.py'. - python-msgpack + python-msgpack-for-borg ;; FUSE 3 isn't working well, so we stick with FUSE 2 for now: ;; <https://issues.guix.gnu.org/53407> python-llfuse @@ -1329,13 +1241,13 @@ compression parameters used by Gzip.") (define-public borgmatic (package (name "borgmatic") - (version "1.8.14") + (version "2.0.7") (source (origin (method url-fetch) (uri (pypi-uri "borgmatic" version)) (sha256 - (base32 "0im7kx9mq1gymid88wa6yxcif4bdqpz5lag5fp9kpm8r5k13p2sr")))) + (base32 "01l44ny2zyn7x1hhbvhhhwr12jipcjxl3j1cz13kf6c3bdfwms8y")))) (build-system pyproject-build-system) (arguments (list @@ -1371,7 +1283,6 @@ compression parameters used by Gzip.") (inputs (list borg python-apprise - python-colorama python-jsonschema python-requests python-ruamel.yaml)) |