diff --git a/.etcd.metadata b/.etcd.metadata index d61ffff..1ee7909 100644 --- a/.etcd.metadata +++ b/.etcd.metadata @@ -1 +1 @@ -a488474d0347ad895536c192febc59e9971ef265 SOURCES/v2.3.7.tar.gz +3fe234eef6e02953d40657dfb1b3f612af98f402 SOURCES/etcd-fc00305.tar.gz diff --git a/.gitignore b/.gitignore index d1932c4..43090de 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/v2.3.7.tar.gz +SOURCES/etcd-fc00305.tar.gz diff --git a/SOURCES/0001-change-import-paths.patch b/SOURCES/0001-change-import-paths.patch new file mode 100644 index 0000000..0bf1d02 --- /dev/null +++ b/SOURCES/0001-change-import-paths.patch @@ -0,0 +1,81 @@ +From bed55580f972cc08209357fce5589fefadf398af Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Tue, 17 May 2016 21:44:45 +0200 +Subject: [PATCH] change import paths + +--- + tools/benchmark/cmd/put.go | 2 +- + tools/benchmark/cmd/range.go | 2 +- + tools/benchmark/cmd/root.go | 2 +- + tools/benchmark/cmd/stm.go | 2 +- + tools/benchmark/cmd/watch.go | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/tools/benchmark/cmd/put.go b/tools/benchmark/cmd/put.go +index 5f92dd6..557d3f5 100644 +--- a/tools/benchmark/cmd/put.go ++++ b/tools/benchmark/cmd/put.go +@@ -24,7 +24,7 @@ import ( + v3 "github.com/coreos/etcd/clientv3" + "github.com/spf13/cobra" + "golang.org/x/net/context" +- "gopkg.in/cheggaaa/pb.v1" ++ "github.com/cheggaaa/pb" + ) + + // putCmd represents the put command +diff --git a/tools/benchmark/cmd/range.go b/tools/benchmark/cmd/range.go +index 6e67e96..89a5f66 100644 +--- a/tools/benchmark/cmd/range.go ++++ b/tools/benchmark/cmd/range.go +@@ -22,7 +22,7 @@ import ( + v3 "github.com/coreos/etcd/clientv3" + "github.com/spf13/cobra" + "golang.org/x/net/context" +- "gopkg.in/cheggaaa/pb.v1" ++ "github.com/cheggaaa/pb" + ) + + // rangeCmd represents the range command +diff --git a/tools/benchmark/cmd/root.go b/tools/benchmark/cmd/root.go +index a40731b..a7678c2 100644 +--- a/tools/benchmark/cmd/root.go ++++ b/tools/benchmark/cmd/root.go +@@ -19,7 +19,7 @@ import ( + + "github.com/coreos/etcd/pkg/transport" + "github.com/spf13/cobra" +- "gopkg.in/cheggaaa/pb.v1" ++ "github.com/cheggaaa/pb" + ) + + // This represents the base command when called without any subcommands +diff --git a/tools/benchmark/cmd/stm.go b/tools/benchmark/cmd/stm.go +index ce29637..ac677fd 100644 +--- a/tools/benchmark/cmd/stm.go ++++ b/tools/benchmark/cmd/stm.go +@@ -25,7 +25,7 @@ import ( + v3sync "github.com/coreos/etcd/clientv3/concurrency" + "github.com/spf13/cobra" + "golang.org/x/net/context" +- "gopkg.in/cheggaaa/pb.v1" ++ "github.com/cheggaaa/pb" + ) + + // stmCmd represents the STM benchmark command +diff --git a/tools/benchmark/cmd/watch.go b/tools/benchmark/cmd/watch.go +index cd20251..376ee74 100644 +--- a/tools/benchmark/cmd/watch.go ++++ b/tools/benchmark/cmd/watch.go +@@ -26,7 +26,7 @@ import ( + + "github.com/spf13/cobra" + "golang.org/x/net/context" +- "gopkg.in/cheggaaa/pb.v1" ++ "github.com/cheggaaa/pb" + ) + + // watchCmd represents the watch command +-- +1.9.3 + diff --git a/SOURCES/bump-tls-version-to-1.2.patch b/SOURCES/bump-tls-version-to-1.2.patch deleted file mode 100644 index 8a6c21b..0000000 --- a/SOURCES/bump-tls-version-to-1.2.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8563eec864585f3239e37400aad7d085ea19f2eb Mon Sep 17 00:00:00 2001 -From: Jan Chaloupka -Date: Mon, 18 Jul 2016 18:23:33 +0200 -Subject: [PATCH] bump tls version to 1.2 - ---- - pkg/transport/listener.go | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pkg/transport/listener.go b/pkg/transport/listener.go -index 56c77b4..8b04d2b 100644 ---- a/pkg/transport/listener.go -+++ b/pkg/transport/listener.go -@@ -119,7 +119,7 @@ func (info TLSInfo) baseConfig() (*tls.Config, error) { - - cfg := &tls.Config{ - Certificates: []tls.Certificate{tlsCert}, -- MinVersion: tls.VersionTLS10, -+ MinVersion: tls.VersionTLS12, - } - return cfg, nil - } --- -1.9.3 - diff --git a/SOURCES/bz1350875-disaster-recovery-with-copies.patch b/SOURCES/bz1350875-disaster-recovery-with-copies.patch deleted file mode 100644 index 7615046..0000000 --- a/SOURCES/bz1350875-disaster-recovery-with-copies.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- etcd-2.3.7/etcdctl/command/backup_command.go.orig 2016-08-01 17:43:46.149281982 +0200 -+++ etcd-2.3.7/etcdctl/command/backup_command.go 2016-08-01 17:43:47.988279830 +0200 -@@ -19,6 +19,7 @@ import ( - "log" - "os" - "path" -+ "strconv" - "time" - - "github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli" -@@ -40,6 +41,8 @@ func NewBackupCommand() cli.Command { - cli.StringFlag{Name: "wal-dir", Value: "", Usage: "Path to the etcd wal dir"}, - cli.StringFlag{Name: "backup-dir", Value: "", Usage: "Path to the backup dir"}, - cli.StringFlag{Name: "backup-wal-dir", Value: "", Usage: "Path to the backup wal dir"}, -+ cli.BoolFlag{Name: "keep-cluster-id", Usage: "Do not rewrite the cluster id"}, -+ cli.StringFlag{Name: "node-id", Value: "", Usage: "Use custom node id instead of a random value"}, - }, - Action: handleBackup, - } -@@ -99,8 +102,19 @@ func handleBackup(c *cli.Context) { - var metadata etcdserverpb.Metadata - pbutil.MustUnmarshal(&metadata, wmetadata) - idgen := idutil.NewGenerator(0, time.Now()) -- metadata.NodeID = idgen.Next() -- metadata.ClusterID = idgen.Next() -+ explicitNodeId := c.String("node-id") -+ if explicitNodeId != "" { -+ metadata.NodeID, err = strconv.ParseUint(explicitNodeId, 16, 64) -+ if err != nil { -+ log.Fatal(err) -+ } -+ } else { -+ metadata.NodeID = idgen.Next() -+ } -+ keepClusterId := c.Bool("keep-cluster-id") -+ if !keepClusterId { -+ metadata.ClusterID = idgen.Next() -+ } - - neww, err := wal.Create(destWAL, pbutil.MustMarshal(&metadata)) - if err != nil { diff --git a/SOURCES/etcd.conf b/SOURCES/etcd.conf index d2d2285..bc7bbbc 100644 --- a/SOURCES/etcd.conf +++ b/SOURCES/etcd.conf @@ -22,7 +22,6 @@ ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379" #ETCD_DISCOVERY_SRV="" #ETCD_DISCOVERY_FALLBACK="proxy" #ETCD_DISCOVERY_PROXY="" -#ETCD_STRICT_RECONFIG_CHECK="false" # #[proxy] #ETCD_PROXY="off" @@ -46,6 +45,3 @@ ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379" #ETCD_DEBUG="false" # examples for -log-package-levels etcdserver=WARNING,security=DEBUG #ETCD_LOG_PACKAGE_LEVELS="" -# -#[profiling] -#ETCD_ENABLE_PPROF="false" diff --git a/SOURCES/set-etcd-advertise-client-urls-if-needed.patch b/SOURCES/set-etcd-advertise-client-urls-if-needed.patch deleted file mode 100644 index ea7e38c..0000000 --- a/SOURCES/set-etcd-advertise-client-urls-if-needed.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 22702c228513ef21d3b9fdc6d28220cafb64cd3c Mon Sep 17 00:00:00 2001 -From: Jan Chaloupka -Date: Tue, 7 Jul 2015 03:04:57 +0200 -Subject: [PATCH] set ETCD_ADVERTISE_CLIENT_URLS if needed - ---- - main.go | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/main.go b/main.go -index d627fb0..844b175 100644 ---- a/main.go -+++ b/main.go -@@ -24,7 +24,15 @@ - package main - - import "github.com/coreos/etcd/etcdmain" -+import "os" -+import "log" - - func main() { -+ etcd_listen_client_urls := os.Getenv("ETCD_LISTEN_CLIENT_URLS") -+ if etcd_listen_client_urls != "" && -+ os.Getenv("ETCD_ADVERTISE_CLIENT_URLS") == "" { -+ if os.Setenv("ETCD_ADVERTISE_CLIENT_URLS", etcd_listen_client_urls) == nil { -+ log.Printf("etcd: ETCD_LISTEN_CLIENT_URLS set but ETCD_ADVERTISE_CLIENT_URLS not, setting ETCD_ADVERTISE_CLIENT_URLS to ETCD_ADVERTISE_CLIENT_URLS")} -+ } - etcdmain.Main() - } --- -1.9.3 - diff --git a/SPECS/etcd.spec b/SPECS/etcd.spec index a9579f7..9217a8c 100644 --- a/SPECS/etcd.spec +++ b/SPECS/etcd.spec @@ -2,13 +2,18 @@ %global with_bundled 1 %global with_debug 1 %global with_check 0 +%global with_unit_test 0 %if 0%{?with_debug} -# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12 %global _dwz_low_mem_die_limit 0 %else %global debug_package %{nil} %endif + +%if ! 0%{?gobuild:1} +%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**}; +%endif + %global provider github %global provider_tld com %global project coreos @@ -16,49 +21,69 @@ # https://github.com/coreos/etcd %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit fd17c9101d94703f6f4c3d8d6cfb72b62b894cd7 +%global commit fc00305a2e59b4c2d4a53c9fbb4d30741a96ea67 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -Name: %{repo} -Version: 2.3.7 -Release: 4%{?dist} +%global system_name etcd + +Name: etcd +Version: 3.0.15 +Release: 1%{?dist} Summary: A highly-available key value store for shared configuration License: ASL 2.0 URL: https://%{provider_prefix} -Source0: https://%{provider_prefix}/archive/v%{version}.tar.gz -Source1: %{name}.service -Source2: %{name}.conf - -Patch1: set-etcd-advertise-client-urls-if-needed.patch -Patch2: bump-tls-version-to-1.2.patch -Patch3: bz1350875-disaster-recovery-with-copies.patch +Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz +Source1: %{system_name}.service +Source2: %{system_name}.conf +Patch2: 0001-change-import-paths.patch +# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required ExclusiveArch: x86_64 -BuildRequires: golang >= 1.5 +# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. +BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} + +Obsoletes: etcd3 < 3.0.15 +Provides: etcd3 = %{version}-%{release} %if ! 0%{?with_bundled} +BuildRequires: golang(github.com/akrennmair/gopcap) BuildRequires: golang(github.com/bgentry/speakeasy) BuildRequires: golang(github.com/boltdb/bolt) +BuildRequires: golang(github.com/cheggaaa/pb) +BuildRequires: golang(github.com/cockroachdb/cmux) BuildRequires: golang(github.com/codegangsta/cli) BuildRequires: golang(github.com/coreos/go-semver/semver) BuildRequires: golang(github.com/coreos/go-systemd/daemon) BuildRequires: golang(github.com/coreos/go-systemd/util) BuildRequires: golang(github.com/coreos/pkg/capnslog) +BuildRequires: golang(github.com/dustin/go-humanize) +BuildRequires: golang(github.com/ghodss/yaml) BuildRequires: golang(github.com/gogo/protobuf/proto) BuildRequires: golang(github.com/google/btree) BuildRequires: golang(github.com/jonboulle/clockwork) +BuildRequires: golang(github.com/kr/pty) +BuildRequires: golang(github.com/olekukonko/tablewriter) BuildRequires: golang(github.com/prometheus/client_golang/prometheus) BuildRequires: golang(github.com/prometheus/procfs) -# used only by tools/v3benchmark/main.go:main -BuildRequires: golang(github.com/rakyll/pb) -BuildRequires: golang(github.com/stretchr/testify/assert) +BuildRequires: golang(github.com/spacejam/loghisto) +BuildRequires: golang(github.com/spf13/cobra) +BuildRequires: golang(github.com/spf13/pflag) BuildRequires: golang(github.com/ugorji/go/codec) BuildRequires: golang(github.com/xiang90/probing) BuildRequires: golang(golang.org/x/crypto/bcrypt) BuildRequires: golang(golang.org/x/net/context) +BuildRequires: golang(golang.org/x/net/http2) BuildRequires: golang(google.golang.org/grpc) +BuildRequires: golang(google.golang.org/grpc/codes) +BuildRequires: golang(google.golang.org/grpc/credentials) +BuildRequires: golang(google.golang.org/grpc/grpclog) +BuildRequires: golang(google.golang.org/grpc/transport) +%else +BuildRequires: libpcap-devel %endif + BuildRequires: systemd + Requires(pre): shadow-utils Requires(post): systemd Requires(preun): systemd @@ -73,89 +98,137 @@ Summary: etcd golang devel libraries BuildArch: noarch %if 0%{?with_check} -BuildRequires: golang(github.com/bgentry/speakeasy) -BuildRequires: golang(github.com/boltdb/bolt) -BuildRequires: golang(github.com/codegangsta/cli) -BuildRequires: golang(github.com/coreos/go-semver/semver) -BuildRequires: golang(github.com/coreos/go-systemd/daemon) -BuildRequires: golang(github.com/coreos/go-systemd/util) -BuildRequires: golang(github.com/coreos/pkg/capnslog) -BuildRequires: golang(github.com/gogo/protobuf/proto) -BuildRequires: golang(github.com/google/btree) -BuildRequires: golang(github.com/jonboulle/clockwork) -BuildRequires: golang(github.com/prometheus/client_golang/prometheus) -BuildRequires: golang(github.com/prometheus/procfs) -BuildRequires: golang(github.com/stretchr/testify/assert) -BuildRequires: golang(github.com/ugorji/go/codec) -BuildRequires: golang(github.com/xiang90/probing) -BuildRequires: golang(golang.org/x/crypto/bcrypt) -BuildRequires: golang(golang.org/x/net/context) -BuildRequires: golang(golang.org/x/net/netutil) -BuildRequires: golang(google.golang.org/grpc) +BuildRequires: golang(github.com/cheggaaa/pb) +BuildRequires: golang(github.com/bgentry/speakeasy) +BuildRequires: golang(github.com/boltdb/bolt) +BuildRequires: golang(github.com/cockroachdb/cmux) +BuildRequires: golang(github.com/codegangsta/cli) +BuildRequires: golang(github.com/coreos/go-semver/semver) +BuildRequires: golang(github.com/coreos/go-systemd/daemon) +BuildRequires: golang(github.com/coreos/go-systemd/util) +BuildRequires: golang(github.com/coreos/pkg/capnslog) +BuildRequires: golang(github.com/dustin/go-humanize) +BuildRequires: golang(github.com/ghodss/yaml) +BuildRequires: golang(github.com/gogo/protobuf/proto) +BuildRequires: golang(github.com/google/btree) +BuildRequires: golang(github.com/jonboulle/clockwork) +BuildRequires: golang(github.com/kr/pty) +BuildRequires: golang(github.com/olekukonko/tablewriter) +BuildRequires: golang(github.com/prometheus/client_golang/prometheus) +BuildRequires: golang(github.com/prometheus/procfs) +BuildRequires: golang(github.com/spf13/cobra) +BuildRequires: golang(github.com/spf13/pflag) +BuildRequires: golang(github.com/ugorji/go/codec) +BuildRequires: golang(github.com/xiang90/probing) +BuildRequires: golang(golang.org/x/crypto/bcrypt) +BuildRequires: golang(golang.org/x/net/context) +BuildRequires: golang(golang.org/x/net/http2) +BuildRequires: golang(google.golang.org/grpc) +BuildRequires: golang(google.golang.org/grpc/codes) +BuildRequires: golang(google.golang.org/grpc/credentials) +BuildRequires: golang(google.golang.org/grpc/grpclog) %endif +Requires: golang(github.com/cheggaaa/pb) Requires: golang(github.com/bgentry/speakeasy) Requires: golang(github.com/boltdb/bolt) +Requires: golang(github.com/cockroachdb/cmux) Requires: golang(github.com/codegangsta/cli) Requires: golang(github.com/coreos/go-semver/semver) Requires: golang(github.com/coreos/go-systemd/daemon) Requires: golang(github.com/coreos/go-systemd/util) Requires: golang(github.com/coreos/pkg/capnslog) +Requires: golang(github.com/dustin/go-humanize) +Requires: golang(github.com/ghodss/yaml) Requires: golang(github.com/gogo/protobuf/proto) Requires: golang(github.com/google/btree) Requires: golang(github.com/jonboulle/clockwork) +Requires: golang(github.com/kr/pty) +Requires: golang(github.com/olekukonko/tablewriter) Requires: golang(github.com/prometheus/client_golang/prometheus) Requires: golang(github.com/prometheus/procfs) -Requires: golang(github.com/stretchr/testify/assert) +Requires: golang(github.com/spf13/cobra) +Requires: golang(github.com/spf13/pflag) Requires: golang(github.com/ugorji/go/codec) Requires: golang(github.com/xiang90/probing) Requires: golang(golang.org/x/crypto/bcrypt) Requires: golang(golang.org/x/net/context) -Requires: golang(golang.org/x/net/netutil) +Requires: golang(golang.org/x/net/http2) Requires: golang(google.golang.org/grpc) +Requires: golang(google.golang.org/grpc/codes) +Requires: golang(google.golang.org/grpc/credentials) +Requires: golang(google.golang.org/grpc/grpclog) +Provides: golang(%{import_path}/alarm) = %{version}-%{release} +Provides: golang(%{import_path}/auth) = %{version}-%{release} +Provides: golang(%{import_path}/auth/authpb) = %{version}-%{release} Provides: golang(%{import_path}/client) = %{version}-%{release} +Provides: golang(%{import_path}/clientv3) = %{version}-%{release} +Provides: golang(%{import_path}/clientv3/concurrency) = %{version}-%{release} +Provides: golang(%{import_path}/clientv3/integration) = %{version}-%{release} +Provides: golang(%{import_path}/clientv3/mirror) = %{version}-%{release} +Provides: golang(%{import_path}/compactor) = %{version}-%{release} +Provides: golang(%{import_path}/contrib/recipes) = %{version}-%{release} Provides: golang(%{import_path}/discovery) = %{version}-%{release} +Provides: golang(%{import_path}/e2e) = %{version}-%{release} Provides: golang(%{import_path}/error) = %{version}-%{release} -Provides: golang(%{import_path}/etcdctl/command) = %{version}-%{release} -Provides: golang(%{import_path}/etcdctlv3/command) = %{version}-%{release} +Provides: golang(%{import_path}/etcdctl/ctlv2) = %{version}-%{release} +Provides: golang(%{import_path}/etcdctl/ctlv2/command) = %{version}-%{release} +Provides: golang(%{import_path}/etcdctl/ctlv3) = %{version}-%{release} +Provides: golang(%{import_path}/etcdctl/ctlv3/command) = %{version}-%{release} Provides: golang(%{import_path}/etcdmain) = %{version}-%{release} Provides: golang(%{import_path}/etcdserver) = %{version}-%{release} +Provides: golang(%{import_path}/etcdserver/api) = %{version}-%{release} +Provides: golang(%{import_path}/etcdserver/api/v2http) = %{version}-%{release} +Provides: golang(%{import_path}/etcdserver/api/v2http/httptypes) = %{version}-%{release} Provides: golang(%{import_path}/etcdserver/api/v3rpc) = %{version}-%{release} +Provides: golang(%{import_path}/etcdserver/api/v3rpc/rpctypes) = %{version}-%{release} Provides: golang(%{import_path}/etcdserver/auth) = %{version}-%{release} -Provides: golang(%{import_path}/etcdserver/etcdhttp) = %{version}-%{release} -Provides: golang(%{import_path}/etcdserver/etcdhttp/httptypes) = %{version}-%{release} Provides: golang(%{import_path}/etcdserver/etcdserverpb) = %{version}-%{release} +Provides: golang(%{import_path}/etcdserver/membership) = %{version}-%{release} Provides: golang(%{import_path}/etcdserver/stats) = %{version}-%{release} Provides: golang(%{import_path}/integration) = %{version}-%{release} +Provides: golang(%{import_path}/lease) = %{version}-%{release} +Provides: golang(%{import_path}/lease/leasehttp) = %{version}-%{release} +Provides: golang(%{import_path}/lease/leasepb) = %{version}-%{release} +Provides: golang(%{import_path}/mvcc) = %{version}-%{release} +Provides: golang(%{import_path}/mvcc/backend) = %{version}-%{release} +Provides: golang(%{import_path}/mvcc/mvccpb) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/adt) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/contention) = %{version}-%{release} Provides: golang(%{import_path}/pkg/cors) = %{version}-%{release} Provides: golang(%{import_path}/pkg/crc) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/expect) = %{version}-%{release} Provides: golang(%{import_path}/pkg/fileutil) = %{version}-%{release} Provides: golang(%{import_path}/pkg/flags) = %{version}-%{release} Provides: golang(%{import_path}/pkg/httputil) = %{version}-%{release} Provides: golang(%{import_path}/pkg/idutil) = %{version}-%{release} Provides: golang(%{import_path}/pkg/ioutil) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/logutil) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/mock/mockstorage) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/mock/mockstore) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/mock/mockwait) = %{version}-%{release} Provides: golang(%{import_path}/pkg/netutil) = %{version}-%{release} Provides: golang(%{import_path}/pkg/osutil) = %{version}-%{release} Provides: golang(%{import_path}/pkg/pathutil) = %{version}-%{release} Provides: golang(%{import_path}/pkg/pbutil) = %{version}-%{release} Provides: golang(%{import_path}/pkg/runtime) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/schedule) = %{version}-%{release} Provides: golang(%{import_path}/pkg/testutil) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/timeutil) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/tlsutil) = %{version}-%{release} Provides: golang(%{import_path}/pkg/transport) = %{version}-%{release} Provides: golang(%{import_path}/pkg/types) = %{version}-%{release} Provides: golang(%{import_path}/pkg/wait) = %{version}-%{release} -Provides: golang(%{import_path}/proxy) = %{version}-%{release} +Provides: golang(%{import_path}/proxy/httpproxy) = %{version}-%{release} +Provides: golang(%{import_path}/proxy/tcpproxy) = %{version}-%{release} Provides: golang(%{import_path}/raft) = %{version}-%{release} Provides: golang(%{import_path}/raft/raftpb) = %{version}-%{release} Provides: golang(%{import_path}/raft/rafttest) = %{version}-%{release} Provides: golang(%{import_path}/rafthttp) = %{version}-%{release} Provides: golang(%{import_path}/snap) = %{version}-%{release} Provides: golang(%{import_path}/snap/snappb) = %{version}-%{release} -Provides: golang(%{import_path}/storage) = %{version}-%{release} -Provides: golang(%{import_path}/storage/backend) = %{version}-%{release} -Provides: golang(%{import_path}/storage/storagepb) = %{version}-%{release} Provides: golang(%{import_path}/store) = %{version}-%{release} +Provides: golang(%{import_path}/tools/benchmark/cmd) = %{version}-%{release} Provides: golang(%{import_path}/tools/functional-tester/etcd-agent/client) = %{version}-%{release} Provides: golang(%{import_path}/version) = %{version}-%{release} Provides: golang(%{import_path}/wal) = %{version}-%{release} @@ -188,22 +261,16 @@ providing packages with %{import_path} prefix. %endif %prep -%setup -qn %{name}-%{version} -%if ! 0%{?with_bundled} -rm -rf Godeps/_workspace/src/github.com/{codegangsta,coreos,stretchr,jonboulle} -rm -rf Godeps/_workspace/src/{code.google.com,bitbucket.org,golang.org} - -find . -name "*.go" \ - -print |\ - xargs sed -i 's/github.com\/coreos\/etcd\/Godeps\/_workspace\/src\///g' +%setup -q -n %{repo}-%{commit} +# move content of vendor under Godeps as has been so far +mkdir -p Godeps/_workspace/src +mv cmd/vendor/* Godeps/_workspace/src/. -%endif -%patch1 -p1 +%if ! 0%{?with_bundled} %patch2 -p1 -%patch3 -p1 +%endif %build -# Make link for etcd itself mkdir -p src/github.com/coreos ln -s ../../../ src/github.com/coreos/etcd @@ -213,29 +280,28 @@ export GOPATH=$(pwd):%{gopath} export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath} %endif -%if 0%{?with_debug} -# *** ERROR: No build ID note found in /.../BUILDROOT/etcd-2.0.0-1.rc1.fc22.x86_64/usr/bin/etcd -function gobuild { go build -a -installsuffix cgo -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -X %{import_path}/version.GitSHA %{shortcommit}" -v -x "$@"; } +%if ! 0%{?with_debug} +export LDFLAGS="-X %{import_path}/version.GitSHA %{shortcommit}" %else -function gobuild { go build -a -installsuffix cgo -ldflags "-X %{import_path}/version.GitSHA %{shortcommit}" "$@"; } +export LDFLAGS="-X %{import_path}/version.GitSHA %{shortcommit} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" %endif -export CGO_ENABLED=0 - -gobuild -o bin/etcd %{import_path} -gobuild -o bin/etcdctl %{import_path}/etcdctl +%gobuild -o bin/%{system_name} %{import_path}/cmd +%gobuild -o bin/%{system_name}ctl %{import_path}/%{system_name}ctl +%gobuild -o bin/%{system_name}-top %{import_path}/tools/%{system_name}-top %install -install -D -p -m 0755 bin/%{name} %{buildroot}%{_bindir}/%{name} -install -D -p -m 0755 bin/%{name}ctl %{buildroot}%{_bindir}/%{name}ctl -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} - +install -D -p -m 0755 bin/%{system_name} %{buildroot}%{_bindir}/%{system_name} +install -D -p -m 0755 bin/%{system_name}ctl %{buildroot}%{_bindir}/%{system_name}ctl +install -D -p -m 0755 bin/%{system_name}-top %{buildroot}%{_bindir}/%{system_name}-top +install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{system_name}.service +install -d -m 0755 %{buildroot}%{_sysconfdir}/%{system_name} +install -m 644 -t %{buildroot}%{_sysconfdir}/%{system_name} %{SOURCE2} # And create /var/lib/etcd -install -d -m 0755 %{buildroot}%{_sharedstatedir}/%{name} +install -d -m 0755 %{buildroot}%{_sharedstatedir}/%{system_name} +# source codes for building projects %if 0%{?with_devel} install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list @@ -276,298 +342,142 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath} %global gotest go test %endif -#%gotest %{import_path}/client +export BIN_PATH="$(pwd)/bin" + +%gotest %{import_path}/client +%gotest %{import_path}/clientv3 +%gotest %{import_path}/clientv3/integration +%gotest %{import_path}/compactor +%gotest %{import_path}/contrib/raftexample %gotest %{import_path}/discovery +#%%gotest %%{import_path}/e2e %gotest %{import_path}/error %gotest %{import_path}/etcdctl/command %gotest %{import_path}/etcdmain -#%gotest %{import_path}/etcdserver +%gotest %{import_path}/etcdserver %gotest %{import_path}/etcdserver/auth #%gotest %{import_path}/etcdserver/etcdhttp #%gotest %{import_path}/etcdserver/etcdhttp/httptypes -#%gotest %{import_path}/integration -#%gotest %{import_path}/pkg/cors +#%%gotest %%{import_path}/integration +%gotest %{import_path}/lease +%gotest %{import_path}/pkg/adt +%gotest %{import_path}/pkg/cors %gotest %{import_path}/pkg/crc -#%gotest %{import_path}/pkg/fileutil +%gotest %{import_path}/pkg/fileutil %gotest %{import_path}/pkg/flags %gotest %{import_path}/pkg/idutil %gotest %{import_path}/pkg/ioutil +%gotest %{import_path}/pkg/logutil %gotest %{import_path}/pkg/netutil %gotest %{import_path}/pkg/osutil %gotest %{import_path}/pkg/pathutil %gotest %{import_path}/pkg/pbutil -%gotest %{import_path}/pkg/timeutil -#%gotest %{import_path}/pkg/transport +%gotest %{import_path}/pkg/schedule +%gotest %{import_path}/pkg/testutil +%gotest %{import_path}/pkg/transport %gotest %{import_path}/pkg/types %gotest %{import_path}/pkg/wait %gotest %{import_path}/proxy %gotest %{import_path}/raft -#%gotest %{import_path}/raft/rafttest +%gotest %{import_path}/raft/rafttest %gotest %{import_path}/rafthttp %gotest %{import_path}/snap -#%gotest %{import_path}/storage -#%gotest %{import_path}/storage/backend -#%gotest %{import_path}/store -#%gotest %{import_path}/tools/functional-tester/etcd-agent +%gotest %{import_path}/storage +%gotest %{import_path}/storage/backend +%gotest %{import_path}/store +%gotest %{import_path}/tools/functional-tester/etcd-agent %gotest %{import_path}/version %gotest %{import_path}/wal %endif %pre -getent group %{name} >/dev/null || groupadd -r %{name} -getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_sharedstatedir}/%{name} \ - -s /sbin/nologin -c "etcd user" %{name} +getent group %{system_name} >/dev/null || groupadd -r %{system_name} +getent passwd %{system_name} >/dev/null || useradd -r -g %{system_name} -d %{_sharedstatedir}/%{system_name} \ + -s /sbin/nologin -c "etcd user" %{system_name} %post -%systemd_post %{name}.service +%systemd_post %{system_name}.service %preun -%systemd_preun %{name}.service +%systemd_preun %{system_name}.service %postun -%systemd_postun %{name}.service +%systemd_postun %{system_name}.service #define license tag if not already defined %{!?_licensedir:%global license %doc} %files %license LICENSE -%doc README.md Documentation/internal-protocol-versioning.md -%doc Godeps/Godeps.json -%config(noreplace) %{_sysconfdir}/%{name} -%{_bindir}/%{name} -%{_bindir}/%{name}ctl -%dir %attr(-,%{name},%{name}) %{_sharedstatedir}/%{name} -%{_unitdir}/%{name}.service +%doc *.md +%doc cmd/Godeps/Godeps.json +%config(noreplace) %{_sysconfdir}/%{system_name} +%{_bindir}/%{system_name} +%{_bindir}/%{system_name}ctl +%{_bindir}/%{system_name}-top +%dir %attr(-,%{system_name},%{system_name}) %{_sharedstatedir}/%{system_name} +%{_unitdir}/%{system_name}.service %if 0%{?with_devel} %files devel -f devel.file-list %license LICENSE -%doc README.md Documentation/internal-protocol-versioning.md -%doc Godeps/Godeps.json +%doc *.md +%doc cmd/Godeps/Godeps.json %dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} %endif %if 0%{?with_unit_test} %files unit-test -f unit-test.file-list %license LICENSE -%doc README.md Documentation/internal-protocol-versioning.md +%doc *.md %endif %changelog -* Mon Aug 15 2016 jchaloup - 2.3.7-4 -- Add --keep-cluster-id and --node-id to 'etcdctl backup' - resolves: #1350875 - -* Tue Jul 19 2016 jchaloup - 2.3.7-3 -- Bump minimal build-time golang version - resolves: #1357774 -- Add missing enable-pprof flag env into etcd.conf - resolves: #1357820 - -* Mon Jul 18 2016 jchaloup - 2.3.7-2 -- Bump tls version to 1.2 - resolves: #1357621 - -* Tue Jul 12 2016 jchaloup - 2.3.7-1 -- Update to 2.3.7 - resolves: #1355798 - -* Thu Mar 03 2016 jchaloup - 2.2.5-1 -- Update to 2.2.5 - resolves: #1314351 - -* Fri Jan 08 2016 jchaloup - 2.2.2-6 -- -strict-reconfig-check flag not yet in v2.2.2 - -* Tue Dec 29 2015 jchaloup - 2.2.2-5 -- go < 1.5 needs "-installsuffix cgo" too to accept CGO_ENABLED - -* Tue Dec 29 2015 jchaloup - 2.2.2-4 -- set CGO_ENABLED=0 when building etcd, - otherwise the binary is dynamically linked to glibc libraries - -* Tue Dec 29 2015 jchaloup - 2.2.2-3 -- bump release (2.2.2-2 already built) - -* Tue Dec 29 2015 jchaloup - 2.2.2-2 -- add missing options to etcd help - resolves: #1283119 -- change type to notify in etcd.service - resolves: #1269939 -- add more information when running etcd as a service - resolves: #1263077 - -* Tue Dec 29 2015 jchaloup - 2.2.2-1 -- Update to v2.2.2 - resolves: #1294702 -- update etcd.conf (add new options) -- build with debug info -- polish spec file - -* Mon Nov 16 2015 jchaloup - 2.1.1-4 -- Update etcd.conf: add new flag and fix -snapshot-count - resolves: #1282393 - -* Fri Oct 30 2015 jchaloup - 2.1.1-3 -- Add After=network-online.target and Wants=network-online.target - to etcd.service - resolves: #1276732 - -* Thu Jul 30 2015 jchaloup - 2.1.1-2 -- Update to v2.1.1 in RHEL - resolves: #1250707 - -* Mon Jul 20 2015 jchaloup - 2.1.1-1 -- fix definition of GOPATH for go1.5 -- fix definition of gobuild function for non-debug way -- Update to v2.1.1 - resolves: #1214958 - -* Fri Jul 10 2015 jchaloup - 2.0.13-3 -- set GOMAXPROCS to use all processors available - -* Mon Jun 29 2015 jchaloup - 2.0.13-2 -- Remove -s option from -ldflags string as it removes symbol table - 'go tool l6' gives explanation of all available options - resolves: #1236320 -- Set implicit value for ETCD_ADVERTISE_CLIENT_URLS if not set accordingly - Config files of etcd < 2.0.11-2 does not set ETCD_ADVERTISE_CLIENT_URLS - if ETCD_LISTEN_CLIENT_URLS is. Causing etcd to fail when updated to newe - resolves: #1236706 - -* Fri Jun 26 2015 jchaloup - 2.0.13-1 -- Update to v2.0.13 - -* Thu Jun 25 2015 jchaloup - 2.0.12-2 -- Add restart policy and set LimitNOFILE to/in etcd.service file -- Update etcd.config file: add new flags and remove depricated -- Update 'go build' flags for GIT_SHA (used in build script) -- Don't use 4001 and 7001 ports in etcd.conf, they are replaced with 2379 and 2380 - -* Wed Jun 24 2015 jchaloup - 2.0.12-1 -- Update to v2.0.12 -- Polish spec file - -* Wed Jun 17 2015 Fedora Release Engineering - 2.0.11-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Fri May 22 2015 jchaloup - 2.0.11-2 -- ETCD_ADVERTISE_CLIENT_URLS has to be set if ETCD_LISTEN_CLIENT_URLS is - related: #1222416 - -* Mon May 18 2015 jchaloup - 2.0.11-1 -- Update to v2.0.11 - resolves: #1222416 - -* Thu Apr 23 2015 jchaloup - 2.0.10-1 -- Update to v2.0.10 - resolves: #1214705 - -* Wed Apr 08 2015 jchaloup - 2.0.9-1 -- Update to v2.0.9 - resolves: #1209666 - -* Fri Apr 03 2015 jchaloup - 2.0.8-0.2 -- Update spec file to fit for rhel too (thanks to eparis) - related: #1207881 - -* Wed Apr 01 2015 jchaloup - 2.0.8-0.1 -- Update to v2.0.8 - resolves: #1207881 - -* Tue Mar 31 2015 jchaloup - 2.0.7-0.1 -- Update to v2.0.7 - Add Godeps.json to doc - related: #1191441 - -* Thu Mar 12 2015 jchaloup - 2.0.5-0.1 -- Bump to 9481945228b97c5d019596b921d8b03833964d9e (v2.0.5) - -* Tue Mar 10 2015 Eric Paris - 2.0.3-0.2 -- Fix .service files to work if no config file - -* Fri Feb 20 2015 jchaloup - 2.0.3-0.1 -- Bump to upstream 4d728cc8c488a545a8bdeafd054d9ccc2bfb6876 - -* Wed Feb 18 2015 jchaloup - 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 - 2.0.1-0.1 -- Update to 2.0.1 - resolves: #1191441 - -* Mon Feb 09 2015 jchaloup - 2.0.0-0.5 -- Add missing debug info to binaries (patch from Jan Kratochvil) - resolves: #1184257 - -* Fri Jan 30 2015 jchaloup - 2.0.0-0.4 -- Update to etcd-2.0.0 -- use gopath as the last directory to search for source code - related: #1176138 - -* Mon Jan 26 2015 jchaloup - 2.0.0-0.3.rc1 -- default to /var/lib/etcd/default.etcd as 2.0 uses that default (f21 commit byt eparis) - related: #1176138 - fix /etc/etcd/etcd.conf path - -* Tue Jan 20 2015 jchaloup - 2.0.0-0.2.rc1 -- Update of BuildRequires/Requires, Provides and test - Add BuildRequire on jonboulle/clockwork - related: #1176138 - -* Tue Dec 23 2014 Lokesh Mandvekar - 2.0.0-0.1.rc1 -- Resolves: rhbz#1176138 - update to v2.0.0-rc1 -- do not redefine gopath -- use jonboulle/clockwork from within Godeps - -* Fri Oct 17 2014 jchaloup - 0.4.6-7 -- Add ExclusiveArch for go_arches - -* Mon Oct 06 2014 jchaloup - 0.4.6-6 -- related: #1047194 - Remove dependency on go.net - -* Mon Oct 06 2014 jchaloup - 0.4.6-5 -- Fix the .service file so it can launch! - related: #1047194 +* Thu Dec 01 2016 jchaloup - 3.0.15-1 +- Update to 3.0.15 + Obsolete etcd3 < 3.0.15 + +* Fri Nov 18 2016 jchaloup - 3.0.14-3 +- Build with debug-info subpackage +- Until etcd3 obsoletes etcd it conflicts with it + +* Tue Nov 15 2016 Avesh Agarwal - 3.0.14-2 +- Resolves: #1395359 etcd3 should not obsolete etcd -* Mon Sep 22 2014 jchaloup - 0.4.6-4 -- resolves: #1047194 - Update to 0.4.6 from https://github.com/projectatomic/etcd-package +* Mon Nov 07 2016 jchaloup - 3.0.14-1 +- Update to v3.0.14 + related: #1386963 -* Tue Aug 19 2014 Adam Miller - 0.4.6-3 -- Add devel sub-package +* Thu Oct 27 2016 jchaloup - 3.0.13-1 +- Update to v3.0.13 + related: #1386963 -* Wed Aug 13 2014 Eric Paris - 0.4.6-2 -- Bump to 0.4.6 -- run as etcd, not root +* Fri Oct 21 2016 jchaloup - 3.0.12-3 +- etcdctl: fix migrate in outputing client.Node to json + resolves: #1386963 -* Sat Jun 07 2014 Fedora Release Engineering - 0.1.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild +* Tue Oct 18 2016 jchaloup - 3.0.12-2 +- Replace etcd with etcd3 when upgrading + resolves: #1384161 -* Sun Oct 20 2013 Peter Lemenkov - 0.1.2-5 -- goprotobuf library unbundled (see rhbz #1018477) -- go-log library unbundled (see rhbz #1018478) -- go-raft library unbundled (see rhbz #1018479) -- go-systemd library unbundled (see rhbz #1018480) -- kardianos library unbundled (see rhbz #1018481) +* Thu Oct 13 2016 jchaloup - 3.0.12-1 +- Update to v3.0.12 -* Sun Oct 13 2013 Peter Lemenkov - 0.1.2-4 -- go.net library unbundled (see rhbz #1018476) +* Thu Oct 06 2016 jchaloup - 3.0.10-1 +- Update to v3.0.10 -* Sat Oct 12 2013 Peter Lemenkov - 0.1.2-3 -- Prepare for packages unbundling -- Verbose build +* Fri Sep 23 2016 jchaloup - 3.0.3-2 +- Extend etcd.conf with new flags + resolves: #1378706 -* Sat Oct 12 2013 Peter Lemenkov - 0.1.2-2 -- Fix typo in the etc.service file +* Fri Jul 22 2016 jchaloup - 3.0.2-1 +- Update to v3.0.3 + related: #1347499 -* Sat Oct 12 2013 Peter Lemenkov - 0.1.2-1 -- Ver. 0.1.2 -- Integrate with systemd +* Tue Jul 12 2016 jchaloup - 3.0.2-1 +- Update to v3.0.2 + related: #1347499 -* Mon Aug 26 2013 Luke Cypret - 0.1.1-1 -- Initial creation +* Sun May 15 2016 jchaloup - 3.0.0-0.1.beta0 +- Build etcd3 v3.0.0-beta0 for AH 7.3 + resolves: #1347499