From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id yE0WBt5nG2eshAAA62LTzQ:P1 (envelope-from ) for ; Fri, 25 Oct 2024 09:41:50 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id yE0WBt5nG2eshAAA62LTzQ (envelope-from ) for ; Fri, 25 Oct 2024 11:41:50 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=s+cp2UKN; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="WOrhMMd/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729849309; a=rsa-sha256; cv=none; b=Sh0sKgqLodq3MPGMmiOZc+HU2zaXtEvV//CoXCIqesY3LxT1wTmcvQUDF33ZhTSyEHOfoc G2hc7/KRd7BgYzsyb0Nj8eyumkRLpy9XWCO9g8O+M8usJr3oYU6P92Rx8fJEWrut3Wq4FB cFxHjBPrR77PduVM2AhQwPP5ursVJwz2W+/mF0cSPvFJ4Pgj3LvvgCjpqYzE9i27QlMgZm Q0fG181otLiEtDPCxR1HdXMYg+hDiVuYIHYizmhBeZFB6AhGxMjuplSJ5rWWweoSTr4YAD gZyeZ+Jg91bHEgKYn63Yy6oZEfOIpDcu1+QdwjHVm5LVzuceP04L2XnQSK7cng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=s+cp2UKN; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="WOrhMMd/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729849309; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=v7eM2uVrdoqbOUffc/yD5r848jCktjuGgc/Sjl1V6h0=; b=AuInEpk3R0SepOnuVH6fJU3CCbpy22EJjjLAzLtZMWoZYodKmezP68czujYkRGSo3OwqNC C2hFGE8GmDHTOIGMDUHAI5hf49AEAzCkXcA9CwPpNEhttjixBl0EK+qPBt54BPFkHatq6F OsMOP537vjqRi7LjyQs0Do7DAsiqMSqN3QYRgST9RY0YKegP685EF6qMo6aNSdSVn2bwP0 ki6rOdZrUkp+x64at0GCZ068p41u/+4cLGd516eLGc1UkepQw6/ui0kjnXBDAG8MqqHlhV WWN2KAu6aO1nuhngmbCNQZx1lI+CLwWqIY5Z0BRPsAHXG4sBkDoecWLc5AhDJQ== 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 7C16C85587 for ; Fri, 25 Oct 2024 11:41:49 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t4Gp5-0002QW-20; Fri, 25 Oct 2024 05:41:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t4Gp2-0002Oz-6m for guix-patches@gnu.org; Fri, 25 Oct 2024 05:41:32 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t4Gp1-0003t9-UO for guix-patches@gnu.org; Fri, 25 Oct 2024 05:41:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=v7eM2uVrdoqbOUffc/yD5r848jCktjuGgc/Sjl1V6h0=; b=s+cp2UKN/KhG4gQkE5+Jm3aAH5QXpmDKxdhzGIkqEOa4VbQWJf3GMBhQjXf6afrjHllpUqwOg98r8otZAOe+7AqNgC+rZgxUPFQst1vwimCmoQt8pXUJG9EpUKm1EvwCKIeNKNCofeS2tP0akeX53OFGrW3k/2q1nVILegxLUhQjbhw4TWCo0t0/D+7ckjP4SG/AksGJgS9hNKN1Spyd6V8oAHwGnPKzOGMhZr/gAeGl6xGhhN0sCad+JaGAm6ClYSF3nVvZcBvHOYelnxgpFs+mPnl52oIBTAj6AYdh7AVe183f26pP8MDIgwAJIkqa+8nORjheWg3FDo1comfrcg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t4GpX-000262-LA for guix-patches@gnu.org; Fri, 25 Oct 2024 05:42:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73927] [PATCH v3 04/17] system: hurd: Remove qemu networking from %base-services/hurd. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Oct 2024 09:42:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73927@debbugs.gnu.org Received: via spool by 73927-submit@debbugs.gnu.org id=B73927.17298492797832 (code B ref 73927); Fri, 25 Oct 2024 09:42:03 +0000 Received: (at 73927) by debbugs.gnu.org; 25 Oct 2024 09:41:19 +0000 Received: from localhost ([127.0.0.1]:37307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4Goo-000224-57 for submit@debbugs.gnu.org; Fri, 25 Oct 2024 05:41:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4Goh-00020b-MX for 73927@debbugs.gnu.org; Fri, 25 Oct 2024 05:41:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t4Go6-0003mr-Jk; Fri, 25 Oct 2024 05:40:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=v7eM2uVrdoqbOUffc/yD5r848jCktjuGgc/Sjl1V6h0=; b=WOrhMMd/ca8OAl2DeDCP T6leKqAK7KpPpjr6W3gWVgI695mT0C4hf+4t1sPitQDiYb4GjEi7C3QlmDd0f7hJgEN6N65mNbKsf 1t+FxCfqH0Wg6HnOKFes10OxDt/vqxjBnCM80N2oQrIoAcoWZpuJ8XwwBwbHhfuppL6KPZisGaT7W kKIE7SBU6cmM1S8lLgEBz3PcpnXOY4QNKekEMHxffBxr6YaPxeM0MUSqzor3iXIGvX+j2cmVbBR3y ORr1L8WQlCTb6xK6D0LF5i7uGLmNc8olZSNihp80WAjUd6IWtzoTUAgXaru7pGEyPku48CGCquoyv 4m8MUKtSx7Yi8Q==; From: Janneke Nieuwenhuizen Date: Fri, 25 Oct 2024 11:39:56 +0200 Message-ID: <20241025094011.8540-5-janneke@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241025094011.8540-1-janneke@gnu.org> References: <20241025094011.8540-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.72 X-Spam-Score: -2.72 X-Migadu-Queue-Id: 7C16C85587 X-Migadu-Scanner: mx10.migadu.com X-TUID: 7JLu84P1sB4r This allows us to use %base-services/hurd for services in a Hurd config for a real machine without removing static-networking. * gnu/system/hurd.scm (%base-services/hurd): Factor networking out to... (%base-services+qemu-networking/hurd): ..this new variable. * gnu/system/examples/bare-hurd.tmpl (%hurd-os): Use it. * gnu/services/virtualization.scm (%hurd-vm-operating-system): Use it. * gnu/system/images/hurd.scm (hurd-barebones-os): Use it. Add comment about QEMU and networking for a real machine. Change-Id: I777a63410383b9bf8b5740e4513dbc1e9fb0fd41 --- gnu/services/virtualization.scm | 4 ++-- gnu/system/examples/bare-hurd.tmpl | 10 ++++++++-- gnu/system/hurd.scm | 23 ++++++++++++++--------- gnu/system/images/hurd.scm | 2 +- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index d87e494348..d33dfa6ca7 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ryan Moe ;;; Copyright © 2018, 2020-2024 Ludovic Courtès -;;; Copyright © 2020, 2021, 2023 Janneke Nieuwenhuizen +;;; Copyright © 2020, 2021, 2023, 2024 Janneke Nieuwenhuizen ;;; Copyright © 2021 Timotej Lazar ;;; Copyright © 2022 Oleg Pykhalov ;;; Copyright © 2022 Leo Nikkilä @@ -1643,7 +1643,7 @@ (define %hurd-vm-operating-system ;; /etc/guix/acl file in the childhurd. Thus, clear ;; 'authorize-key?' so that it's not overridden at activation ;; time. - (modify-services %base-services/hurd + (modify-services %base-services+qemu-networking/hurd (guix-service-type config => (guix-configuration (inherit config) diff --git a/gnu/system/examples/bare-hurd.tmpl b/gnu/system/examples/bare-hurd.tmpl index 463c7ee798..68c6d3c166 100644 --- a/gnu/system/examples/bare-hurd.tmpl +++ b/gnu/system/examples/bare-hurd.tmpl @@ -1,7 +1,7 @@ ;; -*-scheme-*- ;; This is an operating system configuration template -;; for a "bare bones" setup, with no X11 display server. +;; for a "bare bones" QEMU setup, with no X11 display server. ;; To build a disk image for a virtual machine, do ;; @@ -54,6 +54,12 @@ (permit-root-login #t) (allow-empty-passwords? #t) (password-authentication? #t))) - %base-services/hurd)))) + ;; For installing on a real (non-QEMU) machine, use: + ;; (static-networking-service-type + ;; (list %loopback-static-networking + ;; (static-networking + ;; ...))) + ;; %base-services/hurd + %base-services+qemu-networking/hurd)))) %hurd-os diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm index 6d6a20cf57..283bae6f10 100644 --- a/gnu/system/hurd.scm +++ b/gnu/system/hurd.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020-2024 Ludovic Courtès -;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen +;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,6 +47,7 @@ (define-module (gnu system hurd) #:use-module (gnu system vm) #:export (%base-packages/hurd %base-services/hurd + %base-services+qemu-networking/hurd %hurd-default-operating-system %hurd-default-operating-system-kernel %setuid-programs/hurd)) @@ -79,14 +80,6 @@ (define %base-packages/hurd (define %base-services/hurd (append (list (service hurd-console-service-type (hurd-console-configuration (hurd hurd))) - (service static-networking-service-type - (list %loopback-static-networking - - ;; QEMU user-mode networking. To get "eth0", you need - ;; QEMU to emulate a device for which Mach has an - ;; in-kernel driver, for instance with: - ;; --device rtl8139,netdev=net0 --netdev user,id=net0 - %qemu-static-networking)) (service guix-service-type (guix-configuration (extra-options '("--disable-chroot" @@ -102,6 +95,18 @@ (define %base-services/hurd (tty (string-append "tty" (number->string n)))))) (iota 6 1)))) +(define %base-services+qemu-networking/hurd + (cons + (service static-networking-service-type + (list %loopback-static-networking + + ;; QEMU user-mode networking. To get "eth0", you need + ;; QEMU to emulate a device for which Mach has an + ;; in-kernel driver, for instance with: + ;; --device rtl8139,netdev=net0 --netdev user,id=net0 + %qemu-static-networking)) + %base-services/hurd)) + (define %setuid-programs/hurd ;; Default set of setuid-root programs. (map file-like->setuid-program diff --git a/gnu/system/images/hurd.scm b/gnu/system/images/hurd.scm index 9b618f7dc6..01c422a54f 100644 --- a/gnu/system/images/hurd.scm +++ b/gnu/system/images/hurd.scm @@ -60,7 +60,7 @@ (define hurd-barebones-os (permit-root-login #t) (allow-empty-passwords? #t) (password-authentication? #t))) - %base-services/hurd)))) + %base-services+qemu-networking/hurd)))) (define hurd-initialize-root-partition #~(lambda* (#:rest args) -- 2.46.0