From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1u9k-000648-IA for guix-patches@gnu.org; Tue, 10 Oct 2017 09:01:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1u9e-0000ad-TO for guix-patches@gnu.org; Tue, 10 Oct 2017 09:01:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50719) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1u9e-0000aX-PL for guix-patches@gnu.org; Tue, 10 Oct 2017 09:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e1u9e-0002nL-Bm for guix-patches@gnu.org; Tue, 10 Oct 2017 09:01:02 -0400 Subject: [bug#28765] [PATCH] config: Conditionally configure daemon offload script. Resent-Message-ID: Date: Tue, 10 Oct 2017 08:00:19 -0500 From: Eric Bavier Message-ID: <20171010080019.19341e92@centurylink.net> In-Reply-To: <87zi8zpkdu.fsf@gnu.org> References: <87vajoowsh.fsf@gnu.org> <20171009190801.22685b19@centurylink.net> <87zi8zpkdu.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Eric Bavier , 28765@debbugs.gnu.org On Tue, 10 Oct 2017 08:49:49 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Hello, >=20 > Eric Bavier skribis: >=20 > > On Mon, 09 Oct 2017 23:07:10 +0200 > > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > > =20 > >> Eric Bavier skribis: > >> =20 > >> > From 984e324370c2c17d8d1a982adf2884112c9e64b7 Mon Sep 17 00:00:00 20= 01 > >> > From: Eric Bavier > >> > Date: Mon, 9 Oct 2017 13:58:04 -0500 > >> > Subject: [PATCH] config: Conditionally configure daemon offload scri= pt. =20 > >> ^ > >> Nitpick: rather =E2=80=9Cbuild:=E2=80=9D, which is for all things buil= d-related. > >> =20 > >> > * config-daemon.ac (nix/scripts/offload): Configure only if offloadi= ng enabled. =20 > >>=20 > >> It LGTM, but is it helpful? guix-daemon does not invoke =E2=80=98guix= offload=E2=80=99 > >> when it=E2=80=99s missing, as can be seen in guix-daemon.cc: > >>=20 > >> #ifdef HAVE_DAEMON_OFFLOAD_HOOK > >> /* Use our build hook for distributed builds by default. */ > >> =E2=80=A6 =20 > > > > Or maybe something like this would be preferable, to avoid exporting > > NIX_BUILD_HOOK if Guix has been configured to disable the daemon > > offload hook? > > > > --- a/build-aux/pre-inst-env.in > > +++ b/build-aux/pre-inst-env.in > > @@ -50,13 +50,9 @@ NIX_LIBEXEC_DIR=3D"@abs_top_builddir@/nix/scripts" #= for 'guix-authenticate' > > export NIX_ROOT_FINDER NIX_SUBSTITUTERS NIX_LIBEXEC_DIR > > =20 > > NIX_BUILD_HOOK=3D"$abs_top_builddir/nix/scripts/offload" > > -if [ -x "$NIX_BUILD_HOOK" ] > > -then > > - export NIX_BUILD_HOOK > > -else > > - # No offloading support. > > - unset NIX_BUILD_HOOK > > -fi > > +@BUILD_DAEMON_OFFLOAD_TRUE@export NIX_BUILD_HOOK > > +@BUILD_DAEMON_OFFLOAD_FALSE@# No offloading support. > > +@BUILD_DAEMON_OFFLOAD_FALSE@unset NIX_BUILD_HOOK =20 >=20 > It=E2=80=99s nicer (you=E2=80=99re welcome to push this change!), but it= =E2=80=99s equivalent to > what=E2=80=99s already here, no? It's not quite equivalent. The current situation would end up always exporting NIX_BUILD_HOOK because it is always generated by config.status. >=20 > Is there a problem that we are trying to solve in the first place, or is > it more about making things nicer? The problem is libstore/build.cc executing NIX_BUILD_HOOK even if the daemon offload hook is disabled, i.e. when guile-ssh is missing. Make sense? `~Eric