From 742cbdfcd0a0e321432c66c97e1ecc9809785f78 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Jan 30 2018 23:26:27 +0000 Subject: fix compilation with go 1.10 --- diff --git a/00-go-110-fix.patch b/00-go-110-fix.patch new file mode 100644 index 0000000..18f44ce --- /dev/null +++ b/00-go-110-fix.patch @@ -0,0 +1,13 @@ +diff --git a/syntax/ast/parser_test.go b/syntax/ast/parser_test.go +index 292693b..eef3b16 100644 +--- a/syntax/ast/parser_test.go ++++ b/syntax/ast/parser_test.go +@@ -211,7 +211,7 @@ func TestParseString(t *testing.T) { + t.Errorf("[%d] unexpected error: %s", id, err) + } + if !reflect.DeepEqual(test.tree, result) { +- t.Errorf("[%d] Parse():\nact:\t%s\nexp:\t%s\n", id, result, test.tree) ++ t.Errorf("[%d] Parse():\nact:\t%x\nexp:\t%x\n", id, result, test.tree) + } + } + } diff --git a/golang-github-gobwas-glob.spec b/golang-github-gobwas-glob.spec index f3dbddf..f398759 100644 --- a/golang-github-gobwas-glob.spec +++ b/golang-github-gobwas-glob.spec @@ -30,12 +30,15 @@ Name: golang-%{provider}-%{project}-%{repo} Version: 0.2.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Globbing library for Go License: MIT URL: https://%{provider_prefix} Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz +# Add patch to fix compilation of tests with go 1.10 +Patch0: 00-go-110-fix.patch + # e.g. el6 has ppc64 arch without gcc-go, so EA tag is required ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}} # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. @@ -86,6 +89,7 @@ providing packages with %{import_path} prefix. %prep %setup -q -n %{repo}-%{commit} +%patch0 -p1 %build @@ -177,6 +181,9 @@ export GOPATH=%{buildroot}/%{gopath}:%{gopath} %changelog +* Tue Jan 30 2018 Fabio Valentini - 0.2.2-4 +- Add patch to fix compilation of tests with go 1.10. + * Wed Aug 02 2017 Fedora Release Engineering - 0.2.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild