gnu: xen: Build reproducibly

* gnu/packages/virtualization.scm (xen)[source]: Add patches.
[arguments]: Add a new 'remove-cruft phase.
* gnu/packages/patches/xen-docs-use-predictable-ordering.patch,
* gnu/packages/patches/xen-remove-config.gz-timestamp.patch: New files.
* gnu/local.mk (dist_patch_DATA): Add them both.
This commit is contained in:
Tobias Geerinckx-Rice 2023-09-24 02:00:00 +02:00
parent d471465624
commit 1b0ec97bce
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79
4 changed files with 84 additions and 2 deletions

View file

@ -2288,7 +2288,10 @@ DOS or Microsoft Windows.")
(file-name (git-file-name name version))
(sha256
(base32
"1cdzpxbihkdn4za8ly0lgkbxrafjzbxjflhfn83kyg4bam1vv7mn"))))
"1cdzpxbihkdn4za8ly0lgkbxrafjzbxjflhfn83kyg4bam1vv7mn"))
(patches
(search-patches "xen-docs-use-predictable-ordering.patch"
"xen-remove-config.gz-timestamp.patch"))))
(build-system gnu-build-system)
(arguments
(list
@ -2409,7 +2412,13 @@ DOS or Microsoft Windows.")
(apply invoke "make" "world"
"-j" (number->string
(if parallel-build? (parallel-job-count) 1))
make-flags))))))
make-flags)))
(add-after 'install 'remove-cruft
(lambda _
(with-directory-excursion #$output
;; Delete useless (and irreproducible) build-time left-overs.
(for-each delete-file
(find-files "share/doc" "^\\.deps$"))))))))
(inputs
(list acpica ; TODO: patch iasl invocation
bridge-utils ; TODO: patch invocations