From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0CEdMpHIL2L3bgAAgWs5BA (envelope-from ) for ; Mon, 14 Mar 2022 23:58:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gPjZKpHIL2KWnQAAG6o9tA (envelope-from ) for ; Mon, 14 Mar 2022 23:58:25 +0100 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 3F1B148E7E for ; Mon, 14 Mar 2022 23:58:25 +0100 (CET) Received: from localhost ([::1]:52536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTtdw-0007vv-Dg for larch@yhetil.org; Mon, 14 Mar 2022 18:58:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTtdb-0007Gz-RE for guix-patches@gnu.org; Mon, 14 Mar 2022 18:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52977) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTtdb-0004w4-BD for guix-patches@gnu.org; Mon, 14 Mar 2022 18:58:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nTtdb-00052v-9v for guix-patches@gnu.org; Mon, 14 Mar 2022 18:58:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54394] [PATCH core-updates 03/12] gnu-bootstrap: Allow multiple module directories. Resent-From: Timothy Sample Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Mar 2022 22:58:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54394 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54394@debbugs.gnu.org Cc: Timothy Sample Received: via spool by 54394-submit@debbugs.gnu.org id=B54394.164729868219383 (code B ref 54394); Mon, 14 Mar 2022 22:58:03 +0000 Received: (at 54394) by debbugs.gnu.org; 14 Mar 2022 22:58:02 +0000 Received: from localhost ([127.0.0.1]:46872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTtdZ-00052S-Sj for submit@debbugs.gnu.org; Mon, 14 Mar 2022 18:58:02 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:49541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTtdY-00052B-PM for 54394@debbugs.gnu.org; Mon, 14 Mar 2022 18:58:01 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 9AE3D5C01F2; Mon, 14 Mar 2022 18:57:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 14 Mar 2022 18:57:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=biLz8c H3xsv7fSUbxIVteTx17M64Yqw2WrVQgUk6LHk=; b=ToV39FKyP7gpPuY1LPzUIz sQgZqkmKFOdcte6yr6dBwMummfWbNS7/elkmw5nXFQtY1EMgxAcxkUxivNwmpOkv Y40B72x1PsTaKTuqaVtIZjfFQd2gw54Ka+2OgQpasheKTHa8muPQUmxkfdP8EIhO xtmAjr+Vg5q9RiJabmVSQGz2AmUTuN/jweUlda4ABHzn+tGgey2ygtXuoX9c31UB qHTAISu0eryBVJyIGWvXshIxdcAYK4z7pZ6MPDM+g1Ze1bi3LMEkpUBydnZrURKH lW/rmxb6WhzRJBzwWV5uTyG+Ee4BuizjglUA4UV/9q5Y1cR5dTOYY5003fclHwVQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddvledgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhimhhothhhhicuufgrmhhplhgvuceoshgrmhhplhgvthes nhhghihrohdrtghomheqnecuggftrfgrthhtvghrnhepkeefhfeigeeuffelhffhheegve ekteegkeegkefhjeetjeevgffguddtjeevgeefnecuffhomhgrihhnpehnghihrhhordgt ohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsh grmhhplhgvthesnhhghihrohdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Mar 2022 18:57:55 -0400 (EDT) From: Timothy Sample Date: Mon, 14 Mar 2022 16:57:02 -0600 Message-Id: <20220314225712.19869-3-samplet@ngyro.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <87v8wg40dl.fsf@ngyro.com> References: <87v8wg40dl.fsf@ngyro.com> 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647298705; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=biLz8cH3xsv7fSUbxIVteTx17M64Yqw2WrVQgUk6LHk=; b=fsdo+7G3jWhX+aMRoIWq27yjkO/pXyUzAzj7pTg+AohAFwat+3hhgZwdzTANbU1DJM94QB Q7xq1DUkpo0mCXY6RnF1vh9dXd04Bzg4H09YSlGyE+COAttenNujm2Yog+KHzxiwWC3QaI vPm0LTRlQxGObZXq72F2fzDiLc6HUAXajYgGigGe2nCjCZXaxDEkUgRHekuvvxqRiDf0gV 2m0gRmvXJtEb9TIsY6SZ9MTgBDvKn8bzumNvA40iaxhYO6EZY7dgddgfe1ta+nTFmrzJ3d ZRs10fAobP+4MT+pWV3whYdAdoXye9pza2hg4WqHQpIrwMUmlw/pxI1M/AO0WA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647298705; a=rsa-sha256; cv=none; b=HAyU1796zue0s4ZwVT92PQu1rYyTyGkObkx2Whsxa43pHdFwcDSTKGIiDtGFdsjoPE50w2 0V2yFFFLEIrT4D1uOwfdeSL7CyTQltXMgBJyWCkJwwkT0TOsvnt6wIaNd2ARUQN4OtqzWU zfXyeAP+RZ0yL9jRj4zZ2qsOny1klEckh5YyyFsDsqmfb1qguOKufGgmbFmeYeZN/z2y7M l8RkrXs7u5WyMpT3tRriS4gKmrm8sb3k722DIhB7u37H7E6ttsMIPIfejJqKB/bFy9GBx6 MGZCNAjS3YeBMwPO4nXNzsaasvnWQKeyQlwdjQbk3nDR4TXMLDlLRw1V7vA0uw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=ToV39FKy; dmarc=none; 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" X-Migadu-Spam-Score: 2.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=ToV39FKy; dmarc=none; 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" X-Migadu-Queue-Id: 3F1B148E7E X-Spam-Score: 2.32 X-Migadu-Scanner: scn1.migadu.com X-TUID: 4B0SsIJ+Pbr5 * guix/build/gnu-bootstrap.scm (bootstrap-configure, bootstrap-build, bootstrap-install): Treat the 'modules' argument as a list of directories. * gnu/packages/commencement.scm (bootar, gash-boot, gash-utils-boot): Adjust call sites. --- gnu/packages/commencement.scm | 18 +++++++++--------- guix/build/gnu-bootstrap.scm | 21 ++++++++++++--------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 644db8cc58..fd3a9c37e7 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -121,9 +121,9 @@ (define bootar (invoke guile "--no-auto-compile" source) (chdir "bootar")))) (replace 'configure (bootstrap-configure "Bootar" ,version - "." "scripts")) - (replace 'build (bootstrap-build ".")) - (replace 'install (bootstrap-install "." "scripts")))))) + '(".") "scripts")) + (replace 'build (bootstrap-build '("."))) + (replace 'install (bootstrap-install '(".") "scripts")))))) (inputs `(("guile" ,%bootstrap-guile))) (home-page "https://git.ngyro.com/bootar") (synopsis "Tar decompression and extraction in Guile Scheme") @@ -158,9 +158,9 @@ (define gash-boot (modify-phases %standard-phases (replace 'configure (bootstrap-configure "Gash" ,(package-version gash) - "gash" "scripts")) - (replace 'build (bootstrap-build "gash")) - (replace 'install (bootstrap-install "gash" "scripts")) + '("gash") "scripts")) + (replace 'build (bootstrap-build '("gash"))) + (replace 'install (bootstrap-install '("gash") "scripts")) (add-after 'install 'install-symlinks (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) @@ -222,9 +222,9 @@ (define gash-utils-boot (delete-file "scripts/template.in"))) (replace 'configure (bootstrap-configure "Gash-Utils" ,(package-version gash-utils) - "gash" "scripts")) - (replace 'build (bootstrap-build "gash")) - (replace 'install (bootstrap-install "gash" "scripts")) + '("gash") "scripts")) + (replace 'build (bootstrap-build '("gash"))) + (replace 'install (bootstrap-install '("gash") "scripts")) ;; XXX: The scripts should add Gash to their load paths and ;; this phase should not exist. (add-after 'install 'copy-gash diff --git a/guix/build/gnu-bootstrap.scm b/guix/build/gnu-bootstrap.scm index 7ca6ae8458..b4257a3717 100644 --- a/guix/build/gnu-bootstrap.scm +++ b/guix/build/gnu-bootstrap.scm @@ -25,6 +25,7 @@ (define-module (guix build gnu-bootstrap) #:use-module (guix build utils) + #:use-module (srfi srfi-1) #:use-module (system base compile) #:export (bootstrap-configure bootstrap-build @@ -32,7 +33,7 @@ (define-module (guix build gnu-bootstrap) (define (bootstrap-configure name version modules scripts) "Create a procedure that configures an early bootstrap package. The -procedure will search the MODULES directory and configure all of the +procedure will search each directory in MODULES and configure all of the '.in' files with NAME and VERSION. It will then search the SCRIPTS directory and configure all of the '.in' files with the bootstrap Guile and its module and object directories." @@ -52,9 +53,8 @@ (define (bootstrap-configure name version modules scripts) (substitute* target (("@PACKAGE_NAME@") name) (("@VERSION@") version)))) - (find-files modules - (lambda (fn st) - (string-suffix? ".in" fn)))) + (append-map (lambda (dir) (find-files dir "\\.in$")) + modules)) (for-each (lambda (template) (format #t "Configuring ~a~%" template) (let ((target (string-drop-right template 3))) @@ -71,7 +71,7 @@ (define (bootstrap-configure name version modules scripts) (define (bootstrap-build modules) "Create a procedure that builds an early bootstrap package. The -procedure will search the MODULES directory and compile all of the +procedure will search each directory in MODULES and compile all of the '.scm' files." (lambda _ (add-to-load-path (getcwd)) @@ -81,13 +81,15 @@ (define (bootstrap-build modules) (dir (dirname scm))) (format #t "Compiling ~a~%" scm) (compile-file scm #:output-file go))) - (find-files modules "\\.scm$")) + (append-map (lambda (dir) (find-files dir "\\.scm$")) + modules)) #t)) (define (bootstrap-install modules scripts) "Create a procedure that installs an early bootstrap package. The -procedure will install all of the '.scm' and '.go' files in the MODULES -directory, and all the executable files in the SCRIPTS directory." +procedure will install all of the '.scm' and '.go' files in each of the +directories in MODULES, and all the executable files in the SCRIPTS +directory." (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (guile-dir (assoc-ref inputs "guile")) @@ -105,7 +107,8 @@ (define (bootstrap-install modules scripts) (install-file scm (string-append moddir "/" dir)) (format #t "Installing ~a~%" go) (install-file go (string-append godir "/" dir)))) - (find-files modules "\\.scm$")) + (append-map (lambda (dir) (find-files dir "\\.scm$")) + modules)) (for-each (lambda (script) (format #t "Installing ~a~%" script) (install-file script (string-append out "/bin"))) -- 2.34.0