GNU bug report logs - #43872
[PATCH] Add package go-ethereum

Previous Next

Package: guix-patches;

Reported by: Helio Machado <0x2b3bfa0 <at> gmail.com>

Date: Thu, 8 Oct 2020 22:45:02 UTC

Severity: normal

Tags: patch

Done: Helio Machado <0x2b3bfa0 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 43872-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: Helio Machado <0x2b3bfa0 <at> gmail.com>, 43872-done <at> debbugs.gnu.org
Subject: Re: bug#43872: Closing due to consistency issues
Date: Fri, 09 Oct 2020 20:34:59 +0200
[Message part 1 (text/plain, inline)]
Hi!

Helio Machado <0x2b3bfa0 <at> 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!
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 322 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.