From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#22774: Bootstrapping issue with HTTPS downloads Date: Mon, 14 Nov 2016 00:02:38 +0100 Message-ID: <87lgwnf0fl.fsf@gnu.org> References: <87bn1d6abo.fsf@gnu.org> <878tt8vy3y.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]:41992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c63nn-0001ch-Fo for bug-guix@gnu.org; Sun, 13 Nov 2016 18:03:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c63ni-0007L0-Kk for bug-guix@gnu.org; Sun, 13 Nov 2016 18:03:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:40796) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c63ni-0007Ks-HT for bug-guix@gnu.org; Sun, 13 Nov 2016 18:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c63ni-0003DN-A4 for bug-guix@gnu.org; Sun, 13 Nov 2016 18:03:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <878tt8vy3y.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 29 Oct 2016 01:43:13 +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: 22774@debbugs.gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > The =E2=80=98wip-oob-download=E2=80=99 implements =E2=80=9Cout-of-band do= wnloads=E2=80=9D, whereby > downloads are performed by the daemon on behalf of clients. > > This works by adding a =E2=80=9Cbuilt-in builder=E2=80=9D in the daemon (= idea stolen > from the Nix daemon): if you specify =E2=80=9Cbuiltin:download=E2=80=9D a= s the builder > of your derivation, then guix-daemon invokes =E2=80=98guix download=E2=80= =99 to download > the thing. The derivation has to be fixed-output, of course. > > The branch is not ready yet, notably because we=E2=80=99d need a way to p= ass > mirror lists to =E2=80=98guix download=E2=80=99, as an attribute of the d= erivation. Fixed! > Another question is compatibility: what if a recent client creates a > =E2=80=9Cbuiltin:download=E2=80=9D derivation on an old daemon? The prob= lem is that > currently old daemons do not check the builder of the .drv file until > you call =E2=80=98build-derivations=E2=80=99. So I think we=E2=80=99ll n= eed to bump the > protocol version so client code can check whether the daemon is new > enough. To address that, I bumped the protocol number in worker-protocol.hh and added a =E2=80=98built-in-builders=E2=80=99 RPC that returns the list of su= pported built-in builders (a list of strings.) That way, clients can check what the daemon supports. For instance, =E2=80=98url-fetch=E2=80=99 can return either a =E2=80=9Cnormal=E2=80=9D fi= xed-output derivation or one that uses =E2=80=9Cbuiltin:download=E2=80=9D, depending on what the daemon = supports. Feedback welcome. Ludo=E2=80=99.