Date: Friday, February 8, 2019 @ 13:15:59 Author: foxxx0 Revision: 430681
upgpkg: consul 1.4.1-1 update to 1.4.1 Modified: consul/trunk/PKGBUILD consul/trunk/consul-ldflags.patch consul/trunk/fix-build-version-info.patch consul/trunk/unparallelize-or-disable-flaky-tests.patch --------------------------------------------+ PKGBUILD | 40 ++++++++++++--------------- consul-ldflags.patch | 4 +- fix-build-version-info.patch | 10 +++--- unparallelize-or-disable-flaky-tests.patch | 21 ++++---------- 4 files changed, 32 insertions(+), 43 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-02-08 13:15:27 UTC (rev 430680) +++ PKGBUILD 2019-02-08 13:15:59 UTC (rev 430681) @@ -2,8 +2,8 @@ # Maintainer: Felix Yan <[email protected]> pkgname=consul -pkgver=1.4.0 -pkgrel=2 +pkgver=1.4.1 +pkgrel=1 pkgdesc="A tool for service discovery, monitoring and configuration." arch=('x86_64') _gocli_commit='3d22a244be8aa6fb16ac24af0e195c08b7d973aa' # HEAD @@ -10,6 +10,7 @@ url="https://www.consul.io" license=('MPL2') depends=('glibc') +# checkdepends=('strace') makedepends=('git' 'go-pie' 'procps-ng' 'zip') 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}" @@ -21,20 +22,24 @@ 'fix-build-version-info.patch' 'disable-syslog-test.patch' 'unparallelize-or-disable-flaky-tests.patch') + # 'disable-go-vet.patch') install=consul.install backup=('etc/default/consul') -sha512sums=('a9f253ef5baa4e43800a0982ecb6893bf9487775cdcbe3a17bc7c45d601b6dca4e4c398ae3b70cdc1880577dbe1504d1a1f0cb702a1dd8c98b108e059fc721a0' +sha512sums=('e5451a414878a2a9d3591d4ae2caf8a227035017a6b65cbacf272a1a14727d33cabb1a11bd0fa3b837195309ff77aa49d4087cb6faedddb8ea002ac46412bc90' 'SKIP' 'c70b9d1556f6c7ecb2e915ab685f289cef0e31198bd2e50c74a0483bbfb387beec67334f539a90adbf68b61b07946e98b300ab8a8e26e53b35f4ab4894adeb04' 'ec5a800529a297c709fa383c094ecf106351cf0f8ac7b613b972d415d77fe001088902d7ab805e63e78a8e6360323fec1b795db5a4446df1e21b9b4ed31e7079' 'ef872aedb2bc022a29292b7972a792b22e684c1ccb904a2b2cfec6d8966c28fb19be1452ce060821c419f1b646b236ba2e783175595e4bb6926d164c27a15c87' 'c4292b8f56ee955ed7385a49843fd90d6434029891b3e1e724cb2fc841514c06e2554a26d3937c114371b18c2168c4e64319eb2cbd726ee8b35870df19089348' - 'cca5c71839c0a93515e8b2b6fa9d0a70e55b9e3cd1dcc9b8f9cbd94e7982ee695daec793a8ca9cb6245ff822dbbac4bf1af104c7ddef0ae9605d97a5fc08ed99' - '34a02f05216ff9a0274b1be384f92d15f1c2d4c6bdd502d7b133e54850074105c3b2068bbb8f7902f083efbb319ecf1e448025b452eac5d420cb5fe322befe0b' + '1d261cc36c3fe617db55d1bfa31354637cdd707bfc803582181e86f64fb8166905b46ba91b326d205392e142ba53deeb6dc1ed8f0f0fefe5201c10773e904b1c' + '64a73277468929c65f7aa3ef1523a5e170b18333129629d5070492e773f63cfdf56ff9a670798d140ef301bece1579bdc881343499b5ea7a0d807c7c95154a2e' '2a2e31469708f66877885c9e38f2044da13067c4111fc081ffea6187ff39acea6b17c0d33b2d0ada614315c3e5759a7592fbf7b0e9e9094ba2c31003bf1dbd4c' - '509c0b615f1a282f80004449e94ca8a51ac52cd4babfda0e670f22bcdaa5f9b2bb88189d09764333b31e8b3a449524979919fabb77886573a63c8bd582398933') + 'b59b2733d598ae6648c198f26f23961d4c1ea8c693a1a5b1c16a0951400c3bb9a9d2d5efe4f0a5cca9ae3b1f225a8eb4133c9011c4125589e936c7dcdc4b2495') + # '9cba924e51d31160d36dc2524b6a670713c09acae209bd6fdd1328ea4457e23ebcd95e9419bcd2ac98cb959b79cbf898fb7329e65beb78a4db454b3e0b6eb954') prepare() { + export GOPATH="${srcdir}" + export PATH="$PATH:$GOPATH/bin" mkdir -p "src/github.com/mitchellh" mkdir -p "src/github.com/hashicorp" @@ -43,23 +48,17 @@ cd "${srcdir}/src/github.com/hashicorp/${pkgname}" - # go ldflags hardening (e.g. RELRO, ...) - patch -p1 -N -l -i "${srcdir}/consul-ldflags.patch" - - # use proper release build version string (w/o '-dev' suffix) - patch -p1 -N -l -i "${srcdir}/fix-build-version-info.patch" - - # disable syslog test (requires running syslog service) - patch -p1 -N -l -i "${srcdir}/disable-syslog-test.patch" - - # workaround/disable flaky tests tests - patch -p1 -N -l -i "${srcdir}/unparallelize-or-disable-flaky-tests.patch" + local filename + for filename in "${source[@]}"; do + if [[ "$filename" =~ \.patch$ ]]; then + msg2 "Applying patch ${filename##*/}" + patch -p1 -N -l -i "$srcdir/${filename##*/}" + fi + done } build() { cd "${srcdir}/src/github.com/hashicorp/${pkgname}" - export GOPATH="${srcdir}" - export PATH="$PATH:$GOPATH/bin" export GOOS='linux' export GOARCH='amd64' make linux @@ -67,8 +66,6 @@ check() { cd "${srcdir}/src/github.com/hashicorp/${pkgname}" - export GOPATH="${srcdir}" - export PATH="$PATH:$GOPATH/bin" # weird race conditions when being run overparallelized export GOMAXPROCS="2" export GOOS='linux' @@ -75,6 +72,7 @@ export GOARCH='amd64' export GOTEST_FLAGS="-p 2 -parallel 2" export CONSUL_TEST_SKIP_SYSLOG='true' + # strace -f make -j1 test make -j1 test } Modified: consul-ldflags.patch =================================================================== --- consul-ldflags.patch 2019-02-08 13:15:27 UTC (rev 430680) +++ consul-ldflags.patch 2019-02-08 13:15:59 UTC (rev 430681) @@ -1,6 +1,6 @@ --- a/GNUmakefile 2018-11-14 23:37:47.000000000 +0100 +++ b/GNUmakefile 2019-01-08 15:44:48.494251517 +0100 -@@ -27,6 +27,7 @@ GIT_DIRTY?=$(shell test -n "`git status +@@ -29,6 +29,7 @@ GIT_DIRTY?=$(shell test -n "`git status GIT_DESCRIBE?=$(shell git describe --tags --always) GIT_IMPORT=github.com/hashicorp/consul/version GOLDFLAGS=-X $(GIT_IMPORT).GitCommit=$(GIT_COMMIT)$(GIT_DIRTY) -X $(GIT_IMPORT).GitDescribe=$(GIT_DESCRIBE) @@ -8,7 +8,7 @@ ifeq ($(FORCE_REBUILD),1) NOCACHE=--no-cache -@@ -96,6 +97,7 @@ export GIT_DIRTY +@@ -98,6 +99,7 @@ export GIT_DIRTY export GIT_DESCRIBE export GOTAGS export GOLDFLAGS Modified: fix-build-version-info.patch =================================================================== --- fix-build-version-info.patch 2019-02-08 13:15:27 UTC (rev 430680) +++ fix-build-version-info.patch 2019-02-08 13:15:59 UTC (rev 430681) @@ -35,7 +35,7 @@ return strings.Replace(version, "'", "", -1) --- b/GNUmakefile 2019-01-08 15:44:48.494251517 +0100 +++ c/GNUmakefile 2019-01-08 15:48:07.639739133 +0100 -@@ -21,12 +21,7 @@ GOARCH?=$(shell go env GOARCH) +@@ -23,12 +23,7 @@ GOARCH?=$(shell go env GOARCH) GOPATH=$(shell go env GOPATH) ASSETFS_PATH?=agent/bindata_assetfs.go @@ -49,7 +49,7 @@ EXTLDFLAGS := ${LDFLAGS} ifeq ($(FORCE_REBUILD),1) -@@ -236,17 +231,6 @@ ui: ui-legacy-docker ui-docker static-as +@@ -238,17 +233,6 @@ ui: ui-legacy-docker ui-docker static-as tools: go get -u -v $(GOTOOLS) @@ -67,9 +67,9 @@ docker-images: go-build-image ui-build-image ui-legacy-build-image go-build-image: -@@ -275,4 +259,4 @@ ui-legacy-docker: ui-legacy-build-image +@@ -276,4 +263,4 @@ ui-legacy-docker: ui-legacy-build-image .PHONY: all ci bin dev dist cov test test-ci test-internal test-install-deps cover format vet ui static-assets tools vendorfmt --.PHONY: docker-images go-build-image ui-build-image ui-legacy-build-image static-assets-docker consul-docker ui-docker ui-legacy-docker version -+.PHONY: docker-images go-build-image ui-build-image ui-legacy-build-image static-assets-docker consul-docker ui-docker ui-legacy-docker +-.PHONY: docker-images go-build-image ui-build-image ui-legacy-build-image static-assets-docker consul-docker ui-docker ui-legacy-docker version proto ++.PHONY: docker-images go-build-image ui-build-image ui-legacy-build-image static-assets-docker consul-docker ui-docker ui-legacy-docker proto Modified: unparallelize-or-disable-flaky-tests.patch =================================================================== --- unparallelize-or-disable-flaky-tests.patch 2019-02-08 13:15:27 UTC (rev 430680) +++ unparallelize-or-disable-flaky-tests.patch 2019-02-08 13:15:59 UTC (rev 430681) @@ -1,7 +1,7 @@ diff -upr a/agent/cache/cache_test.go b/agent/cache/cache_test.go --- a/agent/cache/cache_test.go 2018-11-14 23:37:47.000000000 +0100 +++ b/agent/cache/cache_test.go 2019-01-08 15:23:12.540631267 +0100 -@@ -152,7 +152,6 @@ func TestCacheGet_blockingInitSameKey(t +@@ -213,7 +213,6 @@ func TestCacheGet_blockingInitSameKey(t // Test that Get with different cache keys both block on initial value // but that the fetches were both properly called. func TestCacheGet_blockingInitDiffKeys(t *testing.T) { @@ -9,7 +9,7 @@ require := require.New(t) -@@ -238,7 +237,6 @@ func TestCacheGet_blockingIndex(t *testi +@@ -299,7 +298,6 @@ func TestCacheGet_blockingIndex(t *testi // Test a get with an index set will timeout if the fetch doesn't return // anything. func TestCacheGet_blockingIndexTimeout(t *testing.T) { @@ -17,7 +17,7 @@ typ := TestType(t) defer typ.AssertExpectations(t) -@@ -346,7 +344,6 @@ func TestCacheGet_emptyFetchResult(t *te +@@ -438,7 +436,6 @@ func TestCacheGet_emptyFetchResult(t *te // Test that a type registered with a periodic refresh will perform // that refresh after the timer is up. func TestCacheGet_periodicRefresh(t *testing.T) { @@ -25,7 +25,7 @@ typ := TestType(t) defer typ.AssertExpectations(t) -@@ -433,7 +430,6 @@ func TestCacheGet_periodicRefreshMultipl +@@ -525,7 +522,6 @@ func TestCacheGet_periodicRefreshMultipl // Test that a refresh performs a backoff. func TestCacheGet_periodicRefreshErrorBackoff(t *testing.T) { @@ -33,7 +33,7 @@ typ := TestType(t) defer typ.AssertExpectations(t) -@@ -474,7 +470,6 @@ func TestCacheGet_periodicRefreshErrorBa +@@ -566,7 +562,6 @@ func TestCacheGet_periodicRefreshErrorBa // Test that a badly behaved RPC that returns 0 index will perform a backoff. func TestCacheGet_periodicRefreshBadRPCZeroIndexErrorBackoff(t *testing.T) { @@ -44,7 +44,7 @@ diff -upr a/agent/cache-types/connect_ca_leaf_test.go b/agent/cache-types/connect_ca_leaf_test.go --- a/agent/cache-types/connect_ca_leaf_test.go 2018-11-14 23:37:47.000000000 +0100 +++ b/agent/cache-types/connect_ca_leaf_test.go 2019-01-08 15:23:55.670339830 +0100 -@@ -94,7 +94,6 @@ func TestConnectCALeaf_changingRoots(t * +@@ -870,7 +870,6 @@ func TestConnectCALeaf_changingRoots(t * // Test that after an initial signing, an expiringLeaf will trigger a // blocking query to resign. func TestConnectCALeaf_expiringLeaf(t *testing.T) { @@ -52,12 +52,3 @@ require := require.New(t) rpc := TestRPC(t) -@@ -178,7 +177,7 @@ func TestConnectCALeaf_expiringLeaf(t *t - // with a given token but can't if a client using that token was served a cert - // generated under a different token (say the agent token). - func TestConnectCALeaf_multipleClientsDifferentTokens(t *testing.T) { -- t.Parallel() -+ t.Skip("disabled flaky test") - - require := require.New(t) - rpc := TestRPC(t)
