From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wIi+L2HtyF6qFgAA0tVLHw (envelope-from ) for ; Sat, 23 May 2020 09:31:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id IMOgK2HtyF6yewAA1q6Kng (envelope-from ) for ; Sat, 23 May 2020 09:31:13 +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 88A0F9402D6 for ; Sat, 23 May 2020 09:31:13 +0000 (UTC) Received: from localhost ([::1]:47112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcQUq-000294-Hp for larch@yhetil.org; Sat, 23 May 2020 05:31:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcQUg-00027q-To for guix-patches@gnu.org; Sat, 23 May 2020 05:31:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50129) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcQUg-0000oj-Kg for guix-patches@gnu.org; Sat, 23 May 2020 05:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jcQUg-0004jr-IV for guix-patches@gnu.org; Sat, 23 May 2020 05:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41350] [PATCH v3 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: Sat, 23 May 2020 09:31: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 Received: via spool by 41350-submit@debbugs.gnu.org id=B41350.159022623118149 (code B ref 41350); Sat, 23 May 2020 09:31:02 +0000 Received: (at 41350) by debbugs.gnu.org; 23 May 2020 09:30:31 +0000 Received: from localhost ([127.0.0.1]:33439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcQUB-0004ie-21 for submit@debbugs.gnu.org; Sat, 23 May 2020 05:30:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcQU8-0004i8-Pu for 41350@debbugs.gnu.org; Sat, 23 May 2020 05:30:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41078) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcQU3-0000fD-Il; Sat, 23 May 2020 05:30:23 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=51074 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jcQU1-0000Rw-By; Sat, 23 May 2020 05:30:22 -0400 From: "Jan (janneke) Nieuwenhuizen" Date: Sat, 23 May 2020 11:30:16 +0200 Message-Id: <20200523093017.12149-2-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200523093017.12149-1-janneke@gnu.org> References: <20200523093017.12149-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: -3.3 (---) 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: zdv8g5VXFhg3 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 | 9 ++++++++- gnu/system/vm.scm | 9 ++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index c751e6b0e2..a1b193134a 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -27,7 +27,14 @@ #: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) (sql-schema ;must list all exported symbols + %default-database-file + with-database + path-id + sqlite-register + register-path + register-items + %epoch) #: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