From c0262df4d1913f2a486a8e9e127ad90e8bbe9ba9 Mon Sep 17 00:00:00 2001 From: yangjiaqi Date: Mon, 19 Sep 2022 17:10:05 +0800 Subject: [PATCH] fix compile problem and make rubik real static --- VERSION-openeuler | 2 +- git-commit | 2 +- ...e-problem-and-make-rubik-real-static.patch | 38 +++++++++++++++++++ rubik.spec | 8 +++- series.conf | 1 + 5 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 patch/0002-fix-compile-problem-and-make-rubik-real-static.patch diff --git a/VERSION-openeuler b/VERSION-openeuler index 4f7b3d2..cbc711f 100644 --- a/VERSION-openeuler +++ b/VERSION-openeuler @@ -1 +1 @@ -0.1.0-2 +0.1.0-3 diff --git a/git-commit b/git-commit index 827c1bc..7783d8c 100644 --- a/git-commit +++ b/git-commit @@ -1 +1 @@ -84074a0ecd4d8d28d7c767cba78383c13e360e64 +7a07f4381da6112fa156b036b0982303bdc2ad32 diff --git a/patch/0002-fix-compile-problem-and-make-rubik-real-static.patch b/patch/0002-fix-compile-problem-and-make-rubik-real-static.patch new file mode 100644 index 0000000..207b0a1 --- /dev/null +++ b/patch/0002-fix-compile-problem-and-make-rubik-real-static.patch @@ -0,0 +1,38 @@ +From 40ab0fd7f9023093a90422a93f7082f259720b00 Mon Sep 17 00:00:00 2001 +From: yangjiaqi +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 + diff --git a/rubik.spec b/rubik.spec index 08337a1..956745a 100644 --- a/rubik.spec +++ b/rubik.spec @@ -1,6 +1,6 @@ Name: rubik Version: 0.1.0 -Release: 2 +Release: 3 Summary: Hybrid Deployment for Cloud Native License: Mulan PSL V2 URL: https://gitee.com/openeuler/rubik @@ -49,6 +49,12 @@ install -Dp ./Dockerfile %{buildroot}%{_sharedstatedir}/%{name}/Dockerfile rm -rf %{buildroot} %changelog +* Mon Sep 19 2022 yangjiaqi - 0.1.0-3 +- Type:bugfix +- CVENA +- SUG:restart +- DESC:fix compile problem and make rubik real static + * Tue Jan 11 2022 DCCooper <1866858@gmail.com> - 0.1.0-2 - Type:bugfix - CVE:NA diff --git a/series.conf b/series.conf index 55d3a48..e0617f4 100644 --- a/series.conf +++ b/series.conf @@ -1,2 +1,3 @@ patch/0001-rubik-enable-GO111MODULE.patch +patch/0002-fix-compile-problem-and-make-rubik-real-static.patch #end of file