summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-12-19 00:40:33 +0100
committerLudovic Courtès <ludo@gnu.org>2022-12-19 00:40:33 +0100
commit12ca7677028119bb280e33f7a759a66724d468d1 (patch)
tree42ea4bb7b3ebcca0598e14444e269cb7cf39c59f /gnu
parent553f46a094951df99eb1fb6b1a4d3ca1df91adfd (diff)
parent989a3916dc8967bcb7275f10452f89bc6c3389cc (diff)
Merge branch 'version-1.4.0'
Diffstat (limited to 'gnu')
-rw-r--r--gnu/installer/final.scm30
-rw-r--r--gnu/packages/package-management.scm6
-rw-r--r--gnu/services/base.scm11
-rw-r--r--gnu/system/install.scm13
4 files changed, 49 insertions, 11 deletions
diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm
index 044f79372b..069426a3b8 100644
--- a/gnu/installer/final.scm
+++ b/gnu/installer/final.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -114,6 +114,8 @@ it can interact with the rest of the system."
;; Catch SIGINT and kill the container process.
(sigaction SIGINT
(lambda (signum)
+ ;: FIXME: Use of SIGKILL prevents the dynamic-wind exit handler of
+ ;; THUNK to run.
(false-if-exception
(kill pid SIGKILL))))
@@ -196,14 +198,16 @@ or #f. Return #t on success and #f on failure."
;; the loaded cow-store locale files will prevent umounting.
(install-locale locale)
- ;; Save the database, so that it can be restored once the
- ;; cow-store is umounted.
+ ;; Stop the daemon and save the database, so that it can be
+ ;; restored once the cow-store is umounted.
+ (stop-service 'guix-daemon)
(copy-file database-file saved-database)
+
+ (installer-log-line "mounting copy-on-write store")
(mount-cow-store (%installer-target-dir) backing-directory))
(lambda ()
;; We need to drag the guix-daemon to the container MNT
;; namespace, so that it can operate on the cow-store.
- (stop-service 'guix-daemon)
(start-service 'guix-daemon (list (number->string (getpid))))
(setvbuf (current-output-port) 'none)
@@ -213,11 +217,25 @@ or #f. Return #t on success and #f on failure."
(set! ret (run-command install-command #:tty? #t)))
(lambda ()
- ;; Restart guix-daemon so that it does no keep the MNT namespace
+ ;; Stop guix-daemon so that it does no keep the MNT namespace
;; alive.
- (restart-service 'guix-daemon)
+ (stop-service 'guix-daemon)
+
+ ;; Restore the database and restart it. As part of restoring the
+ ;; database, remove the WAL and shm files in case they were left
+ ;; behind after guix-daemon was stopped. Failing to do so,
+ ;; sqlite might behave as if transactions that appear in the WAL
+ ;; file were committed. (See <https://www.sqlite.org/wal.html>.)
+ (installer-log-line "restoring store database from '~a'"
+ saved-database)
(copy-file saved-database database-file)
+ (for-each (lambda (suffix)
+ (false-if-exception
+ (delete-file (string-append database-file suffix))))
+ '("-wal" "-shm"))
+ (start-service 'guix-daemon)
;; Finally umount the cow-store and exit the container.
+ (installer-log-line "unmounting copy-on-write store")
(unmount-cow-store (%installer-target-dir) backing-directory)
(assert-exit ret))))))))
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 27a42a0189..2ffaa12247 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -164,8 +164,8 @@
;; Latest version of Guix, which may or may not correspond to a release.
;; Note: the 'update-guix-package.scm' script expects this definition to
;; start precisely like this.
- (let ((version "1.4.0rc2")
- (commit "7866294e32f1e758d06fce4e1b1035eca3a7d772")
+ (let ((version "1.4.0")
+ (commit "8e2f32cee982d42a79e53fc1e9aa7b8ff0514714")
(revision 0))
(package
(name "guix")
@@ -182,7 +182,7 @@
(commit commit)))
(sha256
(base32
- "0np4fw5kq882nrkfgsvvwgcxqwvm6bzn3dbdf8p48nr7mfrm3rz9"))
+ "042mipw2bp9lc75m9g5q6rdifrp8483cmk57kwrdps0i3vd590dl"))
(file-name (string-append "guix-" version "-checkout"))))
(build-system gnu-build-system)
(arguments
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 4908af8edd..52b94e060b 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -72,6 +72,7 @@
#:select (dosfstools))
#:use-module ((gnu packages file-systems)
#:select (bcachefs-tools exfat-utils jfsutils zfs))
+ #:use-module (gnu packages fonts)
#:use-module (gnu packages terminals)
#:use-module ((gnu packages wm) #:select (sway))
#:use-module ((gnu build file-systems)
@@ -2489,7 +2490,15 @@ notably to select, copy, and paste text. The default options use the
(documentation "kmscon virtual terminal")
(requirement '(user-processes udev dbus-system))
(provision (list (symbol-append 'term- (string->symbol virtual-terminal))))
- (start #~(make-forkexec-constructor #$kmscon-command))
+ (start #~(make-forkexec-constructor
+ #$kmscon-command
+
+ ;; The installer needs to be able to display glyphs from
+ ;; various scripts, so give it access to freefont.
+ ;; TODO: Make this configurable.
+ #:environment-variables
+ (list (string-append "XDG_DATA_DIRS="
+ #$font-gnu-freefont "/share"))))
(stop #~(make-kill-destructor)))))
(description "Start the @command{kmscon} virtual terminal emulator for the
Linux @dfn{kernel mode setting} (KMS).")))
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 3f5352be87..b3cf7a1bd8 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -284,13 +284,24 @@ templates under @file{/etc/configuration}.")))
;; appropriate options. The GUI installer needs it when the machine does not
;; support Kernel Mode Setting. Otherwise kmscon is missing /dev/fb0.
(define (uvesafb-shepherd-service _)
+ (define modprobe
+ (program-file "modprobe-wrapper"
+ #~(begin
+ ;; Use a wrapper because shepherd 0.9.3 won't let us
+ ;; pass environment variables to the child process:
+ ;; <https://issues.guix.gnu.org/60106>.
+ (setenv "LINUX_MODULE_DIRECTORY"
+ "/run/booted-system/kernel/lib/modules")
+ (apply execl #$(file-append kmod "/bin/modprobe")
+ "modprobe" (cdr (command-line))))))
+
(list (shepherd-service
(documentation "Load the uvesafb kernel module if needed.")
(provision '(maybe-uvesafb))
(requirement '(file-systems))
(start #~(lambda ()
(or (file-exists? "/dev/fb0")
- (invoke #+(file-append kmod "/bin/modprobe")
+ (invoke #+modprobe
"uvesafb"
(string-append "v86d=" #$v86d "/sbin/v86d")
"mode_option=1024x768"))))