commit c7d348b

hovercats  ·  2024-05-02 16:38:12 +0000 UTC
parent 2f8d7bf
go-bootstrap: make patch more consistent
4 files changed,  +31, -20
+1, -1
1@@ -4,7 +4,7 @@
2 # This breaks Go.
3 :> nostrip
4 
5-patch -p1 < posix-build.patch
6+patch -p1 < 0001-use-POSIX-sh-and-remove-bashisms.patch
7 
8 export CC="${CC:-cc}"
9 export GOARCH=amd64
+1, -1
1@@ -1,4 +1,4 @@
2 fb555f6674734d4f36e88594f29aede488ff75a36f659b4eee08217183905f1a12
3 fab34f540e4ad83908f3c897053cb0d5529452f81fce530cec916aa7b9c6948b69
4 e38b036986f4969980664342af2e0b14c503bf4222b980f2bfdcb32fd62fde146d
5-b0663afc038518d8e67e5062205f436aa4dc511b5049910c41a6fe1a6e92f6ba88
6+d6a30ce78da0edd9c876236cb0f3b9a1d16003d81a307899d625c3d254130390ae
R repo/go-bootstrap/patches/posix-build.patch => repo/go-bootstrap/patches/0001-use-POSIX-sh-and-remove-bashisms.patch
+28, -17
 1@@ -1,35 +1,46 @@
 2-diff --git a/go1.20.6/src/make.bash b/go1.20.6/src/make.bash
 3-index c07f39b..7aefc11 100755
 4---- a/go1.20.6/src/make.bash
 5-+++ b/go1.20.6/src/make.bash
 6+From 0677e181c2e88f21c588933246beca6ac61e0db9 Mon Sep 17 00:00:00 2001
 7+From: hovercats <hovercatswithlasereyes@protonmail.com>
 8+Date: Thu, 2 May 2024 18:37:05 +0200
 9+Subject: [PATCH] use POSIX sh and remove bashisms
10+
11+---
12+ go1.17.13/src/make.bash       |  4 ++--
13+ go1.20.6/src/make.bash        |  4 ++--
14+ go1.4-bootstrap/src/make.bash | 10 +++++-----
15+ 3 files changed, 9 insertions(+), 9 deletions(-)
16+
17+diff --git a/go1.17.13/src/make.bash b/go1.17.13/src/make.bash
18+index 7986125a..9a770665 100755
19+--- a/go1.17.13/src/make.bash
20++++ b/go1.17.13/src/make.bash
21 @@ -1,4 +1,4 @@
22 -#!/usr/bin/env bash
23-+#!/usr/bin/env sh
24++#!/bin/sh
25  # Copyright 2009 The Go Authors. All rights reserved.
26  # Use of this source code is governed by a BSD-style
27  # license that can be found in the LICENSE file.
28-@@ -163,7 +163,7 @@ fi
29- export GOROOT_BOOTSTRAP
30+@@ -154,7 +154,7 @@ fi
31  
32+ export GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4}
33  export GOROOT="$(cd .. && pwd)"
34 -IFS=$'\n'; for go_exe in $(type -ap go); do
35 +for go_exe in $(command -v go); do
36  	if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then
37  		goroot=$(GOROOT='' GOOS='' GOARCH='' "$go_exe" env GOROOT)
38  		if [ "$goroot" != "$GOROOT" ]; then
39-diff --git a/go1.17.13/src/make.bash b/go1.17.13/src/make.bash
40-index 9acf079..2b18196 100755
41---- a/go1.17.13/src/make.bash
42-+++ b/go1.17.13/src/make.bash
43+diff --git a/go1.20.6/src/make.bash b/go1.20.6/src/make.bash
44+index c07f39bb..cc5c620d 100755
45+--- a/go1.20.6/src/make.bash
46++++ b/go1.20.6/src/make.bash
47 @@ -1,4 +1,4 @@
48 -#!/usr/bin/env bash
49-+#!/usr/bin/env sh
50++#!/bin/sh
51  # Copyright 2009 The Go Authors. All rights reserved.
52  # Use of this source code is governed by a BSD-style
53  # license that can be found in the LICENSE file.
54-@@ -154,7 +154,7 @@ fi
55+@@ -163,7 +163,7 @@ fi
56+ export GOROOT_BOOTSTRAP
57  
58- export GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4}
59  export GOROOT="$(cd .. && pwd)"
60 -IFS=$'\n'; for go_exe in $(type -ap go); do
61 +for go_exe in $(command -v go); do
62@@ -37,12 +48,12 @@ index 9acf079..2b18196 100755
63  		goroot=$(GOROOT='' GOOS='' GOARCH='' "$go_exe" env GOROOT)
64  		if [ "$goroot" != "$GOROOT" ]; then
65 diff --git a/go1.4-bootstrap/src/make.bash b/go1.4-bootstrap/src/make.bash
66-index 104c3ba..043d38a 100755
67+index 104c3ba5..043d38ac 100755
68 --- a/go1.4-bootstrap/src/make.bash
69 +++ b/go1.4-bootstrap/src/make.bash
70 @@ -1,4 +1,4 @@
71 -#!/usr/bin/env bash
72-+#!/usr/bin/env sh
73++#!/bin/sh
74  # Copyright 2009 The Go Authors. All rights reserved.
75  # Use of this source code is governed by a BSD-style
76  # license that can be found in the LICENSE file.
77@@ -80,5 +91,5 @@ index 104c3ba..043d38a 100755
78  fi
79  ${CC:-gcc} $mflag -O2 -Wall -Werror -o cmd/dist/dist -Icmd/dist "$DEFGOROOT" cmd/dist/*.c
80 -- 
81-2.36.1
82+2.44.0
83 
+1, -1
1@@ -1,4 +1,4 @@
2 https://golang.org/dl/go1.20.6.src.tar.gz go1.20.6
3 https://golang.org/dl/go1.17.13.src.tar.gz go1.17.13
4 https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz go1.4-bootstrap
5-patches/posix-build.patch
6+patches/0001-use-POSIX-sh-and-remove-bashisms.patch