mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-24 19:49:25 -05:00
gnu: xorg-server: Build reproducibly.
Fixes <https://bugs.gnu.org/24112>. * gnu/packages/xorg.scm (xorg-server)[arguments]: Pass "--with-os-name" and "--with-os-vendor" as #:configure-flags. Augment 'pre-configure' phase to set 'BUILD_DATE' and 'BUILD_TIME' in 'configure'.
This commit is contained in:
parent
8ff5b8aaa3
commit
c2eb8cd98c
1 changed files with 24 additions and 10 deletions
|
@ -5178,6 +5178,12 @@ (define-public xorg-server
|
||||||
;; It's not used anyway, so set it to empty.
|
;; It's not used anyway, so set it to empty.
|
||||||
"--with-default-font-path="
|
"--with-default-font-path="
|
||||||
|
|
||||||
|
;; The default is to use "uname -srm", which captures the kernel
|
||||||
|
;; version and makes builds non-reproducible.
|
||||||
|
"--with-os-name=GNU"
|
||||||
|
|
||||||
|
"--with-os-vendor=GuixSD" ;not strictly needed, but looks nice
|
||||||
|
|
||||||
|
|
||||||
;; For the log file, etc.
|
;; For the log file, etc.
|
||||||
"--localstatedir=/var"
|
"--localstatedir=/var"
|
||||||
|
@ -5187,17 +5193,25 @@ (define-public xorg-server
|
||||||
|
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-before
|
(add-before 'configure 'pre-configure
|
||||||
'configure 'pre-configure
|
(lambda _
|
||||||
(lambda _
|
(substitute* (find-files "." "\\.c$")
|
||||||
(substitute* (find-files "." "\\.c$")
|
(("/bin/sh") (which "sh")))
|
||||||
(("/bin/sh") (which "sh")))
|
|
||||||
|
|
||||||
;; Don't try to 'mkdir /var'.
|
;; Don't try to 'mkdir /var'.
|
||||||
(substitute* "hw/xfree86/Makefile.in"
|
(substitute* "hw/xfree86/Makefile.in"
|
||||||
(("\\$\\(MKDIR_P\\).*logdir.*")
|
(("\\$\\(MKDIR_P\\).*logdir.*")
|
||||||
"true\n"))
|
"true\n"))
|
||||||
#t)))))
|
|
||||||
|
;; Strip timestamps that would otherwise end up in the 'Xorg'
|
||||||
|
;; binary.
|
||||||
|
(substitute* "configure"
|
||||||
|
(("^BUILD_DATE=.*$")
|
||||||
|
"BUILD_DATE=19700101\n")
|
||||||
|
(("^BUILD_TIME=.*$")
|
||||||
|
"BUILD_TIME=000001\n"))
|
||||||
|
|
||||||
|
#t)))))
|
||||||
(home-page "https://www.x.org/wiki/")
|
(home-page "https://www.x.org/wiki/")
|
||||||
(synopsis "Xorg implementation of the X Window System")
|
(synopsis "Xorg implementation of the X Window System")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Reference in a new issue