diff --git a/Makefile b/Makefile index d60bc7c00a96..b18a8bfbd7bc 100644 --- a/Makefile +++ b/Makefile @@ -164,7 +164,6 @@ DESTDIR := DUPLFLAGS := -t 100 GOFLAGS := TAGS := -ARCHIVE := cockroach.src.tgz STARTFLAGS := -s type=mem,size=1GiB --logtostderr BUILDTARGET := ./pkg/cmd/cockroach SUFFIX := $(GOEXE) @@ -1254,36 +1253,6 @@ pre-push: ## Run generate, lint, and test. pre-push: generate lint test ui-lint ui-test ! git status --porcelain | read || (git status; git --no-pager diff -a 1>&2; exit 1) -# archive builds a source tarball out of this repository. Files in the special -# directory build/archive/contents are inserted directly into $(ARCHIVE_BASE). -# All other files in the repository are inserted into the archive with prefix -# $(ARCHIVE_BASE)/src/github.com/cockroachdb/cockroach to allow the extracted -# archive to serve directly as a GOPATH root. -.PHONY: archive -archive: ## Build a source tarball from this repository. -archive: $(ARCHIVE) - -$(ARCHIVE): $(ARCHIVE).tmp - gzip -c $< > $@ - -# ARCHIVE_EXTRAS are hard-to-generate files and their prerequisites that are -# pre-generated and distributed in source archives to minimize the number of -# dependencies required for end-users to build from source. -ARCHIVE_EXTRAS = \ - $(BUILDINFO) \ - $(SQLPARSER_TARGETS) \ - $(OPTGEN_TARGETS) \ - pkg/ui/assets.ccl.installed pkg/ui/assets.oss.installed - -# TODO(benesch): Make this recipe use `git ls-files --recurse-submodules` -# instead of scripts/ls-files.sh once Git v2.11 is widely deployed. -.INTERMEDIATE: $(ARCHIVE).tmp -$(ARCHIVE).tmp: ARCHIVE_BASE = cockroach-$(if $(BUILDINFO_TAG),$(BUILDINFO_TAG),$(shell cat .buildinfo/tag)) -$(ARCHIVE).tmp: $(ARCHIVE_EXTRAS) - echo "$(if $(BUILDINFO_TAG),$(BUILDINFO_TAG),$(shell cat .buildinfo/tag))" > .buildinfo/tag - scripts/ls-files.sh | $(TAR) -cf $@ -T - $(TAR_XFORM_FLAG),^,$(ARCHIVE_BASE)/src/github.com/cockroachdb/cockroach/, $^ - (cd build/archive/contents && $(TAR) -rf ../../../$@ $(TAR_XFORM_FLAG),^,$(ARCHIVE_BASE)/, *) - .buildinfo: @mkdir -p $@ @@ -1751,7 +1720,7 @@ cleanshort: -$(GO) clean $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LINKFLAGS)' -i github.com/cockroachdb/cockroach... $(FIND_RELEVANT) -type f -name '*.test' -exec rm {} + for f in cockroach*; do if [ -f "$$f" ]; then rm "$$f"; fi; done - rm -rf $(ARCHIVE) pkg/sql/parser/gen + rm -rf pkg/sql/parser/gen .PHONY: clean clean: ## Like cleanshort, but also includes C++ artifacts, Bazel artifacts, and the go build cache. @@ -1916,7 +1885,7 @@ endif # https://github.com/Reviewable/Reviewable/wiki/FAQ#how-do-i-tell-reviewable-that-a-file-is-generated-and-should-not-be-reviewed # Note how the 'prefix' variable is manually appended. This is required by Homebrew. .SECONDARY: build/variables.mk -build/variables.mk: Makefile build/archive/contents/Makefile pkg/ui/Makefile build/defs.mk +build/variables.mk: Makefile pkg/ui/Makefile build/defs.mk @echo '# Code generated by Make. DO NOT EDIT.' > $@.tmp @echo '# GENERATED FILE DO NOT EDIT' >> $@.tmp @echo 'define VALID_VARS' >> $@.tmp diff --git a/build/archive/README.md b/build/archive/README.md deleted file mode 100644 index 44322f3f4460..000000000000 --- a/build/archive/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# build/archive - -Files in the `contents` subdirectory are copied to the root of any source -tarball created with `make archive`. diff --git a/build/archive/contents/Makefile b/build/archive/contents/Makefile deleted file mode 100644 index a15f80aab6de..000000000000 --- a/build/archive/contents/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -export GOPATH = $(CURDIR) -export BUILDCHANNEL := source-archive - -.PHONY: all build buildoss check clean install test -all build buildoss check clean install test: - $(MAKE) -C src/github.com/cockroachdb/cockroach $@ diff --git a/build/archive/contents/README b/build/archive/contents/README deleted file mode 100644 index 1172476246ac..000000000000 --- a/build/archive/contents/README +++ /dev/null @@ -1,27 +0,0 @@ -CockroachDB is a scalable, survivable, strongly-consistent SQL database. - -You have downloaded a source archive, which requires a Go toolchain to compile. -For other installation options, including pre-compiled binaries, see -https://www.cockroachlabs.com/docs/stable/install-cockroachdb.html. - -To build CockroachDB from this source archive: - - $ make build - -See src/github.com/cockroachdb/cockroach/CONTRIBUTING.md for a complete list of -build requirements. - -To install CockroachDB as /usr/local/bin/cockroach: - - $ make install - -To interact with a one-node SQL cluster: - - $ cockroach start --background --insecure - $ cockroach sql --insecure - $ pkill -TERM cockroach # to shut down the nodes - -Next steps: - - * Read the docs: https://cockroachlabs.com/docs/stable/ - * Check out the GitHub repository: https://github.com/cockroachdb/cockroach diff --git a/build/variables.mk b/build/variables.mk index 540494fb8a41..cb35b3e76209 100644 --- a/build/variables.mk +++ b/build/variables.mk @@ -3,13 +3,9 @@ define VALID_VARS ACCEPTANCETIMEOUT ANTITHESIS - ARCHIVE - ARCHIVE_BASE - ARCHIVE_EXTRAS BASE_CGO_FLAGS_FILES BENCHES BENCHTIMEOUT - BUILDCHANNEL BUILDINFO BUILDINFO_TAG BUILDTARGET diff --git a/pkg/build/info.go b/pkg/build/info.go index c41e3d8b28e0..67040a3ce2ae 100644 --- a/pkg/build/info.go +++ b/pkg/build/info.go @@ -53,7 +53,7 @@ func IsRelease() bool { // SeemsOfficial reports whether this binary is likely to have come from an // official release channel. func SeemsOfficial() bool { - return channel == "official-binary" || channel == "source-archive" + return channel == "official-binary" } func computeBinaryVersion(versionTxt, revision string) string {