Compare commits
10 Commits
94fb4bcafb
...
d9d552ed07
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9d552ed07 | ||
|
|
371d5f9f99 | ||
|
|
c7ac27ef1c | ||
|
|
45fac27ade | ||
|
|
f020b36443 | ||
|
|
110e34f408 | ||
|
|
0fefc3e6b3 | ||
|
|
35001aa01d | ||
|
|
684c7c0487 | ||
|
|
788ba02213 |
2818
0001-add-loong64-support.patch
Normal file
2818
0001-add-loong64-support.patch
Normal file
File diff suppressed because it is too large
Load Diff
42
0001-fix-release-version.patch
Normal file
42
0001-fix-release-version.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 3c62ba67a1cbb55636567909f6389e89fe6db7e8 Mon Sep 17 00:00:00 2001
|
||||
From: baizg1107 <preloyalwhite@163.com>
|
||||
Date: Mon, 11 Oct 2021 11:04:49 +0800
|
||||
Subject: [PATCH] fix release version
|
||||
|
||||
---
|
||||
Makefile | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index c36dc47..24ec57e 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -32,6 +32,10 @@ GOTEST := $(GO) test -p $(P)
|
||||
OVERALLS := GO111MODULE=on overalls
|
||||
STATICCHECK := GO111MODULE=on staticcheck
|
||||
TIDB_EDITION ?= Community
|
||||
+RELEASE_VERSION ?= v4.0.14
|
||||
+TIDB_BUILDTS ?= None
|
||||
+TIDB_GITHASH ?= None
|
||||
+TIDB_GITBRANCH ?= None
|
||||
|
||||
# Ensure TIDB_EDITION is set to Community or Enterprise before running build process.
|
||||
ifneq "$(TIDB_EDITION)" "Community"
|
||||
@@ -51,10 +55,10 @@ FILES := $$(find $$($(PACKAGE_DIRECTORIES)) -name "*.go")
|
||||
FAILPOINT_ENABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|tools)" | xargs tools/bin/failpoint-ctl enable)
|
||||
FAILPOINT_DISABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|tools)" | xargs tools/bin/failpoint-ctl disable)
|
||||
|
||||
-LDFLAGS += -X "github.com/pingcap/parser/mysql.TiDBReleaseVersion=$(shell git describe --tags --dirty --always)"
|
||||
-LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBBuildTS=$(shell date -u '+%Y-%m-%d %I:%M:%S')"
|
||||
-LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitHash=$(shell git rev-parse HEAD)"
|
||||
-LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitBranch=$(shell git rev-parse --abbrev-ref HEAD)"
|
||||
+LDFLAGS += -X "github.com/pingcap/parser/mysql.TiDBReleaseVersion=$(RELEASE_VERSION)"
|
||||
+LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBBuildTS=$(TIDB_BUILDTS)"
|
||||
+LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitHash=$(TIDB_GITHASH)"
|
||||
+LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitBranch=$(TIDB_GITBRANCH)"
|
||||
LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBEdition=$(TIDB_EDITION)"
|
||||
|
||||
TEST_LDFLAGS = -X "github.com/pingcap/tidb/config.checkBeforeDropLDFlag=1"
|
||||
--
|
||||
2.27.0
|
||||
|
||||
1272
add-riscv-support-for-vendor.patch
Normal file
1272
add-riscv-support-for-vendor.patch
Normal file
File diff suppressed because it is too large
Load Diff
12
add-riscv-support.patch
Normal file
12
add-riscv-support.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -ur tidb-4.0.14/util/sys/linux/sys_linux.go tidb-4.0.14/util/sys/linux/sys_linux.go
|
||||
--- tidb-4.0.14/util/sys/linux/sys_linux.go 2021-07-26 18:50:15.000000000 +0800
|
||||
+++ tidb-4.0.14/util/sys/linux/sys_linux.go 2023-07-19 09:54:54.386949713 +0800
|
||||
@@ -27,7 +27,7 @@
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
- charsToString := func(ca []int8) string {
|
||||
+ charsToString := func(ca []uint8) string {
|
||||
s := make([]byte, len(ca))
|
||||
var lens int
|
||||
for ; lens < len(ca); lens++ {
|
||||
34
tidb.spec
34
tidb.spec
@ -1,9 +1,9 @@
|
||||
Name: tidb
|
||||
Version: 4.0.14
|
||||
Release: 2
|
||||
Release: 6
|
||||
Summary: TiDB is a distributed NewSQL database compatible with MySQL protocol
|
||||
|
||||
License: QL and STRUTIL
|
||||
License: Apache 2.0
|
||||
URL: https://github.com/pingcap/tidb
|
||||
Source0: https://github.com/pingcap/tidb/archive/refs/tags/v4.0.14.tar.gz
|
||||
Source1: tidb-server.service
|
||||
@ -11,6 +11,11 @@ Source2: tidb-server.toml
|
||||
#Go mod for non-extranet environments
|
||||
Source3: vendor.tar.gz
|
||||
Patch0: Set-GOFLAG-to-go-mod-vendor.patch
|
||||
Patch1: 0001-fix-release-version.patch
|
||||
Patch2: add-riscv-support.patch
|
||||
Patch3: add-riscv-support-for-vendor.patch
|
||||
Patch4: 0001-add-loong64-support.patch
|
||||
|
||||
BuildRequires: golang >= 1.10.0
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): systemd
|
||||
@ -19,8 +24,19 @@ Requires(post): systemd
|
||||
TiDB is a distributed NewSQL database compatible with MySQL protocol
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%setup -q
|
||||
%patch -P 0 -p1
|
||||
%patch -P 1 -p1
|
||||
%ifarch riscv64
|
||||
%patch -P 2 -p1
|
||||
%endif
|
||||
tar xvf %{SOURCE3} -C .
|
||||
%ifarch riscv64
|
||||
%patch -P 3
|
||||
%endif
|
||||
%ifarch loongarch64
|
||||
%patch -P 4 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
%make_build
|
||||
@ -68,6 +84,18 @@ exit 0
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Tue Dec 17 2024 shenzhongwei <shenzhongwei@kylinos.cn> - 4.0.14-6
|
||||
- include all patches in the source package.
|
||||
|
||||
* Mon Jul 01 2024 zhangxianting <zhangxianting@uniontech.com> - 4.0.14-5
|
||||
- add loongarch64 support
|
||||
|
||||
* Mon Jul 17 2023 zhangxiang <zhangxiang@iscas.ac.cn> - 4.0.14-4
|
||||
- add riscv64 support
|
||||
|
||||
* Mon Oct 11 2021 baizhonggui <baizhonggui@huawei.com> - 4.0.14-3
|
||||
- Fix commond tidb-server -V 'Release Version' not displayed
|
||||
|
||||
* Thu Sep 02 2021 sunguoshuai <sunguoshuai@huawei.com> - 4.0.14-2
|
||||
- Fix tidb-server.service start failure
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user