From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CAxFLpEBGGCDXAAA0tVLHw (envelope-from ) for ; Mon, 01 Feb 2021 13:26:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id yD78KZEBGGBQMwAAbx9fmQ (envelope-from ) for ; Mon, 01 Feb 2021 13:26:41 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2265D940105 for ; Mon, 1 Feb 2021 13:26:41 +0000 (UTC) Received: from localhost ([::1]:39628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6ZDz-00021C-T4 for larch@yhetil.org; Mon, 01 Feb 2021 08:26:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6ZDN-00020J-Bg for guix-devel@gnu.org; Mon, 01 Feb 2021 08:26:02 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52128) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6ZDM-0002Hq-Ff; Mon, 01 Feb 2021 08:26:00 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=55304 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l6ZDI-0003WJ-Lv; Mon, 01 Feb 2021 08:25:58 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Pierre Neidhardt Subject: Re: bug#45919: [PATCH 0/8] Exporting a manifest and channels from a profile References: <20210116182957.31075-1-ludo@gnu.org> <87wnvyv7w6.fsf@gnu.org> <871re5t2lg.fsf@ambrevar.xyz> <874kizsk0z.fsf@ambrevar.xyz> <87o8h6fs1n.fsf_-_@gnu.org> <875z3dqaq5.fsf@ambrevar.xyz> Date: Mon, 01 Feb 2021 14:25:54 +0100 In-Reply-To: <875z3dqaq5.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Sun, 31 Jan 2021 18:26:10 +0100") Message-ID: <8735yfhqcd.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel , 45919@debbugs.gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.86 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 2265D940105 X-Spam-Score: -2.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: epYFNGqu5X7Q Hi, Pierre Neidhardt skribis: > Ludovic Court=C3=A8s writes: [...] >> =E2=80=A2 The generated files might use APIs that, in the meantime, got >> deprecated or changed somehow. This is in contrast with >> =E2=80=98--export-profile=E2=80=99, which interprets =E2=80=98manife= st=E2=80=99 (a versioned file >> format) and produces code that can use the API du jour. > > /run/current-system/configuration.scm suffers from the same problem. Not really because it=E2=80=99s precisely the file that you gave to build t= he system. So you know you can run: cd /run/current-system guix time-machine -C channels.scm -- system reconfigure configuration.scm and it=E2=80=99ll work (modulo the documented caveats). > But with the manifest we could do better, we could include a version > number one way or another. > Besides, since it comes together with channels.scm, we know which Guix > was used, so we always have access to the Guix with the right API to > install the manifest. Right. >> =E2=80=A2 One would still have to learn about these two files, and pic= k the >> right =E2=80=9Cmanifest=E2=80=9D file. > > I think it would be easier than a command. See below. > >> =E2=80=A2 For users of =E2=80=98-m my-manifest.scm=E2=80=99, we would = need to store >> =E2=80=98my-manifest.scm=E2=80=99 as is instead of generating an app= roximation >> thereof. > > Which seems easy to do, isn't it? I take it that you=E2=80=99re volunteering? :-) Nothing=E2=80=99s difficult, but in this case we=E2=80=99d need to pass the= original manifest down to =E2=80=98profile-generation=E2=80=99. Requires some redes= ign. > Another use-case which I find useful and comes close to this feature is > that of channel/manifest versioning, in the sense of keeping these files > under version control for instance in a Git repository. This can be > useful to keep the history of everything, even deleted generations, or > even in case of hardware failure. > > To that end, it'd be nice if we could export these files automatically > to a designated location. > > Example: I update ~/my-profile and it automatically produces / overwrite > ~/repos/guix-profile-metadata.git/my-profile/channels.scm and > ~/repos/guix-profile-metadata.git/my-profile/manifest.scm. > > This way I can commit these 2 files in my guix-profile-metadata.git > repository. I guess you could do that either with =E2=80=98cp ~/.guix-profile/{channels,manifest.scm =E2=80=A6=E2=80=99 or with =E2=80=98= guix package --export-manifest =E2=80=A6 > =E2=80=A6=E2=80=99. But again, that=E2=80=99s not really the goal here. The goal is to help us= ers willing to migrate from the =E2=80=9Cimperative=E2=80=9D mode to the declar= ative mode. Once you=E2=80=99re using a manifest, probably you=E2=80=99ll want to put t= hat under version control, but that=E2=80=99s already the case. Thanks, Ludo=E2=80=99.