From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#28659: v0.13: guix pull fails; libgit2-0.26.0 and 0.25.1 content hashes fail Date: Mon, 02 Oct 2017 17:09:39 +0200 Message-ID: <87o9ppoabw.fsf@gnu.org> References: <877ewf18d4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dz2NA-0004nz-5a for bug-guix@gnu.org; Mon, 02 Oct 2017 11:11:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dz2N4-0007Sz-FL for bug-guix@gnu.org; Mon, 02 Oct 2017 11:11:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35633) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dz2N4-0007St-BU for bug-guix@gnu.org; Mon, 02 Oct 2017 11:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dz2N4-0001lR-5w for bug-guix@gnu.org; Mon, 02 Oct 2017 11:11:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <877ewf18d4.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Sun, 01 Oct 2017 12:16:07 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Jan Nieuwenhuizen Cc: 28659@debbugs.gnu.org Hello, Jan Nieuwenhuizen skribis: > As reported by laertus on irc[0]: guix pull on 0.13 without substitutes f= ails I just checked and we do have substitutes, but I understand it doesn=E2=80= =99t help here. > guix pull > > Starting download of /tmp/guix-file.3r6cH0 > From https://git.savannah.gnu.org/cgit/guix.git/snapshot/master.tar.g= z... > =E2=80=A6.tar.gz 5.7MiB/s 00:02 | = 13.6MiB transferred > unpacking '/gnu/store/sginfwnrcfqn1far31gmzlaffd8xlxyy-guix-latest.ta= r.gz'... > > Starting download of /gnu/store/c3npgqn9ag2ypi9bda1g779wwwlcqqrf-libg= it2-0.25.1.tar.gz > From https://github.com/libgit2/libgit2/archive/v0.25.1.tar.gz... > following redirection to `https://codeload.github.com/libgit2/libgit2= /tar.gz/v0.25.1'... > v0.25.1 6.1MiB/s 00:01 | 4.1MiB = transferred > output path `/gnu/store/c3npgqn9ag2ypi9bda1g779wwwlcqqrf-libgit2-0.25= .1.tar.gz' should have sha256 hash `1cdwcw38frc1wf28x5ppddazv9hywc718j92f3x= a3ybzzycyds3s', instead has `0ywcxw1mwd56c8qc14hbx31bf198gxck3nja3laxyglv7l= 57qp26' What=E2=80=99s sad here is that we do have the right tarball at: https://mirror.hydra.gnu.org/file/libgit2-0.25.1.tar.gz/sha256/1cdwcw38fr= c1wf28x5ppddazv9hywc718j92f3xa3ybzzycyds3s The problem is that the hash check is performed by guix-daemon itself, not by =E2=80=9Cguix perform-download=E2=80=9D. So when guix-daemon diagno= ses a hash mismatch, it=E2=80=99s too late and we cannot try again and use the content-addressed mirror. A crude but helpful fix would be to have perform-download compute the hash by itself and act accordingly. It=E2=80=99s crude because that means = that we=E2=80=99d be computing the hash twice: once in =E2=80=98guix perform-dow= nload=E2=80=99 and a second time in guix-daemon. For archives below ~20=C2=A0MiB it=E2=80=99s p= robably OK though. Thoughts? In the future, with the daemon written in Guile, it=E2=80=99s one area wher= e we could achieve better integration and coordination among the various pieces. Ludo=E2=80=99.