criu-3.18-2.el8
- update to 3.18 - Related: #2176055 Signed-off-by: Jindrich Novy <jnovy@redhat.com>
This commit is contained in:
parent
ceed9a5808
commit
d2442124bc
26
criu.spec
26
criu.spec
@ -6,8 +6,8 @@
|
|||||||
%global _lto_cflags %%{nil}
|
%global _lto_cflags %%{nil}
|
||||||
|
|
||||||
Name: criu
|
Name: criu
|
||||||
Version: 3.17
|
Version: 3.18
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Provides: crtools = %{version}-%{release}
|
Provides: crtools = %{version}-%{release}
|
||||||
Obsoletes: crtools <= 1.0-2
|
Obsoletes: crtools <= 1.0-2
|
||||||
Summary: Tool for Checkpoint/Restore in User-space
|
Summary: Tool for Checkpoint/Restore in User-space
|
||||||
@ -15,11 +15,15 @@ License: GPLv2
|
|||||||
URL: http://criu.org/
|
URL: http://criu.org/
|
||||||
Source0: https://github.com/checkpoint-restore/criu/archive/v%{version}/criu-%{version}.tar.gz
|
Source0: https://github.com/checkpoint-restore/criu/archive/v%{version}/criu-%{version}.tar.gz
|
||||||
Source1: criu-tmpfiles.conf
|
Source1: criu-tmpfiles.conf
|
||||||
|
Source2: pycriu-setup-py
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
BuildRequires: libnet-devel
|
BuildRequires: libnet-devel
|
||||||
BuildRequires: protobuf-devel protobuf-c-devel %{py_prefix}-devel libnl3-devel libcap-devel
|
BuildRequires: protobuf-devel protobuf-c-devel %{py_prefix}-devel libnl3-devel libcap-devel
|
||||||
BuildRequires: asciidoc xmlto
|
BuildRequires: asciidoc xmlto
|
||||||
|
BuildRequires: %{py_prefix}-pip
|
||||||
|
BuildRequires: %{py_prefix}-setuptools
|
||||||
|
BuildRequires: %{py_prefix}-wheel
|
||||||
BuildRequires: perl-interpreter
|
BuildRequires: perl-interpreter
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
BuildRequires: gnutls-devel
|
BuildRequires: gnutls-devel
|
||||||
@ -29,6 +33,8 @@ Recommends: tar
|
|||||||
|
|
||||||
Patch0: 0001-Fix-building-with-annobin.patch
|
Patch0: 0001-Fix-building-with-annobin.patch
|
||||||
Patch1: criu.pc.patch
|
Patch1: criu.pc.patch
|
||||||
|
# Fix to work on CPUs with larger XSAVE area (Sapphire Rapids)
|
||||||
|
Patch2: https://github.com/checkpoint-restore/criu/commit/d739260c57576c636759afb312340fa3827312f6.patch
|
||||||
|
|
||||||
# user-space and kernel changes are only available for x86_64, arm,
|
# user-space and kernel changes are only available for x86_64, arm,
|
||||||
# ppc64le, aarch64 and s390x
|
# ppc64le, aarch64 and s390x
|
||||||
@ -74,8 +80,9 @@ their content in human-readable form.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch -P 0 -p1
|
||||||
%patch1 -p1
|
%patch -P 1 -p1
|
||||||
|
%patch -P 2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# %{?_smp_mflags} does not work
|
# %{?_smp_mflags} does not work
|
||||||
@ -84,6 +91,10 @@ CFLAGS+=`echo %{optflags} | sed -e 's,-fstack-protector\S*,,g'` make V=1 WERROR=
|
|||||||
make docs V=1
|
make docs V=1
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
cp %{SOURCE2} lib/py/setup.py
|
||||||
|
sed -e "s,--upgrade --force-reinstall,--disable-pip-version-check --progress-bar off --verbose,g;
|
||||||
|
s,\./crit,./crit lib/py,g;" -i lib/Makefile
|
||||||
|
rm -f crit/pyproject.toml
|
||||||
make install-criu DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
make install-criu DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
||||||
make install-lib DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PYTHON=%{py_binary}
|
make install-lib DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PYTHON=%{py_binary}
|
||||||
make install-man DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
make install-man DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
||||||
@ -119,13 +130,18 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/criu-ns.1*
|
|||||||
|
|
||||||
%files -n %{py_prefix}-%{name}
|
%files -n %{py_prefix}-%{name}
|
||||||
%{python3_sitelib}/pycriu/*
|
%{python3_sitelib}/pycriu/*
|
||||||
%{python3_sitelib}/*egg-info
|
%{python3_sitelib}/pycriu-%{version}.dist-info
|
||||||
|
|
||||||
%files -n crit
|
%files -n crit
|
||||||
%{_bindir}/crit
|
%{_bindir}/crit
|
||||||
|
%{python3_sitelib}/crit-%{version}.dist-info
|
||||||
%doc %{_mandir}/man1/crit.1*
|
%doc %{_mandir}/man1/crit.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 04 2023 Jindrich Novy <jnovy@redhat.com> - 3.18-2
|
||||||
|
- update to 3.18
|
||||||
|
- Related: #2176055
|
||||||
|
|
||||||
* Tue Apr 11 2023 Jindrich Novy <jnovy@redhat.com> - 3.17-1
|
* Tue Apr 11 2023 Jindrich Novy <jnovy@redhat.com> - 3.17-1
|
||||||
- update to 3.17
|
- update to 3.17
|
||||||
- Resolves: #2175794
|
- Resolves: #2175794
|
||||||
|
74
d739260c57576c636759afb312340fa3827312f6.patch
Normal file
74
d739260c57576c636759afb312340fa3827312f6.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
From d739260c57576c636759afb312340fa3827312f6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adrian Reber <areber@redhat.com>
|
||||||
|
Date: Mon, 24 Apr 2023 09:28:19 +0200
|
||||||
|
Subject: [PATCH] compel: support XSAVE on newer Intel CPUs
|
||||||
|
|
||||||
|
Newer Intel CPUs (Sapphire Rapids) have a much larger xsave area than
|
||||||
|
before. Looking at older CPUs I see 2440 bytes.
|
||||||
|
|
||||||
|
# cpuid -1 -l 0xd -s 0
|
||||||
|
...
|
||||||
|
bytes required by XSAVE/XRSTOR area = 0x00000988 (2440)
|
||||||
|
|
||||||
|
On newer CPUs (Sapphire Rapids) it grows to 11008 bytes.
|
||||||
|
|
||||||
|
# cpuid -1 -l 0xd -s 0
|
||||||
|
...
|
||||||
|
bytes required by XSAVE/XRSTOR area = 0x00002b00 (11008)
|
||||||
|
|
||||||
|
This increase the xsave area from one page to four pages.
|
||||||
|
|
||||||
|
Without this patch the fpu03 test fails, with this patch it works again.
|
||||||
|
|
||||||
|
Signed-off-by: Adrian Reber <areber@redhat.com>
|
||||||
|
---
|
||||||
|
.../arch/x86/src/lib/include/uapi/asm/fpu.h | 28 +++++++++++++++++--
|
||||||
|
1 file changed, 26 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h b/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
|
||||||
|
index bd3b0cbd5c..8c83dd9ae4 100644
|
||||||
|
--- a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
|
||||||
|
+++ b/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
|
||||||
|
@@ -21,7 +21,28 @@
|
||||||
|
#define XSTATE_YMM 0x4
|
||||||
|
|
||||||
|
#define FXSAVE_SIZE 512
|
||||||
|
-#define XSAVE_SIZE 4096
|
||||||
|
+/*
|
||||||
|
+ * This used to be 4096 (one page). There is a comment below concerning
|
||||||
|
+ * this size:
|
||||||
|
+ * "One page should be enough for the whole xsave state ;-)"
|
||||||
|
+ * Which is kind of funny as it is no longer enough ;-)
|
||||||
|
+ *
|
||||||
|
+ * Older CPUs:
|
||||||
|
+ * # cpuid -1 -l 0xd -s 0
|
||||||
|
+ * ...
|
||||||
|
+ * bytes required by XSAVE/XRSTOR area = 0x00000988 (2440)
|
||||||
|
+ *
|
||||||
|
+ * Newer CPUs (Sapphire Rapids):
|
||||||
|
+ * # cpuid -1 -l 0xd -s 0
|
||||||
|
+ * ...
|
||||||
|
+ * bytes required by XSAVE/XRSTOR area = 0x00002b00 (11008)
|
||||||
|
+ *
|
||||||
|
+ * So one page is no longer enough... But:
|
||||||
|
+ *
|
||||||
|
+ * Four pages should be enough for the whole xsave state ;-)
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#define XSAVE_SIZE 4*4096
|
||||||
|
|
||||||
|
#define XSAVE_HDR_SIZE 64
|
||||||
|
#define XSAVE_HDR_OFFSET FXSAVE_SIZE
|
||||||
|
@@ -235,8 +256,11 @@ struct pkru_state {
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* One page should be enough for the whole xsave state ;-)
|
||||||
|
+ *
|
||||||
|
+ * Of course it was not ;-) Now using four pages...
|
||||||
|
+ *
|
||||||
|
*/
|
||||||
|
-#define EXTENDED_STATE_AREA_SIZE (4096 - sizeof(struct i387_fxsave_struct) - sizeof(struct xsave_hdr_struct))
|
||||||
|
+#define EXTENDED_STATE_AREA_SIZE (XSAVE_SIZE - sizeof(struct i387_fxsave_struct) - sizeof(struct xsave_hdr_struct))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* cpu requires it to be 64 byte aligned
|
30
pycriu-setup-py
Normal file
30
pycriu-setup-py
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import os
|
||||||
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
print(find_packages('.'))
|
||||||
|
|
||||||
|
def get_version():
|
||||||
|
version = '0.0.1'
|
||||||
|
env = os.environ
|
||||||
|
if 'CRIU_VERSION_MAJOR' in env and 'CRIU_VERSION_MINOR' in env:
|
||||||
|
version = '{}.{}'.format(
|
||||||
|
env['CRIU_VERSION_MAJOR'],
|
||||||
|
env['CRIU_VERSION_MINOR']
|
||||||
|
)
|
||||||
|
if 'CRIU_VERSION_SUBLEVEL' in env and env['CRIU_VERSION_SUBLEVEL']:
|
||||||
|
version += '.' + env['CRIU_VERSION_SUBLEVEL']
|
||||||
|
return version
|
||||||
|
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='pycriu',
|
||||||
|
version=get_version(),
|
||||||
|
description='CRiu Image Tool',
|
||||||
|
author='CRIU team',
|
||||||
|
author_email='criu@openvz.org',
|
||||||
|
license='GPLv2',
|
||||||
|
url='https://github.com/checkpoint-restore/criu',
|
||||||
|
packages=['pycriu','pycriu.images'],
|
||||||
|
package_dir = {'pycriu': '.', 'pycriu.images':'images'}
|
||||||
|
|
||||||
|
)
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (criu-3.17.tar.gz) = febae66a7820345c0f335f4a49e64c0af5c8ae5d3a394cc0770881b64eab11ca03ad5872f06b0c4ccd1da844c519268dad3b4f8b260267e6d3f582e80d80f804
|
SHA512 (criu-3.18.tar.gz) = 3d15554ebd2d08c8904c23b0aba00d505891c14caa4790c2fd12ad6b20bf4058fd210f1d03fd63aacc5ad8bc47e341396b48abbeb474f1fd43c3023fd1ff9171
|
||||||
|
Loading…
Reference in New Issue
Block a user