!12 rubik: upgrade v0.1.0-4 to v1.0.0-1
From: @hcnbxx Reviewed-by: @caihaomin Signed-off-by: @caihaomin
This commit is contained in:
commit
f39774b611
@ -1 +1 @@
|
|||||||
0.1.0-4
|
1.0.0-1
|
||||||
|
|||||||
@ -0,0 +1,47 @@
|
|||||||
|
From d8e0e3d724f2fc85886cf087eea3cc89f8aa6630 Mon Sep 17 00:00:00 2001
|
||||||
|
From: xiadanni <xiadanni1@huawei.com>
|
||||||
|
Date: Mon, 27 Dec 2021 16:52:03 +0800
|
||||||
|
Subject: [PATCH] rubik: enable GO111MODULE and Optimized compilation
|
||||||
|
instruction
|
||||||
|
|
||||||
|
Signed-off-by: xiadanni <xiadanni1@huawei.com>
|
||||||
|
---
|
||||||
|
Makefile | 10 +++++++---
|
||||||
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 4285721..8d943cc 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -21,21 +21,25 @@ RELEASE :=$(if $(shell awk -F"-" '{print $$2}' < $(VERSION_FILE)),$(shell awk -F
|
||||||
|
BUILD_TIME := $(shell date "+%Y-%m-%d")
|
||||||
|
GIT_COMMIT := $(if $(shell git rev-parse --short HEAD),$(shell git rev-parse --short HEAD),$(shell cat ./git-commit | head -c 7))
|
||||||
|
|
||||||
|
+export GO111MODULE=on
|
||||||
|
+
|
||||||
|
DEBUG_FLAGS := -gcflags="all=-N -l"
|
||||||
|
LD_FLAGS := -ldflags '-buildid=none -tmpdir=$(TMP_DIR) \
|
||||||
|
-X isula.org/rubik/pkg/version.GitCommit=$(GIT_COMMIT) \
|
||||||
|
-X isula.org/rubik/pkg/version.BuildTime=$(BUILD_TIME) \
|
||||||
|
-X isula.org/rubik/pkg/version.Version=$(VERSION) \
|
||||||
|
-X isula.org/rubik/pkg/version.Release=$(RELEASE) \
|
||||||
|
- -extldflags=-ftrapv \
|
||||||
|
- -extldflags=-Wl,-z,relro,-z,now -linkmode=external -extldflags=-static'
|
||||||
|
+ -buildmode=pie \
|
||||||
|
+ -extldflags=-ftrapv -extldflags=-zrelro -extldflags=-znow \
|
||||||
|
+ -linkmode=external \
|
||||||
|
+ -extldflags "-static-pie -Wl,-z,now"'
|
||||||
|
|
||||||
|
GO_BUILD=CGO_ENABLED=1 \
|
||||||
|
CGO_CFLAGS="-fstack-protector-strong -fPIE" \
|
||||||
|
CGO_CPPFLAGS="-fstack-protector-strong -fPIE" \
|
||||||
|
CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \
|
||||||
|
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
|
||||||
|
- go build -buildmode=pie
|
||||||
|
+ go build -mod=vendor
|
||||||
|
|
||||||
|
all: release
|
||||||
|
|
||||||
|
--
|
||||||
|
2.30.2
|
||||||
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
From 83370df1083223fb14c4277e13b2ebeaa9e03352 Mon Sep 17 00:00:00 2001
|
|
||||||
From: xiadanni <xiadanni1@huawei.com>
|
|
||||||
Date: Mon, 27 Dec 2021 16:52:03 +0800
|
|
||||||
Subject: [PATCH] rubik: enable GO111MODULE
|
|
||||||
|
|
||||||
Signed-off-by: xiadanni <xiadanni1@huawei.com>
|
|
||||||
---
|
|
||||||
Makefile | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index 22ea08c..7cd1185 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -32,14 +32,14 @@ LD_FLAGS := -ldflags '-buildid=none -tmpdir=$(TMP_DIR) \
|
|
||||||
-extldflags=-ftrapv \
|
|
||||||
-extldflags=-Wl,-z,relro,-z,now -linkmode=external -extldflags=-static'
|
|
||||||
|
|
||||||
-export GO111MODULE=off
|
|
||||||
+export GO111MODULE=on
|
|
||||||
|
|
||||||
GO_BUILD=CGO_ENABLED=1 \
|
|
||||||
CGO_CFLAGS="-fstack-protector-strong -fPIE" \
|
|
||||||
CGO_CPPFLAGS="-fstack-protector-strong -fPIE" \
|
|
||||||
CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \
|
|
||||||
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
|
|
||||||
- go build -buildmode=pie
|
|
||||||
+ go build -mod=vendor -buildmode=pie
|
|
||||||
|
|
||||||
all: release
|
|
||||||
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
From 40ab0fd7f9023093a90422a93f7082f259720b00 Mon Sep 17 00:00:00 2001
|
|
||||||
From: yangjiaqi <yangjiaqi16@huawei.com>
|
|
||||||
Date: Mon, 19 Sep 2022 18:12:26 +0800
|
|
||||||
Subject: [PATCH] fix compile problem and make rubik real static
|
|
||||||
|
|
||||||
---
|
|
||||||
Makefile | 8 +++++---
|
|
||||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index 7cd1185..6ba4edf 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -29,8 +29,10 @@ LD_FLAGS := -ldflags '-buildid=none -tmpdir=$(TMP_DIR) \
|
|
||||||
-X isula.org/rubik/pkg/version.Version=$(VERSION) \
|
|
||||||
-X isula.org/rubik/pkg/version.Release=$(RELEASE) \
|
|
||||||
-X isula.org/rubik/pkg/version.Usage=$(USAGE) \
|
|
||||||
- -extldflags=-ftrapv \
|
|
||||||
- -extldflags=-Wl,-z,relro,-z,now -linkmode=external -extldflags=-static'
|
|
||||||
+ -buildmode=pie \
|
|
||||||
+ -extldflags=-ftrapv -extldflags=-zrelro -extldflags=-znow \
|
|
||||||
+ -linkmode=external \
|
|
||||||
+ -extldflags "-static-pie -Wl,-z,now"'
|
|
||||||
|
|
||||||
export GO111MODULE=on
|
|
||||||
|
|
||||||
@@ -39,7 +41,7 @@ GO_BUILD=CGO_ENABLED=1 \
|
|
||||||
CGO_CPPFLAGS="-fstack-protector-strong -fPIE" \
|
|
||||||
CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \
|
|
||||||
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
|
|
||||||
- go build -mod=vendor -buildmode=pie
|
|
||||||
+ go build -mod=vendor
|
|
||||||
|
|
||||||
all: release
|
|
||||||
|
|
||||||
--
|
|
||||||
2.30.0
|
|
||||||
|
|
||||||
21
patch/0002-rubik-fix-Dockerfile-build-failed.patch
Normal file
21
patch/0002-rubik-fix-Dockerfile-build-failed.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
From 8f5aac08a11a60c7fe21437c86c01df1367a0ba2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: hanchao <hanchao47@huawei.com>
|
||||||
|
Date: Tue, 15 Nov 2022 00:12:14 +0800
|
||||||
|
Subject: [PATCH] rubik: fix Dockerfile build failed
|
||||||
|
|
||||||
|
---
|
||||||
|
Dockerfile | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Dockerfile b/Dockerfile
|
||||||
|
index 51f0e4c..78c7702 100644
|
||||||
|
--- a/Dockerfile
|
||||||
|
+++ b/Dockerfile
|
||||||
|
@@ -1,3 +1,3 @@
|
||||||
|
FROM scratch
|
||||||
|
-COPY ./rubik /rubik
|
||||||
|
+COPY ./build/rubik /rubik
|
||||||
|
ENTRYPOINT ["/rubik"]
|
||||||
|
--
|
||||||
|
2.30.2
|
||||||
|
|
||||||
14
rubik.spec
14
rubik.spec
@ -1,6 +1,6 @@
|
|||||||
Name: rubik
|
Name: rubik
|
||||||
Version: 0.1.0
|
Version: 1.0.0
|
||||||
Release: 4
|
Release: 1
|
||||||
Summary: Hybrid Deployment for Cloud Native
|
Summary: Hybrid Deployment for Cloud Native
|
||||||
License: Mulan PSL V2
|
License: Mulan PSL V2
|
||||||
URL: https://gitee.com/openeuler/rubik
|
URL: https://gitee.com/openeuler/rubik
|
||||||
@ -29,13 +29,13 @@ cp %{SOURCE6} .
|
|||||||
%build
|
%build
|
||||||
sh ./apply-patch
|
sh ./apply-patch
|
||||||
make release
|
make release
|
||||||
strip rubik
|
strip ./build/rubik
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# create directory /var/lib/rubik
|
# create directory /var/lib/rubik
|
||||||
install -d %{buildroot}%{_sharedstatedir}/%{name}
|
install -d %{buildroot}%{_sharedstatedir}/%{name}
|
||||||
# install rubik binary
|
# install rubik binary
|
||||||
install -Dp ./rubik %{buildroot}%{_sharedstatedir}/%{name}
|
install -Dp ./build/rubik %{buildroot}%{_sharedstatedir}/%{name}
|
||||||
# install artifacts
|
# install artifacts
|
||||||
install -Dp ./hack/rubik-daemonset.yaml %{buildroot}%{_sharedstatedir}/%{name}/rubik-daemonset.yaml
|
install -Dp ./hack/rubik-daemonset.yaml %{buildroot}%{_sharedstatedir}/%{name}/rubik-daemonset.yaml
|
||||||
install -Dp ./Dockerfile %{buildroot}%{_sharedstatedir}/%{name}/Dockerfile
|
install -Dp ./Dockerfile %{buildroot}%{_sharedstatedir}/%{name}/Dockerfile
|
||||||
@ -50,6 +50,12 @@ install -Dp ./Dockerfile %{buildroot}%{_sharedstatedir}/%{name}/Dockerfile
|
|||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 14 2022 hanchao <hanchao47@huawei.com> - 1.0.0-1
|
||||||
|
- Type:bugfix
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:restart
|
||||||
|
- DESC:upgrade rubik version to v1.0.0
|
||||||
|
|
||||||
* Mon Sep 19 2022 yangjiaqi <yangjiaqi16@huawei.com> - 0.1.0-4
|
* Mon Sep 19 2022 yangjiaqi <yangjiaqi16@huawei.com> - 0.1.0-4
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
patch/0001-rubik-enable-GO111MODULE.patch
|
patch/0001-rubik-enable-GO111MODULE-and-Optimized-compilation-i.patch
|
||||||
patch/0002-fix-compile-problem-and-make-rubik-real-static.patch
|
patch/0002-rubik-fix-Dockerfile-build-failed.patch
|
||||||
#end of file
|
#end of file
|
||||||
|
|||||||
BIN
v0.1.0.tar.gz
BIN
v0.1.0.tar.gz
Binary file not shown.
BIN
v1.0.0.tar.gz
Normal file
BIN
v1.0.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user