Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] go: update to 1.22.0
@ 2024-02-08  6:19 felix
  2024-02-08  6:52 ` [PR PATCH] [Updated] " felix
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: felix @ 2024-02-08  6:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

There is a new pull request by felix against master on the void-packages repository

https://github.com/felix/void-packages go
https://github.com/void-linux/void-packages/pull/48598

go: update to 1.22.0
This also includes a new dependency of go1.20-bootstrap.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (amd64-libc)

A patch file from https://github.com/void-linux/void-packages/pull/48598.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-go-48598.patch --]
[-- Type: text/x-diff, Size: 12181 bytes --]

From 1b6b8de3acca5832dd61658e2b5ae31459f70094 Mon Sep 17 00:00:00 2001
From: Felix Hanley <felix@userspace.com.au>
Date: Thu, 8 Feb 2024 17:15:09 +1100
Subject: [PATCH] go: update to 1.22.0

---
 srcpkgs/go/patches/fix-32bit-tests.patch |  13 --
 srcpkgs/go/patches/fix-musl-tests.patch  |  29 ----
 srcpkgs/go/patches/fix-tests.patch       | 171 -----------------------
 srcpkgs/go/template                      |   8 +-
 srcpkgs/go1.20-bootstrap/template        |  51 +++++++
 5 files changed, 55 insertions(+), 217 deletions(-)
 delete mode 100644 srcpkgs/go/patches/fix-32bit-tests.patch
 delete mode 100644 srcpkgs/go/patches/fix-musl-tests.patch
 delete mode 100644 srcpkgs/go/patches/fix-tests.patch
 create mode 100644 srcpkgs/go1.20-bootstrap/template

diff --git a/srcpkgs/go/patches/fix-32bit-tests.patch b/srcpkgs/go/patches/fix-32bit-tests.patch
deleted file mode 100644
index 7ee2df7187ec7..0000000000000
--- a/srcpkgs/go/patches/fix-32bit-tests.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Fixes go1.21 error on i686 -
-  runtime/cgo(.text): unknown symbol __stack_chk_fail_local in pcrel
-
---- a/go/src/cmd/go/script_test.go
-+++ b/go/src/cmd/go/script_test.go
-@@ -285,6 +285,7 @@ var extraEnvKeys = []string{
- 	"GO_TESTING_GOTOOLS", // for gccgo testing
- 	"GCCGO",              // for gccgo testing
- 	"GCCGOTOOLDIR",       // for gccgo testing
-+	"CGO_CFLAGS",         // for working around "unknown symbol __stack_chk_fail_local" error on x86
- }
- 
- // updateSum runs 'go mod tidy', 'go list -mod=mod -m all', or
diff --git a/srcpkgs/go/patches/fix-musl-tests.patch b/srcpkgs/go/patches/fix-musl-tests.patch
deleted file mode 100644
index 5b300f8e5ae2a..0000000000000
--- a/srcpkgs/go/patches/fix-musl-tests.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-These tests fail on musl because /proc/../status doesn't
-contain the "Groups" field, because musl lacks the getgroups() syscall.
-
---- a/go/src/cmd/cgo/internal/test/issue1435.go
-+++ b/go/src/cmd/cgo/internal/test/issue1435.go
-@@ -170,10 +170,6 @@ func test1435(t *testing.T) {
- 		{call: "Setgid(1)", fn: func() error { return syscall.Setgid(1) }, filter: "Gid:", expect: "\t1\t1\t1\t1"},
- 		{call: "Setgid(0)", fn: func() error { return syscall.Setgid(0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
- 
--		{call: "Setgroups([]int{0,1,2,3})", fn: func() error { return syscall.Setgroups([]int{0, 1, 2, 3}) }, filter: "Groups:", expect: "\t0 1 2 3"},
--		{call: "Setgroups(nil)", fn: func() error { return syscall.Setgroups(nil) }, filter: "Groups:", expect: ""},
--		{call: "Setgroups([]int{0})", fn: func() error { return syscall.Setgroups([]int{0}) }, filter: "Groups:", expect: "\t0"},
--
- 		{call: "Setregid(101,0)", fn: func() error { return syscall.Setregid(101, 0) }, filter: "Gid:", expect: "\t101\t0\t0\t0"},
- 		{call: "Setregid(0,102)", fn: func() error { return syscall.Setregid(0, 102) }, filter: "Gid:", expect: "\t0\t102\t102\t102"},
- 		{call: "Setregid(0,0)", fn: func() error { return syscall.Setregid(0, 0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
---- a/go/src/syscall/syscall_linux_test.go
-+++ b/go/src/syscall/syscall_linux_test.go
-@@ -533,10 +533,6 @@ func TestSetuidEtc(t *testing.T) {
- 		{call: "Setgid(1)", fn: func() error { return syscall.Setgid(1) }, filter: "Gid:", expect: "\t1\t1\t1\t1"},
- 		{call: "Setgid(0)", fn: func() error { return syscall.Setgid(0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
- 
--		{call: "Setgroups([]int{0,1,2,3})", fn: func() error { return syscall.Setgroups([]int{0, 1, 2, 3}) }, filter: "Groups:", expect: "\t0 1 2 3"},
--		{call: "Setgroups(nil)", fn: func() error { return syscall.Setgroups(nil) }, filter: "Groups:", expect: ""},
--		{call: "Setgroups([]int{0})", fn: func() error { return syscall.Setgroups([]int{0}) }, filter: "Groups:", expect: "\t0"},
--
- 		{call: "Setregid(101,0)", fn: func() error { return syscall.Setregid(101, 0) }, filter: "Gid:", expect: "\t101\t0\t0\t0"},
- 		{call: "Setregid(0,102)", fn: func() error { return syscall.Setregid(0, 102) }, filter: "Gid:", expect: "\t0\t102\t102\t102"},
- 		{call: "Setregid(0,0)", fn: func() error { return syscall.Setregid(0, 0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
diff --git a/srcpkgs/go/patches/fix-tests.patch b/srcpkgs/go/patches/fix-tests.patch
deleted file mode 100644
index c4e8397d33d56..0000000000000
--- a/srcpkgs/go/patches/fix-tests.patch
+++ /dev/null
@@ -1,171 +0,0 @@
-Inside user namespaces, if GID == OVERFLOWGID (65534), then
-chown won't work. https://github.com/golang/go/issues/42525
-
---- a/go/src/os/os_unix_test.go
-+++ b/go/src/os/os_unix_test.go
-@@ -7,7 +7,6 @@
- package os_test
- 
- import (
--	"internal/testenv"
- 	"io"
- 	. "os"
- 	"path/filepath"
-@@ -39,157 +38,6 @@ func checkUidGid(t *testing.T, path string, uid, gid int) {
- 	}
- }
- 
--func TestChown(t *testing.T) {
--	if runtime.GOOS == "wasip1" {
--		t.Skip("file ownership not supported on " + runtime.GOOS)
--	}
--	t.Parallel()
--
--	// Use TempDir() to make sure we're on a local file system,
--	// so that the group ids returned by Getgroups will be allowed
--	// on the file. On NFS, the Getgroups groups are
--	// basically useless.
--	f := newFile("TestChown", t)
--	defer Remove(f.Name())
--	defer f.Close()
--	dir, err := f.Stat()
--	if err != nil {
--		t.Fatalf("stat %s: %s", f.Name(), err)
--	}
--
--	// Can't change uid unless root, but can try
--	// changing the group id. First try our current group.
--	gid := Getgid()
--	t.Log("gid:", gid)
--	if err = Chown(f.Name(), -1, gid); err != nil {
--		t.Fatalf("chown %s -1 %d: %s", f.Name(), gid, err)
--	}
--	sys := dir.Sys().(*syscall.Stat_t)
--	checkUidGid(t, f.Name(), int(sys.Uid), gid)
--
--	// Then try all the auxiliary groups.
--	groups, err := Getgroups()
--	if err != nil {
--		t.Fatalf("getgroups: %s", err)
--	}
--	t.Log("groups: ", groups)
--	for _, g := range groups {
--		if err = Chown(f.Name(), -1, g); err != nil {
--			t.Fatalf("chown %s -1 %d: %s", f.Name(), g, err)
--		}
--		checkUidGid(t, f.Name(), int(sys.Uid), g)
--
--		// change back to gid to test fd.Chown
--		if err = f.Chown(-1, gid); err != nil {
--			t.Fatalf("fchown %s -1 %d: %s", f.Name(), gid, err)
--		}
--		checkUidGid(t, f.Name(), int(sys.Uid), gid)
--	}
--}
--
--func TestFileChown(t *testing.T) {
--	if runtime.GOOS == "wasip1" {
--		t.Skip("file ownership not supported on " + runtime.GOOS)
--	}
--	t.Parallel()
--
--	// Use TempDir() to make sure we're on a local file system,
--	// so that the group ids returned by Getgroups will be allowed
--	// on the file. On NFS, the Getgroups groups are
--	// basically useless.
--	f := newFile("TestFileChown", t)
--	defer Remove(f.Name())
--	defer f.Close()
--	dir, err := f.Stat()
--	if err != nil {
--		t.Fatalf("stat %s: %s", f.Name(), err)
--	}
--
--	// Can't change uid unless root, but can try
--	// changing the group id. First try our current group.
--	gid := Getgid()
--	t.Log("gid:", gid)
--	if err = f.Chown(-1, gid); err != nil {
--		t.Fatalf("fchown %s -1 %d: %s", f.Name(), gid, err)
--	}
--	sys := dir.Sys().(*syscall.Stat_t)
--	checkUidGid(t, f.Name(), int(sys.Uid), gid)
--
--	// Then try all the auxiliary groups.
--	groups, err := Getgroups()
--	if err != nil {
--		t.Fatalf("getgroups: %s", err)
--	}
--	t.Log("groups: ", groups)
--	for _, g := range groups {
--		if err = f.Chown(-1, g); err != nil {
--			t.Fatalf("fchown %s -1 %d: %s", f.Name(), g, err)
--		}
--		checkUidGid(t, f.Name(), int(sys.Uid), g)
--
--		// change back to gid to test fd.Chown
--		if err = f.Chown(-1, gid); err != nil {
--			t.Fatalf("fchown %s -1 %d: %s", f.Name(), gid, err)
--		}
--		checkUidGid(t, f.Name(), int(sys.Uid), gid)
--	}
--}
--
--func TestLchown(t *testing.T) {
--	testenv.MustHaveSymlink(t)
--	t.Parallel()
--
--	// Use TempDir() to make sure we're on a local file system,
--	// so that the group ids returned by Getgroups will be allowed
--	// on the file. On NFS, the Getgroups groups are
--	// basically useless.
--	f := newFile("TestLchown", t)
--	defer Remove(f.Name())
--	defer f.Close()
--	dir, err := f.Stat()
--	if err != nil {
--		t.Fatalf("stat %s: %s", f.Name(), err)
--	}
--
--	linkname := f.Name() + "2"
--	if err := Symlink(f.Name(), linkname); err != nil {
--		if runtime.GOOS == "android" && IsPermission(err) {
--			t.Skip("skipping test on Android; permission error creating symlink")
--		}
--		t.Fatalf("link %s -> %s: %v", f.Name(), linkname, err)
--	}
--	defer Remove(linkname)
--
--	// Can't change uid unless root, but can try
--	// changing the group id. First try our current group.
--	gid := Getgid()
--	t.Log("gid:", gid)
--	if err = Lchown(linkname, -1, gid); err != nil {
--		if err, ok := err.(*PathError); ok && err.Err == syscall.ENOSYS {
--			t.Skip("lchown is unavailable")
--		}
--		t.Fatalf("lchown %s -1 %d: %s", linkname, gid, err)
--	}
--	sys := dir.Sys().(*syscall.Stat_t)
--	checkUidGid(t, linkname, int(sys.Uid), gid)
--
--	// Then try all the auxiliary groups.
--	groups, err := Getgroups()
--	if err != nil {
--		t.Fatalf("getgroups: %s", err)
--	}
--	t.Log("groups: ", groups)
--	for _, g := range groups {
--		if err = Lchown(linkname, -1, g); err != nil {
--			t.Fatalf("lchown %s -1 %d: %s", linkname, g, err)
--		}
--		checkUidGid(t, linkname, int(sys.Uid), g)
--
--		// Check that link target's gid is unchanged.
--		checkUidGid(t, f.Name(), int(sys.Uid), int(sys.Gid))
--	}
--}
--
- // Issue 16919: Readdir must return a non-empty slice or an error.
- func TestReaddirRemoveRace(t *testing.T) {
- 	oldStat := *LstatP
diff --git a/srcpkgs/go/template b/srcpkgs/go/template
index a5892ddbaeefc..22bc5edbaba9e 100644
--- a/srcpkgs/go/template
+++ b/srcpkgs/go/template
@@ -1,10 +1,10 @@
 # Template file for 'go'
 pkgname=go
-version=1.21.5
+version=1.22.0
 revision=1
 create_wrksrc=yes
 build_wrksrc=go
-hostmakedepends="go1.17-bootstrap"
+hostmakedepends="go1.20-bootstrap"
 checkdepends="iana-etc clang gcc-fortran"
 short_desc="Go Programming Language"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
 homepage="https://go.dev/"
 changelog="https://go.dev/doc/devel/release.html"
 distfiles="https://go.dev/dl/go${version}.src.tar.gz"
-checksum=285cbbdf4b6e6e62ed58f370f3f6d8c30825d6e56c5853c66d3c23bcdb09db19
+checksum=4d196c3d41a0d6c1dfc64d04e3cc1f608b0c436bd87b7060ce3e23234e1f4d5c
 nostrip=yes
 noverifyrdeps=yes
 # on CI it tries to use `git submodule`, which is not part of chroot-git
@@ -60,7 +60,7 @@ do_build() {
 	# dependency
 	unset CGO_CXXFLAGS CGO_ENABLED # CGO_CFLAGS
 
-	export GOROOT_BOOTSTRAP="/usr/lib/go1.17.13"
+	export GOROOT_BOOTSTRAP="/usr/lib/go1.20.14"
 	export GOROOT=$PWD
 
 	cd "src"
diff --git a/srcpkgs/go1.20-bootstrap/template b/srcpkgs/go1.20-bootstrap/template
new file mode 100644
index 0000000000000..4a5ea6fc83751
--- /dev/null
+++ b/srcpkgs/go1.20-bootstrap/template
@@ -0,0 +1,51 @@
+# Template file for 'go1.20-bootstrap'
+pkgname=go1.20-bootstrap
+version=1.20.14
+revision=1
+archs="x86_64* i686* armv[67]l* aarch64* ppc64le*"
+short_desc="Go 1.17 (bootstrap compiler)"
+maintainer="Felix Hanley <felix@userspace.com.au>"
+license="BSD-3-Clause"
+homepage="https://golang.org"
+nostrip=yes
+noverifyrdeps=yes
+nocross=yes
+lib32disabled=yes
+repository=bootstrap
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	depends+=" gcompat"
+fi
+
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*)
+		_dist_arch="amd64"
+		checksum="ff445e48af27f93f66bd949ae060d97991c83e11289009d311f25426258f9c44"
+		;;
+	i686*)
+		_dist_arch="386"
+		checksum="9c0acad376b41292c6e9e5534e26d9432f92a214d6c40a7e4c024b0235cc30e8"
+		;;
+	arm*)
+		_dist_arch="armv6l"
+		checksum="803c112c0f14eb794af66e28ad477c2c3f5f4969fe2bed8d920fd2be4946c203"
+		;;
+	aarch64*)
+		_dist_arch="arm64"
+		checksum="2096507509a98782850d1f0669786c09727053e9fe3c92b03c0d96f48700282b"
+		;;
+	ppc64le*)
+		_dist_arch="ppc64le"
+		checksum="237b1da9b65629a9b0fcf1f3ca75b4c84ef55fca1fc3eadf1681da7bbcb2e9cd"
+		;;
+esac
+
+distfiles="https://dl.google.com/go/go${version}.linux-${_dist_arch}.tar.gz"
+
+do_install() {
+	vmkdir usr/lib/go${version}
+	vcopy bin usr/lib/go${version}
+	vcopy src usr/lib/go${version}
+	vcopy pkg usr/lib/go${version}
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] go: update to 1.22.0
  2024-02-08  6:19 [PR PATCH] go: update to 1.22.0 felix
@ 2024-02-08  6:52 ` felix
  2024-02-08 22:00 ` felix
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: felix @ 2024-02-08  6:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

There is an updated pull request by felix against master on the void-packages repository

https://github.com/felix/void-packages go
https://github.com/void-linux/void-packages/pull/48598

go: update to 1.22.0
This also includes a new dependency of go1.20-bootstrap.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (amd64-libc)

A patch file from https://github.com/void-linux/void-packages/pull/48598.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-go-48598.patch --]
[-- Type: text/x-diff, Size: 12181 bytes --]

From 6793c0a2c2256c2b23885288955cf9dcc5391d4c Mon Sep 17 00:00:00 2001
From: Felix Hanley <felix@userspace.com.au>
Date: Thu, 8 Feb 2024 17:15:09 +1100
Subject: [PATCH] go: update to 1.22.0

---
 srcpkgs/go/patches/fix-32bit-tests.patch |  13 --
 srcpkgs/go/patches/fix-musl-tests.patch  |  29 ----
 srcpkgs/go/patches/fix-tests.patch       | 171 -----------------------
 srcpkgs/go/template                      |   8 +-
 srcpkgs/go1.20-bootstrap/template        |  51 +++++++
 5 files changed, 55 insertions(+), 217 deletions(-)
 delete mode 100644 srcpkgs/go/patches/fix-32bit-tests.patch
 delete mode 100644 srcpkgs/go/patches/fix-musl-tests.patch
 delete mode 100644 srcpkgs/go/patches/fix-tests.patch
 create mode 100644 srcpkgs/go1.20-bootstrap/template

diff --git a/srcpkgs/go/patches/fix-32bit-tests.patch b/srcpkgs/go/patches/fix-32bit-tests.patch
deleted file mode 100644
index 7ee2df7187ec7..0000000000000
--- a/srcpkgs/go/patches/fix-32bit-tests.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Fixes go1.21 error on i686 -
-  runtime/cgo(.text): unknown symbol __stack_chk_fail_local in pcrel
-
---- a/go/src/cmd/go/script_test.go
-+++ b/go/src/cmd/go/script_test.go
-@@ -285,6 +285,7 @@ var extraEnvKeys = []string{
- 	"GO_TESTING_GOTOOLS", // for gccgo testing
- 	"GCCGO",              // for gccgo testing
- 	"GCCGOTOOLDIR",       // for gccgo testing
-+	"CGO_CFLAGS",         // for working around "unknown symbol __stack_chk_fail_local" error on x86
- }
- 
- // updateSum runs 'go mod tidy', 'go list -mod=mod -m all', or
diff --git a/srcpkgs/go/patches/fix-musl-tests.patch b/srcpkgs/go/patches/fix-musl-tests.patch
deleted file mode 100644
index 5b300f8e5ae2a..0000000000000
--- a/srcpkgs/go/patches/fix-musl-tests.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-These tests fail on musl because /proc/../status doesn't
-contain the "Groups" field, because musl lacks the getgroups() syscall.
-
---- a/go/src/cmd/cgo/internal/test/issue1435.go
-+++ b/go/src/cmd/cgo/internal/test/issue1435.go
-@@ -170,10 +170,6 @@ func test1435(t *testing.T) {
- 		{call: "Setgid(1)", fn: func() error { return syscall.Setgid(1) }, filter: "Gid:", expect: "\t1\t1\t1\t1"},
- 		{call: "Setgid(0)", fn: func() error { return syscall.Setgid(0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
- 
--		{call: "Setgroups([]int{0,1,2,3})", fn: func() error { return syscall.Setgroups([]int{0, 1, 2, 3}) }, filter: "Groups:", expect: "\t0 1 2 3"},
--		{call: "Setgroups(nil)", fn: func() error { return syscall.Setgroups(nil) }, filter: "Groups:", expect: ""},
--		{call: "Setgroups([]int{0})", fn: func() error { return syscall.Setgroups([]int{0}) }, filter: "Groups:", expect: "\t0"},
--
- 		{call: "Setregid(101,0)", fn: func() error { return syscall.Setregid(101, 0) }, filter: "Gid:", expect: "\t101\t0\t0\t0"},
- 		{call: "Setregid(0,102)", fn: func() error { return syscall.Setregid(0, 102) }, filter: "Gid:", expect: "\t0\t102\t102\t102"},
- 		{call: "Setregid(0,0)", fn: func() error { return syscall.Setregid(0, 0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
---- a/go/src/syscall/syscall_linux_test.go
-+++ b/go/src/syscall/syscall_linux_test.go
-@@ -533,10 +533,6 @@ func TestSetuidEtc(t *testing.T) {
- 		{call: "Setgid(1)", fn: func() error { return syscall.Setgid(1) }, filter: "Gid:", expect: "\t1\t1\t1\t1"},
- 		{call: "Setgid(0)", fn: func() error { return syscall.Setgid(0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
- 
--		{call: "Setgroups([]int{0,1,2,3})", fn: func() error { return syscall.Setgroups([]int{0, 1, 2, 3}) }, filter: "Groups:", expect: "\t0 1 2 3"},
--		{call: "Setgroups(nil)", fn: func() error { return syscall.Setgroups(nil) }, filter: "Groups:", expect: ""},
--		{call: "Setgroups([]int{0})", fn: func() error { return syscall.Setgroups([]int{0}) }, filter: "Groups:", expect: "\t0"},
--
- 		{call: "Setregid(101,0)", fn: func() error { return syscall.Setregid(101, 0) }, filter: "Gid:", expect: "\t101\t0\t0\t0"},
- 		{call: "Setregid(0,102)", fn: func() error { return syscall.Setregid(0, 102) }, filter: "Gid:", expect: "\t0\t102\t102\t102"},
- 		{call: "Setregid(0,0)", fn: func() error { return syscall.Setregid(0, 0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
diff --git a/srcpkgs/go/patches/fix-tests.patch b/srcpkgs/go/patches/fix-tests.patch
deleted file mode 100644
index c4e8397d33d56..0000000000000
--- a/srcpkgs/go/patches/fix-tests.patch
+++ /dev/null
@@ -1,171 +0,0 @@
-Inside user namespaces, if GID == OVERFLOWGID (65534), then
-chown won't work. https://github.com/golang/go/issues/42525
-
---- a/go/src/os/os_unix_test.go
-+++ b/go/src/os/os_unix_test.go
-@@ -7,7 +7,6 @@
- package os_test
- 
- import (
--	"internal/testenv"
- 	"io"
- 	. "os"
- 	"path/filepath"
-@@ -39,157 +38,6 @@ func checkUidGid(t *testing.T, path string, uid, gid int) {
- 	}
- }
- 
--func TestChown(t *testing.T) {
--	if runtime.GOOS == "wasip1" {
--		t.Skip("file ownership not supported on " + runtime.GOOS)
--	}
--	t.Parallel()
--
--	// Use TempDir() to make sure we're on a local file system,
--	// so that the group ids returned by Getgroups will be allowed
--	// on the file. On NFS, the Getgroups groups are
--	// basically useless.
--	f := newFile("TestChown", t)
--	defer Remove(f.Name())
--	defer f.Close()
--	dir, err := f.Stat()
--	if err != nil {
--		t.Fatalf("stat %s: %s", f.Name(), err)
--	}
--
--	// Can't change uid unless root, but can try
--	// changing the group id. First try our current group.
--	gid := Getgid()
--	t.Log("gid:", gid)
--	if err = Chown(f.Name(), -1, gid); err != nil {
--		t.Fatalf("chown %s -1 %d: %s", f.Name(), gid, err)
--	}
--	sys := dir.Sys().(*syscall.Stat_t)
--	checkUidGid(t, f.Name(), int(sys.Uid), gid)
--
--	// Then try all the auxiliary groups.
--	groups, err := Getgroups()
--	if err != nil {
--		t.Fatalf("getgroups: %s", err)
--	}
--	t.Log("groups: ", groups)
--	for _, g := range groups {
--		if err = Chown(f.Name(), -1, g); err != nil {
--			t.Fatalf("chown %s -1 %d: %s", f.Name(), g, err)
--		}
--		checkUidGid(t, f.Name(), int(sys.Uid), g)
--
--		// change back to gid to test fd.Chown
--		if err = f.Chown(-1, gid); err != nil {
--			t.Fatalf("fchown %s -1 %d: %s", f.Name(), gid, err)
--		}
--		checkUidGid(t, f.Name(), int(sys.Uid), gid)
--	}
--}
--
--func TestFileChown(t *testing.T) {
--	if runtime.GOOS == "wasip1" {
--		t.Skip("file ownership not supported on " + runtime.GOOS)
--	}
--	t.Parallel()
--
--	// Use TempDir() to make sure we're on a local file system,
--	// so that the group ids returned by Getgroups will be allowed
--	// on the file. On NFS, the Getgroups groups are
--	// basically useless.
--	f := newFile("TestFileChown", t)
--	defer Remove(f.Name())
--	defer f.Close()
--	dir, err := f.Stat()
--	if err != nil {
--		t.Fatalf("stat %s: %s", f.Name(), err)
--	}
--
--	// Can't change uid unless root, but can try
--	// changing the group id. First try our current group.
--	gid := Getgid()
--	t.Log("gid:", gid)
--	if err = f.Chown(-1, gid); err != nil {
--		t.Fatalf("fchown %s -1 %d: %s", f.Name(), gid, err)
--	}
--	sys := dir.Sys().(*syscall.Stat_t)
--	checkUidGid(t, f.Name(), int(sys.Uid), gid)
--
--	// Then try all the auxiliary groups.
--	groups, err := Getgroups()
--	if err != nil {
--		t.Fatalf("getgroups: %s", err)
--	}
--	t.Log("groups: ", groups)
--	for _, g := range groups {
--		if err = f.Chown(-1, g); err != nil {
--			t.Fatalf("fchown %s -1 %d: %s", f.Name(), g, err)
--		}
--		checkUidGid(t, f.Name(), int(sys.Uid), g)
--
--		// change back to gid to test fd.Chown
--		if err = f.Chown(-1, gid); err != nil {
--			t.Fatalf("fchown %s -1 %d: %s", f.Name(), gid, err)
--		}
--		checkUidGid(t, f.Name(), int(sys.Uid), gid)
--	}
--}
--
--func TestLchown(t *testing.T) {
--	testenv.MustHaveSymlink(t)
--	t.Parallel()
--
--	// Use TempDir() to make sure we're on a local file system,
--	// so that the group ids returned by Getgroups will be allowed
--	// on the file. On NFS, the Getgroups groups are
--	// basically useless.
--	f := newFile("TestLchown", t)
--	defer Remove(f.Name())
--	defer f.Close()
--	dir, err := f.Stat()
--	if err != nil {
--		t.Fatalf("stat %s: %s", f.Name(), err)
--	}
--
--	linkname := f.Name() + "2"
--	if err := Symlink(f.Name(), linkname); err != nil {
--		if runtime.GOOS == "android" && IsPermission(err) {
--			t.Skip("skipping test on Android; permission error creating symlink")
--		}
--		t.Fatalf("link %s -> %s: %v", f.Name(), linkname, err)
--	}
--	defer Remove(linkname)
--
--	// Can't change uid unless root, but can try
--	// changing the group id. First try our current group.
--	gid := Getgid()
--	t.Log("gid:", gid)
--	if err = Lchown(linkname, -1, gid); err != nil {
--		if err, ok := err.(*PathError); ok && err.Err == syscall.ENOSYS {
--			t.Skip("lchown is unavailable")
--		}
--		t.Fatalf("lchown %s -1 %d: %s", linkname, gid, err)
--	}
--	sys := dir.Sys().(*syscall.Stat_t)
--	checkUidGid(t, linkname, int(sys.Uid), gid)
--
--	// Then try all the auxiliary groups.
--	groups, err := Getgroups()
--	if err != nil {
--		t.Fatalf("getgroups: %s", err)
--	}
--	t.Log("groups: ", groups)
--	for _, g := range groups {
--		if err = Lchown(linkname, -1, g); err != nil {
--			t.Fatalf("lchown %s -1 %d: %s", linkname, g, err)
--		}
--		checkUidGid(t, linkname, int(sys.Uid), g)
--
--		// Check that link target's gid is unchanged.
--		checkUidGid(t, f.Name(), int(sys.Uid), int(sys.Gid))
--	}
--}
--
- // Issue 16919: Readdir must return a non-empty slice or an error.
- func TestReaddirRemoveRace(t *testing.T) {
- 	oldStat := *LstatP
diff --git a/srcpkgs/go/template b/srcpkgs/go/template
index a5892ddbaeefc..22bc5edbaba9e 100644
--- a/srcpkgs/go/template
+++ b/srcpkgs/go/template
@@ -1,10 +1,10 @@
 # Template file for 'go'
 pkgname=go
-version=1.21.5
+version=1.22.0
 revision=1
 create_wrksrc=yes
 build_wrksrc=go
-hostmakedepends="go1.17-bootstrap"
+hostmakedepends="go1.20-bootstrap"
 checkdepends="iana-etc clang gcc-fortran"
 short_desc="Go Programming Language"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
 homepage="https://go.dev/"
 changelog="https://go.dev/doc/devel/release.html"
 distfiles="https://go.dev/dl/go${version}.src.tar.gz"
-checksum=285cbbdf4b6e6e62ed58f370f3f6d8c30825d6e56c5853c66d3c23bcdb09db19
+checksum=4d196c3d41a0d6c1dfc64d04e3cc1f608b0c436bd87b7060ce3e23234e1f4d5c
 nostrip=yes
 noverifyrdeps=yes
 # on CI it tries to use `git submodule`, which is not part of chroot-git
@@ -60,7 +60,7 @@ do_build() {
 	# dependency
 	unset CGO_CXXFLAGS CGO_ENABLED # CGO_CFLAGS
 
-	export GOROOT_BOOTSTRAP="/usr/lib/go1.17.13"
+	export GOROOT_BOOTSTRAP="/usr/lib/go1.20.14"
 	export GOROOT=$PWD
 
 	cd "src"
diff --git a/srcpkgs/go1.20-bootstrap/template b/srcpkgs/go1.20-bootstrap/template
new file mode 100644
index 0000000000000..37ef640065e36
--- /dev/null
+++ b/srcpkgs/go1.20-bootstrap/template
@@ -0,0 +1,51 @@
+# Template file for 'go1.20-bootstrap'
+pkgname=go1.20-bootstrap
+version=1.20.14
+revision=1
+archs="x86_64* i686* armv[67]l* aarch64* ppc64le*"
+short_desc="Go 1.20 (bootstrap compiler)"
+maintainer="Felix Hanley <felix@userspace.com.au>"
+license="BSD-3-Clause"
+homepage="https://golang.org"
+nostrip=yes
+noverifyrdeps=yes
+nocross=yes
+lib32disabled=yes
+repository=bootstrap
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	depends+=" gcompat"
+fi
+
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*)
+		_dist_arch="amd64"
+		checksum="ff445e48af27f93f66bd949ae060d97991c83e11289009d311f25426258f9c44"
+		;;
+	i686*)
+		_dist_arch="386"
+		checksum="9c0acad376b41292c6e9e5534e26d9432f92a214d6c40a7e4c024b0235cc30e8"
+		;;
+	arm*)
+		_dist_arch="armv6l"
+		checksum="803c112c0f14eb794af66e28ad477c2c3f5f4969fe2bed8d920fd2be4946c203"
+		;;
+	aarch64*)
+		_dist_arch="arm64"
+		checksum="2096507509a98782850d1f0669786c09727053e9fe3c92b03c0d96f48700282b"
+		;;
+	ppc64le*)
+		_dist_arch="ppc64le"
+		checksum="237b1da9b65629a9b0fcf1f3ca75b4c84ef55fca1fc3eadf1681da7bbcb2e9cd"
+		;;
+esac
+
+distfiles="https://dl.google.com/go/go${version}.linux-${_dist_arch}.tar.gz"
+
+do_install() {
+	vmkdir usr/lib/go${version}
+	vcopy bin usr/lib/go${version}
+	vcopy src usr/lib/go${version}
+	vcopy pkg usr/lib/go${version}
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: go: update to 1.22.0
  2024-02-08  6:19 [PR PATCH] go: update to 1.22.0 felix
  2024-02-08  6:52 ` [PR PATCH] [Updated] " felix
@ 2024-02-08 22:00 ` felix
  2024-02-12 15:07 ` leahneukirchen
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: felix @ 2024-02-08 22:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]

New comment by felix on void-packages repository

https://github.com/void-linux/void-packages/pull/48598#issuecomment-1935001092

Comment:
I will have to find some time to look at the musl ports. See here https://github.com/golang/go/issues/59305. Or suggestions welcome from those with time or musl know-how.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: go: update to 1.22.0
  2024-02-08  6:19 [PR PATCH] go: update to 1.22.0 felix
  2024-02-08  6:52 ` [PR PATCH] [Updated] " felix
  2024-02-08 22:00 ` felix
@ 2024-02-12 15:07 ` leahneukirchen
  2024-02-13  0:02 ` [PR PATCH] [Updated] " felix
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: leahneukirchen @ 2024-02-12 15:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/48598#issuecomment-1938856087

Comment:
Don't use Go 1.20 for bootstrapping, use 1.21 or 1.22, there the official binaries are statically linked and should run fine on musl.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] go: update to 1.22.0
  2024-02-08  6:19 [PR PATCH] go: update to 1.22.0 felix
                   ` (2 preceding siblings ...)
  2024-02-12 15:07 ` leahneukirchen
@ 2024-02-13  0:02 ` felix
  2024-02-13  0:21 ` felix
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: felix @ 2024-02-13  0:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

There is an updated pull request by felix against master on the void-packages repository

https://github.com/felix/void-packages go
https://github.com/void-linux/void-packages/pull/48598

go: update to 1.22.0
This also includes a new dependency of go1.20-bootstrap.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (amd64-libc)

A patch file from https://github.com/void-linux/void-packages/pull/48598.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-go-48598.patch --]
[-- Type: text/x-diff, Size: 12189 bytes --]

From c497958be4f48e4e9f3cf47f9b82b5fb991ff599 Mon Sep 17 00:00:00 2001
From: Felix Hanley <felix@userspace.com.au>
Date: Thu, 8 Feb 2024 17:15:09 +1100
Subject: [PATCH] go: update to 1.22.0

---
 srcpkgs/go/patches/fix-32bit-tests.patch |  13 --
 srcpkgs/go/patches/fix-musl-tests.patch  |  29 ----
 srcpkgs/go/patches/fix-tests.patch       | 171 -----------------------
 srcpkgs/go/template                      |   8 +-
 srcpkgs/go1.22-bootstrap/template        |  51 +++++++
 5 files changed, 55 insertions(+), 217 deletions(-)
 delete mode 100644 srcpkgs/go/patches/fix-32bit-tests.patch
 delete mode 100644 srcpkgs/go/patches/fix-musl-tests.patch
 delete mode 100644 srcpkgs/go/patches/fix-tests.patch
 create mode 100644 srcpkgs/go1.22-bootstrap/template

diff --git a/srcpkgs/go/patches/fix-32bit-tests.patch b/srcpkgs/go/patches/fix-32bit-tests.patch
deleted file mode 100644
index 7ee2df7187ec73..00000000000000
--- a/srcpkgs/go/patches/fix-32bit-tests.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Fixes go1.21 error on i686 -
-  runtime/cgo(.text): unknown symbol __stack_chk_fail_local in pcrel
-
---- a/go/src/cmd/go/script_test.go
-+++ b/go/src/cmd/go/script_test.go
-@@ -285,6 +285,7 @@ var extraEnvKeys = []string{
- 	"GO_TESTING_GOTOOLS", // for gccgo testing
- 	"GCCGO",              // for gccgo testing
- 	"GCCGOTOOLDIR",       // for gccgo testing
-+	"CGO_CFLAGS",         // for working around "unknown symbol __stack_chk_fail_local" error on x86
- }
- 
- // updateSum runs 'go mod tidy', 'go list -mod=mod -m all', or
diff --git a/srcpkgs/go/patches/fix-musl-tests.patch b/srcpkgs/go/patches/fix-musl-tests.patch
deleted file mode 100644
index 5b300f8e5ae2a1..00000000000000
--- a/srcpkgs/go/patches/fix-musl-tests.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-These tests fail on musl because /proc/../status doesn't
-contain the "Groups" field, because musl lacks the getgroups() syscall.
-
---- a/go/src/cmd/cgo/internal/test/issue1435.go
-+++ b/go/src/cmd/cgo/internal/test/issue1435.go
-@@ -170,10 +170,6 @@ func test1435(t *testing.T) {
- 		{call: "Setgid(1)", fn: func() error { return syscall.Setgid(1) }, filter: "Gid:", expect: "\t1\t1\t1\t1"},
- 		{call: "Setgid(0)", fn: func() error { return syscall.Setgid(0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
- 
--		{call: "Setgroups([]int{0,1,2,3})", fn: func() error { return syscall.Setgroups([]int{0, 1, 2, 3}) }, filter: "Groups:", expect: "\t0 1 2 3"},
--		{call: "Setgroups(nil)", fn: func() error { return syscall.Setgroups(nil) }, filter: "Groups:", expect: ""},
--		{call: "Setgroups([]int{0})", fn: func() error { return syscall.Setgroups([]int{0}) }, filter: "Groups:", expect: "\t0"},
--
- 		{call: "Setregid(101,0)", fn: func() error { return syscall.Setregid(101, 0) }, filter: "Gid:", expect: "\t101\t0\t0\t0"},
- 		{call: "Setregid(0,102)", fn: func() error { return syscall.Setregid(0, 102) }, filter: "Gid:", expect: "\t0\t102\t102\t102"},
- 		{call: "Setregid(0,0)", fn: func() error { return syscall.Setregid(0, 0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
---- a/go/src/syscall/syscall_linux_test.go
-+++ b/go/src/syscall/syscall_linux_test.go
-@@ -533,10 +533,6 @@ func TestSetuidEtc(t *testing.T) {
- 		{call: "Setgid(1)", fn: func() error { return syscall.Setgid(1) }, filter: "Gid:", expect: "\t1\t1\t1\t1"},
- 		{call: "Setgid(0)", fn: func() error { return syscall.Setgid(0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
- 
--		{call: "Setgroups([]int{0,1,2,3})", fn: func() error { return syscall.Setgroups([]int{0, 1, 2, 3}) }, filter: "Groups:", expect: "\t0 1 2 3"},
--		{call: "Setgroups(nil)", fn: func() error { return syscall.Setgroups(nil) }, filter: "Groups:", expect: ""},
--		{call: "Setgroups([]int{0})", fn: func() error { return syscall.Setgroups([]int{0}) }, filter: "Groups:", expect: "\t0"},
--
- 		{call: "Setregid(101,0)", fn: func() error { return syscall.Setregid(101, 0) }, filter: "Gid:", expect: "\t101\t0\t0\t0"},
- 		{call: "Setregid(0,102)", fn: func() error { return syscall.Setregid(0, 102) }, filter: "Gid:", expect: "\t0\t102\t102\t102"},
- 		{call: "Setregid(0,0)", fn: func() error { return syscall.Setregid(0, 0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
diff --git a/srcpkgs/go/patches/fix-tests.patch b/srcpkgs/go/patches/fix-tests.patch
deleted file mode 100644
index c4e8397d33d56e..00000000000000
--- a/srcpkgs/go/patches/fix-tests.patch
+++ /dev/null
@@ -1,171 +0,0 @@
-Inside user namespaces, if GID == OVERFLOWGID (65534), then
-chown won't work. https://github.com/golang/go/issues/42525
-
---- a/go/src/os/os_unix_test.go
-+++ b/go/src/os/os_unix_test.go
-@@ -7,7 +7,6 @@
- package os_test
- 
- import (
--	"internal/testenv"
- 	"io"
- 	. "os"
- 	"path/filepath"
-@@ -39,157 +38,6 @@ func checkUidGid(t *testing.T, path string, uid, gid int) {
- 	}
- }
- 
--func TestChown(t *testing.T) {
--	if runtime.GOOS == "wasip1" {
--		t.Skip("file ownership not supported on " + runtime.GOOS)
--	}
--	t.Parallel()
--
--	// Use TempDir() to make sure we're on a local file system,
--	// so that the group ids returned by Getgroups will be allowed
--	// on the file. On NFS, the Getgroups groups are
--	// basically useless.
--	f := newFile("TestChown", t)
--	defer Remove(f.Name())
--	defer f.Close()
--	dir, err := f.Stat()
--	if err != nil {
--		t.Fatalf("stat %s: %s", f.Name(), err)
--	}
--
--	// Can't change uid unless root, but can try
--	// changing the group id. First try our current group.
--	gid := Getgid()
--	t.Log("gid:", gid)
--	if err = Chown(f.Name(), -1, gid); err != nil {
--		t.Fatalf("chown %s -1 %d: %s", f.Name(), gid, err)
--	}
--	sys := dir.Sys().(*syscall.Stat_t)
--	checkUidGid(t, f.Name(), int(sys.Uid), gid)
--
--	// Then try all the auxiliary groups.
--	groups, err := Getgroups()
--	if err != nil {
--		t.Fatalf("getgroups: %s", err)
--	}
--	t.Log("groups: ", groups)
--	for _, g := range groups {
--		if err = Chown(f.Name(), -1, g); err != nil {
--			t.Fatalf("chown %s -1 %d: %s", f.Name(), g, err)
--		}
--		checkUidGid(t, f.Name(), int(sys.Uid), g)
--
--		// change back to gid to test fd.Chown
--		if err = f.Chown(-1, gid); err != nil {
--			t.Fatalf("fchown %s -1 %d: %s", f.Name(), gid, err)
--		}
--		checkUidGid(t, f.Name(), int(sys.Uid), gid)
--	}
--}
--
--func TestFileChown(t *testing.T) {
--	if runtime.GOOS == "wasip1" {
--		t.Skip("file ownership not supported on " + runtime.GOOS)
--	}
--	t.Parallel()
--
--	// Use TempDir() to make sure we're on a local file system,
--	// so that the group ids returned by Getgroups will be allowed
--	// on the file. On NFS, the Getgroups groups are
--	// basically useless.
--	f := newFile("TestFileChown", t)
--	defer Remove(f.Name())
--	defer f.Close()
--	dir, err := f.Stat()
--	if err != nil {
--		t.Fatalf("stat %s: %s", f.Name(), err)
--	}
--
--	// Can't change uid unless root, but can try
--	// changing the group id. First try our current group.
--	gid := Getgid()
--	t.Log("gid:", gid)
--	if err = f.Chown(-1, gid); err != nil {
--		t.Fatalf("fchown %s -1 %d: %s", f.Name(), gid, err)
--	}
--	sys := dir.Sys().(*syscall.Stat_t)
--	checkUidGid(t, f.Name(), int(sys.Uid), gid)
--
--	// Then try all the auxiliary groups.
--	groups, err := Getgroups()
--	if err != nil {
--		t.Fatalf("getgroups: %s", err)
--	}
--	t.Log("groups: ", groups)
--	for _, g := range groups {
--		if err = f.Chown(-1, g); err != nil {
--			t.Fatalf("fchown %s -1 %d: %s", f.Name(), g, err)
--		}
--		checkUidGid(t, f.Name(), int(sys.Uid), g)
--
--		// change back to gid to test fd.Chown
--		if err = f.Chown(-1, gid); err != nil {
--			t.Fatalf("fchown %s -1 %d: %s", f.Name(), gid, err)
--		}
--		checkUidGid(t, f.Name(), int(sys.Uid), gid)
--	}
--}
--
--func TestLchown(t *testing.T) {
--	testenv.MustHaveSymlink(t)
--	t.Parallel()
--
--	// Use TempDir() to make sure we're on a local file system,
--	// so that the group ids returned by Getgroups will be allowed
--	// on the file. On NFS, the Getgroups groups are
--	// basically useless.
--	f := newFile("TestLchown", t)
--	defer Remove(f.Name())
--	defer f.Close()
--	dir, err := f.Stat()
--	if err != nil {
--		t.Fatalf("stat %s: %s", f.Name(), err)
--	}
--
--	linkname := f.Name() + "2"
--	if err := Symlink(f.Name(), linkname); err != nil {
--		if runtime.GOOS == "android" && IsPermission(err) {
--			t.Skip("skipping test on Android; permission error creating symlink")
--		}
--		t.Fatalf("link %s -> %s: %v", f.Name(), linkname, err)
--	}
--	defer Remove(linkname)
--
--	// Can't change uid unless root, but can try
--	// changing the group id. First try our current group.
--	gid := Getgid()
--	t.Log("gid:", gid)
--	if err = Lchown(linkname, -1, gid); err != nil {
--		if err, ok := err.(*PathError); ok && err.Err == syscall.ENOSYS {
--			t.Skip("lchown is unavailable")
--		}
--		t.Fatalf("lchown %s -1 %d: %s", linkname, gid, err)
--	}
--	sys := dir.Sys().(*syscall.Stat_t)
--	checkUidGid(t, linkname, int(sys.Uid), gid)
--
--	// Then try all the auxiliary groups.
--	groups, err := Getgroups()
--	if err != nil {
--		t.Fatalf("getgroups: %s", err)
--	}
--	t.Log("groups: ", groups)
--	for _, g := range groups {
--		if err = Lchown(linkname, -1, g); err != nil {
--			t.Fatalf("lchown %s -1 %d: %s", linkname, g, err)
--		}
--		checkUidGid(t, linkname, int(sys.Uid), g)
--
--		// Check that link target's gid is unchanged.
--		checkUidGid(t, f.Name(), int(sys.Uid), int(sys.Gid))
--	}
--}
--
- // Issue 16919: Readdir must return a non-empty slice or an error.
- func TestReaddirRemoveRace(t *testing.T) {
- 	oldStat := *LstatP
diff --git a/srcpkgs/go/template b/srcpkgs/go/template
index a5892ddbaeefc6..d043e6ce4296dc 100644
--- a/srcpkgs/go/template
+++ b/srcpkgs/go/template
@@ -1,10 +1,10 @@
 # Template file for 'go'
 pkgname=go
-version=1.21.5
+version=1.22.0
 revision=1
 create_wrksrc=yes
 build_wrksrc=go
-hostmakedepends="go1.17-bootstrap"
+hostmakedepends="go1.22-bootstrap"
 checkdepends="iana-etc clang gcc-fortran"
 short_desc="Go Programming Language"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
 homepage="https://go.dev/"
 changelog="https://go.dev/doc/devel/release.html"
 distfiles="https://go.dev/dl/go${version}.src.tar.gz"
-checksum=285cbbdf4b6e6e62ed58f370f3f6d8c30825d6e56c5853c66d3c23bcdb09db19
+checksum=4d196c3d41a0d6c1dfc64d04e3cc1f608b0c436bd87b7060ce3e23234e1f4d5c
 nostrip=yes
 noverifyrdeps=yes
 # on CI it tries to use `git submodule`, which is not part of chroot-git
@@ -60,7 +60,7 @@ do_build() {
 	# dependency
 	unset CGO_CXXFLAGS CGO_ENABLED # CGO_CFLAGS
 
-	export GOROOT_BOOTSTRAP="/usr/lib/go1.17.13"
+	export GOROOT_BOOTSTRAP="/usr/lib/go1.22.0"
 	export GOROOT=$PWD
 
 	cd "src"
diff --git a/srcpkgs/go1.22-bootstrap/template b/srcpkgs/go1.22-bootstrap/template
new file mode 100644
index 00000000000000..eaca78a1f7b881
--- /dev/null
+++ b/srcpkgs/go1.22-bootstrap/template
@@ -0,0 +1,51 @@
+# Template file for 'go1.22-bootstrap'
+pkgname=go1.22-bootstrap
+version=1.22.0
+revision=1
+archs="x86_64* i686* armv[67]l* aarch64* ppc64le*"
+short_desc="Go 1.22 (bootstrap compiler)"
+maintainer="Felix Hanley <felix@userspace.com.au>"
+license="BSD-3-Clause"
+homepage="https://golang.org"
+nostrip=yes
+noverifyrdeps=yes
+nocross=yes
+lib32disabled=yes
+repository=bootstrap
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+	depends+=" gcompat"
+fi
+
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*)
+		_dist_arch="amd64"
+		checksum="f6c8a87aa03b92c4b0bf3d558e28ea03006eb29db78917daec5cfb6ec1046265"
+		;;
+	i686*)
+		_dist_arch="386"
+		checksum="1e209c4abde069067ac9afb341c8003db6a210f8173c77777f02d3a524313da3"
+		;;
+	arm*)
+		_dist_arch="armv6l"
+		checksum="0525f92f79df7ed5877147bce7b955f159f3962711b69faac66bc7121d36dcc4"
+		;;
+	aarch64*)
+		_dist_arch="arm64"
+		checksum="6a63fef0e050146f275bf02a0896badfe77c11b6f05499bb647e7bd613a45a10"
+		;;
+	ppc64le*)
+		_dist_arch="ppc64le"
+		checksum="0e57f421df9449066f00155ce98a5be93744b3d81b00ee4c2c9b511be2a31d93"
+		;;
+esac
+
+distfiles="https://dl.google.com/go/go${version}.linux-${_dist_arch}.tar.gz"
+
+do_install() {
+	vmkdir usr/lib/go${version}
+	vcopy bin usr/lib/go${version}
+	vcopy src usr/lib/go${version}
+	vcopy pkg usr/lib/go${version}
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: go: update to 1.22.0
  2024-02-08  6:19 [PR PATCH] go: update to 1.22.0 felix
                   ` (3 preceding siblings ...)
  2024-02-13  0:02 ` [PR PATCH] [Updated] " felix
@ 2024-02-13  0:21 ` felix
  2024-02-20  4:55 ` [PR REVIEW] " classabbyamp
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: felix @ 2024-02-13  0:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

New comment by felix on void-packages repository

https://github.com/void-linux/void-packages/pull/48598#issuecomment-1939862185

Comment:
> Don't use Go 1.20 for bootstrapping, use 1.21 or 1.22, there the official binaries are statically linked and should run fine on musl.

Thanks, I didn't realise things had changed.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR REVIEW] go: update to 1.22.0
  2024-02-08  6:19 [PR PATCH] go: update to 1.22.0 felix
                   ` (4 preceding siblings ...)
  2024-02-13  0:21 ` felix
@ 2024-02-20  4:55 ` classabbyamp
  2024-02-20 12:19 ` leahneukirchen
  2024-02-24  7:04 ` [PR PATCH] [Merged]: " classabbyamp
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2024-02-20  4:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/48598#discussion_r1495242937

Comment:
does it make sense to make this `go1.22` (`go${version%.*}`) so the main template doesn't have to change if the bootstrap is changed?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR REVIEW] go: update to 1.22.0
  2024-02-08  6:19 [PR PATCH] go: update to 1.22.0 felix
                   ` (5 preceding siblings ...)
  2024-02-20  4:55 ` [PR REVIEW] " classabbyamp
@ 2024-02-20 12:19 ` leahneukirchen
  2024-02-24  7:04 ` [PR PATCH] [Merged]: " classabbyamp
  7 siblings, 0 replies; 9+ messages in thread
From: leahneukirchen @ 2024-02-20 12:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

New review comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/48598#discussion_r1495725499

Comment:
Yes, but there's also no good reason to update the bootstrap I think (unless a serious miscompilation is detected).

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Merged]: go: update to 1.22.0
  2024-02-08  6:19 [PR PATCH] go: update to 1.22.0 felix
                   ` (6 preceding siblings ...)
  2024-02-20 12:19 ` leahneukirchen
@ 2024-02-24  7:04 ` classabbyamp
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2024-02-24  7:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 382 bytes --]

There's a merged pull request on the void-packages repository

go: update to 1.22.0
https://github.com/void-linux/void-packages/pull/48598

Description:
This also includes a new dependency of go1.22-bootstrap.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (amd64-libc)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-02-24  7:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08  6:19 [PR PATCH] go: update to 1.22.0 felix
2024-02-08  6:52 ` [PR PATCH] [Updated] " felix
2024-02-08 22:00 ` felix
2024-02-12 15:07 ` leahneukirchen
2024-02-13  0:02 ` [PR PATCH] [Updated] " felix
2024-02-13  0:21 ` felix
2024-02-20  4:55 ` [PR REVIEW] " classabbyamp
2024-02-20 12:19 ` leahneukirchen
2024-02-24  7:04 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).