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 4LEWESNhhF8kPQAA0tVLHw (envelope-from ) for ; Mon, 12 Oct 2020 13:58:59 +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 GKzoDCNhhF/gFwAAB5/wlQ (envelope-from ) for ; Mon, 12 Oct 2020 13:58:59 +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 A3F4F9400C9 for ; Mon, 12 Oct 2020 13:58:58 +0000 (UTC) Received: from localhost ([::1]:34102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRyLp-0001cI-JP for larch@yhetil.org; Mon, 12 Oct 2020 09:58:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRyLh-0001bv-KA for help-guix@gnu.org; Mon, 12 Oct 2020 09:58:49 -0400 Received: from mout02.posteo.de ([185.67.36.66]:36629) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRyLe-0002As-3t for help-guix@gnu.org; Mon, 12 Oct 2020 09:58:49 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id D11B02400FF for ; Mon, 12 Oct 2020 15:58:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1602511122; bh=9rpp6s+nGbcuiYosG/5A3XYoHj1KZYYZE9IWdH95aZ4=; h=Subject:To:Cc:From:Date:From; b=BrBgxdIiS8KRVDzHKZOAg692kBxUfept+o7K1OORj87Z1IkZyLS4dT+jpIXR1YBMW UtSi1H9lkbDonlZay135w/ThQ1bCAnmER3Tn7ORmub/OsCRLDLauE6jEbixb949wzE CLSbsC9syOMFUhg7PDUZQuHLcy+fyRvM6GbXR+wFIL4ReeOJ7RENMT1Ltw43zzGt9t GhBaZs/GVaR090v0mWki3mZ1MFRGH03zTM8bRWFT/zmEzsJMSF9FZAFnDZf9lPGX7+ op1lrhwZfxkCPDzBLvfJVx3q6V363ZBlB/e4XXbMfyD2my5rqyUFfiOKrHL5VqNv87 kjlPbLUxVMeow== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4C90dY5nvwz9rxN; Mon, 12 Oct 2020 15:58:41 +0200 (CEST) Subject: Re: How to install previous versions? To: zimoun References: <74f9ab4c-346a-fa13-53ca-8d47dd50e683@posteo.de> From: Zelphir Kaltstahl X-Tagtoolbar-Keys: D20201012155841209 Message-ID: Date: Mon, 12 Oct 2020 15:58:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=185.67.36.66; envelope-from=zelphirkaltstahl@posteo.de; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/12 09:58:43 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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=fail (body hash did not verify) header.d=posteo.de header.s=2017 header.b=BrBgxdIi; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (policy=none); 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: 1.09 X-TUID: OX3RFGpQzavb Hi Zimoun! Thank you for your detailed reply! You've given me something to chew on. In the meantime I wrote down everything I understood so far here: https://notabug.org/ZelphirKaltstahl/guix-package-manager-tutorials/src/master/guide.org I'll try to get the "versions of packages from multiple GNU Guix commits" part done there as well. I also have another question: What is the best way to find out about until which commit id a package was available in a specific version? Is that website the only way, or is there a way from command line to search for the GNU Guix commit? Something like: ~~~~ guix search-guix-commit-for-package-with-version python-redis@3.3.8 --last --> Revision c7011ff850420fdbe1319b3d218bd362f2f9d618 guix search-guix-commit-for-package-with-version python-redis@3.3.8 --first --> Revision f5111b4d2b982d58387188bc3018e4dd2e9a9d4f ~~~~ or at least something only involving command line and not requiring me to bisect on GNU Guix commits ^^? Best regards, Zelphir On 10/10/20 6:44 PM, zimoun wrote: > Dear, > > On Sat, 10 Oct 2020 at 17:15, Zelphir Kaltstahl > wrote: > >> For example, clicking leads to: >> >> http://data.guix.gnu.org/revision/f5111b4d2b982d58387188bc3018e4dd2e9a9d4f >> >> 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=f5111b \ >> -- 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=f5111b -- 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? Or 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 know 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, that indicates `guix time-machine`. If time-machine is necessary to get the older version of python-redis@3.3.8 in the command line, then there must be something 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 it? > 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 do 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 only 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=commit-A -- install -m foo.scm -p /tmp/AA > guix time-machine --commit=commit-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 -- repositories: https://notabug.org/ZelphirKaltstahl