summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorVagrant Cascadian <vagrant@reproducible-builds.org>2019-08-19 20:36:22 +0000
committerVagrant Cascadian <vagrant@debian.org>2019-08-25 12:01:39 -0700
commit8c1379ba404b4db2f0afcf431a4ff720b72a7a19 (patch)
treee722de11905713472ce0b9bbe9a304000b3f86e4 /gnu/packages
parent6063a56140619b52d6f2e61de64ec3d19df9bf1e (diff)
gnu: Update diffoscope to 121.
* gnu/packages/package-management (diffoscope): Update to 121. [version] Only define version once. [arguments] Add writeable-test-data phase.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/package-management.scm140
1 files changed, 74 insertions, 66 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index c982cbfe5db..98be2123823 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -561,75 +561,83 @@ transactions from C or Python.")
561 (license license:gpl2+))) 561 (license license:gpl2+)))
562 562
563(define-public diffoscope 563(define-public diffoscope
564 (package 564 (let ((version "121"))
565 (name "diffoscope") 565 (package
566 (version "120") 566 (name "diffoscope")
567 (source (origin 567 (version version)
568 (method git-fetch) 568 (source (origin
569 (uri (git-reference 569 (method git-fetch)
570 (url "https://salsa.debian.org/reproducible-builds/diffoscope.git") 570 (uri (git-reference
571 (commit "120"))) 571 (url "https://salsa.debian.org/reproducible-builds/diffoscope.git")
572 (file-name (git-file-name name version)) 572 (commit version)))
573 (sha256 573 (file-name (git-file-name name version))
574 (base32 574 (sha256
575 "07z9yclvfkw4326739l2ywzzihax5vdijiaqqpfix9rz1rb923aa")))) 575 (base32
576 (build-system python-build-system) 576 "1bw7s8qs1vnr93vhifl6pj6h6w6r6nrpc5anzhh9wx2gcaipkb3m"))))
577 (arguments 577 (build-system python-build-system)
578 `(#:phases (modify-phases %standard-phases 578 (arguments
579 ;; setup.py mistakenly requires python-magic from PyPi, even 579 `(#:phases (modify-phases %standard-phases
580 ;; though the Python bindings of `file` are sufficient. 580 ;; setup.py mistakenly requires python-magic from PyPi, even
581 ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844 581 ;; though the Python bindings of `file` are sufficient.
582 (add-after 'unpack 'dependency-on-python-magic 582 ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844
583 (lambda _ 583 (add-after 'unpack 'dependency-on-python-magic
584 (substitute* "setup.py" 584 (lambda _
585 (("'python-magic',") "")))) 585 (substitute* "setup.py"
586 ;; This test is broken because our `file` package has a 586 (("'python-magic',") ""))))
587 ;; bug in berkeley-db file type detection. 587 ;; This test is broken because our `file` package has a
588 (add-after 'unpack 'remove-berkeley-test 588 ;; bug in berkeley-db file type detection.
589 (lambda _ 589 (add-after 'unpack 'remove-berkeley-test
590 (delete-file "tests/comparators/test_berkeley_db.py") 590 (lambda _
591 #t)) 591 (delete-file "tests/comparators/test_berkeley_db.py")
592 (add-after 'unpack 'embed-tool-references 592 #t))
593 (lambda* (#:key inputs #:allow-other-keys) 593 (add-after 'unpack 'embed-tool-references
594 (substitute* "diffoscope/comparators/utils/compare.py" 594 (lambda* (#:key inputs #:allow-other-keys)
595 (("\\['xxd',") 595 (substitute* "diffoscope/comparators/utils/compare.py"
596 (string-append "['" (which "xxd") "',"))) 596 (("\\['xxd',")
597 (substitute* "diffoscope/comparators/elf.py" 597 (string-append "['" (which "xxd") "',")))
598 (("@tool_required\\('readelf'\\)") "") 598 (substitute* "diffoscope/comparators/elf.py"
599 (("get_tool_name\\('readelf'\\)") 599 (("@tool_required\\('readelf'\\)") "")
600 (string-append "'" (which "readelf") "'"))) 600 (("get_tool_name\\('readelf'\\)")
601 (substitute* "diffoscope/comparators/directory.py" 601 (string-append "'" (which "readelf") "'")))
602 (("@tool_required\\('stat'\\)") "") 602 (substitute* "diffoscope/comparators/directory.py"
603 (("@tool_required\\('getfacl'\\)") "") 603 (("@tool_required\\('stat'\\)") "")
604 (("\\['stat',") 604 (("@tool_required\\('getfacl'\\)") "")
605 (string-append "['" (which "stat") "',")) 605 (("\\['stat',")
606 (("\\['getfacl',") 606 (string-append "['" (which "stat") "',"))
607 (string-append "['" (which "getfacl") "',"))) 607 (("\\['getfacl',")
608 #t)) 608 (string-append "['" (which "getfacl") "',")))
609 (add-before 'check 'delete-failing-test 609 #t))
610 (lambda _ 610 (add-before 'check 'writable-test-data
611 ;; this requires /sbin to be on the path 611 (lambda _
612 (delete-file "tests/test_tools.py") 612 ;; tests/comparators/test_elf.py needs write access to
613 #t))))) 613 ;; test data
614 (inputs `(("rpm" ,rpm) ;for rpm-python 614 (make-file-writable
615 ("python-file" ,python-file) 615 "tests/data/ignore_readelf_errors_expected_diff")
616 ("python-debian" ,python-debian) 616 #t))
617 ("python-libarchive-c" ,python-libarchive-c) 617 (add-before 'check 'delete-failing-test
618 ("python-tlsh" ,python-tlsh) 618 (lambda _
619 ("acl" ,acl) ;for getfacl 619 ;; this requires /sbin to be on the path
620 ("colordiff" ,colordiff) 620 (delete-file "tests/test_tools.py")
621 ("xxd" ,xxd))) 621 #t)))))
622 ;; Below are modules used for tests. 622 (inputs `(("rpm" ,rpm) ;for rpm-python
623 (native-inputs `(("python-pytest" ,python-pytest) 623 ("python-file" ,python-file)
624 ("python-chardet" ,python-chardet))) 624 ("python-debian" ,python-debian)
625 (home-page "https://diffoscope.org/") 625 ("python-libarchive-c" ,python-libarchive-c)
626 (synopsis "Compare files, archives, and directories in depth") 626 ("python-tlsh" ,python-tlsh)
627 (description 627 ("acl" ,acl) ;for getfacl
628 "Diffoscope tries to get to the bottom of what makes files or directories 628 ("colordiff" ,colordiff)
629 ("xxd" ,xxd)))
630 ;; Below are modules used for tests.
631 (native-inputs `(("python-pytest" ,python-pytest)
632 ("python-chardet" ,python-chardet)))
633 (home-page "https://diffoscope.org/")
634 (synopsis "Compare files, archives, and directories in depth")
635 (description
636 "Diffoscope tries to get to the bottom of what makes files or directories
629different. It recursively unpacks archives of many kinds and transforms 637different. It recursively unpacks archives of many kinds and transforms
630various binary formats into more human readable forms to compare them. It can 638various binary formats into more human readable forms to compare them. It can
631compare two tarballs, ISO images, or PDFs just as easily.") 639compare two tarballs, ISO images, or PDFs just as easily.")
632 (license license:gpl3+))) 640 (license license:gpl3+))))
633 641
634(define-public trydiffoscope 642(define-public trydiffoscope
635 (package 643 (package