From patchwork Tue Nov 12 16:25:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 33359 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4C34B27BBED; Tue, 12 Nov 2024 16:32:01 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8A48527BBE2 for ; Tue, 12 Nov 2024 16:32:00 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAtnW-0004wS-Kt; Tue, 12 Nov 2024 11:31:23 -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 ) id 1tAtnI-0004nm-Cp for guix-patches@gnu.org; Tue, 12 Nov 2024 11:31:09 -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 ) id 1tAtnF-00065g-9L for guix-patches@gnu.org; Tue, 12 Nov 2024 11:31:06 -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=7xUDs3wiPNGoCi89giSbF1cq0bnz9itlj/AwYlPXGEE=; b=MqSwj+oPoQgVHu3wMo2FQ1dLmXhF/zobzuZrvSBiMo7OIMevQwClm/+wyVMsOWlgPFn+HaT98oKwF2IP1H0czlJCMrTpkdhA+bx9k9h//2lCCzWU2GCx9EP5v/ngldWErKlHv3zUIONrByTTnA3c1NOGB27OWCvmfYZF6Ia2JlyIjYSNvBDvOaZ1QhddfKn3jsFWLPaJiRxFdetAXlGE3L7m37mIuv4FOqwk/h/Kuof2lrKyj5ZZRHe8XS4W7Vb3R4Vq8bHlZRkCoT4DhRdK2AScXqH0BSN47ixxXmmcDkQN5Xhf7slqnIH10qIoifjqikZTWE5QlakvDAYyNakIYQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tAtnE-0000do-VK for guix-patches@gnu.org; Tue, 12 Nov 2024 11:31:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74290] [PATCH v2 40/40] system: examples: Add devel-hurd64.tmpl. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Nov 2024 16:31:04 +0000 Resent-Message-ID: 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.17314290282288 (code B ref 74290); Tue, 12 Nov 2024 16:31:04 +0000 Received: (at 74290) by debbugs.gnu.org; 12 Nov 2024 16:30:28 +0000 Received: from localhost ([127.0.0.1]:39265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAtme-0000ak-1m for submit@debbugs.gnu.org; Tue, 12 Nov 2024 11:30:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAtm2-0000Mt-32 for 74290@debbugs.gnu.org; Tue, 12 Nov 2024 11:29:51 -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 ) id 1tAtjr-0005Tn-De; Tue, 12 Nov 2024 11:27:35 -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=7xUDs3wiPNGoCi89giSbF1cq0bnz9itlj/AwYlPXGEE=; b=P4qz7Xtf7CXsvrw/AhDu Owe8UvJDOnp25398d4UQcbCPWy83T+d3hNGz5W8ybhD/cdgclNE+Ar1mUFU74q5I8kKdkWt7Fv9hg phiisHssZWGtGXgifmfZx84o7k7hnwx4hQfscoSU4WH+kkQKg7hiEubfLZOtcpv09RY1lqs4romdq e25u6ov+ya//JO67Hfrtf0oHOWSb8QFHKBBgc1ya81aeJaQ005JDeNiae8fgHiQ7/SyxcryvYcxcm CVLiH7qQHtEx9GziJ5KA7TWrDcrWmV3lHd0JC9vUPONB0AqLrKEjCzL5Ig99qjXdW1niR1D6EQ1ns esJIT+LvIPOkXA==; From: Janneke Nieuwenhuizen Date: Tue, 12 Nov 2024 17:25:49 +0100 Message-ID: <6e21691025e2b9a3284e5be628779b6838bcde54.1731427612.git.janneke@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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..ebc9fe8138 --- /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 + git-minimal + gnu-make + m4 + openssh-sans-x + (append + guix-packages + hurd-packages + %base-packages/hurd))))) + +%hurd64-devel-os