From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1vNE-0003aO-7q for guix-patches@gnu.org; Tue, 10 Oct 2017 10:19:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1vN8-0006aK-ED for guix-patches@gnu.org; Tue, 10 Oct 2017 10:19:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:52050) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1vN8-0006a9-AK for guix-patches@gnu.org; Tue, 10 Oct 2017 10:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e1vN7-00052h-V7 for guix-patches@gnu.org; Tue, 10 Oct 2017 10:19:01 -0400 Subject: [bug#28765] [PATCH] config: Conditionally configure daemon offload script. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87vajoowsh.fsf@gnu.org> <20171009190801.22685b19@centurylink.net> <87zi8zpkdu.fsf@gnu.org> <20171010080019.19341e92@centurylink.net> Date: Tue, 10 Oct 2017 16:17:46 +0200 In-Reply-To: <20171010080019.19341e92@centurylink.net> (Eric Bavier's message of "Tue, 10 Oct 2017 08:00:19 -0500") Message-ID: <87sherm6id.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: Eric Bavier Cc: Eric Bavier , 28765@debbugs.gnu.org Eric Bavier skribis: > 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=20 >> >> Eric Bavier skribis: >> >>=20=20=20 >> >> > From 984e324370c2c17d8d1a982adf2884112c9e64b7 Mon Sep 17 00:00:00 2= 001 >> >> > From: Eric Bavier >> >> > Date: Mon, 9 Oct 2017 13:58:04 -0500 >> >> > Subject: [PATCH] config: Conditionally configure daemon offload scr= ipt.=20=20=20=20 >> >> ^ >> >> Nitpick: rather =E2=80=9Cbuild:=E2=80=9D, which is for all things bui= ld-related. >> >>=20=20=20 >> >> > * config-daemon.ac (nix/scripts/offload): Configure only if offload= ing enabled.=20=20=20=20 >> >>=20 >> >> It LGTM, but is it helpful? guix-daemon does not invoke =E2=80=98gui= x 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=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=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 >>=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. Oooh, got it. >> 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? Yes, definitely. Then you can definitely commit the pre-inst-env.in patch; the config-daemon.ac patch can=E2=80=99t hurt either. Thank you! Ludo=E2=80=99.