diff --git a/.gitignore b/.gitignore index fa9ae98..8b2fa89 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /go-restful-2.9.3.tar.gz +/go-restful-3.2.0.tar.gz diff --git a/0001-Convert-to-string-using-rune.patch b/0001-Convert-to-string-using-rune.patch new file mode 100644 index 0000000..a001f01 --- /dev/null +++ b/0001-Convert-to-string-using-rune.patch @@ -0,0 +1,55 @@ +From 90c27c6d51bf5f1118dd427d93a9501a0987eaa7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= +Date: Sun, 26 Jul 2020 16:45:17 +0200 +Subject: [PATCH] Convert to string using rune() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +See https://github.com/golang/go/issues/32479 + +Fix #442. + +Signed-off-by: Robert-André Mauchin +--- + bench_curly_test.go | 4 ++-- + bench_test.go | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/bench_curly_test.go b/bench_curly_test.go +index db6a1a7..30649a7 100644 +--- a/bench_curly_test.go ++++ b/bench_curly_test.go +@@ -14,10 +14,10 @@ func setupCurly(container *Container) []string { + + container.Router(CurlyRouter{}) + for i := 0; i < wsCount; i++ { +- root := fmt.Sprintf("/%s/{%s}/", string(i+97), string(i+97)) ++ root := fmt.Sprintf("/%s/{%s}/", string(rune(i+97)), string(rune(i+97))) + ws := new(WebService).Path(root) + for j := 0; j < rtCount; j++ { +- sub := fmt.Sprintf("/%s2/{%s2}", string(j+97), string(j+97)) ++ sub := fmt.Sprintf("/%s2/{%s2}", string(rune(j+97)), string(rune(j+97))) + ws.Route(ws.GET(sub).Consumes("application/xml").Produces("application/xml").To(echoCurly)) + } + container.Add(ws) +diff --git a/bench_test.go b/bench_test.go +index 3e77c2d..5380abf 100644 +--- a/bench_test.go ++++ b/bench_test.go +@@ -13,10 +13,10 @@ func setup(container *Container) { + rtCount := 26 + + for i := 0; i < wsCount; i++ { +- root := fmt.Sprintf("/%s/{%s}/", string(i+97), string(i+97)) ++ root := fmt.Sprintf("/%s/{%s}/", string(rune(i+97)), string(rune(i+97))) + ws := new(WebService).Path(root) + for j := 0; j < rtCount; j++ { +- sub := fmt.Sprintf("/%s2/{%s2}", string(j+97), string(j+97)) ++ sub := fmt.Sprintf("/%s2/{%s2}", string(rune(j+97)), string(rune(j+97))) + ws.Route(ws.GET(sub).To(echo)) + } + container.Add(ws) +-- +2.26.2 + diff --git a/golang-github-emicklei-restful.spec b/golang-github-emicklei-restful.spec index e5402d6..5b0be8d 100644 --- a/golang-github-emicklei-restful.spec +++ b/golang-github-emicklei-restful.spec @@ -3,14 +3,11 @@ # https://github.com/emicklei/go-restful %global goipath github.com/emicklei/go-restful -Version: 2.9.3 +Version: 3.2.0 %gometa -# Remove in F33: -%global godevelheader %{expand: -Obsoletes: golang-github-emicklei-go-restful-devel < 1.1.3-0.22 -} +%global goaltipaths github.com/emicklei/go-restful/v3 %global common_description %{expand: Package for building REST-style Web Services using Go.} @@ -21,7 +18,7 @@ Package for building REST-style Web Services using Go.} %global gosupfiles glide.lock glide.yaml Name: %{goname} -Release: 4%{?dist} +Release: 1%{?dist} Summary: Package for building REST-style Web Services using Go License: MIT @@ -29,7 +26,10 @@ URL: %{gourl} Source0: %{gosource} Source1: glide.yaml Source2: glide.lock +# Go 1.15: https://github.com/emicklei/go-restful/issues/442 +Patch0: 0001-Convert-to-string-using-rune.patch +BuildRequires: golang(github.com/dgrijalva/jwt-go) BuildRequires: golang(github.com/go-openapi/spec) BuildRequires: golang(github.com/gorilla/schema) BuildRequires: golang(github.com/mjibson/appstats) @@ -47,19 +47,11 @@ BuildRequires: golang(gopkg.in/vmihailenco/msgpack.v2) %prep %goprep cp %{S:1} %{S:2} . +%patch0 -p1 %install %gopkginstall -# Remove in F33 -# Remove erroneous glide.lock folder -%pretrans devel -p -path = "%{gopath}/src/%{goipath}/glide.lock" -st = posix.stat(path) -if st and st.type == "directory" then - os.remove(path) -end - %if %{with check} %check %gocheck @@ -68,6 +60,9 @@ end %gopkgfiles %changelog +* Sun Jul 26 16:24:59 CEST 2020 Robert-André Mauchin - 3.2.0-1 +- Update to 3.2.0 + * Wed Jan 29 2020 Fedora Release Engineering - 2.9.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index d14d240..ae2b18c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go-restful-2.9.3.tar.gz) = a0615677c31dc78b0a07ec96a887eb610100a01044782237e135cc8afc16b7990f2b6b00eef5f44f9bf8774c98763d0d981e2e42b957db22cd7ca17bef9a07d3 +SHA512 (go-restful-3.2.0.tar.gz) = 4a459db312b850f80c8b161497f60d9a74b1c249cf1ad3d8a6a73f4464bf6e6e9c798827eadab9c2ab40f2e31eec01fe5d09b64fb8aaa73374b33ab90c1d5724