import criu-3.18-4.module+el8.9.0+19090+d2921118

c8-stream-rhel8 imports/c8-stream-rhel8/criu-3.18-4.module+el8.9.0+19090+d2921118
MSVSphere Packaging Team 1 year ago
parent c7e5fe7737
commit 536aa1df7c

@ -1 +1 @@
91eb1ccac61a7d538db14884091883c6dab5481a SOURCES/criu-3.15.tar.bz2 f359d9a3af080f5d3293c847af5ab10f58639d85 SOURCES/criu-3.18.tar.gz

2
.gitignore vendored

@ -1 +1 @@
SOURCES/criu-3.15.tar.bz2 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,27 @@
From 341ef149ee259d9432ea4c01507eefab2ef8b83c Mon Sep 17 00:00:00 2001
From: Radostin Stoyanov <radostin@redhat.com>
Date: Thu, 14 Oct 2021 12:58:56 +0100
Subject: [PATCH] criu.pc: Add libprotobuf-c as a dependency
CRIU has a dependency on protobuf-c-devel. We express this dependency
in pkgconfig to be auto-detected when building a package.
Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
---
lib/c/criu.pc.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/c/criu.pc.in b/lib/c/criu.pc.in
index 33986d10d..bcced5033 100644
--- a/lib/c/criu.pc.in
+++ b/lib/c/criu.pc.in
@@ -4,5 +4,6 @@ includedir=@includedir@
Name: CRIU
Description: RPC library for userspace checkpoint and restore
Version: @version@
+Requires.private: libprotobuf-c
Libs: -L${libdir} -lcriu
Cflags: -I${includedir}
--
2.31.1

@ -30,10 +30,10 @@ index bd3b0cbd5c..8c83dd9ae4 100644
--- a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h --- a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
+++ b/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 @@ @@ -21,7 +21,28 @@
#define XSTATE_YMM 0x4 #define XSTATE_YMM 0x4
#define FXSAVE_SIZE 512 #define FXSAVE_SIZE 512
-#define XSAVE_SIZE 4096 -#define XSAVE_SIZE 4096
+/* +/*
+ * This used to be 4096 (one page). There is a comment below concerning + * This used to be 4096 (one page). There is a comment below concerning
+ * this size: + * this size:
@ -57,17 +57,17 @@ index bd3b0cbd5c..8c83dd9ae4 100644
+ +
+#define XSAVE_SIZE 4*4096 +#define XSAVE_SIZE 4*4096
#define XSAVE_HDR_SIZE 64 #define XSAVE_HDR_SIZE 64
#define XSAVE_HDR_OFFSET FXSAVE_SIZE #define XSAVE_HDR_OFFSET FXSAVE_SIZE
@@ -233,8 +254,11 @@ struct pkru_state { @@ -235,8 +256,11 @@ struct pkru_state {
* *
* *
* One page should be enough for the whole xsave state. * One page should be enough for the whole xsave state ;-)
+ * + *
+ * Of course it was not ;-) Now using four pages... + * 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 (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)) +#define EXTENDED_STATE_AREA_SIZE (XSAVE_SIZE - sizeof(struct i387_fxsave_struct) - sizeof(struct xsave_hdr_struct))
/* /*

@ -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,36 +1,41 @@
%global py_prefix python3 %global py_prefix python3
%global py_binary %{py_prefix} %global py_binary %{py_prefix}
# With annobin enabled, CRIU does not work anymore. It seems CRIU's # This package calls LD directly without specifying the LTO plugins. Until
# parasite code breaks if annobin is enabled. # that is fixed, disable LTO.
%undefine _annotated_build %global _lto_cflags %%{nil}
Name: criu Name: criu
Version: 3.15 Version: 3.18
Release: 4%{?dist} Release: 4%{?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
License: GPLv2 License: GPLv2
URL: http://criu.org/ URL: http://criu.org/
Source0: http://download.openvz.org/criu/criu-%{version}.tar.bz2 Source0: https://github.com/checkpoint-restore/criu/archive/v%{version}/criu-%{version}.tar.gz
Source1: criu-tmpfiles.conf Source1: criu-tmpfiles.conf
# Fix to work on CPUs with larger XSAVE area (Sapphire Rapids) Source2: pycriu-setup-py
# backported to CRIU 3.15
Patch0: almost-d739260c57576c636759afb312340fa3827312f6.patch
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
BuildRequires: nftables-devel
BuildRequires: make BuildRequires: make
# Checkpointing containers with a tmpfs requires tar # Checkpointing containers with a tmpfs requires tar
Recommends: tar Recommends: tar
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, # user-space and kernel changes are only available for x86_64, arm,
# ppc64le, aarch64 and s390x # ppc64le, aarch64 and s390x
# https://bugzilla.redhat.com/show_bug.cgi?id=902875 # https://bugzilla.redhat.com/show_bug.cgi?id=902875
@ -44,7 +49,7 @@ Linux in user-space.
%package devel %package devel
Summary: Header files and libraries for %{name} Summary: Header files and libraries for %{name}
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: criu-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
%description devel %description devel
This package contains header files and libraries for %{name}. This package contains header files and libraries for %{name}.
@ -76,6 +81,8 @@ their content in human-readable form.
%prep %prep
%setup -q %setup -q
%patch -P 0 -p1 %patch -P 0 -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 --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}
@ -94,11 +105,17 @@ install -d -m 0755 %{buildroot}/run/%{name}/
# remove static libs # remove static libs
rm $RPM_BUILD_ROOT%{_libdir}/*.a rm $RPM_BUILD_ROOT%{_libdir}/*.a
rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name} 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 %files
%{_sbindir}/%{name} %{_sbindir}/%{name}
%{_mandir}/man8/criu.8* %{_mandir}/man8/criu.8*
%{_mandir}/man1/compel.1*
%dir /run/%{name} %dir /run/%{name}
%{_tmpfilesdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf
%doc README.md COPYING %doc README.md COPYING
@ -117,33 +134,33 @@ rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name}
%files -n crit %files -n crit
%{_bindir}/crit %{_bindir}/crit
%{python3_sitelib}/*egg-info
%doc %{_mandir}/man1/crit.1* %doc %{_mandir}/man1/crit.1*
%changelog %changelog
* Fri Jun 09 2023 Adrian Reber <areber@redhat.com> - 3.15.4 * Tue May 16 2023 Jindrich Novy <jnovy@redhat.com> - 3.18-4
- added patch to support CRIU on Sapphire Rapids - switch to egg-info on 8.9
- Resolves: #2203296 - Related: #2176055
* Fri Aug 06 2021 Jindrich Novy <jnovy@redhat.com> - 3.15-3 * Mon May 15 2023 Jindrich Novy <jnovy@redhat.com> - 3.18-3
- add Requires: criu-libs = %%{version}-%%{release} in criu-devel - remove --progress-bar option
- add gating tests - Related: #2176055
- Related: #1934415
* Tue Jul 20 2021 Jindrich Novy <jnovy@redhat.com> - 3.15-2 * Thu May 04 2023 Jindrich Novy <jnovy@redhat.com> - 3.18-2
- add -devel and -libs subpackages - update to 3.18
- Resolves: #1971718 - Related: #2176055
* Wed Nov 04 2020 Jindrich Novy <jnovy@redhat.com> - 3.15-1 * Tue Apr 11 2023 Jindrich Novy <jnovy@redhat.com> - 3.17-1
- update to https://github.com/checkpoint-restore/criu/releases/tag/v3.15 - update to 3.17
- Related: #1883490 - Resolves: #2175794
* Mon May 25 2020 Jindrich Novy <jnovy@redhat.com> - 3.14-2 * Mon Aug 02 2021 Jindrich Novy <jnovy@redhat.com> - 3.15-2
- fix "Need to fix bugs found by coverity." - add gating tests
- Related: #1821193 - Related: #1971718
* Tue May 12 2020 Jindrich Novy <jnovy@redhat.com> - 3.14-1 * Fri Jul 30 2021 Jindrich Novy <jnovy@redhat.com> - 3.15-1
- synchronize containter-tools 8.3.0 with 8.2.1 - add -devel and -libs subpackages
- Related: #1821193 - Resolves: #1971718
* Mon May 13 2019 Adrian Reber <adrian@lisas.de> - 3.12-9 * Mon May 13 2019 Adrian Reber <adrian@lisas.de> - 3.12-9
- Added additional fixup patches for the socket labelling - Added additional fixup patches for the socket labelling

Loading…
Cancel
Save