[etcd] Update configuration and service file - related: #1191441
Jan Chaloupka
jchaloup at fedoraproject.org
Fri Feb 20 10:15:12 UTC 2015
commit ebf376c0d3a0266b63c1c7913b35893c155c12a3
Author: Jan Chaloupka <jchaloup at redhat.com>
Date: Wed Feb 18 15:40:23 2015 +0100
Update configuration and service file
- related: #1191441
...ricated-ErrWrongType-with-its-local-defin.patch | 693 +++++++++++++++++++++
etcd.conf | 68 +-
etcd.service | 2 +-
etcd.spec | 17 +-
4 files changed, 742 insertions(+), 38 deletions(-)
---
diff --git a/etcd-2.0.1-Replace-depricated-ErrWrongType-with-its-local-defin.patch b/etcd-2.0.1-Replace-depricated-ErrWrongType-with-its-local-defin.patch
new file mode 100644
index 0000000..275e6ae
--- /dev/null
+++ b/etcd-2.0.1-Replace-depricated-ErrWrongType-with-its-local-defin.patch
@@ -0,0 +1,693 @@
+From 62d30d1b956bbc7f4249e3b42c6f8b3e5db26789 Mon Sep 17 00:00:00 2001
+From: Jan Chaloupka <jchaloup at redhat.com>
+Date: Fri, 20 Feb 2015 11:04:20 +0100
+Subject: [PATCH] Replace depricated ErrWrongType with its local definition
+
+---
+ etcdserver/etcdserverpb/etcdserver.pb.go | 39 ++++++++++---------
+ migrate/etcd4pb/log_entry.pb.go | 10 +++--
+ raft/raftpb/raft.pb.go | 64 ++++++++++++++++++--------------
+ snap/snappb/snap.pb.go | 6 ++-
+ wal/walpb/record.pb.go | 13 ++++---
+ 5 files changed, 75 insertions(+), 57 deletions(-)
+
+diff --git a/etcdserver/etcdserverpb/etcdserver.pb.go b/etcdserver/etcdserverpb/etcdserver.pb.go
+index 2e8afc0..42eb0c2 100644
+--- a/etcdserver/etcdserverpb/etcdserver.pb.go
++++ b/etcdserver/etcdserverpb/etcdserver.pb.go
+@@ -22,6 +22,7 @@ import math "math"
+
+ import io "io"
+ import code_google_com_p_gogoprotobuf_proto "code.google.com/p/gogoprotobuf/proto"
++import errors "errors"
+
+ // Reference proto, json, and math imports to suppress error if they are not otherwise used.
+ var _ = proto.Marshal
+@@ -67,6 +68,7 @@ func init() {
+ func (m *Request) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -85,7 +87,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -100,7 +102,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ }
+ case 2:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -122,7 +124,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ index = postIndex
+ case 3:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -144,7 +146,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ index = postIndex
+ case 4:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -166,7 +168,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ index = postIndex
+ case 5:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+@@ -183,7 +185,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ m.Dir = bool(v != 0)
+ case 6:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -205,7 +207,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ index = postIndex
+ case 7:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -220,7 +222,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ }
+ case 8:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+@@ -238,7 +240,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ m.PrevExist = &b
+ case 9:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -253,7 +255,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ }
+ case 10:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+@@ -270,7 +272,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ m.Wait = bool(v != 0)
+ case 11:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -285,7 +287,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ }
+ case 12:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+@@ -302,7 +304,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ m.Recursive = bool(v != 0)
+ case 13:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+@@ -319,7 +321,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ m.Sorted = bool(v != 0)
+ case 14:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+@@ -336,7 +338,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ m.Quorum = bool(v != 0)
+ case 15:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -351,7 +353,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ }
+ case 16:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+@@ -392,6 +394,7 @@ func (m *Request) Unmarshal(data []byte) error {
+ func (m *Metadata) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -410,7 +413,7 @@ func (m *Metadata) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -425,7 +428,7 @@ func (m *Metadata) Unmarshal(data []byte) error {
+ }
+ case 2:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+diff --git a/migrate/etcd4pb/log_entry.pb.go b/migrate/etcd4pb/log_entry.pb.go
+index c969241..0ccc80d 100644
+--- a/migrate/etcd4pb/log_entry.pb.go
++++ b/migrate/etcd4pb/log_entry.pb.go
+@@ -12,6 +12,7 @@ import math "math"
+
+ import io "io"
+ import code_google_com_p_gogoprotobuf_proto "code.google.com/p/gogoprotobuf/proto"
++import errors "errors"
+
+ import fmt "fmt"
+ import strings "strings"
+@@ -76,6 +77,7 @@ func init() {
+ func (m *LogEntry) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -94,7 +96,7 @@ func (m *LogEntry) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var v uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -111,7 +113,7 @@ func (m *LogEntry) Unmarshal(data []byte) error {
+ m.Index = &v
+ case 2:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var v uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -128,7 +130,7 @@ func (m *LogEntry) Unmarshal(data []byte) error {
+ m.Term = &v
+ case 3:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -151,7 +153,7 @@ func (m *LogEntry) Unmarshal(data []byte) error {
+ index = postIndex
+ case 4:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+diff --git a/raft/raftpb/raft.pb.go b/raft/raftpb/raft.pb.go
+index 88a08fd..ec40c14 100644
+--- a/raft/raftpb/raft.pb.go
++++ b/raft/raftpb/raft.pb.go
+@@ -27,6 +27,7 @@ import math "math"
+
+ import io "io"
+ import code_google_com_p_gogoprotobuf_proto "code.google.com/p/gogoprotobuf/proto"
++import errors "errors"
+
+ // Reference proto, json, and math imports to suppress error if they are not otherwise used.
+ var _ = proto.Marshal
+@@ -251,6 +252,7 @@ func init() {
+ func (m *Entry) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -269,7 +271,7 @@ func (m *Entry) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -284,7 +286,7 @@ func (m *Entry) Unmarshal(data []byte) error {
+ }
+ case 2:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -299,7 +301,7 @@ func (m *Entry) Unmarshal(data []byte) error {
+ }
+ case 3:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -314,7 +316,7 @@ func (m *Entry) Unmarshal(data []byte) error {
+ }
+ case 4:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+@@ -360,6 +362,7 @@ func (m *Entry) Unmarshal(data []byte) error {
+ func (m *SnapshotMetadata) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -378,7 +381,7 @@ func (m *SnapshotMetadata) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+@@ -402,7 +405,7 @@ func (m *SnapshotMetadata) Unmarshal(data []byte) error {
+ index = postIndex
+ case 2:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -417,7 +420,7 @@ func (m *SnapshotMetadata) Unmarshal(data []byte) error {
+ }
+ case 3:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -456,6 +459,7 @@ func (m *SnapshotMetadata) Unmarshal(data []byte) error {
+ func (m *Snapshot) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -474,7 +478,7 @@ func (m *Snapshot) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+@@ -496,7 +500,7 @@ func (m *Snapshot) Unmarshal(data []byte) error {
+ index = postIndex
+ case 2:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+@@ -544,6 +548,7 @@ func (m *Snapshot) Unmarshal(data []byte) error {
+ func (m *Message) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -562,7 +567,7 @@ func (m *Message) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -577,7 +582,7 @@ func (m *Message) Unmarshal(data []byte) error {
+ }
+ case 2:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -592,7 +597,7 @@ func (m *Message) Unmarshal(data []byte) error {
+ }
+ case 3:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -607,7 +612,7 @@ func (m *Message) Unmarshal(data []byte) error {
+ }
+ case 4:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -622,7 +627,7 @@ func (m *Message) Unmarshal(data []byte) error {
+ }
+ case 5:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -637,7 +642,7 @@ func (m *Message) Unmarshal(data []byte) error {
+ }
+ case 6:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -652,7 +657,7 @@ func (m *Message) Unmarshal(data []byte) error {
+ }
+ case 7:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+@@ -675,7 +680,7 @@ func (m *Message) Unmarshal(data []byte) error {
+ index = postIndex
+ case 8:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -690,7 +695,7 @@ func (m *Message) Unmarshal(data []byte) error {
+ }
+ case 9:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+@@ -714,7 +719,7 @@ func (m *Message) Unmarshal(data []byte) error {
+ index = postIndex
+ case 10:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+@@ -731,7 +736,7 @@ func (m *Message) Unmarshal(data []byte) error {
+ m.Reject = bool(v != 0)
+ case 11:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -770,6 +775,7 @@ func (m *Message) Unmarshal(data []byte) error {
+ func (m *HardState) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -788,7 +794,7 @@ func (m *HardState) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -803,7 +809,7 @@ func (m *HardState) Unmarshal(data []byte) error {
+ }
+ case 2:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -818,7 +824,7 @@ func (m *HardState) Unmarshal(data []byte) error {
+ }
+ case 3:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -857,6 +863,7 @@ func (m *HardState) Unmarshal(data []byte) error {
+ func (m *ConfState) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -875,7 +882,7 @@ func (m *ConfState) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var v uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -916,6 +923,7 @@ func (m *ConfState) Unmarshal(data []byte) error {
+ func (m *ConfChange) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -934,7 +942,7 @@ func (m *ConfChange) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -949,7 +957,7 @@ func (m *ConfChange) Unmarshal(data []byte) error {
+ }
+ case 2:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -964,7 +972,7 @@ func (m *ConfChange) Unmarshal(data []byte) error {
+ }
+ case 3:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -979,7 +987,7 @@ func (m *ConfChange) Unmarshal(data []byte) error {
+ }
+ case 4:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+diff --git a/snap/snappb/snap.pb.go b/snap/snappb/snap.pb.go
+index 1bc8927..8a5b7d2 100644
+--- a/snap/snappb/snap.pb.go
++++ b/snap/snappb/snap.pb.go
+@@ -21,6 +21,7 @@ import math "math"
+
+ import io "io"
+ import code_google_com_p_gogoprotobuf_proto "code.google.com/p/gogoprotobuf/proto"
++import errors "errors"
+
+ // Reference proto, json, and math imports to suppress error if they are not otherwise used.
+ var _ = proto.Marshal
+@@ -42,6 +43,7 @@ func init() {
+ func (m *Snapshot) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -60,7 +62,7 @@ func (m *Snapshot) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -75,7 +77,7 @@ func (m *Snapshot) Unmarshal(data []byte) error {
+ }
+ case 2:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+diff --git a/wal/walpb/record.pb.go b/wal/walpb/record.pb.go
+index e556f51..2877b6e 100644
+--- a/wal/walpb/record.pb.go
++++ b/wal/walpb/record.pb.go
+@@ -22,6 +22,7 @@ import math "math"
+
+ import io "io"
+ import code_google_com_p_gogoprotobuf_proto "code.google.com/p/gogoprotobuf/proto"
++import errors "errors"
+
+ // Reference proto, json, and math imports to suppress error if they are not otherwise used.
+ var _ = proto.Marshal
+@@ -54,6 +55,7 @@ func init() {
+ func (m *Record) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -72,7 +74,7 @@ func (m *Record) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -87,7 +89,7 @@ func (m *Record) Unmarshal(data []byte) error {
+ }
+ case 2:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -102,7 +104,7 @@ func (m *Record) Unmarshal(data []byte) error {
+ }
+ case 3:
+ if wireType != 2 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+@@ -148,6 +150,7 @@ func (m *Record) Unmarshal(data []byte) error {
+ func (m *Snapshot) Unmarshal(data []byte) error {
+ l := len(data)
+ index := 0
++ var ErrWrongType = errors.New("proto: field/encoding mismatch: wrong type for field")
+ for index < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+@@ -166,7 +169,7 @@ func (m *Snapshot) Unmarshal(data []byte) error {
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+@@ -181,7 +184,7 @@ func (m *Snapshot) Unmarshal(data []byte) error {
+ }
+ case 2:
+ if wireType != 0 {
+- return code_google_com_p_gogoprotobuf_proto.ErrWrongType
++ return ErrWrongType
+ }
+ for shift := uint(0); ; shift += 7 {
+ if index >= l {
+--
+1.9.3
+
diff --git a/etcd.conf b/etcd.conf
index 4d5d50e..37a53ea 100644
--- a/etcd.conf
+++ b/etcd.conf
@@ -1,34 +1,34 @@
-# This configuration file is written in [TOML](https://github.com/mojombo/toml)
-
-# addr = "127.0.0.1:4001"
-# bind_addr = "127.0.0.1:4001"
-# ca_file = ""
-# cert_file = ""
-# cors = []
-# cpu_profile_file = ""
-data_dir = "/var/lib/etcd/default.etcd"
-# discovery = "http://etcd.local:4001/v2/keys/_etcd/registry/examplecluster"
-# http_read_timeout = 10
-# http_write_timeout = 10
-# key_file = ""
-# peers = []
-# peers_file = ""
-# max_cluster_size = 9
-# max_result_buffer = 1024
-# max_retry_attempts = 3
-name = "default"
-# snapshot = false
-# verbose = false
-# very_verbose = false
-
-# [peer]
-# addr = "127.0.0.1:7001"
-# bind_addr = "127.0.0.1:7001"
-# ca_file = ""
-# cert_file = ""
-# key_file = ""
-
-# [cluster]
-# active_size = 9
-# remove_delay = 1800.0
-# sync_interval = 5.0
+# [member]
+ETCD_NAME=default
+ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
+#ETCD_SNAPSHOT_COUNTER="10000"
+#ETCD_HEARTBEAT_INTERVAL="100"
+#ETCD_ELECTION_TIMEOUT="1000"
+#ETCD_LISTEN_PEER_URLS="http://localhost:2380,http://localhost:7001"
+#ETCD_LISTEN_CLIENT_URLS="http://localhost:2379,http://localhost:4001"
+#ETCD_MAX_SNAPSHOTS="5"
+#ETCD_MAX_WALS="5"
+#ETCD_CORS=""
+#
+#[cluster]
+#ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380,http://localhost:7001"
+# if you use different ETCD_NAME (e.g. test), set ETCD_INITIAL_CLUSTER value for this name, i.e. "test=http://..."
+#ETCD_INITIAL_CLUSTER="default=http://localhost:2380,default=http://localhost:7001"
+#ETCD_INITIAL_CLUSTER_STATE="new"
+#ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"
+#ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379,http://localhost:4001"
+#ETCD_DISCOVERY=""
+#ETCD_DISCOVERY_SRV=""
+#ETCD_DISCOVERY_FALLBACK="proxy"
+#ETCD_DISCOVERY_PROXY=""
+#
+#[proxy]
+#ETCD_PROXY="off"
+#
+#[security]
+#ETCD_CA_FILE=""
+#ETCD_CERT_FILE=""
+#ETCD_KEY_FILE=""
+#ETCD_PEER_CA_FILE=""
+#ETCD_PEER_CERT_FILE=""
+#ETCD_PEER_KEY_FILE=""
diff --git a/etcd.service b/etcd.service
index 85c5953..55c1bba 100644
--- a/etcd.service
+++ b/etcd.service
@@ -6,7 +6,7 @@ After=network.target
Type=simple
# etc logs to the journal directly, suppress double logging
StandardOutput=null
-WorkingDirectory=/var/lib/etcd/`$hostname`.etcd
+EnvironmentFile=-/etc/etcd/etcd.conf
User=etcd
ExecStart=/usr/bin/etcd
diff --git a/etcd.spec b/etcd.spec
index 5040198..180c907 100644
--- a/etcd.spec
+++ b/etcd.spec
@@ -9,16 +9,19 @@
Name: %{repo}
Version: 2.0.1
-Release: 0.1%{?dist}
+Release: 0.2%{?dist}
Summary: A highly-available key value store for shared configuration
License: ASL 2.0
URL: https://%{import_path}
Source0: https://%{import_path}/archive/v%{version}.tar.gz
Source1: %{name}.service
Source2: %{name}.conf
+
+Patch0: etcd-2.0.1-Replace-depricated-ErrWrongType-with-its-local-defin.patch
+
ExclusiveArch: %{ix86} x86_64 %{arm}
BuildRequires: golang >= 1.3.3
-BuildRequires: golang(code.google.com/p/gogoprotobuf)
+BuildRequires: golang(code.google.com/p/gogoprotobuf/proto)
BuildRequires: golang(github.com/codegangsta/cli)
BuildRequires: golang(github.com/coreos/go-etcd/etcd)
BuildRequires: golang(golang.org/x/net/context)
@@ -35,7 +38,7 @@ A highly-available key value store for shared configuration.
%package devel
BuildRequires: golang >= 1.2.1-3
-BuildRequires: golang(code.google.com/p/gogoprotobuf)
+BuildRequires: golang(code.google.com/p/gogoprotobuf/proto)
BuildRequires: golang(github.com/codegangsta/cli)
BuildRequires: golang(github.com/coreos/go-etcd/etcd)
BuildRequires: golang(golang.org/x/net/context)
@@ -90,6 +93,8 @@ find . -name "*.go" \
-print |\
xargs sed -i 's/github.com\/coreos\/etcd\/Godeps\/_workspace\/src\///g'
+%patch0 -p1
+
%build
# Make link for etcd itself
mkdir -p src/github.com/coreos
@@ -111,6 +116,7 @@ install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}
install -m 644 -t %{buildroot}%{_sysconfdir}/%{name} %{SOURCE2}
+
# And create /var/lib/etcd
install -d -m 0755 %{buildroot}%{_sharedstatedir}/%{name}
@@ -178,6 +184,11 @@ getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_sharedstatedir}/
%{gopath}/src/%{import_path}
%changelog
+* Wed Feb 18 2015 jchaloup <jchaloup at redhat.com> - 2.0.1-0.2
+- Update configuration and service file
+ Fix depricated ErrWrongType after update of gogo/protobuf
+ related: #1191441
+
* Wed Feb 11 2015 jchaloup <jchaloup at redhat.com> - 2.0.1-0.1
- Update to 2.0.1
resolves: #1191441
More information about the scm-commits
mailing list