GNU bug report logs - #36872
[PATCH 1/2] remote: Build derivations appropriate for the remote's architecture.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: zerodaysfordays@HIDDEN (Jakob L. Kreuze); Keywords: patch; dated Wed, 31 Jul 2019 13:45:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 36872 <at> debbugs.gnu.org:


Received: (at 36872) by debbugs.gnu.org; 7 Aug 2019 20:31:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 07 16:31:35 2019
Received: from localhost ([127.0.0.1]:39524 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hvSat-0006jL-7O
	for submit <at> debbugs.gnu.org; Wed, 07 Aug 2019 16:31:35 -0400
Received: from ol.sdf.org ([205.166.94.20]:60813 helo=mx.sdf.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zerodaysfordays@HIDDEN>)
 id 1hvSar-0006hG-0z
 for 36872 <at> debbugs.gnu.org; Wed, 07 Aug 2019 16:31:33 -0400
Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net
 [173.76.53.40]) (authenticated (0 bits))
 by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x77KVUrL008474
 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO);
 Wed, 7 Aug 2019 20:31:31 GMT
From: zerodaysfordays@HIDDEN (Jakob L. Kreuze)
To: "Thompson\, David" <dthompson2@HIDDEN>
Subject: Re: [bug#36872] [PATCH 2/2] remote: Remove '--system' argument.
References: <87lfwee2yd.fsf@HIDDEN>
 <87h872e2v2.fsf@HIDDEN> <87ef1yovur.fsf@HIDDEN>
 <877e7qvv75.fsf@HIDDEN> <87a7ckq129.fsf@HIDDEN>
 <CAJ=RwfYEDDD379=AMt9nE8oo6GmACc_sCQ+mwd6ZuZqqfbx9=w@HIDDEN>
Date: Wed, 07 Aug 2019 16:28:19 -0400
In-Reply-To: <CAJ=RwfYEDDD379=AMt9nE8oo6GmACc_sCQ+mwd6ZuZqqfbx9=w@HIDDEN>
 (David Thompson's message of "Wed, 7 Aug 2019 15:03:06 -0400")
Message-ID: <87sgqclnz0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36872
Cc: Christopher Lemmer Webber <cwebber@HIDDEN>, 36872 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

Hi Chris and Dave,

"Thompson, David" <dthompson2@HIDDEN> writes:

> Hi,
>
> On Wed, Aug 7, 2019 at 2:31 PM Christopher Lemmer Webber
> <cwebber@HIDDEN> wrote:
>>
>> I thought about it more between yesterday and today, and it continues to
>> seem strange to me that we're doing "probing" here.  We don't probe to
>> guess where Guix is currently installed or etc to specify disks.  I
>> guess that's not the same thing, but...
>>
>> Here's the concern: imagine that we want to be able to up-front do
>> something like "guix system build" before we even start spinning up
>> servers.  Does this block that direction?
>
> This is a good point.  We want to make sure that the config file
> *completely* describes the operating systems that need to be built,
> therefore having to talk to a remote machine is no bueno.  The reason
> I didn't want the user to have to explicitly specify the remote
> system's architecture is for usability.  I wanted 'guix deploy' to
> just DTRT like guix already does when you run `guix system
> reconfigure` or `guix build` locally where %current-system defaults to
> what the local machine is running.  However, I think that providing
> this information would only be a small inconvenience for the current
> managed host environment type. This wouldn't be an issue at all for an
> AWS environment type, for example, because the user would have to
> specify which instance type they want and with that you know what the
> value of %current-system should be when generating the OS derivation.
> I imagine this would be the case for any cloud environment.
>
> I think I've said this before (not sure if IRL or in an email) that we
> should make it the responsibility of the environment type to determine
> what the remote machine's system is.  I still think that should be the
> case, but we should change the managed host type so that the user
> specifies that information as a new record field rather than making
> 'guix deploy' probe for it.
>
> Does this make sense?

Right. My gut feels a bit conflicted since 'remote-eval' is already
talking to the remote, but the points about building ahead of time and
having the configuration file completely specify the deployment are
strong -- perhaps the better thing to do is to add a 'system' keyword to
'remote-eval'. I'll redo this patch as a 'system' field for the
'managed-host-environment-type' configuration.

Regards,
Jakob

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1LNGMACgkQ9Qb9Fp2P
2Vqq7A/+IOlyZwgRKkoFCdK0oa/n5cvyxu+1FF3WksiEfKZ4flDF6dojOXq64jVW
EutCCflOwOL3cx1QM6wpZ6pN47pvl4IeDUAIickfci9aTlgoZR+dAOCTEfpvP+6t
OuxOqN2hurBRW3438U8+ugFlPSwIlW4X31eNFEnG792aivJeAWzLnAZV95iyvzuo
CWuQiMWv0/6w0cr/xa6Ec+sf8tLYfsa6y3/A8m0Yf6NDNfznFXyMQ1GTGGX9pp4u
7W/Scser6rQHd7KguKS3BpmoSLwvX+xvdNNPsvJyxqS930iMvbW2fcxaX2ixXcWk
xxg7QYPYIkvqW+5r6A+9ggVIae4LWVfryUEYxWjljg9RBec3zo/AHjCliPmmpNVI
EHfPv1tKJcL3uIsmam5BMZza0Quvr/A5X3QQ6say/+Bp6/2EVE0WDMeT3vZA3hsn
K+yyvZddbSIZ+QCW/GDJpnyJ2tn6H8o4epO88rzqlpIty/uLjoBwfT80Mypo09Xe
8GEdQkghUzkoOIOGbiWVk7jV3DIgzJSFVdh4V1oipxRsAz2zooEzNnF+0Azl1J17
r7k++fZDK0rvrGot6IFjjsPU3SX0mMsURUQhToBxcrfksLLR+0LLDKHrC3oeySez
wECacMRSK6zvWM0/fvw5JElQkdwpVfHvgB4n1LeEJW53c09h8eE=
=W92O
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#36872; Package guix-patches. Full text available.

Message received at 36872 <at> debbugs.gnu.org:


Received: (at 36872) by debbugs.gnu.org; 7 Aug 2019 19:03:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 07 15:03:26 2019
Received: from localhost ([127.0.0.1]:39382 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hvRDZ-0000WO-Kw
	for submit <at> debbugs.gnu.org; Wed, 07 Aug 2019 15:03:25 -0400
Received: from mail-vs1-f65.google.com ([209.85.217.65]:33253)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dthompson2@HIDDEN>) id 1hvRDX-0000W4-1F
 for 36872 <at> debbugs.gnu.org; Wed, 07 Aug 2019 15:03:23 -0400
Received: by mail-vs1-f65.google.com with SMTP id m8so61463105vsj.0
 for <36872 <at> debbugs.gnu.org>; Wed, 07 Aug 2019 12:03:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=worcester-edu.20150623.gappssmtp.com; s=20150623;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=o/TMKY2gflgL6Ep+Jmx3fTKaF0zOuOrisWBVsjAQ2cc=;
 b=THj7TDLPpxdRa25Db13pFweGPvyYkhil7Iwfa0ZP6LEX9yL9C+IrIRz56y/D9X2VrI
 ZlXBJhSFcEydPT6wCZ3UeV6xxff2Nc2yRH+jw8FY8HHJdfHRpBaJbexNw5AjrsaI5JfC
 FAjh/Oo9YaV12fkVJdnADRBCgHZpjqArWqHHpuRgQtMAMtdlRRYam5qutRUhB2L1Aabr
 QZMXdBkp9r/f0KbIT5Dw+6IBRXfXyEWR48PK/JCsWenA4zQgoGv6vS3nQSBRrMLH1bzP
 M0rQEjrES7ZAXC1ojr9Q56V60cKr+GSDMtewt9DvImWn9Sqtdakun/hgLbbOozYwPQQN
 vZ1Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=o/TMKY2gflgL6Ep+Jmx3fTKaF0zOuOrisWBVsjAQ2cc=;
 b=VbzqwyFoxxep1SqSxir68S6ix5Ga4Nm1WUx6jUV83if+bAAwUqjK8sv0MxuDGcVd5V
 XDaF7MNjfsW+42d/+ANuDeA0cyZE20Eag2Fc9EGZxElJCnSwxl6RWB8xZODrUEmoLnnZ
 LwusS9QnBkTpthx+Kz1ZYHLjtTGxJTuBKYHYRtV4Ufpf4xZ6TOjkb25btrK/0OG985+h
 AH/pIEyboK2o+QPiZoMJCpYo7VvoQFi32z0C8QLQ601DoNc68sn6MhGVC122gEWTfdiv
 JsAyQsLr/jKdipb9riqJ3FNODZUe5e61FYCZYvXCQmqsu7O6k77s6RGh0DmFtpqZVhkm
 PKJg==
X-Gm-Message-State: APjAAAXsaey5CunB37aC03fxQTYuhKQcLaZRCx/SJysQOQv7+pdsdE2a
 Ht+txdREZm7XtOsPdWPq9dIJYYvBfjWryw1PkGMERw==
X-Google-Smtp-Source: APXvYqyau2GYnKyRCaZUg6tTsIgxaj0kcLtKLgykZC3KmDcltwoPvBa2H4NpTUO8Gx+e0A9qGZ/wtplsxsilR7ngzsQ=
X-Received: by 2002:a67:ff0a:: with SMTP id v10mr7357804vsp.1.1565204597276;
 Wed, 07 Aug 2019 12:03:17 -0700 (PDT)
MIME-Version: 1.0
References: <87lfwee2yd.fsf@HIDDEN> <87h872e2v2.fsf@HIDDEN>
 <87ef1yovur.fsf@HIDDEN> <877e7qvv75.fsf@HIDDEN>
 <87a7ckq129.fsf@HIDDEN>
In-Reply-To: <87a7ckq129.fsf@HIDDEN>
From: "Thompson, David" <dthompson2@HIDDEN>
Date: Wed, 7 Aug 2019 15:03:06 -0400
Message-ID: <CAJ=RwfYEDDD379=AMt9nE8oo6GmACc_sCQ+mwd6ZuZqqfbx9=w@HIDDEN>
Subject: Re: [bug#36872] [PATCH 2/2] remote: Remove '--system' argument.
To: Christopher Lemmer Webber <cwebber@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36872
Cc: "Jakob L. Kreuze" <zerodaysfordays@HIDDEN>, 36872 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

On Wed, Aug 7, 2019 at 2:31 PM Christopher Lemmer Webber
<cwebber@HIDDEN> wrote:
>
> I thought about it more between yesterday and today, and it continues to
> seem strange to me that we're doing "probing" here.  We don't probe to
> guess where Guix is currently installed or etc to specify disks.  I
> guess that's not the same thing, but...
>
> Here's the concern: imagine that we want to be able to up-front do
> something like "guix system build" before we even start spinning up
> servers.  Does this block that direction?

This is a good point.  We want to make sure that the config file
*completely* describes the operating systems that need to be built,
therefore having to talk to a remote machine is no bueno.  The reason
I didn't want the user to have to explicitly specify the remote
system's architecture is for usability.  I wanted 'guix deploy' to
just DTRT like guix already does when you run `guix system
reconfigure` or `guix build` locally where %current-system defaults to
what the local machine is running.  However, I think that providing
this information would only be a small inconvenience for the current
managed host environment type. This wouldn't be an issue at all for an
AWS environment type, for example, because the user would have to
specify which instance type they want and with that you know what the
value of %current-system should be when generating the OS derivation.
I imagine this would be the case for any cloud environment.

I think I've said this before (not sure if IRL or in an email) that we
should make it the responsibility of the environment type to determine
what the remote machine's system is.  I still think that should be the
case, but we should change the managed host type so that the user
specifies that information as a new record field rather than making
'guix deploy' probe for it.

Does this make sense?

- Dave




Information forwarded to guix-patches@HIDDEN:
bug#36872; Package guix-patches. Full text available.

Message received at 36872 <at> debbugs.gnu.org:


Received: (at 36872) by debbugs.gnu.org; 7 Aug 2019 18:32:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 07 14:32:03 2019
Received: from localhost ([127.0.0.1]:39344 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hvQjB-0005l6-QU
	for submit <at> debbugs.gnu.org; Wed, 07 Aug 2019 14:32:03 -0400
Received: from dustycloud.org ([50.116.34.160]:55614)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cwebber@HIDDEN>) id 1hvQj9-0005kr-Le
 for 36872 <at> debbugs.gnu.org; Wed, 07 Aug 2019 14:32:00 -0400
Received: from twig (localhost [127.0.0.1])
 by dustycloud.org (Postfix) with ESMTPS id 99E112661E;
 Wed,  7 Aug 2019 14:31:58 -0400 (EDT)
References: <87lfwee2yd.fsf@HIDDEN>
 <87h872e2v2.fsf@HIDDEN> <87ef1yovur.fsf@HIDDEN>
 <877e7qvv75.fsf@HIDDEN>
User-agent: mu4e 1.2.0; emacs 26.2
From: Christopher Lemmer Webber <cwebber@HIDDEN>
To: "Jakob L. Kreuze" <zerodaysfordays@HIDDEN>,
 David Thompson <dthompson2@HIDDEN>
Subject: Re: [bug#36872] [PATCH 2/2] remote: Remove '--system' argument.
In-reply-to: <877e7qvv75.fsf@HIDDEN>
Date: Wed, 07 Aug 2019 14:31:58 -0400
Message-ID: <87a7ckq129.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 36872
Cc: 36872 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Jakob L. Kreuze writes:

> Hey Chris!
>
> Christopher Lemmer Webber <cwebber@HIDDEN> writes:
>
>> I'm still wondering whether asking the remote machine what its
>> architecture is won't turn out to be fragile in some way, though I'm not
>> sure how to articulate how that would be yet.  It seems like a weird
>> side effect to apply before doing the build.  (What if we want to build
>> derivations when we don't actually have a machine up and running yet?
>> Etc, etc.)
>
> I agree that it isn't the purest solution, but my thinking is that
> 'remote-eval' is meant to be effectful anyway. As for the situation
> where we build derivations for a machine that isn't running yet: I think
> we can cross that bridge when we get to it -- 'guix deploy' doesn't have
> the feature at the moment.
>
> Regards,
> Jakob

I thought about it more between yesterday and today, and it continues to
seem strange to me that we're doing "probing" here.  We don't probe to
guess where Guix is currently installed or etc to specify disks.  I
guess that's not the same thing, but...

Here's the concern: imagine that we want to be able to up-front do
something like "guix system build" before we even start spinning up
servers.  Does this block that direction?

Dave, your input appreciated on this one.

I'm not sure I want to block the patch series with my hand wringing, but
I do want to make sure we give it appropriate consideration.

 - Chris




Information forwarded to guix-patches@HIDDEN:
bug#36872; Package guix-patches. Full text available.

Message received at 36872 <at> debbugs.gnu.org:


Received: (at 36872) by debbugs.gnu.org; 6 Aug 2019 21:33:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 06 17:33:08 2019
Received: from localhost ([127.0.0.1]:37920 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hv74u-0007Ne-4c
	for submit <at> debbugs.gnu.org; Tue, 06 Aug 2019 17:33:08 -0400
Received: from mx.sdf.org ([205.166.94.20]:50874)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zerodaysfordays@HIDDEN>)
 id 1hv74r-0007NR-Jo
 for 36872 <at> debbugs.gnu.org; Tue, 06 Aug 2019 17:33:06 -0400
Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net
 [173.76.53.40]) (authenticated (0 bits))
 by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x76LX05n016922
 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO);
 Tue, 6 Aug 2019 21:33:04 GMT
From: zerodaysfordays@HIDDEN (Jakob L. Kreuze)
To: Christopher Lemmer Webber <cwebber@HIDDEN>
Subject: Re: [bug#36872] [PATCH 2/2] remote: Remove '--system' argument.
References: <87lfwee2yd.fsf@HIDDEN>
 <87h872e2v2.fsf@HIDDEN> <87ef1yovur.fsf@HIDDEN>
Date: Tue, 06 Aug 2019 17:29:50 -0400
In-Reply-To: <87ef1yovur.fsf@HIDDEN> (Christopher Lemmer Webber's
 message of "Tue, 06 Aug 2019 16:57:32 -0400")
Message-ID: <877e7qvv75.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36872
Cc: 36872 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hey Chris!

Christopher Lemmer Webber <cwebber@HIDDEN> writes:

> I'm still wondering whether asking the remote machine what its
> architecture is won't turn out to be fragile in some way, though I'm not
> sure how to articulate how that would be yet.  It seems like a weird
> side effect to apply before doing the build.  (What if we want to build
> derivations when we don't actually have a machine up and running yet?
> Etc, etc.)

I agree that it isn't the purest solution, but my thinking is that
'remote-eval' is meant to be effectful anyway. As for the situation
where we build derivations for a machine that isn't running yet: I think
we can cross that bridge when we get to it -- 'guix deploy' doesn't have
the feature at the moment.

Regards,
Jakob




Information forwarded to guix-patches@HIDDEN:
bug#36872; Package guix-patches. Full text available.

Message received at 36872 <at> debbugs.gnu.org:


Received: (at 36872) by debbugs.gnu.org; 6 Aug 2019 21:02:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 06 17:02:44 2019
Received: from localhost ([127.0.0.1]:37898 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hv6bT-0006VM-FZ
	for submit <at> debbugs.gnu.org; Tue, 06 Aug 2019 17:02:43 -0400
Received: from ol.sdf.org ([205.166.94.20]:63847 helo=mx.sdf.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zerodaysfordays@HIDDEN>)
 id 1hv6bR-0006VE-OZ
 for 36872 <at> debbugs.gnu.org; Tue, 06 Aug 2019 17:02:42 -0400
Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net
 [173.76.53.40]) (authenticated (0 bits))
 by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x76L2dYA017058
 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO);
 Tue, 6 Aug 2019 21:02:40 GMT
From: zerodaysfordays@HIDDEN (Jakob L. Kreuze)
To: Christopher Lemmer Webber <cwebber@HIDDEN>
Subject: Re: [bug#36872] [PATCH v2 2/2] remote: Remove '--system' argument.
References: <87lfwee2yd.fsf@HIDDEN>
 <87h872e2v2.fsf@HIDDEN> <87ef1yovur.fsf@HIDDEN>
 <87o912vwmp.fsf_-_@HIDDEN>
Date: Tue, 06 Aug 2019 16:59:31 -0400
In-Reply-To: <87o912vwmp.fsf_-_@HIDDEN> (Jakob L. Kreuze's message
 of "Tue, 06 Aug 2019 16:58:54 -0400")
Message-ID: <87imravwlo.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36872
Cc: 36872 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/services.scm (activation-script): Return a <program-file> rather
than a <scheme-file>.
* gnu/deploy.scm (guix-deploy): Remove handling for '--system'.
(show-help): Remove documentation for '--system'.
(%default-options): Remove default setting for 'system'.
---
 gnu/services.scm        | 56 ++++++++++++++++++++---------------------
 guix/scripts/deploy.scm |  8 ++----
 2 files changed, 30 insertions(+), 34 deletions(-)

diff --git a/gnu/services.scm b/gnu/services.scm
index 7de78105ff..6ee05d4580 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -430,34 +430,34 @@ ACTIVATION-SCRIPT-TYPE."
 (define (activation-script gexps)
   "Return the system's activation script, which evaluates GEXPS."
   (define actions
-    (map (cut scheme-file "activate-service" <>) gexps))
-
-  (scheme-file "activate"
-               (with-imported-modules (source-module-closure
-                                       '((gnu build activation)
-                                         (guix build utils)))
-                 #~(begin
-                     (use-modules (gnu build activation)
-                                  (guix build utils))
-
-                     ;; Make sure the user accounting database exists.  If it
-                     ;; does not exist, 'setutxent' does not create it and
-                     ;; thus there is no accounting at all.
-                     (close-port (open-file "/var/run/utmpx" "a0"))
-
-                     ;; Same for 'wtmp', which is populated by mingetty et
-                     ;; al.
-                     (mkdir-p "/var/log")
-                     (close-port (open-file "/var/log/wtmp" "a0"))
-
-                     ;; Set up /run/current-system.  Among other things this
-                     ;; sets up locales, which the activation snippets
-                     ;; executed below may expect.
-                     (activate-current-system)
-
-                     ;; Run the services' activation snippets.
-                     ;; TODO: Use 'load-compiled'.
-                     (for-each primitive-load '#$actions)))))
+    (map (cut program-file "activate-service.scm" <>) gexps))
+
+  (program-file "activate.scm"
+                (with-imported-modules (source-module-closure
+                                        '((gnu build activation)
+                                          (guix build utils)))
+                  #~(begin
+                      (use-modules (gnu build activation)
+                                   (guix build utils))
+
+                      ;; Make sure the user accounting database exists.  If it
+                      ;; does not exist, 'setutxent' does not create it and
+                      ;; thus there is no accounting at all.
+                      (close-port (open-file "/var/run/utmpx" "a0"))
+
+                      ;; Same for 'wtmp', which is populated by mingetty et
+                      ;; al.
+                      (mkdir-p "/var/log")
+                      (close-port (open-file "/var/log/wtmp" "a0"))
+
+                      ;; Set up /run/current-system.  Among other things this
+                      ;; sets up locales, which the activation snippets
+                      ;; executed below may expect.
+                      (activate-current-system)
+
+                      ;; Run the services' activation snippets.
+                      ;; TODO: Use 'load-compiled'.
+                      (for-each primitive-load '#$actions)))))
 
 (define (gexps->activation-gexp gexps)
   "Return a gexp that runs the activation script containing GEXPS."
diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index 52bba3f3bf..52d5e1e1da 100644
--- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -42,8 +42,6 @@
 (define (show-help)
   (display (G_ "Usage: guix deploy [OPTION] FILE...
 Perform the deployment specified by FILE.\n"))
-  (display (G_ "
-  -s, --system=SYSTEM    attempt to build for SYSTEM--e.g., \"i686-linux\""))
   (show-build-options-help)
   (newline)
   (display (G_ "
@@ -65,8 +63,7 @@ Perform the deployment specified by FILE.\n"))
          %standard-build-options))
 
 (define %default-options
-  `((system . ,(%current-system))
-    (substitutes? . #t)
+  `((substitutes? . #t)
     (build-hook? . #t)
     (graft? . #t)
     (debug . 0)
@@ -88,7 +85,6 @@ Perform the deployment specified by FILE.\n"))
       (set-build-options-from-command-line store opts)
       (for-each (lambda (machine)
                   (info (G_ "deploying to ~a...") (machine-display-name machine))
-                  (parameterize ((%current-system (assq-ref opts 'system))
-                                 (%graft? (assq-ref opts 'graft?)))
+                  (parameterize ((%graft? (assq-ref opts 'graft?)))
                     (run-with-store store (deploy-machine machine))))
                 machines))))
-- 
2.22.0





Information forwarded to guix-patches@HIDDEN:
bug#36872; Package guix-patches. Full text available.

Message received at 36872 <at> debbugs.gnu.org:


Received: (at 36872) by debbugs.gnu.org; 6 Aug 2019 21:02:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 06 17:02:08 2019
Received: from localhost ([127.0.0.1]:37895 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hv6au-0006UV-5H
	for submit <at> debbugs.gnu.org; Tue, 06 Aug 2019 17:02:08 -0400
Received: from ol.sdf.org ([205.166.94.20]:64011 helo=mx.sdf.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zerodaysfordays@HIDDEN>)
 id 1hv6as-0006UM-4Y
 for 36872 <at> debbugs.gnu.org; Tue, 06 Aug 2019 17:02:06 -0400
Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net
 [173.76.53.40]) (authenticated (0 bits))
 by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x76L235R003431
 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO);
 Tue, 6 Aug 2019 21:02:04 GMT
From: zerodaysfordays@HIDDEN (Jakob L. Kreuze)
To: Christopher Lemmer Webber <cwebber@HIDDEN>
Subject: Re: [bug#36872] [PATCH v2 1/2] remote: Build derivations appropriate
 for the remote's
References: <87lfwee2yd.fsf@HIDDEN>
 <87h872e2v2.fsf@HIDDEN> <87ef1yovur.fsf@HIDDEN>
Date: Tue, 06 Aug 2019 16:58:54 -0400
In-Reply-To: <87ef1yovur.fsf@HIDDEN> (Christopher Lemmer Webber's
 message of "Tue, 06 Aug 2019 16:57:32 -0400")
Message-ID: <87o912vwmp.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36872
Cc: 36872 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/ssh.scm (remote-system): New variable.
* guix/remote.scm (remote-eval): Use result of 'remote-system' when
lowering the G-Expression.
(trampoline): Return a <program-file> rather than a <scheme-file>.
---
 guix/remote.scm | 13 ++++++++-----
 guix/ssh.scm    |  7 +++++++
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/guix/remote.scm b/guix/remote.scm
index 5fecd954e9..0a0bdaf30b 100644
--- a/guix/remote.scm
+++ b/guix/remote.scm
@@ -71,7 +71,7 @@ prerequisites of EXP are already available on the host at SESSION."
   "Return a \"trampoline\" gexp that evaluates EXP and writes the evaluation
 result to the current output port using the (guix repl) protocol."
   (define program
-    (scheme-file "remote-exp.scm" exp))
+    (program-file "remote-exp.scm" exp))
 
   (with-imported-modules (source-module-closure '((guix repl)))
     #~(begin
@@ -96,10 +96,13 @@ all the elements EXP refers to are built and deployed to SESSION beforehand.
 When BUILD-LOCALLY? is true, said dependencies are built locally and sent to
 the remote store afterwards; otherwise, dependencies are built directly on the
 remote store."
-  (mlet %store-monad ((lowered (lower-gexp (trampoline exp)
-                                           #:module-path %load-path))
-                      (remote -> (connect-to-remote-daemon session
-                                                           socket-name)))
+  (mlet* %store-monad ((system -> (remote-system session))
+                       (lowered (lower-gexp (trampoline exp)
+                                            #:system system
+                                            #:guile-for-build #f
+                                            #:module-path %load-path))
+                       (remote -> (connect-to-remote-daemon session
+                                                            socket-name)))
     (define inputs
       (cons (lowered-gexp-guile lowered)
             (lowered-gexp-inputs lowered)))
diff --git a/guix/ssh.scm b/guix/ssh.scm
index ede00133c8..9b5ca68894 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -39,6 +39,7 @@
             remote-inferior
             remote-daemon-channel
             connect-to-remote-daemon
+            remote-system
             send-files
             retrieve-files
             retrieve-files*
@@ -282,6 +283,12 @@ be read.  When RECURSIVE? is true, the closure of FILES is exported."
                              ,(object->string
                                (object->string export))))))
 
+(define (remote-system session)
+  "Return the system type as expected by Nix, usually ARCHITECTURE-KERNEL, of
+the machine on the other end of SESSION."
+  (inferior-remote-eval '(begin (use-modules (guix utils)) (%current-system))
+                        session))
+
 (define* (send-files local files remote
                      #:key
                      recursive?
-- 
2.22.0





Information forwarded to guix-patches@HIDDEN:
bug#36872; Package guix-patches. Full text available.

Message received at 36872 <at> debbugs.gnu.org:


Received: (at 36872) by debbugs.gnu.org; 6 Aug 2019 20:57:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 06 16:57:36 2019
Received: from localhost ([127.0.0.1]:37887 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hv6WV-0006JV-Vm
	for submit <at> debbugs.gnu.org; Tue, 06 Aug 2019 16:57:36 -0400
Received: from dustycloud.org ([50.116.34.160]:49852)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cwebber@HIDDEN>) id 1hv6WT-0006JL-RE
 for 36872 <at> debbugs.gnu.org; Tue, 06 Aug 2019 16:57:34 -0400
Received: from twig (localhost [127.0.0.1])
 by dustycloud.org (Postfix) with ESMTPS id CE96626618;
 Tue,  6 Aug 2019 16:57:32 -0400 (EDT)
References: <87lfwee2yd.fsf@HIDDEN> <87h872e2v2.fsf@HIDDEN>
User-agent: mu4e 1.2.0; emacs 26.2
From: Christopher Lemmer Webber <cwebber@HIDDEN>
To: guix-patches@HIDDEN
Subject: Re: [bug#36872] [PATCH 2/2] remote: Remove '--system' argument.
In-reply-to: <87h872e2v2.fsf@HIDDEN>
Date: Tue, 06 Aug 2019 16:57:32 -0400
Message-ID: <87ef1yovur.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 36872
Cc: 36872 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

I'm still wondering whether asking the remote machine what its
architecture is won't turn out to be fragile in some way, though I'm not
sure how to articulate how that would be yet.  It seems like a weird
side effect to apply before doing the build.  (What if we want to build
derivations when we don't actually have a machine up and running yet?
Etc, etc.)

But you and Dave seem to think it's the right thing to do, so I'm going
to assume that you both know what to do better than I do at this point.

At any rate, the patch looks fine; once it's rebased on top of master
I'm ok with pushing it if there are no objections.

Jakob L. Kreuze writes:

> * gnu/services.scm (activation-script): Return a <program-file> rather
> than a <scheme-file>.
> * gnu/deploy.scm (guix-deploy): Remove handling for '--system'.
> (show-help): Remove documentation for '--system'.
> (%default-options): Remove default setting for 'system'.
> ---
>  gnu/services.scm        | 56 ++++++++++++++++++++---------------------
>  guix/scripts/deploy.scm |  8 ++----
>  2 files changed, 30 insertions(+), 34 deletions(-)
>
> diff --git a/gnu/services.scm b/gnu/services.scm
> index 7de78105ff..6ee05d4580 100644
> --- a/gnu/services.scm
> +++ b/gnu/services.scm
> @@ -430,34 +430,34 @@ ACTIVATION-SCRIPT-TYPE."
>  (define (activation-script gexps)
>    "Return the system's activation script, which evaluates GEXPS."
>    (define actions
> -    (map (cut scheme-file "activate-service" <>) gexps))
> -
> -  (scheme-file "activate"
> -               (with-imported-modules (source-module-closure
> -                                       '((gnu build activation)
> -                                         (guix build utils)))
> -                 #~(begin
> -                     (use-modules (gnu build activation)
> -                                  (guix build utils))
> -
> -                     ;; Make sure the user accounting database exists.  If it
> -                     ;; does not exist, 'setutxent' does not create it and
> -                     ;; thus there is no accounting at all.
> -                     (close-port (open-file "/var/run/utmpx" "a0"))
> -
> -                     ;; Same for 'wtmp', which is populated by mingetty et
> -                     ;; al.
> -                     (mkdir-p "/var/log")
> -                     (close-port (open-file "/var/log/wtmp" "a0"))
> -
> -                     ;; Set up /run/current-system.  Among other things this
> -                     ;; sets up locales, which the activation snippets
> -                     ;; executed below may expect.
> -                     (activate-current-system)
> -
> -                     ;; Run the services' activation snippets.
> -                     ;; TODO: Use 'load-compiled'.
> -                     (for-each primitive-load '#$actions)))))
> +    (map (cut program-file "activate-service.scm" <>) gexps))
> +
> +  (program-file "activate.scm"
> +                (with-imported-modules (source-module-closure
> +                                        '((gnu build activation)
> +                                          (guix build utils)))
> +                  #~(begin
> +                      (use-modules (gnu build activation)
> +                                   (guix build utils))
> +
> +                      ;; Make sure the user accounting database exists.  If it
> +                      ;; does not exist, 'setutxent' does not create it and
> +                      ;; thus there is no accounting at all.
> +                      (close-port (open-file "/var/run/utmpx" "a0"))
> +
> +                      ;; Same for 'wtmp', which is populated by mingetty et
> +                      ;; al.
> +                      (mkdir-p "/var/log")
> +                      (close-port (open-file "/var/log/wtmp" "a0"))
> +
> +                      ;; Set up /run/current-system.  Among other things this
> +                      ;; sets up locales, which the activation snippets
> +                      ;; executed below may expect.
> +                      (activate-current-system)
> +
> +                      ;; Run the services' activation snippets.
> +                      ;; TODO: Use 'load-compiled'.
> +                      (for-each primitive-load '#$actions)))))
>  
>  (define (gexps->activation-gexp gexps)
>    "Return a gexp that runs the activation script containing GEXPS."
> diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
> index 8eeb9ae7a1..bc1d93a93a 100644
> --- a/guix/scripts/deploy.scm
> +++ b/guix/scripts/deploy.scm
> @@ -44,8 +44,6 @@
>  (define (show-help)
>    (display (G_ "Usage: guix deploy [OPTION] FILE...
>  Perform the deployment specified by FILE.\n"))
> -  (display (G_ "
> -  -s, --system=SYSTEM    attempt to build for SYSTEM--e.g., \"i686-linux\""))
>    (show-build-options-help)
>    (newline)
>    (display (G_ "
> @@ -67,8 +65,7 @@ Perform the deployment specified by FILE.\n"))
>           %standard-build-options))
>  
>  (define %default-options
> -  `((system . ,(%current-system))
> -    (substitutes? . #t)
> +  `((substitutes? . #t)
>      (build-hook? . #t)
>      (graft? . #t)
>      (debug . 0)
> @@ -91,8 +88,7 @@ Perform the deployment specified by FILE.\n"))
>        (for-each (lambda (machine)
>                    (info (G_ "deploying to ~a...~%")
>                          (machine-display-name machine))
> -                  (parameterize ((%current-system (assq-ref opts 'system))
> -                                 (%graft? (assq-ref opts 'graft?)))
> +                  (parameterize ((%graft? (assq-ref opts 'graft?)))
>                      (guard (c ((message-condition? c)
>                                 (report-error (G_ "failed to deploy ~a: '~a'~%")
>                                               (machine-display-name machine)





Information forwarded to guix-patches@HIDDEN:
bug#36872; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Aug 2019 20:57:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 06 16:57:38 2019
Received: from localhost ([127.0.0.1]:37890 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hv6WY-0006Jk-EA
	for submit <at> debbugs.gnu.org; Tue, 06 Aug 2019 16:57:38 -0400
Received: from lists.gnu.org ([209.51.188.17]:45716)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cwebber@HIDDEN>) id 1hv6WW-0006Jc-LK
 for submit <at> debbugs.gnu.org; Tue, 06 Aug 2019 16:57:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:38744)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <cwebber@HIDDEN>) id 1hv6WV-0003DN-Az
 for guix-patches@HIDDEN; Tue, 06 Aug 2019 16:57:36 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <cwebber@HIDDEN>) id 1hv6WU-0004S0-2q
 for guix-patches@HIDDEN; Tue, 06 Aug 2019 16:57:35 -0400
Received: from dustycloud.org ([50.116.34.160]:38352)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <cwebber@HIDDEN>)
 id 1hv6WT-0004Rq-UV
 for guix-patches@HIDDEN; Tue, 06 Aug 2019 16:57:34 -0400
Received: from twig (localhost [127.0.0.1])
 by dustycloud.org (Postfix) with ESMTPS id CE96626618;
 Tue,  6 Aug 2019 16:57:32 -0400 (EDT)
References: <87lfwee2yd.fsf@HIDDEN> <87h872e2v2.fsf@HIDDEN>
User-agent: mu4e 1.2.0; emacs 26.2
From: Christopher Lemmer Webber <cwebber@HIDDEN>
To: guix-patches@HIDDEN
Subject: Re: [bug#36872] [PATCH 2/2] remote: Remove '--system' argument.
In-reply-to: <87h872e2v2.fsf@HIDDEN>
Date: Tue, 06 Aug 2019 16:57:32 -0400
Message-ID: <87ef1yovur.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 50.116.34.160
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: 36872 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

I'm still wondering whether asking the remote machine what its
architecture is won't turn out to be fragile in some way, though I'm not
sure how to articulate how that would be yet.  It seems like a weird
side effect to apply before doing the build.  (What if we want to build
derivations when we don't actually have a machine up and running yet?
Etc, etc.)

But you and Dave seem to think it's the right thing to do, so I'm going
to assume that you both know what to do better than I do at this point.

At any rate, the patch looks fine; once it's rebased on top of master
I'm ok with pushing it if there are no objections.

Jakob L. Kreuze writes:

> * gnu/services.scm (activation-script): Return a <program-file> rather
> than a <scheme-file>.
> * gnu/deploy.scm (guix-deploy): Remove handling for '--system'.
> (show-help): Remove documentation for '--system'.
> (%default-options): Remove default setting for 'system'.
> ---
>  gnu/services.scm        | 56 ++++++++++++++++++++---------------------
>  guix/scripts/deploy.scm |  8 ++----
>  2 files changed, 30 insertions(+), 34 deletions(-)
>
> diff --git a/gnu/services.scm b/gnu/services.scm
> index 7de78105ff..6ee05d4580 100644
> --- a/gnu/services.scm
> +++ b/gnu/services.scm
> @@ -430,34 +430,34 @@ ACTIVATION-SCRIPT-TYPE."
>  (define (activation-script gexps)
>    "Return the system's activation script, which evaluates GEXPS."
>    (define actions
> -    (map (cut scheme-file "activate-service" <>) gexps))
> -
> -  (scheme-file "activate"
> -               (with-imported-modules (source-module-closure
> -                                       '((gnu build activation)
> -                                         (guix build utils)))
> -                 #~(begin
> -                     (use-modules (gnu build activation)
> -                                  (guix build utils))
> -
> -                     ;; Make sure the user accounting database exists.  If it
> -                     ;; does not exist, 'setutxent' does not create it and
> -                     ;; thus there is no accounting at all.
> -                     (close-port (open-file "/var/run/utmpx" "a0"))
> -
> -                     ;; Same for 'wtmp', which is populated by mingetty et
> -                     ;; al.
> -                     (mkdir-p "/var/log")
> -                     (close-port (open-file "/var/log/wtmp" "a0"))
> -
> -                     ;; Set up /run/current-system.  Among other things this
> -                     ;; sets up locales, which the activation snippets
> -                     ;; executed below may expect.
> -                     (activate-current-system)
> -
> -                     ;; Run the services' activation snippets.
> -                     ;; TODO: Use 'load-compiled'.
> -                     (for-each primitive-load '#$actions)))))
> +    (map (cut program-file "activate-service.scm" <>) gexps))
> +
> +  (program-file "activate.scm"
> +                (with-imported-modules (source-module-closure
> +                                        '((gnu build activation)
> +                                          (guix build utils)))
> +                  #~(begin
> +                      (use-modules (gnu build activation)
> +                                   (guix build utils))
> +
> +                      ;; Make sure the user accounting database exists.  If it
> +                      ;; does not exist, 'setutxent' does not create it and
> +                      ;; thus there is no accounting at all.
> +                      (close-port (open-file "/var/run/utmpx" "a0"))
> +
> +                      ;; Same for 'wtmp', which is populated by mingetty et
> +                      ;; al.
> +                      (mkdir-p "/var/log")
> +                      (close-port (open-file "/var/log/wtmp" "a0"))
> +
> +                      ;; Set up /run/current-system.  Among other things this
> +                      ;; sets up locales, which the activation snippets
> +                      ;; executed below may expect.
> +                      (activate-current-system)
> +
> +                      ;; Run the services' activation snippets.
> +                      ;; TODO: Use 'load-compiled'.
> +                      (for-each primitive-load '#$actions)))))
>  
>  (define (gexps->activation-gexp gexps)
>    "Return a gexp that runs the activation script containing GEXPS."
> diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
> index 8eeb9ae7a1..bc1d93a93a 100644
> --- a/guix/scripts/deploy.scm
> +++ b/guix/scripts/deploy.scm
> @@ -44,8 +44,6 @@
>  (define (show-help)
>    (display (G_ "Usage: guix deploy [OPTION] FILE...
>  Perform the deployment specified by FILE.\n"))
> -  (display (G_ "
> -  -s, --system=SYSTEM    attempt to build for SYSTEM--e.g., \"i686-linux\""))
>    (show-build-options-help)
>    (newline)
>    (display (G_ "
> @@ -67,8 +65,7 @@ Perform the deployment specified by FILE.\n"))
>           %standard-build-options))
>  
>  (define %default-options
> -  `((system . ,(%current-system))
> -    (substitutes? . #t)
> +  `((substitutes? . #t)
>      (build-hook? . #t)
>      (graft? . #t)
>      (debug . 0)
> @@ -91,8 +88,7 @@ Perform the deployment specified by FILE.\n"))
>        (for-each (lambda (machine)
>                    (info (G_ "deploying to ~a...~%")
>                          (machine-display-name machine))
> -                  (parameterize ((%current-system (assq-ref opts 'system))
> -                                 (%graft? (assq-ref opts 'graft?)))
> +                  (parameterize ((%graft? (assq-ref opts 'graft?)))
>                      (guard (c ((message-condition? c)
>                                 (report-error (G_ "failed to deploy ~a: '~a'~%")
>                                               (machine-display-name machine)





Information forwarded to guix-patches@HIDDEN:
bug#36872; Package guix-patches. Full text available.

Message received at 36872 <at> debbugs.gnu.org:


Received: (at 36872) by debbugs.gnu.org; 31 Jul 2019 13:46:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 31 09:46:26 2019
Received: from localhost ([127.0.0.1]:51664 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hsovy-0003ya-2D
	for submit <at> debbugs.gnu.org; Wed, 31 Jul 2019 09:46:26 -0400
Received: from mx.sdf.org ([205.166.94.20]:59235)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zerodaysfordays@HIDDEN>)
 id 1hsovw-0003yT-NU
 for 36872 <at> debbugs.gnu.org; Wed, 31 Jul 2019 09:46:25 -0400
Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net
 [173.76.53.40]) (authenticated (0 bits))
 by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x6VDkNcj024897
 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO)
 for <36872 <at> debbugs.gnu.org>; Wed, 31 Jul 2019 13:46:23 GMT
From: zerodaysfordays@HIDDEN (Jakob L. Kreuze)
To: 36872 <at> debbugs.gnu.org
Subject: [PATCH 2/2] remote: Remove '--system' argument.
References: <87lfwee2yd.fsf@HIDDEN>
Date: Wed, 31 Jul 2019 09:43:29 -0400
In-Reply-To: <87lfwee2yd.fsf@HIDDEN> (Jakob L. Kreuze's message of
 "Wed, 31 Jul 2019 09:41:30 -0400")
Message-ID: <87h872e2v2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36872
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

* gnu/services.scm (activation-script): Return a <program-file> rather
than a <scheme-file>.
* gnu/deploy.scm (guix-deploy): Remove handling for '--system'.
(show-help): Remove documentation for '--system'.
(%default-options): Remove default setting for 'system'.
=2D--
 gnu/services.scm        | 56 ++++++++++++++++++++---------------------
 guix/scripts/deploy.scm |  8 ++----
 2 files changed, 30 insertions(+), 34 deletions(-)

diff --git a/gnu/services.scm b/gnu/services.scm
index 7de78105ff..6ee05d4580 100644
=2D-- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -430,34 +430,34 @@ ACTIVATION-SCRIPT-TYPE."
 (define (activation-script gexps)
   "Return the system's activation script, which evaluates GEXPS."
   (define actions
=2D    (map (cut scheme-file "activate-service" <>) gexps))
=2D
=2D  (scheme-file "activate"
=2D               (with-imported-modules (source-module-closure
=2D                                       '((gnu build activation)
=2D                                         (guix build utils)))
=2D                 #~(begin
=2D                     (use-modules (gnu build activation)
=2D                                  (guix build utils))
=2D
=2D                     ;; Make sure the user accounting database exists.  =
If it
=2D                     ;; does not exist, 'setutxent' does not create it a=
nd
=2D                     ;; thus there is no accounting at all.
=2D                     (close-port (open-file "/var/run/utmpx" "a0"))
=2D
=2D                     ;; Same for 'wtmp', which is populated by mingetty =
et
=2D                     ;; al.
=2D                     (mkdir-p "/var/log")
=2D                     (close-port (open-file "/var/log/wtmp" "a0"))
=2D
=2D                     ;; Set up /run/current-system.  Among other things =
this
=2D                     ;; sets up locales, which the activation snippets
=2D                     ;; executed below may expect.
=2D                     (activate-current-system)
=2D
=2D                     ;; Run the services' activation snippets.
=2D                     ;; TODO: Use 'load-compiled'.
=2D                     (for-each primitive-load '#$actions)))))
+    (map (cut program-file "activate-service.scm" <>) gexps))
+
+  (program-file "activate.scm"
+                (with-imported-modules (source-module-closure
+                                        '((gnu build activation)
+                                          (guix build utils)))
+                  #~(begin
+                      (use-modules (gnu build activation)
+                                   (guix build utils))
+
+                      ;; Make sure the user accounting database exists.  I=
f it
+                      ;; does not exist, 'setutxent' does not create it and
+                      ;; thus there is no accounting at all.
+                      (close-port (open-file "/var/run/utmpx" "a0"))
+
+                      ;; Same for 'wtmp', which is populated by mingetty et
+                      ;; al.
+                      (mkdir-p "/var/log")
+                      (close-port (open-file "/var/log/wtmp" "a0"))
+
+                      ;; Set up /run/current-system.  Among other things t=
his
+                      ;; sets up locales, which the activation snippets
+                      ;; executed below may expect.
+                      (activate-current-system)
+
+                      ;; Run the services' activation snippets.
+                      ;; TODO: Use 'load-compiled'.
+                      (for-each primitive-load '#$actions)))))
=20
 (define (gexps->activation-gexp gexps)
   "Return a gexp that runs the activation script containing GEXPS."
diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index 8eeb9ae7a1..bc1d93a93a 100644
=2D-- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -44,8 +44,6 @@
 (define (show-help)
   (display (G_ "Usage: guix deploy [OPTION] FILE...
 Perform the deployment specified by FILE.\n"))
=2D  (display (G_ "
=2D  -s, --system=3DSYSTEM    attempt to build for SYSTEM--e.g., \"i686-lin=
ux\""))
   (show-build-options-help)
   (newline)
   (display (G_ "
@@ -67,8 +65,7 @@ Perform the deployment specified by FILE.\n"))
          %standard-build-options))
=20
 (define %default-options
=2D  `((system . ,(%current-system))
=2D    (substitutes? . #t)
+  `((substitutes? . #t)
     (build-hook? . #t)
     (graft? . #t)
     (debug . 0)
@@ -91,8 +88,7 @@ Perform the deployment specified by FILE.\n"))
       (for-each (lambda (machine)
                   (info (G_ "deploying to ~a...~%")
                         (machine-display-name machine))
=2D                  (parameterize ((%current-system (assq-ref opts 'system=
))
=2D                                 (%graft? (assq-ref opts 'graft?)))
+                  (parameterize ((%graft? (assq-ref opts 'graft?)))
                     (guard (c ((message-condition? c)
                                (report-error (G_ "failed to deploy ~a: '~a=
'~%")
                                              (machine-display-name machine)
=2D-=20
2.22.0



--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1BmwEACgkQ9Qb9Fp2P
2Vp5kw//en36fICfLjxE5bCOTR7KSDsGCzk7KsJJVi1v6v9KMhalBptAbIfD1irK
GpO7GWc2+DjSPyNLCb6Syjrnq5x8xuDCJTeK1IdTMDMLogijSe0uZA43rOmXtx4L
877MQ9KB+wejy4dTTS8LyLN2AmjhQBfNzxmPgF/7BechE0X5A+E7YyaHiYDAOGZu
/xmJRbK0KsFS3tCZ8HvHbT5Bx1dJYPN14oDenbNooC0wVZjHnxYf0hTJcWmdE7HK
Z6YS0zgJ9QBmJnAZagqq7GXCm5QUz7PXN5hSpeIb52LNa3YhLMlJiNyYQGlJTcpw
qQr3L0Z/JKbB/E9VRXncT4dsuaK5x3+7ak6Gm76JmGG9EPYjm+fQM8iDFOQEPT3e
G1qAO/aSifAEg6gyr4ZCKw42wyObjB2IeVZ14wxDdknDMreiij7Aq2z/PfZtOzOq
tsYseivavFPK433M8dhJnnZDkIOcZJLlArQvG6bu/W8RmwKfjg43/LBv9vzBhbxI
/2wFZ3CxSWWo20YN+krINoqUnMJDIafKJwKiVKfO+kyD/WOOGBJcTrfw+6Z1VW2O
qpZROkrfzZ5eW4CwBX+NH0V6WOF8l+ly+iVwpifBwvVKzccmLFmrRrrblt4+tShq
F2qQq3BefVRuVXAgXf/MaoPHHIJob3Fp0Kjt8vDpx8GKBJFn1WY=
=pNoE
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#36872; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Jul 2019 13:44:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 31 09:44:42 2019
Received: from localhost ([127.0.0.1]:51659 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hsouI-0003v1-K9
	for submit <at> debbugs.gnu.org; Wed, 31 Jul 2019 09:44:42 -0400
Received: from lists.gnu.org ([209.51.188.17]:60128)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zerodaysfordays@HIDDEN>)
 id 1hsouF-0003ut-K4
 for submit <at> debbugs.gnu.org; Wed, 31 Jul 2019 09:44:40 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54445)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <zerodaysfordays@HIDDEN>)
 id 1hsouE-0008RF-Ct
 for guix-patches@HIDDEN; Wed, 31 Jul 2019 09:44:39 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <zerodaysfordays@HIDDEN>)
 id 1hsouA-0003PY-HC
 for guix-patches@HIDDEN; Wed, 31 Jul 2019 09:44:38 -0400
Received: from mx.sdf.org ([205.166.94.20]:59682)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <zerodaysfordays@HIDDEN>)
 id 1hsouA-0003OO-9m
 for guix-patches@HIDDEN; Wed, 31 Jul 2019 09:44:34 -0400
Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net
 [173.76.53.40]) (authenticated (0 bits))
 by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x6VDiOXi025809
 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO)
 for <guix-patches@HIDDEN>; Wed, 31 Jul 2019 13:44:28 GMT
From: zerodaysfordays@HIDDEN (Jakob L. Kreuze)
To: guix-patches@HIDDEN
Subject: [PATCH 1/2] remote: Build derivations appropriate for the remote's
 architecture.
Date: Wed, 31 Jul 2019 09:41:30 -0400
Message-ID: <87lfwee2yd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 205.166.94.20
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

* guix/ssh.scm (remote-system): New variable.
* guix/remote.scm (remote-eval): Use result of 'remote-system' when
lowering the G-Expression.
(trampoline): Return a <program-file> rather than a <scheme-file>.
=2D--
 guix/remote.scm | 13 ++++++++-----
 guix/ssh.scm    |  7 +++++++
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/guix/remote.scm b/guix/remote.scm
index 853029c54f..d5738ebbfa 100644
=2D-- a/guix/remote.scm
+++ b/guix/remote.scm
@@ -72,7 +72,7 @@ prerequisites of EXP are already available on the host at=
 SESSION."
   "Return a \"trampoline\" gexp that evaluates EXP and writes the evaluati=
on
 result to the current output port using the (guix repl) protocol."
   (define program
=2D    (scheme-file "remote-exp.scm" exp))
+    (program-file "remote-exp.scm" exp))
=20
   (with-imported-modules (source-module-closure '((guix repl)))
     #~(begin
@@ -97,10 +97,13 @@ all the elements EXP refers to are built and deployed t=
o SESSION beforehand.
 When BUILD-LOCALLY? is true, said dependencies are built locally and sent =
to
 the remote store afterwards; otherwise, dependencies are built directly on=
 the
 remote store."
=2D  (mlet %store-monad ((lowered (lower-gexp (trampoline exp)
=2D                                           #:module-path %load-path))
=2D                      (remote -> (connect-to-remote-daemon session
=2D                                                           socket-name)))
+  (mlet* %store-monad ((system -> (remote-system session))
+                       (lowered (lower-gexp (trampoline exp)
+                                            #:system system
+                                            #:guile-for-build #f
+                                            #:module-path %load-path))
+                       (remote -> (connect-to-remote-daemon session
+                                                            socket-name)))
     (define inputs
       (cons (lowered-gexp-guile lowered)
             (lowered-gexp-inputs lowered)))
diff --git a/guix/ssh.scm b/guix/ssh.scm
index ede00133c8..9b5ca68894 100644
=2D-- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -39,6 +39,7 @@
             remote-inferior
             remote-daemon-channel
             connect-to-remote-daemon
+            remote-system
             send-files
             retrieve-files
             retrieve-files*
@@ -282,6 +283,12 @@ be read.  When RECURSIVE? is true, the closure of FILE=
S is exported."
                              ,(object->string
                                (object->string export))))))
=20
+(define (remote-system session)
+  "Return the system type as expected by Nix, usually ARCHITECTURE-KERNEL,=
 of
+the machine on the other end of SESSION."
+  (inferior-remote-eval '(begin (use-modules (guix utils)) (%current-syste=
m))
+                        session))
+
 (define* (send-files local files remote
                      #:key
                      recursive?
=2D-=20
2.22.0


--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1BmooACgkQ9Qb9Fp2P
2VptEA/+J/IgPRjvq/Cbe/wFJbMLxlyiq7ZEImt88YwBIHZHhXIttMa8SfNy7L+w
AZt6YhmcNH/NtxNzLGEt0uUT2zk4T/MObXuwMj4rYq0R8nOLtNOj316buNlLVz6K
VPFGrOVq/rzp3IIY88QpFCTsNLNHB//7WeBbMoFGevRPGfi3+G5fjPWIPAFVci4e
zQ2A8HkQ0vctOoD0KG95bMARsCSWY7n3IZ5BDhVW5X/sWse9IviQWRi1ijplqKFF
53OY5hG64wWxcuvmc5dvoq1u+uT1cOiNlSQ7Dc+7AkCc9fi4CsmT1C9u1NCYhDs1
agEYIC0R27bvocN9JZrad2kRiDLnRRDiarpsXaarsrB12xKIvgPSc4eMZX4oWQ4D
ETlbd6KTtMa1H5F+Nn8wHCfVV8LfJwdP511qGB/WAgO3Ka1RQ8b2IB2xUrYNVctN
Tvxh/c6QnmGPlftDoKLuF8xef7yUwv/X1sSsj+sdfgxl+n5xZIURwGJs5F5PB4qu
mc+K1cz+w2lRAClZnVqWNtdzTrc/9u77n6iHiO2TKsrnT6FA/uFAfQ2+nlqCuU05
Bq8ZPU/NYGjWebEZ8E5b3gbsNuMmiTE4Sd7EyPaawlCJDalSad94JZq9VO0z9Rd/
r0a+ZT/sOHme2VhOPpcuFCGjaofulG3TXBlw+yY4NMeCslNNBGE=
=hfQd
-----END PGP SIGNATURE-----
--=-=-=--




Acknowledgement sent to zerodaysfordays@HIDDEN (Jakob L. Kreuze):
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#36872; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 7 Aug 2019 20:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.