From patchwork Tue Nov 12 16:25:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 70293 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 EC7F627BBEA; Tue, 12 Nov 2024 16:31:00 +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 4009127BBE2 for ; Tue, 12 Nov 2024 16:31:00 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAtmT-0003xX-H2; Tue, 12 Nov 2024 11:30: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 1tAtmR-0003tj-P0 for guix-patches@gnu.org; Tue, 12 Nov 2024 11:30:15 -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 1tAtmR-0005vg-Em for guix-patches@gnu.org; Tue, 12 Nov 2024 11:30:15 -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=3zs4ja7TN2S6C1TsDLnjH9kNRAV37oJfStGk9ElpvY0=; b=YlNLwcadvwac6b2o6QUSUOihaYaXoYsN/He+8Xabg/UzlWKXiRn1JS6yEJow87FvViuIggHpPrZUSCmRl7+4FAsznQea+LCLuFJBpKyLn7OJjZA0fQp8r+YrdsZpJlJEF2KMLwlfrRWfC9yyF4yr4m1I0rN0uQ5g9e+kbfrHO9HNrapkClHGQAqKrZ+rEmJuafXQuZ2bp2mZ1cZPtQEAGDRkDJDC6hzoQkstRirraHobFeRPTin8/BnW/xaN2UvNF9/5ySFx968U0JLOogIKsDI3gEo26gYmlQkXR/D+7HdxODaFQT+CCFdjmMVv0RQjizwSh0ZX92N6Po/JkZDAqw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tAtmR-0000XC-88 for guix-patches@gnu.org; Tue, 12 Nov 2024 11:30:15 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74290] [PATCH v2 15/40] system: image: Add hurd64 image types. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Nov 2024 16:30:15 +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.17314289741264 (code B ref 74290); Tue, 12 Nov 2024 16:30:15 +0000 Received: (at 74290) by debbugs.gnu.org; 12 Nov 2024 16:29:34 +0000 Received: from localhost ([127.0.0.1]:39111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAtll-0000K9-9a for submit@debbugs.gnu.org; Tue, 12 Nov 2024 11:29:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAtlZ-0000H5-Db for 74290@debbugs.gnu.org; Tue, 12 Nov 2024 11:29:22 -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 1tAtjN-0005MI-QC; Tue, 12 Nov 2024 11:27:05 -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=3zs4ja7TN2S6C1TsDLnjH9kNRAV37oJfStGk9ElpvY0=; b=KjOGf/0PvjOL2YOZbUHd 1XpERitmHVrvsSQET+ZzQsBYnmt7AQoZSb681KG+KnP5XGGYD5DzqrAnvzHYBGWNAX5iSHjGl+ERK IJHcFxqqxXoCEtsp/ENbgRoWXuAAFJBlsN9WCgzKB0EOVnr3wgErMEEmJMLQ3H+QnH64upnwgHPDO 9KujO5zyN59kUlT1TMI13bSzGtYbUAFIzrkRJ0JgNfZgQ5G7euFdHOHVcKmri1V8dKg9fwpGjOjA6 bj0bJJFXDw0Lt4qq8B7DgLSnKunj9bDkYUMtf6NEz3T2Bg3lqieVX3sCnkWxh8g8BIfyOYlHT6ors TAxogKZqAuGQpw==; From: Janneke Nieuwenhuizen Date: Tue, 12 Nov 2024 17:25:24 +0100 Message-ID: <393e1a7d799e913bb4343cb03fa00f772404c607.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 * gnu/system/hurd.scm (%hurd64-default-operating-system-kernel, %hurd64-default-operating-system): New variables. * gnu/system/images/hurd.scm (hurd64-disk-image, hurd64-image-type, hurd64-qcow2-image-type, hurd64-barebones-disk-image, hurd64-barebones-qcow2-image): New variables. * gnu/system/images/hurd.scm (hurd64-barebones-os): New variable. --- gnu/system/hurd.scm | 17 +++++++++ gnu/system/images/hurd.scm | 72 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 87 insertions(+), 2 deletions(-) diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm index 9a351529e8..6263d3de71 100644 --- a/gnu/system/hurd.scm +++ b/gnu/system/hurd.scm @@ -18,6 +18,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu system hurd) + #:use-module (ice-9 match) #:use-module (guix gexp) #:use-module (guix profiles) #:use-module (guix utils) @@ -51,6 +52,8 @@ (define-module (gnu system hurd) %desktop-services/hurd %hurd-default-operating-system %hurd-default-operating-system-kernel + %hurd64-default-operating-system + %hurd64-default-operating-system-kernel %setuid-programs/hurd)) ;;; Commentary: @@ -68,6 +71,14 @@ (define %hurd-default-operating-system-kernel (%current-target-system #f)) gnumach))) +(define %hurd64-default-operating-system-kernel + (if (system-hurd?) + gnumach + ;; A cross-built GNUmach does not work + (with-parameters ((%current-system "x86_64-linux") + (%current-target-system #f)) + gnumach))) + (define %base-packages/hurd ;; Note: the Shepherd comes before the Hurd, not just because its duty is to ;; shepherd the herd, but also because we want its 'halt' and 'reboot' @@ -142,3 +153,9 @@ (define %hurd-default-operating-system (essential-services (hurd-default-essential-services this-operating-system)) (privileged-programs '()) (setuid-programs %setuid-programs/hurd))) + +(define %hurd64-default-operating-system + (operating-system + (inherit %hurd-default-operating-system) + (kernel %hurd64-default-operating-system-kernel))) + diff --git a/gnu/system/images/hurd.scm b/gnu/system/images/hurd.scm index 01c422a54f..67815aeb9b 100644 --- a/gnu/system/images/hurd.scm +++ b/gnu/system/images/hurd.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Mathieu Othacehe -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2024 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,7 +36,14 @@ (define-module (gnu system images hurd) hurd-image-type hurd-qcow2-image-type hurd-barebones-disk-image - hurd-barebones-qcow2-image)) + hurd-barebones-qcow2-image + + hurd64-barebones-os + hurd64-disk-image + hurd6-image-type + hurd64-qcow2-image-type + hurd64-barebones-disk-image + hurd64-barebones-qcow2-image)) (define hurd-barebones-os (operating-system @@ -62,6 +69,30 @@ (define hurd-barebones-os (password-authentication? #t))) %base-services+qemu-networking/hurd)))) +(define hurd64-barebones-os + (operating-system + (inherit %hurd64-default-operating-system) + (bootloader (bootloader-configuration + (bootloader grub-minimal-bootloader) + (targets '("/dev/sdX")))) + (file-systems (cons (file-system + (device (file-system-label "my-root")) + (mount-point "/") + (type "ext2")) + %base-file-systems)) + (host-name "guixygnu") + (timezone "Europe/Amsterdam") + (packages (cons openssh-sans-x %base-packages/hurd)) + (services (cons (service openssh-service-type + (openssh-configuration + (openssh openssh-sans-x) + (use-pam? #f) + (port-number 2222) + (permit-root-login #t) + (allow-empty-passwords? #t) + (password-authentication? #t))) + %base-services+qemu-networking/hurd)))) + (define hurd-initialize-root-partition #~(lambda* (#:rest args) (apply initialize-root-partition @@ -115,5 +146,42 @@ (define hurd-barebones-qcow2-image #:type hurd-qcow2-image-type)) (name 'hurd-barebones.qcow2))) + +;;; +;;; 64bit Hurd +;;; +(define hurd64-disk-image + (image + (inherit hurd-disk-image) + (platform x86_64-gnu))) + +(define hurd64-image-type + (image-type + (name 'hurd64-raw) + (constructor (cut image-with-os hurd64-disk-image <>)))) + +(define hurd64-qcow2-image-type + (image-type + (name 'hurd64-qcow2) + (constructor (lambda (os) + (image + (inherit hurd64-disk-image) + (format 'compressed-qcow2) + (operating-system os)))))) + +(define hurd64-barebones-disk-image + (image + (inherit + (os+platform->image hurd64-barebones-os x86_64-gnu + #:type hurd64-image-type)) + (name 'hurd64-barebones-disk-image))) + +(define hurd64-barebones-qcow2-image + (image + (inherit + (os+platform->image hurd64-barebones-os x86_64-gnu + #:type hurd64-qcow2-image-type)) + (name 'hurd64-barebones.qcow2))) + ;; Return the default image. hurd-barebones-qcow2-image