[arch-commits] Commit in consul/trunk (5 files)

Thore Bödecker foxxx0 at archlinux.org
Wed Mar 4 10:16:17 UTC 2020


    Date: Wednesday, March 4, 2020 @ 10:16:17
  Author: foxxx0
Revision: 589915

upgpkg: consul 1.7.1-1

disabled check() ; testsuite misbehaves horribly
>From now on it will be required to build new versions against [testing] and encourage people to signoff.

I've tested this build in a running consul cluster and it didn't exempt any immediate faults.

Added:
  consul/trunk/fix-test.patch
Modified:
  consul/trunk/PKGBUILD
  consul/trunk/consul-ldflags.patch
  consul/trunk/fix-build-version-info.patch
Deleted:
  consul/trunk/disable-syslog-test.patch

------------------------------+
 PKGBUILD                     |   69 ++++++++++++++++++++++-------------------
 consul-ldflags.patch         |   34 ++++++++++----------
 disable-syslog-test.patch    |   12 -------
 fix-build-version-info.patch |   27 ++++++++--------
 fix-test.patch               |   11 ++++++
 5 files changed, 80 insertions(+), 73 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-04 10:16:11 UTC (rev 589914)
+++ PKGBUILD	2020-03-04 10:16:17 UTC (rev 589915)
@@ -2,75 +2,82 @@
 # Maintainer: Felix Yan <felixonmars at archlinux.org>
 
 pkgname=consul
-pkgver=1.5.3
-pkgrel=2
+pkgver=1.7.1
+pkgrel=1
 pkgdesc="A tool for service discovery, monitoring and configuration."
 arch=('x86_64')
-_gocli_commit='3d22a244be8aa6fb16ac24af0e195c08b7d973aa' # HEAD
 url="https://www.consul.io"
 license=('MPL2')
 depends=('glibc')
-makedepends=('git' 'go-pie' 'procps-ng' 'zip')
+makedepends=('git' 'go-pie' 'go-bindata-assetfs' 'go-bindata-hashicorp' 'procps-ng' 'zip' 'yarn' 'bower' 'nodejs-lts-dubnium' 'npm' 'zip' 'gox' 'go-tools')
 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/hashicorp/consul/archive/v${pkgver}.tar.gz"
-        "gocli::git+https://github.com/mitchellh/cli#commit=${_gocli_commit}"
         'consul.service'
         'consul.default'
         'consul.sysusers'
         'example.json'
         'fix-build-version-info.patch'
+        'unparallelize-or-disable-flaky-tests.patch'
+        'fix-test.patch'
         'consul-ldflags.patch'
-        'unparallelize-or-disable-flaky-tests.patch'
         )
 install=consul.install
 backup=('etc/default/consul')
-sha512sums=('9a1ec590132069deb0d74809bcc7da7df4d40b17e6e2ff95cf90a2dbd5487bd2309164f09ca9c4802f77a56b453479605841531083bf272dbcb9a53b91e9bc8c'
-            'SKIP'
+sha512sums=('bcd7d309c4fc5a89713e3badbf88ff2f7363cd2f09bd52030965811b43bfb0b36fc573ea7cd726f847d822785f3e700885b7cf3c0ad025e2b879b62b1d5aef0e'
             'c70b9d1556f6c7ecb2e915ab685f289cef0e31198bd2e50c74a0483bbfb387beec67334f539a90adbf68b61b07946e98b300ab8a8e26e53b35f4ab4894adeb04'
             'ec5a800529a297c709fa383c094ecf106351cf0f8ac7b613b972d415d77fe001088902d7ab805e63e78a8e6360323fec1b795db5a4446df1e21b9b4ed31e7079'
             'ef872aedb2bc022a29292b7972a792b22e684c1ccb904a2b2cfec6d8966c28fb19be1452ce060821c419f1b646b236ba2e783175595e4bb6926d164c27a15c87'
             'c4292b8f56ee955ed7385a49843fd90d6434029891b3e1e724cb2fc841514c06e2554a26d3937c114371b18c2168c4e64319eb2cbd726ee8b35870df19089348'
-            '8442826050639bf4a8799d5bdeb9778b5dbf45c7c557292209691a08d207ece6106e7f6711ccb1e252b7d1dbbff14f0deb72b4f07e664a304b91092d0afa447b'
-            '0d779e78bb5f5edafddcc3de1a754a6c39e3ce6dd7aa1387f491803f977b4a7d5e9a1eaa17d212be89109b191c91c2cdf4dd9728cffb3b724b28d20248ce8e12'
-            'b59b2733d598ae6648c198f26f23961d4c1ea8c693a1a5b1c16a0951400c3bb9a9d2d5efe4f0a5cca9ae3b1f225a8eb4133c9011c4125589e936c7dcdc4b2495')
+            'c6e06dbf5954277ba472ba5bbaf0da5b9a22a49b02ef59cc16057025cab65e9065855f191f2910a3051a6877e4a8a9c392a98b811b911cee8c6fa5c39853ce7a'
+            'b59b2733d598ae6648c198f26f23961d4c1ea8c693a1a5b1c16a0951400c3bb9a9d2d5efe4f0a5cca9ae3b1f225a8eb4133c9011c4125589e936c7dcdc4b2495'
+            'f03821a42857cb19479b5a8d2c5dbb46e355f0e459caf89d3be7a5527961dffe9ffaebc9cf8e98d801c84cc4b38ec6c62330abc97347f3b5ca30e188f26d6982'
+            '15eb20feaa281b5dda46445582ee7bf83f14e599b75ee2eb2b7c18aefa27df597dbcfed55b3bdc1b9917eca6bdbc3134390ffdb6e4924df2a46f4c442efc5b91')
 
+
 prepare() {
-  export  GOPATH="${srcdir}"
-  export  PATH="$PATH:$GOPATH/bin"
-  mkdir -p "src/github.com/mitchellh"
-  mkdir -p "src/github.com/hashicorp"
+  cd "${srcdir}/${pkgname}-${pkgver}"
 
-  mv "${pkgname}-${pkgver}" "${srcdir}/src/github.com/hashicorp/${pkgname}"
-  mv "gocli" "${srcdir}/src/github.com/mitchellh/cli"
-
-  cd "${srcdir}/src/github.com/hashicorp/${pkgname}"
-
   local filename
   for filename in "${source[@]}"; do
     if [[ "$filename" =~ \.patch$ ]]; then
-      msg2 "Applying patch ${filename##*/}"
       patch -p1 -N -l -i "$srcdir/${filename##*/}"
     fi
   done
+
+  cd "${srcdir}"
+  mkdir -p 'src/github.com/hashicorp'
+  mv "${pkgname}-${pkgver}" "src/github.com/hashicorp/${pkgname}"
+
+  export GOPATH="${srcdir}"
 }
 
 build() {
   cd "${srcdir}/src/github.com/hashicorp/${pkgname}"
+
   export GOOS='linux'
   export GOARCH='amd64'
+  export XC_OSARCH='linux/amd64'
+
   make linux
 }
 
-check() {
-  cd "${srcdir}/src/github.com/hashicorp/${pkgname}"
-  # weird race conditions when being run overparallelized
-  export GOMAXPROCS="2"
-  export GOOS='linux'
-  export GOARCH='amd64'
-  export GOTEST_FLAGS="-p 2 -parallel 2"
-  export TRAVIS='true'
-  make -j1 test
-}
+# The test suite is horribly broken and will show approx. 60-80% test failures.
+# Upstream hasn't been helpful in debugging this and just points to their binary releases.
+# From now this package will ship without tests as I'm sick and tired of this BS.
 
+#check() {
+#  cd "${srcdir}/src/github.com/hashicorp/${pkgname}"
+#
+#  # prevent e.g. syslog tests
+#  export TRAVIS='true'
+#  # weird race conditions when being run overparallelized
+#  export GOMAXPROCS="1"
+#  export GOTEST_FLAGS="-p 1 -parallel 1"
+#  export GOOS='linux'
+#  export GOARCH='amd64'
+#
+#  make -j1 test
+#}
+
 package() {
   cd "${srcdir}/src/github.com/hashicorp/${pkgname}"
 

Modified: consul-ldflags.patch
===================================================================
--- consul-ldflags.patch	2020-03-04 10:16:11 UTC (rev 589914)
+++ consul-ldflags.patch	2020-03-04 10:16:17 UTC (rev 589915)
@@ -1,27 +1,27 @@
 diff -upr b/build-support/functions/20-build.sh c/build-support/functions/20-build.sh
---- b/build-support/functions/20-build.sh	2019-05-08 20:34:08.000000000 +0200
-+++ c/build-support/functions/20-build.sh	2019-05-09 10:39:50.420779679 +0200
-@@ -453,7 +453,7 @@ function build_consul_local {
-             if [ $os == "windows" ];then
-                 binname="consul.exe"
-             fi
--            CGO_ENABLED=0 GOOS=${os} GOARCH=${arch} go install -ldflags "${GOLDFLAGS}" -tags "${GOTAGS}" && cp "${MAIN_GOPATH}/bin/${GOBIN_EXTRA}${binname}" "${outdir}/${binname}"
-+            CGO_ENABLED=0 GOOS=${os} GOARCH=${arch} go install -ldflags "-linkmode external -extldflags ${EXTLDFLAGS} -s -w ${GOLDFLAGS}" -tags "${GOTAGS}" && cp "${MAIN_GOPATH}/bin/${GOBIN_EXTRA}${binname}" "${outdir}/${binname}"
-             if test $? -ne 0
-             then
-                err "ERROR: Failed to build Consul for ${osarch}"
+--- b/build-support/functions/20-build.sh	2020-03-04 10:15:04.066148196 +0100
++++ c/build-support/functions/20-build.sh	2020-03-04 10:13:54.354670580 +0100
+@@ -458,7 +458,7 @@ function build_consul_local {
+          if [ $os == "windows" ];then
+                binname="consul.exe"
+          fi
+-         debug_run env CGO_ENABLED=0 GOOS=${os} GOARCH=${arch} go install -ldflags "${GOLDFLAGS}" -tags "${GOTAGS}" && cp "${MAIN_GOPATH}/bin/${GOBIN_EXTRA}${binname}" "${outdir}/${binname}"
++         debug_run env CGO_ENABLED=0 GOOS=${os} GOARCH=${arch} go install -ldflags "-linkmode external -extldflags ${EXTLDFLAGS} -s -w ${GOLDFLAGS}" -tags "${GOTAGS}" && cp "${MAIN_GOPATH}/bin/${GOBIN_EXTRA}${binname}" "${outdir}/${binname}"
+          if test $? -ne 0
+          then
+             err "ERROR: Failed to build Consul for ${osarch}"
 diff -upr b/GNUmakefile c/GNUmakefile
---- b/GNUmakefile	2019-05-09 10:38:41.960775825 +0200
-+++ c/GNUmakefile	2019-05-09 10:39:15.477444378 +0200
-@@ -22,6 +22,7 @@ GOPATH=$(shell go env GOPATH)
+--- b/GNUmakefile	2020-03-04 10:14:46.245770467 +0100
++++ c/GNUmakefile	2020-03-04 10:15:32.286746368 +0100
+@@ -17,6 +17,7 @@ MAIN_GOPATH=$(shell go env GOPATH | cut
  
  ASSETFS_PATH?=agent/bindata_assetfs.go
  GOLDFLAGS=
 +EXTLDFLAGS := ${LDFLAGS}
  
- ifeq ($(FORCE_REBUILD),1)
- NOCACHE=--no-cache
-@@ -90,6 +91,7 @@ export GIT_DIRTY
+ PROTOFILES?=$(shell find . -name '*.proto' | grep -v 'vendor/')
+ PROTOGOFILES=$(PROTOFILES:.proto=.pb.go)
+@@ -120,6 +121,7 @@ export GIT_DIRTY
  export GIT_DESCRIBE
  export GOTAGS
  export GOLDFLAGS

Deleted: disable-syslog-test.patch
===================================================================
--- disable-syslog-test.patch	2020-03-04 10:16:11 UTC (rev 589914)
+++ disable-syslog-test.patch	2020-03-04 10:16:17 UTC (rev 589915)
@@ -1,12 +0,0 @@
---- a/./logger/syslog_test.go	2018-11-14 23:37:47.000000000 +0100
-+++ b/./logger/syslog_test.go	2019-01-04 14:16:21.575451546 +0100
-@@ -16,6 +16,9 @@ func TestSyslogFilter(t *testing.T) {
- 	if os.Getenv("TRAVIS") == "true" {
- 		t.Skip("Syslog not supported on travis-ci")
- 	}
-+	if os.Getenv("CONSUL_TEST_SKIP_SYSLOG") == "true" {
-+		t.Skip("Skipping test due to env var CONSUL_TEST_SKIP_SYSLOG being set")
-+	}
- 
- 	l, err := gsyslog.NewLogger(gsyslog.LOG_NOTICE, "LOCAL0", "consul")
- 	if err != nil {

Modified: fix-build-version-info.patch
===================================================================
--- fix-build-version-info.patch	2020-03-04 10:16:11 UTC (rev 589914)
+++ fix-build-version-info.patch	2020-03-04 10:16:17 UTC (rev 589915)
@@ -33,14 +33,15 @@
  
  	// Strip off any single quotes added by the git information.
  	return strings.Replace(version, "'", "", -1)
---- a/GNUmakefile	2019-05-08 20:34:08.000000000 +0200
-+++ b/GNUmakefile	2019-05-09 09:55:40.400630733 +0200
-@@ -21,12 +21,7 @@ GOARCH?=$(shell go env GOARCH)
- GOPATH=$(shell go env GOPATH)
+--- a/GNUmakefile	2020-02-20 16:40:00.000000000 +0100
++++ b/GNUmakefile	2020-03-04 09:48:52.279500949 +0100
+@@ -16,13 +16,7 @@ GOPATH=$(shell go env GOPATH)
+ MAIN_GOPATH=$(shell go env GOPATH | cut -d: -f1)
  
  ASSETFS_PATH?=agent/bindata_assetfs.go
 -# Get the git commit
 -GIT_COMMIT?=$(shell git rev-parse --short HEAD)
+-GIT_COMMIT_YEAR?=$(shell git show -s --format=%cd --date=format:%Y HEAD)
 -GIT_DIRTY?=$(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true)
 -GIT_DESCRIBE?=$(shell git describe --tags --always --match "v*")
 -GIT_IMPORT=github.com/hashicorp/consul/version
@@ -47,11 +48,11 @@
 -GOLDFLAGS=-X $(GIT_IMPORT).GitCommit=$(GIT_COMMIT)$(GIT_DIRTY) -X $(GIT_IMPORT).GitDescribe=$(GIT_DESCRIBE)
 +GOLDFLAGS=
  
- ifeq ($(FORCE_REBUILD),1)
- NOCACHE=--no-cache
-@@ -248,16 +243,6 @@ ui: ui-docker static-assets-docker
- tools:
- 	go get -u -v $(GOTOOLS)
+ PROTOFILES?=$(shell find . -name '*.proto' | grep -v 'vendor/')
+ PROTOGOFILES=$(PROTOFILES:.proto=.pb.go)
+@@ -348,16 +342,6 @@ tools:
+ 	fi
+ 	cd .gotools && go get -v $(GOTOOLS)
  
 -version:
 -	@echo -n "Version:                    "
@@ -66,9 +67,9 @@
  
  docker-images: go-build-image ui-build-image
  
-@@ -286,4 +271,4 @@ proto:
+@@ -409,4 +393,4 @@ proto: $(PROTOGOFILES) $(PROTOGOBINFILES
  
- .PHONY: all ci bin dev dist cov test test-ci test-internal test-install-deps cover format vet ui static-assets tools
+ .PHONY: all ci bin dev dist cov test test-ci test-internal cover format vet ui static-assets tools
  .PHONY: docker-images go-build-image ui-build-image static-assets-docker consul-docker ui-docker
--.PHONY: version proto test-envoy-integ
-+.PHONY: proto test-envoy-integ
+-.PHONY: version proto proto-rebuild proto-delete test-envoy-integ
++.PHONY: proto proto-rebuild proto-delete test-envoy-integ

Added: fix-test.patch
===================================================================
--- fix-test.patch	                        (rev 0)
+++ fix-test.patch	2020-03-04 10:16:17 UTC (rev 589915)
@@ -0,0 +1,11 @@
+--- a/GNUmakefile	2020-02-20 16:40:00.000000000 +0100
++++ b/GNUmakefile	2020-03-04 09:51:30.786193388 +0100
+@@ -212,7 +212,7 @@ cov: other-consul dev-build
+ 	rm -f coverage.{sdk,api}.part
+ 	go tool cover -html=coverage.out
+ 
+-test: other-consul dev-build vet test-internal
++test: other-consul dev-build test-internal
+ 
+ go-mod-tidy:
+ 	@echo "--> Running go mod tidy"



More information about the arch-commits mailing list