From patchwork Thu Feb 6 14:36:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 38325 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 0EBD327BBEA; Thu, 6 Feb 2025 14:38:42 +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=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,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 CF90927BBE2 for ; Thu, 6 Feb 2025 14:38:40 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tg31E-0001xP-A3; Thu, 06 Feb 2025 09:38:16 -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 1tg310-0001qe-MO for guix-patches@gnu.org; Thu, 06 Feb 2025 09:38:03 -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 1tg310-0003vT-DK for guix-patches@gnu.org; Thu, 06 Feb 2025 09:38:02 -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=yOyeH1DM3H8omt7buJ7p70Hz0Wxi2Yh5TURHjKi2Xd0=; b=mZmUUKPQne6wz+NPzb8Ec8UuUaZRmABwMsRUHN8hy2Mbau58pw8fk2FRMgFxU2GX6YiFeC0PWONsLVlF15WOD3xDc27/wMvvJBk6liBHkImxSrFWxo3upFN4CfhpP6njU3ZLfiS+mUTmY4iPWFVhK5JKDUCx11UKp/C/e5AXRvmqYp28/dLRvu4ZOO4rjmOsuUGc1fzberjyfA0gLikIxvbEvX06SiNwvjiLiAgH+ybsBm5T5DPQJwvBSNlNyxg7MGW5MInd5MzXX21rYldJf27fXJPkalQQv+VpgH7IE4p9wXge9PvJck7gfNQAjNGgHI6kJmvNih4vuemFAKvy3g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tg310-0005zZ-49 for guix-patches@gnu.org; Thu, 06 Feb 2025 09:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76098] [PATCH 3/4] etc: Add installer manifest. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 06 Feb 2025 14:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76098 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76098@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 76098-submit@debbugs.gnu.org id=B76098.173885262522931 (code B ref 76098); Thu, 06 Feb 2025 14:38:02 +0000 Received: (at 76098) by debbugs.gnu.org; 6 Feb 2025 14:37:05 +0000 Received: from localhost ([127.0.0.1]:55070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tg304-0005xl-DU for submit@debbugs.gnu.org; Thu, 06 Feb 2025 09:37:05 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:48544) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tg2zz-0005wc-3u for 76098@debbugs.gnu.org; Thu, 06 Feb 2025 09:36:59 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-436ce2ab251so6520975e9.1 for <76098@debbugs.gnu.org>; Thu, 06 Feb 2025 06:36:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738852613; x=1739457413; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=yOyeH1DM3H8omt7buJ7p70Hz0Wxi2Yh5TURHjKi2Xd0=; b=I+TxbBvHNdImFkDhzvvDCbI4vgjo+EoI6OqrtFQgwGHDnRbcqZz4HzXIyf+SIAQKR+ gADMJFy1s0OAJiWO3ly/YlyYKktB618gj4WuJKMXRRa3lB/9malVmR+YUZeua+h5eYGs 7PShClEWFA7zKYKxWsWG9smAYqWZO0TB/s4vJm1z2F5kFw/9fDdR8AZi1zs2Zno+dOQq J1tfpLSLaICLju6Ai8ThvqbVt32gN4whRb+Abax0wI0eV1f7x1GbvuiTjJvXSuQGhteC HpN1aIRiu3jSxiDIMzvG5NqIGnRK7Q9/6Skov0FXJI2Lq1swPzrba7rNEQ/OkogcX61T cBng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738852613; x=1739457413; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=yOyeH1DM3H8omt7buJ7p70Hz0Wxi2Yh5TURHjKi2Xd0=; b=VdSwXb9RDCqOaAcNT3qeI2A+zjUFWZE0BhY9FfeRKybCU8v1fLq4rhuH8flcxUM2Ud ga5NqvLyIEPH9E6U1/8u2DR8jv4tFS8vhMxbDwNpzFUs58oSSyu2GGAB35c8YBqBXC3k noUL0TyGhfQRp5wgfKU6d+BqvFI00K1mwN86lLsocRNmp2izN1dZsfuG5izLmwaH/db8 xirenTkDNi9tilSMxVbHr/RTWCy89fLMVSZHb2G24ZGy2OE+AEgegdFe1BI+jE198cod xMPO/lDiuwM2ySTb+rMVf/Jum+4lDLCFCE5zu52XLA32OxWe+KWXnZM/tz0Bd4ZWaLVr dQcw== X-Gm-Message-State: AOJu0YxQTWDpUMZ+C4sHBb+vgtRsdQ4vTXIcodRewiCDSe1yR/aN7WFP mRtrnUiIJaCRrMyhKEUwI/no4Um+jlXnhNBV0Rhhm+ID6l00xtHFoed9Qwet X-Gm-Gg: ASbGncvVSHP20ZmsMhr0yJED1fktcIVRaykxlbXGtm4QCCY+iFQQ0AKsuAFdl0YJut5 6Sk/VS/7HqNPsP3hLR/FCBlzG5ynpyEW/nxdL76RkNNwzgM4Ic7pDOGBW4BHhS2va0qBUllj9xt OaBo5zn/jGmWDV9Y6qkVbQeFQZbnRoJRyx/2glGeTac7JLvIH4L3st+mQwIqcZsk+8vpHq3Rt9B lbPzO2wdqAGjuRhgs0KgZtnA75DqzbSRpKF3KcqJOMPydLOqOSZgwzClMozz7kcUsauAZxktrYj S2DF+RgmQxniQ1eCTztG X-Google-Smtp-Source: AGHT+IHZ86JnwyPIyFRIzd8FtqxCz8RHWSNu2+vyK3wTw0Q2PUHuwE89/2awiE34on/z+LSghos08A== X-Received: by 2002:a05:600c:1c91:b0:434:fbda:1f44 with SMTP id 5b1f17b1804b1-4390d56141dmr52023105e9.19.1738852612665; Thu, 06 Feb 2025 06:36:52 -0800 (PST) Received: from localhost ([141.226.10.168]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4391dcae84csm20957185e9.19.2025.02.06.06.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2025 06:36:51 -0800 (PST) From: Efraim Flashner Date: Thu, 6 Feb 2025 16:36:34 +0200 Message-ID: <136a425368c9707e3097f7c57adb809d24a6689c.1738851574.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.47.1 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 * etc/manifests/installer.scm: New file. * Makefile.am (GUIX_SYSTEM_SUPPORTED_SYSTEMS): Rename to GUIX_SYSTEM_INSTALLER_SYSTEMS. (assert-binaries-available): Check for substitutes using the installer manifest. Change-Id: I5c15e6916583bcd56e535733f284f3a735d7600b --- Makefile.am | 13 +++-- etc/manifests/installer.scm | 112 ++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 6 deletions(-) create mode 100644 etc/manifests/installer.scm diff --git a/Makefile.am b/Makefile.am index ad8bb907515..f2a5bcf5f7b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1076,8 +1076,9 @@ SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux \ BINARY_TARBALLS = \ $(foreach system,$(SUPPORTED_SYSTEMS),guix-binary.$(system).tar.xz) -# Systems supported by Guix System. -GUIX_SYSTEM_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux +# Systems supported by the Guix System installer. +# A Hurd install happens from a Linux installer image. +GUIX_SYSTEM_INSTALLER_SYSTEMS ?= x86_64-linux i686-linux # Systems for which we build Guix VMs. GUIX_SYSTEM_VM_SYSTEMS ?= x86_64-linux @@ -1138,10 +1139,10 @@ release: dist-with-updated-version all # Build 'current-guix' to speed things up for the next step. $(top_builddir)/pre-inst-env guix build \ -e '((@ (gnu packages package-management) current-guix))' \ - $(call system_flags,$(GUIX_SYSTEM_SUPPORTED_SYSTEMS)) \ + $(call system_flags,$(GUIX_SYSTEM_INSTALLER_SYSTEMS)) \ -v1 --no-grafts --fallback # Generate the ISO installation images. - for system in $(GUIX_SYSTEM_SUPPORTED_SYSTEMS) ; do \ + for system in $(GUIX_SYSTEM_INSTALLER_SYSTEMS) ; do \ GUIX_DISPLAYED_VERSION="`git describe --match=v* | sed -'es/^v//'`" ; \ image=`$(top_builddir)/pre-inst-env \ guix system image -t iso9660 \ @@ -1205,11 +1206,11 @@ assert-no-store-file-names: exit 1 ; \ fi -# Make sure important substitutes are available. Check only the primary +# Make sure installer substitutes are available. Check only the primary # server so that '--display-missing' doesn't print two lists. assert-binaries-available: $(GOBJECTS) $(AM_V_at)$(top_builddir)/pre-inst-env \ - guix weather -m "$(top_srcdir)/etc/manifests/release.scm" \ + guix weather -m "$(top_srcdir)/etc/manifests/installer.scm" \ --substitute-urls="https://ci.guix.gnu.org" \ --display-missing diff --git a/etc/manifests/installer.scm b/etc/manifests/installer.scm new file mode 100644 index 00000000000..264cb4bab8e --- /dev/null +++ b/etc/manifests/installer.scm @@ -0,0 +1,112 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020, 2021 Ludovic Courtès +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2025 Efraim Flashner +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +;;; This file returns a manifest containing packages which are needed by the +;;; installer. + +(use-modules (gnu packages) + (guix packages) + (guix profiles) + ((guix platform) #:select (targets)) + ((gnu services xorg) #:select (%default-xorg-modules)) + ((gnu system) #:select (%base-packages %base-packages-linux)) + (guix utils) + (guix gexp) + (srfi srfi-1) + (srfi srfi-26)) + +(define* (package->manifest-entry* package system + #:key target) + "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to +TARGET." + (manifest-entry + (inherit (package->manifest-entry package)) + (name (string-append (package-name package) "." system + (if target + (string-append "." target) + "'"))) + (item (with-parameters ((%current-system system) + (%current-target-system target)) + package)))) + +(define %guix-system-installer-systems + ;; Only the systems listed in GUIX_SYSTEM_INSTALLER_SYSTEMS + '("x86_64-linux" "i686-linux" + ;; These would be installed from their Linux counterparts: + ;"x86_64-gnu" "i586-gnu" + ;; Not actually for the installer, but needs the same packages anyway. + "aarch64-linux")) + +(define %base-packages/hurd + ;; Remove the packages from %base-packages-linux and some of the packages + ;; from the other package sets. + (fold delete %base-packages + (append (map specification->package + '("e2fsprogs" "kbd" "iproute2" "iw" "wireless-tools")) + %base-packages-linux))) + +(define %system-packages + ;; Key packages proposed by the Guix System installer. + (append (map specification->package + '("gnome" "xfce" "mate" "enlightenment" + "openbox" "awesome" + "i3-wm" "i3status" "dmenu" "st" + "ratpoison" "xterm" + "emacs" "emacs-exwm" "emacs-desktop-environment" + "openssh" "tor" "ntp" "gpm" + "connman" "network-manager" "wpa-supplicant" "isc-dhcp" "cups" + "linux-libre" "grub-hybrid")) + %default-xorg-modules)) + + +;;; +;;; Manifests. +;;; + +(define %base-manifest + (manifest + (append-map (lambda (system) + (map (cut package->manifest-entry* <> system) + (cond ((target-hurd? system) + %base-packages/hurd) + (else + %base-packages)))) + %guix-system-installer-systems))) + +(define %system-manifest + (manifest + (cons + ;; linux-libre-arm64-generic is the commonly used kernel on aarch64-linux. + (package->manifest-entry* (@ (gnu packages linux) + linux-libre-arm64-generic) + "aarch64-linux") + (append-map (lambda (system) + ;; Some of %SYSTEM-PACKAGES are currently unsupported on some + ;; systems--e.g., GNOME on 32-bit, due to Rust. Filter + ;; them out. + (filter-map (lambda (package) + (and (supported-package? package system) + (package->manifest-entry* package system))) + %system-packages)) + %guix-system-installer-systems)))) + +;; Return the union of all installer manifests. +(concatenate-manifests (list %base-manifest + %system-manifest))