summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:23:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:23:19 +0000
commit7b866744951dd6d5e9c7fa982b1f5672d653feb4 (patch)
tree5d2a761f938c68b62e11301dc7b93e2ed63dbd50 /debian/patches
parentAdding upstream version 1.20.14. (diff)
downloadgolang-1.20-7b866744951dd6d5e9c7fa982b1f5672d653feb4.tar.xz
golang-1.20-7b866744951dd6d5e9c7fa982b1f5672d653feb4.zip
Adding debian version 1.20.14-2.debian/1.20.14-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/0001-Disable-test-for-UserHomeDir.patch22
-rw-r--r--debian/patches/0002-Fix-Lintian-warnings-about-wrong-interpreter-path.patch98
-rw-r--r--debian/patches/0003-cmd-dist-increase-default-timeout-scale-for-arm.patch29
-rw-r--r--debian/patches/0004-skip-userns-test-in-schroot-as-well.patch34
-rw-r--r--debian/patches/0005-Skip-flaky-TestCrashDumpsAllThreads-on-mips64le.patch24
-rw-r--r--debian/patches/series5
6 files changed, 212 insertions, 0 deletions
diff --git a/debian/patches/0001-Disable-test-for-UserHomeDir.patch b/debian/patches/0001-Disable-test-for-UserHomeDir.patch
new file mode 100644
index 0000000..06f8291
--- /dev/null
+++ b/debian/patches/0001-Disable-test-for-UserHomeDir.patch
@@ -0,0 +1,22 @@
+From: "Dr. Tobias Quathamer" <toddy@debian.org>
+Date: Wed, 19 Dec 2018 14:25:06 +0100
+Subject: Disable test for UserHomeDir.
+
+On Debian buildds, the user home dir does not exist, so this test fails.
+---
+ src/os/os_test.go | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/os/os_test.go b/src/os/os_test.go
+index 277b245..874215e 100644
+--- a/src/os/os_test.go
++++ b/src/os/os_test.go
+@@ -2556,6 +2556,8 @@ func TestUserHomeDir(t *testing.T) {
+ if err != nil {
+ t.Skipf("UserHomeDir failed: %v", err)
+ }
++ // On Debian buildds, the user home dir does not exist.
++ t.Skip("UserHomeDir does not exist on Debian buildds.")
+ fi, err := Stat(dir)
+ if err != nil {
+ t.Fatal(err)
diff --git a/debian/patches/0002-Fix-Lintian-warnings-about-wrong-interpreter-path.patch b/debian/patches/0002-Fix-Lintian-warnings-about-wrong-interpreter-path.patch
new file mode 100644
index 0000000..3068cc3
--- /dev/null
+++ b/debian/patches/0002-Fix-Lintian-warnings-about-wrong-interpreter-path.patch
@@ -0,0 +1,98 @@
+From: "Dr. Tobias Quathamer" <toddy@debian.org>
+Date: Thu, 1 Aug 2019 13:50:48 +0200
+Subject: Fix Lintian warnings about wrong interpreter path
+
+The command used for this change is as follows:
+
+grep -rH "/usr/bin/env perl" * | cut -d: -f1 | xargs -n1 sed -i -e "s,/usr/bin/env perl,/usr/bin/perl,"
+---
+ src/syscall/mksyscall.pl | 2 +-
+ src/syscall/mksyscall_libc.pl | 2 +-
+ src/syscall/mksysctl_openbsd.pl | 2 +-
+ src/syscall/mksysnum_dragonfly.pl | 2 +-
+ src/syscall/mksysnum_freebsd.pl | 2 +-
+ src/syscall/mksysnum_linux.pl | 2 +-
+ src/syscall/mksysnum_netbsd.pl | 2 +-
+ src/syscall/mksysnum_openbsd.pl | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/syscall/mksyscall.pl b/src/syscall/mksyscall.pl
+index 25ab911..98de8e8 100755
+--- a/src/syscall/mksyscall.pl
++++ b/src/syscall/mksyscall.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ # Copyright 2009 The Go Authors. All rights reserved.
+ # Use of this source code is governed by a BSD-style
+ # license that can be found in the LICENSE file.
+diff --git a/src/syscall/mksyscall_libc.pl b/src/syscall/mksyscall_libc.pl
+index 3731476..47457a1 100755
+--- a/src/syscall/mksyscall_libc.pl
++++ b/src/syscall/mksyscall_libc.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ # Copyright 2009 The Go Authors. All rights reserved.
+ # Use of this source code is governed by a BSD-style
+ # license that can be found in the LICENSE file.
+diff --git a/src/syscall/mksysctl_openbsd.pl b/src/syscall/mksysctl_openbsd.pl
+index ea462a7..7e8a3e2 100755
+--- a/src/syscall/mksysctl_openbsd.pl
++++ b/src/syscall/mksysctl_openbsd.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ # Copyright 2011 The Go Authors. All rights reserved.
+ # Use of this source code is governed by a BSD-style
+diff --git a/src/syscall/mksysnum_dragonfly.pl b/src/syscall/mksysnum_dragonfly.pl
+index e9a634b..a8df18d 100755
+--- a/src/syscall/mksysnum_dragonfly.pl
++++ b/src/syscall/mksysnum_dragonfly.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ # Copyright 2009 The Go Authors. All rights reserved.
+ # Use of this source code is governed by a BSD-style
+ # license that can be found in the LICENSE file.
+diff --git a/src/syscall/mksysnum_freebsd.pl b/src/syscall/mksysnum_freebsd.pl
+index c04ada9..f9b7b91 100755
+--- a/src/syscall/mksysnum_freebsd.pl
++++ b/src/syscall/mksysnum_freebsd.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ # Copyright 2009 The Go Authors. All rights reserved.
+ # Use of this source code is governed by a BSD-style
+ # license that can be found in the LICENSE file.
+diff --git a/src/syscall/mksysnum_linux.pl b/src/syscall/mksysnum_linux.pl
+index 5fb1d0e..ebeb9a8 100755
+--- a/src/syscall/mksysnum_linux.pl
++++ b/src/syscall/mksysnum_linux.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ # Copyright 2009 The Go Authors. All rights reserved.
+ # Use of this source code is governed by a BSD-style
+ # license that can be found in the LICENSE file.
+diff --git a/src/syscall/mksysnum_netbsd.pl b/src/syscall/mksysnum_netbsd.pl
+index 4f5150a..53783ff 100755
+--- a/src/syscall/mksysnum_netbsd.pl
++++ b/src/syscall/mksysnum_netbsd.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ # Copyright 2009 The Go Authors. All rights reserved.
+ # Use of this source code is governed by a BSD-style
+ # license that can be found in the LICENSE file.
+diff --git a/src/syscall/mksysnum_openbsd.pl b/src/syscall/mksysnum_openbsd.pl
+index f8f484b..312486d 100755
+--- a/src/syscall/mksysnum_openbsd.pl
++++ b/src/syscall/mksysnum_openbsd.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ # Copyright 2009 The Go Authors. All rights reserved.
+ # Use of this source code is governed by a BSD-style
+ # license that can be found in the LICENSE file.
diff --git a/debian/patches/0003-cmd-dist-increase-default-timeout-scale-for-arm.patch b/debian/patches/0003-cmd-dist-increase-default-timeout-scale-for-arm.patch
new file mode 100644
index 0000000..976959c
--- /dev/null
+++ b/debian/patches/0003-cmd-dist-increase-default-timeout-scale-for-arm.patch
@@ -0,0 +1,29 @@
+From: Balint Reczey <balint.reczey@canonical.com>
+Date: Mon, 31 Aug 2020 13:14:51 +0200
+Subject: [PATCH] cmd/dist: increase default timeout scale for arm
+
+Forwarded: https://github.com/golang/go/issues/43002
+
+Most developers use (faster) amd64 machines setting the test timeouts,
+but test may run on slower arm ones and also different tests may suffer
+different relative slowdown on the arm CPUs.
+
+Due to those two varying factors it is safer to allow a higher timeout
+scale on arm to avoid tests timing out.
+---
+ src/cmd/dist/test.go | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
+index 9f26606..770253b 100644
+--- a/src/cmd/dist/test.go
++++ b/src/cmd/dist/test.go
+@@ -194,7 +194,7 @@ func (t *tester) run() {
+ t.timeoutScale = 1
+ switch goarch {
+ case "arm":
+- t.timeoutScale = 2
++ t.timeoutScale = 3
+ case "mips", "mipsle", "mips64", "mips64le":
+ t.timeoutScale = 4
+ }
diff --git a/debian/patches/0004-skip-userns-test-in-schroot-as-well.patch b/debian/patches/0004-skip-userns-test-in-schroot-as-well.patch
new file mode 100644
index 0000000..7209cf1
--- /dev/null
+++ b/debian/patches/0004-skip-userns-test-in-schroot-as-well.patch
@@ -0,0 +1,34 @@
+From: Shengjing Zhu <zhsj@debian.org>
+Date: Fri, 5 Feb 2021 21:21:45 +0800
+Subject: skip userns test in schroot as well
+
+When schroot is using overlayfs, it fails to detect it as chroot.
+---
+ src/syscall/exec_linux_test.go | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/syscall/exec_linux_test.go b/src/syscall/exec_linux_test.go
+index a6900f9..221f9de 100644
+--- a/src/syscall/exec_linux_test.go
++++ b/src/syscall/exec_linux_test.go
+@@ -35,6 +35,10 @@ func isLXC() bool {
+ return os.Getenv("container") == "lxc"
+ }
+
++func isSchroot() bool {
++ return os.Getenv("SCHROOT_SESSION_ID") != ""
++}
++
+ func skipInContainer(t *testing.T) {
+ // TODO: the callers of this func are using this func to skip
+ // tests when running as some sort of "fake root" that's uid 0
+@@ -50,6 +54,9 @@ func skipInContainer(t *testing.T) {
+ if isLXC() {
+ t.Skip("skip this test in LXC container")
+ }
++ if isSchroot() {
++ t.Skip("skip this test in Schroot container")
++ }
+ }
+
+ func skipNoUserNamespaces(t *testing.T) {
diff --git a/debian/patches/0005-Skip-flaky-TestCrashDumpsAllThreads-on-mips64le.patch b/debian/patches/0005-Skip-flaky-TestCrashDumpsAllThreads-on-mips64le.patch
new file mode 100644
index 0000000..d2bad30
--- /dev/null
+++ b/debian/patches/0005-Skip-flaky-TestCrashDumpsAllThreads-on-mips64le.patch
@@ -0,0 +1,24 @@
+From: Shengjing Zhu <zhsj@debian.org>
+Date: Mon, 26 Feb 2024 17:03:06 +0800
+Subject: Skip flaky TestCrashDumpsAllThreads on mips64le
+
+crash_unix_test.go:145: found 3 instances of main.crashDumpsAllThreadsLoop; expected 4
+---
+ src/runtime/crash_unix_test.go | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/runtime/crash_unix_test.go b/src/runtime/crash_unix_test.go
+index 29d9c47..fdc92a3 100644
+--- a/src/runtime/crash_unix_test.go
++++ b/src/runtime/crash_unix_test.go
+@@ -58,6 +58,10 @@ func TestCrashDumpsAllThreads(t *testing.T) {
+ t.Skip("-quick")
+ }
+
++ if runtime.GOARCH == "mips64le" {
++ t.Skipf("skipping; flaky on %s", runtime.GOARCH)
++ }
++
+ switch runtime.GOOS {
+ case "darwin", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "illumos", "solaris":
+ default:
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c258671
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,5 @@
+0001-Disable-test-for-UserHomeDir.patch
+0002-Fix-Lintian-warnings-about-wrong-interpreter-path.patch
+0003-cmd-dist-increase-default-timeout-scale-for-arm.patch
+0004-skip-userns-test-in-schroot-as-well.patch
+0005-Skip-flaky-TestCrashDumpsAllThreads-on-mips64le.patch