Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] go: update to 1.19, add tests
@ 2022-08-06  9:44 subnut
  2022-08-06  9:44 ` subnut
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: subnut @ 2022-08-06  9:44 UTC (permalink / raw)
  To: ml

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

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

https://github.com/subnut/void-packages go1.19
https://github.com/void-linux/void-packages/pull/38498

go: update to 1.19, add tests
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
<!--
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

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

From 5ba4d1caeae5e157b72d9459511e227c0f3252cc Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Sat, 6 Aug 2022 15:12:02 +0530
Subject: [PATCH] go: update to 1.19, add tests

---
 srcpkgs/go/template | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/go/template b/srcpkgs/go/template
index 2db64b795ed8..dba229f32fa7 100644
--- a/srcpkgs/go/template
+++ b/srcpkgs/go/template
@@ -1,17 +1,18 @@
 # Template file for 'go'
 pkgname=go
-version=1.18.3
+version=1.19
 revision=1
 create_wrksrc=yes
 build_wrksrc=go
 hostmakedepends="go1.12-bootstrap"
+checkdepends="clang gcc-fortran"
 short_desc="Go Programming Language"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 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=0012386ddcbb5f3350e407c679923811dbd283fcdc421724931614a842ecbc2d
+checksum=9419cc70dc5a2523f29a77053cafff658ed21ef3561d9b6b020280ebceab28b9
 nostrip=yes
 noverifyrdeps=yes
 
@@ -47,6 +48,10 @@ do_build() {
 	bash make.bash -v
 }
 
+do_check() {
+	./bin/go tool dist test -v -run '!^go_test:(os|cmd/link/internal/ld|net)$'
+}
+
 do_install() {
 	local bindir
 

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

* Re: go: update to 1.19, add tests
  2022-08-06  9:44 [PR PATCH] go: update to 1.19, add tests subnut
@ 2022-08-06  9:44 ` subnut
  2022-08-06  9:49 ` paper42
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: subnut @ 2022-08-06  9:44 UTC (permalink / raw)
  To: ml

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

New comment by subnut on void-packages repository

https://github.com/void-linux/void-packages/pull/38498#issuecomment-1207184409

Comment:
Please review @the-maldridge 

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

* Re: go: update to 1.19, add tests
  2022-08-06  9:44 [PR PATCH] go: update to 1.19, add tests subnut
  2022-08-06  9:44 ` subnut
@ 2022-08-06  9:49 ` paper42
  2022-08-06 11:04 ` [PR PATCH] [Updated] " subnut
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: paper42 @ 2022-08-06  9:49 UTC (permalink / raw)
  To: ml

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

New comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/38498#issuecomment-1207184952

Comment:
duplicate of #38474

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

* Re: [PR PATCH] [Updated] go: update to 1.19, add tests
  2022-08-06  9:44 [PR PATCH] go: update to 1.19, add tests subnut
  2022-08-06  9:44 ` subnut
  2022-08-06  9:49 ` paper42
@ 2022-08-06 11:04 ` subnut
  2022-08-06 11:11 ` subnut
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: subnut @ 2022-08-06 11:04 UTC (permalink / raw)
  To: ml

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

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

https://github.com/subnut/void-packages go1.19
https://github.com/void-linux/void-packages/pull/38498

go: update to 1.19, add tests
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
<!--
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

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

From eed49a318f5d7f3b88e57fa63532d4fc5ab29596 Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Sat, 6 Aug 2022 15:12:02 +0530
Subject: [PATCH] go: update to 1.19, add tests

A few tests need to be skipped, but otherwise tests run perfectly fine.
---
 srcpkgs/go/files/fix-musl-tests.patch | 13 +++++++++++++
 srcpkgs/go/template                   | 21 +++++++++++++++++++--
 2 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/go/files/fix-musl-tests.patch

diff --git a/srcpkgs/go/files/fix-musl-tests.patch b/srcpkgs/go/files/fix-musl-tests.patch
new file mode 100644
index 000000000000..7b35c5b0dcd3
--- /dev/null
+++ b/srcpkgs/go/files/fix-musl-tests.patch
@@ -0,0 +1,13 @@
+--- a/src/syscall/syscall_linux_test.go
++++ b/src/syscall/syscall_linux_test.go
+@@ -530,10 +530,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/template b/srcpkgs/go/template
index 2db64b795ed8..65b36190089d 100644
--- a/srcpkgs/go/template
+++ b/srcpkgs/go/template
@@ -1,17 +1,18 @@
 # Template file for 'go'
 pkgname=go
-version=1.18.3
+version=1.19
 revision=1
 create_wrksrc=yes
 build_wrksrc=go
 hostmakedepends="go1.12-bootstrap"
+checkdepends="clang gcc-fortran"
 short_desc="Go Programming Language"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 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=0012386ddcbb5f3350e407c679923811dbd283fcdc421724931614a842ecbc2d
+checksum=9419cc70dc5a2523f29a77053cafff658ed21ef3561d9b6b020280ebceab28b9
 nostrip=yes
 noverifyrdeps=yes
 
@@ -31,12 +32,24 @@ if [ "$CROSS_BUILD" ]; then
 	fi
 fi
 
+post_extract() {
+	if [ "$XBPS_LIBC" = musl ]; then
+		patch "$patch_args" <"${FILESDIR}/fix-musl-tests.patch"
+	fi
+}
+
 do_build() {
 	unset GCC CC CXX LD CFLAGS
 	# FIXME: work around leaking go build-style vars when built as a
 	# dependency
 	unset CGO_CXXFLAGS CGO_CFLAGS CGO_ENABLED
 
+	# Workaround for go-1.19 compilation error on i686
+	#   runtime/cgo(.text): unknown symbol __stack_chk_fail_local in pcrel
+	if [ "$_goarch" = 386 ]; then
+		export CGO_CFLAGS="-fno-stack-protector"
+	fi
+
 	export GOROOT_BOOTSTRAP="/usr/lib/go1.12"
 	export GOROOT=$PWD
 	export GOROOT_FINAL="/usr/lib/go"
@@ -47,6 +60,10 @@ do_build() {
 	bash make.bash -v
 }
 
+do_check() {
+	./bin/go tool dist test -v -run '!^go_test:(os|cmd/link/internal/ld|net)$'
+}
+
 do_install() {
 	local bindir
 

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

* Re: [PR PATCH] [Updated] go: update to 1.19, add tests
  2022-08-06  9:44 [PR PATCH] go: update to 1.19, add tests subnut
                   ` (2 preceding siblings ...)
  2022-08-06 11:04 ` [PR PATCH] [Updated] " subnut
@ 2022-08-06 11:11 ` subnut
  2022-08-06 11:18 ` subnut
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: subnut @ 2022-08-06 11:11 UTC (permalink / raw)
  To: ml

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

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

https://github.com/subnut/void-packages go1.19
https://github.com/void-linux/void-packages/pull/38498

go: update to 1.19, add tests
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
<!--
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

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

From 0e6f563e732299d28a43a6d365267a83f4a3a4d1 Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Sat, 6 Aug 2022 15:12:02 +0530
Subject: [PATCH] go: update to 1.19, add tests

A few tests need to be skipped, but otherwise tests run perfectly fine.
---
 srcpkgs/go/files/fix-musl-tests.patch | 13 +++++++++++++
 srcpkgs/go/template                   | 21 +++++++++++++++++++--
 2 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/go/files/fix-musl-tests.patch

diff --git a/srcpkgs/go/files/fix-musl-tests.patch b/srcpkgs/go/files/fix-musl-tests.patch
new file mode 100644
index 000000000000..6f19ba9a15e2
--- /dev/null
+++ b/srcpkgs/go/files/fix-musl-tests.patch
@@ -0,0 +1,13 @@
+--- a/go/src/syscall/syscall_linux_test.go
++++ b/go/src/syscall/syscall_linux_test.go
+@@ -530,10 +530,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/template b/srcpkgs/go/template
index 2db64b795ed8..65b36190089d 100644
--- a/srcpkgs/go/template
+++ b/srcpkgs/go/template
@@ -1,17 +1,18 @@
 # Template file for 'go'
 pkgname=go
-version=1.18.3
+version=1.19
 revision=1
 create_wrksrc=yes
 build_wrksrc=go
 hostmakedepends="go1.12-bootstrap"
+checkdepends="clang gcc-fortran"
 short_desc="Go Programming Language"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 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=0012386ddcbb5f3350e407c679923811dbd283fcdc421724931614a842ecbc2d
+checksum=9419cc70dc5a2523f29a77053cafff658ed21ef3561d9b6b020280ebceab28b9
 nostrip=yes
 noverifyrdeps=yes
 
@@ -31,12 +32,24 @@ if [ "$CROSS_BUILD" ]; then
 	fi
 fi
 
+post_extract() {
+	if [ "$XBPS_LIBC" = musl ]; then
+		patch "$patch_args" <"${FILESDIR}/fix-musl-tests.patch"
+	fi
+}
+
 do_build() {
 	unset GCC CC CXX LD CFLAGS
 	# FIXME: work around leaking go build-style vars when built as a
 	# dependency
 	unset CGO_CXXFLAGS CGO_CFLAGS CGO_ENABLED
 
+	# Workaround for go-1.19 compilation error on i686
+	#   runtime/cgo(.text): unknown symbol __stack_chk_fail_local in pcrel
+	if [ "$_goarch" = 386 ]; then
+		export CGO_CFLAGS="-fno-stack-protector"
+	fi
+
 	export GOROOT_BOOTSTRAP="/usr/lib/go1.12"
 	export GOROOT=$PWD
 	export GOROOT_FINAL="/usr/lib/go"
@@ -47,6 +60,10 @@ do_build() {
 	bash make.bash -v
 }
 
+do_check() {
+	./bin/go tool dist test -v -run '!^go_test:(os|cmd/link/internal/ld|net)$'
+}
+
 do_install() {
 	local bindir
 

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

* Re: [PR PATCH] [Updated] go: update to 1.19, add tests
  2022-08-06  9:44 [PR PATCH] go: update to 1.19, add tests subnut
                   ` (3 preceding siblings ...)
  2022-08-06 11:11 ` subnut
@ 2022-08-06 11:18 ` subnut
  2022-08-06 11:20 ` subnut
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: subnut @ 2022-08-06 11:18 UTC (permalink / raw)
  To: ml

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

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

https://github.com/subnut/void-packages go1.19
https://github.com/void-linux/void-packages/pull/38498

go: update to 1.19, add tests
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
<!--
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

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

From 39b379298c8d3bee285053d866ba365474bd1956 Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Sat, 6 Aug 2022 15:12:02 +0530
Subject: [PATCH] go: update to 1.19, add tests

A few tests need to be skipped, but otherwise tests run perfectly fine.
---
 srcpkgs/go/patches/fix-musl-tests.patch | 16 ++++++++++++++++
 srcpkgs/go/template                     | 21 +++++++++++++++++++--
 2 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/go/patches/fix-musl-tests.patch

diff --git a/srcpkgs/go/patches/fix-musl-tests.patch b/srcpkgs/go/patches/fix-musl-tests.patch
new file mode 100644
index 000000000000..0ae3a48aeb83
--- /dev/null
+++ b/srcpkgs/go/patches/fix-musl-tests.patch
@@ -0,0 +1,16 @@
+These tests fail on musl because /proc/../status doesn't contain the "Groups"
+field, because musl-libc lacks the getgroups() syscall.
+
+--- a/go/src/syscall/syscall_linux_test.go
++++ b/go/src/syscall/syscall_linux_test.go
+@@ -530,10 +530,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/template b/srcpkgs/go/template
index 2db64b795ed8..65b36190089d 100644
--- a/srcpkgs/go/template
+++ b/srcpkgs/go/template
@@ -1,17 +1,18 @@
 # Template file for 'go'
 pkgname=go
-version=1.18.3
+version=1.19
 revision=1
 create_wrksrc=yes
 build_wrksrc=go
 hostmakedepends="go1.12-bootstrap"
+checkdepends="clang gcc-fortran"
 short_desc="Go Programming Language"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 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=0012386ddcbb5f3350e407c679923811dbd283fcdc421724931614a842ecbc2d
+checksum=9419cc70dc5a2523f29a77053cafff658ed21ef3561d9b6b020280ebceab28b9
 nostrip=yes
 noverifyrdeps=yes
 
@@ -31,12 +32,24 @@ if [ "$CROSS_BUILD" ]; then
 	fi
 fi
 
+post_extract() {
+	if [ "$XBPS_LIBC" = musl ]; then
+		patch "$patch_args" <"${FILESDIR}/fix-musl-tests.patch"
+	fi
+}
+
 do_build() {
 	unset GCC CC CXX LD CFLAGS
 	# FIXME: work around leaking go build-style vars when built as a
 	# dependency
 	unset CGO_CXXFLAGS CGO_CFLAGS CGO_ENABLED
 
+	# Workaround for go-1.19 compilation error on i686
+	#   runtime/cgo(.text): unknown symbol __stack_chk_fail_local in pcrel
+	if [ "$_goarch" = 386 ]; then
+		export CGO_CFLAGS="-fno-stack-protector"
+	fi
+
 	export GOROOT_BOOTSTRAP="/usr/lib/go1.12"
 	export GOROOT=$PWD
 	export GOROOT_FINAL="/usr/lib/go"
@@ -47,6 +60,10 @@ do_build() {
 	bash make.bash -v
 }
 
+do_check() {
+	./bin/go tool dist test -v -run '!^go_test:(os|cmd/link/internal/ld|net)$'
+}
+
 do_install() {
 	local bindir
 

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

* Re: [PR PATCH] [Updated] go: update to 1.19, add tests
  2022-08-06  9:44 [PR PATCH] go: update to 1.19, add tests subnut
                   ` (4 preceding siblings ...)
  2022-08-06 11:18 ` subnut
@ 2022-08-06 11:20 ` subnut
  2022-08-06 14:57 ` [PR PATCH] [Closed]: " the-maldridge
  2022-08-06 21:39 ` 0x5c
  7 siblings, 0 replies; 10+ messages in thread
From: subnut @ 2022-08-06 11:20 UTC (permalink / raw)
  To: ml

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

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

https://github.com/subnut/void-packages go1.19
https://github.com/void-linux/void-packages/pull/38498

go: update to 1.19, add tests
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
<!--
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

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

From 3a5ae16d3436a44ee66e8dff1eb18fc1d132fc26 Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Sat, 6 Aug 2022 15:12:02 +0530
Subject: [PATCH] go: update to 1.19, add tests

A few tests need to be skipped, but otherwise tests run perfectly fine.
---
 srcpkgs/go/patches/fix-musl-tests.patch | 16 ++++++++++++++++
 srcpkgs/go/template                     | 15 +++++++++++++--
 2 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/go/patches/fix-musl-tests.patch

diff --git a/srcpkgs/go/patches/fix-musl-tests.patch b/srcpkgs/go/patches/fix-musl-tests.patch
new file mode 100644
index 000000000000..0ae3a48aeb83
--- /dev/null
+++ b/srcpkgs/go/patches/fix-musl-tests.patch
@@ -0,0 +1,16 @@
+These tests fail on musl because /proc/../status doesn't contain the "Groups"
+field, because musl-libc lacks the getgroups() syscall.
+
+--- a/go/src/syscall/syscall_linux_test.go
++++ b/go/src/syscall/syscall_linux_test.go
+@@ -530,10 +530,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/template b/srcpkgs/go/template
index 2db64b795ed8..0a356b840413 100644
--- a/srcpkgs/go/template
+++ b/srcpkgs/go/template
@@ -1,17 +1,18 @@
 # Template file for 'go'
 pkgname=go
-version=1.18.3
+version=1.19
 revision=1
 create_wrksrc=yes
 build_wrksrc=go
 hostmakedepends="go1.12-bootstrap"
+checkdepends="clang gcc-fortran"
 short_desc="Go Programming Language"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 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=0012386ddcbb5f3350e407c679923811dbd283fcdc421724931614a842ecbc2d
+checksum=9419cc70dc5a2523f29a77053cafff658ed21ef3561d9b6b020280ebceab28b9
 nostrip=yes
 noverifyrdeps=yes
 
@@ -37,6 +38,12 @@ do_build() {
 	# dependency
 	unset CGO_CXXFLAGS CGO_CFLAGS CGO_ENABLED
 
+	# Workaround for go-1.19 compilation error on i686
+	#   runtime/cgo(.text): unknown symbol __stack_chk_fail_local in pcrel
+	if [ "$_goarch" = 386 ]; then
+		export CGO_CFLAGS="-fno-stack-protector"
+	fi
+
 	export GOROOT_BOOTSTRAP="/usr/lib/go1.12"
 	export GOROOT=$PWD
 	export GOROOT_FINAL="/usr/lib/go"
@@ -47,6 +54,10 @@ do_build() {
 	bash make.bash -v
 }
 
+do_check() {
+	./bin/go tool dist test -v -run '!^go_test:(os|cmd/link/internal/ld|net)$'
+}
+
 do_install() {
 	local bindir
 

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

* Re: [PR PATCH] [Closed]: go: update to 1.19, add tests
  2022-08-06  9:44 [PR PATCH] go: update to 1.19, add tests subnut
                   ` (5 preceding siblings ...)
  2022-08-06 11:20 ` subnut
@ 2022-08-06 14:57 ` the-maldridge
  2022-08-06 21:39 ` 0x5c
  7 siblings, 0 replies; 10+ messages in thread
From: the-maldridge @ 2022-08-06 14:57 UTC (permalink / raw)
  To: ml

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

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

go: update to 1.19, add tests
https://github.com/void-linux/void-packages/pull/38498

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
<!--
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

* Re: go: update to 1.19, add tests
  2022-08-06  9:44 [PR PATCH] go: update to 1.19, add tests subnut
                   ` (6 preceding siblings ...)
  2022-08-06 14:57 ` [PR PATCH] [Closed]: " the-maldridge
@ 2022-08-06 21:39 ` 0x5c
  7 siblings, 0 replies; 10+ messages in thread
From: 0x5c @ 2022-08-06 21:39 UTC (permalink / raw)
  To: ml

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

New comment by 0x5c on void-packages repository

https://github.com/void-linux/void-packages/pull/38498#issuecomment-1207286572

Comment:
hum, this appears to be a superset of the changes in https://github.com/void-linux/void-packages/pull/38474

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

* Re: [PR PATCH] [Updated] go: update to 1.19, add tests
  2022-08-07  5:03 [PR PATCH] " subnut
@ 2022-08-08  2:35 ` subnut
  0 siblings, 0 replies; 10+ messages in thread
From: subnut @ 2022-08-08  2:35 UTC (permalink / raw)
  To: ml

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

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

https://github.com/subnut/void-packages go1.19
https://github.com/void-linux/void-packages/pull/38510

go: update to 1.19, add tests
Supersedes #38474
Supersedes #38385

<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - i686-glibc
<!--
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

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

From a36ac36fe37056b70f2c016598a6501a06f65729 Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Sat, 6 Aug 2022 15:12:02 +0530
Subject: [PATCH] go: update to 1.19, add tests

---
 srcpkgs/go/patches/fix-32bit-tests.patch |  13 ++
 srcpkgs/go/patches/fix-musl-tests.patch  |  29 +++++
 srcpkgs/go/patches/fix-tests.patch       | 150 +++++++++++++++++++++++
 srcpkgs/go/template                      |  29 ++++-
 4 files changed, 218 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/go/patches/fix-32bit-tests.patch
 create mode 100644 srcpkgs/go/patches/fix-musl-tests.patch
 create mode 100644 srcpkgs/go/patches/fix-tests.patch

diff --git a/srcpkgs/go/patches/fix-32bit-tests.patch b/srcpkgs/go/patches/fix-32bit-tests.patch
new file mode 100644
index 000000000000..f5d8083b19f0
--- /dev/null
+++ b/srcpkgs/go/patches/fix-32bit-tests.patch
@@ -0,0 +1,13 @@
+Fixes go1.19 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
+@@ -148,6 +148,7 @@ var extraEnvKeys = []string{
+ 	"GO_TESTING_GOTOOLS", // for gccgo testing
+ 	"GCCGO",              // for gccgo testing
+ 	"GCCGOTOOLDIR",       // for gccgo testing
++	"CGO_CFLAGS",         // for working around go1.19 "unknown symbol __stack_chk_fail_local" error on x86
+ }
+ 
+ // setup sets up the test execution temporary directory and environment.
diff --git a/srcpkgs/go/patches/fix-musl-tests.patch b/srcpkgs/go/patches/fix-musl-tests.patch
new file mode 100644
index 000000000000..f70cb456857b
--- /dev/null
+++ b/srcpkgs/go/patches/fix-musl-tests.patch
@@ -0,0 +1,29 @@
+These tests fail on musl because /proc/../status doesn't contain the "Groups"
+field, because musl lacks the getgroups() syscall.
+
+--- a/go/src/syscall/syscall_linux_test.go
++++ b/go/src/syscall/syscall_linux_test.go
+@@ -530,10 +530,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"},
+--- a/go/misc/cgo/test/issue1435.go
++++ b/go/misc/cgo/test/issue1435.go
+@@ -165,10 +165,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"},
diff --git a/srcpkgs/go/patches/fix-tests.patch b/srcpkgs/go/patches/fix-tests.patch
new file mode 100644
index 000000000000..c93415611413
--- /dev/null
+++ b/srcpkgs/go/patches/fix-tests.patch
@@ -0,0 +1,150 @@
+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
+@@ -39,144 +39,6 @@ func checkUidGid(t *testing.T, path string, uid, gid int) {
+ 	}
+ }
+ 
+-func TestChown(t *testing.T) {
+-	// 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) {
+-	// 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) {
+-	// 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 2db64b795ed8..a5fce0f153b6 100644
--- a/srcpkgs/go/template
+++ b/srcpkgs/go/template
@@ -1,17 +1,18 @@
 # Template file for 'go'
 pkgname=go
-version=1.18.3
+version=1.19
 revision=1
 create_wrksrc=yes
 build_wrksrc=go
 hostmakedepends="go1.12-bootstrap"
+checkdepends="iana-etc clang gcc-fortran"
 short_desc="Go Programming Language"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 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=0012386ddcbb5f3350e407c679923811dbd283fcdc421724931614a842ecbc2d
+checksum=9419cc70dc5a2523f29a77053cafff658ed21ef3561d9b6b020280ebceab28b9
 nostrip=yes
 noverifyrdeps=yes
 
@@ -31,11 +32,24 @@ if [ "$CROSS_BUILD" ]; then
 	fi
 fi
 
+# Workaround for go-1.19 compilation error on i686
+#   runtime/cgo(.text): unknown symbol __stack_chk_fail_local in pcrel
+if [ "$XBPS_MACHINE" = i686 ]; then
+	export CGO_CFLAGS="-fno-stack-protector"
+fi
+
+post_extract() {
+	if [ "$(df . --output=fstype | tail -1)" = zfs ]; then
+		# https://github.com/golang/go/issues/39905
+		rm -v go/src/cmd/link/internal/ld/fallocate_test.go
+	fi
+}
+
 do_build() {
 	unset GCC CC CXX LD CFLAGS
 	# FIXME: work around leaking go build-style vars when built as a
 	# dependency
-	unset CGO_CXXFLAGS CGO_CFLAGS CGO_ENABLED
+	unset CGO_CXXFLAGS CGO_ENABLED # CGO_CFLAGS
 
 	export GOROOT_BOOTSTRAP="/usr/lib/go1.12"
 	export GOROOT=$PWD
@@ -47,6 +61,15 @@ do_build() {
 	bash make.bash -v
 }
 
+do_check() {
+	if [ "$XBPS_LIBC" = musl ]; then
+		# https://github.com/golang/go/issues/39857
+		./bin/go tool dist test -v -run "!^cgo_test$"
+	else
+		./bin/go tool dist test -v
+	fi
+}
+
 do_install() {
 	local bindir
 

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

end of thread, other threads:[~2022-08-08  2:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-06  9:44 [PR PATCH] go: update to 1.19, add tests subnut
2022-08-06  9:44 ` subnut
2022-08-06  9:49 ` paper42
2022-08-06 11:04 ` [PR PATCH] [Updated] " subnut
2022-08-06 11:11 ` subnut
2022-08-06 11:18 ` subnut
2022-08-06 11:20 ` subnut
2022-08-06 14:57 ` [PR PATCH] [Closed]: " the-maldridge
2022-08-06 21:39 ` 0x5c
2022-08-07  5:03 [PR PATCH] " subnut
2022-08-08  2:35 ` [PR PATCH] [Updated] " subnut

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).