!215 Add loongarch64 support and fix update cpu-rt period failed and fix layer size type as int64

Merge pull request !215 from zhangxiaoyu/openEuler-20.03-LTS-SP3
This commit is contained in:
haozi007 2023-02-21 09:01:44 +00:00 committed by Gitee
commit e3815e845c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 84 additions and 2 deletions

View File

@ -0,0 +1,37 @@
From 42cf57e75e50457c1a4ee28d286aa4644c9c266a Mon Sep 17 00:00:00 2001
From: songbuhuang <544824346@qq.com>
Date: Wed, 8 Feb 2023 10:40:20 +0800
Subject: [PATCH 1/2] fix update cpu-rt period failed
Signed-off-by: songbuhuang <544824346@qq.com>
---
src/lcrcontainer_execute.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/lcrcontainer_execute.c b/src/lcrcontainer_execute.c
index ac49c50..4c49a28 100644
--- a/src/lcrcontainer_execute.c
+++ b/src/lcrcontainer_execute.c
@@ -363,14 +363,15 @@ static bool update_resources_cpu_v1(struct lxc_container *c, const struct lcr_cg
if (!update_resources_cpuset_mems(c, cr)) {
goto err_out;
}
-
- if (update_resources_cpu_rt_period(c, cr) != 0) {
- goto err_out;
- }
+
if (update_resources_cpu_rt_runtime(c, cr) != 0) {
goto err_out;
}
+ if (update_resources_cpu_rt_period(c, cr) != 0) {
+ goto err_out;
+ }
+
ret = true;
err_out:
return ret;
--
2.25.1

View File

@ -0,0 +1,26 @@
From 9e9fbc213ce485a53b8dee07ad923369096ae899 Mon Sep 17 00:00:00 2001
From: "Neil.wrz" <wangrunze13@huawei.com>
Date: Mon, 20 Feb 2023 22:24:30 -0800
Subject: [PATCH 2/2] fix layer size type as int64
Signed-off-by: Neil.wrz <wangrunze13@huawei.com>
---
src/json/schema/registry/manifest_schema2.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/json/schema/registry/manifest_schema2.json b/src/json/schema/registry/manifest_schema2.json
index 44f31db..78cc68c 100644
--- a/src/json/schema/registry/manifest_schema2.json
+++ b/src/json/schema/registry/manifest_schema2.json
@@ -44,7 +44,7 @@
"type": "string"
},
"size": {
- "type": "integer"
+ "type": "int64"
},
"digest": {
"$ref": "../defs.json#/definitions/digest"
--
2.25.1

View File

@ -1,5 +1,5 @@
%global _version 2.0.9 %global _version 2.0.9
%global _release 1 %global _release 3
%global _inner_name isula_libutils %global _inner_name isula_libutils
Name: lcr Name: lcr
@ -12,7 +12,8 @@ Group: Applications/System
License: LGPLv2.1+ License: LGPLv2.1+
BuildRoot: %{_tmppath}/lcr-%{version} BuildRoot: %{_tmppath}/lcr-%{version}
Patch0001: 0001-fix-update-cpu-rt-period-failed.patch
Patch0002: 0002-fix-layer-size-type-as-int64.patch
%define lxcver_lower 4.0.3-2022102400 %define lxcver_lower 4.0.3-2022102400
%define lxcver_upper 4.0.3-2022102500 %define lxcver_upper 4.0.3-2022102500
@ -22,6 +23,7 @@ BuildRequires: lxc > %{lxcver_lower} lxc < %{lxcver_upper}
BuildRequires: lxc-devel > %{lxcver_lower} lxc-devel < %{lxcver_upper} BuildRequires: lxc-devel > %{lxcver_lower} lxc-devel < %{lxcver_upper}
BuildRequires: zlib-devel yajl-devel gtest-devel BuildRequires: zlib-devel yajl-devel gtest-devel
Requires: lxc > %{lxcver_lower} lxc < %{lxcver_upper} yajl zlib Requires: lxc > %{lxcver_lower} lxc < %{lxcver_upper} yajl zlib
ExclusiveArch: x86_64 aarch64 loongarch64
%ifarch x86_64 %ifarch x86_64
Provides: liblcr.so()(64bit) Provides: liblcr.so()(64bit)
@ -33,6 +35,11 @@ Provides: liblcr.so()(64bit)
Provides: libisula_libutils.so()(64bit) Provides: libisula_libutils.so()(64bit)
%endif %endif
%ifarch loongarch64
Provides: liblcr.so()(64bit)
Provides: libisula_libutils.so()(64bit)
%endif
%description %description
Containers are insulated areas inside a system, which have their own namespace Containers are insulated areas inside a system, which have their own namespace
for filesystem, network, PID, IPC, CPU and memory allocation and which can be for filesystem, network, PID, IPC, CPU and memory allocation and which can be
@ -102,6 +109,18 @@ rm -rf %{buildroot}
%{_includedir}/%{_inner_name}/*.h %{_includedir}/%{_inner_name}/*.h
%changelog %changelog
* Tue Feb 21 2023 zhangxiaoyu<zhangxiaoyu58@huawei.com> - 2.0.9-3
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix update cpu-rt period failed and fix layer size type as int64
* Thu Feb 16 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 2.0.9-2
- Type:enhancement
- CVE:NA
- SUG:NA
- DESC:Add loongarch64 support
* Sat Dec 17 2022 wangrunze<wangrunze13@huawei.com> - 2.0.9-1 * Sat Dec 17 2022 wangrunze<wangrunze13@huawei.com> - 2.0.9-1
- Type:enhancement - Type:enhancement
- CVE:NA - CVE:NA