From ff28451b5f387c2f8fffec1abded9c2837199ec7 Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Jan 25 2021 03:31:41 +0000 Subject: Fix FTBFS in TestNocmpIntegration Signed-off-by: Robert-André Mauchin --- diff --git a/0001-Add-missing-GOPATH-environment-variable.patch b/0001-Add-missing-GOPATH-environment-variable.patch new file mode 100644 index 0000000..fcfb1ca --- /dev/null +++ b/0001-Add-missing-GOPATH-environment-variable.patch @@ -0,0 +1,29 @@ +From 742e71bb16a909acd89bc9c8178ed1a14d09b9c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= +Date: Mon, 25 Jan 2021 04:13:53 +0100 +Subject: [PATCH 1/1] Add missing GOPATH environment variable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Robert-André Mauchin +--- + nocmp_test.go | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/nocmp_test.go b/nocmp_test.go +index d4be166..2156350 100644 +--- a/nocmp_test.go ++++ b/nocmp_test.go +@@ -155,6 +155,8 @@ func TestNocmpIntegration(t *testing.T) { + // Forget OS build enviroment and set up a minimal one for "go build" + // to run. + cmd.Env = []string{ ++ "GO111MODULE=off", ++ "GOPATH=" + filepath.Join(tempdir, "src"), + "GOCACHE=" + filepath.Join(tempdir, "gocache"), + } + cmd.Stderr = &stderr +-- +2.29.2 + diff --git a/golang-uber-atomic.spec b/golang-uber-atomic.spec index c12450a..eaa285f 100644 --- a/golang-uber-atomic.spec +++ b/golang-uber-atomic.spec @@ -16,12 +16,14 @@ access.} %global godocs README.md CHANGELOG.md Name: %{goname} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Wrapper types for sync/atomic which enforce atomic access License: MIT URL: %{gourl} Source0: %{gosource} +# Go 1.16: add missing GOPATH for TestNocmpIntegration test +Patch0: 0001-Add-missing-GOPATH-environment-variable.patch %if %{with check} # Tests @@ -36,6 +38,7 @@ BuildRequires: golang(github.com/stretchr/testify/require) %prep %goprep +%patch0 -p1 %install %gopkginstall @@ -48,6 +51,9 @@ BuildRequires: golang(github.com/stretchr/testify/require) %gopkgfiles %changelog +* Mon Jan 25 04:30:29 CET 2021 Robert-André Mauchin - 1.7.0-2 +- Fix FTBFS in TestNocmpIntegration + * Sat Dec 26 13:13:34 CET 2020 Robert-André Mauchin - 1.7.0-1 - Update to 1.7.0 - Close: rhbz#1878965