From patchwork Tue Nov 19 06:55:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 70543 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 E790827BBE2; Tue, 19 Nov 2024 07:01:13 +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 29FD727BBEA for ; Tue, 19 Nov 2024 07:01:12 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) 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 ) 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 ) 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 ) 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 Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Nov 2024 07:00:09 +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.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 ) 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 ) 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 ) 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 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: 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..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