From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: bug#22629: [PATCH 0/4] 'guix pull' produces a self-contained Guix Date: Thu, 31 May 2018 20:58:46 +0200 Message-ID: <878t7zps7t.fsf@elephly.net> References: <87fu45ve2z.fsf@gnu.org> <20180531144337.16298-1-ludo@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOSnx-0005iS-C0 for bug-guix@gnu.org; Thu, 31 May 2018 15:00:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOSnr-0007AJ-9r for bug-guix@gnu.org; Thu, 31 May 2018 15:00:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:48397) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOSnr-0007A0-6s for bug-guix@gnu.org; Thu, 31 May 2018 15:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fOSnq-0002OB-Mq for bug-guix@gnu.org; Thu, 31 May 2018 15:00:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <20180531144337.16298-1-ludo@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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 22629@debbugs.gnu.org > Here is the =E2=80=9Cnew=E2=80=9D =E2=80=98guix pull=E2=80=99 that we dis= cussed 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. [=E2=80=A6] This is beautiful! Thank you so much for taking the time to implement this. > > The result of running =E2=80=98guix pull=E2=80=99 is a =E2=80=9Cprof= ile=E2=80=9D available under > =E2=80=98~/.config/guix/current=E2=80=99 containing the latest Guix. T= hus, 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=3D"$HOME/.config/guix/current/bin:$PATH" > export INFOPATH=3D"$HOME/.config/guix/current/share/info:$INFOPATH" As a profile it will have its very own =E2=80=9Cetc/profile=E2=80=9D file. = I suppose that doesn=E2=80=99t include INFOPATH, though, because it only contains an = Info manual but not an Info reader. It would be extra nice if we could simplify this initial setup even more. > This =E2=80=98~/.config/guix/current=E2=80=99 profile works like any= other profile > created by =E2=80=98guix package=E2=80=99 (*note Invoking guix package:= :). That is, you > can list generations, roll back to the previous generation=E2=80=94i.e.= , the > previous Guix=E2=80=94and so on: > > $ guix package -p ~/.config/guix/current -l > Generation 1 May 25 2018 10:06:41 > guix 221951a out /gnu/store/i4dfk7vw5k112s49jrhl6hwsfnh6wr7l-gui= x-221951af4 > > Generation 2 May 27 2018 19:07:47 > + guix 2fbae00 out /gnu/store/44cv9hyvxg34xf5kblf5dz57hc52y4bm-gu= ix-2fbae006f > - guix 221951a out /gnu/store/i4dfk7vw5k112s49jrhl6hwsfnh6wr7l-gu= ix-221951af4 > > Generation 3 May 30 2018 16:11:39 (current) > + guix a076f19 out /gnu/store/332czkicwwg6lc3x4aqbw5q2mq12s7fj-gu= ix-a076f1990 > - guix 2fbae00 out /gnu/store/44cv9hyvxg34xf5kblf5dz57hc52y4bm-gu= ix-2fbae006f > $ guix package -p ~/.config/guix/current --roll-back > switched from generation 3 to 2 This also means that you could remove the =E2=80=9Cguix=E2=80=9D package an= d install =E2=80=9Chello=E2=80=9D instead. If a user did that they would lose their = variant of guix and they=E2=80=99d fall back to whichever version is installed on the system (if any). They could still roll back manually by changing the symlink. They could also think that installing the =E2=80=9Cguix=E2=80=9D package in= to that profile would be a good idea =E2=80=94 but then they would end up with a slightly older version of Guix. (This is already possible, of course, but if we have a separate profile that=E2=80=99s intended just for Guix but= with generic properties, this could become confusing.) I=E2=80=99m just thinking out loud about how users could get into trouble :) > There are two requirements it fulfills in terms of compatibility: > > 1. The modified =E2=80=98build-aux/build-self.scm=E2=80=99 still does t= he right thing > when evaluated by an =E2=80=9Cold=E2=80=9D Guix=E2=80=94that is, it = produces a bunch of > modules for use in ~/.config/guix/latest as before. Excellent! Thanks for thinking about this case. > 2. The modified =E2=80=98guix pull=E2=80=99 produces ~/.config/guix/cur= rent even when > invoked on a commit of a past Guix. That is, it automatically > produces a =E2=80=98guix=E2=80=99 command using the modules returned= by the old > =E2=80=98build-self.scm=E2=80=99. > > There are various improvements we can make from there. For example, > using =E2=80=9Cmanifest entry properties=E2=80=9D as proposed in > , we can attach meta-data (commit ID, repo > URL, etc.) in each manifest entry that =E2=80=98guix pull=E2=80=99 popula= tes; then we > can arrange for =E2=80=98guix pull --list-generations=E2=80=99 (say) to d= isplay that > information. > > We could add =E2=80=98guix pull=E2=80=99 options for convenient: =E2=80= =98--roll-back=E2=80=99, > =E2=80=98--profile=E2=80=99, etc. > > Going forward, additional =E2=80=9Cchannels=E2=80=9D could be presented a= s entries in > the ~/.config/guix/current manifest. > > Caveats: > > 1. The ~/.config/guix/current profile really lives there. That is, > unlike ~/.guix-profile, it=E2=80=99s not in /var/guix/profiles/per-u= ser. > That could be an issue for cluster setups where home directories > are not scanned by the Guix GC. Cluster folks, please tell me! Is it impossible to store it in localstatedir? In practice, cluster installations don=E2=80=99t really run =E2=80=9Cguix g= c=E2=80=9D all that ofter (if ever), so it may not be a problem. > 3. C++ code is not built. I wonder which will come first: getting rid > of the C++ code, or building it? :-) I=E2=80=99d say that this is a feature ;) -- Ricardo