From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#22629: [PATCH 0/4] 'guix pull' produces a self-contained Guix Date: Thu, 31 May 2018 16:43:33 +0200 Message-ID: <20180531144337.16298-1-ludo@gnu.org> References: <87fu45ve2z.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOOp8-0000ef-J2 for bug-guix@gnu.org; Thu, 31 May 2018 10:45:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOOp4-0004df-2S for bug-guix@gnu.org; Thu, 31 May 2018 10:45:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:48222) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOOp3-0004dY-VS for bug-guix@gnu.org; Thu, 31 May 2018 10:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fOOp3-0006Bl-Oh for bug-guix@gnu.org; Thu, 31 May 2018 10:45:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87fu45ve2z.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 22629@debbugs.gnu.org Hello Guix! Here is the “new” ‘guix pull’ that we discussed notably in this thread: https://bugs.gnu.org/22629 The major difference is that instead of just building a bunch of modules and putting them under ~/.config/guix/latest, it now produces a standalone package (with bin/guix, share/info/guix.info, etc.) and puts it in a profile under ~/.config/guix/current. Quoth the manual: The result of running ‘guix pull’ is a “profile” available under ‘~/.config/guix/current’ containing the latest Guix. Thus, make sure to add it to the beginning of your search path so that you use the latest version, and similarly for the Info manual (*note Documentation::): export PATH="$HOME/.config/guix/current/bin:$PATH" export INFOPATH="$HOME/.config/guix/current/share/info:$INFOPATH" This ‘~/.config/guix/current’ profile works like any other profile created by ‘guix package’ (*note Invoking guix package::). That is, you can list generations, roll back to the previous generation—i.e., the previous Guix—and so on: $ guix package -p ~/.config/guix/current -l Generation 1 May 25 2018 10:06:41 guix 221951a out /gnu/store/i4dfk7vw5k112s49jrhl6hwsfnh6wr7l-guix-221951af4 Generation 2 May 27 2018 19:07:47 + guix 2fbae00 out /gnu/store/44cv9hyvxg34xf5kblf5dz57hc52y4bm-guix-2fbae006f - guix 221951a out /gnu/store/i4dfk7vw5k112s49jrhl6hwsfnh6wr7l-guix-221951af4 Generation 3 May 30 2018 16:11:39 (current) + guix a076f19 out /gnu/store/332czkicwwg6lc3x4aqbw5q2mq12s7fj-guix-a076f1990 - guix 2fbae00 out /gnu/store/44cv9hyvxg34xf5kblf5dz57hc52y4bm-guix-2fbae006f $ guix package -p ~/.config/guix/current --roll-back switched from generation 3 to 2 There are two requirements it fulfills in terms of compatibility: 1. The modified ‘build-aux/build-self.scm’ still does the right thing when evaluated by an “old” Guix—that is, it produces a bunch of modules for use in ~/.config/guix/latest as before. 2. The modified ‘guix pull’ produces ~/.config/guix/current even when invoked on a commit of a past Guix. That is, it automatically produces a ‘guix’ command using the modules returned by the old ‘build-self.scm’. There are various improvements we can make from there. For example, using “manifest entry properties” as proposed in , we can attach meta-data (commit ID, repo URL, etc.) in each manifest entry that ‘guix pull’ populates; then we can arrange for ‘guix pull --list-generations’ (say) to display that information. We could add ‘guix pull’ options for convenient: ‘--roll-back’, ‘--profile’, etc. Going forward, additional “channels” could be presented as entries in the ~/.config/guix/current manifest. Caveats: 1. The ~/.config/guix/current profile really lives there. That is, unlike ~/.guix-profile, it’s not in /var/guix/profiles/per-user. That could be an issue for cluster setups where home directories are not scanned by the Guix GC. Cluster folks, please tell me! 2. The translated Info manual is not built. Julien: could you turn the big ‘xref_command’ in a script or something that we can more easily reuse in (guix self)? 3. C++ code is not built. I wonder which will come first: getting rid of the C++ code, or building it? :-) Feedback welcome! Ludo’. Ludovic Courtès (4): self: Produce a complete package with the 'guix' command. pull: Install the new Guix in a profile. self: Compute and use locale data. self: Build the Info manual. build-aux/build-self.scm | 19 +- build-aux/compile-as-derivation.scm | 2 +- doc/guix.texi | 38 +++- guix/scripts/pull.scm | 79 +++++--- guix/self.scm | 283 ++++++++++++++++++++++++---- scripts/guix.in | 14 +- 6 files changed, 351 insertions(+), 84 deletions(-) -- 2.17.0