From 1ba600728148965c5f301ac2c1ac135d6facbbe5 Mon Sep 17 00:00:00 2001 From: xingweizheng Date: Wed, 14 Sep 2022 11:07:15 +0800 Subject: [PATCH] improve security compile option of isula-build binary --- VERSION-openeuler | 2 +- apply-patches | 4 +-- git-commit | 2 +- isula-build.spec | 8 +++++- ...-compile-option-of-isula-build-binar.patch | 25 +++++++++++++++++++ series.conf | 3 ++- 6 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 patch/0126-improve-security-compile-option-of-isula-build-binar.patch diff --git a/VERSION-openeuler b/VERSION-openeuler index 6b10799..5b2e3ee 100644 --- a/VERSION-openeuler +++ b/VERSION-openeuler @@ -1 +1 @@ -0.9.6-11 +0.9.6-12 diff --git a/apply-patches b/apply-patches index c5733c8..24cfdd8 100755 --- a/apply-patches +++ b/apply-patches @@ -9,7 +9,7 @@ set -ex pkg=isula-build cwd=${PWD} src=${cwd}/${pkg} -tar_file=v"$(awk -F"-" '{print $1}' < VERSION-openeuler)".tar.gz +tar_file=v"$(awk -F"-" '{print $1}' - 0.9.6-12 +- Type:bugfix +- CVE:NA +- SUG:restart +- DESC:improve security compile option of isula-build binary + * Fri Aug 19 2022 daisicheng - 0.9.6-11 - Type:bugfix - CVE:NA diff --git a/patch/0126-improve-security-compile-option-of-isula-build-binar.patch b/patch/0126-improve-security-compile-option-of-isula-build-binar.patch new file mode 100644 index 0000000..7c683be --- /dev/null +++ b/patch/0126-improve-security-compile-option-of-isula-build-binar.patch @@ -0,0 +1,25 @@ +From bdbd4b3136d57ef5e8d30f8537d03693cc11c481 Mon Sep 17 00:00:00 2001 +From: xingweizheng +Date: Tue, 13 Sep 2022 23:07:28 +0800 +Subject: [PATCH] improve security compile option of isula-build binary + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 4bdb064..0d6bd01 100644 +--- a/Makefile ++++ b/Makefile +@@ -23,7 +23,7 @@ BUILDFLAGS := -tags "$(BUILDTAGS)" + TMPDIR := /tmp/isula_build_tmpdir + BEFLAG := -tmpdir=${TMPDIR} + SAFEBUILDFLAGS := -buildid=IdByIsula -buildmode=pie -extldflags=-ftrapv -extldflags=-zrelro -extldflags=-znow $(BEFLAG) $(LDFLAGS) +-STATIC_LDFLAGS := -linkmode=external -extldflags=-static ++STATIC_LDFLAGS := -linkmode=external -extldflags "-static-pie -Wl,-z,now" + + IMAGE_BUILDARGS := $(if $(http_proxy), --build-arg http_proxy=$(http_proxy)) + IMAGE_BUILDARGS += $(if $(https_proxy), --build-arg https_proxy=$(https_proxy)) +-- +2.27.0 + diff --git a/series.conf b/series.conf index 0b44f49..bed2cd1 100644 --- a/series.conf +++ b/series.conf @@ -33,4 +33,5 @@ patch/0121-print-first-and-second-error-when-dockerfile-not-fou.patch patch/0122-registries.toml-could-not-be-empty-hosts-resolv.conf.patch patch/0123-modify-the-Makefile-and-README-document.patch patch/0124-add-the-constraints-and-limitations-of-the-doc.patch -patch/0125-fix-the-possible-file-leakage-problem-in-util-cipher.patch \ No newline at end of file +patch/0125-fix-the-possible-file-leakage-problem-in-util-cipher.patch +patch/0126-improve-security-compile-option-of-isula-build-binar.patch