guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/08: gnu: seabios: Encode version information in the binary.


From: guix-commits
Subject: 05/08: gnu: seabios: Encode version information in the binary.
Date: Wed, 22 Dec 2021 21:15:18 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit b7719d81cf7fe348a4588c2b3c47a39d59d6616c
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Sat Dec 18 21:41:49 2021 +0100

    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.
---
 gnu/packages/firmware.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index cf6fa73..13e33af 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]