From 860c2b9d1b18e9b80419267c219c8fef36505756 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Tue, 26 Jun 2018 12:54:12 +0000 Subject: [PATCH] community/consul: fix --- community/consul/fix-build-version-info.patch | 35 +++++++++++++++++++ community/consul/force-pie-build.patch | 11 ------ 2 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 community/consul/fix-build-version-info.patch delete mode 100644 community/consul/force-pie-build.patch diff --git a/community/consul/fix-build-version-info.patch b/community/consul/fix-build-version-info.patch new file mode 100644 index 000000000..704afd218 --- /dev/null +++ b/community/consul/fix-build-version-info.patch @@ -0,0 +1,35 @@ +--- a/version/version.go 2018-06-26 09:57:33.703932696 +0200 ++++ b/version/version.go 2018-06-26 09:59:05.986536238 +0200 +@@ -1,7 +1,6 @@ + package version + + import ( +- "fmt" + "strings" + ) + +@@ -27,24 +26,6 @@ var ( + // for displaying to humans. + func GetHumanVersion() string { + version := Version +- if GitDescribe != "" { +- version = GitDescribe +- } +- +- release := VersionPrerelease +- if GitDescribe == "" && release == "" { +- release = "dev" +- } +- +- if release != "" { +- if !strings.HasSuffix(version, "-"+release) { +- // if we tagged a prerelease version then the release is in the version already +- version += fmt.Sprintf("-%s", release) +- } +- if GitCommit != "" { +- version += fmt.Sprintf(" (%s)", GitCommit) +- } +- } + + // Strip off any single quotes added by the git information. + return strings.Replace(version, "'", "", -1) diff --git a/community/consul/force-pie-build.patch b/community/consul/force-pie-build.patch deleted file mode 100644 index c0e96c349..000000000 --- a/community/consul/force-pie-build.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/GNUmakefile 2018-05-22 13:25:37.236071564 +0200 -+++ b/GNUmakefile 2018-05-22 13:26:44.852192711 +0200 -@@ -58,7 +58,7 @@ - # linux builds a linux package independent of the source platform - linux: - mkdir -p pkg/linux_amd64/ -- GOOS=linux GOARCH=amd64 go build -ldflags '$(GOLDFLAGS)' -tags '$(GOTAGS)' -o pkg/linux_amd64/consul -+ GOOS=linux GOARCH=amd64 go build -buildmode=pie -ldflags '$(GOLDFLAGS)' -tags '$(GOTAGS)' -o pkg/linux_amd64/consul - - # dist builds binaries for all platforms and packages them for distribution - dist: