Github messages for voidlinux
 help / color / mirror / Atom feed
From: felix <felix@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] go: update to 1.22.0
Date: Thu, 08 Feb 2024 07:19:51 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-48598@inbox.vuxu.org> (raw)

[-- 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
+}

             reply	other threads:[~2024-02-08  6:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08  6:19 felix [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-48598@inbox.vuxu.org \
    --to=felix@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).