From 8af878a459ac221be40d8b28dc4c0077f1de4708 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 31 Dec 2025 10:18:41 +0900 Subject: [PATCH] gnu: Add libarchive-next. * gnu/packages/backup.scm (libarchive-next): New variable. Change-Id: Ifc4b9f79fc2a382da69b524ad4a5921ee90e0ba7 --- gnu/packages/backup.scm | 58 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index a38402fc9f331f1c08097fa516c158e0e7223f89..208830334e96a740695c0e77e0669a0036070a26 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -21,7 +21,7 @@ ;;; Copyright © 2021 Timothy Sample ;;; Copyright © 2021 Brice Waegeneire ;;; Copyright © 2021 Sarah Morgensen -;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2022, 2025 Maxim Cournoyer ;;; Copyright © 2022 Feng Shu ;;; Copyright © 2023 Timo Wilken ;;; Copyright © 2024 Nicolas Graves @@ -357,6 +357,62 @@ random access nor for in-place modification. This package provides the @command{bsdcat}, @command{bsdcpio} and @command{bsdtar} commands.") (license license:bsd-2))) +;;; TODO: core update (20k rebuilds). +(define-public libarchive-next + (package + (inherit libarchive) + (name "libarchive") + (version "3.8.4") + (source + (origin + (method url-fetch) + (uri (list (string-append "https://libarchive.org/downloads/libarchive-" + version ".tar.xz") + (string-append "https://github.com/libarchive/libarchive" + "/releases/download/v" version "/libarchive-" + version ".tar.xz"))) + (sha256 + (base32 + "0wxdr7qws1z1b1gp5jsm7n2ccnjlmrnds52d5wc5xkzagyslgf67")))) + (arguments + (substitute-keyword-arguments (package-arguments libarchive) + ((#:phases phases) + #~(modify-phases #$phases + (delete 'patch-pwd) + (add-before 'build 'patch-commands + (lambda _ + (substitute* "Makefile" + (("/bin/pwd") (which "pwd"))) + (substitute* "test_utils/test_main.c" + (("/bin/sh") (which "sh"))))) + (replace 'check + (lambda* (#:key parallel-build? tests? #:allow-other-keys) + (if tests? + (begin + ;; These environment variables are taken from + ;; + (setenv "SKIP_OPEN_FD_ERR_TEST" "1") + (setenv "IGNORE_TRAVERSALS_TEST4" "1") + + ;; XXX: The test_owner_parse, test_read_disk, and + ;; test_write_disk_lookup tests expect user 'root' to + ;; exist, but the chroot's /etc/passwd doesn't have it + ;; (see: + ;; ). + (invoke "make" "-j" (number->string + (if parallel-build? + (parallel-job-count) + 1)) + "libarchive_test" + "bsdcpio_test" + "bsdtar_test") + ;; XXX: This glob disables too much. + (invoke "./libarchive_test" "^test_*_disk*") + (invoke "./bsdcpio_test" "^test_owner_parse") + (invoke "./bsdtar_test")) + ;; Tests may be disabled if cross-compiling. + (format #t "Test suite not run.~%")))))))))) + (define-public rdup (package (name "rdup")