summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRutherther <rutherther@ditigal.xyz>2026-01-22 13:27:13 +0100
committerRutherther <rutherther@ditigal.xyz>2026-01-22 13:27:13 +0100
commit7c0cd7e45b0240b842b4f3e767599501eac42ee1 (patch)
tree3f5aab4b08d0fdfe1728be24f3250384ab44f9d2 /gnu
parent4e2de18be2c7f7701c00877e05c0b587d03ac4d1 (diff)
parentd58da8a56b75af73a7b5466f7ef8a81679713aa3 (diff)
Merge branch 'version-1.5.0'
Change-Id: Id73c0c74600a3da3373b3a37236b505af65bfe31
Diffstat (limited to 'gnu')
-rw-r--r--gnu/build/linux-boot.scm73
-rw-r--r--gnu/installer/kernel.scm3
-rw-r--r--gnu/installer/newt/kernel.scm2
-rw-r--r--gnu/installer/newt/network.scm24
-rw-r--r--gnu/installer/newt/partition.scm29
-rw-r--r--gnu/installer/newt/services.scm18
-rw-r--r--gnu/local.mk8
-rw-r--r--gnu/packages/jemalloc.scm2
-rw-r--r--gnu/packages/llvm.scm6
-rw-r--r--gnu/packages/package-management.scm6
-rw-r--r--gnu/packages/patches/emacs-gnus-desktop-notify-fix-notifications.patch76
-rw-r--r--gnu/packages/patches/emacs-gnus-desktop-notify-rescan.patch37
-rw-r--r--gnu/services/base.scm21
-rw-r--r--gnu/services/desktop.scm9
-rw-r--r--gnu/services/xorg.scm10
-rw-r--r--gnu/system/examples/desktop.tmpl18
-rw-r--r--gnu/system/install.scm396
17 files changed, 450 insertions, 288 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 61fa6716dba..e0743eae55a 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -46,7 +46,26 @@
make-static-device-nodes
configure-qemu-networking
- boot-system))
+ boot-system
+
+ linux-console
+
+ linux-console?
+ linux-console-device
+ linux-console-can-read?
+ linux-console-can-write?
+ linux-console-can-unblank?
+ linux-console-enabled?
+ linux-console-preferred?
+ linux-console-primary?
+ linux-console-printk?
+ linux-console-braille?
+ linux-console-safe-when-cpu-offline?
+ linux-console-major
+ linux-console-minor
+ linux-console-virtual?
+
+ read-linux-consoles))
;;; Commentary:
;;;
@@ -675,4 +694,56 @@ the root file system...\n" root-delay)
(start-repl)))))
#:on-error on-error))
+(define-record-type <linux-console>
+ (make-linux-console device can-read? can-write? can-unblank?
+ enabled? preferred? primary? printk? braille?
+ safe-when-cpu-offline? major minor virtual?)
+ linux-console?
+ (device linux-console-device)
+ (can-read? linux-console-can-read?)
+ (can-write? linux-console-can-write?)
+ (can-unblank? linux-console-can-unblank?)
+ (enabled? linux-console-enabled?)
+ (preferred? linux-console-preferred?)
+ (primary? linux-console-primary?)
+ (printk? linux-console-printk?)
+ (braille? linux-console-braille?)
+ (safe-when-cpu-offline? linux-console-safe-when-cpu-offline?)
+ (major linux-console-major)
+ (minor linux-console-minor)
+ (virtual? linux-console-virtual?))
+
+(define* (read-linux-consoles #:optional (consoles-file "/proc/consoles"))
+ "Parses CONSOLES-FILE and returns a list of <linux-console> records."
+ (if (not (file-exists? consoles-file))
+ '()
+ (with-input-from-file consoles-file
+ (lambda ()
+ (let ((line-regex (make-regexp
+ "^([^ ]+)[ ]+(.+)[ ]+([0-9]+):([0-9]+)$"))
+ (virt-regex (make-regexp "^tty[0-9]+$")))
+ (let loop ((line (read-line))
+ (results '()))
+ (cond
+ ((eof-object? line)
+ (reverse results))
+ ((regexp-exec line-regex line)
+ => (lambda (m)
+ (let* ((dev (match:substring m 1))
+ (flags (match:substring m 2))
+ (major (string->number (match:substring m 3)))
+ (minor (string->number (match:substring m 4)))
+ (virtual? (regexp-exec virt-regex dev))
+ (has? (lambda (c)
+ (string-any (lambda (f) (char=? f c)) flags))))
+ (loop (read-line)
+ (cons (make-linux-console
+ dev
+ (has? #\R) (has? #\W) (has? #\U) (has? #\E)
+ (has? #\C) (has? #\B) (has? #\p) (has? #\b)
+ (has? #\a)
+ major minor virtual?)
+ results)))))
+ (else (loop (read-line) results)))))))))
+
;;; linux-boot.scm ends here
diff --git a/gnu/installer/kernel.scm b/gnu/installer/kernel.scm
index a07d24d09a6..2700931d402 100644
--- a/gnu/installer/kernel.scm
+++ b/gnu/installer/kernel.scm
@@ -27,7 +27,8 @@
str)
(define (kernel->configuration kernel dry-run?)
- (if (string-prefix? "Hurd" kernel)
+ (if (and (string? kernel)
+ (string-prefix? "Hurd" kernel))
`((kernel %hurd-default-operating-system-kernel)
,(comment (G_ ";; \"noide\" disables the gnumach IDE driver, enabling rumpdisk.\n"))
(kernel-arguments '("noide"))
diff --git a/gnu/installer/newt/kernel.scm b/gnu/installer/newt/kernel.scm
index abf39c6aebd..4570544c519 100644
--- a/gnu/installer/newt/kernel.scm
+++ b/gnu/installer/newt/kernel.scm
@@ -48,12 +48,14 @@
;; TRANSLATORS: "Hurd" is a proper noun and must not be translated.
;; TRANSLATORS: "Linux Libre" is a literal and must not be translated.
(G_ "Please select a kernel. When in doubt, choose \"Linux Libre\".
+
The Hurd is offered as a technology preview and development aid; many packages \
are not yet available in Guix, such as a desktop environment or even a \
windowing system (X, Wayland).")
#:listbox-items kernels
#:listbox-item->text identity
#:listbox-default-item default
+ #:sort-listbox-items? #f ;keep Linux first
#:button-text (G_ "Back")
#:button-callback-procedure
(lambda _
diff --git a/gnu/installer/newt/network.scm b/gnu/installer/newt/network.scm
index c78a7c54612..08e22b8e26c 100644
--- a/gnu/installer/newt/network.scm
+++ b/gnu/installer/newt/network.scm
@@ -27,6 +27,7 @@
#:use-module (guix i18n)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-11)
+ #:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
#:use-module (ice-9 match)
@@ -112,20 +113,24 @@ network devices were found. Do you want to continue anyway?"))
full-value
(+ value 1)))))))
-(define (url-alive? url)
+(define* (url-alive? url #:key (ensure-ok-status? #f))
(false-if-exception
- (begin
- (http-request url)
- #t)))
+ (let ((response (http-request url)))
+ (or (not ensure-ok-status?)
+ (= (response-code response)
+ 200)))))
-(define (common-urls-alive? urls)
+(define* (common-urls-alive? urls #:key (ensure-ok-status? #f))
+ "Return #t if at least some of the given URLS are alive,
+meaning that they do respond to a HTTP request. If ENSURE-OK-STATUS? is
+#t, return #t only if the code is 200."
(dynamic-wind
(lambda ()
(sigaction SIGALRM
(lambda _ #f))
(alarm 3))
(lambda ()
- (any url-alive?
+ (any (cut url-alive? <> #:ensure-ok-status? ensure-ok-status?)
urls))
(lambda ()
(alarm 0))))
@@ -140,7 +145,9 @@ FULL-VALUE tentatives, spaced by 1 second."
"https://bordeaux.guix.gnu.org"
"https://ci.guix.gnu.org"
"https://guix.gnu.org"
- "https://gnu.org")))
+ "https://gnu.org")
+ ;; Any HTTP response means the users is online.
+ #:ensure-ok-status? #f))
(file-exists? "/tmp/installer-assume-online")))
(let* ((full-value 5))
@@ -173,7 +180,8 @@ Do you want to continue anyway?"))
(common-urls-alive?
(list
"https://bordeaux.guix.gnu.org/nix-cache-info"
- "https://ci.guix.gnu.org/nix-cache-info"))))
+ "https://ci.guix.gnu.org/nix-cache-info")
+ #:ensure-ok-status? #t)))
(let* ((full-value 5))
(run-scale-page
diff --git a/gnu/installer/newt/partition.scm b/gnu/installer/newt/partition.scm
index 3a7e6795776..eb99f9860fc 100644
--- a/gnu/installer/newt/partition.scm
+++ b/gnu/installer/newt/partition.scm
@@ -108,20 +108,23 @@ all data on disk will be lost, are you sure you want to proceed?") item)
(define (run-label-page button-text button-callback)
"Run a page asking the user to select a partition table label."
- ;; Force the GPT label if UEFI is supported.
- (if (efi-installation?)
- ((run-label-confirmation-page button-callback) "gpt")
- (run-listbox-selection-page
- #:info-text (G_ "Select a new partition table type. \
+ ;; Force the GPT label if UEFI is supported.
+ (cond ((efi-installation?)
+ ((run-label-confirmation-page button-callback) "gpt"))
+ ;; Force the MSDOS label on Hurd.
+ ((target-hurd?)
+ ((run-label-confirmation-page button-callback) "msdos"))
+ (else (run-listbox-selection-page
+ #:info-text (G_ "Select a new partition table type. \
Be careful, all data on the disk will be lost.")
- #:title (G_ "Partition table")
- #:listbox-items '("msdos" "gpt")
- #:listbox-default-item (if (target-hurd?) "msdos" "gpt")
- #:listbox-item->text identity
- #:listbox-callback-procedure
- (run-label-confirmation-page button-callback)
- #:button-text button-text
- #:button-callback-procedure button-callback)))
+ #:title (G_ "Partition table")
+ #:listbox-items '("msdos" "gpt")
+ #:listbox-default-item (if (target-hurd?) "msdos" "gpt")
+ #:listbox-item->text identity
+ #:listbox-callback-procedure
+ (run-label-confirmation-page button-callback)
+ #:button-text button-text
+ #:button-callback-procedure button-callback))))
(define (run-type-page partition)
"Run a page asking the user to select a partition type."
diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm
index a91a08668da..50fddd0dadb 100644
--- a/gnu/installer/newt/services.scm
+++ b/gnu/installer/newt/services.scm
@@ -36,11 +36,9 @@
environments."
(let ((items (filter desktop-system-service? (%system-services))))
(run-checkbox-tree-page
- #:info-text (if (target-hurd?)
- (G_ "Currently, none of these is available for the Hurd.")
- (G_ "Please select the desktop environment(s) you wish to \
+ #:info-text (G_ "Please select the desktop environment(s) you wish to \
install. If you select multiple desktop environments here, you will be able \
-to choose from them later when you log in."))
+to choose from them later when you log in.")
#:title (G_ "Desktop environment")
#:items items
#:selection (map system-service-recommended? items)
@@ -50,6 +48,16 @@ to choose from them later when you log in."))
(lambda ()
(abort-to-prompt 'installer-step 'abort)))))
+;; FIXME: all platforms should support %desktop-services and some of the
+;; offered desktop environments. Instead of globally disabling the desktop
+;; page, disable only non-working desktop environments.
+(define (run-desktop-environments-cbt-page/maybe)
+ "Run page with desktop environments, as long as the user is on
+a system that supports them."
+ (if (or (target-hurd?) (target-x86-32?))
+ '()
+ (run-desktop-environments-cbt-page)))
+
(define (run-networking-cbt-page)
"Run a page allowing the user to select networking services."
(let ((items (filter (lambda (service)
@@ -131,7 +139,7 @@ client may be enough for a server.")
(abort-to-prompt 'installer-step 'abort)))))
(define (run-services-page)
- (let ((desktop (run-desktop-environments-cbt-page)))
+ (let ((desktop (run-desktop-environments-cbt-page/maybe)))
;; When the user did not select any desktop services, and thus didn't get
;; '%desktop-services', offer network management services.
(append desktop
diff --git a/gnu/local.mk b/gnu/local.mk
index 68f40a609e1..3fb1af63869 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1178,6 +1178,7 @@ dist_patch_DATA = \
%D%/packages/patches/dhclient-script-resolvconf-support.patch \
%D%/packages/patches/dicedb-remove-init-from-config-subpkg.patch \
%D%/packages/patches/directfb-davinci-glibc-228-compat.patch \
+ %D%/packages/patches/django-compressor-build-with-beautifulsoup-4.14+.patch \
%D%/packages/patches/dkimproxy-add-ipv6-support.patch \
%D%/packages/patches/doc++-gcc-14.patch \
%D%/packages/patches/docbook-utils-documentation-edits.patch \
@@ -1211,6 +1212,7 @@ dist_patch_DATA = \
%D%/packages/patches/eigen-fix-strict-aliasing-bug.patch \
%D%/packages/patches/einstein-build.patch \
%D%/packages/patches/elfutils-tests-ptrace.patch \
+ %D%/packages/patches/elixir-httpoison-tag-network-dependent-test-cases.patch \
%D%/packages/patches/elixir-path-length.patch \
%D%/packages/patches/elm-ghc9.2.patch \
%D%/packages/patches/python-treelib-remove-python2-compat.patch \
@@ -1250,7 +1252,9 @@ dist_patch_DATA = \
%D%/packages/patches/ergodox-firmware-fix-numpad.patch \
%D%/packages/patches/ericw-tools-add-check-for-sse2-in-light.cc.patch \
%D%/packages/patches/ericw-tools-gcc-11-pass-const-to-offsetof.patch \
+ %D%/packages/patches/erlang-binpp-disable-failing-tests.patch \
%D%/packages/patches/erlang-man-path.patch \
+ %D%/packages/patches/erlang-mochiweb-disable-known-to-fail-tests.patch \
%D%/packages/patches/esmini-use-pkgconfig.patch \
%D%/packages/patches/esmtp-add-lesmtp.patch \
%D%/packages/patches/esound-c99.patch \
@@ -1698,6 +1702,7 @@ dist_patch_DATA = \
%D%/packages/patches/libretro-dolphin-emu-libusb-assert.patch \
%D%/packages/patches/libretro-dolphin-emu-vulkan-headers.patch \
%D%/packages/patches/librewolf-add-store-to-rdd-allowlist.patch \
+ %D%/packages/patches/librewolf-compare-paths.patch \
%D%/packages/patches/librewolf-neuter-locale-download.patch \
%D%/packages/patches/librewolf-use-system-wide-dir.patch \
%D%/packages/patches/libvirt-add-install-prefix.patch \
@@ -1708,6 +1713,8 @@ dist_patch_DATA = \
%D%/packages/patches/lightdm-vnc-ipv6.patch \
%D%/packages/patches/lightdm-vnc-color-depth.patch \
%D%/packages/patches/lightdm-vncserver-check.patch \
+ %D%/packages/patches/linphone-desktop-cmake-belcard.patch \
+ %D%/packages/patches/linphone-desktop-cmake-find-modules.patch \
%D%/packages/patches/localed-xorg-keyboard.patch \
%D%/packages/patches/kaldi-ignore-failing-test.patch \
%D%/packages/patches/kaldi-openblas-0.3.29-compatibility.patch \
@@ -2311,6 +2318,7 @@ dist_patch_DATA = \
%D%/packages/patches/sbcl-burgled-batteries3-fix-signals.patch \
%D%/packages/patches/sbcl-ciel-repl.patch \
%D%/packages/patches/sbcl-clml-fix-types.patch \
+ %D%/packages/patches/sbcl-cl-redis-replace-sbcl-specific-calls.patch \
%D%/packages/patches/sbcl-eazy-gnuplot-skip-path-check.patch \
%D%/packages/patches/sbcl-lack-fix-tests.patch \
%D%/packages/patches/sbcl-png-fix-sbcl-compatibility.patch \
diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm
index b5fdd399211..aaa7eee0a04 100644
--- a/gnu/packages/jemalloc.scm
+++ b/gnu/packages/jemalloc.scm
@@ -48,6 +48,8 @@
(build-system gnu-build-system)
(arguments
(list
+ #:tests? (and (not (%current-target-system))
+ (not (target-arm32?)))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'delete-thp-test
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index cc6c990d376..3509d70ef8e 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
;;; Copyright © 2018–2022 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2018, 2021-2025 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2018, 2021-2026 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
@@ -1127,6 +1127,10 @@ Library.")
(srfi srfi-26)
,@modules)
modules))
+ ;; TODO: Figure out why some tests fail on powerpc64le-linux.
+ ((#:tests? current-test-config #t)
+ (and current-test-config
+ (not (target-ppc64le?))))
((#:configure-flags cf #~'())
(if (%current-target-system)
;; Use a newer version of llvm-tblgen and add the new
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 6d7103b5e33..4e5f82b4d92 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -197,8 +197,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.5.0rc1")
- (commit "2d4ed08662714ea46cfe0b41ca195d1ef845fd1b")
+ (let ((version "1.5.0")
+ (commit "230aa373f315f247852ee07dff34146e9b480aec")
(revision 0))
(package
(name "guix")
@@ -215,7 +215,7 @@
(commit commit)))
(sha256
(base32
- "0z1ixlkzsaj978nh57179871xkzbf8zsf10xkcfs2647iznkx7az"))
+ "00398yxjhq9pa03knkjjrih4vc4n5xg9xjykiscndr4c84qhj3zy"))
(file-name (string-append "guix-" version "-checkout"))))
(build-system gnu-build-system)
(arguments
diff --git a/gnu/packages/patches/emacs-gnus-desktop-notify-fix-notifications.patch b/gnu/packages/patches/emacs-gnus-desktop-notify-fix-notifications.patch
deleted file mode 100644
index 5b5648956c8..00000000000
--- a/gnu/packages/patches/emacs-gnus-desktop-notify-fix-notifications.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-Upstream status: https://gitlab.com/wavexx/gnus-desktop-notify.el/-/merge_requests/15
-
-From 905e7ea41560783ec723aa0167911ba050f91789 Mon Sep 17 00:00:00 2001
-From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
-Date: Mon, 16 Jun 2025 09:24:07 +0900
-Subject: [PATCH] Revert to use the notifications library by default.
-
-The alert library project itself mentions that:
-
- For desktop notifications, the notifications package that is
- installed with emacs, provides a probably better alternative for
- most users.
-
-and it appears true, as by default `alert' simply print notification
-messages to the `*Messages*' buffer, which is not exactly a desktop
-notification.
-
-* gnus-desktop-notify.el (require): Require notifications first,
-falling back to alert.
-(gnus-desktop-notify-function): Test for the notifications feature
-first. Mention `notifications' is the default in its doc.
----
- gnus-desktop-notify.el | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-
-diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el
-index 97e65f3..a12e444 100644
---- a/gnus-desktop-notify.el
-+++ b/gnus-desktop-notify.el
-@@ -26,6 +26,11 @@
-
- ;;; Change Log:
-
-+;; 1.5:
-+;; * Revert to use the `notifications' library by default if
-+;; available. The `alert' library doesn't do anything useful in its
-+;; default configuration.
-+;;
- ;; 1.4:
- ;; * Use `alert' package by default if available (`gnus-desktop-notify-alert').
- ;;
-@@ -83,8 +88,8 @@
- (require 'format-spec)
- (require 'gnus-group)
-
--(unless (require 'alert nil t)
-- (require 'notifications nil t))
-+(unless (require 'notifications nil t)
-+ (require 'alert nil t))
-
- (declare-function alert "alert")
- (declare-function notifications-notify "notifications")
-@@ -96,8 +101,8 @@
- :group 'gnus)
-
- (defcustom gnus-desktop-notify-function
-- (cond ((featurep 'alert) 'gnus-desktop-notify-alert)
-- ((featurep 'notifications) 'gnus-desktop-notify-dbus)
-+ (cond ((featurep 'notifications) 'gnus-desktop-notify-dbus)
-+ ((featurep 'alert) 'gnus-desktop-notify-alert)
- (t 'gnus-desktop-notify-send))
- "Notification backend used when a group receives new messages.
- The backend is passed the notification content as a single,
-@@ -109,8 +114,8 @@ or fallback to the generic `gnus-desktop-notify-send' otherwise.
-
- The following functions are available (whose documentation see):
-
-+`gnus-desktop-notify-dbus': Use the `notifications' library (default).
- `gnus-desktop-notify-alert': Use the `alert' library.
--`gnus-desktop-notify-dbus': Use the `notifications' library.
- `gnus-desktop-notify-send': Call the `notify-send' program.
- `gnus-desktop-notify-exec': Call a customizable program."
- :type 'function)
---
-GitLab
-
diff --git a/gnu/packages/patches/emacs-gnus-desktop-notify-rescan.patch b/gnu/packages/patches/emacs-gnus-desktop-notify-rescan.patch
deleted file mode 100644
index 2e1f7782a30..00000000000
--- a/gnu/packages/patches/emacs-gnus-desktop-notify-rescan.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-status: https://gitlab.com/wavexx/gnus-desktop-notify.el/-/merge_requests/16
-
-diff --git a/README.rst b/README.rst
-index 4cacdcb..150a2c2 100644
---- a/README.rst
-+++ b/README.rst
-@@ -18,7 +18,7 @@ new messages are received. For basic usage, to be used in conjunction with
-
- (require 'gnus-desktop-notify)
- (gnus-desktop-notify-mode)
-- (gnus-demon-add-scanmail)
-+ (gnus-demon-add-rescan)
-
- into your ``.gnus`` file. The default is to use alert_ if available, which
- works on every operating system and allows the user to customize the
-@@ -52,7 +52,7 @@ follows:
- (setq gnus-desktop-notify-function 'gnus-desktop-notify-exec
- gnus-desktop-notify-exec-program "growlnotify -a Emacs.app -m")
- (gnus-desktop-notify-mode)
-- (gnus-demon-add-scanmail)
-+ (gnus-demon-add-rescan)
-
-
- Advanced setup
-diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el
-index 97e65f3..3153807 100644
---- a/gnus-desktop-notify.el
-+++ b/gnus-desktop-notify.el
-@@ -50,7 +50,7 @@
- ;;
- ;; (require 'gnus-desktop-notify)
- ;; (gnus-desktop-notify-mode)
--;; (gnus-demon-add-scanmail)
-+;; (gnus-demon-add-rescan)
- ;;
- ;; into your ``.gnus`` file. The default is to use `alert' if available, which
- ;; works on every operating system and allows the user to customize the
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index e52950e3659..adda5ab9bb9 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1060,6 +1060,9 @@ to use as the tty. This is primarily useful for headless systems."
(with-imported-modules (source-module-closure
'((gnu build linux-boot))) ;for 'find-long-options'
#~(begin
+ (use-modules (gnu build linux-boot)
+ (srfi srfi-1))
+
;; console=device,options
;; device: can be tty0, ttyS0, lp0, ttyUSB0 (serial).
;; options: BBBBPNF. P n|o|e, N number of bits,
@@ -1083,7 +1086,20 @@ to use as the tty. This is primarily useful for headless systems."
(find-long-options "console" command)))
(specs (append agetty-specs console-specs)))
(match specs
- (() #f)
+ ;; Fallback to a physical console registered in /proc/consoles.
+ (() (let* ((consoles (read-linux-consoles))
+ (chosen-console
+ ;; Prioritize preferred, if none, choose any enabled.
+ (or (find (lambda (c)
+ (and (not (linux-console-virtual? c))
+ (linux-console-preferred? c)))
+ consoles)
+ (find (lambda (c)
+ (and (not (linux-console-virtual? c))
+ (linux-console-enabled? c)))
+ consoles))))
+ (and chosen-console
+ (linux-console-device chosen-console))))
((spec _ ...)
;; Extract device name from first spec.
(match (string-tokenize spec not-comma)
@@ -1111,7 +1127,8 @@ to use as the tty. This is primarily useful for headless systems."
(requirement (cons* 'user-processes 'host-name 'udev
shepherd-requirement))
- (modules '((ice-9 match) (gnu build linux-boot)))
+ (modules '((ice-9 match) (gnu build linux-boot)
+ (srfi srfi-1)))
(start
(with-imported-modules (source-module-closure
'((gnu build linux-boot)))
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 59dc5b34749..52f9acaafe2 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -2520,11 +2520,10 @@ applications needing access to be root.")
(%current-system))))
;; List of services typically useful for a "desktop" use case.
- ;; Since GDM depends on Rust and Rust is not available on all platforms,
- ;; use SDDM as the fall-back display manager.
- ;; TODO: Switch the condition to use (supported-package? "rust") and make
- ;; a news entry about the change.
- (cons* (if (string-prefix? "x86_64" system)
+ ;; FIXME: Since GDM depends on more dependencies that do not build on i686,
+ ;; keep SDDM on it for the time being.
+ ;; XXX: When changing login manager, also change set-xorg-configuration
+ (cons* (if (target-64bit? system)
(service gdm-service-type)
(service sddm-service-type))
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 068ad68df5d..e679e6bc03d 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -1415,14 +1415,14 @@ polkit.addRule(function(action, subject) {
"Run the GNOME Desktop Manager (GDM), a program that allows
you to log in in a graphical session, whether or not you use GNOME."))))
-;; Since GDM depends on Rust and Rust is not available on all platforms,
-;; use SDDM as the fall-back display manager.
-;; TODO: Switch the condition to take into account if Rust is supported and
-;; match the configuration in desktop-services-for-system.
+
+;; FIXME: Since GDM depends on more dependencies that do not build on i686,
+;; keep SDDM on it for the time being.
+;; XXX: When changing this, also change desktop-services-for-system
(define* (set-xorg-configuration config
#:optional
(login-manager-service-type
- (if (target-x86-64?)
+ (if (target-64bit?)
gdm-service-type
sddm-service-type)))
"Tell the log-in manager (of type @var{login-manager-service-type}) to use
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl
index 2d65f222947..afe5ae2d2ba 100644
--- a/gnu/system/examples/desktop.tmpl
+++ b/gnu/system/examples/desktop.tmpl
@@ -3,7 +3,8 @@
;; for a "desktop" setup with GNOME and Xfce where the
;; root partition is encrypted with LUKS, and a swap file.
-(use-modules (gnu) (gnu system nss) (guix utils))
+(use-modules (gnu) (gnu system nss) (guix utils)
+ (guix packages))
(use-service-modules desktop sddm xorg)
(use-package-modules gnome)
@@ -73,7 +74,10 @@
;; by clicking the gear. Use the "desktop" services, which
;; include the X11 log-in service, networking with
;; NetworkManager, and more.
- (services (if (target-x86-64?)
+ (services (if (supported-package? gnome
+ (or (and=> (%current-target-system)
+ gnu-triplet->nix-system)
+ (%current-system)))
(append (list (service gnome-desktop-service-type)
(service xfce-desktop-service-type)
(set-xorg-configuration
@@ -81,16 +85,14 @@
(keyboard-layout keyboard-layout))))
%desktop-services)
- ;; FIXME: Since GDM depends on Rust (gdm -> gnome-shell -> gjs
- ;; -> mozjs -> rust) and Rust is currently unavailable on
- ;; non-x86_64 platforms, we use SDDM and Mate here instead of
- ;; GNOME and GDM.
+ ;; FIXME: Since Gnome depends on Rust and Rust is currently
+ ;; unavailable on some platforms, we use MATE here instead of
+ ;; GNOME.
(append (list (service mate-desktop-service-type)
(service xfce-desktop-service-type)
(set-xorg-configuration
(xorg-configuration
- (keyboard-layout keyboard-layout))
- sddm-service-type))
+ (keyboard-layout keyboard-layout))))
%desktop-services)))
;; Allow resolution of '.local' host names with mDNS.
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index e5dfdbb427b..7d9cfa8f21d 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -25,9 +25,11 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu system install)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu)
#:use-module (gnu system)
#:use-module (gnu system privilege)
+ #:use-module (guix build-system trivial)
#:use-module (gnu bootloader)
#:use-module (gnu bootloader u-boot)
#:use-module (guix gexp)
@@ -336,6 +338,104 @@ templates under @file{/etc/configuration}.")))
"Load the @code{uvesafb} kernel module with the right options.")
(default-value #t)))
+(define %installation-login-pam-service
+;; Custom 'login' pam.d rule. It is based on the original one,
+;; but includes possibility to print different motd. This motd
+;; is useful for headless consoles.
+ (let* ((unix (pam-entry
+ (control "required")
+ (module "pam_unix.so")))
+ (env (pam-entry ; to honor /etc/environment.
+ (control "required")
+ (module "pam_env.so")))
+ (motd (plain-file "motd" "
+\x1b[1;37mWelcome to the installation of GNU Guix!\x1b[0m
+
+\x1b[2m\
+Using this shell, you can carry out the installation process \"manually.\"
+Access documentation at any time by pressing Alt-F2.\x1b[0m
+"))
+ (console-motd (plain-file "console-motd" "
+\x1b[1;37mWelcome to the installation of GNU Guix!\x1b[0m
+
+You are in a headless console. If you can use a display, you should see the
+graphical installer on TTY1, it's opened by default. In case you cannot use a
+display, you can carry out the installation process in this shell \"manually\"
+or by starting the installer, using `guix-system-installer` command.
+
+\x1b[2mYou can access the Guix documentation using `info \"(guix)\"`.\x1b[0m
+"))
+ (show-motd (program-file "show-motd"
+ #~(begin
+ (use-modules (ice-9 textual-ports))
+
+ (call-with-input-file
+ (if (file-exists?
+ (string-append
+ "/tmp/console_"
+ (basename (getenv "PAM_TTY"))))
+ #$console-motd
+ #$motd)
+ (lambda (port)
+ (display (get-string-all port))))))))
+ (pam-service
+ (name "login")
+ (account (list unix))
+ (auth (list (pam-entry
+ (control "required")
+ (module "pam_unix.so")
+ (arguments '("nullok")))))
+ (password (list (pam-entry
+ (control "required")
+ (module "pam_unix.so")
+ (arguments '("sha512" "shadow")))))
+ (session `(,(pam-entry
+ (control "optional")
+ (module "pam_exec.so")
+ (arguments
+ (list "type=open_session" "stdout" show-motd)))
+ ,(pam-entry ;to fill in /proc/self/loginuid
+ (control "required")
+ (module "pam_loginuid.so"))
+ ,env ,unix)))))
+
+(define %installation-console-login
+;; Make a custom 'login' wrapper for execution in console
+;; terminal. It instructs pam.d login rule to print different
+;; motd.
+ (program-file
+ "login-with-motd"
+ #~(begin
+ (call-with-output-file
+ (string-append "/tmp/console_"
+ (basename (ttyname (current-output-port))))
+ (const #t))
+
+ (apply execlp
+ #$(file-append shadow "/bin/login")
+ (command-line)))))
+
+(define* (installer-command-package installer-program
+ #:key executable)
+ (package
+ (name executable)
+ (version "0")
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ (list #:builder (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+
+ (mkdir-p (string-append #$output "/bin"))
+
+ (symlink #$installer-program
+ (string-append #$output "/bin/" #$executable))))))
+ (home-page #f)
+ (synopsis "Provides the Guix System installer as run-guix-installer command")
+ (description "Provides the Guix System installer as run-guix-installer command.")
+ (license license:gpl3+)))
+
(define* (%installation-services
#:key
(system (or (and=>
@@ -344,152 +444,168 @@ templates under @file{/etc/configuration}.")))
(%current-system)))
(guix-for-system (current-guix)))
;; List of services of the installation system.
- (let ((motd (plain-file "motd" "
-\x1b[1;37mWelcome to the installation of GNU Guix!\x1b[0m
+ (define (normal-tty tty)
+ (service mingetty-service-type
+ (mingetty-configuration (tty tty)
+ (auto-login "root")
+ (login-pause? #t))))
-\x1b[2m\
-Using this shell, you can carry out the installation process \"manually.\"
-Access documentation at any time by pressing Alt-F2.\x1b[0m
-")))
- (define (normal-tty tty)
- (service mingetty-service-type
- (mingetty-configuration (tty tty)
- (auto-login "root")
- (login-pause? #t))))
+ (define bare-bones-os
+ (load "examples/bare-bones.tmpl"))
+
+ (define installer
+ (installer-program
+ #:guix-for-installer guix-for-system))
+
+ (append
+ ;; Generic services
+ (list (service virtual-terminal-service-type)
- (define bare-bones-os
- (load "examples/bare-bones.tmpl"))
+ (service kmscon-service-type
+ (kmscon-configuration
+ (virtual-terminal "tty1")
+ (login-program installer)))
- (append
- ;; Generic services
- (list (service virtual-terminal-service-type)
+ (simple-service 'installer-login
+ pam-root-service-type
+ (list %installation-login-pam-service))
- (service kmscon-service-type
- (kmscon-configuration
- (virtual-terminal "tty1")
- (login-program (installer-program
- #:guix-for-installer guix-for-system))))
+ ;; Documentation. The manual is in UTF-8, but
+ ;; 'console-font-service' sets up Unicode support and loads a font
+ ;; with all the useful glyphs like em dash and quotation marks.
+ (service documentation-service-type "tty2")
- (service login-service-type
- (login-configuration
- (motd motd)))
+ ;; Documentation add-on.
+ %configuration-template-service
- ;; Documentation. The manual is in UTF-8, but
- ;; 'console-font-service' sets up Unicode support and loads a font
- ;; with all the useful glyphs like em dash and quotation marks.
- (service documentation-service-type "tty2")
+ ;; A bunch of 'root' ttys.
+ (normal-tty "tty3")
+ (normal-tty "tty4")
+ (normal-tty "tty5")
+ (normal-tty "tty6")
- ;; Documentation add-on.
- %configuration-template-service
+ ;; The usual services.
+ (service shepherd-system-log-service-type)
- ;; A bunch of 'root' ttys.
- (normal-tty "tty3")
- (normal-tty "tty4")
- (normal-tty "tty5")
- (normal-tty "tty6")
+ ;; Use the Avahi daemon to discover substitute servers on the local
+ ;; network. It can be faster than fetching from remote servers.
+ (service avahi-service-type)
- ;; The usual services.
- (service shepherd-system-log-service-type)
+ ;; Allow runninng the installer command on headless setups.
+ (simple-service 'installer-program-profile
+ profile-service-type
+ (list (installer-command-package
+ installer
+ #:executable "guix-system-installer")))
- ;; Use the Avahi daemon to discover substitute servers on the local
- ;; network. It can be faster than fetching from remote servers.
- (service avahi-service-type)
+ ;; The build daemon.
+ (service guix-service-type
+ (guix-configuration
+ ;; Register the default substitute server key(s) as
+ ;; trusted to allow the installation process to use
+ ;; substitutes by default.
+ (authorize-key? #t)
- ;; The build daemon.
- (service guix-service-type
- (guix-configuration
- ;; Register the default substitute server key(s) as
- ;; trusted to allow the installation process to use
- ;; substitutes by default.
- (authorize-key? #t)
+ ;; Install and run the current Guix rather than an older
+ ;; snapshot.
+ (guix guix-for-system)))
- ;; Install and run the current Guix rather than an older
- ;; snapshot.
- (guix guix-for-system)))
+ ;; Start udev so that useful device nodes are available.
+ ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for
+ ;; regulations-compliant WiFi access.
+ (service udev-service-type
+ (udev-configuration
+ (rules (list lvm2 crda))))
- ;; Start udev so that useful device nodes are available.
- ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for
- ;; regulations-compliant WiFi access.
- (service udev-service-type
- (udev-configuration
- (rules (list lvm2 crda))))
+ ;; Add the 'cow-store' service, which users have to start manually
+ ;; since it takes the installation directory as an argument.
+ (cow-store-service)
- ;; Add the 'cow-store' service, which users have to start manually
- ;; since it takes the installation directory as an argument.
- (cow-store-service)
+ ;; Install Unicode support and a suitable font.
+ (service console-font-service-type
+ (map (match-lambda
+ ("tty2"
+ ;; Use a font that contains characters such as
+ ;; curly quotes as found in the manual.
+ '("tty2" . "LatGrkCyr-8x16"))
+ (tty
+ ;; Use a font that doesn't have more than 256
+ ;; glyphs so that we can use colors with varying
+ ;; brightness levels (see note in setfont(8)).
+ `(,tty . "lat9u-16")))
+ '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
- ;; Install Unicode support and a suitable font.
- (service console-font-service-type
- (map (match-lambda
- ("tty2"
- ;; Use a font that contains characters such as
- ;; curly quotes as found in the manual.
- '("tty2" . "LatGrkCyr-8x16"))
- (tty
- ;; Use a font that doesn't have more than 256
- ;; glyphs so that we can use colors with varying
- ;; brightness levels (see note in setfont(8)).
- `(,tty . "lat9u-16")))
- '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
+ ;; To facilitate copy/paste.
+ (service gpm-service-type)
- ;; To facilitate copy/paste.
- (service gpm-service-type)
+ ;; Add an SSH server to facilitate remote installs.
+ (service openssh-service-type
+ (openssh-configuration
+ (port-number 22)
+ (permit-root-login #t)
+ ;; The root account is passwordless, so make sure
+ ;; a password is set before allowing logins.
+ (allow-empty-passwords? #f)
+ (password-authentication? #t)
- ;; Add an SSH server to facilitate remote installs.
- (service openssh-service-type
- (openssh-configuration
- (port-number 22)
- (permit-root-login #t)
- ;; The root account is passwordless, so make sure
- ;; a password is set before allowing logins.
- (allow-empty-passwords? #f)
- (password-authentication? #t)
+ ;; Don't start it upfront.
+ (%auto-start? #f)))
- ;; Don't start it upfront.
- (%auto-start? #f)))
+ ;; Since this is running on a USB stick with a overlayfs as the root
+ ;; file system, use an appropriate cache configuration.
+ (service nscd-service-type
+ (nscd-configuration
+ (caches %nscd-minimal-caches)))
- ;; Since this is running on a USB stick with a overlayfs as the root
- ;; file system, use an appropriate cache configuration.
- (service nscd-service-type
- (nscd-configuration
- (caches %nscd-minimal-caches)))
+ ;; Having /bin/sh is a good idea. In particular it allows Tramp
+ ;; connections to this system to work.
+ (service special-files-service-type
+ `(("/bin/sh" ,(file-append bash "/bin/sh"))))
- ;; Having /bin/sh is a good idea. In particular it allows Tramp
- ;; connections to this system to work.
- (service special-files-service-type
- `(("/bin/sh" ,(file-append bash "/bin/sh"))))
+ ;; Loopback device, needed by OpenSSH notably.
+ (service static-networking-service-type
+ (list %loopback-static-networking))
- ;; Loopback device, needed by OpenSSH notably.
- (service static-networking-service-type
- (list %loopback-static-networking))
+ (service wpa-supplicant-service-type)
+ (service dbus-root-service-type)
+ (service connman-service-type
+ (connman-configuration
+ (disable-vpn? #t)))
- (service wpa-supplicant-service-type)
- (service dbus-root-service-type)
- (service connman-service-type
- (connman-configuration
- (disable-vpn? #t)))
+ ;; Keep a reference to BARE-BONES-OS to make sure it can be
+ ;; installed without downloading/building anything. Also keep the
+ ;; things needed by 'profile-derivation' to minimize the amount of
+ ;; download.
+ (service gc-root-service-type
+ (append
+ (list bare-bones-os
+ (libc-utf8-locales-for-target system)
+ texinfo
+ guile-3.0)
+ %default-locale-libcs)))
- ;; Keep a reference to BARE-BONES-OS to make sure it can be
- ;; installed without downloading/building anything. Also keep the
- ;; things needed by 'profile-derivation' to minimize the amount of
- ;; download.
- (service gc-root-service-type
- (append
- (list bare-bones-os
- (libc-utf8-locales-for-target system)
- texinfo
- guile-3.0)
- %default-locale-libcs)))
+ ;; Specific system services
- ;; Specific system services
+ ;; AArch64 has a better detection of consoles, mainly because device
+ ;; trees are utilized. On x86_64, the detection is usually done
+ ;; through BIOS and consoles do not get registered to /proc/console.
+ ;; The only way they would is if the user used console linux argument.
+ `(,@(if (target-aarch64? system)
+ (list (service agetty-service-type
+ (agetty-configuration (tty #f)
+ (auto-login "root")
+ (login-pause? #t)
+ (login-program
+ %installation-console-login))))
+ '()))
- ;; Machines without Kernel Mode Setting (those with many old and
- ;; current AMD GPUs, SiS GPUs, ...) need uvesafb to show the GUI
- ;; installer. Some may also need a kernel parameter like nomodeset
- ;; or vga=793, but we leave that for the user to specify in GRUB.
- `(,@(if (supported-package? v86d system)
- (list (service uvesafb-service-type))
- '())))))
+ ;; Machines without Kernel Mode Setting (those with many old and
+ ;; current AMD GPUs, SiS GPUs, ...) need uvesafb to show the GUI
+ ;; installer. Some may also need a kernel parameter like nomodeset
+ ;; or vga=793, but we leave that for the user to specify in GRUB.
+ `(,@(if (supported-package? v86d system)
+ (list (service uvesafb-service-type))
+ '()))))
(define %issue
;; Greeting.
@@ -530,10 +646,44 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
"usb_common" "usbcore"
;; USB 3.0
"xhci_pci" "xhci_hcd"
- ;; embedded USB 3.0
"xhci_plat_hcd"
+ ;; More USB controllers
+ "dwc3" "dwc3_pci"
+ ;; Allwinner
+ "phy_sun4i_usb" "phy_sun50i_usb3"
+ ;; Qualcomm
+ "dwc3_qcom"
+ "phy_qcom_qmp_usb" "phy_qcom_qusb2"
+ "phy_qcom_snps_femto_v2" "phy_qcom_usb_hs"
+ "phy_qcom_usb_ss"
+ ;; Texas Instruments
+ "phy_tusb1210"
+ ;; Rockchip
+ "phy_rockchip_usb"
+ "phy_rockchip_inno_usb2" "phy_rockchip_typec"
+ ;; NXP i.MX
+ "phy_fsl_imx8mq_usb"
+ ;; Generic
+ "phy_generic"
+ ;; "thunderbolt" "typec_thunderbolt"
;; USB 2.0
- "ehci_pci" "ehci_hcd")
+ "dwc2"
+ "ehci_pci" "ehci_hcd"
+ "ehci_platform"
+ ;; USB 1.1
+ "ohci_pci" "ohci_hcd"
+ ;; SD cards
+ "mmc_hsq" "mmc_spi"
+ "mmc_core" "mmc_block"
+ "sdhci" "sdhci_pci"
+ "mmc_spi"
+ "sdhci_acpi"
+ ;; Platform specific SD card
+ "dw_mmc" "dw_mmc-pltfm" "dw_mmc-rockchip"
+ "sunxi_mmc" "sdhci_pltfm" "sdhci_msm"
+ "sdhci_of_arasan" "sdhci_of_esdhc" "sdhci_brcmstb"
+ "sdhci_tegra" "phy_rockchip_emmc"
+ "sdhci_esdhc_imx")
'())
,@%base-initrd-modules))