diff options
Diffstat (limited to 'debian/patches')
5 files changed, 167 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..3cf9813 --- /dev/null +++ b/debian/patches/0001-Disable-test-for-UserHomeDir.patch @@ -0,0 +1,20 @@ +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(+) + +--- a/src/os/os_test.go ++++ b/src/os/os_test.go +@@ -2540,6 +2540,8 @@ + 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..f83aa05 --- /dev/null +++ b/debian/patches/0002-Fix-Lintian-warnings-about-wrong-interpreter-path.patch @@ -0,0 +1,83 @@ +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_darwin.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 +- + 9 files changed, 9 insertions(+), 9 deletions(-) + +--- 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. +--- 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. +--- 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 +--- 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. +--- 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. +--- 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. +--- 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. +--- 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/0005-cmd-dist-increase-default-timeout-scale-for-arm.patch b/debian/patches/0005-cmd-dist-increase-default-timeout-scale-for-arm.patch new file mode 100644 index 0000000..9f146a8 --- /dev/null +++ b/debian/patches/0005-cmd-dist-increase-default-timeout-scale-for-arm.patch @@ -0,0 +1,27 @@ +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(-) + +--- a/src/cmd/dist/test.go ++++ b/src/cmd/dist/test.go +@@ -165,7 +165,7 @@ + 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/0006-skip-userns-test-in-schroot-as-well.patch b/debian/patches/0006-skip-userns-test-in-schroot-as-well.patch new file mode 100644 index 0000000..2d874c8 --- /dev/null +++ b/debian/patches/0006-skip-userns-test-in-schroot-as-well.patch @@ -0,0 +1,33 @@ +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(+) + +--- a/src/syscall/exec_linux_test.go ++++ b/src/syscall/exec_linux_test.go +@@ -33,6 +33,10 @@ + 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 +@@ -48,6 +52,9 @@ + 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/series b/debian/patches/series new file mode 100644 index 0000000..ca8b1d3 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,4 @@ +0001-Disable-test-for-UserHomeDir.patch +0002-Fix-Lintian-warnings-about-wrong-interpreter-path.patch +0005-cmd-dist-increase-default-timeout-scale-for-arm.patch +0006-skip-userns-test-in-schroot-as-well.patch |