From a9bcc5ac3f712d486dbf6a0be53dbee178fc96b5 Mon Sep 17 00:00:00 2001 From: yangjiaqi Date: Fri, 10 May 2024 15:39:01 +0800 Subject: [PATCH] syscontaienr-tools: static compilation for cross-version use Signed-off-by: yangjiaqi (cherry picked from commit e555d8dcfc89d7b9855516c928345d23fb98e29b) --- ...ic-compilation-for-cross-version-use.patch | 26 +++++++++++++++++++ syscontainer-tools.spec | 9 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0011-static-compilation-for-cross-version-use.patch diff --git a/0011-static-compilation-for-cross-version-use.patch b/0011-static-compilation-for-cross-version-use.patch new file mode 100644 index 0000000..52c4295 --- /dev/null +++ b/0011-static-compilation-for-cross-version-use.patch @@ -0,0 +1,26 @@ +From 8de2df7665017e851b319056170dc367edf2b017 Mon Sep 17 00:00:00 2001 +From: yangjiaqi +Date: Fri, 10 May 2024 15:28:22 +0800 +Subject: [PATCH] static compilation for cross-version use + +Signed-off-by: vegbir +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index c750d94..d3b3af3 100644 +--- a/Makefile ++++ b/Makefile +@@ -20,7 +20,7 @@ VERSION := $(shell cat ./VERSION) + BEP_DIR=/tmp/syscontainer-tools-build-bep + BEP_FLAGS=-tmpdir=/tmp/syscontainer-tools-build-bep + +-GO_LDFLAGS="-buildid=IdByiSula $(BEP_FLAGS) -linkmode=external -extldflags=-static -extldflags=-Wl,-z,relro,-z,now -X main.gitCommit=${COMMIT} -X main.version=${VERSION}" ++GO_LDFLAGS='-buildid=IdByiSula $(BEP_FLAGS) -linkmode=external -extldflags "-static-pie -Wl,-z,relro,-z,now" -X main.gitCommit=${COMMIT} -X main.version=${VERSION}' + + ENV = GOPATH=${GOPATH} \ + CGO_ENABLED=1 \ +-- +2.33.0 + diff --git a/syscontainer-tools.spec b/syscontainer-tools.spec index e9f4c48..6a05a17 100644 --- a/syscontainer-tools.spec +++ b/syscontainer-tools.spec @@ -1,7 +1,7 @@ #Basic Information Name: syscontainer-tools Version: 0.9 -Release: 64 +Release: 65 Summary: syscontainer tools for IT, work with iSulad License: Mulan PSL v2 URL: https://gitee.com/openeuler/syscontainer-tools @@ -18,6 +18,7 @@ Patch7: 0007-use-file-locks-to-avoid-remounting-the-sharepath-mas.patch Patch8: 0008-clean-up-run-syscontainer-tools-netns-containerid-di.patch Patch9: 0009-drop-useless-function-error-and-info.patch Patch10: 0010-fix-log-of-removeUdevRule.patch +Patch11: 0011-static-compilation-for-cross-version-use.patch %ifarch sw_64 Patch1000: 1000-add-sw_64-support-not-upstream-modified-files.patch @@ -126,6 +127,12 @@ chmod 0640 ${HOOK_SPEC}/hookspec.json rm -rfv %{buildroot} %changelog +* Fri May 10 2024 yangjiaqi - 0.9-65 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:static compilation for cross-version use + * Mon Mar 11 2024 zhangxianting - 0.9-64 - Type:patch - CVE:NA -- Gitee