From f990d38be6b7384b7ac39aa03a7c3708d77845f3 Mon Sep 17 00:00:00 2001 From: Ed Marshall Date: Jan 14 2018 20:32:06 +0000 Subject: Add patch to work around unit test breakage on Go 1.10. --- diff --git a/golang-github-asaskevich-govalidator.spec b/golang-github-asaskevich-govalidator.spec index 1580b84..e10bc88 100644 --- a/golang-github-asaskevich-govalidator.spec +++ b/golang-github-asaskevich-govalidator.spec @@ -47,6 +47,9 @@ Summary: Validators and sanitizers for strings, numerics, slices and stru License: MIT URL: https://%{provider_prefix} Source0: https://%{provider_prefix}/archive/v%{version}/%{repo}-%{version}.tar.gz +# Work around Go 1.10 changes to net/uri validation +# https://github.com/asaskevich/govalidator/issues/250 +Patch0: govalidator-8-irc-uri-testfix.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}} @@ -101,6 +104,7 @@ providing packages with %{import_path} prefix. %prep %setup -q -n %{repo}-%{version} +%patch0 -p1 %build %install diff --git a/govalidator-8-irc-uri-testfix.patch b/govalidator-8-irc-uri-testfix.patch new file mode 100644 index 0000000..effeda9 --- /dev/null +++ b/govalidator-8-irc-uri-testfix.patch @@ -0,0 +1,21 @@ +diff -urN govalidator-8.orig/validator_test.go govalidator-8/validator_test.go +--- govalidator-8.orig/validator_test.go 2017-11-11 07:10:18.000000000 -0800 ++++ govalidator-8/validator_test.go 2018-01-14 12:29:54.433122224 -0800 +@@ -744,7 +744,7 @@ + {"http://www.foo---bar.com/", true}, + {"mailto:someone@example.com", true}, + {"irc://irc.server.org/channel", true}, +- {"irc://#channel@network", true}, ++ {"irc:///#channel@network", true}, + {"/abs/test/dir", false}, + {"./rel/test/dir", false}, + } +@@ -793,7 +793,7 @@ + {"http://www.foo---bar.com/", true}, + {"mailto:someone@example.com", true}, + {"irc://irc.server.org/channel", true}, +- {"irc://#channel@network", true}, ++ {"irc:///#channel@network", true}, + {"/abs/test/dir", true}, + {"./rel/test/dir", false}, + }