summary refs log tree commit diff
path: root/gnu/packages/diffoscope.scm
diff options
context:
space:
mode:
authorVagrant Cascadian <vagrant@reproducible-builds.org>2022-06-01 15:00:44 -0700
committerVagrant Cascadian <vagrant@debian.org>2022-06-01 19:33:40 -0700
commit2900031f42ba85bebeffdb67a56b0b9cf92019e7 (patch)
tree73f99ff97d69089b8ad481b628e0546d79f91dc7 /gnu/packages/diffoscope.scm
parent1d7222590361ecb0ff56b42872ca6e5754732d08 (diff)
downloadguix-2900031f42ba85bebeffdb67a56b0b9cf92019e7.tar.gz
gnu: diffoscope: Fix comparison of vmlinux files.
* gnu/packages/diffoscope.scm (diffoscope)[arguments]: Add
  'install-extract-vmlinux phase.
  [inputs]: Add python.
Diffstat (limited to 'gnu/packages/diffoscope.scm')
-rw-r--r--gnu/packages/diffoscope.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scm
index de0ace0107..1f0c905563 100644
--- a/gnu/packages/diffoscope.scm
+++ b/gnu/packages/diffoscope.scm
@@ -53,6 +53,7 @@
   #:use-module (gnu packages pascal)
   #:use-module (gnu packages patchutils)
   #:use-module (gnu packages pdf)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sqlite)
@@ -136,12 +137,25 @@
                     (lambda _
                       ;; This requires /sbin to be in $PATH.
                       (delete-file "tests/test_tools.py")))
+                  (add-after 'install 'install-extract-vmlinux
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      ;; Work around bug comparing vmlinux files
+                      ;; https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/305
+                      (let* ((scriptdir (string-append (assoc-ref outputs "out")
+                                                       "/lib/python"
+                                                       ,(version-major+minor
+                                                         (package-version python))
+                                                       "/site-packages/scripts/")))
+                        (mkdir-p scriptdir)
+                        (copy-file "scripts/extract-vmlinux"
+                                   (string-append scriptdir "/extract-vmlinux")))))
                   (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)))))))
     (inputs (list rpm ;for rpm-python
+                  python
                   python-debian
                   python-libarchive-c
                   python-magic