aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-04-08 00:54:01 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-04-08 00:54:01 +0200
commitba00235a9652bb129ff6867ffc3c7cfafe1cca09 (patch)
tree1ce56f512707e89362e1fed3d5b26d690462fbda /guix
parentf19ccdc62ca721b68745c35b046826b356f46c62 (diff)
parent0e2b0b05accdea7c3f016f8483d0ec04021114d3 (diff)
downloadguix-ba00235a9652bb129ff6867ffc3c7cfafe1cca09.tar
guix-ba00235a9652bb129ff6867ffc3c7cfafe1cca09.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'guix')
-rw-r--r--guix/gexp.scm47
-rw-r--r--guix/licenses.scm7
-rw-r--r--guix/packages.scm3
-rw-r--r--guix/scripts/environment.scm10
-rw-r--r--guix/scripts/pack.scm8
-rw-r--r--guix/scripts/size.scm14
-rw-r--r--guix/scripts/system.scm3
-rw-r--r--guix/self.scm1
8 files changed, 77 insertions, 16 deletions
diff --git a/guix/gexp.scm b/guix/gexp.scm
index 5b5b064b59..4f2adba90a 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -634,6 +634,11 @@ names and file names suitable for the #:allowed-references argument to
local-build? (substitutable? #t)
(properties '())
+ ;; TODO: This parameter is transitional; it's here
+ ;; to avoid a full rebuild. Remove it on the next
+ ;; rebuild cycle.
+ (pre-load-modules? #t)
+
deprecation-warnings
(script-name (string-append name "-builder")))
"Return a derivation NAME that runs EXP (a gexp) with GUILE-FOR-BUILD (a
@@ -738,6 +743,8 @@ The other arguments are as for 'derivation'."
#:module-path module-path
#:extensions extensions
#:guile guile-for-build
+ #:pre-load-modules?
+ pre-load-modules?
#:deprecation-warnings
deprecation-warnings)
(return #f)))
@@ -1213,7 +1220,11 @@ last one is created from the given <scheme-file> object."
(guile (%guile-for-build))
(module-path %load-path)
(extensions '())
- (deprecation-warnings #f))
+ (deprecation-warnings #f)
+
+ ;; TODO: This flag is here to prevent a full
+ ;; rebuild. Remove it on the next rebuild cycle.
+ (pre-load-modules? #t))
"Return a derivation that builds a tree containing the `.go' files
corresponding to MODULES. All the MODULES are built in a context where
they can refer to each other."
@@ -1246,7 +1257,12 @@ they can refer to each other."
(let* ((base (basename entry ".scm"))
(output (string-append output "/" base ".go")))
(format #t "[~2@a/~2@a] Compiling '~a'...~%"
- (+ 1 processed) (ungexp total) entry)
+ (+ 1 processed
+ (ungexp-splicing (if pre-load-modules?
+ (gexp ((ungexp total)))
+ (gexp ()))))
+ (ungexp (* total (if pre-load-modules? 2 1)))
+ entry)
(compile-file entry
#:output-file output
#:opts %auto-compilation-options)
@@ -1293,6 +1309,33 @@ they can refer to each other."
(mkdir (ungexp output))
(chdir (ungexp modules))
+
+ (ungexp-splicing
+ (if pre-load-modules?
+ (gexp ((define* (load-from-directory directory
+ #:optional (loaded 0))
+ "Load all the source files found in DIRECTORY."
+ ;; XXX: This works around <https://bugs.gnu.org/15602>.
+ (let ((entries (map (cut string-append directory "/" <>)
+ (scandir directory regular?))))
+ (fold (lambda (file loaded)
+ (if (file-is-directory? file)
+ (load-from-directory file loaded)
+ (begin
+ (format #t "[~2@a/~2@a] Loading '~a'...~%"
+ (+ 1 loaded)
+ (ungexp (* 2 total))
+ file)
+ (save-module-excursion
+ (lambda ()
+ (primitive-load file)))
+ (+ 1 loaded))))
+ loaded
+ entries)))
+
+ (load-from-directory ".")))
+ (gexp ())))
+
(process-directory "." (ungexp output) 0))))
;; TODO: Pass MODULES as an environment variable.
diff --git a/guix/licenses.scm b/guix/licenses.scm
index 676e71acdb..952c3bfd1a 100644
--- a/guix/licenses.scm
+++ b/guix/licenses.scm
@@ -65,7 +65,7 @@
imlib2
ipa
knuth
- lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+
+ lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+ llgpl
lppl lppl1.0+ lppl1.1+ lppl1.2 lppl1.2+
lppl1.3 lppl1.3+
lppl1.3a lppl1.3a+
@@ -417,6 +417,11 @@ at URI, which may be a file:// URI pointing the package's tree."
"https://www.gnu.org/licenses/lgpl.html"
"https://www.gnu.org/licenses/license-list#LGPLv3"))
+(define llgpl
+ (license "LLGPL"
+ "https://opensource.franz.com/preamble.html"
+ "Lisp Lesser General Public License"))
+
(define lppl
(license "LPPL (any version)"
"https://www.latex-project.org/lppl/lppl-1-0/"
diff --git a/guix/packages.scm b/guix/packages.scm
index c2981dda8b..c94a651f27 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -642,6 +642,9 @@ specifies modules in scope when evaluating SNIPPET."
(let ((name (tarxz-name original-file-name)))
(gexp->derivation name build
+ ;; TODO: Remove this on the next rebuild cycle.
+ #:pre-load-modules? #f
+
#:graft? #f
#:system system
#:deprecation-warnings #t ;to avoid a rebuild
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index c27edc7982..99c351ae43 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -192,7 +192,7 @@ COMMAND or an interactive shell in that environment.\n"))
(print-extended-build-trace? . #t)
(multiplexed-build-output? . #t)
(debug . 0)
- (verbosity . 2)))
+ (verbosity . 1)))
(define (tag-package-arg opts arg)
"Return a two-element list with the form (TAG ARG) that tags ARG with either
@@ -459,17 +459,19 @@ will be used for the passwd entry. LINK-PROFILE? creates a symbolic link from
(return
(let* ((cwd (getcwd))
(home (getenv "HOME"))
+ (uid (if user 1000 (getuid)))
+ (gid (if user 1000 (getgid)))
(passwd (let ((pwd (getpwuid (getuid))))
(password-entry
(name (or user (passwd:name pwd)))
(real-name (if user
""
(passwd:gecos pwd)))
- (uid 0) (gid 0) (shell bash)
+ (uid uid) (gid gid) (shell bash)
(directory (if user
(string-append "/home/" user)
(passwd:dir pwd))))))
- (groups (list (group-entry (name "users") (gid 0))
+ (groups (list (group-entry (name "users") (gid gid))
(group-entry (gid 65534) ;the overflow GID
(name "overflow"))))
(home-dir (password-entry-directory passwd))
@@ -541,6 +543,8 @@ will be used for the passwd entry. LINK-PROFILE? creates a symbolic link from
;; A container's environment is already purified, so no need to
;; request it be purified again.
(launch-environment command profile manifest #:pure? #f)))
+ #:guest-uid uid
+ #:guest-gid gid
#:namespaces (if network?
(delq 'net %namespaces) ; share host network
%namespaces)))))))
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index e5502ef9ca..b1d1e87c57 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -126,13 +126,9 @@ dependencies are registered."
(define build
(with-extensions gcrypt-sqlite3&co
- ;; XXX: Adding (gnu build install) just to work around
- ;; <https://bugs.gnu.org/15602>: that way, (guix build store-copy) is
- ;; copied last and the 'store-info-XXX' macros are correctly expanded.
(with-imported-modules (source-module-closure
'((guix build store-copy)
- (guix store database)
- (gnu build install)))
+ (guix store database)))
#~(begin
(use-modules (guix store database)
(guix build store-copy)
@@ -633,7 +629,7 @@ please email '~a'~%")
(print-extended-build-trace? . #t)
(multiplexed-build-output? . #t)
(debug . 0)
- (verbosity . 2)
+ (verbosity . 1)
(symlinks . ())
(compressor . ,(first %compressors))))
diff --git a/guix/scripts/size.scm b/guix/scripts/size.scm
index 25218a2945..f549ce05b8 100644
--- a/guix/scripts/size.scm
+++ b/guix/scripts/size.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,6 +34,7 @@
#:use-module (srfi srfi-37)
#:use-module (ice-9 match)
#:use-module (ice-9 format)
+ #:use-module (ice-9 vlist)
#:export (profile?
profile-file
profile-self-size
@@ -142,11 +143,20 @@ profile of ITEMS and their requisites."
(lambda (size)
(return (cons item size)))))
refs)))
+ (define size-table
+ (fold (lambda (pair result)
+ (match pair
+ ((item . size)
+ (vhash-cons item size result))))
+ vlist-null sizes))
+
(define (dependency-size item)
(mlet %store-monad ((deps (requisites* (list item))))
(foldm %store-monad
(lambda (item total)
- (return (+ (assoc-ref sizes item) total)))
+ (return (+ (match (vhash-assoc item size-table)
+ ((_ . size) size))
+ total)))
0
(delete-duplicates (cons item deps)))))
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 97508f4bd6..78aa6cf644 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -1299,8 +1299,7 @@ argument list and OPTS is the option alist."
(command (assoc-ref opts 'action)))
(parameterize ((%graft? (assoc-ref opts 'graft?)))
(with-status-verbosity (or (assoc-ref opts 'verbosity)
- (if (memq command '(init reconfigure))
- 1 2))
+ (if (eq? command 'build) 2 1))
(process-command command args opts))))))
;;; Local Variables:
diff --git a/guix/self.scm b/guix/self.scm
index ccff9be5b3..7ba2764eb9 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -627,6 +627,7 @@ Info manual."
(scheme-node "guix-system"
`((gnu system)
(gnu services)
+ ,@(scheme-modules* source "gnu/bootloader")
,@(scheme-modules* source "gnu/system")
,@(scheme-modules* source "gnu/services"))
(list *core-package-modules* *package-modules*