From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +BNkKwTlgV9mDwAA0tVLHw (envelope-from ) for ; Sat, 10 Oct 2020 16:44:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QPsVJwTlgV+YdwAAB5/wlQ (envelope-from ) for ; Sat, 10 Oct 2020 16:44:52 +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 1A511940631 for ; Sat, 10 Oct 2020 16:44:52 +0000 (UTC) Received: from localhost ([::1]:45672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRHzF-0001CC-Vu for larch@yhetil.org; Sat, 10 Oct 2020 12:44:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRHz8-0001C2-OR for help-guix@gnu.org; Sat, 10 Oct 2020 12:44:42 -0400 Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]:46410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kRHz6-00081e-Mi for help-guix@gnu.org; Sat, 10 Oct 2020 12:44:42 -0400 Received: by mail-qk1-x72d.google.com with SMTP id a23so13825168qkg.13 for ; Sat, 10 Oct 2020 09:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ACChg7RKdKBdOTu/Hk1C1pcNYU9FrFDJK+pr5qWapms=; b=BNWN2AfKR1tFwG0FxWkyFzb6+JawWYr9fCpAfSSyp3mZOeCvp8hOmC6+UFFXgq7/vw L1QIzdLS8Z2/0bhPcmGRPuvYVjO49QT7uaZBqnFeuabhriQMpxTkSyv8sdOAdQYt93+4 b3N3o/74qSyl4si88pDckOBExiRXn9n/Zwv41k4PfoLTkO+7yqV4dBlQA0Dv6UyfxuOE szHn2+J/+SiDIYykUSVM5w6KgpW3gLPJh832HnbuKVNmcttaj8Du7JiGGcTLnNoweIox O0a2WpTLs6TZI6IZ+TdugzRirkm0MBcUmpdQttyVVe46ueMb0BuYVfKt97agMphqdROj yxQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ACChg7RKdKBdOTu/Hk1C1pcNYU9FrFDJK+pr5qWapms=; b=NPwDanJvHzFTiCDArl1GOjfTuUvh6bRwB8OLa9qrZJxeNjfoHioQHC8ZzhpEjK8Q1T KTKww+UbBb6XlHks9qIPfEbqrXFn0XEQiEKvwO+fkT3jWu7XrQRbRumATakUW+wGypsD hYaVky4ipkb7suhc27wi3MQeoK4NMNGzEBGO0MHswm0d2r15emhmBSOLRJIRmPcsT5dT 6pLCe0YXyGCR7JddvvotRZ8uoKb3tFgpeH34+Q3gFLGgoqjMr4+zmnc4az2dvAa/K0VC Z91ZntxhWoYiX3PY9RFfZaygG1lnMshovQmUlf8oW+ZpsD4L6xzvjYWYJR2pQ5KUEhdP 8Qvg== X-Gm-Message-State: AOAM531Cd/9cT2XgATpx9v6nzz5apMpKWeJXdOFf7vTtt/EOOHX/j5Jy LoHWdBOkxVYbd3X4jhYybshS6oGJcP8eN/KMTtk= X-Google-Smtp-Source: ABdhPJzhstl8Ki9ErfKZsjp6CJ2/TpX0AFFxpW6KtcBosKFkMSft2OQjQQhoKUltwU2U7CfK7QU1kes/ehSGYm2uUao= X-Received: by 2002:a37:9a89:: with SMTP id c131mr2998684qke.80.1602348279570; Sat, 10 Oct 2020 09:44:39 -0700 (PDT) MIME-Version: 1.0 References: <74f9ab4c-346a-fa13-53ca-8d47dd50e683@posteo.de> In-Reply-To: From: zimoun Date: Sat, 10 Oct 2020 18:44:27 +0200 Message-ID: Subject: Re: How to install previous versions? To: Zelphir Kaltstahl Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=zimon.toutoune@gmail.com; helo=mail-qk1-x72d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=BNWN2AfK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: 0.79 X-TUID: VNakJOz+uP8G Dear, On Sat, 10 Oct 2020 at 17:15, Zelphir Kaltstahl wrote: > For example, clicking leads to: > > http://data.guix.gnu.org/revision/f5111b4d2b982d58387188bc3018e4dd2e9a9d4= f > > Here is where I am lost. Where do I need to click? Click on one date. The row is: Version Output Builds From To and From mean the date of the first commit where the package is at the version Version. To is the date of the last commit. > And this gives you the commit with 'python-redis@3.8', using the command: > > guix time-machine --commit=3Df5111b \ > -- environment --ad-hoc python-redis python \ > -- python > > OK, assume I get the commit id. > > I just tried this with the following command: > > ~~~~ > guix time-machine --commit=3Df5111b -- environment --ad-hoc 'python-redis= @3.3.8' 'python@3.8' -- python3.8 > ~~~~ Remove the '@X.Y'. It does not make sense since it is somehow already included by the specification of the commit. > My guess is, that in this commit of Guix there was no Python 3.8.2 yet? O= r perhaps `python-redis` was not build for that Python version? The "guix time-machine" gives you the exact same Guix as it was at the commit specification. Therefore, since the commit f5111b provides the version of python-redis you want, all the others do matter. > I do not have a specific use-case at this moment, but I would like to kno= w how to get those specific versions, the same every single time I run the = command. To compare, when I create a virtual environment using: As I have tried to explain. :-) In your project directory, you have to add 2 files about Guix: guix describe -f channels > channels.scm and the manifest.scm file containing the list of packages the project requires. Then at any point in time, you can always do: guix time-machine -C channels.scm -- -m manifest > ~~~~ > python3 -m venv venv > source venv/bin/activate > pip install --requirement requirements.txt > ~~~~ The issue with this approach is that somehow you need a SAT solver. But that's another story. ;-) With Guix, AFAICT, the similar is: - channels.scm which specifies a Guix version and so packages versions - manifest.scm which specifies the list of packages. > But that is, what I already have, isn't it? There is no part in this, tha= t indicates `guix time-machine`. If time-machine is necessary to get the ol= der version of python-redis@3.3.8 in the command line, then there must be s= omething I need to write in the manifest.scm file to let Guix know, that I = want a specific commit id. Or perhaps this is not possible with a manifest?= Or is the idea, that I need to have a tracked channel as well to achieve i= t? It is possible with the manifest but AFAIU it is a bit tricky and you should write some Scheme. The easiest is using a channels.scm file. See above. > The other no-so-said is to track "guix describe", you *should* _track_ > the file channels.scm: > > guix describe -f channels.scm > > OK this is probably the part, where I need to read the docs about it. I d= o not have a channels.scm and I do not know what does in there. I only have= a vague idea about channels in my head. Maybe with the output is easier to get the point. :-) --8<---------------cut here---------------start------------->8--- $ guix describe -f channels (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (commit "a0d4aa2457d7e36012143ffe3fbc9dd4bc20ca4f") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))) --8<---------------cut here---------------end--------------->8--- Basically, I have only one channel which is the official GNU Guix "%default-channels". The important information here are: - url: from where it fetch - commit: which checkout uses Therefore, "guix time-machine -C the/channel./file.scm -- help" will fetch from url and restore at the commit. The other parts are important too. ;-) But not for your question. :-) Well, basically you can even drop them and it will be fine. So yes, please go read the channel section. It has recently been reordered to be more "understandable". Feedback is very welcome. :-) > Then later or on another machine, you simply run the command: > > guix time-machine -C path/to/channels.scm \ > -- -m path/to/manifest.scm > > If I understand this correctly, a manifest with specific versions can onl= y be guaranteed to work, if I track a channel as well. And somehow in that = channel definition, I must specify which commit of Guix I am on? But wouldn= 't that limit my choice of libraries to what was available in one commit? Yes, the same way the choice of libraries is limited at each commit state. = :-) It is possible to mix libraries from different commits but the UI is not as easy as it should be. For example, imagine you are doing: guix pull guix install -m foo.scm /tmp/A [...] # time flies guix pull guix install -m bar.scm /tmp/B And let assume that foo and bar are *not* coming from the same Guix commit. You can still do: guix package --search-paths -p /tmp/A -p /tmp/B and therefore mix the two libraries. Well, using the time-machine, you need to track the commit which provided foo and the one of bar. Then: guix time-machine --commit=3Dcommit-A -- install -m foo.scm -p /tmp/AA guix time-machine --commit=3Dcommit-B -- install -m bar.scm -p /tmp/BB Then "guix package --search-paths -p /tmp/AA -p /tmp/BB" should provide the exact same thing as before. That's why it is important to track the Guix commit (guix describe -f channels) of software you are installing. Without this piece of information, it is (almost) impossible to reinstall (other point in time or space) the exact same version of the very software. Hope that helps, simon