unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <marius@gnu.org>
To: Helio Machado <0x2b3bfa0@gmail.com>, 43872-done@debbugs.gnu.org
Subject: [bug#43872] Closing due to consistency issues
Date: Fri, 09 Oct 2020 20:34:59 +0200	[thread overview]
Message-ID: <87eem7fdt8.fsf@gnu.org> (raw)
In-Reply-To: <CANe01w7ypkUjtc2p2TdZewDrC6xD-AExZno5a7uOhZrEZn=VQg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2020-10-09 18:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 21:59 [bug#43872] [PATCH] Add package go-ethereum Helio Machado
2020-10-09 12:11 ` bug#43872: Closing due to consistency issues Helio Machado
2020-10-09 18:34   ` Marius Bakke [this message]
2020-10-10 18:07     ` [bug#43872] " Helio Machado
2020-10-10 20:35       ` Marius Bakke

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=87eem7fdt8.fsf@gnu.org \
    --to=marius@gnu.org \
    --cc=0x2b3bfa0@gmail.com \
    --cc=43872-done@debbugs.gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).