diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-10-31 00:47:35 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-10-31 00:51:37 +0100 |
commit | c2eb8cd98c82277e851eb4302b7f12614e215a76 (patch) | |
tree | ff6ec8fb0e9299bf1836c45ed421166454bbd452 | |
parent | 8ff5b8aaa35cf1b48ee70889836972d87b7a94c4 (diff) | |
download | gnu-guix-c2eb8cd98c82277e851eb4302b7f12614e215a76.tar gnu-guix-c2eb8cd98c82277e851eb4302b7f12614e215a76.tar.gz |
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'.
-rw-r--r-- | gnu/packages/xorg.scm | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 28d0d758ad..5820b3d6ad 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -5178,6 +5178,12 @@ over Xlib, including: ;; It's not used anyway, so set it to empty. "--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. "--localstatedir=/var" @@ -5187,17 +5193,25 @@ over Xlib, including: #:phases (modify-phases %standard-phases - (add-before - 'configure 'pre-configure - (lambda _ - (substitute* (find-files "." "\\.c$") - (("/bin/sh") (which "sh"))) - - ;; Don't try to 'mkdir /var'. - (substitute* "hw/xfree86/Makefile.in" - (("\\$\\(MKDIR_P\\).*logdir.*") - "true\n")) - #t))))) + (add-before 'configure 'pre-configure + (lambda _ + (substitute* (find-files "." "\\.c$") + (("/bin/sh") (which "sh"))) + + ;; Don't try to 'mkdir /var'. + (substitute* "hw/xfree86/Makefile.in" + (("\\$\\(MKDIR_P\\).*logdir.*") + "true\n")) + + ;; 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/") (synopsis "Xorg implementation of the X Window System") (description |