Compare commits
10 Commits
ee86ab3f00
...
b2b036e9bc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2b036e9bc | ||
|
|
d785e204fe | ||
|
|
015df96b73 | ||
|
|
630dea1fe6 | ||
|
|
a7afba863d | ||
|
|
33cc12d096 | ||
|
|
6b5cbb9529 | ||
|
|
d9e8e5d8bf | ||
|
|
36ee416f82 | ||
|
|
f28e1587cb |
@ -2,7 +2,7 @@
|
||||
%global debug_package %{nil}
|
||||
Version: 1.6.22
|
||||
Name: containerd
|
||||
Release: 9
|
||||
Release: 15
|
||||
Summary: An industry-standard container runtime
|
||||
License: ASL 2.0
|
||||
URL: https://containerd.io
|
||||
@ -42,7 +42,7 @@ ln -fs $PWD $GO_BUILD_PATH/src/%{goipath}
|
||||
cd $GO_BUILD_PATH/src/%{goipath}
|
||||
export GO111MODULE=off
|
||||
export GOPATH=$GO_BUILD_PATH:%{gopath}
|
||||
export BUILDTAGS="no_btrfs no_cri"
|
||||
export BUILDTAGS="no_btrfs"
|
||||
make
|
||||
|
||||
%install
|
||||
@ -68,6 +68,33 @@ install -D -p -m 0644 %{S:7} %{buildroot}%{_sysconfdir}/containerd/config.toml
|
||||
%exclude %{_bindir}/containerd-stress
|
||||
|
||||
%changelog
|
||||
* Wed Nov 13 2024 zhongjiawei<zhongjiawei1@huawei.com> - 1.6.22-15
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:bump release version
|
||||
|
||||
* Tue Oct 15 2024 Wenlong Zhang <zhangwenlong@loongson.cn> - 1.6.22-13
|
||||
- fix build error on loongarch64
|
||||
|
||||
* Tue Oct 08 2024 zhongjiawei<zhongjiawei1@huawei.com> - 1.6.22-12
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:enable cri
|
||||
|
||||
* 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
|
||||
|
||||
@ -1 +1 @@
|
||||
d85f40f15ded290c1da3817b33290932c021457f
|
||||
85f5646ca2e0404de288487d7b0414c4c44e9715
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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
|
||||
|
||||
@ -0,0 +1,62 @@
|
||||
From 9683e5c946c3f72aaa13822e485b17197f5e3ff7 Mon Sep 17 00:00:00 2001
|
||||
From: zhongjiawei <zhongjiawei1@huawei.com>
|
||||
Date: Sun, 7 Apr 2024 09:54:07 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?containerd=EF=BC=9Amodify=20Makefile=20for=20go?=
|
||||
=?UTF-8?q?=20build=20options?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
Makefile | 18 ++++++++++++++----
|
||||
1 file changed, 14 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 8bf9530..9d3b3e5 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -97,7 +97,7 @@ GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(strip $(GO_BUILDTAGS))",)
|
||||
BEP_DIR=/tmp/containerd-build-bep
|
||||
BEP_FLAGS=-tmpdir=/tmp/containerd-build-bep
|
||||
|
||||
-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)'
|
||||
+GO_LDFLAGS=-ldflags ' -buildid=IdByIsula -extldflags=-Wl,-z,relro,-z,now $(BEP_FLAGS) -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION)'
|
||||
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.
|
||||
@@ -246,7 +246,7 @@ bin/%: cmd/% FORCE
|
||||
CGO_CPPFLAGS="-fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2" \
|
||||
CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \
|
||||
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
|
||||
- go build ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ./$<
|
||||
+ go build ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./$<
|
||||
|
||||
bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
|
||||
@echo "$(WHALE) $@"
|
||||
@@ -259,11 +259,21 @@ bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a sta
|
||||
|
||||
bin/containerd-shim-runc-v1: cmd/containerd-shim-runc-v1 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
|
||||
@echo "$(WHALE) $@"
|
||||
- @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build ${GO_BUILD_FLAGS} -o $@ ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1
|
||||
+ CGO_ENABLED=1 \
|
||||
+ CGO_CFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
|
||||
+ CGO_CPPFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
|
||||
+ CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \
|
||||
+ CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
|
||||
+ $(GO) build -buildmode=pie ${GO_BUILD_FLAGS} -o $@ ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1
|
||||
|
||||
bin/containerd-shim-runc-v2: cmd/containerd-shim-runc-v2 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
|
||||
@echo "$(WHALE) $@"
|
||||
- @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build ${GO_BUILD_FLAGS} -o $@ ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v2
|
||||
+ CGO_ENABLED=1 \
|
||||
+ CGO_CFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
|
||||
+ CGO_CPPFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
|
||||
+ CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \
|
||||
+ CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
|
||||
+ $(GO) build -buildmode=pie ${GO_BUILD_FLAGS} -o $@ ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v2
|
||||
|
||||
binaries: $(BINARIES) ## build binaries
|
||||
@echo "$(WHALE) $@"
|
||||
--
|
||||
2.33.0
|
||||
|
||||
60
patch/0036-containerd-modify-makefile-options.patch
Normal file
60
patch/0036-containerd-modify-makefile-options.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From c4c6839a0284188abc5d931e73a73f9730f0509a Mon Sep 17 00:00:00 2001
|
||||
From: zhongjiawei <zhongjiawei1@huawei.com>
|
||||
Date: Wed, 12 Jun 2024 11:25:10 +0800
|
||||
Subject: [PATCH] containerd:modify makefile options
|
||||
|
||||
---
|
||||
Makefile | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 9d3b3e5..09957ce 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -242,8 +242,8 @@ bin/%: cmd/% FORCE
|
||||
mkdir -p $(BEP_DIR)
|
||||
@echo "$(WHALE) $@${BINARY_SUFFIX}"
|
||||
CGO_ENABLED=1 \
|
||||
- CGO_CFLAGS="-fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2" \
|
||||
- CGO_CPPFLAGS="-fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2" \
|
||||
+ CGO_CFLAGS="-fstack-protector-all -D_FORTIFY_SOURCE=2 -O2" \
|
||||
+ CGO_CPPFLAGS="-fstack-protector-all -D_FORTIFY_SOURCE=2 -O2" \
|
||||
CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \
|
||||
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
|
||||
go build ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./$<
|
||||
@@ -251,8 +251,8 @@ bin/%: cmd/% FORCE
|
||||
bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
|
||||
@echo "$(WHALE) $@"
|
||||
CGO_ENABLED=1 \
|
||||
- CGO_CFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
|
||||
- CGO_CPPFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
|
||||
+ CGO_CFLAGS="-fstack-protector-all -fPIE -D_FORTIFY_SOURCE=2 -O2" \
|
||||
+ CGO_CPPFLAGS="-fstack-protector-all -fPIE -D_FORTIFY_SOURCE=2 -O2" \
|
||||
CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \
|
||||
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
|
||||
go build -buildmode=pie ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim
|
||||
@@ -260,8 +260,8 @@ bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a sta
|
||||
bin/containerd-shim-runc-v1: cmd/containerd-shim-runc-v1 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
|
||||
@echo "$(WHALE) $@"
|
||||
CGO_ENABLED=1 \
|
||||
- CGO_CFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
|
||||
- CGO_CPPFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
|
||||
+ CGO_CFLAGS="-fstack-protector-all -fPIC -D_FORTIFY_SOURCE=2 -O2" \
|
||||
+ CGO_CPPFLAGS="-fstack-protector-all -fPIC -D_FORTIFY_SOURCE=2 -O2" \
|
||||
CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \
|
||||
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
|
||||
$(GO) build -buildmode=pie ${GO_BUILD_FLAGS} -o $@ ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1
|
||||
@@ -269,8 +269,8 @@ bin/containerd-shim-runc-v1: cmd/containerd-shim-runc-v1 FORCE # set !cgo and om
|
||||
bin/containerd-shim-runc-v2: cmd/containerd-shim-runc-v2 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
|
||||
@echo "$(WHALE) $@"
|
||||
CGO_ENABLED=1 \
|
||||
- CGO_CFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
|
||||
- CGO_CPPFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
|
||||
+ CGO_CFLAGS="-fstack-protector-all -fPIC -D_FORTIFY_SOURCE=2 -O2" \
|
||||
+ CGO_CPPFLAGS="-fstack-protector-all -fPIC -D_FORTIFY_SOURCE=2 -O2" \
|
||||
CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \
|
||||
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
|
||||
$(GO) build -buildmode=pie ${GO_BUILD_FLAGS} -o $@ ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v2
|
||||
--
|
||||
2.33.0
|
||||
|
||||
22
patch/0037-fix-build-error-for-loong64.patch
Normal file
22
patch/0037-fix-build-error-for-loong64.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From 9fdcd6d6ac3bf222d9b4bb45f282b0c47a6b2057 Mon Sep 17 00:00:00 2001
|
||||
From: build <build@obs.com>
|
||||
Date: Tue, 15 Oct 2024 15:24:03 +0800
|
||||
Subject: [PATCH] fix build error for loong64
|
||||
|
||||
---
|
||||
sys/thp_loong64.go | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
create mode 100644 sys/thp_loong64.go
|
||||
|
||||
diff --git a/sys/thp_loong64.go b/sys/thp_loong64.go
|
||||
new file mode 100644
|
||||
index 0000000..a6db8d6
|
||||
--- /dev/null
|
||||
+++ b/sys/thp_loong64.go
|
||||
@@ -0,0 +1,3 @@
|
||||
+package sys
|
||||
+
|
||||
+const PRCTL_SYSCALL = 167
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@ -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
|
||||
@ -32,3 +31,6 @@ patch/0031-containerd-fix-some-containerd-bug.patch
|
||||
patch/0032-containerd-vendor-golang.org-x-net-v0.17.0.patch
|
||||
patch/0033-containerd-Fix-missing-closed-fifo.patch
|
||||
patch/0034-containerd-disable-Transparent-HugePage-for-shim-pro.patch
|
||||
patch/0035-containerd-modify-Makefile-for-go-build-options.patch
|
||||
patch/0036-containerd-modify-makefile-options.patch
|
||||
patch/0037-fix-build-error-for-loong64.patch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user