Compare commits

...
Sign in to create a new pull request.

108 commits

Author SHA1 Message Date
Adrian Reber
a0a8f6a514
Hopefully finally changes to make the tests work
Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-11-17 23:41:29 +01:00
Adrian Reber
737146110b
Drop "Disable installing everything from srpm"
This should fix that the newly build criu RPM is not installed in the
test environment.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-11-17 22:56:10 +01:00
Adrian Reber
1b90755666
Increase test duration to 30 minutes
From the default 5 minutes

Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-11-17 22:23:58 +01:00
Adrian Reber
841fd2c85a Fix changelog date
Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-11-17 21:35:38 +01:00
Adrian Reber
ac36de486b Test debugging
Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-11-17 20:33:48 +00:00
Adrian Reber
13061f0076
Convert STI tests to TMT (rhbz#2382879)
Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-11-17 21:14:50 +01:00
Adrian Reber
368f367e69
Update to 4.2
Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-11-17 18:29:33 +01:00
Adrian Reber
0f4173bc94
Update to 4.2
Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-11-17 17:37:46 +01:00
Adrian Reber
c4e321b1d7
Update to 4.2
Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-11-17 14:50:35 +01:00
Adrian Reber
b18123941d Update to 4.2
Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-11-17 10:48:50 +00:00
Adrian Reber
5467ca58cd Update to 4.2
Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-11-17 02:46:13 +01:00
Python Maint
ad9dc1a142 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 12:12:32 +02:00
Miro Hrončok
678054d8fd Drop unused BuildRequires on python3-wheel
See https://github.com/fedora-eln/eln/issues/284
2025-08-27 13:15:15 +02:00
Python Maint
6733bdad08 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 12:43:17 +02:00
Adrian Reber
88cce10fd3 Update to 4.1.1
Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-07-30 08:49:09 +02:00
Fedora Release Engineering
dd4a14f00a Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 18:50:01 +00:00
Python Maint
54afe54e10 Rebuilt for Python 3.14 2025-06-17 21:09:14 +02:00
David Abdurachmanov
649d2f33e5 Enable for riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2025-04-23 14:40:24 +02:00
Adrian Reber
323d01daa0 Apply upstream patch to fix a runc regression
Signed-off-by: Adrian Reber <adrian@lisas.de>
2025-04-21 20:25:29 +02:00
Radostin Stoyanov
f2a112e667 Update to 4.1
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2025-04-07 13:08:31 +01:00
Zbigniew Jędrzejewski-Szmek
0c47d09fe9 Fix build when sbindir != /usr/sbin
... (rhbz#2340011)
2025-01-27 13:45:55 +01:00
Fedora Release Engineering
5fe5814843 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 14:52:14 +00:00
Radostin Stoyanov
f6e7edaf73 Apply patch to handle vvar_vclock vma-s in rawhide
https://bugzilla.redhat.com/show_bug.cgi?id=2328985
https://github.com/checkpoint-restore/criu/issues/2532

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-12-08 09:09:11 +00:00
Adrian Reber
4684ea74f8
Recommends: iptables
Signed-off-by: Adrian Reber <adrian@lisas.de>
2024-10-17 12:44:09 +02:00
Radostin Stoyanov
ec94fa8515 spec: set PIPFLAGS to run pip without network
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-09-26 13:15:29 +01:00
Radostin Stoyanov
2feabdb937 spec: add tmpfiles_create
This patch fixes the following warning:

criu.x86_64: W: post-without-tmpfile-creation /usr/lib/tmpfiles.d/criu.conf

Please use the %tmpfiles_create macro in %post for each of your
tmpfiles.d files if you expect this file or directory to be
available after package installation (and before reboot).

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-09-26 12:43:40 +01:00
Radostin Stoyanov
973d5b295d Update to v4.0
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-09-26 11:24:35 +01:00
Fedora Release Engineering
84c94b56e3 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 20:12:15 +00:00
Radostin Stoyanov
6b6494641d Apply plugins-amdgpu-fix-printf-format-specifiers patch
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 21:35:45 +01:00
Radostin Stoyanov
f57234b73a Apply plugins-amdgpu-fix-cross-compilation patch
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 21:35:45 +01:00
Radostin Stoyanov
a3667e4ffa Apply plugins-amdgpu-fix-lint-errors patch
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 21:35:45 +01:00
Radostin Stoyanov
789549861f Apply plugins-amdgpu-refactor-code-used-to-implement-checkp patch
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 21:35:45 +01:00
Radostin Stoyanov
11ad4992a4 Apply plugins-amdgpu-refactor-code-in-preparation-to-suppor patch
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 21:35:45 +01:00
Radostin Stoyanov
56dd1e4573 Apply plugins-amdgpu-also-don-t-print-plugin-failed-in-criu patch
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 21:35:45 +01:00
Radostin Stoyanov
3a4a2b89bc Apply plugins-amdgpu-don-t-print-error-for-no-such-process patch
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 21:35:45 +01:00
Radostin Stoyanov
83547af2bd Apply docs-update-amdgpu-plugin-man-page patch
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 21:35:45 +01:00
Radostin Stoyanov
48cbddd4fb Add package for amdgpu-plugin
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 21:35:45 +01:00
Radostin Stoyanov
e7c93aa9e2 test/run-zdtm: run make with parallel jobs
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 19:02:11 +01:00
Radostin Stoyanov
5086e04ef3 test/run-zdtm: drop compatibility with python2
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 19:00:41 +01:00
Radostin Stoyanov
c9cb1e293f test/run-zdtm: exit immediately on non-zero status
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 18:59:24 +01:00
Radostin Stoyanov
dc9cdd23f3 test: fix run-zdtm.sh
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-07-12 18:57:41 +01:00
Python Maint
050d3e5ab6 Rebuilt for Python 3.13 2024-06-08 10:28:10 +02:00
Fedora Release Engineering
9c81549f7c Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 08:25:54 +00:00
Fedora Release Engineering
b9573a9dde Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 16:22:09 +00:00
Adrian Reber
e6dcdedc24
Fix test setup
Signed-off-by: Adrian Reber <adrian@lisas.de>
2023-11-28 17:07:58 +01:00
Adrian Reber
49bf9133bf
python3-protobuf is now also required during build-time
Signed-off-by: Adrian Reber <adrian@lisas.de>
2023-11-28 15:28:04 +01:00
Adrian Reber
1143b7ede1
Fix Python libraries
Signed-off-by: Adrian Reber <adrian@lisas.de>
2023-11-28 15:15:37 +01:00
Adrian Reber
f6c7edf74c
Update to 3.19
Signed-off-by: Adrian Reber <adrian@lisas.de>
2023-11-28 14:23:02 +01:00
Yaakov Selkowitz
23b38e9056 Fix s390x build with kernel 6.5
Resolves: rhbz#2225745
2023-07-31 13:41:29 -04:00
Fedora Release Engineering
43f41b6246 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 16:35:48 +00:00
Adrian Reber
451a795464
migrated to SPDX license
remove RHEL 7 conditionals

Signed-off-by: Adrian Reber <adrian@lisas.de>
2023-07-06 08:44:59 +02:00
Yaakov Selkowitz
f637ae8c27 Fix build with latest pip
pip now uses wheel in certain circumstances, which results in a
.dist-info directory instead of an .egg-info one.
2023-07-04 22:32:12 -04:00
Python Maint
0f561fedff Rebuilt for Python 3.12 2023-06-13 21:33:56 +02:00
Adrian Reber
c440c2fc73
Fix build of python sub-packages
Signed-off-by: Adrian Reber <adrian@lisas.de>
2023-04-25 15:31:21 +02:00
Adrian Reber
c2792a75f9
Update to 3.18
- Apply patch from upstream to support newer CPUs

Signed-off-by: Adrian Reber <adrian@lisas.de>
2023-04-25 10:15:04 +02:00
Fedora Release Engineering
a0f83f20c8 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 00:40:36 +00:00
Florian Weimer
2a16ebb074 Fix FTBFS due to glibc 2.36 header changes
There is an implicit function declaration in the compiler errors,
which is why this is related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2022-12-02 07:57:27 +01:00
Fedora Release Engineering
6a23aad1a3 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 23:45:14 +00:00
Adrian Reber
aeefff6c84
Rebuilt to pick up glibc rseq() changes
Signed-off-by: Adrian Reber <adrian@lisas.de>
2022-07-08 09:58:05 +02:00
Radostin Stoyanov
2ef0d409dc Update to release version 3.17.1
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-06-27 20:43:47 +01:00
Adrian Reber
f42bf1185a
Apply upstream patch to fix mount v2 errors
Signed-off-by: Adrian Reber <adrian@lisas.de>
2022-06-20 16:06:53 +02:00
Python Maint
2b4c4b4152 Rebuilt for Python 3.11 2022-06-13 17:10:15 +02:00
Kir Kolyshkin
9432743274 spec: make criu-devel require criu-libs
This should fix rpmdeps failures (like [1]).

[1] https://osci-jenkins-1.ci.fedoraproject.org/job/fedora-ci/job/rpminspect-pipeline/job/master/101653/testReport/(root)/tests/_rpmdeps/

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-20 13:20:51 -07:00
Radostin Stoyanov
094b0ffec9
Use mntns-compat-mode as a temporary fix for runc
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-05-19 09:27:12 +01:00
Radostin Stoyanov
00845889d4
Update to version 3.17
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-05-06 22:59:14 +01:00
Radostin Stoyanov
3b7bdc24e4
Update rseq patches
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-04-05 21:33:02 +01:00
Radostin Stoyanov
9b634ab2ed
Update rseq patches
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-04-05 15:09:23 +01:00
Radostin Stoyanov
84bca7d01e
Update fixup patch
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-04-05 12:30:44 +01:00
Radostin Stoyanov
c227e2b9c3
Update release to 3.16.1-9
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-04-05 12:25:49 +01:00
Radostin Stoyanov
99fccb2580
Update rseq support patches
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-04-05 11:08:31 +01:00
Radostin Stoyanov
7ab0ac9f49
rebuilt 2022-02-18 19:14:42 +00:00
Radostin Stoyanov
5e0dd85eb2
Drop global -ffreestanding
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-02-08 11:47:45 +00:00
Radostin Stoyanov
917a1a92d3
Fix build with GCC 12
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-02-02 12:01:36 +00:00
Radostin Stoyanov
ee1da30e2b
Disable automatic call to %set_build_flags
The flags set by this macro break the build on Fedora 36.

https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-02-02 12:01:33 +00:00
Radostin Stoyanov
9d9b0fbcbe
Add 3.16.1-6 changelog entry
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-02-02 11:58:38 +00:00
Radostin Stoyanov
46abdd731a
Enable initial rseq support
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-02-02 11:58:32 +00:00
Radostin Stoyanov
9f1d78115d
Fix date in changelog
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-02-01 16:42:01 +00:00
Radostin Stoyanov
358b4d5701
Replace 'asciidoc xmlto' with asciidoctor
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2022-01-31 15:20:22 +00:00
Fedora Release Engineering
e6d765eec2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 00:00:03 +00:00
Adrian Reber
ff3be82a1c
Rebuilt for protobuf 3.19.0 2021-11-06 10:17:55 +01:00
Adrian Reber
a7c1d7ef21
Rebuilt for protobuf 3.18.1 2021-10-25 18:32:16 +02:00
Radostin Stoyanov
a2df81d1de
Update protobuf-c to libprotobuf-c
Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
2021-10-19 11:03:57 +01:00
Radostin Stoyanov
364984bab9
Update to 3.16.1
Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
2021-10-14 17:05:08 +01:00
Radostin Stoyanov
4ae7ecb6cd
Remove manual fix of the criu-ns shebang
The criu-ns shebang has been updated to use Python 3
upstream. This fix is no longer necessary.

Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
2021-10-14 17:05:08 +01:00
Radostin Stoyanov
6c7e00a297
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>
2021-10-14 14:43:33 +01:00
Adrian Reber
2e26949efb
Fix build on RHEL 8
Signed-off-by: Adrian Reber <adrian@lisas.de>
2021-10-05 09:51:05 +02:00
Adrian Reber
4633dfe18f
Fix Source?: numbering
Signed-off-by: Adrian Reber <adrian@lisas.de>
2021-09-23 16:44:33 +02:00
Adrian Reber
4000adef18
Manually install criu-ns.1 on RHEL 7
Signed-off-by: Adrian Reber <adrian@lisas.de>
2021-09-23 16:43:25 +02:00
Adrian Reber
5806b45daa
Remove time from changelog because RHEL 7 cannot handle it.
Signed-off-by: Adrian Reber <adrian@lisas.de>
2021-09-23 16:31:41 +02:00
Adrian Reber
8a78dfa1c4
Include criu-ns sub package
Use new github Source0 location
2021-09-23 11:31:35 +02:00
Adrian Reber
5a7d6e807e
Update to 3.16 2021-09-22 23:17:03 +02:00
Fedora Release Engineering
30f22f6e8a - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 20:07:04 +00:00
Python Maint
fb66eb1b78 Rebuilt for Python 3.10 2021-06-04 20:02:18 +02:00
Adrian Reber
22fc6f3ec2
Test for testing
Signed-off-by: Adrian Reber <adrian@lisas.de>
2021-04-09 18:07:45 +02:00
Fedora Release Engineering
2b165c960a - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 02:42:15 +00:00
Adrian Reber
f0b8274e99
Rebuilt for protobuf 3.14 2021-01-13 09:45:18 +01:00
Tom Stellard
db745523d7 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-19 05:29:49 +00:00
Adrian Reber
32cc39745b
Update to 3.15 2020-11-09 08:29:44 +01:00
Adrian Reber
f5835fc9be
Rebuilt for protobuf 3.13 2020-09-23 18:05:13 +02:00
Fedora Release Engineering
b9a27e26d5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 14:43:42 +00:00
Jeff Law
04fdd60758 Disable LTO 2020-07-14 11:44:25 -06:00
Adrian Reber
51a8f07988
Rebuilt for protobuf 3.12 2020-06-21 17:25:27 +02:00
Miro Hrončok
618762a76d Rebuilt for Python 3.9 2020-05-26 02:43:22 +02:00
Adrian Reber
57532bef37
BuildRequire nftables-devel for working CI 2020-04-30 11:17:17 +02:00
Adrian Reber
224305f651
Rebuild for CI fixes 2020-04-30 09:30:33 +02:00
Adrian Reber
093f8b4513
Remove selinux rules from test and fix name of tests in gating.yaml
Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-29 19:07:50 +02:00
Adrian Reber
439202d427
Update to 3.14 (#1829399)
Signed-off-by: Adrian Reber <adrian@lisas.de>
2020-04-29 17:55:17 +02:00
Andrei Vagin
4aee6c5a23 Fix building on FC33
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2020-03-29 00:13:45 -07:00
15 changed files with 406 additions and 2173 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

13
.gitignore vendored
View file

@ -47,3 +47,16 @@
/criu-3.11.tar.bz2
/criu-3.12.tar.bz2
/criu-3.13.tar.bz2
/criu-3.14.tar.bz2
/criu-3.15.tar.bz2
/criu-3.16.tar.bz2
/criu-3.16.tar.gz
/criu-3.16.1.tar.gz
/criu-3.17.tar.gz
/criu-3.17.1.tar.gz
/criu-3.18.tar.gz
/criu-3.19.tar.gz
/criu-4.0.tar.gz
/criu-4.1.tar.gz
/criu-4.1.1.tar.gz
/criu-4.2.tar.gz

View file

@ -1,11 +0,0 @@
--- a/criu/aio.c 2015-07-01 11:02:50.360004543 -0400
+++ b/criu/aio.c 2015-07-01 11:03:33.099757812 -0400
@@ -74,7 +74,7 @@
* up back to the k_max_reqs.
*/
- return (k_max_reqs - 2) / 2;
+ return (k_max_reqs - 2);
}
unsigned long aio_rings_args_size(struct vm_area_list *vmas)

373
compel.1
View file

@ -1,373 +0,0 @@
'\" t
.\" Title: compel
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 09/12/2019
.\" Manual: CRIU Manual
.\" Source: criu 3.13
.\" Language: English
.\"
.TH "COMPEL" "1" "09/12/2019" "criu 3\&.13" "CRIU Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * (re)Define some macros
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" toupper - uppercase a string (locale-aware)
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de toupper
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
\\$*
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" SH-xref - format a cross-reference to an SH section
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de SH-xref
.ie n \{\
.\}
.toupper \\$*
.el \{\
\\$*
.\}
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" SH - level-one heading that works better for non-TTY output
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de1 SH
.\" put an extra blank line of space above the head in non-TTY output
.if t \{\
.sp 1
.\}
.sp \\n[PD]u
.nr an-level 1
.set-an-margin
.nr an-prevailing-indent \\n[IN]
.fi
.in \\n[an-margin]u
.ti 0
.HTML-TAG ".NH \\n[an-level]"
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
\." make the size of the head bigger
.ps +3
.ft B
.ne (2v + 1u)
.ie n \{\
.\" if n (TTY output), use uppercase
.toupper \\$*
.\}
.el \{\
.nr an-break-flag 0
.\" if not n (not TTY), use normal case (not uppercase)
\\$1
.in \\n[an-margin]u
.ti 0
.\" if not n (not TTY), put a border/line under subheading
.sp -.6
\l'\n(.lu'
.\}
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" SS - level-two heading that works better for non-TTY output
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de1 SS
.sp \\n[PD]u
.nr an-level 1
.set-an-margin
.nr an-prevailing-indent \\n[IN]
.fi
.in \\n[IN]u
.ti \\n[SN]u
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.ps \\n[PS-SS]u
\." make the size of the head bigger
.ps +2
.ft B
.ne (2v + 1u)
.if \\n[.$] \&\\$*
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" BB/EB - put background/screen (filled box) around block of text
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de BB
.if t \{\
.sp -.5
.br
.in +2n
.ll -2n
.gcolor red
.di BX
.\}
..
.de EB
.if t \{\
.if "\\$2"adjust-for-leading-newline" \{\
.sp -1
.\}
.br
.di
.in
.ll
.gcolor
.nr BW \\n(.lu-\\n(.i
.nr BH \\n(dn+.5v
.ne \\n(BHu+.5v
.ie "\\$2"adjust-for-leading-newline" \{\
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
.\}
.el \{\
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
.\}
.in 0
.sp -.5v
.nf
.BX
.in
.sp .5v
.fi
.\}
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" BM/EM - put colored marker in margin next to block of text
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de BM
.if t \{\
.br
.ll -2n
.gcolor red
.di BX
.\}
..
.de EM
.if t \{\
.br
.di
.ll
.gcolor
.nr BH \\n(dn
.ne \\n(BHu
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
.in 0
.nf
.BX
.in
.fi
.\}
..
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "Name"
compel \- Execute parasitic code within another process\&.
.SH "Synopsis"
.sp
\fBcompel\fR \fIhgen\fR [\fIoption\fR \&...]
.sp
\fBcompel\fR \fIplugins\fR [\fIPLUGIN_NAME\fR \&...]
.sp
\fBcompel\fR [\fI\-\-compat\fR] \fIincludes\fR | \fIcflags\fR | \fIldflags\fR
.sp
\fBcompel\fR [\fI\-\-compat\fR] [\fI\-\-static\fR] \fIlibs\fR
.SH "DESCRIPTION"
.sp
\fBcompel\fR is a utility to execute arbitrary code, also called parasite code, in the context of a foreign process\&. The parasitic code, once compiled with compel flags and packed, can be executed in the context of other tasks\&. Currently there is only one way to load the parasitic blob into victim task using libcompel\&.a, called c\-header\&.
.SH "ARGUMENTS"
.SS "Positional Arguments"
.PP
\fBhgen\fR
.RS 4
create a header from the \&.po file, which is the parasite binary\&.
.RE
.PP
\fBplugins\fR
.RS 4
prints the plugins available\&.
.RE
.PP
\fBldflags\fR
.RS 4
prints the ldflags available to compel during linking of parasite code\&.
.RE
.PP
\fBcflags\fR
.RS 4
prints the compel cflags to be used during compilation of parasitic code\&.
.RE
.PP
\fBincludes\fR
.RS 4
prints list of standard include directories\&.
.RE
.PP
\fBlibs\fR
.RS 4
prints list of static or dynamic libraries that compel can link with\&.
.RE
.SH "OPTIONS"
.PP
\fB\-f\fR, \fB\-\-file\fR \fIFILE\fR
.RS 4
Path to the binary file,
\fIFILE\fR, which
\fBcompel\fR
must turn into a header
.RE
.PP
\fB\-o\fR, \fB\-\-output\fR \fIFILE\fR
.RS 4
Path to the header file,
\fIFILE\fR, where compel must write the resulting header\&.
.RE
.PP
\fB\-p\fR, \fB\-\-prefix\fR \fINAME\fR
.RS 4
Specify prefix for var names
.RE
.PP
\fB\-l\fR, \fB\-\-log\-level\fR \fINUM\fR
.RS 4
Default log level of compel\&.
.RE
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Prints usage and exits\&.
.RE
.PP
\fB\-V\fR, \fB\-\-version\fR
.RS 4
Prints version number of compel\&.
.RE
.SH "SOURCE EXAMPLES"
.SS "Parasitic Code"
.sp
\fB#include <compel/plugins/std\&.h>\fR
.sp
\fBint parasite_trap_cmd(int cmd, void *args);\fR //gets called by compel_run_in_thread()
.sp
\fBint parasite_daemon_cmd(int cmd, void *arg);\fR // gets called by compel_rpc_call() and compel_rpc_call_sync()
.sp
\fBvoid parasite_cleanup(void);\fR //gets called on parasite unload by compel_cure()
.SS "Infecting code"
.sp
The parasitic code is compiled and converted to a header using \fBcompel\fR, and included here\&.
.sp
\fB#include <compel/compel\&.h>\fR
.sp
\fB#include "parasite\&.h"\fR
.sp
Following steps are perfomed to infect the victim process:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
stop the task:
\fBint compel_stop_task(int pid);\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
prepare infection handler:
\fBstruct parasite_ctl *compel_prepare(int pid);\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
execute system call:
\fBint compel_syscall(ctl, int syscall_nr, long *ret, int arg \&...);\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
infect victim:
\fBint compel_infect(ctl, nr_thread, size_of_args_area);\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
cure the victim:
\fBint compel_cure(ctl);\fR
//ctl pointer is freed by this call
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Resume victim:
\fBint compel_resume_task(pid, orig_state, state);\fR
.RE
.sp
\fBctl\fR must be configured with blob information by calling \fBPREFIX_setup_c_header()\fR, with ctl as its argument\&. \fBPREFIX\fR is the argument given to \fB\-p\fR when calling hgen, else it is deduced from file name\&.
.SH "EXAMPLES"
.sp
To generate a header file(\&.h) from a parasite binary file(\&.po) use:
.sp
.if n \{\
.RS 4
.\}
.fam C
.ps -1
.nf
.BB lightgray
compel hgen \-f parasite\&.po \-o parasite\&.h
.EB lightgray
.fi
.fam
.ps +1
.if n \{\
.RE
.\}
.sp
\fIparasite\&.po\fR file is obtained by compiling the parasite source with compel flags and linking it with the compel plugins\&.
.SH "AUTHOR"
.sp
The CRIU team\&.

235
crit.1
View file

@ -1,235 +0,0 @@
'\" t
.\" Title: crit
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 04/23/2019
.\" Manual: CRIU Manual
.\" Source: criu 3.12
.\" Language: English
.\"
.TH "CRIT" "1" "04/23/2019" "criu 3\&.12" "CRIU Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * (re)Define some macros
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" toupper - uppercase a string (locale-aware)
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de toupper
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
\\$*
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" SH-xref - format a cross-reference to an SH section
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de SH-xref
.ie n \{\
.\}
.toupper \\$*
.el \{\
\\$*
.\}
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" SH - level-one heading that works better for non-TTY output
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de1 SH
.\" put an extra blank line of space above the head in non-TTY output
.if t \{\
.sp 1
.\}
.sp \\n[PD]u
.nr an-level 1
.set-an-margin
.nr an-prevailing-indent \\n[IN]
.fi
.in \\n[an-margin]u
.ti 0
.HTML-TAG ".NH \\n[an-level]"
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
\." make the size of the head bigger
.ps +3
.ft B
.ne (2v + 1u)
.ie n \{\
.\" if n (TTY output), use uppercase
.toupper \\$*
.\}
.el \{\
.nr an-break-flag 0
.\" if not n (not TTY), use normal case (not uppercase)
\\$1
.in \\n[an-margin]u
.ti 0
.\" if not n (not TTY), put a border/line under subheading
.sp -.6
\l'\n(.lu'
.\}
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" SS - level-two heading that works better for non-TTY output
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de1 SS
.sp \\n[PD]u
.nr an-level 1
.set-an-margin
.nr an-prevailing-indent \\n[IN]
.fi
.in \\n[IN]u
.ti \\n[SN]u
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.ps \\n[PS-SS]u
\." make the size of the head bigger
.ps +2
.ft B
.ne (2v + 1u)
.if \\n[.$] \&\\$*
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" BB/EB - put background/screen (filled box) around block of text
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de BB
.if t \{\
.sp -.5
.br
.in +2n
.ll -2n
.gcolor red
.di BX
.\}
..
.de EB
.if t \{\
.if "\\$2"adjust-for-leading-newline" \{\
.sp -1
.\}
.br
.di
.in
.ll
.gcolor
.nr BW \\n(.lu-\\n(.i
.nr BH \\n(dn+.5v
.ne \\n(BHu+.5v
.ie "\\$2"adjust-for-leading-newline" \{\
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
.\}
.el \{\
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
.\}
.in 0
.sp -.5v
.nf
.BX
.in
.sp .5v
.fi
.\}
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" BM/EM - put colored marker in margin next to block of text
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de BM
.if t \{\
.br
.ll -2n
.gcolor red
.di BX
.\}
..
.de EM
.if t \{\
.br
.di
.ll
.gcolor
.nr BH \\n(dn
.ne \\n(BHu
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
.in 0
.nf
.BX
.in
.fi
.\}
..
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "Name"
crit \- CRiu Image Tool
.SH "Synopsis"
.sp
\fBcrit\fR \fIdecode\fR [\-h] [\-i IN] [\-o OUT] [\-\-pretty]
.sp
\fBcrit\fR \fIencode\fR [\-h] [\-i IN] [\-o OUT]
.sp
\fBcrit\fR \fIinfo\fR [\-h] in
.sp
\fBcrit\fR \fIx\fR [\-h] dir {ps,fds,mems}
.sp
\fBcrit\fR \fIshow\fR [\-h] in
.SH "DESCRIPTION"
.sp
\fBcrit\fR is a feature\-rich replacement for existing \fBcriu\fR show\&.
.SH "ARGUMENTS"
.SS "Positional Arguments"
.PP
\fBdecode\fR
.RS 4
convert
\fBcriu\fR
image from binary type JSON
.RE
.PP
\fBencode\fR
.RS 4
convert
\fBcriu\fR
image from JSON type to binary
.RE
.PP
\fBinfo\fR
.RS 4
show info about image
.RE
.PP
\fBx\fR
.RS 4
explore image directory
.RE
.PP
\fBshow\fR
.RS 4
convert
\fBcriu\fR
image from binary to human\-readable JSON
.RE
.SS "Optional Arguments"
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Print some help and exit
.RE
.SH "SEE ALSO"
.sp
criu(8)
.SH "AUTHOR"
.sp
The CRIU team

1403
criu.8

File diff suppressed because it is too large Load diff

27
criu.pc.patch Normal file
View file

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

357
criu.spec
View file

@ -1,68 +1,66 @@
%if 0%{?fedora} >= 27 || 0%{?rhel} > 7
%global py_prefix python3
%global py_binary %{py_prefix}
%else
%global py_prefix python
%global py_binary python2
%endif
# 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
Name: criu
Version: 3.13
Release: 6%{?dist}
Provides: crtools = %{version}-%{release}
Obsoletes: crtools <= 1.0-2
Version: 4.2
Release: 11%{?dist}
Summary: Tool for Checkpoint/Restore in User-space
License: GPLv2
License: GPL-2.0-only AND LGPL-2.1-only AND MIT
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
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: perl
# RHEL has no asciidoc; take man-page from Fedora 26
# zcat /usr/share/man/man8/criu.8.gz > criu.8
Source1: criu.8
Source2: crit.1
Source3: compel.1
# The patch aio-fix.patch is needed as RHEL7
# doesn't do "nr_events *= 2" in ioctx_alloc().
Patch100: aio-fix.patch
%endif
# 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
Source4: criu-tmpfiles.conf
Source5: criu-tmpfiles.conf
BuildRequires: gcc
BuildRequires: systemd
BuildRequires: libnet-devel
BuildRequires: protobuf-devel protobuf-c-devel %{py_prefix}-devel libnl3-devel libcap-devel
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: asciidoc xmlto
BuildRequires: %{py_prefix}-pip
BuildRequires: %{py_prefix}-setuptools
BuildRequires: (%{py_prefix}-wheel if %{py_prefix}-setuptools < 71)
BuildRequires: %{py_prefix}-protobuf
BuildRequires: asciidoctor
BuildRequires: perl-interpreter
BuildRequires: libselinux-devel
BuildRequires: gnutls-devel
BuildRequires: libdrm-devel
BuildRequires: libuuid-devel
# Checkpointing containers with a tmpfs requires tar
Recommends: tar
%if 0%{?fedora}
BuildRequires: libbsd-devel
BuildRequires: nftables-devel
%endif
%endif
BuildRequires: make
# user-space and kernel changes are only available for x86_64, arm,
# ppc64le, aarch64 and s390x
# https://bugzilla.redhat.com/show_bug.cgi?id=902875
ExclusiveArch: x86_64 %{arm} ppc64le aarch64 s390x
ExclusiveArch: x86_64 %{arm} ppc64le aarch64 s390x riscv64
%description
criu is the user-space part of Checkpoint/Restore in User-space
(CRIU), a project to implement checkpoint/restore functionality for
Linux in user-space.
%if 0%{?fedora}
%package devel
Summary: Header files and libraries for %{name}
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
%description devel
This package contains header files and libraries for %{name}.
@ -73,18 +71,25 @@ Requires: %{name} = %{version}-%{release}
%description libs
This package contains the libraries for %{name}
%endif
%package amdgpu-plugin
Summary: AMD GPU plugin for %{name}
Requires: %{name} = %{version}-%{release}
%description amdgpu-plugin
This package contains the AMD GPU plugin for %{name}
%package cuda-plugin
Summary: CUDA plugin for %{name}
Requires: %{name} = %{version}-%{release}
%description cuda-plugin
This package contains the CUDA plugin for %{name}
%package -n %{py_prefix}-%{name}
%{?python_provide:%python_provide %{py_prefix}-%{name}}
Summary: Python bindings for %{name}
%if 0%{?rhel} && 0%{?rhel} <= 7
Requires: protobuf-python
Requires: %{name} = %{version}-%{release} %{py_prefix}-ipaddr
%else
Requires: %{py_prefix}-protobuf
Obsoletes: python2-criu < 3.10-1
%endif
%description -n %{py_prefix}-%{name}
%{py_prefix}-%{name} contains Python bindings for %{name}.
@ -97,63 +102,56 @@ 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
%if 0%{?rhel} && 0%{?rhel} <= 7
%patch100 -p1
%endif
%patch -P 99 -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}
%if 0%{?fedora} || 0%{?rhel} > 7
CFLAGS+=`echo %{optflags} | sed -e 's,-fstack-protector\S*,,g'` make V=1 WERROR=0 PREFIX=%{_prefix} RUNDIR=/run/criu PYTHON=%{py_binary} PLUGINDIR=%{_libdir}/criu NETWORK_LOCK_DEFAULT=NETWORK_LOCK_NFTABLES
make V=1 WERROR=0 PREFIX=%{_prefix} PLUGINDIR=%{_libdir}/criu amdgpu_plugin
make docs V=1
%endif
%install
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}
%if 0%{?fedora} || 0%{?rhel} > 7
# only install documentation on Fedora as it requires asciidoc,
# which is not available on RHEL7
sed -e "s,--upgrade --ignore-installed,--no-index --no-deps -v --no-build-isolation,g" -i lib/Makefile -i crit/Makefile
make install-criu DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} BINDIR=%{_bindir} SBINDIR=%{_sbindir}
make install-lib DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PYTHON=%{py_binary} PIPFLAGS="--no-build-isolation --no-index --no-deps --progress-bar off --upgrade --ignore-installed"
make install-amdgpu_plugin DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PLUGINDIR=%{_libdir}/criu
make install-cuda_plugin DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PLUGINDIR=%{_libdir}/criu
make install-crit DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} BINDIR=%{_bindir} SBINDIR=%{_sbindir} PYTHON=%{py_binary} PIPFLAGS="--no-build-isolation --no-index --no-deps --progress-bar off --upgrade --ignore-installed"
make install-man DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
%else
install -p -m 644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8
install -p -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man1/crit.1
install -p -m 644 -D %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man1/compel.1
%endif
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/compel.1
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
install -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf
install -d -m 0755 %{buildroot}/run/%{name}/
%if 0%{?rhel}
# remove devel and libs packages
rm -rf $RPM_BUILD_ROOT%{_includedir}/criu
rm $RPM_BUILD_ROOT%{_libdir}/*.so*
rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig
rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name}
%endif
# remove static lib
rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a
%files
%{_sbindir}/%{name}
%doc %{_mandir}/man8/criu.8*
%doc %{_mandir}/man1/compel.1*
%if 0%{?fedora}
%{_libexecdir}/%{name}
%endif
%dir /run/%{name}
%{_tmpfilesdir}/%{name}.conf
%doc README.md COPYING
%if 0%{?fedora}
%files devel
%{_includedir}/criu
%{_libdir}/*.so
@ -161,23 +159,236 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a
%files libs
%{_libdir}/*.so.*
%endif
%files amdgpu-plugin
%{_libdir}/%{name}/amdgpu_plugin.so
%doc %{_mandir}/man1/criu-amdgpu-plugin.1*
%files cuda-plugin
%{_libdir}/%{name}/cuda_plugin.so
%doc plugins/cuda/README.md
%files -n %{py_prefix}-%{name}
%if 0%{?rhel} && 0%{?rhel} <= 7
%{python2_sitelib}/pycriu/*
%{python2_sitelib}/*egg-info
%else
%{python3_sitelib}/pycriu/*
%{python3_sitelib}/*egg-info
%endif
%{python3_sitelib}/pycriu*
%files -n crit
%{_bindir}/crit
%{python3_sitelib}/crit-%{version}.dist-info/
%{python3_sitelib}/crit
%doc %{_mandir}/man1/crit.1*
%files -n criu-ns
%{_sbindir}/criu-ns
%doc %{_mandir}/man1/criu-ns.1*
%post
%tmpfiles_create %{name}.conf
%changelog
* Mon Nov 17 2025 Cristian Le <git@lecris.dev> - 4.2-11
- Convert STI tests to TMT (rhbz#2382879)
* Mon Nov 17 2025 Adrian Reber <adrian@lisas.de> - 4.2-5
- Update to 4.2
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 4.1.1-4
- Rebuilt for Python 3.14.0rc3 bytecode
* Wed Aug 27 2025 Miro Hrončok <mhroncok@redhat.com> - 4.1.1-3
- Drop unused BuildRequires on python3-wheel
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 4.1.1-2
- Rebuilt for Python 3.14.0rc2 bytecode
* Wed Jul 30 2025 Adrian Reber <adrian@lisas.de> - 4.1.1-1
- Update to 4.1.1
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jun 17 2025 Python Maint <python-maint@redhat.com> - 4.1-4
- Rebuilt for Python 3.14
* Wed Apr 23 2025 David Abdurachmanov <davidlt@rivosinc.com> - 4.1-3
- Enable for riscv64
* Mon Apr 21 2025 Adrian Reber <adrian@lisas.de> - 4.1-2
- Apply upstream patch to fix a runc regression
* Mon Apr 07 2025 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 4.1-1
- Update to 4.1
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sun Dec 08 2024 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 4.0-3
- Apply patch to handle vvar_vclock vma-s in rawhide
* Thu Oct 17 2024 Adrian Reber <adrian@lisas.de> - 4.0-2
- Recommends: iptables
* Thu Sep 26 2024 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 4.0-1
- Update to 4.0
- Add package for cuda-plugin
- Run pip install without internet access
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.19-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Jul 09 2024 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 3.19-6
- Add package for amdgpu-plugin
* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 3.19-5
- Rebuilt for Python 3.13
* 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
- 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 Jul 08 2022 Adrian Reber <adrian@lisas.de> - 3.17.1-2
- 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
* Sat Nov 06 2021 Adrian Reber <adrian@lisas.de> - 3.16.1-4
- Rebuilt for protobuf 3.19.0
* Mon Oct 25 2021 Adrian Reber <adrian@lisas.de> - 3.16.1-3
- Rebuilt for protobuf 3.18.1
* Tue Oct 19 2021 Radostin Stoyanov <radostin@redhat.com> - 3.16.1-2
- Update protobuf-c to libprotobuf-c requirement
* 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 Oct 05 2021 Adrian Reber <adrian@lisas.de> - 3.16-3
- Fix build on RHEL 8
* Thu Sep 23 2021 Adrian Reber <adrian@lisas.de> - 3.16-2
- Include criu-ns sub package
- Use new github Source0 location
* Wed Sep 22 2021 Adrian Reber <adrian@lisas.de> - 3.16-1
- Update to 3.16
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.15-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.15-5
- Rebuilt for Python 3.10
* Fri Apr 09 2021 Adrian Reber <adrian@lisas.de> - 3.15-4
- Test for testing
* 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
- Rebuilt for protobuf 3.14
* Wed Nov 04 2020 Adrian Reber <adrian@lisas.de> - 3.15-1
- Update to 3.15
* Wed Sep 23 2020 Adrian Reber <adrian@lisas.de> - 3.14-8
- Rebuilt for protobuf 3.13
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.14-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 14 2020 Jeff Law <law@redhat.com> - 3.14-6
- Disable LTO
* Sun Jun 14 2020 Adrian Reber <adrian@lisas.de> - 3.14-5
- Rebuilt for protobuf 3.12
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.14-4
- Rebuilt for Python 3.9
* Thu Apr 30 2020 Adrian Reber <adrian@lisas.de> - 3.14-3
- BuildRequire nftables-devel for working CI
* Thu Apr 30 2020 Adrian Reber <adrian@lisas.de> - 3.14-2
- Rebuild for CI fixes
* Wed Apr 29 2020 Adrian Reber <adrian@lisas.de> - 3.14-1
- Update to 3.14 (#1829399)
* Sun Mar 29 2020 Andrei Vagin <avagin@gmail.com> - 3.13-7
- Added patch for gcc-10
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.13-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

View file

@ -1,12 +1,14 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
decision_contexts: [bodhi_update_push_testing]
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete }
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
decision_contexts: [bodhi_update_push_stable]
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete }
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

21
plans.fmf Normal file
View file

@ -0,0 +1,21 @@
summary: Run all tests
discover:
how: fmf
prepare:
- name: Install the main package
how: install
package:
- criu
execute:
how: tmt
/zdtm:
# Use the srpm sources
discover+:
dist-git-source: true
dist-git-merge: true
test: /tests/zdtm
/podman:
discover+:
test: /tests/podman

4
rpminspect.yaml Normal file
View file

@ -0,0 +1,4 @@
---
annocheck:
jobs:
- hardened: --verbose --skip-dynamic-tags --skip-property-note --skip-bind-now --skip-pie --skip-cf-protection --skip-notes --skip-gaps --skip-optimization --skip-stack-clash --skip-stack-prot

View file

@ -1 +1 @@
SHA512 (criu-3.13.tar.bz2) = ef93ec9977512711fbcedd52807cc91b1ab582f1c031c4beda93dac7530ccf40bca45b3dee6b5d08a676ec28036caa55ad3746c450265429880e114fde0a071d
SHA512 (criu-4.2.tar.gz) = f7e0ac17d46dd560bb2439f617a0a3b3933eb86f4b8b9b16852d300e4ffc6a4851d72be9342dfd40792a53fca8b65d26fde4e1b1f02bcd04923a8b6f0e5c8a62

View file

@ -1,21 +1,14 @@
---
- hosts: localhost
roles:
- role: standard-test-source
tags:
- classic
- role: standard-test-basic
tags:
- classic
required_packages:
- podman
- curl
- jq
/zdtm:
summary: Test zdtm
test: ./run-zdtm.sh
duration: 30m
require:
- checkpolicy
- policycoreutils
- make
- gcc
- python3
- coreutils
- libnet-devel
- protobuf-devel
- protobuf-c-devel
@ -23,9 +16,17 @@
- libnl3-devel
- libcap-devel
- libaio-devel
- libuuid-devel
- nftables-devel
- python3-pyyaml
- python3-protobuf
tests:
- zdtm:
dir: .
run: ./run-zdtm.sh
- python-unversioned-command
- crit
- python3-criu
/podman:
summary: Test podman
test: ./run-podman-checkpoint-restore.sh
require:
- podman
- curl
- jq

View file

@ -3,43 +3,18 @@
set -eux
ls -la
uname -a
rpm -qi criu || true
criu --version
echo "Load additional SELinux policy for checkpointing"
# Add missing selinux policy
cat << EOF > criu.te
module criu 1.0;
require {
type container_t;
type container_var_lib_t;
type sysctl_kernel_ns_last_pid_t;
class file { append write };
}
allow container_t sysctl_kernel_ns_last_pid_t:file write;
allow container_t container_var_lib_t:file append;
EOF
cat criu.te
checkmodule -M -m criu.te -o criu.mod
semodule_package -o criu.pp -m criu.mod
#semodule -i criu.pp
echo "Start container with tomcat"
podman --log-level debug run --tmpfs /tmp --tmpfs /usr/local/tomcat/logs -d docker://docker.io/yovfiatbeb/podman-criu-test
echo "Start container"
podman --log-level debug run -d quay.io/adrianreber/counter
echo "See which containers are running"
podman ps
# tomcat needs some time to start up
echo "Wait 15 seconds for tomcat to start"
sleep 15
echo "Connect to tomcat in the container"
curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8080/examples/servlets/servlet/HelloWorldExample -v
echo "Connect to the container"
curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8088
echo "Checkpoint container"
podman --log-level debug container checkpoint -l
@ -50,7 +25,6 @@ podman --log-level debug container restore -l
podman ps -a
echo "Check if we can connect to the restored container"
curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8080/examples/servlets/servlet/HelloWorldExample -v
curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8088
ls -la
echo test

View file

@ -1,21 +1,10 @@
#!/bin/bash
set -x
set -xe
uname -a
# Two IPv6 related tests are failing in CI, not sure why.
echo "Network setup"
cat /etc/hosts
ip a
ping localhost -c 3 -4
ping localhost -c 3 -6
ping localhost -c 3
ip route save > /tmp/test
echo $?
file /tmp/test
rpm -q iproute
rpm -qi criu || true
criu --version
# These zdtm tests are skipped because they fail only in CI system
EXCLUDES=" \
@ -26,15 +15,31 @@ EXCLUDES=" \
-x zdtm/static/socket-tcp4v6-closed \
-x zdtm/static/maps01 \
-x zdtm/static/maps04 \
-x zdtm/static/del_standalone_un \
-x zdtm/static/del_standalone_un_seqpacket \
-x zdtm/static/deleted_unix_sock \
-x zdtm/static/fifo_upon_unix_socket00 \
-x zdtm/static/sk-unix-dgram-ghost \
-x zdtm/static/sk-unix01 \
-x zdtm/static/sk-unix01-seqpacket \
-x zdtm/static/socket-tcpbuf \
-x zdtm/static/socket-tcpbuf6 \
-x zdtm/static/sockets00 \
-x zdtm/static/sockets00-seqpacket \
-x zdtm/static/sockets03 \
-x zdtm/static/sockets03-seqpacket \
-x zdtm/static/cgroup04 \
-x zdtm/static/cgroup_ifpriomap \
-x zdtm/static/netns_sub \
-x zdtm/static/netns_sub_veth \
-x zdtm/static/file_locks01 \
-x zdtm/static/mntns_link_remap \
-x zdtm/static/unlink_fstat03 \
-x zdtm/static/unlink_regular00 \
-x zdtm/static/cgroup02 "
run_test() {
./zdtm.py run --criu-bin /usr/sbin/criu ${EXCLUDES} \
python3 ./zdtm.py run --criu-bin /usr/sbin/criu ${EXCLUDES} \
-a --ignore-taint --keep-going
RESULT=$?
@ -43,17 +48,13 @@ run_test() {
RESULT=42
# F30, F29 do not provide python -> python3 symlink
test -e /usr/bin/python || ln -sf /usr/bin/python3 /usr/bin/python
python -V
# this socket brakes CRIU's test cases
# this socket breaks CRIU's test cases
rm -f /var/lib/sss/pipes/nss
cd source
cd ../criu-$(crit --version)
echo "Build CRIU"
make
make -j"$(nproc)"
cd test