guix-commits
[Top][All Lists]
Advanced

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

04/04: gnu: linux-libre: Make build reproducible.


From: guix-commits
Subject: 04/04: gnu: linux-libre: Make build reproducible.
Date: Sun, 21 Nov 2021 09:11:14 -0500 (EST)

apteryx pushed a commit to branch core-updates-frozen
in repository guix.

commit 01ea70a29c5c1ded31c37ce8c43192bc1956b2ca
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sun Nov 21 00:07:08 2021 -0500

    gnu: linux-libre: Make build reproducible.
    
    Fixes <https://issues.guix.gnu.org/24028>.
    
    * gnu/packages/linux.scm (make-linux-libre*): Remove trailing #t.
    [phases]{configure}: Set KBUILD_BUILD_USER and KBUILD_BUILD_HOST environment
    variables.
---
 gnu/packages/linux.scm | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 71da82d..2dccf8a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -818,15 +818,18 @@ for ARCH and optionally VARIANT, or #f if there is no 
such configuration."
          (add-after 'unpack 'patch-/bin/pwd
            (lambda _
              (substitute* (find-files "." "^Makefile(\\.include)?$")
-               (("/bin/pwd") "pwd"))
-             #t))
+               (("/bin/pwd") "pwd"))))
          (replace 'configure
            (lambda* (#:key inputs native-inputs target #:allow-other-keys)
-             ;; Avoid introducing timestamps
+             ;; Avoid introducing timestamps.
              (setenv "KCONFIG_NOTIMESTAMP" "1")
              (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
 
-             ;; Set ARCH and CROSS_COMPILE
+             ;; Other variables useful for reproducibility.
+             (setenv "KBUILD_BUILD_USER" "guix")
+             (setenv "KBUILD_BUILD_HOST" "guix")
+
+             ;; Set ARCH and CROSS_COMPILE.
              (let ((arch ,(system->linux-architecture
                            (or (%current-target-system)
                                (%current-system)))))
@@ -897,8 +900,7 @@ for ARCH and optionally VARIANT, or #f if there is no such 
configuration."
                  (false-if-file-not-found
                   (delete-file (string-append moddir "/" version "/build")))
                  (false-if-file-not-found
-                  (delete-file (string-append moddir "/" version "/source"))))
-               #t))))
+                  (delete-file (string-append moddir "/" version 
"/source"))))))))
        #:tests? #f))
     (home-page "https://www.gnu.org/software/linux-libre/";)
     (synopsis "100% free redistribution of a cleaned Linux kernel")



reply via email to

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