update version to 0.9-47
Signed-off-by: zhangsong234 <zhangsong34@huawei.com> (cherry picked from commit 7feafa9cd628c03aec7dce8e2895f6e93ac598b3)
This commit is contained in:
parent
2b5847aefc
commit
59ec0f9056
42
0001-fix-failed-build-with-golang-1.15.5.patch
Normal file
42
0001-fix-failed-build-with-golang-1.15.5.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From a6d6645e49ebdabab0359a920dcaf2393cc9e460 Mon Sep 17 00:00:00 2001
|
||||||
|
From: wangkang <wangkang101@huawei.com>
|
||||||
|
Date: Wed, 23 Dec 2020 10:40:15 +0800
|
||||||
|
Subject: [PATCH] fix failed build with golang 1.15.5
|
||||||
|
|
||||||
|
Signed-off-by: wangkang <wangkang101@huawei.com>
|
||||||
|
---
|
||||||
|
patch/0001-fix-docker-pkg-mount.patch | 4 ++--
|
||||||
|
vendor/modules.txt | 2 --
|
||||||
|
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/patch/0001-fix-docker-pkg-mount.patch b/patch/0001-fix-docker-pkg-mount.patch
|
||||||
|
index cdd2a5e..4a2f0a6 100644
|
||||||
|
--- a/patch/0001-fix-docker-pkg-mount.patch
|
||||||
|
+++ b/patch/0001-fix-docker-pkg-mount.patch
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
diff --git a/vendor/github.com/docker/docker/pkg/mount/flags.go b/vendor/github.com/docker/docker/pkg/mount/flags.go
|
||||||
|
-index d2fb1fb..0f6fd61 100644
|
||||||
|
+index 607dbed..11c92f6 100644
|
||||||
|
--- a/vendor/github.com/docker/docker/pkg/mount/flags.go
|
||||||
|
+++ b/vendor/github.com/docker/docker/pkg/mount/flags.go
|
||||||
|
-@@ -90,3 +90,7 @@ func ParseTmpfsOptions(options string) (int, string, error) {
|
||||||
|
+@@ -147,3 +147,7 @@ func ParseTmpfsOptions(options string) (int, string, error) {
|
||||||
|
}
|
||||||
|
return flags, data, nil
|
||||||
|
}
|
||||||
|
diff --git a/vendor/modules.txt b/vendor/modules.txt
|
||||||
|
index 47a3869..2a68362 100644
|
||||||
|
--- a/vendor/modules.txt
|
||||||
|
+++ b/vendor/modules.txt
|
||||||
|
@@ -1,8 +1,6 @@
|
||||||
|
# github.com/Microsoft/go-winio v0.4.14
|
||||||
|
github.com/Microsoft/go-winio
|
||||||
|
github.com/Microsoft/go-winio/pkg/guid
|
||||||
|
-# github.com/Sirupsen/logrus v0.0.0-00010101000000-000000000000 => github.com/sirupsen/logrus v1.4.2
|
||||||
|
-github.com/Sirupsen/logrus
|
||||||
|
# github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b
|
||||||
|
github.com/coreos/go-systemd/dbus
|
||||||
|
github.com/coreos/go-systemd/util
|
||||||
|
--
|
||||||
|
2.18.4
|
||||||
|
|
||||||
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,13 +4,16 @@
|
|||||||
#Basic Information
|
#Basic Information
|
||||||
Name: syscontainer-tools
|
Name: syscontainer-tools
|
||||||
Version: 0.9
|
Version: 0.9
|
||||||
Release: 1
|
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: %{name}-%{version}.tar.gz
|
Source0: https://gitee.com/openeuler/syscontainer-tools/repository/archive/v%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-root
|
BuildRoot: %{_tmppath}/%{name}-root
|
||||||
|
|
||||||
|
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
|
||||||
BuildRequires: golang > 1.6
|
BuildRequires: golang > 1.6
|
||||||
@ -22,7 +25,7 @@ This is syscontainer tools, to make it work, you need a isulad and util-linux
|
|||||||
|
|
||||||
#Build sections
|
#Build sections
|
||||||
%prep
|
%prep
|
||||||
%setup -n %{name} -q
|
%autosetup -n %{name} -Sgit -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make init && make
|
make init && make
|
||||||
@ -108,6 +111,14 @@ 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
|
||||||
|
- fix failed build with golang 1.15.5
|
||||||
|
|
||||||
|
* Mon Sep 07 2020 wangkang101<873229877@qq.com> - 0.9-2
|
||||||
|
- modify url of source0
|
||||||
|
|
||||||
* Tue Apr 26 2020 Zhangsong<zhangsong34@huawei.com> - 0.9-1
|
* Tue Apr 26 2020 Zhangsong<zhangsong34@huawei.com> - 0.9-1
|
||||||
- release version 0.9
|
- release version 0.9
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user