From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:50502) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izGXU-0007o2-LD for guix-patches@gnu.org; Wed, 05 Feb 2020 04:00:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izGXT-00054g-7L for guix-patches@gnu.org; Wed, 05 Feb 2020 04:00:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39142) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1izGXT-00052A-1m for guix-patches@gnu.org; Wed, 05 Feb 2020 04:00:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1izGXS-0005uH-UI for guix-patches@gnu.org; Wed, 05 Feb 2020 04:00:02 -0500 Subject: [bug#38390] [bug #38390] Building bootstrap Gash and Gash-Utils Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87lfpj7etb.fsf@ngyro.com> Date: Wed, 05 Feb 2020 09:58:50 +0100 In-Reply-To: <87lfpj7etb.fsf@ngyro.com> (Timothy Sample's message of "Mon, 03 Feb 2020 12:37:04 -0500") Message-ID: <875zgltnp1.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Timothy Sample Cc: 38390@debbugs.gnu.org, Jan Nieuwenhuizen Hello Timothy! Timothy Sample skribis: > We=E2=80=99re nearing a release for Gash-Utils, and while working on it I= made > some changes to how the bootstrap Gash and Gash-Utils are built (on the > wip-bootstrap branch.) Jan suggested that we get your opinion on the > changes, as you are behind the current '%bootstrap-guile+guild' > approach. Thanks for reaching out to me! > The very short story is that I found that the Scheme GZip code is being > maintained and works out-of-the-box on Guile 2.0.9 [1]. This made me > unsure about copying the code into Gash-Utils when maybe we could just > use it as a dependency. Then, I realized that the library included a > simple Tar reader, and wondered how simple a program could be that could > handle 'tar xvf gash.tar.gz'. It turns out pretty simple! So I put the > program and all its dependencies in an a-list with a little loop that > writes them to disk, and made a self-extracting Scheme script that can > unpack compressed tarballs [2]. Woow, that is very nice! So all of a sudden there=E2=80=99s an extra bunch= of binary seeds we can get rid of, woohoo! I didn=E2=80=99t expect that even = bzip2 and xz would be implemented. > [2] https://git.ngyro.com/bootar/ Clean, short, and elegant; brilliant! > The other thing is that I always intended for Gash and Gash-Utils to be > built with a loop calling =E2=80=9Ccompile-file=E2=80=9D. This avoids th= e need for > =E2=80=9Cguild=E2=80=9D which in turn avoids =E2=80=9Cbash=E2=80=9D (AIUI= ). > > These patches update Gash-Utils, replace the binary =E2=80=9Ctar=E2=80=9D= with my > self-extracting Scheme implementation, and replace =E2=80=9Cguild=E2=80= =9D with > =E2=80=9Ccompile-file=E2=80=9D. I think this simplifies the bootstrap pr= ocesses, and I > really like getting rid of the references to =E2=80=9Ctar=E2=80=9D, =E2= =80=9Cbash=E2=80=9D, and =E2=80=9Cxz=E2=80=9D > (even though they are needed for the bootstrap Guile, it feels nice to > quarantine them there). > > WDYT? I think it=E2=80=99s perfect. One comment that can be addressed later: > From 2cec50928a4ff67df363322d2adfb6aaa5aedc83 Mon Sep 17 00:00:00 2001 > From: Timothy Sample > Date: Mon, 3 Feb 2020 10:51:07 -0500 > Subject: [PATCH 2/3] Simplify bootstrap Gash and Gash-Utils. > > This change does three things. First Gash-Utils is updated to > 0.1.0-preview. Then, the bootstrap Gash and Gash-Utils packages are > arranged to be built without using 'guild'. Finally, instead of > using a binary 'tar' via 'bootstrap-executable' to extract Gash and > Gash-Utils, a self-extracting Scheme implementation of 'tar' and > 'gzip' is used instead. [...] > +(define (make-bootstrap-phases version scripts modules) > + "Create a form that modifies the standard GNU build phases so that > +they build simple Guile programs using only the bootstrap Guile. The > +'.in' files in the directory MODULES are configured with VERSION, the > +'.in' files in the directory SCRIPTS are configured with the bootstrap > +Guile and its module and object directories, and the Scheme files in the > +directory MODULES are compiled and installed." > + `(modify-phases %standard-phases > + (replace 'configure Should this be factorized out in a (guix build gnu-bootstrap) module or similar? That would keep build-side code separate and would avoid making =E2=80=98commencement.scm=E2=80=99 bigger. I guess the only thing that remains to be done is changing the temporary URLs to the self-extracting script & co., right? Thanks a lot! Ludo=E2=80=99.