From 34020156caf7cc8c6da7f0b03461e7e8e728d5b3 Mon Sep 17 00:00:00 2001 From: wzx Date: Tue, 25 Oct 2022 16:11:46 +0800 Subject: [PATCH] Add sw64 architecture Signed-off-by: wzx --- 0050-lxc-Add-sw64-architecture.patch | 26 ++++++++++++++++++++++++++ lxc.spec | 23 ++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 0050-lxc-Add-sw64-architecture.patch diff --git a/0050-lxc-Add-sw64-architecture.patch b/0050-lxc-Add-sw64-architecture.patch new file mode 100644 index 0000000..b8b0696 --- /dev/null +++ b/0050-lxc-Add-sw64-architecture.patch @@ -0,0 +1,26 @@ +From 10ce28085f6d425aae21e043a45c6ef02fdd1e44 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Mon, 24 Oct 2022 11:03:11 +0800 +Subject: [PATCH] Add sw64 architecture + +Signed-off-by: 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 + diff --git a/lxc.spec b/lxc.spec index 5d72348..4fc9cdb 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2022101701 +%global _release 2022102401 Name: lxc Version: 4.0.3 @@ -57,6 +57,7 @@ Patch0046: 0046-return-fail-if-no-args-or-no-rootfs-path-found.patch Patch0047: 0047-fix-tools-with-option-give-error-message.patch Patch0048: 0048-fix-do-mask-paths-after-parent-mounted.patch Patch0049: 0049-skip-kill-cgroup-processes-if-no-hierarchies.patch +Patch0050: 0050-lxc-Add-sw64-architecture.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -143,12 +144,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} @@ -193,8 +202,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 @@ -220,14 +232,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 - 4.0.3-2022102401 +- Type:feature +- CVE:NA +- SUG:NA +- DESC:Add sw64 architecture + * Mon Oct 17 2022 zhangxiaoyu - 4.0.3-2022101701 - Type:bugfix - ID:NA -- Gitee