mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
gnu: petsc: Build reproducibly.
* gnu/packages/maths.scm (petsc)[arguments]: In ‘configure’ phase, add
‘sorted’ call in ‘gmakegen.py’.
In ‘clean-local-references’, remove substitution of “Libraries compiled
on”, which is unnecessary since PETSc 3.9
(<a970bd7489
>).
Add substitution for “Machine characteristics” bit.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: Ibb846c1ae368af94b46d5ce789b1263e0bc78a13
This commit is contained in:
parent
4c8997c123
commit
31fe177a97
1 changed files with 7 additions and 2 deletions
|
@ -3545,6 +3545,11 @@ (define-public petsc
|
||||||
(let* ((prefix (assoc-ref outputs "out"))
|
(let* ((prefix (assoc-ref outputs "out"))
|
||||||
(flags `(,(string-append "--prefix=" prefix)
|
(flags `(,(string-append "--prefix=" prefix)
|
||||||
,@configure-flags)))
|
,@configure-flags)))
|
||||||
|
;; Sort source files in configure (for reproducibility).
|
||||||
|
(substitute* "config/gmakegen.py"
|
||||||
|
(("join\\(srcs\\[lang\\]\\)")
|
||||||
|
"join(sorted(srcs[lang]))"))
|
||||||
|
|
||||||
(format #t "build directory: ~s~%" (getcwd))
|
(format #t "build directory: ~s~%" (getcwd))
|
||||||
(format #t "configure flags: ~s~%" flags)
|
(format #t "configure flags: ~s~%" flags)
|
||||||
(apply invoke "./configure" flags)
|
(apply invoke "./configure" flags)
|
||||||
|
@ -3559,8 +3564,8 @@ (define-public petsc
|
||||||
(substitute* (find-files "." "^petsc(conf|machineinfo).h$")
|
(substitute* (find-files "." "^petsc(conf|machineinfo).h$")
|
||||||
;; Prevent build directory from leaking into compiled code
|
;; Prevent build directory from leaking into compiled code
|
||||||
(((getcwd)) out)
|
(((getcwd)) out)
|
||||||
;; Scrub timestamp for reproducibility
|
(("Machine characteristics: Linux-[0-9]+\\.[0-9]+\\.[0-9]+")
|
||||||
((".*Libraries compiled on.*") ""))
|
"Machine characteristics: Linux-x.x.x"))
|
||||||
(substitute* (find-files "." "petscvariables")
|
(substitute* (find-files "." "petscvariables")
|
||||||
;; Do not expose build machine characteristics, set to defaults.
|
;; Do not expose build machine characteristics, set to defaults.
|
||||||
(("MAKE_NP = [:digit:]+") "MAKE_NP = 2")
|
(("MAKE_NP = [:digit:]+") "MAKE_NP = 2")
|
||||||
|
|
Loading…
Reference in a new issue