self: Make (guix config) generation really stateless.
Previously the %CONFIG-VARIABLES list would be generated based on what the current (guix config) contains. Thus, it would include '%guix-register-program', which we recently removed, because existing (guix config) most likely contained that variable. Since its value could differ from machine to machine, the build farm could be building a different config.scm, thereby preventing people from getting substitutes. * guix/self.scm (%config-variables): Turn into a white list instead of taking all the remaining variables from the current (guix config). * build-aux/build-self.scm (%config-variables): Likewise.
This commit is contained in:
parent
870677cbb8
commit
45779fa676
|
@ -63,17 +63,16 @@
|
||||||
%guix-home-page-url))
|
%guix-home-page-url))
|
||||||
|
|
||||||
(define %config-variables
|
(define %config-variables
|
||||||
;; (guix config) variables corresponding to Guix configuration (storedir,
|
;; (guix config) variables corresponding to Guix configuration.
|
||||||
;; localstatedir, etc.)
|
(letrec-syntax ((variables (syntax-rules ()
|
||||||
(sort (filter pair?
|
((_)
|
||||||
(module-map (lambda (name var)
|
'())
|
||||||
(and (not (memq name %dependency-variables))
|
((_ variable rest ...)
|
||||||
(not (memq name %persona-variables))
|
(cons `(variable . ,variable)
|
||||||
(cons name (variable-ref var))))
|
(variables rest ...))))))
|
||||||
(resolve-interface '(guix config))))
|
(variables %config-directory %localstatedir %state-directory
|
||||||
(lambda (name+value1 name+value2)
|
%store-database-directory %store-directory
|
||||||
(string<? (symbol->string (car name+value1))
|
%storedir %sysconfdir %system)))
|
||||||
(symbol->string (car name+value2))))))
|
|
||||||
|
|
||||||
(define* (make-config.scm #:key libgcrypt zlib gzip xz bzip2
|
(define* (make-config.scm #:key libgcrypt zlib gzip xz bzip2
|
||||||
(package-name "GNU Guix")
|
(package-name "GNU Guix")
|
||||||
|
|
|
@ -26,9 +26,8 @@
|
||||||
#:use-module (guix discovery)
|
#:use-module (guix discovery)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix sets)
|
#:use-module (guix sets)
|
||||||
#:use-module (guix utils)
|
|
||||||
#:use-module (guix modules)
|
#:use-module (guix modules)
|
||||||
#:use-module (guix build utils)
|
#:use-module ((guix build utils) #:select (find-files))
|
||||||
#:use-module ((guix build compile) #:select (%lightweight-optimizations))
|
#:use-module ((guix build compile) #:select (%lightweight-optimizations))
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-9)
|
#:use-module (srfi srfi-9)
|
||||||
|
@ -666,17 +665,16 @@ assumed to be part of MODULES."
|
||||||
%guix-home-page-url))
|
%guix-home-page-url))
|
||||||
|
|
||||||
(define %config-variables
|
(define %config-variables
|
||||||
;; (guix config) variables corresponding to Guix configuration (storedir,
|
;; (guix config) variables corresponding to Guix configuration.
|
||||||
;; localstatedir, etc.)
|
(letrec-syntax ((variables (syntax-rules ()
|
||||||
(sort (filter pair?
|
((_)
|
||||||
(module-map (lambda (name var)
|
'())
|
||||||
(and (not (memq name %dependency-variables))
|
((_ variable rest ...)
|
||||||
(not (memq name %persona-variables))
|
(cons `(variable . ,variable)
|
||||||
(cons name (variable-ref var))))
|
(variables rest ...))))))
|
||||||
(resolve-interface '(guix config))))
|
(variables %config-directory %localstatedir %state-directory
|
||||||
(lambda (name+value1 name+value2)
|
%store-database-directory %store-directory
|
||||||
(string<? (symbol->string (car name+value1))
|
%storedir %sysconfdir %system)))
|
||||||
(symbol->string (car name+value2))))))
|
|
||||||
|
|
||||||
(define* (make-config.scm #:key libgcrypt zlib gzip xz bzip2
|
(define* (make-config.scm #:key libgcrypt zlib gzip xz bzip2
|
||||||
(package-name "GNU Guix")
|
(package-name "GNU Guix")
|
||||||
|
|
Loading…
Reference in New Issue