summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-12-18 21:41:49 +0100
committerMarius Bakke <marius@gnu.org>2021-12-23 03:07:34 +0100
commitb7719d81cf7fe348a4588c2b3c47a39d59d6616c (patch)
treed5cbccc1c1c8a55193f96cc32ee5d569c32d9a88
parente839bbc880c3c961f57b8693fbb2ccf1a82db711 (diff)
gnu: seabios: Encode version information in the binary.
...to make the build deterministic. * gnu/packages/firmware.scm (seabios)[arguments]: Create a ".version" file as expected by the build system. While at it, set EXTRAVERSION as recommended by upstream.
-rw-r--r--gnu/packages/firmware.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index cf6fa73be8..13e33afd35 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -295,10 +295,17 @@ for platform-specific firmwares executing in M-mode.")
(native-inputs (list python-wrapper))
(arguments
`(#:tests? #f ; no check target
+ #:make-flags '("EXTRAVERSION=-guix") ;upstream wants distros to set this
#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda _
+ ;; Create the ".version" file that is present in release tarballs.
+ ;; Otherwise this will be regarded as an "unclean" build, and the
+ ;; build system ends up encoding the build date in the binaries.
+ (call-with-output-file ".version"
+ (lambda (port)
+ (format port ,(package-version this-package))))
(setenv "CC" "gcc")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)