From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CFHLNXDCi2JrUgEAbAwnHQ (envelope-from ) for ; Mon, 23 May 2022 19:20:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6MHANXDCi2KvKAEAauVa8A (envelope-from ) for ; Mon, 23 May 2022 19:20:48 +0200 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 8B4BA1797E for ; Mon, 23 May 2022 19:20:48 +0200 (CEST) Received: from localhost ([::1]:54126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntBOf-0002Fg-Ta for larch@yhetil.org; Mon, 23 May 2022 12:59:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntBNo-0002FX-D0 for guix-devel@gnu.org; Mon, 23 May 2022 12:58:16 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:35833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntBNm-0001o6-PS; Mon, 23 May 2022 12:58:16 -0400 Received: by mail-wr1-x433.google.com with SMTP id r23so22296548wrr.2; Mon, 23 May 2022 09:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references :disposition-notification-to:date:message-id:mime-version :content-transfer-encoding; bh=rEGfkbDX3L5DBmm/LNWXUkGyNF3uPdq0pfZzTy8ApmA=; b=Hyny2vJepWWZy94RbO7NRDiVNZXiQT1b7Qx3l2NhkjWbLY3OLJiw60ocBdmnkkVS3K R94wYPYDWfaYjBcvBPF46MpK1qoQeHaaD+qH9yGHEA4pUur/XIUw297z97wUa1jpKMzS oJawmKi2izVfBMX5Eupli9eV44UvUHwz6Bu8NmRyYMTcx1n2cBpiNIXUauhEeX5LVMIL ejhuAIR0yB0YrpZbqcw+jST/ebwUU60PKd+1d7aLyvzTnWqpKVmjWpU27voeeozhribm nYyLxhEaD5HE3XCogbv677BtRgpVDJ7P1zpYY5Inl9NyNl0aQk6Vp4rPO2a9v/bDD2lO Lofw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :disposition-notification-to:date:message-id:mime-version :content-transfer-encoding; bh=rEGfkbDX3L5DBmm/LNWXUkGyNF3uPdq0pfZzTy8ApmA=; b=lyaEe5M60n6nrFZqAVJtCuHgvO1e7RfATtXoAmPUi472hR+Im17VIWf7946pwh6FqT LOlMnwjqHgC7r3ORE+lPzcmj6Ga6Wbwf0Tj5ZAIm1xnCqHHu3SK5F3Ti1j3PYbse+Ubm hrJQGDDAWzGbigRQpsZvBEo/wNFg3f1gQ/xPhyrpdGczYrRoB+rsHHkuJZ/bB2YjnP54 GfwgkToUgUud/B7IQDCxjDGtZQGSZKuxgQJp0VKZC/CXgFjY/m2tNqryDEVhZAbaidPy D0nm9tpQjJbY33Uil7BDsDMMiNNheqGV4DgQurKkyEBhN+Wjk3buOAejO3GQsIv1/2ZG io5w== X-Gm-Message-State: AOAM533/wT6Q+cs63ZUgIz8D9INymaIdKjkwRUSsUv7IyizkepcbFmqW JCG0ymU8cLxIC73+xBBgRBajaRCGoQI= X-Google-Smtp-Source: ABdhPJyJ/rtWoaknJft6JwN82q1kCwRXw6vyjSnwho3I/ZCAGtDQ4j5SXqwvKkaUym4zRru3cYI91Q== X-Received: by 2002:a5d:56d2:0:b0:20d:fbf:5b70 with SMTP id m18-20020a5d56d2000000b0020d0fbf5b70mr19331187wrw.34.1653325091897; Mon, 23 May 2022 09:58:11 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id w5-20020adf8bc5000000b0020e615bab7bsm10667281wra.7.2022.05.23.09.58.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 09:58:11 -0700 (PDT) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Guix Devel Subject: Re: wishlist: =?utf-8?B?4oCccmVwYWNr4oCd?= generations history of profile In-Reply-To: <87tu9g2r3k.fsf@gnu.org> References: <86wnegb9it.fsf@gmail.com> <87tu9g2r3k.fsf@gnu.org> Date: Mon, 23 May 2022 18:58:01 +0200 Message-ID: <86r14kdw4m.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 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, FREEMAIL_FROM=0.001, GB_FREEMAIL_DISPTO=0.499, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653326448; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=rEGfkbDX3L5DBmm/LNWXUkGyNF3uPdq0pfZzTy8ApmA=; b=B3HmpS0yuatDzcD84wbS7YenliaQnH0WaeLfOqJNQdrArzy0Jtr9RrBF0H0cIwznmt8VmN 5BWUZk0n5wpBhfh2IQfE58MklELW6UFuycgRSpoiStrvKxlpYyCTaYJaRNdaqi8VE7zDUU HvXjFHXP8WsnjXmh1fPCOYUybSY21l6zycE92zy/O0yyQoKAlnn0K3EExLSKhCsyfL8ak3 HVyhiG/w6ZA2PDSEuxvpqR/oNncOG5PMlQEF4TT2ASihkTJD1MlU6Lll8/43WAVyOS1t3X SAhRAPUlinBbCbovRJIWhvsFPBCogvR4F3Znco97Oa+S0bZlrdqOSGsiLSmqBg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653326448; a=rsa-sha256; cv=none; b=XzrTlekL9YltuzEL7q+vGJLQgE88+8ajw+eTLFZJa5F/3ANBddVCfcQ0YAwmvLcFEdvUGD UdExlVDMvsuCF6lpFiNZ2gKCMwiAfN8+4pn+3um0uX0YzWuNbSHmDJlmw7ID089D5nnY7R 7VnsdpUM2t1Tt0K0uwUngq6MwXCz6OHBSWUTPyuo7nrIUEM1OfBoS/nYVTyWzqHuoU/X4H rWbxDsIsFHIpjcTHVmdtjDlCorG2WcgvmS0s8Nh9yItjpnYZVdHzcdxpPz20fAekZHZJP5 mc1CW9+TC9SqnVx/TG6hH986vOdWlnDu/b8NRBjqkoXTizM5f60hQeERaB7Haw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Hyny2vJe; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.15 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Hyny2vJe; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8B4BA1797E X-Spam-Score: 6.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: 5DNFL0E0+Yin Hi Ludo, On Mon, 23 May 2022 at 17:42, Ludovic Court=C3=A8s wrote: > Exactly! =E2=80=98guix pull=E2=80=99 profiles are entirely reproducible:= we can rebuild > them from the output of =E2=80=98guix describe=E2=80=99. > > So =E2=80=98guix gc=E2=80=99 (or something) could automatically remove ol= d generation > symlinks and instead store the output of =E2=80=98guix describe=E2=80=99.= That way, > =E2=80=98--list-generations=E2=80=99 or =E2=80=98--switch-generations=E2= =80=99 could transparently > display the info or rebuild the generation. I have in mind to remove all except the manifest file. --8<---------------cut here---------------start------------->8--- $ tree -L 1 $(readlink -f ~/.config/guix/current) /gnu/store/jfnnd975724kdr8q61z4fwabrm4qvzff-profile/ =E2=94=9C=E2=94=80=E2=94=80 bin -> /gnu/store/fnfzidl79gjdki2d8v2ghn6a42n75= rqc-guix-58f372776/bin =E2=94=9C=E2=94=80=E2=94=80 etc =E2=94=9C=E2=94=80=E2=94=80 lib =E2=94=9C=E2=94=80=E2=94=80 manifest =E2=94=94=E2=94=80=E2=94=80 share 4 directories, 1 file --8<---------------cut here---------------end--------------->8--- After =E2=80=99guix gc=E2=80=99 (or something), it would read: --8<---------------cut here---------------start------------->8--- /gnu/store/jfnnd975724kdr8q61z4fwabrm4qvzff-profile/ =E2=94=94=E2=94=80=E2=94=80 manifest 0 directories, 1 file --8<---------------cut here---------------end--------------->8--- And similarly for regular profile, it would become after =E2=80=99guix gc= =E2=80=99 (or something) --8<---------------cut here---------------start------------->8--- $ tree -L 1 $(readlink -f ~/.guix-profile) /gnu/store/3kglj010azkdydsgn6inmxqa3d24yz8a-profile =E2=94=94=E2=94=80=E2=94=80 manifest 0 directories, 1 file --8<---------------cut here---------------end--------------->8--- instead of the 7 directories I get today. Well, I am not enough familiar with various internals as the SQL database and the daemon to have an opinion about the technical issues. Or maybe, it is easier to remove as today but save the relevant information elsewhere. WDYT? > System and Home generations are usually, but not necessarily, > reproducible: usually the channel info + config file are enough to > rebuild them, but in theory the config file might refer to resources not > known to Guix (e.g., SSH key files, modules, whatever). That said, we > could arrange so that =E2=80=98guix gc -d=E2=80=99 keeps the metadata aro= und. > > For regular profiles, we might do the same, but no guarantee we can > rebuild them, unless all the packages come from the same channels (which > is the case if the profile was built with =E2=80=98guix package -m=E2=80= =99). Yes. The same limitation as --export-manifest and --export-channels. Somehow, if the full history is kept, we should be able to reproduce. However, it could be slow or inefficient. Today, I manually store the output of =E2=80=9Cguix describe=E2=80=9D befor= e I manipulate a profile. This channels.scm output is tracked by Git as part of my project. Then I run =E2=80=9Cgit log=E2=80=9D to find the previ= ous state of interest and go back using, guix time-machine -C channels.scm -- shell -m manifest.scm which is fine and works well. Probably the good practise. :-) Instead of this external tracking, I would like to allow this workflow: guix package -p project --list-generations guix package -p project --switch-generation=3D12 whatever the sysadmin collect about the old generations. Cheers, simon