diff --git a/0001-Bypass-flag.Parse-in-init.patch b/0001-Bypass-flag.Parse-in-init.patch new file mode 100644 index 0000000..5ab807a --- /dev/null +++ b/0001-Bypass-flag.Parse-in-init.patch @@ -0,0 +1,15 @@ +diff -up martian-3.0.0/cmd/proxy/main_test.go.orig martian-3.0.0/cmd/proxy/main_test.go +--- martian-3.0.0/cmd/proxy/main_test.go.orig 2019-07-09 03:38:53.000000000 +0200 ++++ martian-3.0.0/cmd/proxy/main_test.go 2020-01-31 16:21:26.888748470 +0100 +@@ -33,6 +33,11 @@ import ( + "github.com/google/martian/v3/mitm" + ) + ++var _ = func() bool { ++ testing.Init() ++ return true ++}() ++ + func waitForProxy(t *testing.T, c *http.Client, apiURL string) { + timeout := 5 * time.Second + deadline := time.Now().Add(timeout) diff --git a/golang-github-google-martian.spec b/golang-github-google-martian.spec index 8e26bc2..dc1d8b0 100644 --- a/golang-github-google-martian.spec +++ b/golang-github-google-martian.spec @@ -26,13 +26,15 @@ that Go can target.} %global godocs README.md Name: %{goname} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for building custom HTTP/S proxies # Upstream license specification: Apache-2.0 License: ASL 2.0 URL: %{gourl} Source0: %{gosource} +# https://github.com/google/martian/issues/309 +Patch0: 0001-Bypass-flag.Parse-in-init.patch BuildRequires: golang(golang.org/x/net/websocket) @@ -43,6 +45,7 @@ BuildRequires: golang(golang.org/x/net/websocket) %prep %goprep +%patch0 -p1 %build for cmd in cmd/* ; do @@ -68,6 +71,9 @@ install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %gopkgfiles %changelog +* Fri Jan 31 16:35:28 CET 2020 Robert-André Mauchin - 3.0.0-3 +- Fix FTBFS with Go 1.13+ + * Wed Jan 29 2020 Fedora Release Engineering - 3.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild