Browse Source

upgrading package: tidb 2.1.2.20181221 -> 3.0.0.20190119

master
parent
commit
72c1abf881
  1. 57
      tidb/tidb.patch
  2. 16
      tidb/tidb.spec

57
tidb/tidb.patch

@ -1,16 +1,16 @@
Index: src/github.com/pingcap/tidb/Makefile
--- src/github.com/pingcap/tidb/Makefile.orig 2018-12-21 20:28:18.000000000 +0100
+++ src/github.com/pingcap/tidb/Makefile 2018-12-21 20:50:55.199269000 +0100
--- src/github.com/pingcap/tidb/Makefile.orig 2019-01-19 10:25:21.000000000 +0100
+++ src/github.com/pingcap/tidb/Makefile 2019-01-19 10:34:32.014985000 +0100
@@ -11,7 +11,7 @@
path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH)))
export PATH := $(path_to_add):$(PATH)
-GO := GO111MODULE=on go
+GO := go
GOBUILD := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG)
GOBUILD := CGO_ENABLED=1 $(GO) build $(BUILD_FLAG)
GOTEST := CGO_ENABLED=1 $(GO) test -p 3
OVERALLS := CGO_ENABLED=1 overalls
@@ -30,8 +30,8 @@
OVERALLS := CGO_ENABLED=1 GO111MODULE=on overalls
@@ -29,8 +29,8 @@
LDFLAGS += -X "github.com/pingcap/parser/mysql.TiDBReleaseVersion=$(shell git describe --tags --dirty)"
LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBBuildTS=$(shell date -u '+%Y-%m-%d %I:%M:%S')"
@ -21,21 +21,20 @@ Index: src/github.com/pingcap/tidb/Makefile
LDFLAGS += -X "github.com/pingcap/tidb/util/printer.GoVersion=$(shell go version)"
TEST_LDFLAGS = -X "github.com/pingcap/tidb/config.checkBeforeDropLDFlag=1"
@@ -74,7 +74,6 @@
@@ -71,7 +71,6 @@
@gofmt -s -l -w $(FILES) 2>&1 | $(FAIL_ON_STDOUT)
goword:
- retool do goword $(FILES) 2>&1 | $(FAIL_ON_STDOUT)
goword:tools/bin/goword
- tools/bin/goword $(FILES) 2>&1 | $(FAIL_ON_STDOUT)
check-static:
@ # vet and fmt have problems with vendor when ran through metalinter
@@ -91,13 +90,8 @@
CGO_ENABLED=0 retool do gosec $$($(PACKAGE_DIRECTORIES))
gosec:tools/bin/gosec
tools/bin/gosec $$($(PACKAGE_DIRECTORIES))
@@ -94,12 +93,8 @@
@GO111MODULE=on tools/bin/errcheck -exclude ./tools/check/errcheck_excludes.txt -blank $(PACKAGES) | grep -v "_test\.go" | awk '{print} END{if(NR>0) {exit 1}}'
lint:
lint:tools/bin/revive
- @echo "linting"
- @$(GO) install github.com/mgechev/revive
- @CGO_ENABLED=0 revive -formatter friendly -config revive.toml $(FILES)
- @tools/bin/revive -formatter friendly -config tools/check/revive.toml $(FILES)
vet:
- @echo "vet"
@ -43,21 +42,15 @@ Index: src/github.com/pingcap/tidb/Makefile
tidy:
@echo "go mod tidy"
@@ -114,43 +108,12 @@
@cd cmd/explaintest && ./run-tests.sh -s ../../bin/tidb-server
@@ -123,31 +118,12 @@
endif
gotest:
- @rm -rf $GOPATH/bin/gofail
- $(GO) get github.com/pingcap/gofail
- @which gofail
- @$(GOFAIL_ENABLE)
gotest: gofail-enable
-ifeq ("$(TRAVIS_COVERAGE)", "1")
- @echo "Running in TRAVIS_COVERAGE mode."
- @export log_level=error; \
- go get github.com/go-playground/overalls
- go get github.com/mattn/goveralls
- $(OVERALLS) -project=github.com/pingcap/tidb -covermode=count -ignore='.git,vendor,cmd,docs,LICENSES' || { $(GOFAIL_DISABLE); exit 1; }
- $(GOVERALLS) -service=travis-ci -coverprofile=overalls.coverprofile || { $(GOFAIL_DISABLE); exit 1; }
- $(GO) get github.com/go-playground/overalls
- $(OVERALLS) -project=github.com/pingcap/tidb -covermode=count -ignore='.git,vendor,cmd,docs,LICENSES' -concurrency=1 || { $(GOFAIL_DISABLE); exit 1; }
-else
- @echo "Running in native mode."
- @export log_level=error; \
@ -65,23 +58,17 @@ Index: src/github.com/pingcap/tidb/Makefile
-endif
- @$(GOFAIL_DISABLE)
race:
- $(GO) get github.com/pingcap/gofail
- @$(GOFAIL_ENABLE)
race: gofail-enable
- @export log_level=debug; \
- $(GOTEST) -timeout 20m -race $(PACKAGES) || { $(GOFAIL_DISABLE); exit 1; }
- @$(GOFAIL_DISABLE)
leak:
- $(GO) get github.com/pingcap/gofail
- @$(GOFAIL_ENABLE)
leak: gofail-enable
- @export log_level=debug; \
- $(GOTEST) -tags leak $(PACKAGES) || { $(GOFAIL_DISABLE); exit 1; }
- @$(GOFAIL_DISABLE)
tikv_integration_test:
- $(GO) get github.com/pingcap/gofail
- @$(GOFAIL_ENABLE)
tikv_integration_test: gofail-enable
- $(GOTEST) ./store/tikv/. -with-tikv=true || { $(GOFAIL_DISABLE); exit 1; }
- @$(GOFAIL_DISABLE)

16
tidb/tidb.spec

@ -22,9 +22,9 @@
##
# package information
%define V_tidb_opkg 2.1.2
%define V_tidb_base 2.1.2
%define V_tidb_snap 20181221
%define V_tidb_opkg 3.0.0
%define V_tidb_base 3.0.0
%define V_tidb_snap 20190119
# package information
Name: tidb
@ -37,7 +37,7 @@ Class: EVAL
Group: Database
License: Apache
Version: %{V_tidb_opkg}.%{V_tidb_snap}
Release: 20181221
Release: 20190119
# list of sources
Source0: http://download.openpkg.org/components/versioned/tidb/tidb-%{V_tidb_snap}.tar.xz
@ -76,15 +76,15 @@ PreReq: OpenPKG, openpkg >= 20160101
# build program
export GOPATH=`pwd`
( cd $GOPATH/src/github.com/pingcap/goyacc
go build -x -o goyacc main.go
go build -v -o goyacc main.go
) || exit $?
( cd $GOPATH/src/github.com/qiuyesuifeng/golex
go build -x -o golex *.go
go build -v -o golex *.go
) || exit $?
PATH=$GOPATH/src/github.com/pingcap/goyacc:$GOPATH/src/github.com/qiuyesuifeng/golex:$PATH
( cd $GOPATH/src/github.com/pingcap/tidb
%{l_make} %{l_mflags} BUILD_FLAG=-x
%{l_make} %{l_mflags} BUILD_FLAG=-x server
%{l_make} %{l_mflags} BUILD_FLAG=-v
%{l_make} %{l_mflags} BUILD_FLAG=-v server
) || exit $?
%install

Loading…
Cancel
Save