From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 29 22:05:03 2022 Received: (at submit) by debbugs.gnu.org; 30 Mar 2022 02:05:03 +0000 Received: from localhost ([127.0.0.1]:34007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZNhm-0006Pq-Ud for submit@debbugs.gnu.org; Tue, 29 Mar 2022 22:05:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:53182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZNhk-0006PM-I8 for submit@debbugs.gnu.org; Tue, 29 Mar 2022 22:05:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZNhk-00050h-35 for bug-guix@gnu.org; Tue, 29 Mar 2022 22:05:00 -0400 Received: from out2.migadu.com ([188.165.223.204]:52969) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZNhg-0002W5-EG for bug-guix@gnu.org; Tue, 29 Mar 2022 22:04:58 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rekahsoft.ca; s=key1; t=1648605893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qdBRW+o8KEOcbj3GlLZqgeCqmpCZaODi+aHf7mYEE14=; b=eYGk4x0fiPc7nNshoMCQAsOvyWBqs6e8SIrnZkk8mlSxDV9T0H3j0CTU6CX5vZI+7PWZo9 29Ftr7QPIrCUWAgfPYL5r54RVKn7aLBU7xrvTm4IoTOgp7+dLS1YzYhb/9AYquOLky824v JaXD+FQUjCgt+lsU4Kopg27jHaLogHs= From: "Collin J. Doering" To: bug-guix@gnu.org Subject: Unable to determine system origin when configuration stored in guix channel Date: Tue, 29 Mar 2022 22:03:36 -0400 Message-ID: <87k0cc2o1q.fsf@rekahsoft.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: rekahsoft.ca Received-SPF: pass client-ip=188.165.223.204; envelope-from=collin@rekahsoft.ca; helo=out2.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi, I recently converted my guix configuration to be stored in a channel, prima= rily to allow me to reference files in the repository but yet still have a = self-contained configuration. It also allows me to easily build packages an= d images from my local guix instance. I also like how the specification of= my system (or home) is precisely defined by a set of channels, and an expr= ession which evaluates to the operating-system (or home-configuration) that= I'm deploying. As per the guix manual: --8<---------------cut here---------------start------------->8--- If you want configuration.scm to be self-contained, we recommend that modul= es or files it refers to be part of a channel. --8<---------------cut here---------------end--------------->8--- This all being said, I noticed an issue in that I'm unable to determine the= provenance of a system when my configuration is stored in a guix channel. Specifically, if I have a guix channel that contains two modules, each of w= hich exports a %system variable of type operating-system, I cannot tell whi= ch one was used to instantiate the system. This is due to two issues. The f= irst is because when `-e|--expression` arguments are used, `configuration-f= ile` is set to `#f` in the generations provenance file but the expression i= tself is not stored in the provenance file, and is not listed in `guix syst= em describe`, `guix system list-generations`, etc.. commands. --8<---------------cut here---------------start------------->8--- sudo -i guix system reconfigure -e '(@ (my config system-a) %system)' --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- =E2=9E=9C guix system describe=20=20=20=20=20=20=20=20 Generation 30 Mar 28 2022 22:50:55 (current) file name: /var/guix/profiles/system-30-link canonical file name: /gnu/store/886xwflic0dnf86d460yf7n5wg3jng7w-system label: GNU with Linux 5.16.16 bootloader: grub-efi root device: label: "root" kernel: /gnu/store/44hi9qg3mrp6c6cb1rqwx47xhg1663d9-linux-5.16.16/bzImage channels: guix: repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: e584a093f943be216fdc93895281fde835836b8d my-config-channel: repository URL: https://not-yet-on-the-internet.com branch: master commit: 918a3bf799038a019c7394cda480ee67db8a0009 --8<---------------cut here---------------end--------------->8--- Change the system to 'system-b': --8<---------------cut here---------------start------------->8--- sudo -i guix system reconfigure -e '(@ (my config system-b) %system)' --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- =E2=9E=9C guix system describe=20=20=20=20=20=20=20=20 Generation 31 Mar 28 2022 23:10:01 (current) file name: /var/guix/profiles/system-31-link canonical file name: /gnu/store/jpkxxyh6zi3gh8pbml3r9l1iccibw5mk-system label: GNU with Linux 5.16.16 bootloader: grub-efi root device: label: "root" kernel: /gnu/store/jpkxxyh6zi3gh8pbml3r9l1iccibw5mk-linux-5.16.16/bzImage channels: guix: repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: e584a093f943be216fdc93895281fde835836b8d my-config-channel: repository URL: https://not-yet-on-the-internet.com branch: master commit: 918a3bf799038a019c7394cda480ee67db8a0009 --8<---------------cut here---------------end--------------->8--- Notice how there is no way to see which configuration was used to create th= e system. The second issue is that when `-L|--load-path` is used along with either a = file or expression to specify the operating-system or home-configuration, i= t essentially 'tarnishes' the provenance of the system, in that the followi= ng deployment is not differentiable from the preceding one/s, despite them = being different. --8<---------------cut here---------------start------------->8--- sudo -i guix system reconfigure -L my-local-channel-but-with-changes -e '(@= (my config system-a) %system)' --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- =E2=9E=9C guix system describe=20=20=20=20=20=20=20=20 Generation 32 Mar 28 2022 23:10:01 (current) file name: /var/guix/profiles/system-32-link canonical file name: /gnu/store/s1f82wy0mj1zv3jvrzzc86h86zrdv336-system label: GNU with Linux 5.16.16 bootloader: grub-efi root device: label: "root" kernel: /gnu/store/s1f82wy0mj1zv3jvrzzc86h86zrdv336-linux-5.16.16/bzImage channels: guix: repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: e584a093f943be216fdc93895281fde835836b8d my-config-channel: repository URL: https://not-yet-on-the-internet.com branch: master commit: 918a3bf799038a019c7394cda480ee67db8a0009 --8<---------------cut here---------------end--------------->8--- Thank you for reading --=20 Collin J. Doering http://rekahsoft.ca http://blog.rekahsoft.ca http://git.rekahsoft.ca