From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e28U7-0000Hs-2w for guix-patches@gnu.org; Wed, 11 Oct 2017 00:19:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e28U2-0004nT-Po for guix-patches@gnu.org; Wed, 11 Oct 2017 00:19:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:52461) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e28U2-0004nN-Lz for guix-patches@gnu.org; Wed, 11 Oct 2017 00:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e28U2-0004M7-G5 for guix-patches@gnu.org; Wed, 11 Oct 2017 00:19:02 -0400 Subject: bug#28765: [PATCH] config: Conditionally configure daemon offload script. Resent-To: guix-patches@gnu.org Resent-Message-ID: Date: Tue, 10 Oct 2017 23:18:31 -0500 From: Eric Bavier Message-ID: <20171010231831.587b03db@centurylink.net> In-Reply-To: <87sherm6id.fsf@gnu.org> References: <87vajoowsh.fsf@gnu.org> <20171009190801.22685b19@centurylink.net> <87zi8zpkdu.fsf@gnu.org> <20171010080019.19341e92@centurylink.net> <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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 28765-done@debbugs.gnu.org On Tue, 10 Oct 2017 16:17:46 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Eric Bavier skribis: >=20 > > On Tue, 10 Oct 2017 08:49:49 +0200 > > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > > =20 > >> 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= 2001 > >> >> > From: Eric Bavier > >> >> > Date: Mon, 9 Oct 2017 13:58:04 -0500 > >> >> > Subject: [PATCH] config: Conditionally configure daemon offload s= cript. =20 > >> >> ^ > >> >> Nitpick: rather =E2=80=9Cbuild:=E2=80=9D, which is for all things b= uild-related. > >> >> =20 > >> >> > * config-daemon.ac (nix/scripts/offload): Configure only if offlo= ading enabled. =20 > >> >>=20 > >> >> It LGTM, but is it helpful? guix-daemon does not invoke =E2=80=98g= uix 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? =20 > > > > 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 >=20 > Oooh, got it. >=20 > >> Is there a problem that we are trying to solve in the first place, or = is > >> it more about making things nicer? =20 > > > > 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? =20 >=20 > Yes, definitely. >=20 > Then you can definitely commit the pre-inst-env.in patch; the > config-daemon.ac patch can=E2=80=99t hurt either. pre-inst-env patch pushed as 7740228e3523e3e0e4c007eb1f1b224575d16574