From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aPc+AhLCu140MQAA0tVLHw (envelope-from ) for ; Wed, 13 May 2020 09:46:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qErtKSDCu14XPAAAB5/wlQ (envelope-from ) for ; Wed, 13 May 2020 09:47:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 26C5E9402D1 for ; Wed, 13 May 2020 09:47:10 +0000 (UTC) Received: from localhost ([::1]:60048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYnyo-0002vm-R2 for larch@yhetil.org; Wed, 13 May 2020 05:47:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYnyg-0002vZ-WF for bug-guix@gnu.org; Wed, 13 May 2020 05:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45866) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYnyg-000226-7k for bug-guix@gnu.org; Wed, 13 May 2020 05:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jYnyg-0005Hb-5V for bug-guix@gnu.org; Wed, 13 May 2020 05:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41182: Profile hooks ignore system and target Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 13 May 2020 09:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41182 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 41182-submit@debbugs.gnu.org id=B41182.158936316620220 (code B ref 41182); Wed, 13 May 2020 09:47:02 +0000 Received: (at 41182) by debbugs.gnu.org; 13 May 2020 09:46:06 +0000 Received: from localhost ([127.0.0.1]:57404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYnxm-0005G4-8w for submit@debbugs.gnu.org; Wed, 13 May 2020 05:46:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYnxk-0005FJ-6C for 41182@debbugs.gnu.org; Wed, 13 May 2020 05:46:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33182) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYnxe-0001fm-6h; Wed, 13 May 2020 05:45:58 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=59144 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jYnxd-0005oc-KG; Wed, 13 May 2020 05:45:58 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <87a72f8qzi.fsf@inria.fr> <87k11idvkz.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Wed, 13 May 2020 11:45:55 +0200 In-Reply-To: <87k11idvkz.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 11 May 2020 23:13:00 +0200") Message-ID: <875zd0malo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 41182@debbugs.gnu.org, Mathieu Othacehe Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 X-Spam-Score: -1.01 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Scan-Result: default: False [-1.01 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.53971653722453]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.06), country: US(-0.00), ip: 209.51.188.17(-0.54)]; DWL_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; HAS_ORG_HEADER(0.00)[]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[janneke@gnu.org,bug-guix-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; URIBL_BLOCKED(0.00)[1.62.0.0:email,avataracademy.com:url,joyofsource.com:url,lilypond.org:url,gnu.org:email]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[gnu.org]; HAS_LIST_UNSUB(-0.01)[]; MIME_TRACE(0.00)[0:+]; DBL_PROHIBIT(0.00)[1.62.0.0:email]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.51.188.17:from]; FREEMAIL_CC(0.00)[debbugs.gnu.org,gmail.com]; RCVD_COUNT_SEVEN(0.00)[9]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: FFJmvCmQfFN0 Ludovic Court=C3=A8s writes: Hello! > Ludovic Court=C3=A8s skribis: > >> Actually all the profile hooks refer to the native derivation. > > I=E2=80=99ve looked at it and this problem is surprisingly tricky to addr= ess. Thank you so much for looking into this! > I=E2=80=99ve tried to address it in an API-compatible way, which meant se= tting > the =E2=80=98%current-system=E2=80=99 and =E2=80=98%current-target-system= =E2=80=99 parameters around the > hook calls, but that is ugly, hard to get right (dynamic binding and > monadic code really don=E2=80=99t go together well :-/), and actually rai= ses > another issue (=E2=80=98mapm/accumulate-builds=E2=80=99 appears to ignore= the initial > dynamic bindings for these two parameters). Hacky patch attached to > illustrate. > > So I=E2=80=99m very much tempted to instead require each hook to take =E2= =80=98system=E2=80=99 > and =E2=80=98#:target=E2=80=99 arguments and pass them to =E2=80=98gexp->= derivation=E2=80=99. It=E2=80=99ll > break the API, in case someone out there has custom profile hooks > (unlikely given that it=E2=80=99s not really documented), but I=E2=80=99d= say that=E2=80=99s OK. > > Thoughts? I'm all for breaking the API if that gets us further. How about doing that on the wip-hurd-vm branch, complete building the vm-image with services and when we have found this (and possible next steps) are useful fixes, commit to core-updates? It would be useful to get substitutes for such a change, though -- testing this took all night. Other than that I can offer my observations trying to build a kind of minimal Hurd system using fb120a69a8 services: hurd: Use activation-service, hurd-etc-service. both ./pre-inst-env guix system build --target=3Di586-pc-gnu gnu/system/exam= ples/bare-hurd.tmpl ./pre-inst-env guix system vm-image --target=3Di586-pc-gnu gnu/system/e= xamples/bare-hurd.tmpl still want to build a native Hurd (in my case for x86_64). So, I tried applying what your patch seems to be suggesting: --8<---------------cut here---------------start------------->8--- diff --git a/guix/store.scm b/guix/store.scm index 92158bd658..b27ad0fab3 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -1900,8 +1900,8 @@ coalesce them into a single call." (lambda (obj) (run-with-store store (mproc obj) - ;; #:system (%current-system) - ;; #:target (%current-target-system) + #:system (%current-system) + #:target (%current-target-system) )) lst) store))) --8<---------------cut here---------------end--------------->8--- and with that "system build" succeeds (after a while) but "system vm-image"= says guix system: error: gnu/packages/glib.scm:404:2: gobject-introspection@= 1.62.0: build system `meson' does not support cross builds This could be mostly harmless...still building a full (non-tiny/minimal) qemu or grub maybe? Greetings janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com