aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/diffoscope.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2021-10-04 20:59:29 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2021-10-04 21:21:11 +0200
commit9f55a39cf19dab41cfe7198b35a6c62a2270fb0d (patch)
treed4cdba9d0b18c8af1a57bfefc941c0eed6245c8e /gnu/packages/diffoscope.scm
parent5a1aa90775a36c23cf94a3b1f6b52f9ceed2c288 (diff)
downloadguix-9f55a39cf19dab41cfe7198b35a6c62a2270fb0d.tar
guix-9f55a39cf19dab41cfe7198b35a6c62a2270fb0d.tar.gz
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.
Diffstat (limited to 'gnu/packages/diffoscope.scm')
-rw-r--r--gnu/packages/diffoscope.scm51
1 files changed, 31 insertions, 20 deletions
diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scm
index 35e4783b2a..6e8363d819 100644
--- a/gnu/packages/diffoscope.scm
+++ b/gnu/packages/diffoscope.scm
@@ -72,16 +72,18 @@
(define-public diffoscope
(package
(name "diffoscope")
- (version "177")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://salsa.debian.org/reproducible-builds/diffoscope.git")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "02np9dq7jnq48lcmz4k1hvwc6xiqgjhrwr1vsbsfw8rxnp9vs0a5"))))
+ (version "186")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://salsa.debian.org/reproducible-builds/diffoscope.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1qlll5jn76ci5jy915v2kvyngfyycwylxpbdylffzaninvdy3dav"))
+ (patches
+ (search-patches "diffoscope-fix-test_item3_deflate_llvm_bitcode.patch"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
@@ -89,8 +91,7 @@
;; bug in berkeley-db file type detection.
(add-after 'unpack 'remove-berkeley-test
(lambda _
- (delete-file "tests/comparators/test_berkeley_db.py")
- #t))
+ (delete-file "tests/comparators/test_berkeley_db.py")))
(add-after 'unpack 'embed-tool-references
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "diffoscope/comparators/utils/compare.py"
@@ -106,27 +107,37 @@
(("\\['stat',")
(string-append "['" (which "stat") "',"))
(("\\['getfacl',")
- (string-append "['" (which "getfacl") "',")))
- #t))
+ (string-append "['" (which "getfacl") "',")))))
(add-after 'build 'build-man-page
(lambda* (#:key (make-flags '()) #:allow-other-keys)
(apply invoke "make" "-C" "doc" make-flags)))
(add-before 'check 'writable-test-data
(lambda _
;; Tests may need write access to tests directory.
- (for-each make-file-writable (find-files "tests"))
- #t))
+ (for-each make-file-writable (find-files "tests"))))
+ (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
+ ;; Please add new tests to fix-failing-test and not here ;-)
(lambda _
;; This requires /sbin to be in $PATH.
- (delete-file "tests/test_tools.py")
- #t))
+ (delete-file "tests/test_tools.py")))
(add-after 'install 'install-man-page
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(man (string-append out "/share/man/man1")))
- (install-file "doc/diffoscope.1" man)
- #t))))))
+ (install-file "doc/diffoscope.1" man)))))))
(inputs `(("rpm" ,rpm) ;for rpm-python
("python-debian" ,python-debian)
("python-libarchive-c" ,python-libarchive-c)