From 3f5ff5ab907f2fe13befe808288e06b33e0682c5 Mon Sep 17 00:00:00 2001 From: duyiwei Date: Mon, 11 Mar 2024 08:53:47 +0000 Subject: [PATCH 1/4] add Requires runc Signed-off-by: duyiwei --- containerd.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/containerd.spec b/containerd.spec index 2987cff..f140418 100644 --- a/containerd.spec +++ b/containerd.spec @@ -2,7 +2,7 @@ %global debug_package %{nil} Version: 1.6.22 Name: containerd -Release: 7 +Release: 8 Summary: An industry-standard container runtime License: ASL 2.0 URL: https://containerd.io @@ -16,6 +16,7 @@ Source6: containerd.service Source7: config.toml BuildRequires: golang glibc-static make btrfs-progs-devel git +Requires: runc %description containerd is an industry-standard container runtime with an emphasis on @@ -67,6 +68,12 @@ install -D -p -m 0644 %{S:7} %{buildroot}%{_sysconfdir}/containerd/config.toml %exclude %{_bindir}/containerd-stress %changelog +* Mon Mar 11 2024 duyiwei7w - 1.6.22-8 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add Requires runc + * Fri Feb 23 2024 zhongjiawei - 1.6.22-7 - Type:bugfix - ID:NA -- Gitee From 4f8d5aa72bcf6591dc98cd691acd4b49bf66a200 Mon Sep 17 00:00:00 2001 From: laokz Date: Wed, 13 Mar 2024 21:28:36 +0800 Subject: [PATCH 2/4] add riscv64 to THP patch --- containerd.spec | 8 +++++++- ...-disable-Transparent-HugePage-for-shim-pro.patch | 13 ++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/containerd.spec b/containerd.spec index f140418..e2d7532 100644 --- a/containerd.spec +++ b/containerd.spec @@ -2,7 +2,7 @@ %global debug_package %{nil} Version: 1.6.22 Name: containerd -Release: 8 +Release: 9 Summary: An industry-standard container runtime License: ASL 2.0 URL: https://containerd.io @@ -68,6 +68,12 @@ install -D -p -m 0644 %{S:7} %{buildroot}%{_sysconfdir}/containerd/config.toml %exclude %{_bindir}/containerd-stress %changelog +* Thu Mar 14 2024 laokz - 1.6.22-9 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:add riscv64 to THP patch + * Mon Mar 11 2024 duyiwei7w - 1.6.22-8 - Type:bugfix - ID:NA diff --git a/patch/0034-containerd-disable-Transparent-HugePage-for-shim-pro.patch b/patch/0034-containerd-disable-Transparent-HugePage-for-shim-pro.patch index 7c56f58..786c0b5 100644 --- a/patch/0034-containerd-disable-Transparent-HugePage-for-shim-pro.patch +++ b/patch/0034-containerd-disable-Transparent-HugePage-for-shim-pro.patch @@ -10,11 +10,13 @@ Subject: [PATCH] containerd:disable Transparent HugePage for shim process if sys/thp.go | 34 ++++++++++++ sys/thp_amd64.go | 3 ++ sys/thp_arm64.go | 3 ++ + sys/thp_riscv64.go | 3 ++ .../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_amd64.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 index 965a5cf..af4917c 100644 @@ -136,6 +138,15 @@ index 0000000..a6db8d6 +package sys + +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 index 73c8ac1..c7b4451 100644 --- a/vendor/github.com/containerd/go-runc/monitor.go -- Gitee From f28e1587cb04bc4788fad3ba4b7c1d8f141941e9 Mon Sep 17 00:00:00 2001 From: zhongjiawei Date: Fri, 22 Mar 2024 14:23:22 +0800 Subject: [PATCH 3/4] containerd:remove stw gc sweep set for arm64 (cherry picked from commit bacfecc5bbd6afe47dad193794ef69d11c45333f) --- containerd.spec | 8 ++- git-commit | 2 +- ...12-containerd-stw-gc-sweep-for-arm64.patch | 53 ------------------- series.conf | 1 - 4 files changed, 8 insertions(+), 56 deletions(-) delete mode 100644 patch/0012-containerd-stw-gc-sweep-for-arm64.patch diff --git a/containerd.spec b/containerd.spec index e2d7532..30fd3c0 100644 --- a/containerd.spec +++ b/containerd.spec @@ -2,7 +2,7 @@ %global debug_package %{nil} Version: 1.6.22 Name: containerd -Release: 9 +Release: 10 Summary: An industry-standard container runtime License: ASL 2.0 URL: https://containerd.io @@ -68,6 +68,12 @@ install -D -p -m 0644 %{S:7} %{buildroot}%{_sysconfdir}/containerd/config.toml %exclude %{_bindir}/containerd-stress %changelog +* Fri Mar 22 2024 zhongjiawei - 1.6.22-10 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:remove stw gc sweep set for arm64 + * Thu Mar 14 2024 laokz - 1.6.22-9 - Type:enhancement - ID:NA diff --git a/git-commit b/git-commit index cf35c11..23e5588 100644 --- a/git-commit +++ b/git-commit @@ -1 +1 @@ -d85f40f15ded290c1da3817b33290932c021457f +4d153fc0e0ed7a2cf8b54c7de8632cbe7a4281ec diff --git a/patch/0012-containerd-stw-gc-sweep-for-arm64.patch b/patch/0012-containerd-stw-gc-sweep-for-arm64.patch deleted file mode 100644 index c5f01c3..0000000 --- a/patch/0012-containerd-stw-gc-sweep-for-arm64.patch +++ /dev/null @@ -1,53 +0,0 @@ -From bd5ef07292289252531b73c371e95db1fc0a45c4 Mon Sep 17 00:00:00 2001 -From: jingrui -Date: Fri, 18 Oct 2019 14:49:47 +0800 -Subject: [PATCH] containerd: stw gc sweep for arm64 - -Change-Id: I855c13a21c72bf0e91563db7c11e1348a1a78d55 -Signed-off-by: jingrui ---- - 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 - diff --git a/series.conf b/series.conf index 5e0d338..ed23048 100644 --- a/series.conf +++ b/series.conf @@ -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/0010-containerd-add-shim-exit-when-bundle-dir-does-not-ex.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/0014-containerd-wrap-and-process-return-errors.patch patch/0015-containerd-add-timeout-for-shim.patch -- Gitee From d9e8e5d8bf6706bae01b691b7c718fd0616d6a83 Mon Sep 17 00:00:00 2001 From: tiberium Date: Fri, 22 Mar 2024 19:19:07 +0800 Subject: [PATCH 4/4] fix clang compile error due to flag format error --- containerd.spec | 8 +++++++- patch/0006-containerd-Makefile-modify.patch | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/containerd.spec b/containerd.spec index 30fd3c0..86eb9fe 100644 --- a/containerd.spec +++ b/containerd.spec @@ -2,7 +2,7 @@ %global debug_package %{nil} Version: 1.6.22 Name: containerd -Release: 10 +Release: 11 Summary: An industry-standard container runtime License: ASL 2.0 URL: https://containerd.io @@ -68,6 +68,12 @@ install -D -p -m 0644 %{S:7} %{buildroot}%{_sysconfdir}/containerd/config.toml %exclude %{_bindir}/containerd-stress %changelog +* Thu Mar 21 2024 tiberium - 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 - 1.6.22-10 - Type:bugfix - ID:NA diff --git a/patch/0006-containerd-Makefile-modify.patch b/patch/0006-containerd-Makefile-modify.patch index fc0b947..35090de 100644 --- a/patch/0006-containerd-Makefile-modify.patch +++ b/patch/0006-containerd-Makefile-modify.patch @@ -36,7 +36,7 @@ index f1b28ce..5b5f54c 100644 +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)' -+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' # Project packages. -- Gitee