gnu: diffoscope: Update to 186.
* gnu/packages/diffoscope.scm (diffoscope): Update to 186. [source]: Add patch. [arguments]: Add a new 'fix-failing-tests phase. Don't explicitly return #t from phases. * gnu/packages/patches/diffoscope-fix-test_item3_deflate_llvm_bitcode.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.
This commit is contained in:
parent
5a1aa90775
commit
9f55a39cf1
3 changed files with 60 additions and 20 deletions
|
@ -975,6 +975,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/desmume-gcc6-fixes.patch \
|
%D%/packages/patches/desmume-gcc6-fixes.patch \
|
||||||
%D%/packages/patches/desmume-gcc7-fixes.patch \
|
%D%/packages/patches/desmume-gcc7-fixes.patch \
|
||||||
%D%/packages/patches/dfu-programmer-fix-libusb.patch \
|
%D%/packages/patches/dfu-programmer-fix-libusb.patch \
|
||||||
|
%D%/packages/patches/diffoscope-fix-test_item3_deflate_llvm_bitcode.patch \
|
||||||
%D%/packages/patches/diffutils-gets-undeclared.patch \
|
%D%/packages/patches/diffutils-gets-undeclared.patch \
|
||||||
%D%/packages/patches/disarchive-cross-compilation.patch \
|
%D%/packages/patches/disarchive-cross-compilation.patch \
|
||||||
%D%/packages/patches/dkimproxy-add-ipv6-support.patch \
|
%D%/packages/patches/dkimproxy-add-ipv6-support.patch \
|
||||||
|
|
|
@ -72,16 +72,18 @@
|
||||||
(define-public diffoscope
|
(define-public diffoscope
|
||||||
(package
|
(package
|
||||||
(name "diffoscope")
|
(name "diffoscope")
|
||||||
(version "177")
|
(version "186")
|
||||||
(source (origin
|
(source
|
||||||
(method git-fetch)
|
(origin
|
||||||
(uri (git-reference
|
(method git-fetch)
|
||||||
(url "https://salsa.debian.org/reproducible-builds/diffoscope.git")
|
(uri (git-reference
|
||||||
(commit version)))
|
(url "https://salsa.debian.org/reproducible-builds/diffoscope.git")
|
||||||
(file-name (git-file-name name version))
|
(commit version)))
|
||||||
(sha256
|
(file-name (git-file-name name version))
|
||||||
(base32
|
(sha256
|
||||||
"02np9dq7jnq48lcmz4k1hvwc6xiqgjhrwr1vsbsfw8rxnp9vs0a5"))))
|
(base32 "1qlll5jn76ci5jy915v2kvyngfyycwylxpbdylffzaninvdy3dav"))
|
||||||
|
(patches
|
||||||
|
(search-patches "diffoscope-fix-test_item3_deflate_llvm_bitcode.patch"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases (modify-phases %standard-phases
|
`(#:phases (modify-phases %standard-phases
|
||||||
|
@ -89,8 +91,7 @@
|
||||||
;; bug in berkeley-db file type detection.
|
;; bug in berkeley-db file type detection.
|
||||||
(add-after 'unpack 'remove-berkeley-test
|
(add-after 'unpack 'remove-berkeley-test
|
||||||
(lambda _
|
(lambda _
|
||||||
(delete-file "tests/comparators/test_berkeley_db.py")
|
(delete-file "tests/comparators/test_berkeley_db.py")))
|
||||||
#t))
|
|
||||||
(add-after 'unpack 'embed-tool-references
|
(add-after 'unpack 'embed-tool-references
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(substitute* "diffoscope/comparators/utils/compare.py"
|
(substitute* "diffoscope/comparators/utils/compare.py"
|
||||||
|
@ -106,27 +107,37 @@
|
||||||
(("\\['stat',")
|
(("\\['stat',")
|
||||||
(string-append "['" (which "stat") "',"))
|
(string-append "['" (which "stat") "',"))
|
||||||
(("\\['getfacl',")
|
(("\\['getfacl',")
|
||||||
(string-append "['" (which "getfacl") "',")))
|
(string-append "['" (which "getfacl") "',")))))
|
||||||
#t))
|
|
||||||
(add-after 'build 'build-man-page
|
(add-after 'build 'build-man-page
|
||||||
(lambda* (#:key (make-flags '()) #:allow-other-keys)
|
(lambda* (#:key (make-flags '()) #:allow-other-keys)
|
||||||
(apply invoke "make" "-C" "doc" make-flags)))
|
(apply invoke "make" "-C" "doc" make-flags)))
|
||||||
(add-before 'check 'writable-test-data
|
(add-before 'check 'writable-test-data
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Tests may need write access to tests directory.
|
;; Tests may need write access to tests directory.
|
||||||
(for-each make-file-writable (find-files "tests"))
|
(for-each make-file-writable (find-files "tests"))))
|
||||||
#t))
|
(add-before 'check 'fix-failing-test
|
||||||
|
(lambda _
|
||||||
|
;; There is no user name mapping in the build environment.
|
||||||
|
;; Pytest made it so much harder than should be necessary,
|
||||||
|
;; so I'm leaving… this here in case I ever need it again:
|
||||||
|
;; (substitute* "tests/comparators/test_squashfs.py"
|
||||||
|
;; (("^def test_symlink_root.*" match) ; no, I don't
|
||||||
|
;; (string-append ; know Python
|
||||||
|
;; match "\n raise ValueError(" ; why do you
|
||||||
|
;; "differences_root[1].unified_diff)\n"))) ; ask
|
||||||
|
(substitute* "tests/data/squashfs_root_expected_diff"
|
||||||
|
(("root/root")
|
||||||
|
'"0/0 "))))
|
||||||
(add-before 'check 'delete-failing-test
|
(add-before 'check 'delete-failing-test
|
||||||
|
;; Please add new tests to fix-failing-test and not here ;-)
|
||||||
(lambda _
|
(lambda _
|
||||||
;; This requires /sbin to be in $PATH.
|
;; This requires /sbin to be in $PATH.
|
||||||
(delete-file "tests/test_tools.py")
|
(delete-file "tests/test_tools.py")))
|
||||||
#t))
|
|
||||||
(add-after 'install 'install-man-page
|
(add-after 'install 'install-man-page
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(man (string-append out "/share/man/man1")))
|
(man (string-append out "/share/man/man1")))
|
||||||
(install-file "doc/diffoscope.1" man)
|
(install-file "doc/diffoscope.1" man)))))))
|
||||||
#t))))))
|
|
||||||
(inputs `(("rpm" ,rpm) ;for rpm-python
|
(inputs `(("rpm" ,rpm) ;for rpm-python
|
||||||
("python-debian" ,python-debian)
|
("python-debian" ,python-debian)
|
||||||
("python-libarchive-c" ,python-libarchive-c)
|
("python-libarchive-c" ,python-libarchive-c)
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
From b7eeac09eb068083bdee1a3aa062d1e52a2fa61a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
|
Date: Mon, 4 Oct 2021 21:03:43 +0200
|
||||||
|
Subject: [PATCH] gnu: diffoscope: Fix test_item3_deflate_llvm_bitcode.
|
||||||
|
|
||||||
|
Taken verbatim from Nixpkgs[0].
|
||||||
|
|
||||||
|
[0]: https://github.com/NixOS/nixpkgs/blob/589e03f109092a3ba97781fd0533110bf78a3f97/pkgs/tools/misc/diffoscope/fix-tests.patch
|
||||||
|
---
|
||||||
|
tests/comparators/test_rlib.py | 3 ---
|
||||||
|
1 file changed, 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/comparators/test_rlib.py b/tests/comparators/test_rlib.py
|
||||||
|
index 8d201ab..05960aa 100644
|
||||||
|
--- a/tests/comparators/test_rlib.py
|
||||||
|
+++ b/tests/comparators/test_rlib.py
|
||||||
|
@@ -81,9 +81,6 @@ def rlib_dis_expected_diff():
|
||||||
|
if actual_ver >= "7.0":
|
||||||
|
diff_file = "rlib_llvm_dis_expected_diff_7"
|
||||||
|
|
||||||
|
- if actual_ver >= "10.0":
|
||||||
|
- diff_file = "rlib_llvm_dis_expected_diff_10"
|
||||||
|
-
|
||||||
|
return get_data(diff_file)
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
Reference in a new issue