summary refs log tree commit diff
path: root/gnu/build
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-01-13 23:39:52 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-01-13 23:45:53 -0500
commit01f0707207741ce2a5d7509a175464799b08aea6 (patch)
tree08e8f4da56f26363c3b53e0442a21b286b55e0e5 /gnu/build
parent734bcf13139119daf8685f93b056c3422dbfa264 (diff)
parent6985a1acb3e9cc4cad8b6f63d77154842d25c929 (diff)
downloadguix-01f0707207741ce2a5d7509a175464799b08aea6.tar.gz
Merge branch 'staging' into 'core-updates'.
Conflicts:

	gnu/local.mk
	gnu/packages/cmake.scm
	gnu/packages/curl.scm
	gnu/packages/gl.scm
	gnu/packages/glib.scm
	gnu/packages/guile.scm
	gnu/packages/node.scm
	gnu/packages/openldap.scm
	gnu/packages/package-management.scm
	gnu/packages/python-xyz.scm
	gnu/packages/python.scm
	gnu/packages/tls.scm
	gnu/packages/vpn.scm
	gnu/packages/xorg.scm
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/file-systems.scm14
-rw-r--r--gnu/build/image.scm16
-rw-r--r--gnu/build/install.scm3
-rw-r--r--gnu/build/linux-boot.scm5
-rw-r--r--gnu/build/linux-initrd.scm3
-rw-r--r--gnu/build/vm.scm14
6 files changed, 24 insertions, 31 deletions
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index b762e82ad2..ddf6117b67 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -262,14 +262,16 @@ bytevector."
 
 (define (check-bcachefs-file-system device)
   "Return the health of a bcachefs file system on DEVICE."
-  (match (status:exit-val
+  (let ((ignored-bits (logior 2))       ; DEVICE was mounted read-only
+        (status
+         (status:exit-val
           (apply system* "bcachefs" "fsck" "-p" "-v"
                  ;; Make each multi-device member a separate argument.
-                 (string-split device #\:)))
-    (0 'pass)
-    (1 'errors-corrected)
-    (2 'reboot-required)
-    (_ 'fatal-error)))
+                 (string-split device #\:)))))
+    (match (logand (lognot ignored-bits) status)
+      (0 'pass)
+      (1 'errors-corrected)
+      (_ 'fatal-error))))
 
 
 ;;;
diff --git a/gnu/build/image.scm b/gnu/build/image.scm
index 463b7fccc7..45eed0b298 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -140,23 +140,17 @@ given CONFIG file."
 
 (define* (register-closure prefix closure
                            #:key
-                           (deduplicate? #t) (reset-timestamps? #t)
                            (schema (sql-schema))
                            (wal-mode? #t))
   "Register CLOSURE in PREFIX, where PREFIX is the directory name of the
 target store and CLOSURE is the name of a file containing a reference graph as
-produced by #:references-graphs..  As a side effect, if RESET-TIMESTAMPS? is
-true, reset timestamps on store files and, if DEDUPLICATE? is true,
-deduplicates files common to CLOSURE and the rest of PREFIX.  Pass WAL-MODE?
-to call-with-database."
+produced by #:references-graphs.  Pass WAL-MODE? to call-with-database."
   (let ((items (call-with-input-file closure read-reference-graph)))
     (parameterize ((sql-schema schema))
       (with-database (store-database-file #:prefix prefix) db
        #:wal-mode? wal-mode?
        (register-items db items
                        #:prefix prefix
-                       #:deduplicate? deduplicate?
-                       #:reset-timestamps? reset-timestamps?
                        #:registration-time %epoch)))))
 
 (define* (initialize-efi-partition root
@@ -188,7 +182,8 @@ rest of the store when registering the closures.  SYSTEM-DIRECTORY is the name
 of the directory of the 'system' derivation.  Pass WAL-MODE? to
 register-closure."
   (populate-root-file-system system-directory root)
-  (populate-store references-graphs root)
+  (populate-store references-graphs root
+                  #:deduplicate? deduplicate?)
 
   ;; Populate /dev.
   (when make-device-nodes
@@ -196,10 +191,7 @@ register-closure."
 
   (when register-closures?
     (for-each (lambda (closure)
-                (register-closure root
-                                  closure
-                                  #:reset-timestamps? #t
-                                  #:deduplicate? deduplicate?
+                (register-closure root closure
                                   #:wal-mode? wal-mode?))
               references-graphs))
 
diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index 63995e1d09..f5c8407b89 100644
--- a/gnu/build/install.scm
+++ b/gnu/build/install.scm
@@ -214,7 +214,8 @@ This is used to create the self-contained tarballs with 'guix pack'."
     (symlink old (scope new)))
 
   ;; Populate the store.
-  (populate-store (list closure) directory)
+  (populate-store (list closure) directory
+                  #:deduplicate? #f)
 
   (when database
     (install-database-and-gc-roots directory database profile
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index bfaac9ec1f..f20eeaac9f 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -560,7 +560,10 @@ upon error."
         (load-linux-modules-from-directory linux-modules
                                            linux-module-directory)
 
-        (unless (member "noresume" args)
+        (unless (or (member "hibernate=noresume" args)
+                    ;; Also handle the equivalent old-style argument.
+                    ;; See Documentation/admin-guide/kernel-parameters.txt.
+                    (member "noresume" args))
           ;; Try to resume immediately after loading (storage) modules
           ;; but before any on-disk file systems have been mounted.
           (false-if-exception           ; failure is not fatal
diff --git a/gnu/build/linux-initrd.scm b/gnu/build/linux-initrd.scm
index 99796adba6..bb2ed0db0c 100644
--- a/gnu/build/linux-initrd.scm
+++ b/gnu/build/linux-initrd.scm
@@ -127,7 +127,8 @@ REFERENCES-GRAPHS."
   (mkdir "contents")
 
   ;; Copy the closures of all the items referenced in REFERENCES-GRAPHS.
-  (populate-store references-graphs "contents")
+  (populate-store references-graphs "contents"
+                  #:deduplicate? #f)
 
   (with-directory-excursion "contents"
     ;; Make '/init'.
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 5a292e965b..253d9bcd31 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -215,20 +215,15 @@ the #:references-graphs parameter of 'derivation'."
 
 (define* (register-closure prefix closure
                            #:key
-                           (deduplicate? #t) (reset-timestamps? #t)
                            (schema (sql-schema)))
   "Register CLOSURE in PREFIX, where PREFIX is the directory name of the
 target store and CLOSURE is the name of a file containing a reference graph as
-produced by #:references-graphs..  As a side effect, if RESET-TIMESTAMPS? is
-true, reset timestamps on store files and, if DEDUPLICATE? is true,
-deduplicates files common to CLOSURE and the rest of PREFIX."
+produced by #:references-graphs."
   (let ((items (call-with-input-file closure read-reference-graph)))
     (parameterize ((sql-schema schema))
       (with-database (store-database-file #:prefix prefix) db
         (register-items db items
                         #:prefix prefix
-                        #:deduplicate? deduplicate?
-                        #:reset-timestamps? reset-timestamps?
                         #:registration-time %epoch)))))
 
 
@@ -397,7 +392,8 @@ system that is passed to 'populate-root-file-system'."
     (when copy-closures?
       ;; Populate the store.
       (populate-store (map (cut string-append "/xchg/" <>) closures)
-                      target))
+                      target
+                      #:deduplicate? deduplicate?))
 
     ;; Populate /dev.
     (make-device-nodes target)
@@ -413,9 +409,7 @@ system that is passed to 'populate-root-file-system'."
       (display "registering closures...\n")
       (for-each (lambda (closure)
                   (register-closure target
-                                    (string-append "/xchg/" closure)
-                                    #:reset-timestamps? copy-closures?
-                                    #:deduplicate? deduplicate?))
+                                    (string-append "/xchg/" closure)))
                 closures)
       (unless copy-closures?
         (umount target-store)))