Compare commits

...

No commits in common. 'i10c-beta' and 'c9' have entirely different histories.

@ -1 +1 @@
61ffc54bf7e345c9df2d20d599da47f0e91e70e2 SOURCES/criu-3.19.tar.gz
f359d9a3af080f5d3293c847af5ab10f58639d85 SOURCES/criu-3.18.tar.gz

2
.gitignore vendored

@ -1 +1 @@
SOURCES/criu-3.19.tar.gz
SOURCES/criu-3.18.tar.gz

@ -0,0 +1,57 @@
From 4878775c8e0f2ea6869aff139d219f6eb0c4006c Mon Sep 17 00:00:00 2001
From: Adrian Reber <areber@redhat.com>
Date: Fri, 28 Jan 2022 15:10:31 +0000
Subject: [PATCH] Fix building with annobin
Annobin (used at least in Fedora and RHEL) injects annotation into the
compiled objects which break the parasite and restorer.
This removes the annobin flags as used in Fedora and RHEL and makes CRIU
work on Fedora and RHEL with annobin enabled.
Signed-off-by: Adrian Reber <areber@redhat.com>
---
compel/plugins/Makefile | 2 +-
criu/pie/Makefile | 2 +-
criu/pie/Makefile.library | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/compel/plugins/Makefile b/compel/plugins/Makefile
index e5fa781ac..37630d438 100644
--- a/compel/plugins/Makefile
+++ b/compel/plugins/Makefile
@@ -1,4 +1,4 @@
-CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN),$(CFLAGS))
+CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN) -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1,$(CFLAGS))
CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
CFLAGS += -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0
diff --git a/criu/pie/Makefile b/criu/pie/Makefile
index 265dcf82b..386626334 100644
--- a/criu/pie/Makefile
+++ b/criu/pie/Makefile
@@ -4,7 +4,7 @@
target := parasite restorer
-CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN),$(CFLAGS))
+CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN) -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1,$(CFLAGS))
CFLAGS += $(CFLAGS_PIE)
ccflags-y += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
ccflags-y += -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0
diff --git a/criu/pie/Makefile.library b/criu/pie/Makefile.library
index da2a2fab3..6247afe7e 100644
--- a/criu/pie/Makefile.library
+++ b/criu/pie/Makefile.library
@@ -21,7 +21,7 @@ ifeq ($(ARCH),arm)
lib-y += ./$(ARCH_DIR)/pie-cacheflush.o
endif
-CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN),$(CFLAGS))
+CFLAGS := $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN) -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1,$(CFLAGS))
CFLAGS += $(CFLAGS_PIE)
ifeq ($(ARCH),mips)
--
2.34.1

@ -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

@ -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'}
)

@ -1,49 +1,40 @@
%global py_prefix python3
%global py_binary %{py_prefix}
# With annobin enabled, CRIU does not work anymore. It seems CRIU's
# parasite code breaks if annobin is enabled.
%undefine _annotated_build
# Disable automatic call to the set_build_flags macro
# at the beginning of the build, check, and install.
# This change was introduced in Fedora 36.
%undefine _auto_set_build_flags
# This package calls LD directly without specifying the LTO plugins. Until
# that is fixed, disable LTO.
%global _lto_cflags %%{nil}
Name: criu
Version: 3.19
Release: 5%{?dist}
Version: 3.18
Release: 1%{?dist}
Provides: crtools = %{version}-%{release}
Obsoletes: crtools <= 1.0-2
Summary: Tool for Checkpoint/Restore in User-space
License: GPL-2.0-only AND LGPL-2.1-only AND MIT
License: GPLv2
URL: http://criu.org/
Source0: https://github.com/checkpoint-restore/criu/archive/v%{version}/criu-%{version}.tar.gz
# Add protobuf-c as a dependency.
# We use this patch because the protobuf-c package name
# in RPM and DEB is different.
Patch99: criu.pc.patch
Source5: criu-tmpfiles.conf
Source1: criu-tmpfiles.conf
Source2: pycriu-setup-py
BuildRequires: gcc
BuildRequires: systemd
BuildRequires: libnet-devel
BuildRequires: protobuf-devel protobuf-c-devel %{py_prefix}-devel libnl3-devel libcap-devel
BuildRequires: asciidoc xmlto
BuildRequires: %{py_prefix}-pip
BuildRequires: %{py_prefix}-setuptools
BuildRequires: %{py_prefix}-wheel
BuildRequires: %{py_prefix}-protobuf
BuildRequires: asciidoctor
BuildRequires: perl-interpreter
BuildRequires: libselinux-devel
BuildRequires: gnutls-devel
BuildRequires: make
# Checkpointing containers with a tmpfs requires tar
Recommends: tar
%if 0%{?fedora}
BuildRequires: libbsd-devel
BuildRequires: nftables-devel
%endif
BuildRequires: make
Patch0: 0001-Fix-building-with-annobin.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,
# ppc64le, aarch64 and s390x
@ -74,6 +65,7 @@ This package contains the libraries for %{name}
%{?python_provide:%python_provide %{py_prefix}-%{name}}
Summary: Python bindings for %{name}
Requires: %{py_prefix}-protobuf
Obsoletes: python2-criu < 3.10-1
%description -n %{py_prefix}-%{name}
%{py_prefix}-%{name} contains Python bindings for %{name}.
@ -86,50 +78,44 @@ Requires: %{py_prefix}-%{name} = %{version}-%{release}
crit is a tool designed to decode CRIU binary dump files and show
their content in human-readable form.
%package -n criu-ns
Summary: Tool to run CRIU in different namespaces
Requires: %{name} = %{version}-%{release}
%description -n criu-ns
The purpose of the criu-ns wrapper script is to enable restoring a process
tree that might require a specific PID that is already used on the system.
This script can help to workaround the so called "PID mismatch" problem.
%prep
%setup -q
%patch -P 99 -p1
%patch -P 0 -p1
%patch -P 1 -p1
%patch -P 2 -p1
%build
# This package calls LD directly without specifying the LTO plugins. Until
# that is fixed, disable LTO.
%define _lto_cflags %{nil}
# %{?_smp_mflags} does not work
# -fstack-protector breaks build
CFLAGS+=`echo %{optflags} | sed -e 's,-fstack-protector\S*,,g'` make V=1 WERROR=0 PREFIX=%{_prefix} RUNDIR=/run/criu PYTHON=%{py_binary}
make docs V=1
%install
sed -e "s,--upgrade --ignore-installed,--no-index --no-deps -v --no-build-isolation,g" -i lib/Makefile -i crit/Makefile
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-lib DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PYTHON=%{py_binary}
make install-crit DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PYTHON=%{py_binary}
make install-man DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/compel.1
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/criu-amdgpu-plugin.1
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf
install -m 0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf
install -d -m 0755 %{buildroot}/run/%{name}/
# remove static lib
rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a
# remove static libs
rm $RPM_BUILD_ROOT%{_libdir}/*.a
rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name}
# remove compel man-page
rm $RPM_BUILD_ROOT%{_mandir}/man1/compel.1*
# remove amdgpu plugin man-page
rm $RPM_BUILD_ROOT%{_mandir}/man1/amdgpu_plugin.1*
# remove criu-ns
rm $RPM_BUILD_ROOT%{_sbindir}/criu-ns
rm $RPM_BUILD_ROOT%{_mandir}/man1/criu-ns.1*
%files
%{_sbindir}/%{name}
%doc %{_mandir}/man8/criu.8*
%{_libexecdir}/%{name}
%{_mandir}/man8/criu.8*
%dir /run/%{name}
%{_tmpfilesdir}/%{name}.conf
%doc README.md COPYING
@ -143,141 +129,73 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a
%{_libdir}/*.so.*
%files -n %{py_prefix}-%{name}
%{python3_sitelib}/pycriu*
%{python3_sitelib}/pycriu/*
%{python3_sitelib}/pycriu-%{version}.dist-info
%files -n crit
%{_bindir}/crit
%{python3_sitelib}/crit-%{version}.dist-info/
%{python3_sitelib}/crit
%{python3_sitelib}/crit-%{version}.dist-info
%doc %{_mandir}/man1/crit.1*
%files -n criu-ns
%{_sbindir}/criu-ns
%doc %{_mandir}/man1/criu-ns.1*
%changelog
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 3.19-5
- Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.19-5
- Bump release for June 2024 mass rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.19-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.19-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Nov 28 2023 Adrian Reber <adrian@lisas.de> - 3.19-2
- Fix test setup
* Tue Nov 28 2023 Adrian Reber <adrian@lisas.de> - 3.19-1
- Update to 3.19
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.18-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jul 06 2023 Adrian Reber <adrian@lisas.de> - 3.18-3
- migrated to SPDX license
- remove RHEL 7 conditionals
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.18-2
- Rebuilt for Python 3.12
* Tue Apr 25 2023 Adrian Reber <adrian@lisas.de> - 3.18-1
* Tue Apr 25 2034 Adrian Reber <adrian@lisas.de> - 3.18-1
- Update to 3.18
- Apply patch from upstream to support newer CPUs
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.17.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Dec 2 2022 Florian Weimer <fweimer@redhat.com> - 3.17.1-4
- Fix FTBFS with glibc 2.36
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.17.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Mar 31 2023 Jindrich Novy <jnovy@redhat.com> - 3.17.1-1
- update to https://github.com/checkpoint-restore/criu/releases/tag/v3.17.1
- Related: #2176063
* Fri Jul 08 2022 Adrian Reber <adrian@lisas.de> - 3.17.1-2
* Mon Jul 11 2022 Radostin Stoyanov <radostin@redhat.com> - 3.17-4
- Rebuilt to pick up glibc rseq() changes
* Mon Jun 27 2022 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 3.17.1-1
- Update to release version 3.17.1
* Mon Jun 20 2022 Adrian Reber <adrian@lisas.de> - 3.17-4
- Apply upstream patch to fix mount v2 errors
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 3.17-3
- Rebuilt for Python 3.11
* Thu May 19 2022 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 3.17-2
- Use mntns-compat-mode as a temporary fix for runc
* Fri May 6 2022 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 3.17-1
- Update to release version 3.17
- Do not install compel and amdgpu_plugin man pages
* Tue Apr 5 2022 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 3.16.1-12
- Update rseq patches
* Tue Apr 5 2022 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 3.16.1-11
- Update rseq patches
* Tue Apr 5 2022 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 3.16.1-10
- Update fixup patch
* Tue Apr 5 2022 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 3.16.1-9
- Update rseq support patches
* Fri Feb 18 2022 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 3.16.1-8
- rebuilt
* Tue Feb 8 2022 Radostin Stoyanov <radostin@redhat.com> - 3.16.1-7
- Drop global -ffreestanding
* Mon Jan 31 2022 Radostin Stoyanov <radostin@redhat.com> - 3.16.1-6
- Fix typo in changelog
- Replace `asciidoc` and `xmlto` with `asciidoctor`
- Enable initial rseq support
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.16.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Jul 04 2022 Radostin Stoyanov <radostin@redhat.com> - 3.17-3
- Add libprotobuf-c dependency requirement
* Sat Nov 06 2021 Adrian Reber <adrian@lisas.de> - 3.16.1-4
- Rebuilt for protobuf 3.19.0
* Mon May 09 2022 Adrian Reber <areber@redhat.com> - 3.17-2
- Update to 3.17
- Drop upstreamed patch
- Remove compel man-page
* Mon Oct 25 2021 Adrian Reber <adrian@lisas.de> - 3.16.1-3
- Rebuilt for protobuf 3.18.1
* Mon Jan 31 2022 Adrian Reber <areber@redhat.com> - 3.15-13
- Apply patch to build with annobin enabled
- Apply patch to fix unsafe IPv6 handling
* Tue Oct 19 2021 Radostin Stoyanov <radostin@redhat.com> - 3.16.1-2
- Update protobuf-c to libprotobuf-c requirement
* Mon Sep 6 2021 Radostin Stoyanov <radostin@redhat.com> - 3.15-12
- Increase release number from 11 to 12
- Disable podman test when crun doesn't support checkpoint/restore
* Thu Oct 14 2021 Radostin Stoyanov <radostin@redhat.com> - 3.16.1-1
- Update to 3.16.1
- Add protobuf-c as required dependency (#2013775)
* Tue Aug 31 2021 Adrian Reber <areber@redhat.com> - 3.15-11
- Remove unnecessary Requires: criu-libs
- Remove wrong BR nftables-devel
- Bump release for rebuild
* Tue Oct 05 2021 Adrian Reber <adrian@lisas.de> - 3.16-3
- Fix build on RHEL 8
* Mon Aug 16 2021 Jindrich Novy <jnovy@redhat.com> - 3.15-10
- disable LTO on RHEL9 again
- Related: #1970747
* Thu Sep 23 2021 Adrian Reber <adrian@lisas.de> - 3.16-2
- Include criu-ns sub package
- Use new github Source0 location
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.15-9
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Wed Sep 22 2021 Adrian Reber <adrian@lisas.de> - 3.16-1
- Update to 3.16
* Fri Aug 06 2021 Jindrich Novy <jnovy@redhat.com> - 3.15-8
- add Requires: criu-libs = %%{version}-%%{release} in criu-devel
- Related: #1970747
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.15-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Aug 04 2021 Jindrich Novy <jnovy@redhat.com> - 3.15-7
- remove pre-RHEL9 hacks
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.15-5
- Rebuilt for Python 3.10
* Wed May 05 2021 Adrian Reber <areber@redhat.com> - 3.15-6
- Enable criu-devel and criu-libs for RHEL 9
- Remove nftables-devel dependency for now
* Fri Apr 09 2021 Adrian Reber <adrian@lisas.de> - 3.15-4
- Test for testing
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.15-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.15-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jan 13 2021 Adrian Reber <adrian@lisas.de> - 3.15-2
* Wed Jan 13 09:45:16 CET 2021 Adrian Reber <adrian@lisas.de> - 3.15-2
- Rebuilt for protobuf 3.14
* Wed Nov 04 2020 Adrian Reber <adrian@lisas.de> - 3.15-1

Loading…
Cancel
Save