diff --git a/atune.spec b/atune.spec index 8996f10..b937a51 100755 --- a/atune.spec +++ b/atune.spec @@ -3,7 +3,7 @@ Summary: AI auto tuning system Name: atune Version: 0.3 -Release: 0.7 +Release: 0.8 License: Mulan PSL v2 URL: https://gitee.com/openeuler/A-Tune Source: https://gitee.com/openeuler/A-Tune/repository/archive/v%{version}.tar.gz @@ -11,6 +11,8 @@ Source: https://gitee.com/openeuler/A-Tune/repository/archive/v%{version}.tar.gz Patch1: atune-support-for-Go-1.15.patch Patch2: atune-update-file-description-and-testcase.patch +Patch6001: backport-atune-add-go-compile-flag.patch + BuildRequires: rpm-build golang-bin procps-ng BuildRequires: sqlite >= 3.24.0 openssl BuildRequires: python3-scikit-optimize python3-pandas python3-xgboost @@ -143,6 +145,9 @@ make models %systemd_postun_with_restart atuned.service %changelog +* Sat Mar 20 2021 BruceGW - 0.3-0.8 +- add go compile flag + * Mon Jan 11 2021 gaoruoshu - 0.3-0.7 - update file description and test case diff --git a/backport-atune-add-go-compile-flag.patch b/backport-atune-add-go-compile-flag.patch new file mode 100644 index 0000000..7f14eb0 --- /dev/null +++ b/backport-atune-add-go-compile-flag.patch @@ -0,0 +1,34 @@ +From 44c3814b0814d64d104ddb0605fad46be8d0b06f Mon Sep 17 00:00:00 2001 +From: zhuguodong +Date: Thu, 24 Dec 2020 08:06:38 +0000 +Subject: [PATCH] makefile change + +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 68f6252..b54458c 100755 +--- a/Makefile ++++ b/Makefile +@@ -11,7 +11,7 @@ SRCVERSION = $(shell git rev-parse --short HEAD 2>/dev/null) + ATUNEVERSION = $(VERSION)$(if $(SRCVERSION),($(SRCVERSION))) + + GOLDFLAGS += -X gitee.com/openeuler/A-Tune/common/config.Version=$(ATUNEVERSION) +-GOFLAGS = -ldflags "$(GOLDFLAGS)" ++GOFLAGS = -ldflags '-s -w -extldflags "-static" -extldflags "-zrelro" -extldflags "-znow" -extldflags "-ftrapv" $(GOLDFLAGS)' + + CERT_PATH=$(DESTDIR)/etc/atuned + GRPC_CERT_PATH=$(CERT_PATH)/grpc_certs +@@ -29,7 +29,7 @@ atuned: + go build -mod=vendor -v $(GOFLAGS) -o $(PKGPATH)/atuned cmd/atuned/*.go + + modules: +- cd ${CURDIR}/modules/server/profile/ && go build -mod=vendor -buildmode=plugin -o ${CURDIR}/pkg/daemon_profile_server.so *.go ++ cd ${CURDIR}/modules/server/profile/ && go build -mod=vendor -buildmode=plugin $(GOFLAGS) -o ${CURDIR}/pkg/daemon_profile_server.so *.go + + clean: + rm -rf $(PKGPATH)/* +-- +2.27.0 +