[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/13: chromium-extension: Build .crx files in a deterministic fashion.
From: |
guix-commits |
Subject: |
07/13: chromium-extension: Build .crx files in a deterministic fashion. |
Date: |
Thu, 16 Dec 2021 16:23:12 -0500 (EST) |
mbakke pushed a commit to branch master
in repository guix.
commit aec6bd0169bb855a3ec70f5edec0701d0a66ce9d
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Thu Dec 16 19:06:35 2021 +0100
chromium-extension: Build .crx files in a deterministic fashion.
* gnu/build/chromium-extension.scm (make-crx): Pass #:keep-mtime? #t to
COPY-RECURSIVELY. Remove defunct FAKETIME workaround. While at it, pack
the
extension in the scratch working directory instead of the transient
store-mapped /tmp.
---
gnu/build/chromium-extension.scm | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/gnu/build/chromium-extension.scm b/gnu/build/chromium-extension.scm
index 5bda8f8..656034b 100644
--- a/gnu/build/chromium-extension.scm
+++ b/gnu/build/chromium-extension.scm
@@ -19,8 +19,6 @@
(define-module (gnu build chromium-extension)
#:use-module (guix gexp)
#:use-module (guix packages)
- #:use-module (gnu packages base)
- #:use-module (gnu packages check)
#:use-module (gnu packages chromium)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages tls)
@@ -77,20 +75,17 @@ in PACKAGE-OUTPUT of PACKAGE. The extension will be signed
with SIGNING-KEY."
(use-modules (guix build utils))
(let ((chromium #$(file-append ungoogled-chromium "/bin/chromium"))
(xvfb #$(file-append xorg-server "/bin/Xvfb"))
- (packdir "/tmp/extension"))
- (mkdir-p (dirname packdir))
- (copy-recursively (ungexp package package-output) packdir)
+ (packdir (string-append (getcwd) "/extension")))
+ (mkdir packdir)
+ (copy-recursively (ungexp package package-output) packdir
+ ;; Ensure consistent file modification times.
+ #:keep-mtime? #t)
(system (string-append xvfb " :1 &"))
(setenv "DISPLAY" ":1")
(sleep 2) ;give Xorg some time to initialize...
;; Chromium stores the current time in the .crx Zip archive.
;; Use a fixed timestamp for deterministic behavior.
- ;; FIXME (core-updates): faketime is missing an absolute reference
- ;; to 'date', hence the need to set PATH.
- (setenv "PATH" #$(file-append coreutils "/bin"))
- (invoke #$(file-append libfaketime "/bin/faketime")
- "2000-01-01 00:00:00"
- chromium
+ (invoke chromium
"--user-data-dir=/tmp/signing-profile"
(string-append "--pack-extension=" packdir)
(string-append "--pack-extension-key=" #$signing-key))
- branch master updated (d2af1df -> 00ec9e3), guix-commits, 2021/12/16
- 04/13: chromium-extension: Simplify builder code., guix-commits, 2021/12/16
- 03/13: gnu: ungoogled-chromium: Improve Vulkan support., guix-commits, 2021/12/16
- 10/13: gnu: file: Add 5.41., guix-commits, 2021/12/16
- 12/13: gnu: python-vcrpy: Fix test failure., guix-commits, 2021/12/16
- 08/13: gnu: python-daemon: Fix test failure., guix-commits, 2021/12/16
- 11/13: gnu: python-magic: Work around crash on .crx files., guix-commits, 2021/12/16
- 09/13: gnu: python-magic: Run more tests., guix-commits, 2021/12/16
- 05/13: chromium-extension: Reduce imported-modules scope., guix-commits, 2021/12/16
- 01/13: gnu: ungoogled-chromium: Enable RUNPATH validation., guix-commits, 2021/12/16
- 07/13: chromium-extension: Build .crx files in a deterministic fashion.,
guix-commits <=
- 13/13: gnu: rtv: Disable sanity check., guix-commits, 2021/12/16
- 02/13: gnu: ungoogled-chromium: Unexpire accelerated video decoding., guix-commits, 2021/12/16
- 06/13: chromium-extension: Avoid usage of gcrypt at evaluation time., guix-commits, 2021/12/16