update version to 0.9-47
Signed-off-by: zhangsong234 <zhangsong34@huawei.com> (cherry picked from commit 7feafa9cd628c03aec7dce8e2895f6e93ac598b3)
This commit is contained in:
parent
80f767162a
commit
6df317c369
48
0002-syscontainer-tools-build-security-option.patch
Normal file
48
0002-syscontainer-tools-build-security-option.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
From 49975380c5a6ffeceffe0e002a9a63171145053e Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhangsong <zhangsong34@huawei.com>
|
||||||
|
Date: Fri, 29 Jan 2021 11:31:06 +0800
|
||||||
|
Subject: [PATCH] syscontainer-tools: build security option
|
||||||
|
|
||||||
|
Signed-off-by: zhangsong <zhangsong34@huawei.com>
|
||||||
|
---
|
||||||
|
Makefile | 13 +++++++++----
|
||||||
|
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 4b3af7d..b7c45b2 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -20,8 +20,13 @@ VERSION := $(shell cat ./VERSION)
|
||||||
|
BEP_DIR=/tmp/syscontainer-tools-build-bep
|
||||||
|
BEP_FLAGS=-tmpdir=/tmp/syscontainer-tools-build-bep
|
||||||
|
|
||||||
|
-GO_LDFLAGS="-w -buildid=IdByiSula -extldflags -static $(BEP_FLAGS) -X main.gitCommit=${COMMIT} -X main.version=${VERSION}"
|
||||||
|
-ENV = GOPATH=${GOPATH} CGO_ENABLED=1
|
||||||
|
+GO_LDFLAGS="-buildid=IdByiSula $(BEP_FLAGS) -extldflags=-static -extldflags=-Wl,-z,relro,-z,now -X main.gitCommit=${COMMIT} -X main.version=${VERSION}"
|
||||||
|
+
|
||||||
|
+ENV = GOPATH=${GOPATH} \
|
||||||
|
+ CGO_ENABLED=1 \
|
||||||
|
+ CGO_CFLAGS="-fstack-protector-strong -fPIE" \
|
||||||
|
+ CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \
|
||||||
|
+ CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack"
|
||||||
|
|
||||||
|
## PLEASE be noticed that the vendor dir can only work with golang > 1.6 !!
|
||||||
|
|
||||||
|
@@ -34,12 +39,12 @@ init:
|
||||||
|
|
||||||
|
syscontainer-tools: $(SOURCES) | $(DEPS_LINK)
|
||||||
|
@echo "Making syscontainer-tools..."
|
||||||
|
- ${ENV} go build -mod=vendor -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/syscontainer-tools .
|
||||||
|
+ ${ENV} go build -buildmode=pie -mod=vendor -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/syscontainer-tools .
|
||||||
|
@echo "Done!"
|
||||||
|
|
||||||
|
syscontainer-hooks: $(SOURCES) | $(DEPS_LINK)
|
||||||
|
@echo "Making syscontainer-hooks..."
|
||||||
|
- ${ENV} go build -mod=vendor -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/syscontainer-hooks ./hooks/syscontainer-hooks
|
||||||
|
+ ${ENV} go build -buildmode=pie -mod=vendor -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/syscontainer-hooks ./hooks/syscontainer-hooks
|
||||||
|
@echo "Done!"
|
||||||
|
|
||||||
|
localtest:
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -4,14 +4,15 @@
|
|||||||
#Basic Information
|
#Basic Information
|
||||||
Name: syscontainer-tools
|
Name: syscontainer-tools
|
||||||
Version: 0.9
|
Version: 0.9
|
||||||
Release: 3
|
Release: 47
|
||||||
Summary: syscontainer tools for IT, work with iSulad
|
Summary: syscontainer tools for IT, work with iSulad
|
||||||
License: Mulan PSL v2
|
License: Mulan PSL v2
|
||||||
URL: https://gitee.com/openeuler/syscontainer-tools
|
URL: https://gitee.com/openeuler/syscontainer-tools
|
||||||
Source0: https://gitee.com/openeuler/syscontainer-tools/repository/archive/v%{version}.tar.gz
|
Source0: https://gitee.com/openeuler/syscontainer-tools/repository/archive/v%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-root
|
BuildRoot: %{_tmppath}/%{name}-root
|
||||||
|
|
||||||
Patch0001: 0001-fix-failed-build-with-golang-1.15.5.patch
|
Patch1: 0001-fix-failed-build-with-golang-1.15.5.patch
|
||||||
|
Patch2: 0002-syscontainer-tools-build-security-option.patch
|
||||||
|
|
||||||
#Dependency
|
#Dependency
|
||||||
BuildRequires: glibc-static
|
BuildRequires: glibc-static
|
||||||
@ -110,6 +111,9 @@ chmod 0640 ${HOOK_SPEC}/hookspec.json
|
|||||||
rm -rfv %{buildroot}
|
rm -rfv %{buildroot}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 08 2021 zhangsong234<zhangsong34@huawei.com> - 0.9-47
|
||||||
|
- update version to 0.9-47
|
||||||
|
|
||||||
* Wed Dec 23 2020 wangkang101<873229877@qq.com> - 0.9-3
|
* Wed Dec 23 2020 wangkang101<873229877@qq.com> - 0.9-3
|
||||||
- fix failed build with golang 1.15.5
|
- fix failed build with golang 1.15.5
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user