From 68b5f0056f1841b657cf0e5d74214076c2052c85 Mon Sep 17 00:00:00 2001 From: Uh Sado Date: Wed, 26 Jan 2022 02:58:03 +0000 Subject: [PATCH] etcd: added patched etcd --- .gitmodules | 3 +++ Makefile | 13 +++++++++---- etcd | 1 + go.mod | 2 ++ go.sum | 2 -- 5 files changed, 15 insertions(+), 6 deletions(-) create mode 160000 etcd diff --git a/.gitmodules b/.gitmodules index aad487369507..10e98b431a75 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "rocksdb"] path = rocksdb url = https://github.com/facebook/rocksdb +[submodule "etcd"] + path = etcd + url = https://github.com/metadium/etcd diff --git a/Makefile b/Makefile index 022bc22ba793..51e6e2bf6637 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # with Go source code. If you know what GOPATH is then you probably # don't need to bother with make. -.PHONY: geth android ios geth-cross evm all test clean rocksdb +.PHONY: geth android ios geth-cross evm all test clean rocksdb etcd .PHONY: geth-linux geth-linux-386 geth-linux-amd64 geth-linux-mips64 geth-linux-mips64le .PHONY: geth-linux-arm geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64 .PHONY: geth-darwin geth-darwin-386 geth-darwin-amd64 @@ -33,7 +33,7 @@ ROCKSDB_DIR=$(shell pwd)/rocksdb ROCKSDB_TAG=-tags rocksdb endif -metadium: gmet logrot +metadium: etcd gmet logrot @[ -d build/conf ] || mkdir -p build/conf @cp -p metadium/scripts/gmet.sh metadium/scripts/solc.sh build/bin/ @cp -p metadium/scripts/config.json.example \ @@ -44,7 +44,7 @@ metadium: gmet logrot @(cd build; tar cfz metadium.tar.gz bin conf) @echo "Done building build/metadium.tar.gz" -gmet: rocksdb metadium/governance_abi.go +gmet: etcd rocksdb metadium/governance_abi.go ifeq ($(USE_ROCKSDB), NO) $(GORUN) build/ci.go install $(ROCKSDB_TAG) ./cmd/gmet else @@ -206,7 +206,7 @@ geth-windows-amd64: @echo "Windows amd64 cross compilation done:" @ls -ld $(GOBIN)/geth-windows-* | grep amd64 -gmet-linux: +gmet-linux: etcd @docker --version > /dev/null 2>&1; \ if [ ! $$? = 0 ]; then \ echo "Docker not found."; \ @@ -226,6 +226,11 @@ rocksdb: cd $(ROCKSDB_DIR) && make -j8 static_lib; endif +etcd: + @if [ ! -e etcd/.git ]; then \ + git submodule update --init etcd; \ + fi + AWK_CODE=' \ BEGIN { print "package metadium"; bin = 0; name = ""; abi = ""; } \ /^{/ { bin = 1; abi = ""; name = ""; } \ diff --git a/etcd b/etcd new file mode 160000 index 000000000000..288f93d62b6c --- /dev/null +++ b/etcd @@ -0,0 +1 @@ +Subproject commit 288f93d62b6c512244b2ca59e6f465d604c3941a diff --git a/go.mod b/go.mod index 632e99b7f192..1f56257f78b5 100644 --- a/go.mod +++ b/go.mod @@ -93,3 +93,5 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gotest.tools v2.2.0+incompatible // indirect ) + +replace github.com/coreos/etcd => ./etcd diff --git a/go.sum b/go.sum index 45e8726152b1..ffdfb63bd93f 100644 --- a/go.sum +++ b/go.sum @@ -109,8 +109,6 @@ github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f h1:C43yEt github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= github.com/coreos/bbolt v1.3.1-etcd.8 h1:xTcsP8rG1dLB1VRhYSyf6sFQnIU39vC7OkbtEU8bWIA= github.com/coreos/bbolt v1.3.1-etcd.8/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v0.0.0-20180723195020-3f725e190e0f h1:cSKf/6GIOMec3aXNGhkr2mPIFEPGQ5mtl5eu067urW8= -github.com/coreos/etcd v0.0.0-20180723195020-3f725e190e0f/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142 h1:3jFq2xL4ZajGK4aZY8jz+DAF0FHjI51BXjjSwCzS1Dk=