From patchwork Mon Feb 3 17:37:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Timothy Sample X-Patchwork-Id: 20073 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 BFEE5168B1; Mon, 3 Feb 2020 17:39:30 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 154DA168AF for ; Mon, 3 Feb 2020 17:39:26 +0000 (GMT) Received: from localhost ([::1]:45246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyfgz-0001sG-GX for patchwork@mira.cbaines.net; Mon, 03 Feb 2020 12:39:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36487) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyffj-0000o3-6L for guix-patches@gnu.org; Mon, 03 Feb 2020 12:38:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyfff-0003B6-Mi for guix-patches@gnu.org; Mon, 03 Feb 2020 12:38:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36211) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iyffe-00039H-Ar for guix-patches@gnu.org; Mon, 03 Feb 2020 12:38:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iyffe-00030l-78 for guix-patches@gnu.org; Mon, 03 Feb 2020 12:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38390] [bug #38390] Building bootstrap Gash and Gash-Utils References: <87tv6qoank.fsf@gnu.org> Resent-From: Timothy Sample Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Feb 2020 17:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38390 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 38390@debbugs.gnu.org, Jan Nieuwenhuizen Received: via spool by 38390-submit@debbugs.gnu.org id=B38390.158075144811536 (code B ref 38390); Mon, 03 Feb 2020 17:38:02 +0000 Received: (at 38390) by debbugs.gnu.org; 3 Feb 2020 17:37:28 +0000 Received: from localhost ([127.0.0.1]:42184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyfez-0002zt-L9 for submit@debbugs.gnu.org; Mon, 03 Feb 2020 12:37:28 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:39345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyfeq-0002zT-A2 for 38390@debbugs.gnu.org; Mon, 03 Feb 2020 12:37:20 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 76E56836; Mon, 3 Feb 2020 12:37:06 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 03 Feb 2020 12:37:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=sUWYqcl4iuqC7A4vP m5Mae9QeQDB6ceSsne79zwTIqk=; b=OojjtVEbwMveD42Wh1BUKD99v6N48IqSD RVIshpB+U3k7Puin8KVUyk3sCjfB1TH6zXaccY3VhkJNd6Wt8yWLCpq6Y6hgJ/6q RysuGdjnEzQ46BY9vYbmXsU1eM7wUUNui1mBZRIqVeWkXAuBmHp2sE6Lxm4pLUfZ d+9mG+oYuTI6zliy7vVEBP/dFwIgVuLt3Fr61x6HbL6G6M6OizpW6uGeyrtoeemT o1Yf70CbAtRQrcduKySdJYoJsqW998sLpkrgOjnVMkOt1H42mKGEQAVHZu1IZQW7 yLgCsrwoAkJWuELi58stvPJfZmA5b3rxy1X9QfN4A/N/kCOw275TA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrgeejgddutddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffjgfkfgggtgesmhdtreertderjeenucfhrhhomhepvfhimhhothhh hicuufgrmhhplhgvuceoshgrmhhplhgvthesnhhghihrohdrtghomheqnecuffhomhgrih hnpehgiidrihhtpdhgihhthhhusgdrtghomhdpnhhghihrohdrtghomhenucfkphepjeeg rdduudeirddukeeirdeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehsrghmphhlvghtsehnghihrhhordgtohhm X-ME-Proxy: Received: from mrblack (74-116-186-44.qc.dsl.ebox.net [74.116.186.44]) by mail.messagingengine.com (Postfix) with ESMTPA id 794FE3280063; Mon, 3 Feb 2020 12:37:05 -0500 (EST) From: Timothy Sample Date: Mon, 03 Feb 2020 12:37:04 -0500 In-Reply-To: Ludovic =?utf-8?q?Court=C3=A8s=27s?= message of "Sun\, 08 Dec 2019 23\:20\:11 +0100 \(8 weeks\, 18 hours\, 35 minutes ago\)" Message-ID: <87lfpj7etb.fsf@ngyro.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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 Hi Ludo, (CC’ing Jan and bug#38390.) We’re nearing a release for Gash-Utils, and while working on it I made some changes to how the bootstrap Gash and Gash-Utils are built (on the wip-bootstrap branch.) Jan suggested that we get your opinion on the changes, as you are behind the current '%bootstrap-guile+guild' approach. The very short story is that I found that the Scheme GZip code is being maintained and works out-of-the-box on Guile 2.0.9 [1]. This made me unsure about copying the code into Gash-Utils when maybe we could just use it as a dependency. Then, I realized that the library included a simple Tar reader, and wondered how simple a program could be that could handle 'tar xvf gash.tar.gz'. It turns out pretty simple! So I put the program and all its dependencies in an a-list with a little loop that writes them to disk, and made a self-extracting Scheme script that can unpack compressed tarballs [2]. [1] https://github.com/weinholt/compression [2] https://git.ngyro.com/bootar/ The other thing is that I always intended for Gash and Gash-Utils to be built with a loop calling “compile-file”. This avoids the need for “guild” which in turn avoids “bash” (AIUI). These patches update Gash-Utils, replace the binary “tar” with my self-extracting Scheme implementation, and replace “guild” with “compile-file”. I think this simplifies the bootstrap processes, and I really like getting rid of the references to “tar”, “bash”, and “xz” (even though they are needed for the bootstrap Guile, it feels nice to quarantine them there). WDYT? -- Tim From b363e2c3dfcf2906b181c0120e35f6b701455122 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Mon, 3 Feb 2020 11:46:25 -0500 Subject: [PATCH 3/3] Remove %bootstrap-guile+guild. * gnu/packages/commencement.scm (%bootstrap-guile+guild): Remove variable. --- gnu/packages/commencement.scm | 58 ----------------------------------- 1 file changed, 58 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 914b3f2a8d..b797af1585 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -86,64 +86,6 @@ ;;; ;;; Code: -(define %bootstrap-guile+guild - ;; This package combines %bootstrap-guile with guild, which is not included - ;; in %bootstrap-guile. Guild is needed to build gash-boot and - ;; gash-utils-boot because it is dependency of the Guile build system. - (package - (name "guile-bootstrap+guild") - (version "2.0") - (source (bootstrap-origin (package-source guile-2.0))) - (native-inputs `(("bash" ,(bootstrap-executable "bash" (%current-system))) - ("tar" ,(bootstrap-executable "tar" (%current-system))) - ("xz" ,(bootstrap-executable "xz" (%current-system))) - ("guile" ,%bootstrap-guile))) - (build-system trivial-build-system) - (arguments - `(#:guile ,%bootstrap-guile - #:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils)) - (let ((guile-source (assoc-ref %build-inputs "source")) - (bin (string-append (getcwd) "/bin")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz"))) - (mkdir-p bin) - (setenv "PATH" bin) - (with-directory-excursion bin - (copy-file tar "tar") - (copy-file xz "xz") - (setenv "PATH" bin)) - (let* ((out (assoc-ref %outputs "out")) - (out-bin (string-append out "/bin")) - (guile (assoc-ref %build-inputs "guile")) - (bash (assoc-ref %build-inputs "bash"))) - (mkdir-p out-bin) - (with-directory-excursion out-bin - (symlink (string-append guile "/bin/guile") - "guile") - (invoke "tar" "--strip-components=2" - "-xvf" guile-source - (string-append "guile-" - ,(package-version guile-2.0) - "/meta/guild.in")) - (copy-file "guild.in" "guild") - (substitute* "guild" - (("#!/bin/sh") (string-append "#! " bash)) - (("@installed_guile@") (string-append out-bin "/guile"))) - (chmod "guild" #o555))))))) - (synopsis "Bootstrap Guile plus Guild") - (description "Bootstrap Guile with added Guild") - (home-page #f) - (license (package-license guile-2.0)) - (native-search-paths - (list (search-path-specification - (variable "GUILE_LOAD_PATH") - (files '("share/guile/site/2.0"))) - (search-path-specification - (variable "GUILE_LOAD_COMPILED_PATH") - (files '("lib/guile/2.0/site-ccache"))))))) - (define (make-bootstrap-phases version scripts modules) "Create a form that modifies the standard GNU build phases so that they build simple Guile programs using only the bootstrap Guile. The -- 2.24.1