add loong64 support for isula-build

This commit is contained in:
Wenlong Zhang 2023-02-07 16:36:51 +08:00
parent 6a6c3da0a3
commit 3a598d28f9
7 changed files with 36642 additions and 4 deletions

View File

@ -1 +1 @@
0.9.6-17
0.9.6-18

View File

@ -1 +1 @@
4f2c91ba3c86b40cc9a86de54dd1d5473ed9cc57
37aa4197d30b2780332cd40479f3231a775b212f

View File

@ -2,7 +2,7 @@
Name: isula-build
Version: 0.9.6
Release: 17
Release: 18
Summary: A tool to build container images
License: Mulan PSL V2
URL: https://gitee.com/openeuler/isula-build
@ -37,6 +37,11 @@ cp %{SOURCE6} .
%build
sh ./apply-patches
%ifarch loongarch64
patch -p1 < patch/loong64-0001-add-loong64-support-for-etcd.patch
patch -p1 < patch/loong64-0002-update-vendor-for-isula-build-to-support-loong64.patch
patch -p1 < patch/loong64-0003-delete-static-pie-for-loong64.patch
%endif
%{make_build} safe
./bin/isula-build completion > __isula-build
@ -85,6 +90,12 @@ fi
/usr/share/bash-completion/completions/isula-build
%changelog
* Mon Feb 6 2023 Wenlong Zhang <zhangwenlong@loongson.cn> - 0.9.6-18
- Type:bugfix
- CVE:NA
- SUG:restart
- DESC:add loong64 support for isula-build
* Thu Feb 02 2023 daisicheng <daisicheng@huawei.com> - 0.9.6-17
- Type:bugfix
- CVE:NA

View File

@ -0,0 +1,30 @@
From 8617d4d44d055b19301a815ec070479d9e8e00ff Mon Sep 17 00:00:00 2001
From: Your Name <zhangwenlong@loongson.cn>
Date: Fri, 6 Jan 2023 01:20:46 +0000
Subject: [PATCH] add loong64 support for etcd
---
.../vendor/go.etcd.io/bbolt/bolt_loong64.go | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 components/engine/vendor/go.etcd.io/bbolt/bolt_loong64.go
diff --git a/vendor/go.etcd.io/bbolt/bolt_loong64.go b/vendor/go.etcd.io/bbolt/bolt_loong64.go
new file mode 100644
index 00000000..aa8de7b1
--- /dev/null
+++ b/vendor/go.etcd.io/bbolt/bolt_loong64.go
@@ -0,0 +1,12 @@
+// +build loong64
+
+package bbolt
+
+// maxMapSize represents the largest mmap size supported by Bolt.
+const maxMapSize = 0x8000000000 // 512GB
+
+// maxAllocSize is the size used when creating array pointers.
+const maxAllocSize = 0x7FFFFFFF
+
+// Are unaligned load/stores broken on this arch?
+var brokenUnaligned = false
--
2.33.0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
From 971d64904c5ab6e595109b3d88aa9e5b33eac6ac Mon Sep 17 00:00:00 2001
From: Wenlong Zhang <zhangwenlong@loongson.cn>
Date: Wed, 1 Feb 2023 10:59:12 +0800
Subject: [PATCH] delete static-pie for loong64
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 0d6bd01..889b610 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-pie -Wl,-z,now"
+STATIC_LDFLAGS := -linkmode=external -extldflags "-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.33.0

View File

@ -44,4 +44,4 @@ patch/0132-add-login_test-logout_test-remove_test-and-import_te.patch
patch/0133-cmd-daemon-add-base-test-for-runDaemon-and-before-fu.patch
patch/0134-add-dt-for-interface-manifest-health-status-in-daemo.patch
patch/0135-fix-the-login_test-in-daemon-for-euleros-and-openeul.patch
patch/0136-add-manifest.json-verification-before-loading-a-tar.patch
patch/0136-add-manifest.json-verification-before-loading-a-tar.patch