From patchwork Mon Oct 16 12:43:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 54868 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E40E327BBE2; Mon, 16 Oct 2023 13:45:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9579D27BBE9 for ; Mon, 16 Oct 2023 13:45:08 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsMxk-0006cf-7t; Mon, 16 Oct 2023 08:44:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsMxZ-0006aN-AF for guix-patches@gnu.org; Mon, 16 Oct 2023 08:44:40 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qsMxZ-0007JD-2H for guix-patches@gnu.org; Mon, 16 Oct 2023 08:44:37 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qsMxx-0008MM-Qu for guix-patches@gnu.org; Mon, 16 Oct 2023 08:45:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66577] [PATCH 1/4] doc: Move =?utf-8?b?4oCcU3lzdGVt?= Troubleshooting =?utf-8?b?VGlwc+KAnQ==?= below. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Oct 2023 12:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66577 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66577@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 66577-submit@debbugs.gnu.org id=B66577.169746025432029 (code B ref 66577); Mon, 16 Oct 2023 12:45:01 +0000 Received: (at 66577) by debbugs.gnu.org; 16 Oct 2023 12:44:14 +0000 Received: from localhost ([127.0.0.1]:55457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsMxB-0008KV-Pi for submit@debbugs.gnu.org; Mon, 16 Oct 2023 08:44:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsMx8-0008KA-Su for 66577@debbugs.gnu.org; Mon, 16 Oct 2023 08:44:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsMwc-00077o-S7; Mon, 16 Oct 2023 08:43:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=4Q7ZPlDZ9DB4+R5CB99DnGt25pfxguLIjfx1OXvaqWc=; b=kghxRYi3rIxVdEo9rWVF iXbOrh0PHhCodgbsuzkCWRvEfb+9jrb2eElDnZTr1XrVeUmltwSw/Bg++DJDk6LODc8924znfEonc XPlarmzkUvH+oo8UapQS9UJy3hrDyKIML1riuWMJjY8vUosiqUpb9u5PD29mjB+mj6HLSK7gnilw2 ez1KXJ7bd5yBFbMP8lqFRWne7M3HjtXxIP/PZZq7OIdu5Iqgx8ezH6SRHWvadwFbmIWtRGsOSJmCj 4dG9dZMeT1860+p2VIvzisMn7QAneWQuxvIDxXVVJmOJMKcbeK/q3E7Ej6kQWTeufNZoIgp99m7ze OYj1KTRUL43nAQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 16 Oct 2023 14:43:00 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches So far this section would appear before “Getting Started”. This moves it right after “System Configuration”. * doc/guix.texi (System Troubleshooting Tips): Move after “System Configuration”. --- doc/guix.texi | 245 +++++++++++++++++++++++++------------------------- 1 file changed, 123 insertions(+), 122 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3517c95251..8ebf50469e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -185,7 +185,6 @@ Top * Introduction:: What is Guix about? * Installation:: Installing Guix. * System Installation:: Installing the whole operating system. -* System Troubleshooting Tips:: When things don't go as planned. * Getting Started:: Your first steps. * Package Management:: Package installation, upgrade, etc. * Channels:: Customizing the package collection. @@ -194,6 +193,7 @@ Top * Utilities:: Package management commands. * Foreign Architectures:: Build for foreign architectures. * System Configuration:: Configuring the operating system. +* System Troubleshooting Tips:: When things don't go as planned. * Home Configuration:: Configuring the home environment. * Documentation:: Browsing software user manuals. * Platforms:: Defining platforms. @@ -251,10 +251,6 @@ Top * Keyboard Layout and Networking and Partitioning:: Initial setup. * Proceeding with the Installation:: Installing. -System Troubleshooting Tips - -* Chrooting into an existing system:: - Package Management * Features:: How Guix will make your life brighter. @@ -427,6 +423,10 @@ Top * Shepherd Services:: A particular type of service. * Complex Configurations:: Defining bindings for complex configurations. +System Troubleshooting Tips + +* Chrooting into an existing system:: + Home Configuration * Declaring the Home Environment:: Customizing your Home. @@ -2978,123 +2978,6 @@ Building the Installation Image @code{A20-OLinuXino-Lime2} is the name of the board. If you specify an invalid board, a list of possible boards will be printed. -@c ********************************************************************* -@cindex troubleshooting, guix system -@cindex guix system troubleshooting -@node System Troubleshooting Tips -@chapter System Troubleshooting Tips - -Guix System allows rebooting into a previous generation should the last -one be malfunctioning, which makes it quite robust against being broken -irreversibly. This feature depends on GRUB being correctly functioning -though, which means that if for whatever reasons your GRUB installation -becomes corrupted during a system reconfiguration, you may not be able -to easily boot into a previous generation. A technique that can be used -in this case is to @i{chroot} into your broken system and reconfigure it -from there. Such technique is explained below. - -@cindex chroot, guix system -@cindex chrooting, guix system -@cindex repairing GRUB, via chroot -@menu -* Chrooting into an existing system:: -@end menu - -@node Chrooting into an existing system -@section Chrooting into an existing system - -This section details how to @i{chroot} to an already installed Guix -System with the aim of reconfiguring it, for example to fix a broken -GRUB installation. The process is similar to how it would be done on -other GNU/Linux systems, but there are some Guix System particularities -such as the daemon and profiles that make it worthy of explaining here. - -@enumerate -@item -Obtain a bootable image of Guix System. It is recommended the latest -development snapshot so the kernel and the tools used are at least as as -new as those of your installed system; it can be retrieved from the -@url{https://ci.guix.gnu.org/search/latest/ISO-9660?query=spec:images+status:success+system:x86_64-linux+image.iso, -https://ci.guix.gnu.org} URL. Follow the @pxref{USB Stick and DVD -Installation} section for copying it to a bootable media. - -@item -Boot the image, and proceed with the graphical text-based installer -until your network is configured. Alternatively, you could configure -the network manually by following the -@ref{manual-installation-networking} section. If you get the error -@samp{RTNETLINK answers: Operation not possible due to RF-kill}, try -@samp{rfkill list} followed by @samp{rfkill unblock 0}, where @samp{0} -is your device identifier (ID). - -@item -Switch to a virtual console (tty) if you haven't already by pressing -simultaneously the @kbd{Control + Alt + F4} keys. Mount your file -system at @file{/mnt}. Assuming your root partition is -@file{/dev/sda2}, you would do: - -@example sh -mount /dev/sda2 /mnt -@end example - -@item -Mount special block devices and Linux-specific directories: - -@example sh -mount --rbind /proc /mnt/proc -mount --rbind /sys /mnt/sys -mount --rbind /dev /mnt/dev -@end example - -If your system is EFI-based, you must also mount the ESP partition. -Assuming it is @file{/dev/sda1}, you can do so with: - -@example sh -mount /dev/sda1 /mnt/boot/efi -@end example - -@item -Enter your system via chroot: - -@example sh -chroot /mnt /bin/sh -@end example - -@item -Source the system profile as well as your @var{user} profile to setup -the environment, where @var{user} is the user name used for the Guix -System you are attempting to repair: - -@example sh -source /var/guix/profiles/system/profile/etc/profile -source /home/@var{user}/.guix-profile/etc/profile -@end example - -To ensure you are working with the Guix revision you normally would as -your normal user, also source your current Guix profile: - -@example sh -source /home/@var{user}/.config/guix/current/etc/profile -@end example - -@item -Start a minimal @command{guix-daemon} in the background: - -@example sh -guix-daemon --build-users-group=guixbuild --disable-chroot & -@end example - -@item -Edit your Guix System configuration if needed, then reconfigure with: - -@example sh -guix system reconfigure your-config.scm -@end example - -@item -Finally, you should be good to reboot the system to test your fix. - -@end enumerate @c ********************************************************************* @node Getting Started @@ -43020,6 +42903,124 @@ Complex Configurations @end example +@c ********************************************************************* +@cindex troubleshooting, Guix System +@cindex guix system troubleshooting +@node System Troubleshooting Tips +@chapter System Troubleshooting Tips + +Guix System allows rebooting into a previous generation should the last +one be malfunctioning, which makes it quite robust against being broken +irreversibly. This feature depends on GRUB being correctly functioning +though, which means that if for whatever reasons your GRUB installation +becomes corrupted during a system reconfiguration, you may not be able +to easily boot into a previous generation. A technique that can be used +in this case is to @i{chroot} into your broken system and reconfigure it +from there. Such technique is explained below. + +@cindex chroot, guix system +@cindex chrooting, guix system +@cindex repairing GRUB, via chroot +@menu +* Chrooting into an existing system:: +@end menu + +@node Chrooting into an existing system +@section Chrooting into an existing system + +This section details how to @i{chroot} to an already installed Guix +System with the aim of reconfiguring it, for example to fix a broken +GRUB installation. The process is similar to how it would be done on +other GNU/Linux systems, but there are some Guix System particularities +such as the daemon and profiles that make it worthy of explaining here. + +@enumerate +@item +Obtain a bootable image of Guix System. It is recommended the latest +development snapshot so the kernel and the tools used are at least as as +new as those of your installed system; it can be retrieved from the +@url{https://ci.guix.gnu.org/search/latest/ISO-9660?query=spec:images+status:success+system:x86_64-linux+image.iso, +https://ci.guix.gnu.org} URL. Follow the @pxref{USB Stick and DVD +Installation} section for copying it to a bootable media. + +@item +Boot the image, and proceed with the graphical text-based installer +until your network is configured. Alternatively, you could configure +the network manually by following the +@ref{manual-installation-networking} section. If you get the error +@samp{RTNETLINK answers: Operation not possible due to RF-kill}, try +@samp{rfkill list} followed by @samp{rfkill unblock 0}, where @samp{0} +is your device identifier (ID). + +@item +Switch to a virtual console (tty) if you haven't already by pressing +simultaneously the @kbd{Control + Alt + F4} keys. Mount your file +system at @file{/mnt}. Assuming your root partition is +@file{/dev/sda2}, you would do: + +@example sh +mount /dev/sda2 /mnt +@end example + +@item +Mount special block devices and Linux-specific directories: + +@example sh +mount --rbind /proc /mnt/proc +mount --rbind /sys /mnt/sys +mount --rbind /dev /mnt/dev +@end example + +If your system is EFI-based, you must also mount the ESP partition. +Assuming it is @file{/dev/sda1}, you can do so with: + +@example sh +mount /dev/sda1 /mnt/boot/efi +@end example + +@item +Enter your system via chroot: + +@example sh +chroot /mnt /bin/sh +@end example + +@item +Source the system profile as well as your @var{user} profile to setup +the environment, where @var{user} is the user name used for the Guix +System you are attempting to repair: + +@example sh +source /var/guix/profiles/system/profile/etc/profile +source /home/@var{user}/.guix-profile/etc/profile +@end example + +To ensure you are working with the Guix revision you normally would as +your normal user, also source your current Guix profile: + +@example sh +source /home/@var{user}/.config/guix/current/etc/profile +@end example + +@item +Start a minimal @command{guix-daemon} in the background: + +@example sh +guix-daemon --build-users-group=guixbuild --disable-chroot & +@end example + +@item +Edit your Guix System configuration if needed, then reconfigure with: + +@example sh +guix system reconfigure your-config.scm +@end example + +@item +Finally, you should be good to reboot the system to test your fix. + +@end enumerate + @node Home Configuration @chapter Home Configuration @cindex home configuration From patchwork Mon Oct 16 12:43:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 54869 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E335B27BBE9; Mon, 16 Oct 2023 13:45:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EA21127BBE2 for ; Mon, 16 Oct 2023 13:45:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsMxl-0006dL-Ok; Mon, 16 Oct 2023 08:44:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsMxb-0006aS-3R for guix-patches@gnu.org; Mon, 16 Oct 2023 08:44:40 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qsMxa-0007JQ-K2 for guix-patches@gnu.org; Mon, 16 Oct 2023 08:44:38 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qsMxy-0008MT-7Z for guix-patches@gnu.org; Mon, 16 Oct 2023 08:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66577] [PATCH 2/4] doc: Mention Guix Home in =?utf-8?b?4oCc?= =?utf-8?b?R2V0dGluZyBTdGFydGVk4oCdLg==?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Oct 2023 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66577 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66577@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 66577-submit@debbugs.gnu.org id=B66577.169746025532035 (code B ref 66577); Mon, 16 Oct 2023 12:45:02 +0000 Received: (at 66577) by debbugs.gnu.org; 16 Oct 2023 12:44:15 +0000 Received: from localhost ([127.0.0.1]:55459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsMxC-0008KY-Q1 for submit@debbugs.gnu.org; Mon, 16 Oct 2023 08:44:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsMxA-0008KC-AP for 66577@debbugs.gnu.org; Mon, 16 Oct 2023 08:44:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsMwe-00077x-9o; Mon, 16 Oct 2023 08:43:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=cJRk3IAfTblzO5r+ZLLZm4fgPkS76QaOXHxoyC681i0=; b=GlWArb2WjC5mm9IEGXmA IWKJOVFo4M2EDAn6BwHfxpYzrWR/8CWAT43zvnLyCaOwEza1THQoPvdaXoFQ541TBMvczDehItHRr 3YM6zn1ASCFM+I+mzbDOSRHiF6b8JsJIvH6g4qjEUCuLaY4vrkIjDBj94J44UCwHkJ4F2vI6C2bwA 2NoorGjGQPU+8yX7ayWScC7P0f7JzEW7AbO1SMNM9uaE3ZphBifK3iGY06aB484D8un5u+pIHmbLz YiM5L0DUgwKWkWG9HIEvfaxN4xdGBHEOuVlUeRnVOlQosv4kbu8AI1iQDO0kV4sh2V2KLm58tK8J2 iIr9BlVMJncU6g==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 16 Oct 2023 14:43:01 +0200 Message-ID: <2de53646c5355b42fec247780399fccb7c6a4f38.1697459606.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Getting Started): Mention Guix Home. (Home Configuration): Remove “still under development” note. --- doc/guix.texi | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 8ebf50469e..f5d20873be 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3069,11 +3069,15 @@ Getting Started @quotation Going further @xref{Package Management}, for more about package management. You may like @dfn{declarative} package management with @command{guix package ---manifest}, managing separate @dfn{profiles} with @option{--profile}, +--manifest}, deleting old generations, collecting garbage, and other nifty features that will come in handy as you become more familiar with Guix. If you are a developer, @pxref{Development} for additional tools. And if you're curious, @pxref{Features}, to peek under the hood. + +You can also manage the configuration of your entire @dfn{home +environment}---your user ``dot files'', services, and packages---using +Guix Home. @xref{Home Configuration}, to learn more about it! @end quotation Once you've installed a set of packages, you will want to periodically @@ -43036,12 +43040,6 @@ Home Configuration @c Maybe later, it will be possible to make home configuration a part of @c system configuration to make everything managed by guix system. -@quotation Note -The functionality described in this section is still under development -and is subject to change. Get in touch with us on -@email{guix-devel@@gnu.org}! -@end quotation - The user's home environment usually consists of three basic parts: software, configuration, and state. Software in mainstream distros are usually installed system-wide, but with GNU Guix most software packages From patchwork Mon Oct 16 12:43:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 54867 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id F02E327BBEB; Mon, 16 Oct 2023 13:45:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 44F3727BBE2 for ; Mon, 16 Oct 2023 13:45:07 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsMxl-0006dM-TR; Mon, 16 Oct 2023 08:44:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsMxb-0006aT-3U for guix-patches@gnu.org; Mon, 16 Oct 2023 08:44:40 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qsMxa-0007JO-6v for guix-patches@gnu.org; Mon, 16 Oct 2023 08:44:38 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qsMxy-0008Mh-VO for guix-patches@gnu.org; Mon, 16 Oct 2023 08:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66577] [PATCH 3/4] doc: cookbook: Suggest =?utf-8?b?4oCYZ3Vp?= =?utf-8?b?eCBzaGVsbOKAmQ==?= as an alternative to multiple profiles. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Oct 2023 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66577 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66577@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 66577-submit@debbugs.gnu.org id=B66577.169746026832075 (code B ref 66577); Mon, 16 Oct 2023 12:45:02 +0000 Received: (at 66577) by debbugs.gnu.org; 16 Oct 2023 12:44:28 +0000 Received: from localhost ([127.0.0.1]:55467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsMxP-0008LB-J7 for submit@debbugs.gnu.org; Mon, 16 Oct 2023 08:44:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsMxN-0008Kr-9W for 66577@debbugs.gnu.org; Mon, 16 Oct 2023 08:44:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsMwg-000784-8z; Mon, 16 Oct 2023 08:43:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=d3oi5uupG96JyFR1gLHUQV0Id0gOlZzFwqDJ5qByVM0=; b=fASC7vZdpBNo8vwR+4QB XnM1+Q6bfvfniWLgGcow/njBbNH2CplrFQqmiBp1AbC3VmBNbhY0rKdWc/lAXwl9DPtQKgQD+B2KE c27fNJGUsaiR6stg5olafO8sMMLB2p+O7y37QQ2/j+T/IHaVjs/xsqfpr03paqhXp6+e51IOx5Ntp yJOA1rlJFHUJoTO/8SlG3Ysv5bSVXBDCqIl/hCEudWbwler+m1QljGjhNAwrHSUxUv4rcZNwMLp83 PR3/1WpbjiLsLRmqEn5IjMnL8UZkBhQ7wwt/rCrUWEnO3fJmf7dwXB/9zUH5Smlj0OtLMdKkwo+PT u5SIxc0FYAm8vw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 16 Oct 2023 14:43:02 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Multiple profiles are relatively hard to set up and maintain, especially for newcomers. Thus, suggest ‘guix shell’ as an alternative. * doc/guix-cookbook.texi (Guix Profiles in Practice): Add note linking to ‘guix shell’. (The benefits of manifests): Remove outdated info about ‘guix environment’ and profiles that may be GC’d. Update. --- doc/guix-cookbook.texi | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 712c131a51..1259f6aac7 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -3714,7 +3714,7 @@ Guix Profiles in Practice @section Guix Profiles in Practice Guix provides a very useful feature that may be quite foreign to newcomers: -@emph{profiles}. They are a way to group package installations together and all users +@dfn{profiles}. They are a way to group package installations together and all users on the same system are free to use as many profiles as they want. Whether you're a developer or not, you may find that multiple profiles bring you @@ -3722,6 +3722,16 @@ Guix Profiles in Practice @emph{traditional package managers}, they are very convenient to use once you've understood how to set them up. +@quotation Note +This section is an opinionated guide on the use of multiple profiles. +It predates @command{guix shell} and its fast profile cache +(@pxref{Invoking guix shell,,, guix, GNU Guix Reference Manual}). + +In many cases, you may find that using @command{guix shell} to set up +the environment you need, when you need it, is less work that +maintaining a dedicated profile. Your call! +@end quotation + If you are familiar with Python's @samp{virtualenv}, you can think of a profile as a kind of universal @samp{virtualenv} that can hold any kind of software whatsoever, not just Python software. Furthermore, profiles are self-sufficient: they capture @@ -4034,29 +4044,12 @@ The benefits of manifests they ``pin'' packages in the store, which prevents them from being garbage-collected (@pxref{Invoking guix gc,,, guix, GNU Guix Reference Manual}) and ensures that they will still be available at any point in -the future. +the future. The @command{guix shell} command also protects +recently-used profiles from garbage collection; profiles that have not +been used for a while may be garbage-collected though, along with the +packages they refer to. -Let's take an example: - -@enumerate -@item -We have an environment for hacking on a project for which there isn't a Guix -package yet. We build the environment using a manifest, and then run @code{guix - environment -m manifest.scm}. So far so good. - -@item -Many weeks pass and we have run a couple of @code{guix pull} in the mean time. -Maybe a dependency from our manifest has been updated; or we may have run -@code{guix gc} and some packages needed by our manifest have been -garbage-collected. - -@item -Eventually, we set to work on that project again, so we run @code{guix shell - -m manifest.scm}. But now we have to wait for Guix to build and install -stuff! -@end enumerate - -Ideally, we could spare the rebuild time. And indeed we can, all we need is to +To be 100% sure that a given profile will never be collected, install the manifest to a profile and use @code{GUIX_PROFILE=/the/profile; . "$GUIX_PROFILE"/etc/profile} as explained above: this guarantees that our hacking environment will be available at all times. From patchwork Mon Oct 16 12:43:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 54870 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 11CD527BBE2; Mon, 16 Oct 2023 13:45:37 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BD3AB27BBE9 for ; Mon, 16 Oct 2023 13:45:35 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsMxl-0006dJ-Hz; Mon, 16 Oct 2023 08:44:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsMxa-0006aP-3j for guix-patches@gnu.org; Mon, 16 Oct 2023 08:44:40 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qsMxZ-0007JJ-Rx for guix-patches@gnu.org; Mon, 16 Oct 2023 08:44:37 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qsMxy-0008Ma-Jp for guix-patches@gnu.org; Mon, 16 Oct 2023 08:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66577] [PATCH 4/4] doc: cookbook: Add cross references to the manual regarding manifests. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Oct 2023 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66577 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66577@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 66577-submit@debbugs.gnu.org id=B66577.169746026732068 (code B ref 66577); Mon, 16 Oct 2023 12:45:02 +0000 Received: (at 66577) by debbugs.gnu.org; 16 Oct 2023 12:44:27 +0000 Received: from localhost ([127.0.0.1]:55465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsMxP-0008L9-8m for submit@debbugs.gnu.org; Mon, 16 Oct 2023 08:44:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsMxN-0008Kq-9R for 66577@debbugs.gnu.org; Mon, 16 Oct 2023 08:44:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsMwg-00078G-3K; Mon, 16 Oct 2023 08:43:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=0qqW2Xr661Ogvx5FKzioK4b6KoVZp+oB99X/v3qnIT4=; b=AAZTPoTdibn6VhWdiVGD JV+4Fhi9gRfjrJDSk0LQZV/irrVUXukcuMig7sHB3Tj+yPkh8qt3ODX47KxOWphmuhglg7PQO69XH /jPtlHtCiy8caVgOVOelxlqg3ze2Xh71h3d9+gJ7sD1icdnTXMab96C7e6DdXUCYSrcJngGbeXQW9 WPXIMXTFw9Cekjo2xYnvmDHDBqf3uC+BWXJn7T1t75aap3U44+3iROd7RJNNbJBGL4xHELIJF2FGp k82w4lIjG3NqcUwETw/gtX3FTCYTtoRVGcKuWsQ6oSg7Iix8ljZLC8KNOJ9mqE/jwbrpGFWjBDAkG h/unlAZXlyIe7w==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 16 Oct 2023 14:43:03 +0200 Message-ID: <0a08f973a486c025453c98b1ab34cb4ffc24fc82.1697459606.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix-cookbook.texi (The benefits of manifests) (Reproducible profiles): Add cross-references. --- doc/guix-cookbook.texi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 1259f6aac7..b1fe1b932f 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -3987,7 +3987,9 @@ Default profile @node The benefits of manifests @subsection The benefits of manifests -Manifests are a convenient way to keep your package lists around and, say, +Manifests let you @dfn{declare} the set of packages you'd like to have +in a profile (@pxref{Writing Manifests,,, guix, GNU Guix Reference Manual}). +They are a convenient way to keep your package lists around and, say, to synchronize them across multiple machines using a version control system. A common complaint about manifests is that they can be slow to install when they @@ -4064,16 +4066,18 @@ Reproducible profiles @itemize @item -a manifest, +a manifest (@pxref{Writing Manifests,,, guix, GNU Guix Reference Manual}); @item -a Guix channel specification. +a Guix channel specification (@pxref{Replicating Guix,,, guix, GNU Guix +Reference Manual}). @end itemize Indeed, manifests alone might not be enough: different Guix versions (or different channels) can produce different outputs for a given manifest. You can output the Guix channel specification with @samp{guix describe ---format=channels}. +--format=channels} (@pxref{Invoking guix describe,,, guix, GNU Guix +Reference Manual}). Save this to a file, say @samp{channel-specs.scm}. On another computer, you can use the channel specification file and the manifest