guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#38390] [bug #38390] Building bootstrap Gash and Gash-Utils


From: Timothy Sample
Subject: [bug#38390] [bug #38390] Building bootstrap Gash and Gash-Utils
Date: Wed, 05 Feb 2020 09:32:59 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hello,

Ludovic Courtès <address@hidden> writes:

> Timothy Sample <address@hidden> skribis:
>
> [...]
>
>> 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’s an extra bunch of
> binary seeds we can get rid of, woohoo!  I didn’t expect that even bzip2
> and xz would be implemented.

I don’t think we could get rid of any binaries just yet.  We need Guile
to run Bootar and we can’t get Guile without the statically linked
“tar”, “xz”, “mkdir”, and “bash”.  This just removes some references to
them.  Although, it occurred to me that we could get something like
Bootar (perhaps further simplified) to run on Mes, in which case we
could use a statically linked Mes to unpack and wrap Guile.  That would
let us get rid of “%bootstrap-executables”.  (Note however that I tried
running Bootar in Mes for fun, and the extractor script – once it was
simplified – caused a segfault.)

BZip2 and XZ just barely work, by the way.  I implemented BZip2, but I
skipped over all the CRC checking.  XZ has a bug when called with input
from stdin, which is how Gash-Utils tries to call it.

>> [2] https://git.ngyro.com/bootar/
>
> Clean, short, and elegant; brilliant!

Thanks!

>> [...]
>>
>> WDYT?
>
> I think it’s perfect.

\o/

> One comment that can be addressed later:
>
>> From 2cec50928a4ff67df363322d2adfb6aaa5aedc83 Mon Sep 17 00:00:00 2001
>> From: Timothy Sample <address@hidden>
>> 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 ‘commencement.scm’ bigger.

I would be happy to do that.  It’s nice having everything in one place,
but having a bootstrap build system would certainly make the packages
clearer.  I suppose it could also get rid of the implicit inputs for us
and use “%bootstrap-guile” by default.

> I guess the only thing that remains to be done is changing the temporary
> URLs to the self-extracting script & co., right?

Yup.  I’ll release both packages soon.

> Thanks a lot!

My pleasure!


-- Tim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]