Add sw64 architecture

Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
This commit is contained in:
zhangxiaoyu 2022-11-08 09:48:57 +08:00
parent a222958c95
commit 659dae3fd3
3 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From 10ce28085f6d425aae21e043a45c6ef02fdd1e44 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Mon, 24 Oct 2022 11:03:11 +0800
Subject: [PATCH] Add sw64 architecture
Signed-off-by: rpm-build <rpm-build>
---
src/lxc/syscall_numbers.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/lxc/syscall_numbers.h b/src/lxc/syscall_numbers.h
index bfd0e57..803eab7 100644
--- a/src/lxc/syscall_numbers.h
+++ b/src/lxc/syscall_numbers.h
@@ -377,6 +377,8 @@
#ifndef __NR_pidfd_send_signal
#if defined __alpha__
#define __NR_pidfd_send_signal 534
+ #elif defined __sw_64__
+ #define __NR_pidfd_send_signal 271
#elif defined _MIPS_SIM
#if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */
#define __NR_pidfd_send_signal 4424
--
2.33.0

View File

@ -1,4 +1,4 @@
%global _release 2022101701
%global _release 2022102401
Name: lxc
Version: 4.0.3
@ -24,6 +24,7 @@ Patch0013: 0013-return-fail-if-no-args-or-no-rootfs-path-found.patch
Patch0014: 0014-fix-tools-using-option-give-error-message.patch
Patch0015: 0015-fix-do-mask-pathes-after-parent-mounted.patch
Patch0016: 0016-skip-kill-cgroup-processes-if-no-hierarchies.patch
Patch0017: 0017-lxc-Add-sw64-architecture.patch
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
BuildRequires: pkgconfig(libseccomp)
@ -110,12 +111,20 @@ do
chrpath -d ${file}
done
%ifarch sw_64
chrpath -d %{buildroot}/usr/lib/liblxc.so
chmod +x %{buildroot}/usr/lib/liblxc.so
%else
chrpath -d %{buildroot}/usr/lib64/liblxc.so
chmod +x %{buildroot}/usr/lib64/liblxc.so
%endif
# docs
mkdir -p %{buildroot}%{_pkgdocdir}/api
%ifarch sw_64
%else
cp -a AUTHORS README %{buildroot}%{_pkgdocdir}
cp -a doc/api/html/* %{buildroot}%{_pkgdocdir}/api/
%endif
# cache dir
mkdir -p %{buildroot}%{_localstatedir}/cache/%{name}
@ -160,8 +169,11 @@ make check
%config(noreplace) %{_sysconfdir}/sysconfig/*
%dir %{_pkgdocdir}
%ifarch sw_64
%else
%{_pkgdocdir}/AUTHORS
%{_pkgdocdir}/README
%endif
%license COPYING
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}@.service
@ -187,14 +199,23 @@ make check
%files help
%dir %{_pkgdocdir}
%{_pkgdocdir}/*
%ifarch sw_64
%else
%{_mandir}/man1/%{name}*
%{_mandir}/*/man1/%{name}*
%{_mandir}/man5/%{name}*
%{_mandir}/man7/%{name}*
%{_mandir}/*/man5/%{name}*
%{_mandir}/*/man7/%{name}*
%endif
%changelog
* Mon Oct 24 2022 wuzx<wuzx1226@qq.com> - 4.0.3-2022102401
- Type:feature
- CVE:NA
- SUG:NA
- DESC:Add sw64 architecture
* Mon Oct 17 2022 zhangxiaoyu<zhangxiaoyu58@huawei.com> - 4.0.3-2022101701
- Type:bugfix
- ID:NA

View File

@ -13,3 +13,5 @@
0013-return-fail-if-no-args-or-no-rootfs-path-found.patch
0014-fix-tools-using-option-give-error-message.patch
0015-fix-do-mask-pathes-after-parent-mounted.patch
0017-lxc-Add-sw64-architecture.patch