diff --git a/0001-fix-codec.MsgpackHandle.patch b/0001-fix-codec.MsgpackHandle.patch new file mode 100644 index 0000000..bdd44ec --- /dev/null +++ b/0001-fix-codec.MsgpackHandle.patch @@ -0,0 +1,30 @@ +diff -up serf-0.9.5/client/rpc_client.go.orig serf-0.9.5/client/rpc_client.go +--- serf-0.9.5/client/rpc_client.go.orig 2020-10-07 18:07:27.000000000 +0200 ++++ serf-0.9.5/client/rpc_client.go 2021-01-03 10:33:26.898222569 +0100 +@@ -142,9 +142,9 @@ func ClientFromConfig(c *Config) (*RPCCl + shutdownCh: make(chan struct{}), + } + client.dec = codec.NewDecoder(client.reader, +- &codec.MsgpackHandle{RawToString: true, WriteExt: true}) ++ &codec.MsgpackHandle{WriteExt: true}) + client.enc = codec.NewEncoder(client.writer, +- &codec.MsgpackHandle{RawToString: true, WriteExt: true}) ++ &codec.MsgpackHandle{WriteExt: true}) + go client.listen() + + // Do the initial handshake +diff -up serf-0.9.5/cmd/serf/command/agent/ipc.go.orig serf-0.9.5/cmd/serf/command/agent/ipc.go +--- serf-0.9.5/cmd/serf/command/agent/ipc.go.orig 2020-10-07 18:07:27.000000000 +0200 ++++ serf-0.9.5/cmd/serf/command/agent/ipc.go 2021-01-03 10:34:42.280742669 +0100 +@@ -387,9 +387,9 @@ func (i *AgentIPC) listen() { + pendingQueries: make(map[uint64]*serf.Query), + } + client.dec = codec.NewDecoder(client.reader, +- &codec.MsgpackHandle{RawToString: true, WriteExt: true}) ++ &codec.MsgpackHandle{WriteExt: true}) + client.enc = codec.NewEncoder(client.writer, +- &codec.MsgpackHandle{RawToString: true, WriteExt: true}) ++ &codec.MsgpackHandle{WriteExt: true}) + + // Register the client + i.Lock() diff --git a/golang-github-hashicorp-serf.spec b/golang-github-hashicorp-serf.spec index 4568598..eda0648 100644 --- a/golang-github-hashicorp-serf.spec +++ b/golang-github-hashicorp-serf.spec @@ -44,6 +44,8 @@ Summary: Service orchestration and management tool License: MPLv2.0 URL: %{gourl} Source0: %{gosource} +# Fix to use newer github.com/hashicorp/go-msgpack/codec +Patch0: 0001-fix-codec.MsgpackHandle.patch BuildRequires: golang(github.com/armon/circbuf) BuildRequires: golang(github.com/armon/go-metrics) @@ -63,6 +65,7 @@ BuildRequires: golang(github.com/ryanuber/columnize) %prep %goprep +%patch0 -p1 %build for cmd in cmd/* ; do