GNU bug report logs - #43160
linux-libre: compare guix-generated sources against upstream releases

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Tue, 1 Sep 2020 20:41:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #59 received at 43160 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 43160 <at> debbugs.gnu.org
Cc: mhw <at> netris.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>,
 leo <at> famulari.name
Subject: [PATCH v3 2/2] linux-libre: Enable multi-core xz compression during
 tarball generation.
Date: Fri, 11 Sep 2020 10:44:59 -0400
* gnu/packages/linux.scm (make-linux-libre-source): Add an NCORES binding, and
use it to configure the number of threads xz should use via the XZ_DEFAULTS
environment variable.
---
 gnu/packages/linux.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1df66330cb..d6441fa181 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -255,7 +255,8 @@ new Linux changes for nonfree code is required when skipping the comparison."
 
                 (setvbuf (current-output-port) 'line)
 
-                (let ((dir (string-append "linux-" #$version)))
+                (let ((dir (string-append "linux-" #$version))
+                      (ncores (number->string (parallel-job-count))))
 
                   (mkdir "/tmp/bin")
                   (set-path-environment-variable
@@ -289,6 +290,9 @@ new Linux changes for nonfree code is required when skipping the comparison."
                       (("/bin/sed") (which "sed"))
                       (("/usr/bin/python") (which "python"))))
 
+                  ;; This enables xz multi-core compression/decompression.
+                  (setenv "XZ_DEFAULTS" (string-append "--threads=" ncores))
+
                   (if (file-is-directory? #+linux-upstream-source)
                       (begin
                         (format #t "Copying upstream Linux source...~%")
-- 
2.28.0





This bug report was last modified 2 years and 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.