Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
d9d552ed07
!20 [sync] PR-14: Correct Tidb license
From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-12-23 07:58:12 +00:00
openeuler-ci-bot
371d5f9f99
!19 手动同步源码包同源异构问题修复
From: @zhong-wei-shen 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-12-23 07:56:21 +00:00
ZhengZhenyu
c7ac27ef1c Correct Tidb license
Correct Tidb license

Signed-off-by: ZhengZhenyu <zheng.zhenyu@outlook.com>
(cherry picked from commit 5a164fe9516da82e981fb8167d6af790e43945a9)
2024-12-20 10:49:33 +08:00
沈仲伟
45fac27ade include all patches in the source package. 2024-12-20 10:35:14 +08:00
openeuler-ci-bot
f020b36443
!12 add loong64 support
From: @zhangxianting 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-07-02 02:14:41 +00:00
zhangxianting
110e34f408 add loong64 support 2024-07-01 18:35:36 +08:00
openeuler-ci-bot
0fefc3e6b3
!10 Add riscv64 support
From: @a-xiang-and-shanhaijing 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2023-07-19 08:10:30 +00:00
zhangxiang
35001aa01d add riscv support
add riscv support

add riscv support
2023-07-19 14:07:07 +08:00
openeuler-ci-bot
684c7c0487 !7 [sync] PR-6: Fix tidb-server -V 'Release Version' not displayed
From: @openeuler-sync-bot
Reviewed-by: @zhengzhenyu
Signed-off-by: @zhengzhenyu
2021-10-14 02:33:56 +00:00
baizg1107
788ba02213 Fix release version not display
(cherry picked from commit 5d663437adbd9f91faf99eeb56aa9aec5170a8b5)
2021-10-13 10:55:36 +08:00
5 changed files with 4175 additions and 3 deletions

File diff suppressed because it is too large Load Diff

View 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

File diff suppressed because it is too large Load Diff

12
add-riscv-support.patch Normal file
View 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++ {

View File

@ -1,9 +1,9 @@
Name: tidb Name: tidb
Version: 4.0.14 Version: 4.0.14
Release: 2 Release: 6
Summary: TiDB is a distributed NewSQL database compatible with MySQL protocol 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 URL: https://github.com/pingcap/tidb
Source0: https://github.com/pingcap/tidb/archive/refs/tags/v4.0.14.tar.gz Source0: https://github.com/pingcap/tidb/archive/refs/tags/v4.0.14.tar.gz
Source1: tidb-server.service Source1: tidb-server.service
@ -11,6 +11,11 @@ Source2: tidb-server.toml
#Go mod for non-extranet environments #Go mod for non-extranet environments
Source3: vendor.tar.gz Source3: vendor.tar.gz
Patch0: Set-GOFLAG-to-go-mod-vendor.patch 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 BuildRequires: golang >= 1.10.0
Requires(pre): shadow-utils Requires(pre): shadow-utils
Requires(post): systemd Requires(post): systemd
@ -19,8 +24,19 @@ Requires(post): systemd
TiDB is a distributed NewSQL database compatible with MySQL protocol TiDB is a distributed NewSQL database compatible with MySQL protocol
%prep %prep
%autosetup -p1 %setup -q
%patch -P 0 -p1
%patch -P 1 -p1
%ifarch riscv64
%patch -P 2 -p1
%endif
tar xvf %{SOURCE3} -C . tar xvf %{SOURCE3} -C .
%ifarch riscv64
%patch -P 3
%endif
%ifarch loongarch64
%patch -P 4 -p1
%endif
%build %build
%make_build %make_build
@ -68,6 +84,18 @@ exit 0
%license LICENSE %license LICENSE
%changelog %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 * Thu Sep 02 2021 sunguoshuai <sunguoshuai@huawei.com> - 4.0.14-2
- Fix tidb-server.service start failure - Fix tidb-server.service start failure