From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
To: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
Cc: help-guix@gnu.org, Adrien 'neox' Bourmault <neox@gnu.org>
Subject: Re: Guix as a non-optional dependency in another project, and Guix resources requirements.
Date: Tue, 2 Apr 2024 00:02:03 +0200 [thread overview]
Message-ID: <20240402000203.5a39092a@primary_laptop> (raw)
In-Reply-To: <87v857kjgf.fsf@pelzflorian.de>
[-- Attachment #1: Type: text/plain, Size: 5191 bytes --]
On Wed, 27 Mar 2024 12:22:40 +0100
"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> wrote:
> Hi there. [...]
Hi
> Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> writes:
> > On Mon, 25 Mar 2024 18:34:18 +0100
> > "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> wrote:
> >> Hello, what you intend does sound very interesting. As for “guix
> >> time-machine”, I do not see the problem [...]
> > Let's say a user install Guix 1.4.0 and GNU Boot use a guix commit
> > after v1.4.0, as I understand guix time-machine will fail.
>
> No, it does not fail.
Thanks a lot, this is very interesting as it could simplify a lot the
code. In addition running guix time-machine doesn't modify the current
Guix version so it's not invasive.
I recall that when I tried it on older versions of Guix, it did fail,
but maybe more recent versions don't fail anymore. I'd need to do more
tests with that to understand when it fails or doesn't fail and
somehow get/require the right conditions and then remove all the code
that isn't needed anymore.
> >> I do not know, but maybe the Autotools of Guix itself use something
> >> like this to deal with “make -j4”.
> > My question was more about the user interface and if it was the
> > right thing to do. As for the code implementing it[1], it was
> > pretty easy to do for me and it integrates fine with the current
> > GNU Boot structure: if users run './autogen.sh && ./configure' they
> > can still use the scripts manually, so this avoids too much
> > invasive changes.
>
> So from reading the Guix build machinery, Makefile.am runs
>
> https://git.savannah.gnu.org/cgit/guix.git/plain/build-aux/compile-all.scm
>
> and they use (getenv "MAKEFLAGS") to check if make gets any
> --jobserver flag that specifies the number of parallel compilations.
> This seems slightly nicer than a non-standard configure option, but
> is also more complicated in that Makefile.am calls out to
> compile-all.scm to do the work.
Thanks for that information. This could make things work out of the box
without more configuration. Though I still need to think about that one
as the code is much harder to understand than with configuration
options.
> Why do you need so many different Guix versions? Are there
> regressions or is it just that you have tried building different
> parts of Libreboot with different versions of Guix?
We don't necessarily need multiple Guix versions but I think it fits
better in the current design if we allow that.
The old structure of Libreboot we inherited was converted to look more
like packages. Now each "package" has a directory in resources/packages/
like resources/packages/grub for instance. And inside the package
directory there are shell scripts with specific names like download,
build that are tasks.
Because of that it makes sense to treat each "package" separately and
allow the use of different Guix versions. So practically speaking if I
want to replace the code that builds SeaBIOS with shell scripts I could
first write a local guix seabios-coreboot package that I add inside
resources/packages/seabios/seabios.scm and call guix build inside
resources/packages/seabios/payload (which builds SeaBIOS for Coreboot).
At this point I could use Guix 1.4.0 if there are no security issues in
SeaBIOS or its dependencies for Guix 1.4.0.
But once seabios-coreboot is upstreamed in Guix it would make sense to
get rid of resources/packages/seabios/seabios.scm completely if
possible (if we use the same build options, don't have extra patches,
etc) and instead update the shell script that calls guix build to use
the Guix version where seabios-coreboot was added.
Thanks to that it's easier to update each package without affecting the
rest.
When everything will have been converted to use Guix packages we would
need to think again if using a single Guix revision could make sense or
not depending on the amount of risk of breakages. The main advantage
of a single revision would be to have way faster builds.
> That is, you move Libreboot’s build system stepwise towards using guix
> build instead. Sounds good from outside; I have not perused all the
> links throughly. It is very interesting, though.
The main rationale behind that is to have at any point something that
still works. Using Guix just for specific packages like GRUB enable to
test the resulting images like with any other changes, and also
consistently update the documentation along the way and so on. We can
even write some automatic tests that work with images made before Guix
is integrated and after without needing any special consideration.
And finally it also lowers a lot the odds of having never-ending work to
do the conversion, and never finishing nor making any releases,
especially because some of the tasks (like building Coreboot) are not
trivial (it requires an ada compiler and Guix doesn't have one yet).
And all that also makes it easier to collaborate with upstream as we
don't need to rush to convert everything to Guix packages, so it leaves
time to upstream things.
Denis.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-04-01 22:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-16 1:03 Guix as a non-optional dependency in another project, and Guix resources requirements Denis 'GNUtoo' Carikli
2024-03-20 12:15 ` pelzflorian (Florian Pelz)
2024-03-21 16:26 ` Adrien 'neox' Bourmault
2024-03-21 16:35 ` Adrien 'neox' Bourmault
2024-03-22 0:16 ` Denis 'GNUtoo' Carikli
2024-04-08 15:52 ` Andreas Enge
2024-04-08 20:32 ` Felix Lechner via
2024-04-11 15:36 ` Andreas Enge
2024-04-11 17:32 ` Felix Lechner via
2024-04-09 9:33 ` pelzflorian (Florian Pelz)
2024-04-09 12:23 ` Felix Lechner via
2024-03-22 0:52 ` Denis 'GNUtoo' Carikli
2024-03-22 9:17 ` pelzflorian (Florian Pelz)
2024-03-25 0:26 ` Denis 'GNUtoo' Carikli
2024-03-25 17:34 ` pelzflorian (Florian Pelz)
2024-03-27 1:28 ` Denis 'GNUtoo' Carikli
2024-03-27 11:22 ` pelzflorian (Florian Pelz)
2024-04-01 22:02 ` Denis 'GNUtoo' Carikli [this message]
2024-05-06 12:34 ` Simon Tournier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240402000203.5a39092a@primary_laptop \
--to=gnutoo@cyberdimension.org \
--cc=help-guix@gnu.org \
--cc=neox@gnu.org \
--cc=pelzflorian@pelzflorian.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).