[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/38: system: hurd: Remove qemu networking from %base-services/hurd.
From: |
guix-commits |
Subject: |
04/38: system: hurd: Remove qemu networking from %base-services/hurd. |
Date: |
Thu, 7 Nov 2024 10:56:06 -0500 (EST) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit 9744241c09a472b85ea3acec65eca86897fcb506
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Sun Oct 20 19:37:25 2024 +0200
system: hurd: Remove qemu networking from %base-services/hurd.
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 <ryan.moe@gmail.com>
;;; Copyright © 2018, 2020-2024 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2020, 2021, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2021, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2021 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2022 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la>
@@ -1643,7 +1643,7 @@ preventing password-based authentication as 'root'."
;; /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 <ludo@gnu.org>
-;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -47,6 +47,7 @@
#: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-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 @@
(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 @@
(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)
- 17/38: installer: Add static-networking template., (continued)
- 17/38: installer: Add static-networking template., guix-commits, 2024/11/07
- 10/38: installer: Remove unused (newt) imports., guix-commits, 2024/11/07
- 09/38: maint: Add installer dependencies to the manifest., guix-commits, 2024/11/07
- 38/38: gnu: libpciaccess: Support the 64bit Hurd., guix-commits, 2024/11/07
- 22/38: gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd., guix-commits, 2024/11/07
- 35/38: gnu: perl: Support cross-building for the 64bit Hurd., guix-commits, 2024/11/07
- 05/38: system: hurd: Add swap-services to hurd-default-essential-services., guix-commits, 2024/11/07
- 07/38: hurd-boot: Support second boot., guix-commits, 2024/11/07
- 08/38: system: examples: Add devel-hurd.tmpl., guix-commits, 2024/11/07
- 06/38: gnu: hurd: Support second boot., guix-commits, 2024/11/07
- 04/38: system: hurd: Remove qemu networking from %base-services/hurd.,
guix-commits <=
- 16/38: installer: Add "Kernel" page to select the Hurd., guix-commits, 2024/11/07
- 13/38: installer: Fix file-name typos., guix-commits, 2024/11/07
- 19/38: gnu: gnumach: Update to v1.8+git20240406., guix-commits, 2024/11/07
- 20/38: gnu: hurd: Update to v0.9.git20240714., guix-commits, 2024/11/07
- 24/38: gnu: elfutils: Fix build for 64bit Hurd., guix-commits, 2024/11/07
- 25/38: gnu: cross-libc: Support cross-building for the 64bit Hurd., guix-commits, 2024/11/07
- 33/38: gnu: Add libgpg-error-1.50., guix-commits, 2024/11/07
- 31/38: DRAFT gnu: bootstrap: Add support for x86_64-gnu., guix-commits, 2024/11/07
- 27/38: gnu: patch: Fix build for the 64bit Hurd., guix-commits, 2024/11/07
- 26/38: gnu: grep: Fix build for the 64bit Hurd., guix-commits, 2024/11/07