From af627bb2b986b9afac54689ce1360054f337e0e2 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Fri, 13 Feb 2015 20:24:17 +0100 Subject: [PATCH] Copy vendored deps manually instead of using Godeps. We were using Godep incorrectly (cloning repos from the internet during build time instead of including Godeps/_workspace in the GOPATH via "godep go"). However, to avoid even having to fetch "godeps" from the internet during build, this now just copies the vendored files into the GOPATH. Also, the protocol buffer library moved from Google Code to GitHub, which is reflected in these updates. This fixes https://github.com/prometheus/prometheus/issues/525 --- Godeps/Godeps.json | 9 ++++----- .../golang_protobuf_extensions/ext/all_test.go | 4 ++-- .../matttproud/golang_protobuf_extensions/ext/decode.go | 2 +- .../matttproud/golang_protobuf_extensions/ext/encode.go | 2 +- .../golang_protobuf_extensions/ext/fixtures_test.go | 8 ++++---- Makefile | 3 +-- Makefile.INCLUDE | 1 - NOTICE | 2 +- config/Makefile | 2 +- config/config.go | 2 +- config/generated/config.pb.go | 2 +- config/load.go | 2 +- retrieval/targetmanager_test.go | 2 +- 13 files changed, 19 insertions(+), 22 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 774f7caf8a..e40323763c 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,11 +1,10 @@ { "ImportPath": "github.com/prometheus/prometheus", - "GoVersion": "go1.4", + "GoVersion": "go1.4.1", "Deps": [ { - "ImportPath": "code.google.com/p/goprotobuf/proto", - "Comment": "go.r60-152", - "Rev": "36be16571e14f67e114bb0af619e5de2c1591679" + "ImportPath": "github.com/golang/protobuf/proto", + "Rev": "5677a0e3d5e89854c9974e1256839ee23f8233ca" }, { "ImportPath": "github.com/golang/glog", @@ -13,7 +12,7 @@ }, { "ImportPath": "github.com/matttproud/golang_protobuf_extensions/ext", - "Rev": "7a864a042e844af638df17ebbabf8183dace556a" + "Rev": "ba7d65ac66e9da93a714ca18f6d1bc7a0c09100c" }, { "ImportPath": "github.com/miekg/dns", diff --git a/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/all_test.go b/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/all_test.go index 98d4e2d818..7270b67a38 100644 --- a/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/all_test.go +++ b/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/all_test.go @@ -21,8 +21,8 @@ import ( "testing" "testing/quick" - . "code.google.com/p/goprotobuf/proto" - . "code.google.com/p/goprotobuf/proto/testdata" + . "github.com/golang/protobuf/proto" + . "github.com/golang/protobuf/proto/testdata" ) func TestWriteDelimited(t *testing.T) { diff --git a/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/decode.go b/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/decode.go index a9af23333c..28b520e4bb 100644 --- a/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/decode.go +++ b/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/decode.go @@ -19,7 +19,7 @@ import ( "errors" "io" - "code.google.com/p/goprotobuf/proto" + "github.com/golang/protobuf/proto" ) var errInvalidVarint = errors.New("invalid varint32 encountered") diff --git a/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/encode.go b/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/encode.go index a7a9345615..473b31dcca 100644 --- a/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/encode.go +++ b/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/encode.go @@ -18,7 +18,7 @@ import ( "encoding/binary" "io" - "code.google.com/p/goprotobuf/proto" + "github.com/golang/protobuf/proto" ) // WriteDelimited encodes and dumps a message to the provided writer prefixed diff --git a/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/fixtures_test.go b/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/fixtures_test.go index 9cfcbbf585..07e75c54da 100644 --- a/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/fixtures_test.go +++ b/Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/fixtures_test.go @@ -1,5 +1,5 @@ // Copyright 2010 The Go Authors. All rights reserved. -// http://code.google.com/p/goprotobuf/ +// http://github.com/golang/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -30,11 +30,11 @@ package ext import ( - . "code.google.com/p/goprotobuf/proto" - . "code.google.com/p/goprotobuf/proto/testdata" + . "github.com/golang/protobuf/proto" + . "github.com/golang/protobuf/proto/testdata" ) -// FROM https://code.google.com/p/goprotobuf/source/browse/proto/all_test.go. +// FROM https://github.com/golang/protobuf/blob/master/proto/all_test.go. func initGoTestField() *GoTestField { f := new(GoTestField) diff --git a/Makefile b/Makefile index e63876742a..dce56e777f 100644 --- a/Makefile +++ b/Makefile @@ -66,8 +66,7 @@ config: dependencies $(MAKE) -C config dependencies: $(GOCC) $(FULL_GOPATH) - $(GO) get github.com/tools/godep - $(GODEP) restore + cp -a $(CURDIR)/Godeps/_workspace/src/* $(GOPATH)/src $(GO) get -d documentation: search_index diff --git a/Makefile.INCLUDE b/Makefile.INCLUDE index 02c6f476b4..43eb8cf86d 100644 --- a/Makefile.INCLUDE +++ b/Makefile.INCLUDE @@ -47,7 +47,6 @@ GOCC = $(GOROOT)/bin/go TMPDIR = /tmp GOENV = TMPDIR=$(TMPDIR) GOROOT=$(GOROOT) GOPATH=$(GOPATH) GO = $(GOENV) $(GOCC) -GODEP = $(GOENV) $(GOPATH)/bin/godep GOFMT = $(GOROOT)/bin/gofmt UNAME := $(shell uname) diff --git a/NOTICE b/NOTICE index 6d8d2b8d83..a57f7990c6 100644 --- a/NOTICE +++ b/NOTICE @@ -38,7 +38,7 @@ Copyright jQuery Foundation and other contributors Licensed under the MIT License Go support for Protocol Buffers - Google's data interchange format -http://code.google.com/p/goprotobuf/ +http://github.com/golang/protobuf/ Copyright 2010 The Go Authors See source code for license details. diff --git a/config/Makefile b/config/Makefile index 972d550037..983c0a05dd 100644 --- a/config/Makefile +++ b/config/Makefile @@ -18,5 +18,5 @@ SUFFIXES: include ../Makefile.INCLUDE generated/config.pb.go: config.proto - $(GO_GET) code.google.com/p/goprotobuf/protoc-gen-go + $(GO) get github.com/golang/protobuf/protoc-gen-go $(PROTOC) --proto_path=$(PREFIX)/include:. --go_out=generated/ config.proto diff --git a/config/config.go b/config/config.go index afb8f05cf3..1292f6c7a7 100644 --- a/config/config.go +++ b/config/config.go @@ -18,7 +18,7 @@ import ( "regexp" "time" - "code.google.com/p/goprotobuf/proto" + "github.com/golang/protobuf/proto" clientmodel "github.com/prometheus/client_golang/model" diff --git a/config/generated/config.pb.go b/config/generated/config.pb.go index 82a649cff4..adc7dd272e 100644 --- a/config/generated/config.pb.go +++ b/config/generated/config.pb.go @@ -18,7 +18,7 @@ It has these top-level messages: */ package io_prometheus -import proto "code.google.com/p/goprotobuf/proto" +import proto "github.com/golang/protobuf/proto" import math "math" // Reference imports to suppress errors if they are not otherwise used. diff --git a/config/load.go b/config/load.go index f007ab5a84..195226aeed 100644 --- a/config/load.go +++ b/config/load.go @@ -16,7 +16,7 @@ package config import ( "io/ioutil" - "code.google.com/p/goprotobuf/proto" + "github.com/golang/protobuf/proto" pb "github.com/prometheus/prometheus/config/generated" ) diff --git a/retrieval/targetmanager_test.go b/retrieval/targetmanager_test.go index 52c28c47f3..fe1e97d498 100644 --- a/retrieval/targetmanager_test.go +++ b/retrieval/targetmanager_test.go @@ -17,7 +17,7 @@ import ( "testing" "time" - "code.google.com/p/goprotobuf/proto" + "github.com/golang/protobuf/proto" clientmodel "github.com/prometheus/client_golang/model"