From c59cc2383d6620f6ebbed80ce1feecae41a64d69 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 18 Apr 2021 15:37:20 +0200 Subject: import: Remove Nix importer. This importer has suffered from bitrot and no longer works with current Nix and Nixpkgs. See and . * guix/import/snix.scm, guix/scripts/import/nix.scm, tests/snix.scm: Remove. * Makefile.am (MODULES, SCM_TESTS): Remove them. * guix/scripts/import.scm (importers): Remove "nix". * build-aux/test-env.in: Remove NIXPKGS variable. * configure.ac: Remove '--with-nixpkgs' option. * doc/guix.texi (Invoking guix import): Remove bit about "guix import nix". * etc/completion/fish/guix.fish: Likewise. --- doc/guix.texi | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 58bcfbdbb5..2fe7ad3a2a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -11417,36 +11417,6 @@ and outputs a package expression: guix import json hello.json @end example -@item nix -Import metadata from a local copy of the source of the -@uref{https://nixos.org/nixpkgs/, Nixpkgs distribution}@footnote{This -relies on the @command{nix-instantiate} command of -@uref{https://nixos.org/nix/, Nix}.}. Package definitions in Nixpkgs are -typically written in a mixture of Nix-language and Bash code. This -command only imports the high-level package structure that is written in -the Nix language. It normally includes all the basic fields of a -package definition. - -When importing a GNU package, the synopsis and descriptions are replaced -by their canonical upstream variant. - -Usually, you will first need to do: - -@example -export NIX_REMOTE=daemon -@end example - -@noindent -so that @command{nix-instantiate} does not try to open the Nix database. - -As an example, the command below imports the package definition of -LibreOffice (more precisely, it imports the definition of the package -bound to the @code{libreoffice} top-level attribute): - -@example -guix import nix ~/path/to/nixpkgs libreoffice -@end example - @item hackage @cindex hackage Import metadata from the Haskell community's central package archive -- cgit v1.2.3 From f06685a98594488dd5be2085cc8a10c295873179 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 24 Apr 2021 14:58:12 +0200 Subject: doc: Fix cross-reference URL to translated manual. * doc/htmlxref.cnf: Fix translated manual URL. --- doc/htmlxref.cnf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/htmlxref.cnf b/doc/htmlxref.cnf index 960f0f08fe..c1589453ed 100644 --- a/doc/htmlxref.cnf +++ b/doc/htmlxref.cnf @@ -397,15 +397,15 @@ guile-gtk node ${GS}/guile-gtk/docs/guile-gtk/ guile-rpc mono ${GS}/guile-rpc/manual/guile-rpc.html guile-rpc node ${GS}/guile-rpc/manual/html_node/ -guix.de mono ${GS}/guix/manual/de/guix.html +guix.de mono ${GS}/guix/manual/de/guix.de.html guix.de node ${GS}/guix/manual/de/html_node/ -guix.es mono ${GS}/guix/manual/es/guix.html +guix.es mono ${GS}/guix/manual/es/guix.es.html guix.es node ${GS}/guix/manual/es/html_node/ -guix.fr mono ${GS}/guix/manual/fr/guix.html +guix.fr mono ${GS}/guix/manual/fr/guix.fr.html guix.fr node ${GS}/guix/manual/fr/html_node/ -guix.ru mono ${GS}/guix/manual/ru/guix.html +guix.ru mono ${GS}/guix/manual/ru/guix.ru.html guix.ru node ${GS}/guix/manual/ru/html_node/ -guix.zh_CN mono ${GS}/guix/manual/zh-cn/guix.html +guix.zh_CN mono ${GS}/guix/manual/zh-cn/guix.zh_CN.html guix.zh_CN node ${GS}/guix/manual/zh-cn/html_node/ guix mono ${GS}/guix/manual/en/guix.html guix node ${GS}/guix/manual/en/html_node/ -- cgit v1.2.3 From 10cf742cbc8c887cfd370ceeeb36c9c5c05c33d0 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 3 May 2021 09:47:47 -0400 Subject: doc: Update the URL of the system VM image. This is a follow up to commit ebf5d77eab, which added the qcow2 file extension to the VM image file name. * doc/guix.texi (Running Guix in a VM): Update URL. --- doc/guix.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 2fe7ad3a2a..e23e831676 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33515,7 +33515,7 @@ Whether or not the droplet should be created with IPv6 networking. @cindex virtual machine To run Guix in a virtual machine (VM), one can use the pre-built Guix VM image distributed at -@url{@value{BASE-URL}/guix-system-vm-image-@value{VERSION}.x86_64-linux.xz}. +@url{@value{BASE-URL}/guix-system-vm-image-@value{VERSION}.x86_64-linux.qcow2.xz}. This image is a compressed image in QCOW format. You will first need to decompress with @command{xz -d}, and then you can pass it to an emulator such as QEMU (see below for details). -- cgit v1.2.3 From 66072a00d78270fb363866438087066e0910add4 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Mon, 3 May 2021 12:35:55 -0400 Subject: nls: Guard against the list of translated Texinfo files becoming stale. This change is so that the list of translated Texinfo files remain in sync with the list of supported (translated) languages. * doc/local.mk (MANUAL_LANGUAGES, COOKBOOK_LANGUAGES): New variables. (lang_to_texinfos): New function. (TRANSLATED_INFO): Use it to construct the list of files. Modified-by: Maxim Cournoyer Signed-off-by: Maxim Cournoyer --- doc/local.mk | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/doc/local.mk b/doc/local.mk index 70e102bdef..34321d6656 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -4,7 +4,7 @@ # Copyright © 2013 Andreas Enge # Copyright © 2016 Taylan Ulrich Bayırlı/Kammer # Copyright © 2016, 2018 Mathieu Lirzin -# Copyright © 2018 Julien Lepiller +# Copyright © 2018, 2021 Julien Lepiller # # This file is part of GNU Guix. # @@ -21,6 +21,16 @@ # You should have received a copy of the GNU General Public License # along with GNU Guix. If not, see . +# If adding a language, update the following variables, and info_TEXINFOS. +MANUAL_LANGUAGES = de es fa fr it ko pt_BR ru sk zh_CN +COOKBOOK_LANGUAGES = de fa fr ko zh_Hans + +# Arg1: A list of languages codes. +# Arg2: The file name stem. +lang_to_texinfo = $(foreach lang,$(1),%D%/$(2).$(lang).texi) + +# Automake does not understand GNU Make non-standard extensions, +# unfortunately, so we cannot use the above patsubst-based function here. info_TEXINFOS = %D%/guix.texi \ %D%/guix.de.texi \ %D%/guix.es.texi \ @@ -70,18 +80,10 @@ OS_CONFIG_EXAMPLES_TEXI = \ %D%/os-config-desktop.texi \ %D%/os-config-lightweight-desktop.texi -TRANSLATED_INFO = \ - %D%/guix.de.texi \ - %D%/guix.es.texi \ - %D%/guix.fr.texi \ - %D%/guix.ru.texi \ - %D%/guix.zh_CN.texi \ - %D%/contributing.de.texi \ - %D%/contributing.es.texi \ - %D%/contributing.fr.texi \ - %D%/contributing.ru.texi \ - %D%/contributing.zh_CN.texi \ - %D%/guix-cookbook.de.texi +TRANSLATED_INFO = \ + $(call lang_to_texinfo,$(MANUAL_LANGUAGES),guix) \ + $(call lang_to_texinfo,$(MANUAL_LANGUAGES),contributing) \ + $(call lang_to_texinfo,$(COOKBOOK_LANGUAGES),guix-cookbook) # Bundle this file so that makeinfo finds it in out-of-source-tree builds. BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO) -- cgit v1.2.3 From 82c0f34c7e62366c415470a3fe1a6a0c46e3d946 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 2 May 2021 23:16:48 +0200 Subject: maint: Do not xz-compress ISO images. The xz-compressed image is 23% smaller than the original ISO image (with built-in zlib compression), but the extra decompression step is unconventional and often a hindrance for users. See discussion at . * Makefile.am (release): Do not compress ISO images. * doc/guix.texi (USB Stick and DVD Installation): Remove ".xz" suffix from URL and file name. (Copying to a USB Stick, Burning on a DVD): Remove introductory words, @enumerate, and first item. Signed-off-by: Maxim Cournoyer --- Makefile.am | 6 +++--- doc/guix.texi | 30 +++--------------------------- 2 files changed, 6 insertions(+), 30 deletions(-) (limited to 'doc') diff --git a/Makefile.am b/Makefile.am index de32a0a42b..0a4bb13e5b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -886,9 +886,9 @@ release: dist-with-updated-version all echo "failed to produced Guix installation image for $$system" >&2 ; \ exit 1 ; \ fi ; \ - xz < "$$image" > "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.xz.tmp" ; \ - mv "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.xz.tmp" \ - "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.xz" ; \ + cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" ; \ + mv "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" \ + "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso" ; \ done # Generate the VM images. for system in $(GUIX_SYSTEM_VM_SYSTEMS) ; do \ diff --git a/doc/guix.texi b/doc/guix.texi index e23e831676..ff592ce364 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2099,7 +2099,7 @@ about their support in GNU/Linux. An ISO-9660 installation image that can be written to a USB stick or burnt to a DVD can be downloaded from -@indicateurl{@value{BASE-URL}/guix-system-install-@value{VERSION}.x86_64-linux.iso.xz}, +@indicateurl{@value{BASE-URL}/guix-system-install-@value{VERSION}.x86_64-linux.iso}, where you can replace @code{x86_64-linux} with one of: @table @code @@ -2115,8 +2115,8 @@ Make sure to download the associated @file{.sig} file and to verify the authenticity of the image against it, along these lines: @example -$ wget @value{BASE-URL}/guix-system-install-@value{VERSION}.x86_64-linux.iso.xz.sig -$ gpg --verify guix-system-install-@value{VERSION}.x86_64-linux.iso.xz.sig +$ wget @value{BASE-URL}/guix-system-install-@value{VERSION}.x86_64-linux.iso.sig +$ gpg --verify guix-system-install-@value{VERSION}.x86_64-linux.iso.sig @end example If that command fails because you do not have the required public key, @@ -2140,17 +2140,6 @@ It is meant to be copied @emph{as is} to a large-enough USB stick or DVD. @unnumberedsubsec Copying to a USB Stick -To copy the image to a USB stick, follow these steps: - -@enumerate -@item -Decompress the image using the @command{xz} command: - -@example -xz -d guix-system-install-@value{VERSION}.x86_64-linux.iso.xz -@end example - -@item Insert a USB stick of 1@tie{}GiB or more into your machine, and determine its device name. Assuming that the USB stick is known as @file{/dev/sdX}, copy the image with: @@ -2161,21 +2150,9 @@ sync @end example Access to @file{/dev/sdX} usually requires root privileges. -@end enumerate @unnumberedsubsec Burning on a DVD -To copy the image to a DVD, follow these steps: - -@enumerate -@item -Decompress the image using the @command{xz} command: - -@example -xz -d guix-system-install-@value{VERSION}.x86_64-linux.iso.xz -@end example - -@item Insert a blank DVD into your machine, and determine its device name. Assuming that the DVD drive is known as @file{/dev/srX}, copy the image with: @@ -2185,7 +2162,6 @@ growisofs -dvd-compat -Z /dev/srX=guix-system-install-@value{VERSION}.x86_64-lin @end example Access to @file{/dev/srX} usually requires root privileges. -@end enumerate @unnumberedsubsec Booting -- cgit v1.2.3 From 0f583f60f882d74f4cf2332c85343a2db67410c7 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 1 May 2021 22:35:09 -0400 Subject: doc: Update to cover for an additional OpenPGP signing key. The upcoming 1.3.0 release will be signed with my OpenPGP key; subsequent releases may also be. * doc/guix.texi (OPENPGP-SIGNING-KEY-ID, OPENPGP-SIGNING-KEY-URL): Rename to... (OPENPGP-SIGNING-KEY-ID-1, OPENPGP-SIGNING-KEY-URL-1): ... these, respectively. (OPENPGP-SIGNING-KEY-ID-2, OPENPGP-SIGNING-KEY-URL-2): New variables. (Binary Installation): Adjust to cover for the new key. (USB Stick and DVD Installation): Likewise. (Invoking guix refresh): Adjust accordingly. --- doc/guix.texi | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index ff592ce364..5cb7c2bb96 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9,9 +9,11 @@ @include version.texi -@c Identifier of the OpenPGP key used to sign tarballs and such. -@set OPENPGP-SIGNING-KEY-ID 3CE464558A84FDC69DB40CFB090B11993D9AEBB5 -@set OPENPGP-SIGNING-KEY-URL https://sv.gnu.org/people/viewgpg.php?user_id=15145 +@c Identifier of the OpenPGP keys used to sign tarballs and such. +@set OPENPGP-SIGNING-KEY-ID-1 3CE464558A84FDC69DB40CFB090B11993D9AEBB5 @c ludo +@set OPENPGP-SIGNING-KEY-URL-1 https://sv.gnu.org/people/viewgpg.php?user_id=15145 +@set OPENPGP-SIGNING-KEY-ID-2 27D586A4F8900854329FF09F1260E46482E63562 @c maxim +@set OPENPGP-SIGNING-KEY-URL-2 https://sv.gnu.org/people/viewgpg.php?user_id=127547 @c Base URL for downloads. @set BASE-URL https://ftp.gnu.org/gnu/guix @@ -653,7 +655,9 @@ If that command fails because you do not have the required public key, then run this command to import it: @example -$ wget '@value{OPENPGP-SIGNING-KEY-URL}' \ +$ wget '@value{OPENPGP-SIGNING-KEY-URL-1}' \ + -qO - | gpg --import - +$ wget '@value{OPENPGP-SIGNING-KEY-URL-2}' \ -qO - | gpg --import - @end example @@ -2123,7 +2127,9 @@ If that command fails because you do not have the required public key, then run this command to import it: @example -$ wget @value{OPENPGP-SIGNING-KEY-URL} \ +$ wget @value{OPENPGP-SIGNING-KEY-URL-1} \ + -qO - | gpg --import - +$ wget @value{OPENPGP-SIGNING-KEY-URL-2} \ -qO - | gpg --import - @end example @@ -11888,7 +11894,7 @@ Likewise, you can fetch keys to a specific keybox file like this: @example gpg --no-default-keyring --keyring mykeyring.kbx \ - --recv-keys @value{OPENPGP-SIGNING-KEY-ID} + --recv-keys @value{OPENPGP-SIGNING-KEY-ID-1} @end example @xref{GPG Configuration Options, @option{--keyring},, gnupg, Using the GNU -- cgit v1.2.3 From f40b0fa8e686c64196ae3e4fa9eca32a1ffce9c6 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 5 May 2021 11:25:24 -0400 Subject: Revert "doc: Update to cover for an additional OpenPGP signing key." This reverts commit b9fb13b28437a254683273094f189396a6e1421d. Per discussions simply updating OPENPGP-SIGNING-KEY-ID and OPENPGP-SIGNING-KEY-URL will be enough. --- doc/guix.texi | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 5cb7c2bb96..ff592ce364 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9,11 +9,9 @@ @include version.texi -@c Identifier of the OpenPGP keys used to sign tarballs and such. -@set OPENPGP-SIGNING-KEY-ID-1 3CE464558A84FDC69DB40CFB090B11993D9AEBB5 @c ludo -@set OPENPGP-SIGNING-KEY-URL-1 https://sv.gnu.org/people/viewgpg.php?user_id=15145 -@set OPENPGP-SIGNING-KEY-ID-2 27D586A4F8900854329FF09F1260E46482E63562 @c maxim -@set OPENPGP-SIGNING-KEY-URL-2 https://sv.gnu.org/people/viewgpg.php?user_id=127547 +@c Identifier of the OpenPGP key used to sign tarballs and such. +@set OPENPGP-SIGNING-KEY-ID 3CE464558A84FDC69DB40CFB090B11993D9AEBB5 +@set OPENPGP-SIGNING-KEY-URL https://sv.gnu.org/people/viewgpg.php?user_id=15145 @c Base URL for downloads. @set BASE-URL https://ftp.gnu.org/gnu/guix @@ -655,9 +653,7 @@ If that command fails because you do not have the required public key, then run this command to import it: @example -$ wget '@value{OPENPGP-SIGNING-KEY-URL-1}' \ - -qO - | gpg --import - -$ wget '@value{OPENPGP-SIGNING-KEY-URL-2}' \ +$ wget '@value{OPENPGP-SIGNING-KEY-URL}' \ -qO - | gpg --import - @end example @@ -2127,9 +2123,7 @@ If that command fails because you do not have the required public key, then run this command to import it: @example -$ wget @value{OPENPGP-SIGNING-KEY-URL-1} \ - -qO - | gpg --import - -$ wget @value{OPENPGP-SIGNING-KEY-URL-2} \ +$ wget @value{OPENPGP-SIGNING-KEY-URL} \ -qO - | gpg --import - @end example @@ -11894,7 +11888,7 @@ Likewise, you can fetch keys to a specific keybox file like this: @example gpg --no-default-keyring --keyring mykeyring.kbx \ - --recv-keys @value{OPENPGP-SIGNING-KEY-ID-1} + --recv-keys @value{OPENPGP-SIGNING-KEY-ID} @end example @xref{GPG Configuration Options, @option{--keyring},, gnupg, Using the GNU -- cgit v1.2.3 From ace67239467fe3325f4ae2b6e11f02c23090db8a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 5 May 2021 11:26:26 -0400 Subject: doc: Update the OpenPGP key used to sign the release. It was discussed on guix-devel that the manual only needs to have correct instructions for the latest release. * doc/guix.texi (OPENPGP-SIGNING-KEY-ID): Update to my public OpenPGP key. (OPENPGP-SIGNING-KEY-URL): Adjust URL. --- doc/guix.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index ff592ce364..7f54ddfb3c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10,8 +10,8 @@ @include version.texi @c Identifier of the OpenPGP key used to sign tarballs and such. -@set OPENPGP-SIGNING-KEY-ID 3CE464558A84FDC69DB40CFB090B11993D9AEBB5 -@set OPENPGP-SIGNING-KEY-URL https://sv.gnu.org/people/viewgpg.php?user_id=15145 +@set OPENPGP-SIGNING-KEY-ID 27D586A4F8900854329FF09F1260E46482E63562 +@set OPENPGP-SIGNING-KEY-URL https://sv.gnu.org/people/viewgpg.php?user_id=127547 @c Base URL for downloads. @set BASE-URL https://ftp.gnu.org/gnu/guix -- cgit v1.2.3 From b1b41a23f4e48e35bafe282029190bba32cb7218 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 5 May 2021 15:18:05 -0400 Subject: build: Do not compress the (already compressed) VM qcow2 images. The qcow2 format supports compression, and the qcow2 type supported by 'guix system image' produces compressed qcow2 images. * Makefile.am (release): Do not re-compress the qcow2 VM images with xz. * doc/guix.texi (Running Guix in a VM): Adjust VM image URL. --- Makefile.am | 4 +--- doc/guix.texi | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/Makefile.am b/Makefile.am index c6028c586a..d06e1779ca 100644 --- a/Makefile.am +++ b/Makefile.am @@ -900,9 +900,7 @@ release: dist-with-updated-version all echo "failed to produced Guix VM image for $$system" >&2 ; \ exit 1 ; \ fi ; \ - xz < "$$image" > "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.qcow2.xz.tmp" ; \ - mv "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.qcow2.xz.tmp" \ - "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.qcow2.xz" ; \ + cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.qcow2"; \ done @echo @echo "Congratulations! All the release files are now in $(releasedir)." diff --git a/doc/guix.texi b/doc/guix.texi index 7f54ddfb3c..9beef61c94 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33491,7 +33491,7 @@ Whether or not the droplet should be created with IPv6 networking. @cindex virtual machine To run Guix in a virtual machine (VM), one can use the pre-built Guix VM image distributed at -@url{@value{BASE-URL}/guix-system-vm-image-@value{VERSION}.x86_64-linux.qcow2.xz}. +@url{@value{BASE-URL}/guix-system-vm-image-@value{VERSION}.x86_64-linux.qcow2}. This image is a compressed image in QCOW format. You will first need to decompress with @command{xz -d}, and then you can pass it to an emulator such as QEMU (see below for details). -- cgit v1.2.3 From a3df382525ac515d1aa083f7f5bd3bd31eb1df40 Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Mon, 22 Mar 2021 11:23:32 +0800 Subject: gnu: Allow services to install kernel-loadable modules. * gnu/system.scm (operating-system-directory-base-entries): Remove code to handle generation of "kernel" for linux-libre kernels. (operating-system-default-essential-services): Instantiate linux-builder-service-type. (package-for-kernel): Move ... * gnu/services.scm: ... to here. (linux-builder-service-type): New variable. (linux-builder-configuration): New type. (linux-loadable-module-service-type): New variable. * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test): Move code to ... (run-loadable-kernel-modules-test-base): ... new procedure here. (run-loadable-kernel-modules-service-test): New procedure. (%test-loadable-kernel-modules-service-0): New variable. (%test-loadable-kernel-modules-service-1): New variable. (%test-loadable-kernel-modules-service-2): New variable. * doc/guix.texi: Document linux-loadable-module-service-type. Signed-off-by: Danny Milosavljevic --- doc/guix.texi | 22 +++++++++++ gnu/services.scm | 90 +++++++++++++++++++++++++++++++++++++++++++++ gnu/system.scm | 34 +++++------------ gnu/tests/linux-modules.scm | 80 +++++++++++++++++++++++++++++++++++----- 4 files changed, 191 insertions(+), 35 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 0947b9f028..c39cc4a6bd 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -34280,6 +34280,28 @@ configuration when you use @command{guix system reconfigure}, @command{guix system init}, or @command{guix deploy}. @end defvr +@defvr {Scheme Variable} linux-loadable-module-service-type +Type of the service that collects lists of packages containing +kernel-loadable modules, and adds them to the set of kernel-loadable +modules. + +This service type is intended to be extended by other service types, +such as below: + +@lisp +(define module-installing-service-type + (service-type + (name 'module-installing-service) + (extensions (list (service-extension linux-loadable-module-service-type + (const (list module-to-install-1 + module-to-install-2))))) + (default-value #f))) +@end lisp + +This does not actually load modules at bootup, only adds it to the +kernel profile so that it @emph{can} be loaded by other means. +@end defvr + @node Shepherd Services @subsection Shepherd Services diff --git a/gnu/services.scm b/gnu/services.scm index e7da0a026d..8d413e198e 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016 Chris Marusich ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020, 2021 Ricardo Wurmus +;;; Copyright © 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,6 +35,8 @@ (define-module (gnu services) #:use-module (guix diagnostics) #:autoload (guix openpgp) (openpgp-format-fingerprint) #:use-module (guix modules) + #:use-module (guix packages) + #:use-module (guix utils) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages hurd) @@ -107,6 +110,12 @@ (define-module (gnu services) profile-service-type firmware-service-type gc-root-service-type + linux-builder-service-type + linux-builder-configuration + linux-builder-configuration? + linux-builder-configuration-kernel + linux-builder-configuration-modules + linux-loadable-module-service-type %boot-service %activation-service @@ -883,6 +892,87 @@ (define gc-root-service-type will not be reclaimed by the garbage collector.") (default-value '()))) +;; Configuration for the Linux kernel builder. +(define-record-type* + linux-builder-configuration + make-linux-builder-configuration + linux-builder-configuration? + this-linux-builder-configuration + + (kernel linux-builder-configuration-kernel) ; package + (modules linux-builder-configuration-modules (default '()))) ; list of packages + +(define (package-for-kernel target-kernel module-package) + "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if +possible (that is if there's a LINUX keyword argument in the build system)." + (package + (inherit module-package) + (arguments + (substitute-keyword-arguments (package-arguments module-package) + ((#:linux kernel #f) + target-kernel))))) + +(define (linux-builder-configuration->system-entry config) + "Return the kernel entry of the 'system' directory." + (let* ((kernel (linux-builder-configuration-kernel config)) + (modules (linux-builder-configuration-modules config)) + (kernel (profile + (content (packages->manifest + (cons kernel + (map (lambda (module) + (cond + ((package? module) + (package-for-kernel kernel module)) + ;; support (,package "kernel-module-output") + ((and (list? module) (package? (car module))) + (cons (package-for-kernel kernel + (car module)) + (cdr module))) + (else + module))) + modules)))) + (hooks (list linux-module-database))))) + (with-monad %store-monad + (return `(("kernel" ,kernel)))))) + +(define linux-builder-service-type + (service-type (name 'linux-builder) + (extensions + (list (service-extension system-service-type + linux-builder-configuration->system-entry))) + (default-value '()) + (compose identity) + (extend (lambda (config modifiers) + (if (null? modifiers) + config + ((apply compose modifiers) config)))) + (description "Builds the linux-libre kernel profile, containing +the kernel itself and any linux-loadable kernel modules. This can be extended +with a function that accepts the current configuration and returns a new +configuration."))) + +(define (linux-loadable-module-builder-modifier modules) + "Extends linux-builder-service-type by appending the given MODULES to the +configuration of linux-builder-service-type." + (lambda (config) + (linux-builder-configuration + (inherit config) + (modules (append (linux-builder-configuration-modules config) + modules))))) + +(define linux-loadable-module-service-type + (service-type (name 'linux-loadable-modules) + (extensions + (list (service-extension linux-builder-service-type + linux-loadable-module-builder-modifier))) + (default-value '()) + (compose concatenate) + (extend append) + (description "Adds packages and package outputs as modules +included in the booted linux-libre profile. Other services can extend this +service type to add particular modules to the set of linux-loadable modules."))) + + ;;; ;;; Service folding. diff --git a/gnu/system.scm b/gnu/system.scm index 5bf2a85272..7cc4f134b7 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Efraim Flashner ;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. ;;; @@ -601,16 +602,6 @@ (define (operating-system-kernel-file os) (file-append (operating-system-kernel os) "/" (system-linux-image-file-name)))) -(define (package-for-kernel target-kernel module-package) - "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if -possible (that is if there's a LINUX keyword argument in the build system)." - (package - (inherit module-package) - (arguments - (substitute-keyword-arguments (package-arguments module-package) - ((#:linux kernel #f) - target-kernel))))) - (define %default-modprobe-blacklist ;; List of kernel modules to blacklist by default. '("usbmouse" ;races with bcm5974, see @@ -628,23 +619,12 @@ (define* (operating-system-directory-base-entries os) (let* ((locale (operating-system-locale-directory os)) (kernel (operating-system-kernel os)) (hurd (operating-system-hurd os)) - (modules (operating-system-kernel-loadable-modules os)) - (kernel (if hurd - kernel - (profile - (content (packages->manifest - (cons kernel - (map (lambda (module) - (if (package? module) - (package-for-kernel kernel - module) - module)) - modules)))) - (hooks (list linux-module-database))))) (initrd (and (not hurd) (operating-system-initrd-file os))) (params (operating-system-boot-parameters-file os))) - `(("kernel" ,kernel) - ,@(if hurd `(("hurd" ,hurd)) '()) + `(,@(if hurd + `(("hurd" ,hurd) + ("kernel" ,kernel)) + '()) ("parameters" ,params) ,@(if initrd `(("initrd" ,initrd)) '()) ("locale" ,locale)))) ;used by libc @@ -664,6 +644,10 @@ (define known-fs (host-name (host-name-service (operating-system-host-name os))) (entries (operating-system-directory-base-entries os))) (cons* (service system-service-type entries) + (service linux-builder-service-type + (linux-builder-configuration + (kernel (operating-system-kernel os)) + (modules (operating-system-kernel-loadable-modules os)))) %boot-service ;; %SHEPHERD-ROOT-SERVICE must come last so that the gexp that diff --git a/gnu/tests/linux-modules.scm b/gnu/tests/linux-modules.scm index 953b132ef7..30d8eae03b 100644 --- a/gnu/tests/linux-modules.scm +++ b/gnu/tests/linux-modules.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2019 Jakob L. Kreuze ;;; Copyright © 2020 Danny Milosavljevic ;;; Copyright © 2020 Brice Waegeneire +;;; Copyright © 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,7 +35,10 @@ (define-module (gnu tests linux-modules) #:use-module (guix utils) #:export (%test-loadable-kernel-modules-0 %test-loadable-kernel-modules-1 - %test-loadable-kernel-modules-2)) + %test-loadable-kernel-modules-2 + %test-loadable-kernel-modules-service-0 + %test-loadable-kernel-modules-service-1 + %test-loadable-kernel-modules-service-2)) ;;; Commentary: ;;; @@ -66,17 +70,11 @@ (define* (modules-loaded?-program os modules) (member module modules string=?)) '#$modules)))))) -(define* (run-loadable-kernel-modules-test module-packages module-names) - "Run a test of an OS having MODULE-PACKAGES, and verify that MODULE-NAMES -are loaded in memory." +(define* (run-loadable-kernel-modules-test-base base-os module-names) + "Run a test of BASE-OS, verifying that MODULE-NAMES are loaded in memory." (define os (marionette-operating-system - (operating-system - (inherit (simple-operating-system)) - (services (cons (service kernel-module-loader-service-type module-names) - (operating-system-user-services - (simple-operating-system)))) - (kernel-loadable-modules module-packages)) + base-os #:imported-modules '((guix combinators)))) (define vm (virtual-machine os)) (define (test script) @@ -98,6 +96,36 @@ (define marionette (gexp->derivation "loadable-kernel-modules" (test (modules-loaded?-program os module-names)))) +(define* (run-loadable-kernel-modules-test module-packages module-names) + "Run a test of an OS having MODULE-PACKAGES, and verify that MODULE-NAMES +are loaded in memory." + (run-loadable-kernel-modules-test-base + (operating-system + (inherit (simple-operating-system)) + (services (cons (service kernel-module-loader-service-type module-names) + (operating-system-user-services + (simple-operating-system)))) + (kernel-loadable-modules module-packages)) + module-names)) + +(define* (run-loadable-kernel-modules-service-test module-packages module-names) + "Run a test of an OS having MODULE-PACKAGES, which are loaded by creating a +service that extends LINUXL-LOADABLE-MODULE-SERVICE-TYPE. Then verify that +MODULE-NAMES are loaded in memory." + (define module-installing-service-type + (service-type + (name 'module-installing-service) + (extensions (list (service-extension linux-loadable-module-service-type + (const module-packages)))) + (default-value #f))) + (run-loadable-kernel-modules-test-base + (operating-system + (inherit (simple-operating-system)) + (services (cons* (service module-installing-service-type) + (operating-system-user-services + (simple-operating-system))))) + module-names)) + (define %test-loadable-kernel-modules-0 (system-test (name "loadable-kernel-modules-0") @@ -129,3 +157,35 @@ (define %test-loadable-kernel-modules-2 (package-arguments ddcci-driver-linux)))))) '("acpi_call" "ddcci"))))) + +(define %test-loadable-kernel-modules-service-0 + (system-test + (name "loadable-kernel-modules-service-0") + (description "Tests loadable kernel modules extensible service with no +extra modules.") + (value (run-loadable-kernel-modules-service-test '() '())))) + +(define %test-loadable-kernel-modules-service-1 + (system-test + (name "loadable-kernel-modules-service-1") + (description "Tests loadable kernel modules extensible service with one +extra module.") + (value (run-loadable-kernel-modules-service-test + (list ddcci-driver-linux) + '("ddcci"))))) + +(define %test-loadable-kernel-modules-service-2 + (system-test + (name "loadable-kernel-modules-service-2") + (description "Tests loadable kernel modules extensible service with two +extra modules.") + (value (run-loadable-kernel-modules-service-test + (list acpi-call-linux-module + (package + (inherit ddcci-driver-linux) + (arguments + `(#:linux #f + ,@(strip-keyword-arguments '(#:linux) + (package-arguments + ddcci-driver-linux)))))) + '("acpi_call" "ddcci"))))) -- cgit v1.2.3 From 55aa50834fe07597adddbfc4e007de9420b195ec Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 12 May 2021 10:19:39 -0400 Subject: doc: Do not instruct to decompress the VM image. Also replace the obsolete 'guix system vm-image' command mention by the 'guix system image'. * doc/guix.texi (Running Guix in a VM): Remove VM image decompression instruction. : Replace by 'guix system image'. --- doc/guix.texi | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index e501fcfc52..bfc714c5b6 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33632,12 +33632,11 @@ Whether or not the droplet should be created with IPv6 networking. @section Running Guix in a Virtual Machine @cindex virtual machine -To run Guix in a virtual machine (VM), one can use the pre-built Guix VM image -distributed at +To run Guix in a virtual machine (VM), one can use the pre-built Guix VM +image distributed at @url{@value{BASE-URL}/guix-system-vm-image-@value{VERSION}.x86_64-linux.qcow2}. -This image is a compressed image in QCOW format. You will first need to -decompress with @command{xz -d}, and then you can pass it to an emulator such -as QEMU (see below for details). +This image is a compressed image in QCOW format. You can pass it to an +emulator such as @uref{https://qemu.org/, QEMU} (see below for details). This image boots the Xfce graphical environment and it contains some commonly used tools. You can install more software in the image by running @@ -33646,10 +33645,8 @@ also reconfigure the system based on its initial configuration file available as @file{/run/current-system/configuration.scm} (@pxref{Using the Configuration System}). -Instead of using this pre-built image, one can also build their own virtual -machine image using @command{guix system vm-image} (@pxref{Invoking guix -system}). The returned image is in qcow2 format, which the -@uref{https://qemu.org/, QEMU emulator} can efficiently use. +Instead of using this pre-built image, one can also build their own +image using @command{guix system image} (@pxref{Invoking guix system}). @cindex QEMU If you built your own image, you must copy it out of the store -- cgit v1.2.3 From bcdb8e9885fc0b7bc20697072bf6d2abaef5e140 Mon Sep 17 00:00:00 2001 From: Jelle Licht Date: Thu, 13 May 2021 23:20:39 +0200 Subject: doc: Show how to enable Guile support for Geiser. * doc/contributing.texi (The Perfect Setup): Adjust "guix package -i" command line. --- doc/contributing.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/contributing.texi b/doc/contributing.texi index ffa57e7cdf..f3e2aed55e 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -242,7 +242,7 @@ Manual}). First, you need more than an editor, you need wonderful @url{https://nongnu.org/geiser/, Geiser}. To set that up, run: @example -guix package -i emacs guile emacs-geiser +guix package -i emacs guile emacs-geiser emacs-geiser-guile @end example Geiser allows for interactive and incremental development from within -- cgit v1.2.3