aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorJan (janneke) Nieuwenhuizen <janneke@gnu.org>2020-07-03 23:45:20 +0200
committerJan (janneke) Nieuwenhuizen <janneke@gnu.org>2020-07-11 16:34:01 +0200
commit4b9eecd322e566783369795ebea63a479b51f486 (patch)
tree7b31e376ef05efb3c94554c798cf0e27796dda31 /gnu
parent1649c7d69ae3fe4a3b94b6173431411a2c238168 (diff)
downloadguix-4b9eecd322e566783369795ebea63a479b51f486.tar
guix-4b9eecd322e566783369795ebea63a479b51f486.tar.gz
image: Do not set journal_model=WAL for the Hurd.
This fixes <https://bugs.gnu.org/42151>. * gnu/system/images/hurd.scm (hurd-initialize-root-partition): Use #:wal-mode #f in call to ... * gnu/build/image.scm (initialize-root-partition): ... this, add #:wal-mode? parameter, pass it to ... (register-closure): ... this, add #:wal-mode? parameter, pass it to ... * guix/store/database.scm (with-database): ... this, add #:wal-mode? parameter, pass it to ... (call-with-database): ... this, add #:wal-mode? parameter; when set to #f, do not set journal_model=WAL.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/build/image.scm26
-rw-r--r--gnu/system/images/hurd.scm8
2 files changed, 22 insertions, 12 deletions
diff --git a/gnu/build/image.scm b/gnu/build/image.scm
index e7b0418182..d8efa73f16 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -131,20 +131,23 @@ given CONFIG file."
(define* (register-closure prefix closure
#:key
(deduplicate? #t) (reset-timestamps? #t)
- (schema (sql-schema)))
+ (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."
+deduplicates files common to CLOSURE and the rest of PREFIX. 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
- (register-items db items
- #:prefix prefix
- #:deduplicate? deduplicate?
- #:reset-timestamps? reset-timestamps?
- #:registration-time %epoch)))))
+ #:wal-mode? wal-mode?
+ (register-items db items
+ #:prefix prefix
+ #:deduplicate? deduplicate?
+ #:reset-timestamps? reset-timestamps?
+ #:registration-time %epoch)))))
(define* (initialize-efi-partition root
#:key
@@ -164,14 +167,16 @@ deduplicates files common to CLOSURE and the rest of PREFIX."
(register-closures? #t)
system-directory
make-device-nodes
+ (wal-mode? #t)
#:allow-other-keys)
"Initialize the given ROOT directory. Use BOOTCFG and BOOTCFG-LOCATION to
install the bootloader configuration.
If REGISTER-CLOSURES? is true, register REFERENCES-GRAPHS in the store. If
DEDUPLICATE? is true, then also deduplicate files common to CLOSURES and the
-rest of the store when registering the closures. SYSTEM-DIRECTORY is the name
-of the directory of the 'system' derivation."
+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)
@@ -184,7 +189,8 @@ of the directory of the 'system' derivation."
(register-closure root
closure
#:reset-timestamps? #t
- #:deduplicate? deduplicate?))
+ #:deduplicate? deduplicate?
+ #:wal-mode? wal-mode?))
references-graphs))
(when bootloader-installer
diff --git a/gnu/system/images/hurd.scm b/gnu/system/images/hurd.scm
index 31942e7386..d87640e8e3 100644
--- a/gnu/system/images/hurd.scm
+++ b/gnu/system/images/hurd.scm
@@ -61,8 +61,12 @@
#~(lambda* (#:rest args)
(apply initialize-root-partition
(append args
- (list #:make-device-nodes
- make-hurd-device-nodes)))))
+ (list #:make-device-nodes make-hurd-device-nodes
+ ;; XXX Creating a db.sqlite with journal_mode=WAL
+ ;; yields "unable to open database file" on GNU/Hurd
+ ;; for an sqlite with the hurd-locking-mode.patch;
+ ;; see <https://bugs.gnu.org/42151>.
+ #:wal-mode? #f)))))
(define hurd-disk-image
(image