guix-patches
[Top][All Lists]
Advanced

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

[bug#43872] Closing due to consistency issues


From: Marius Bakke
Subject: [bug#43872] Closing due to consistency issues
Date: Fri, 09 Oct 2020 20:34:59 +0200

Hi!

Helio Machado <0x2b3bfa0@gmail.com> writes:

> This patch was a big hack and breaks on every architecture but x86-64
> because the derivation hash changes when producing different binaries. I'm
> leaving this for reference as it might be useful for a casual install, but
> the proper solution probably involves a complete refactoring of the Guix Go
> Build System.

That is a very clever hack.  :-)

The reason it works is because network access is allowed for
fixed-output derivations.  So the Go build system is able to go online
and download everything it needs, instead of relying on declared
inputs.  That is why different architectures produce different
derivation hashes: those are the build outputs.

The problem with this approach is that it is not deterministic.  The
next time someone runs the same build, one of the Go dependencies may
have changed (i.e. a git tag has been overwritten, or a package declares
a dependency on a branch instead of a tag, etc).

Guix will detect if the output hash changes, but is unable reproduce the
earlier state because it does not know what has changed.

To properly package go-ethereum, you will need to declare each
dependency as separate packages.  See e.g. 'syncthing' for an example.
Unfortunately there is no importer for Go yet, making it a rather
tedious task.

Since you don't seem to be afraid of hacking on Guix :-) consider
writing an "importer" for Go so you could simply:

  guix import go -r github.com/ethereum/go-ethereum

...to create the necessary boilerplate.

Thanks!

Attachment: signature.asc
Description: PGP signature


reply via email to

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