From 59e80445882f8b0379e54916f89510c0deda6698 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 13 Mar 2019 16:44:02 +0100 Subject: Remove traces of "GuixSD". * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Remove mentions of "GuixSD". * gnu/bootloader/grub.scm (install-grub-efi): Likewise. * gnu/build/vm.scm (make-iso9660-image): Change default #:volume-id to "Guix_image". (initialize-hard-disk): Search for the "Guix_image" label. * gnu/ci.scm (system-test-jobs, tarball-jobs): Remove "GuixSD". * gnu/installer/newt/welcome.scm (run-welcome-page): Likewise. * gnu/packages/audio.scm (supercollider)[description]: Likewise. * gnu/packages/curl.scm (curl): Likewise. * gnu/packages/emacs.scm (emacs): Likewise. * gnu/packages/gnome.scm (network-manager): Likewise. * gnu/packages/julia.scm (julia): Likewise. * gnu/packages/linux.scm (alsa-plugins): Likewise. (powertop, wireless-regdb): Likewise. * gnu/packages/package-management.scm (guix): Likewise. * gnu/packages/polkit.scm (polkit): Likewise. * gnu/packages/tex.scm (texlive-bin): Likewise. * gnu/services/base.scm (file-systems->fstab): Likewise. * gnu/services/cups.scm (%cups-activation): Likewise. * gnu/services/mail.scm (%dovecot-activation): Likewise. * gnu/services/messaging.scm (prosody-configuration)[log]: Likewise. * gnu/system/examples/vm-image.tmpl (vm-image-motd): Likewise. * gnu/system/install.scm (installation-os)[file-systems]: Change root file system label to "Guix_image". * gnu/system/mapped-devices.scm (check-device-initrd-modules): Remove "GuixSD". * gnu/system/vm.scm (system-docker-image): Likewise. (system-disk-image)[root-label]: Change to "Guix_image". * gnu/tests/install.scm (run-install): Remove "GuixSD". * guix/modules.scm (guix-module-name?): Likewise. * nix/libstore/optimise-store.cc: Likewise. --- gnu/build/vm.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/build') diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 0aef73d26d..6d6a0c4cb4 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès ;;; Copyright © 2016 Christopher Allan Webber ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2017 Mathieu Othacehe @@ -422,7 +422,7 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." (string-append "boot/grub/grub.cfg=" config-file)))) (define* (make-iso9660-image grub config-file os-drv target - #:key (volume-id "GuixSD_image") (volume-uuid #f) + #:key (volume-id "Guix_image") (volume-uuid #f) register-closures? (closures '())) "Given a GRUB package, creates an iso image as TARGET, using CONFIG-FILE as GRUB configuration and OS-DRV as the stuff in it." @@ -550,7 +550,7 @@ passing it a directory name where it is mounted." (lambda (port) (format port "insmod part_msdos~@ - search --set=root --label GuixSD_image~@ + search --set=root --label Guix_image~@ configfile /boot/grub/grub.cfg~%"))) (display "creating EFI firmware image...") -- cgit 1.4.1 From 4cd386afae444f3ee603cd07d282b2eee3253555 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 13 Mar 2019 17:11:19 +0100 Subject: linux-modules: Factorize 'missing-modules'. * gnu/build/linux-modules.scm (missing-modules): New procedure. * gnu/system/mapped-devices.scm (check-device-initrd-modules): Use it. --- gnu/build/linux-modules.scm | 27 +++++++++++++++++++-- gnu/system/mapped-devices.scm | 55 +++++++++++++++++-------------------------- 2 files changed, 47 insertions(+), 35 deletions(-) (limited to 'gnu/build') diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm index d99d1f01a4..c66ef97012 100644 --- a/gnu/build/linux-modules.scm +++ b/gnu/build/linux-modules.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2016, 2018 Ludovic Courtès +;;; Copyright © 2014, 2016, 2018, 2019 Ludovic Courtès ;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. @@ -47,7 +47,8 @@ device-module-aliases known-module-aliases - matching-modules)) + matching-modules + missing-modules)) ;;; Commentary: ;;; @@ -463,4 +464,26 @@ ALIAS is a string like \"scsi:t-0x00\" as returned by module))) known-aliases)) +(define* (missing-modules device modules-provided) + "Assuming MODULES-PROVIDED lists kernel modules that are already +provided--e.g., in the initrd, return the list of missing kernel modules that +are required to access DEVICE." + (define aliases + ;; Attempt to load 'modules.alias' from the current kernel, assuming we're + ;; on Guix System, and assuming that corresponds to the kernel we'll be + ;; installing. + (known-module-aliases)) + + (if aliases + (let* ((modules (delete-duplicates + (append-map (cut matching-modules <> aliases) + (device-module-aliases device)))) + + ;; Module names (not file names) are supposed to use underscores + ;; instead of hyphens. MODULES is a list of module names, whereas + ;; LINUX-MODULES is file names without '.ko', so normalize them. + (provided (map file-name->module-name modules-provided))) + (remove (cut member <> provided) modules)) + '())) + ;;; linux-modules.scm ends here diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm index e29ad3ad38..7c58f876a3 100644 --- a/gnu/system/mapped-devices.scm +++ b/gnu/system/mapped-devices.scm @@ -32,8 +32,7 @@ #:use-module (gnu system uuid) #:autoload (gnu build file-systems) (find-partition-by-luks-uuid) #:autoload (gnu build linux-modules) - (device-module-aliases matching-modules known-module-aliases - normalize-module-name file-name->module-name) + (missing-modules) #:autoload (gnu packages cryptsetup) (cryptsetup-static) #:autoload (gnu packages linux) (mdadm-static) #:use-module (srfi srfi-1) @@ -118,37 +117,27 @@ (define (check-device-initrd-modules device linux-modules location) "Raise an error if DEVICE needs modules beyond LINUX-MODULES to operate. DEVICE must be a \"/dev\" file name." - (define aliases - ;; Attempt to load 'modules.alias' from the current kernel, assuming we're - ;; on Guix System, and assuming that corresponds to the kernel we'll be - ;; installing. Skip the whole thing if that file cannot be read. + (define missing + ;; Attempt to determine missing modules. (catch 'system-error (lambda () - (known-module-aliases)) - (const #f))) - - (when aliases - (let* ((modules (delete-duplicates - (append-map (cut matching-modules <> aliases) - (device-module-aliases device)))) - - ;; Module names (not file names) are supposed to use underscores - ;; instead of hyphens. MODULES is a list of module names, whereas - ;; LINUX-MODULES is file names without '.ko', so normalize them. - (provided (map file-name->module-name linux-modules)) - (missing (remove (cut member <> provided) modules))) - (unless (null? missing) - ;; Note: What we suggest here is a list of module names (e.g., - ;; "usb_storage"), not file names (e.g., "usb-storage.ko"). This is - ;; OK because we have machinery that accepts both the hyphen and the - ;; underscore version. - (raise (condition - (&message - (message (format #f (G_ "you may need these modules \ + (missing-modules device linux-modules)) + + ;; If we can't do that (e.g., EPERM), skip the whole thing. + (const '()))) + + (unless (null? missing) + ;; Note: What we suggest here is a list of module names (e.g., + ;; "usb_storage"), not file names (e.g., "usb-storage.ko"). This is + ;; OK because we have machinery that accepts both the hyphen and the + ;; underscore version. + (raise (condition + (&message + (message (format #f (G_ "you may need these modules \ in the initrd for ~a:~{ ~a~}") - device missing))) - (&fix-hint - (hint (format #f (G_ "Try adding them to the + device missing))) + (&fix-hint + (hint (format #f (G_ "Try adding them to the @code{initrd-modules} field of your @code{operating-system} declaration, along these lines: @@ -161,9 +150,9 @@ these lines: If you think this diagnostic is inaccurate, use the @option{--skip-checks} option of @command{guix system}.\n") - missing))) - (&error-location - (location (source-properties->location location))))))))) + missing))) + (&error-location + (location (source-properties->location location))))))) ;;; -- cgit 1.4.1