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 sLZrN5+Jw14AHwAA0tVLHw (envelope-from ) for ; Tue, 19 May 2020 07:24:15 +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 oON1M5+Jw15FMwAAB5/wlQ (envelope-from ) for ; Tue, 19 May 2020 07:24:15 +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 938FA940D33 for ; Tue, 19 May 2020 07:24:15 +0000 (UTC) Received: from localhost ([::1]:55056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jawbm-0006MN-Jt for larch@yhetil.org; Tue, 19 May 2020 03:24:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jawba-0006Ci-N8 for guix-patches@gnu.org; Tue, 19 May 2020 03:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37495) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jawba-0000hM-E9 for guix-patches@gnu.org; Tue, 19 May 2020 03:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jawba-0003ru-B6 for guix-patches@gnu.org; Tue, 19 May 2020 03:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41350] [PATCH v2 2/3] system: vm: Do not register-closures when cross-building to the Hurd. Resent-From: "Jan (janneke) Nieuwenhuizen" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 May 2020 07:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41350 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41350@debbugs.gnu.org, Mathieu Othacehe Received: via spool by 41350-submit@debbugs.gnu.org id=B41350.158987300714808 (code B ref 41350); Tue, 19 May 2020 07:24:02 +0000 Received: (at 41350) by debbugs.gnu.org; 19 May 2020 07:23:27 +0000 Received: from localhost ([127.0.0.1]:49035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jawam-0003qU-GZ for submit@debbugs.gnu.org; Tue, 19 May 2020 03:23:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jawak-0003q4-Sf for 41350@debbugs.gnu.org; Tue, 19 May 2020 03:23:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45780) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jawaf-0000aA-Lx; Tue, 19 May 2020 03:23:05 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=39336 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jawae-0002jm-PM; Tue, 19 May 2020 03:23:05 -0400 From: "Jan (janneke) Nieuwenhuizen" Date: Tue, 19 May 2020 09:23:01 +0200 Message-Id: <20200519072302.9202-2-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200519072302.9202-1-janneke@gnu.org> References: <20200519072302.9202-1-janneke@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.99 X-TUID: Z86Xq9iZqdxG This supports cross-building building a vm-image for the Hurd, running a native qemu. * gnu/system/vm.scm (qemu-image)[register-closures?]: Default to #f when cross-compiling to the Hurd. Only create sql-schema when actually registering closures. --- gnu/build/vm.scm | 2 +- gnu/system/vm.scm | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index c751e6b0e2..2b36dd29ce 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -27,7 +27,7 @@ #:use-module (guix build store-copy) #:use-module (guix build syscalls) #:use-module ((guix utils) #:select (reset-timestamps)) - #:use-module (guix store database) + #:autoload (guix store database) (%epoch register-items sql-schema) #:use-module (gnu build bootloader) #:use-module (gnu build linux-boot) #:use-module (gnu build install) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 3e483fd86c..b343141c18 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -51,6 +51,7 @@ #:use-module (gnu packages zile) #:use-module (gnu packages linux) #:use-module (gnu packages admin) + #:use-module (gnu packages hurd) #:use-module (gnu bootloader) #:use-module (gnu bootloader grub) @@ -286,7 +287,8 @@ substitutable." os bootcfg-drv bootloader - (register-closures? (has-guix-service-type? os)) + (register-closures? (and (has-guix-service-type? os) + (not (hurd-target?)))) (inputs '()) copy-inputs? (substitutable? #t)) @@ -333,12 +335,13 @@ system that is passed to 'populate-root-file-system'." ((gnu build linux-boot) #:select (make-essential-device-nodes make-hurd-device-nodes)) - (guix store database) (guix build utils) (srfi srfi-26) (ice-9 binary-ports)) - (sql-schema #$schema) + (when #$register-closures? + (use-modules (guix store database)) + (sql-schema #$schema)) ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be decoded. (setenv "GUIX_LOCPATH" -- 2.26.2