From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <guix-patches-bounces+larch=yhetil.org@gnu.org>
Received: from mp1.migadu.com ([2001:41d0:303:e16b::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms13.migadu.com with LMTPS
	id mIrfJbg3PGdFPQAA62LTzQ:P1
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 19 Nov 2024 07:01:12 +0000
Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp1.migadu.com with LMTPS
	id mIrfJbg3PGdFPQAA62LTzQ
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 19 Nov 2024 08:01:12 +0100
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=BFY7ABdh;
	dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=RfgdwJgv;
	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";
	dmarc=pass (policy=none) header.from=gnu.org
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1731999672;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:mime-version:mime-version:
	 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=7gbNsATbjXb2kpk7BHDgk2nAhT3t7Z4uLWUboY9VNLs=;
	b=nLciqiCFhZKaGCN/ZEL4muJxpI2IANNLe9OMX9eTa4q5veq/7poCEwFYtg769shgYIzfz1
	KGnIWAJVTRAx0CAcGoALeiT/z5Y7dmxwbBgC3KONeyoVPmqD+u0SRqw1MpSvSbKo2sXqlB
	6/TkbBfdGvUGpzkAGKoFofhoPQwNE/IqHbFud/6hcHT+stdFi2CWPHap/+BUWxL7MisivF
	e+/bgp8X8N6bh3UBsii5R+L8qgcvdknCeYlb+FlfFSJ7Ot401nWPWb3/eaRxqbuC0T+smh
	BYPF3ShRYlS6TvOPOUooHoeRqtXeVNmVJNfB5wEKAmxbS0d9AFze8688066Pag==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731999672; a=rsa-sha256; cv=none;
	b=VzcO6NTF9sEq6O1uZTc2NF8rNn+oaDhNXpw95tSdHO/+V597o9Avd/N7dfSlQKmlUi5+BI
	hW/vb88crDWVLeJPpyTcH2685Md09ZGlSHv9ObMP05KV7UT515FzE7bNYgWd98URnV3crx
	zPMvcYZtot0S2qcQ+BeYSKY0eiV14g+rTP+A4o5VB4U65dDMEJ5IyYc3l3SrIl8EjXL8x7
	JDS0kkIC/qEMmNmSG+DBudWtcBpNTGf9OmO+0I5nzakPM34wekio2qUp2m5DaD3+7wIiiM
	onJsC7zcEOog6eBz1TpegEQernCf1Vr4IXQ7KXnOpJ30QKRZrvbAh2lAXI3APg==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=BFY7ABdh;
	dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=RfgdwJgv;
	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";
	dmarc=pass (policy=none) header.from=gnu.org
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 3FA057998F
	for <larch@yhetil.org>; Tue, 19 Nov 2024 08:01:12 +0100 (CET)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <guix-patches-bounces@gnu.org>)
	id 1tDIDh-0000xN-RI; Tue, 19 Nov 2024 02:00:17 -0500
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 <Debian-debbugs@debbugs.gnu.org>)
 id 1tDIDa-0000op-FQ
 for guix-patches@gnu.org; Tue, 19 Nov 2024 02:00:10 -0500
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 <Debian-debbugs@debbugs.gnu.org>)
 id 1tDIDa-0004lZ-2Z
 for guix-patches@gnu.org; Tue, 19 Nov 2024 02:00:10 -0500
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=7gbNsATbjXb2kpk7BHDgk2nAhT3t7Z4uLWUboY9VNLs=; 
 b=BFY7ABdhS/354xzoQzqajR2QA3+2waR3ULsGMlwsioNrEGoOO0yIk0InQHGJ8OIL0xLFKe1PTrzDAIYlNWny+GPDIk8r2n52FESAVjqaBmtMK/ERZTJ77ynqOxKWV659FB1WrMOAJNTbBFsBSrklIs7XfMy2/86p4GtevcDFYOiElEYNzl+WuyaSCs4RZWpvh9hAqBfljvqMkd4HHWz05Y/b98RwKjysIle9G14F6kV9qG8ZMtiwgpmTu3zxQwMHF/LN+hWaq57RY4ReyMEKdD+EzqQmevMDUnhgiFXYS/zx64l0hMsPxRxT0B28woC5QAtyuFmvwnboHb40NqUZ0A==;
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tDIDZ-0005Po-UG
 for guix-patches@gnu.org; Tue, 19 Nov 2024 02:00:09 -0500
X-Loop: help-debbugs@gnu.org
Subject: [bug#74290] [PATCH v3 50/51] system: examples: Add devel-hurd64.tmpl.
Resent-From: Janneke Nieuwenhuizen <janneke@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: guix-patches@gnu.org
Resent-Date: Tue, 19 Nov 2024 07:00:09 +0000
Resent-Message-ID: <handler.74290.B74290.173199959520637@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 74290
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 74290@debbugs.gnu.org
Received: via spool by 74290-submit@debbugs.gnu.org id=B74290.173199959520637
 (code B ref 74290); Tue, 19 Nov 2024 07:00:09 +0000
Received: (at 74290) by debbugs.gnu.org; 19 Nov 2024 06:59:55 +0000
Received: from localhost ([127.0.0.1]:40673 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1tDIDK-0005Ml-Ul
 for submit@debbugs.gnu.org; Tue, 19 Nov 2024 01:59:55 -0500
Received: from eggs.gnu.org ([209.51.188.92]:43522)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <janneke@gnu.org>) id 1tDICU-0005Co-DE
 for 74290@debbugs.gnu.org; Tue, 19 Nov 2024 01:59:03 -0500
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 <janneke@gnu.org>)
 id 1tDIAJ-00047t-EZ; Tue, 19 Nov 2024 01:56:47 -0500
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=7gbNsATbjXb2kpk7BHDgk2nAhT3t7Z4uLWUboY9VNLs=; b=RfgdwJgvGeg0rQm/wQUY
 faVz8/LuY3kzwoy8TB1aqirMnkJOgY38mTf1DRxbk1eUxrwus5LjJ0vTza2vn26tf473jBFWjO9yJ
 vrtNwdeBH1cUP2mKZnigvQMZpDK1DUsTwX3cZe2w0x+povmTWfEAzp9NCw6kx5fqj5dxt7zy/qGn8
 6zjWn1cEhqdKpNDQFjS1V6aBUzTVL/9UFK61Q1y7QB6uHrqrNz9aBKhxXhUK41AWBeCVUGpHW3SZj
 4UEg5W41uHIRt5jKa+c/IgsUYcXnOVLo32L0qhl+CdEKe3TqMXYCrrnmK1XIi2+LZxfCHXTcKYinM
 geKP3DpIzfey1g==;
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Tue, 19 Nov 2024 07:55:20 +0100
Message-ID: <2555c1df98288dd6e4e391eb179f6649c9cdf53d.1731999203.git.janneke@gnu.org>
X-Mailer: git-send-email 2.46.0
In-Reply-To: <cover.1731999202.git.janneke@gnu.org>
References: <cover.1731999202.git.janneke@gnu.org>
MIME-Version: 1.0
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: <guix-patches.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-patches>
List-Post: <mailto:guix-patches@gnu.org>
List-Help: <mailto:guix-patches-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=subscribe>
Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org
Sender: guix-patches-bounces+larch=yhetil.org@gnu.org
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: US
X-Migadu-Spam-Score: -6.03
X-Spam-Score: -6.03
X-Migadu-Queue-Id: 3FA057998F
X-Migadu-Scanner: mx13.migadu.com
X-TUID: +cSpnKKZ9USw

This also updates comments and removes the comment about a very old
`bootstrap-profile' hack.

* gnu/system/examples/devel-hurd.tmpl (hurd-packages): New variable
(%hurd-devel-os): Use it.
* gnu/system/examples/devel-hurd64.tmpl: New file.

Change-Id: I54b6b0843f0dd635d89cca483ae43d23b20d21e8
---
 gnu/system/examples/devel-hurd.tmpl   | 70 +++++++++++----------------
 gnu/system/examples/devel-hurd64.tmpl | 65 +++++++++++++++++++++++++
 2 files changed, 93 insertions(+), 42 deletions(-)
 create mode 100644 gnu/system/examples/devel-hurd64.tmpl

diff --git a/gnu/system/examples/devel-hurd.tmpl b/gnu/system/examples/devel-hurd.tmpl
index 3dca0706d1..066bdfe9d8 100644
--- a/gnu/system/examples/devel-hurd.tmpl
+++ b/gnu/system/examples/devel-hurd.tmpl
@@ -3,7 +3,7 @@
 ;; This is an operating system configuration template for a "bare bones
 ;; development" setup, with no X11 display server.
 
-;; To build a disk image for a virtual machine, do
+;; To build a disk image for a virtual machine, do something like:
 ;;
 ;;   ./pre-inst-env guix system image --image-type=hurd-qcow2 --image-size=6G \
 ;;      --no-offload gnu/system/examples/devel-hurd.tmpl
@@ -11,41 +11,38 @@
 ;; You may run it like so
 ;;
 ;;     cp /gnu/store/.../disk-image devel-hurd.img
-;;     guix shell qemu -- qemu-system-i386 -enable-kvm -m 4096 \
-;;      -device rtl8139,netdev=net0                            \
-;;      -netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
-;;      -hda devel-hurd.img
-;;
-;; and use it like
+;;     guix shell qemu -- qemu-system-i386 -m 4096                \
+;;       --enable-kvm                                             \
+;;       --device e1000,netdev=net0                               \
+;;       --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222  \
+;;       --hda devel-hurd.img
 ;;
 ;;     ssh -p 10022 root@localhost
 ;;     guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
 ;;
-;; or even (if you use --image-size=3G)
+;; or even:
 ;;
 ;;     guix build hello
 ;;
-;; Building Guix, do something like:
+;; For Guix hacking, do something like:
 ;;
-;;     GUIX_PROFILE=/run/current-system/bootstrap-profile
-;;     source $GUIX_PROFILE/etc/profile
+;;     guix shell --boostrap -D guix
 ;;     mkdir -p ~/src/guix
 ;;     cd src/guix
 ;;     git clone https://git.savannah.gnu.org/git/guix.git master
 ;;     cd master
 ;;     ./bootstrap
-;;     ./configure --with-courage
+;;     ./configure
 ;;     make
 
+(include "bare-hurd.tmpl")
+
 (use-modules (srfi srfi-1)
              (ice-9 match)
-             (gnu)
              (gnu system hurd)
-             (gnu system locale)
              (guix packages)
-             (guix store)
-             (guix utils))
-(use-service-modules ssh virtualization)
+             (guix store))
+
 (use-package-modules base compression file gawk gdb hurd less m4
                      package-management ssh version-control)
 
@@ -64,23 +61,23 @@
                     ;; These are not essential and do not build yet.
                     '("graphviz" "guile-avahi" "po4a"))))
 
+(define hurd-packages
+  (filter-map input->package
+              (fold alist-delete (package-direct-inputs hurd)
+                    ;; These are not essential, rumpkernel is very big.
+                    '("dde-sources" "parted" "rumpkernel" "util-linux"
+                      "texinfo"))))
+
 (define %hurd-devel-os
   (operating-system
-    (inherit %hurd-vm-operating-system)
-    (host-name "guixydevel")
+    (inherit %hurd-os)
+    (bootloader (bootloader-configuration
+                 (bootloader grub-minimal-bootloader)
+                 (targets '("/dev/sdX"))
+                 (timeout 0)))
     (timezone "Europe/Berlin")
-    (file-systems (cons (file-system
-                          (device (file-system-label "hurd"))
-                          (mount-point "/")
-                          (type "ext2"))
-                        %base-file-systems))
     (swap-devices (list (swap-space
                           (target "/swapfile"))))
-    (users (cons (user-account
-                  (name "guix")
-                  (group "users")
-                  (supplementary-groups '("wheel")))
-                 %base-user-accounts))
     (packages (cons*
                gdb-minimal
                git-minimal
@@ -89,18 +86,7 @@
                openssh-sans-x
                (append
                 guix-packages
-                %base-packages/hurd)))
-    (services (cons*
-               (modify-services (operating-system-user-services
-                                 %hurd-vm-operating-system)
-                 (openssh-service-type
-                  config =>
-                  ;; Set wide open
-                  (openssh-configuration
-                   (openssh openssh-sans-x)
-                   (port-number 2222)
-                   (permit-root-login #t)
-                   (allow-empty-passwords? #t)
-                   (password-authentication? #t))))))))
+                hurd-packages
+                %base-packages/hurd)))))
 
 %hurd-devel-os
diff --git a/gnu/system/examples/devel-hurd64.tmpl b/gnu/system/examples/devel-hurd64.tmpl
new file mode 100644
index 0000000000..146a35adcf
--- /dev/null
+++ b/gnu/system/examples/devel-hurd64.tmpl
@@ -0,0 +1,65 @@
+;; -*-scheme-*-
+
+;; This is an operating system configuration template
+;; for a "bare bones" QEMU setup, with no X11 display server.
+
+;; To build a disk image for a virtual machine, do:
+;;
+;;   ./pre-inst-env guix system image --image-type=hurd-qcow2 --image-size=6G \
+;;      --no-offload gnu/system/examples/devel-hurd64.tmpl
+;;
+;; You may run it like so:
+;;
+;;     cp /gnu/store/.../disk-image devel-hurd.img
+;;     guix shell qemu@7 -- qemu-system-x86_64 -m 4096            \
+;;       --machine q35                                            \
+;;       --enable-kvm                                             \
+;;       --device e1000,netdev=net0                               \
+;;       --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222  \
+;;       --hda devel-hurd.img
+;;
+;; and use it like:
+;;
+;;     ssh -p 10022 root@localhost
+;;     guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
+;;
+;; or even:
+;;
+;;     guix build hello
+;;
+;; For Guix hacking, do something like:
+;;
+;;     guix shell --boostrap -D guix
+;;     mkdir -p ~/src/guix
+;;     cd src/guix
+;;     git clone git clone git://git.savannah.gnu.org/guix
+;;     cd master
+;;     ./bootstrap
+;;     ./configure
+;;     make
+
+(include "devel-hurd.tmpl")
+(include "bare-hurd64.tmpl")
+
+(define %hurd64-devel-os
+  (operating-system
+    (inherit %hurd64-os)
+    (bootloader (bootloader-configuration
+                 (bootloader grub-minimal-bootloader)
+                 (targets '("/dev/sdX"))
+                 (timeout 0)))
+    (timezone "Europe/Berlin")
+    (swap-devices (list (swap-space
+                          (target "/swapfile"))))
+    (packages (cons*
+               gdb-minimal-15
+               git-minimal
+               gnu-make
+               m4
+               openssh-sans-x
+               (append
+                guix-packages
+                hurd-packages
+                %base-packages/hurd)))))
+
+%hurd64-devel-os
-- 
2.46.0