Github messages for voidlinux
 help / color / mirror / Atom feed
From: subnut <subnut@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] go: update to 1.19, add tests
Date: Sat, 06 Aug 2022 13:20:27 +0200	[thread overview]
Message-ID: <20220806112027.EOyp3y9Mxd96g3U25qL7EQicGqXV2kxNZOslvPz4Rn0@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38498@inbox.vuxu.org>

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

  parent reply	other threads:[~2022-08-06 11:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-06  9:44 [PR PATCH] " 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 [this message]
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

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=20220806112027.EOyp3y9Mxd96g3U25qL7EQicGqXV2kxNZOslvPz4Rn0@z \
    --to=subnut@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).