!183 [sync] PR-177: fix clang compile error due to "unknown flag -znow"
From: @tiberium Reviewed-by: @zhangsong234 Signed-off-by: @zhangsong234
This commit is contained in:
commit
6b5cbb9529
@ -2,7 +2,7 @@
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
Version: 1.6.22
|
Version: 1.6.22
|
||||||
Name: containerd
|
Name: containerd
|
||||||
Release: 7
|
Release: 11
|
||||||
Summary: An industry-standard container runtime
|
Summary: An industry-standard container runtime
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://containerd.io
|
URL: https://containerd.io
|
||||||
@ -16,6 +16,7 @@ Source6: containerd.service
|
|||||||
Source7: config.toml
|
Source7: config.toml
|
||||||
|
|
||||||
BuildRequires: golang glibc-static make btrfs-progs-devel git
|
BuildRequires: golang glibc-static make btrfs-progs-devel git
|
||||||
|
Requires: runc
|
||||||
|
|
||||||
%description
|
%description
|
||||||
containerd is an industry-standard container runtime with an emphasis on
|
containerd is an industry-standard container runtime with an emphasis on
|
||||||
@ -67,6 +68,30 @@ install -D -p -m 0644 %{S:7} %{buildroot}%{_sysconfdir}/containerd/config.toml
|
|||||||
%exclude %{_bindir}/containerd-stress
|
%exclude %{_bindir}/containerd-stress
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 21 2024 tiberium<jinzhe.oerv@isrc.iscas.ac.cn> - 1.6.22-11
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix clang compile issue due to ldflags format error
|
||||||
|
|
||||||
|
* Fri Mar 22 2024 zhongjiawei<zhongjiawei1@huawei.com> - 1.6.22-10
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:remove stw gc sweep set for arm64
|
||||||
|
|
||||||
|
* Thu Mar 14 2024 laokz<zhangkai@iscas.ac.cn> - 1.6.22-9
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:add riscv64 to THP patch
|
||||||
|
|
||||||
|
* Mon Mar 11 2024 duyiwei7w<duyiwei@kylinos.cn> - 1.6.22-8
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:add Requires runc
|
||||||
|
|
||||||
* Fri Feb 23 2024 zhongjiawei<zhongjiawei1@huawei.com> - 1.6.22-7
|
* Fri Feb 23 2024 zhongjiawei<zhongjiawei1@huawei.com> - 1.6.22-7
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
d85f40f15ded290c1da3817b33290932c021457f
|
4d153fc0e0ed7a2cf8b54c7de8632cbe7a4281ec
|
||||||
|
|||||||
@ -36,7 +36,7 @@ index f1b28ce..5b5f54c 100644
|
|||||||
+BEP_FLAGS=-tmpdir=/tmp/containerd-build-bep
|
+BEP_FLAGS=-tmpdir=/tmp/containerd-build-bep
|
||||||
|
|
||||||
-SHIM_GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) -extldflags "-static" $(EXTRA_LDFLAGS)'
|
-SHIM_GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) -extldflags "-static" $(EXTRA_LDFLAGS)'
|
||||||
+GO_LDFLAGS=-ldflags ' -buildid=IdByIsula -extldflags=-zrelro -extldflags=-znow $(BEP_FLAGS) -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) $(EXTRA_LDFLAGS)'
|
+GO_LDFLAGS=-ldflags ' -buildid=IdByIsula -extldflags=-Wl,-z,relro,-z,now $(BEP_FLAGS) -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) $(EXTRA_LDFLAGS)'
|
||||||
+SHIM_GO_LDFLAGS=-ldflags '-extldflags=-static' -ldflags '-buildid=IdByIsula $(BEP_FLAGS) -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -linkmode=external -extldflags=-Wl,-z,relro,-z,now'
|
+SHIM_GO_LDFLAGS=-ldflags '-extldflags=-static' -ldflags '-buildid=IdByIsula $(BEP_FLAGS) -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -linkmode=external -extldflags=-Wl,-z,relro,-z,now'
|
||||||
|
|
||||||
# Project packages.
|
# Project packages.
|
||||||
|
|||||||
@ -1,53 +0,0 @@
|
|||||||
From bd5ef07292289252531b73c371e95db1fc0a45c4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: jingrui <jingrui@huawei.com>
|
|
||||||
Date: Fri, 18 Oct 2019 14:49:47 +0800
|
|
||||||
Subject: [PATCH] containerd: stw gc sweep for arm64
|
|
||||||
|
|
||||||
Change-Id: I855c13a21c72bf0e91563db7c11e1348a1a78d55
|
|
||||||
Signed-off-by: jingrui <jingrui@huawei.com>
|
|
||||||
---
|
|
||||||
cmd/containerd-shim/main_unix.go | 5 -----
|
|
||||||
runtime/v1/shim/client/client.go | 4 ++++
|
|
||||||
2 files changed, 4 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/cmd/containerd-shim/main_unix.go b/cmd/containerd-shim/main_unix.go
|
|
||||||
index 8dfcd90..8a05d70 100644
|
|
||||||
--- a/cmd/containerd-shim/main_unix.go
|
|
||||||
+++ b/cmd/containerd-shim/main_unix.go
|
|
||||||
@@ -87,11 +87,6 @@ func init() {
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
debug.SetGCPercent(40)
|
|
||||||
- go func() {
|
|
||||||
- for range time.Tick(30 * time.Second) {
|
|
||||||
- debug.FreeOSMemory()
|
|
||||||
- }
|
|
||||||
- }()
|
|
||||||
|
|
||||||
if debugFlag {
|
|
||||||
logrus.SetLevel(logrus.DebugLevel)
|
|
||||||
diff --git a/runtime/v1/shim/client/client.go b/runtime/v1/shim/client/client.go
|
|
||||||
index 6e5eae5..fa145c8 100644
|
|
||||||
--- a/runtime/v1/shim/client/client.go
|
|
||||||
+++ b/runtime/v1/shim/client/client.go
|
|
||||||
@@ -27,6 +27,7 @@ import (
|
|
||||||
"net"
|
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
+ "runtime"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
"sync"
|
|
||||||
@@ -218,6 +219,9 @@ func newCommand(binary, daemonAddress string, debug bool, config shim.Config, so
|
|
||||||
cmd.SysProcAttr = getSysProcAttr()
|
|
||||||
cmd.ExtraFiles = append(cmd.ExtraFiles, socket)
|
|
||||||
cmd.Env = append(os.Environ(), "GOMAXPROCS=2")
|
|
||||||
+ if runtime.GOARCH == "arm64" {
|
|
||||||
+ cmd.Env = append(cmd.Env, "GODEBUG=gcstoptheworld=2")
|
|
||||||
+ }
|
|
||||||
cmd.Stdout = stdout
|
|
||||||
cmd.Stderr = stderr
|
|
||||||
return cmd, nil
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
@ -10,11 +10,13 @@ Subject: [PATCH] containerd:disable Transparent HugePage for shim process if
|
|||||||
sys/thp.go | 34 ++++++++++++
|
sys/thp.go | 34 ++++++++++++
|
||||||
sys/thp_amd64.go | 3 ++
|
sys/thp_amd64.go | 3 ++
|
||||||
sys/thp_arm64.go | 3 ++
|
sys/thp_arm64.go | 3 ++
|
||||||
|
sys/thp_riscv64.go | 3 ++
|
||||||
.../github.com/containerd/go-runc/monitor.go | 54 ++++++++++++-------
|
.../github.com/containerd/go-runc/monitor.go | 54 ++++++++++++-------
|
||||||
6 files changed, 101 insertions(+), 20 deletions(-)
|
7 files changed, 104 insertions(+), 20 deletions(-)
|
||||||
create mode 100644 sys/thp.go
|
create mode 100644 sys/thp.go
|
||||||
create mode 100644 sys/thp_amd64.go
|
create mode 100644 sys/thp_amd64.go
|
||||||
create mode 100644 sys/thp_arm64.go
|
create mode 100644 sys/thp_arm64.go
|
||||||
|
create mode 100644 sys/thp_riscv64.go
|
||||||
|
|
||||||
diff --git a/runtime/v1/shim/client/client.go b/runtime/v1/shim/client/client.go
|
diff --git a/runtime/v1/shim/client/client.go b/runtime/v1/shim/client/client.go
|
||||||
index 965a5cf..af4917c 100644
|
index 965a5cf..af4917c 100644
|
||||||
@ -136,6 +138,15 @@ index 0000000..a6db8d6
|
|||||||
+package sys
|
+package sys
|
||||||
+
|
+
|
||||||
+const PRCTL_SYSCALL = 167
|
+const PRCTL_SYSCALL = 167
|
||||||
|
diff --git a/sys/thp_riscv64.go b/sys/thp_riscv64.go
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..a6db8d6
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/sys/thp_riscv64.go
|
||||||
|
@@ -0,0 +1,3 @@
|
||||||
|
+package sys
|
||||||
|
+
|
||||||
|
+const PRCTL_SYSCALL = 167
|
||||||
diff --git a/vendor/github.com/containerd/go-runc/monitor.go b/vendor/github.com/containerd/go-runc/monitor.go
|
diff --git a/vendor/github.com/containerd/go-runc/monitor.go b/vendor/github.com/containerd/go-runc/monitor.go
|
||||||
index 73c8ac1..c7b4451 100644
|
index 73c8ac1..c7b4451 100644
|
||||||
--- a/vendor/github.com/containerd/go-runc/monitor.go
|
--- a/vendor/github.com/containerd/go-runc/monitor.go
|
||||||
|
|||||||
@ -9,7 +9,6 @@ patch/0008-containerd-skip-load-task-in-creating-and-optimize-i.patch
|
|||||||
patch/0009-containerd-support-kill-D-state-container.patch
|
patch/0009-containerd-support-kill-D-state-container.patch
|
||||||
patch/0010-containerd-add-shim-exit-when-bundle-dir-does-not-ex.patch
|
patch/0010-containerd-add-shim-exit-when-bundle-dir-does-not-ex.patch
|
||||||
patch/0011-containerd-change-tmpfile-directory-when-exec.patch
|
patch/0011-containerd-change-tmpfile-directory-when-exec.patch
|
||||||
patch/0012-containerd-stw-gc-sweep-for-arm64.patch
|
|
||||||
patch/0013-containerd-modify-shim-initiative-exit-time-for-post.patch
|
patch/0013-containerd-modify-shim-initiative-exit-time-for-post.patch
|
||||||
patch/0014-containerd-wrap-and-process-return-errors.patch
|
patch/0014-containerd-wrap-and-process-return-errors.patch
|
||||||
patch/0015-containerd-add-timeout-for-shim.patch
|
patch/0015-containerd-add-timeout-for-shim.patch
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user