From patchwork Mon Mar 14 22:57:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Timothy Sample X-Patchwork-Id: 37819 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 8995327BBEA; Mon, 14 Mar 2022 22:58: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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 1378227BBE9 for ; Mon, 14 Mar 2022 22:58:13 +0000 (GMT) Received: from localhost ([::1]:51574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTtdk-0007JC-77 for patchwork@mira.cbaines.net; Mon, 14 Mar 2022 18:58:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTtdb-0007GZ-8f for guix-patches@gnu.org; Mon, 14 Mar 2022 18:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52976) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTtda-0004vw-W1 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 1nTtda-00052o-SM for guix-patches@gnu.org; Mon, 14 Mar 2022 18:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54394] [PATCH core-updates 02/12] gnu-bootstrap: Configure PACKAGE_NAME. Resent-From: Timothy Sample Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Mar 2022 22:58:02 +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.164729867419352 (code B ref 54394); Mon, 14 Mar 2022 22:58:02 +0000 Received: (at 54394) by debbugs.gnu.org; 14 Mar 2022 22:57:54 +0000 Received: from localhost ([127.0.0.1]:46868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTtdS-000523-H5 for submit@debbugs.gnu.org; Mon, 14 Mar 2022 18:57:54 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:51467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTtdR-00051r-7G for 54394@debbugs.gnu.org; Mon, 14 Mar 2022 18:57:53 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 12AEB5C0236; Mon, 14 Mar 2022 18:57:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 14 Mar 2022 18:57:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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=CkKuR/Nj/cmDyIAKBUX815fdWZfYxLzYKpddjM5j0 tk=; b=drNnWPZLrchYsZXYcukdGqXK5oX1nV6lmL/7JCWwwdVruWGtgTFrU4k8e 2AidG41tEU3q9bm+g6e6gtZWR8TTyxQ1pV85hv7KKrdYUOf1zg11XKM17Iwa8v9B UdQ+sLFteGYo0bxgWH/acyW9qwize8C+q1NwhOwiETfVDqRYnPFgOp6kZeyWRgob nUd3pP4gXt1r0imfox0Y+oDNwA+IokjiGUyBHd8J4STWUSiTnAXX8oKN5edefJaO LEugmz5hrhucWdoHQp0hcArn/ePjxZ3Ocq3vZeXVcR6T3Zd/2fKlSwsxYswWPdb5 5ZAJY0SNl2tvpiG3bSbRj7Vr4oWAw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddvledgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhggtgfgsehtke ertdertdejnecuhfhrohhmpefvihhmohhthhihucfurghmphhlvgcuoehsrghmphhlvght sehnghihrhhordgtohhmqeenucggtffrrghtthgvrhhnpeffheeltedvkefhffffkeeuve fhtdevueefueelgeektdfhleegteduteegteevueenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmphhlvghtsehnghihrhhordgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Mar 2022 18:57:47 -0400 (EDT) From: Timothy Sample Date: Mon, 14 Mar 2022 16:57:01 -0600 Message-Id: <20220314225712.19869-2-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 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" X-getmail-retrieved-from-mailbox: Patches * guix/build/gnu-bootstrap.scm (bootstrap-configure): Add a 'name' argument and use it to configure the PACKAGE_NAME variable. * gnu/packages/commencement.scm (bootar, gash-boot, gash-utils-boot): Use the new argument. --- gnu/packages/commencement.scm | 8 +++++--- guix/build/gnu-bootstrap.scm | 11 ++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 9090fbd44e..644db8cc58 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -120,7 +120,8 @@ (define bootar (guile (string-append guile-dir "/bin/guile"))) (invoke guile "--no-auto-compile" source) (chdir "bootar")))) - (replace 'configure (bootstrap-configure ,version "." "scripts")) + (replace 'configure (bootstrap-configure "Bootar" ,version + "." "scripts")) (replace 'build (bootstrap-build ".")) (replace 'install (bootstrap-install "." "scripts")))))) (inputs `(("guile" ,%bootstrap-guile))) @@ -156,7 +157,8 @@ (define gash-boot (use-modules (guix build gnu-bootstrap)) (modify-phases %standard-phases (replace 'configure - (bootstrap-configure ,(package-version gash) "gash" "scripts")) + (bootstrap-configure "Gash" ,(package-version gash) + "gash" "scripts")) (replace 'build (bootstrap-build "gash")) (replace 'install (bootstrap-install "gash" "scripts")) (add-after 'install 'install-symlinks @@ -219,7 +221,7 @@ (define gash-utils-boot (("@UTILITY@") "testb")) (delete-file "scripts/template.in"))) (replace 'configure - (bootstrap-configure ,(package-version gash-utils) + (bootstrap-configure "Gash-Utils" ,(package-version gash-utils) "gash" "scripts")) (replace 'build (bootstrap-build "gash")) (replace 'install (bootstrap-install "gash" "scripts")) diff --git a/guix/build/gnu-bootstrap.scm b/guix/build/gnu-bootstrap.scm index 1cb9dc5512..7ca6ae8458 100644 --- a/guix/build/gnu-bootstrap.scm +++ b/guix/build/gnu-bootstrap.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2020 Timothy Sample +;;; Copyright © 2020, 2022 Timothy Sample ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,12 +30,12 @@ (define-module (guix build gnu-bootstrap) bootstrap-build bootstrap-install)) -(define (bootstrap-configure version modules scripts) +(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 -'.in' files with 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." +'.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." (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (guile-dir (assoc-ref inputs "guile")) @@ -50,6 +50,7 @@ (define (bootstrap-configure version modules scripts) (let ((target (string-drop-right template 3))) (copy-file template target) (substitute* target + (("@PACKAGE_NAME@") name) (("@VERSION@") version)))) (find-files modules (lambda (fn st)