Subject: [PATCH core-updates 4/6] DRAFT gnu: glibc-bootstrap: Update i586-gnu variant.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 15 Aug 2024 18:58:32 +0200

DRAFT: Change it when glibc-bootstrap tarball is uploaded somewhere.

‘glibc-stripped-2.39-i586-pc-gnu.tar.xz’ was built from x86_64-linux
from the previous commit with:

  ./pre-inst-env guix build --target=i586-pc-gnu \
     -e '((@@ (gnu packages make-bootstrap) %glibc-bootstrap-tarball))'

Fixes <https://issues.guix.gnu.org/72315>.

* gnu/packages/bootstrap.scm (%bootstrap-glibc): Update i586-gnu
variant.

Change-Id: I2d770e8001896059e1f27e50f7a4ddf15e4b5812
---
 gnu/packages/bootstrap.scm | 105 +++++++++++++++++++------------------
 1 file changed, 54 insertions(+), 51 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index a36bb289cd..e79fa36cb0 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2024 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2014, 2015, 2018, 2019 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2017, 2020, 2024 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2018, 2020, 2022 Jan (janneke) Nieuwenhuizen <[email-masked]>
@@ -37,7 +37,7 @@ (define-module (gnu packages bootstrap)
                 #:select (raw-derivation derivation-input derivation->output-path))
   #:use-module (guix utils)
   #:use-module ((guix build utils) #:select (elf-file?))
-  #:use-module ((guix gexp) #:select (lower-object))
+  #:use-module ((guix gexp) #:select (lower-object local-file))
   #:use-module (guix monads)
   #:use-module (guix memoization)
   #:use-module (guix i18n)
@@ -758,55 +758,58 @@ (define %bootstrap-glibc
     (inputs
      `(("tar" ,(bootstrap-executable "tar" (%current-system)))
        ("xz"  ,(bootstrap-executable "xz" (%current-system)))
-       ("tarball" ,(bootstrap-origin
-                    (origin
-                     (method url-fetch)
-                     (uri (map (cut string-append <> "/" (%current-system)
-                                    (match (%current-system)
-                                      ("armhf-linux"
-                                       "/20150101/glibc-2.20.tar.xz")
-                                      ("aarch64-linux"
-                                       "/20170217/glibc-2.25.tar.xz")
-                                      ("powerpc64le-linux"
-                                       "/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
-                                      ("i586-gnu"
-                                       "/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz")
-                                      ("powerpc-linux"
-                                       "/20200923/glibc-2.32.tar.xz")
-                                      ("riscv64-linux"
-                                       "/20210725/glibc-2.31.tar.xz")
-                                      (_
-                                       "/20131110/glibc-2.18.tar.xz")))
-                               %bootstrap-base-urls))
-                     (sha256
-                      (match (%current-system)
-                        ("x86_64-linux"
-                         (base32
-                          "0jlqrgavvnplj1b083s20jj9iddr4lzfvwybw5xrcis9spbfzk7v"))
-                        ("i686-linux"
-                         (base32
-                          "1hgrccw1zqdc7lvgivwa54d9l3zsim5pqm0dykxg0z522h6gr05w"))
-                        ("armhf-linux"
-                         (base32
-                          "18cmgvpllqfpn6khsmivqib7ys8ymnq0hdzi3qp24prik0ykz8gn"))
-                        ("aarch64-linux"
-                         (base32
-                          "07nx3x8598i2924rjnlrncg6rm61c9bmcczbbcpbx0fb742nvv5c"))
-                        ("powerpc64le-linux"
-                         (base32
-                          "1a1df6z8gkaq09md3jy94lixnh20599p58p0s856p10xwjaqr1iz"))
-                        ("riscv64-linux"
-                         (base32
-                          "0d9x80vm7ca1pd2whcmpm1h14zxpb58kqajlxlwffzm04xfsjnxm"))
-                        ("i586-gnu"
-                         (base32
-                          "14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952"))
-                        ("powerpc-linux"
-                         (base32
-                          "0smmssyjrlk5cvx49586smmk81gkwff0i6r91n4rir4jm6ba25sb"))
-                        ("mips64el-linux"
-                         (base32
-                          "0k97a3whzx3apsi9n2cbsrr79ad6lh00klxph9hw4fqyp1abkdsg")))))))))
+       ("tarball" ,(if (string=? (%current-system) "i586-gnu")
+                       (local-file
+                        (search-auxiliary-file "glibc-stripped-2.39-i586-pc-gnu.tar.xz"))
+                       (bootstrap-origin
+                        (origin
+                          (method url-fetch)
+                          (uri (map (cut string-append <> "/" (%current-system)
+                                         (match (%current-system)
+                                           ("armhf-linux"
+                                            "/20150101/glibc-2.20.tar.xz")
+                                           ("aarch64-linux"
+                                            "/20170217/glibc-2.25.tar.xz")
+                                           ("powerpc64le-linux"
+                                            "/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
+                                           ("i586-gnu"
+                                            "/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz")
+                                           ("powerpc-linux"
+                                            "/20200923/glibc-2.32.tar.xz")
+                                           ("riscv64-linux"
+                                            "/20210725/glibc-2.31.tar.xz")
+                                           (_
+                                            "/20131110/glibc-2.18.tar.xz")))
+                                    %bootstrap-base-urls))
+                          (sha256
+                           (match (%current-system)
+                             ("x86_64-linux"
+                              (base32
+                               "0jlqrgavvnplj1b083s20jj9iddr4lzfvwybw5xrcis9spbfzk7v"))
+                             ("i686-linux"
+                              (base32
+                               "1hgrccw1zqdc7lvgivwa54d9l3zsim5pqm0dykxg0z522h6gr05w"))
+                             ("armhf-linux"
+                              (base32
+                               "18cmgvpllqfpn6khsmivqib7ys8ymnq0hdzi3qp24prik0ykz8gn"))
+                             ("aarch64-linux"
+                              (base32
+                               "07nx3x8598i2924rjnlrncg6rm61c9bmcczbbcpbx0fb742nvv5c"))
+                             ("powerpc64le-linux"
+                              (base32
+                               "1a1df6z8gkaq09md3jy94lixnh20599p58p0s856p10xwjaqr1iz"))
+                             ("riscv64-linux"
+                              (base32
+                               "0d9x80vm7ca1pd2whcmpm1h14zxpb58kqajlxlwffzm04xfsjnxm"))
+                             ("i586-gnu"
+                              (base32
+                               "14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952"))
+                             ("powerpc-linux"
+                              (base32
+                               "0smmssyjrlk5cvx49586smmk81gkwff0i6r91n4rir4jm6ba25sb"))
+                             ("mips64el-linux"
+                              (base32
+                               "0k97a3whzx3apsi9n2cbsrr79ad6lh00klxph9hw4fqyp1abkdsg"))))))))))
     (synopsis "Bootstrap binaries and headers of the GNU C Library")
     (description synopsis)
     (home-page #f)
-- 
2.45.2