diff --git a/.fmf/version b/.fmf/version
deleted file mode 100644
index d00491f..0000000
--- a/.fmf/version
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/.gitignore b/.gitignore
index e5c1b1b..daa1199 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,14 +49,3 @@
/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
diff --git a/aio-fix.patch b/aio-fix.patch
new file mode 100644
index 0000000..8589d55
--- /dev/null
+++ b/aio-fix.patch
@@ -0,0 +1,11 @@
+--- 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)
diff --git a/compel.1 b/compel.1
new file mode 100644
index 0000000..7ed58b9
--- /dev/null
+++ b/compel.1
@@ -0,0 +1,373 @@
+'\" t
+.\" Title: compel
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets vsnapshot
+.\" 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 \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 \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\&.
diff --git a/crit.1 b/crit.1
new file mode 100644
index 0000000..ab8398e
--- /dev/null
+++ b/crit.1
@@ -0,0 +1,235 @@
+'\" t
+.\" Title: crit
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets vsnapshot
+.\" 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
diff --git a/criu.8 b/criu.8
new file mode 100644
index 0000000..eea1e76
--- /dev/null
+++ b/criu.8
@@ -0,0 +1,1403 @@
+'\" t
+.\" Title: criu
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets vsnapshot
+.\" Date: 04/23/2019
+.\" Manual: CRIU Manual
+.\" Source: criu 3.12
+.\" Language: English
+.\"
+.TH "CRIU" "8" "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"
+criu \- checkpoint/restore in userspace
+.SH "Synopsis"
+.sp
+\fBcriu\fR \fIcommand\fR [\fIoption\fR \&...]
+.SH "DESCRIPTION"
+.sp
+\fBcriu\fR is a tool for checkpointing and restoring running applications\&. It does this by saving their state as a collection of files (see the \fBdump\fR command) and creating equivalent processes from those files (see the \fBrestore\fR command)\&. The restore operation can be performed at a later time, on a different system, or both\&.
+.SH "OPTIONS"
+.sp
+Most of the true / false long options (the ones without arguments) can be prefixed with \fB\-\-no\-\fR to negate the option (example: \fB\-\-display\-stats\fR and \fB\-\-no\-display\-stats\fR)\&.
+.SS "Common options"
+.sp
+Common options are applicable to any \fIcommand\fR\&.
+.PP
+\fB\-v\fR[\fBv\fR\&...], \fB\-\-verbosity\fR
+.RS 4
+Increase verbosity up from the default level\&. Multiple
+\fBv\fR
+can be used, each increasing verbosity by one level\&. Using long option without argument increases verbosity by one level\&.
+.RE
+.PP
+\fB\-v\fR\fInum\fR, \fB\-\-verbosity\fR=\fInum\fR
+.RS 4
+Set verbosity level to
+\fInum\fR\&. The higher the level, the more output is produced\&.
+
+The following levels are available:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fB\-v0\fR
+no output;
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fB\-v1\fR
+only errors;
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fB\-v2\fR
+above plus warnings (this is the default level);
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fB\-v3\fR
+above plus information messages and timestamps;
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fB\-v4\fR
+above plus lots of debug\&.
+.RE
+.RE
+.PP
+\fB\-\-config\fR \fIfile\fR
+.RS 4
+Pass a specific configuration file to criu\&.
+.RE
+.PP
+\fB\-\-no\-default\-config\fR
+.RS 4
+Forbid parsing of default configuration files\&.
+.RE
+.PP
+\fB\-\-pidfile\fR \fIfile\fR
+.RS 4
+Write root task, service or page\-server pid into a
+\fIfile\fR\&.
+.RE
+.PP
+\fB\-o\fR, \fB\-\-log\-file\fR \fIfile\fR
+.RS 4
+Write logging messages to
+\fIfile\fR\&.
+.RE
+.PP
+\fB\-\-display\-stats\fR
+.RS 4
+During dump as well as during restore
+\fBcriu\fR
+collects information like the time required to dump or restore the process or the number of pages dumped or restored\&. This information is always written to the files
+\fIstats\-dump\fR
+and
+\fIstats\-restore\fR
+and can be easily displayed using
+\fBcrit\fR\&. The option
+\fB\-\-display\-stats\fR
+additionally prints out this information on the console at the end of a dump or a restore\&.
+.RE
+.PP
+\fB\-D\fR, \fB\-\-images\-dir\fR \fIpath\fR
+.RS 4
+Use
+\fIpath\fR
+as a base directory where to look for sets of image files\&.
+.RE
+.PP
+\fB\-\-prev\-images\-dir\fR \fIpath\fR
+.RS 4
+Use
+\fIpath\fR
+as a parent directory where to look for sets of image files\&. This option makes sense in case of incremental dumps\&.
+.RE
+.PP
+\fB\-W\fR, \fB\-\-work\-dir\fR \fIdir\fR
+.RS 4
+Use directory
+\fIdir\fR
+for putting logs, pidfiles and statistics\&. If not specified,
+\fIpath\fR
+from
+\fB\-D\fR
+option is taken\&.
+.RE
+.PP
+\fB\-\-close\fR \fIfd\fR
+.RS 4
+Close file descriptor
+\fIfd\fR
+before performing any actions\&.
+.RE
+.PP
+\fB\-L\fR, \fB\-\-libdir\fR \fIpath\fR
+.RS 4
+Path to plugins directory\&.
+.RE
+.PP
+\fB\-\-action\-script\fR \fIscript\fR
+.RS 4
+Add an external action script to be executed at certain stages\&. The environment variable
+\fBCRTOOLS_SCRIPT_ACTION\fR
+is available to the script to find out which action is being executed, and its value can be one of the following:
+.PP
+\fBpre\-dump\fR
+.RS 4
+run prior to beginning a
+\fBdump\fR
+.RE
+.PP
+\fBpost\-dump\fR
+.RS 4
+run upon
+\fBdump\fR
+completion
+.RE
+.PP
+\fBpre\-restore\fR
+.RS 4
+run prior to beginning a
+\fBrestore\fR
+.RE
+.PP
+\fBpost\-restore\fR
+.RS 4
+run upon
+\fBrestore\fR
+completion
+.RE
+.PP
+\fBpre\-resume\fR
+.RS 4
+run when all processes and resources are restored but tasks are stopped waiting for final kick to run\&. Must not fail\&.
+.RE
+.PP
+\fBpost\-resume\fR
+.RS 4
+called at the very end, when everything is restored and processes were resumed
+.RE
+.PP
+\fBnetwork\-lock\fR
+.RS 4
+run to lock network in a target network namespace
+.RE
+.PP
+\fBnetwork\-unlock\fR
+.RS 4
+run to unlock network in a target network namespace
+.RE
+.PP
+\fBsetup\-namespaces\fR
+.RS 4
+run once root task has just been created with required namespaces\&. Note it is an early stage of restore, when nothing is restored yet, except for namespaces themselves
+.RE
+.PP
+\fBpost\-setup\-namespaces\fR
+.RS 4
+called after the namespaces are configured
+.RE
+.PP
+\fBorphan\-pts\-master\fR
+.RS 4
+called after master pty is opened and unlocked\&. This hook can be used only in the RPC mode, and the notification message contains a file descriptor for the master pty
+.RE
+.RE
+.PP
+\fB\-V\fR, \fB\-\-version\fR
+.RS 4
+Print program version and exit\&.
+.RE
+.PP
+\fB\-h\fR, \fB\-\-help\fR
+.RS 4
+Print some help and exit\&.
+.RE
+.SS "pre\-dump"
+.sp
+Performs the pre\-dump procedure, during which \fBcriu\fR creates a snapshot of memory changes since the previous \fBpre\-dump\fR\&. Note that during this \fBcriu\fR also creates the fsnotify cache which speeds up the \fBrestore\fR procedure\&. \fBpre\-dump\fR requires at least \fB\-t\fR option (see \fBdump\fR below)\&. In addition, \fBpage\-server\fR options may be specified\&.
+.PP
+\fB\-\-track\-mem\fR
+.RS 4
+Turn on memory changes tracker in the kernel\&. If the option is not passed the memory tracker get turned on implicitly\&.
+.RE
+.SS "dump"
+.sp
+Performs a checkpoint procedure\&.
+.PP
+\fB\-t\fR, \fB\-\-tree\fR \fIpid\fR
+.RS 4
+Checkpoint the whole process tree starting from
+\fIpid\fR\&.
+.RE
+.PP
+\fB\-R\fR, \fB\-\-leave\-running\fR
+.RS 4
+Leave tasks in running state after checkpoint, instead of killing\&. This option is pretty dangerous and should be used only if you understand what you are doing\&.
+.sp
+Note if task is about to run after been checkpointed, it can modify TCP connections, delete files and do other dangerous actions\&. Therefore,
+\fBcriu\fR
+can not guarantee that the next
+\fBrestore\fR
+action will succeed\&. Most likely if this option is used, at least the file system snapshot must be made with the help of
+\fBpost\-dump\fR
+action script\&.
+.sp
+In other words, do not use it unless really needed\&.
+.RE
+.PP
+\fB\-s\fR, \fB\-\-leave\-stopped\fR
+.RS 4
+Leave tasks in stopped state after checkpoint, instead of killing\&.
+.RE
+.PP
+\fB\-\-external\fR \fItype\fR\fB[\fR\fIid\fR\fB]:\fR\fIvalue\fR
+.RS 4
+Dump an instance of an external resource\&. The generic syntax is
+\fItype\fR
+of resource, followed by resource
+\fIid\fR
+(enclosed in literal square brackets), and optional
+\fIvalue\fR
+(prepended by a literal colon)\&. The following resource types are currently supported:
+\fBmnt\fR,
+\fBdev\fR,
+\fBfile\fR,
+\fBtty\fR,
+\fBunix\fR\&. Syntax depends on type\&. Note to restore external resources, either
+\fB\-\-external\fR
+or
+\fB\-\-inherit\-fd\fR
+is used, depending on resource type\&.
+.RE
+.PP
+\fB\-\-external mnt[\fR\fImountpoint\fR\fB]:\fR\fIname\fR
+.RS 4
+Dump an external bind mount referenced by
+\fImountpoint\fR, saving it to image under the identifier
+\fIname\fR\&.
+.RE
+.PP
+\fB\-\-external mnt[]:\fR\fIflags\fR
+.RS 4
+Dump all external bind mounts, autodetecting those\&. Optional
+\fIflags\fR
+can contain
+\fBm\fR
+to also dump external master mounts,
+\fBs\fR
+to also dump external shared mounts (default behavior is to abort dumping if such mounts are found)\&. If
+\fIflags\fR
+are not provided, colon is optional\&.
+.RE
+.PP
+\fB\-\-external dev[\fR\fImajor\fR\fB/\fR\fIminor\fR\fB]:\fR\fIname\fR
+.RS 4
+Allow to dump a mount namespace having a real block device mounted\&. A block device is identified by its
+\fImajor\fR
+and
+\fIminor\fR
+numbers, and
+\fBcriu\fR
+saves its information to image under the identifier
+\fIname\fR\&.
+.RE
+.PP
+\fB\-\-external file[\fR\fImnt_id\fR\fB:\fR\fIinode\fR\fB]\fR
+.RS 4
+Dump an external file, i\&.e\&. an opened file that is can not be resolved from the current mount namespace, which can not be dumped without using this option\&. The file is identified by
+\fImnt_id\fR
+(a field obtained from
+\fB/proc/\fR\fIpid\fR\fB/fdinfo/\fR\fIN\fR) and
+\fIinode\fR
+(as returned by
+\fBstat\fR(2))\&.
+.RE
+.PP
+\fB\-\-external tty[\fR\fIrdev\fR\fB:\fR\fIdev\fR\fB]\fR
+.RS 4
+Dump an external TTY, identified by
+\fBst_rdev\fR
+and
+\fBst_dev\fR
+fields returned by
+\fBstat\fR(2)\&.
+.RE
+.PP
+\fB\-\-external unix[\fR\fIid\fR\fB]\fR
+.RS 4
+Tell
+\fBcriu\fR
+that one end of a pair of UNIX sockets (created by
+\fBsocketpair\fR(2)) with
+\fIid\fR
+is OK to be disconnected\&.
+.RE
+.PP
+\fB\-\-freeze\-cgroup\fR
+.RS 4
+Use cgroup freezer to collect processes\&.
+.RE
+.PP
+\fB\-\-manage\-cgroups\fR
+.RS 4
+Collect cgroups into the image thus they gonna be restored then\&. Without this option,
+\fBcriu\fR
+will not save cgroups configuration associated with a task\&.
+.RE
+.PP
+\fB\-\-cgroup\-props\fR \fIspec\fR
+.RS 4
+Specify controllers and their properties to be saved into the image file\&.
+\fBcriu\fR
+predefines specifications for common controllers, but since the kernel can add new controllers and modify their properties, there should be a way to specify ones matched the kernel\&.
+.sp
+\fIspec\fR
+argument describes the controller and properties specification in a simplified YAML form:
+.sp
+.if n \{\
+.RS 4
+.\}
+.fam C
+.ps -1
+.nf
+.BB lightgray
+"c1":
+ \- "strategy": "merge"
+ \- "properties": ["a", "b"]
+"c2":
+ \- "strategy": "replace"
+ \- "properties": ["c", "d"]
+.EB lightgray
+.fi
+.fam
+.ps +1
+.if n \{\
+.RE
+.\}
+.sp
+where
+\fIc1\fR
+and
+\fIc2\fR
+are controllers names, and
+\fIa\fR,
+\fIb\fR,
+\fIc\fR,
+\fId\fR
+are their properties\&.
+.sp
+Note the format: double quotes, spaces and new lines are required\&. The
+\fIstrategy\fR
+specifies what to do if a controller specified already exists as a built\-in one:
+\fBcriu\fR
+can either
+\fBmerge\fR
+or
+\fBreplace\fR
+such\&.
+.sp
+For example, the command line for the above example should look like this:
+.sp
+.if n \{\
+.RS 4
+.\}
+.fam C
+.ps -1
+.nf
+.BB lightgray
+\-\-cgroup\-props "\e"c1\e":\en \- \e"strategy\e": \e"merge\e"\en \- \e"properties\e": [\e"a\e", \e"b\e"]\en \e"c2\e":\en \- \e"strategy\e": \e"replace\e"\en \- \e"properties\e": [\e"c\e", \e"d\e"]"
+.EB lightgray
+.fi
+.fam
+.ps +1
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fB\-\-cgroup\-props\-file\fR \fIfile\fR
+.RS 4
+Same as
+\fB\-\-cgroup\-props\fR, except the specification is read from the
+\fIfile\fR\&.
+.RE
+.PP
+\fB\-\-cgroup\-dump\-controller\fR \fIname\fR
+.RS 4
+Dump a controller with
+\fIname\fR
+only, skipping anything else that was discovered automatically (usually via
+\fB/proc\fR)\&. This option is useful when one needs
+\fBcriu\fR
+to skip some controllers\&.
+.RE
+.PP
+\fB\-\-cgroup\-props\-ignore\-default\fR
+.RS 4
+When combined with
+\fB\-\-cgroup\-props\fR, makes
+\fBcriu\fR
+substitute a predefined controller property with the new one shipped\&. If the option is not used, the predefined properties are merged with the provided ones\&.
+.RE
+.PP
+\fB\-\-tcp\-established\fR
+.RS 4
+Checkpoint established TCP connections\&.
+.RE
+.PP
+\fB\-\-skip\-in\-flight\fR
+.RS 4
+This option skips in\-flight TCP connections\&. If any TCP connections that are not yet completely established are found,
+\fBcriu\fR
+ignores these connections, rather than errors out\&. The TCP stack on the client side is expected to handle the re\-connect gracefully\&.
+.RE
+.PP
+\fB\-\-evasive\-devices\fR
+.RS 4
+Use any path to a device file if the original one is inaccessible\&.
+.RE
+.PP
+\fB\-\-page\-server\fR
+.RS 4
+Send pages to a page server (see the
+\fBpage\-server\fR
+command)\&.
+.RE
+.PP
+\fB\-\-force\-irmap\fR
+.RS 4
+Force resolving names for inotify and fsnotify watches\&.
+.RE
+.PP
+\fB\-\-auto\-dedup\fR
+.RS 4
+Deduplicate "old" data in pages images of previous
+\fBdump\fR\&. This option implies incremental
+\fBdump\fR
+mode (see the
+\fBpre\-dump\fR
+command)\&.
+.RE
+.PP
+\fB\-l\fR, \fB\-\-file\-locks\fR
+.RS 4
+Dump file locks\&. It is necessary to make sure that all file lock users are taken into dump, so it is only safe to use this for enclosed containers where locks are not held by any processes outside of dumped process tree\&.
+.RE
+.PP
+\fB\-\-link\-remap\fR
+.RS 4
+Allows to link unlinked files back, if possible (modifies filesystem during
+\fBrestore\fR)\&.
+.RE
+.PP
+\fB\-\-ghost\-limit\fR \fIsize\fR
+.RS 4
+Set the maximum size of deleted file to be carried inside image\&. By default, up to 1M file is allowed\&. Using this option allows to not put big deleted files inside images\&. Argument
+\fIsize\fR
+may be postfixed with a
+\fBK\fR,
+\fBM\fR
+or
+\fBG\fR, which stands for kilo\-, mega, and gigabytes, accordingly\&.
+.RE
+.PP
+\fB\-j\fR, \fB\-\-shell\-job\fR
+.RS 4
+Allow one to dump shell jobs\&. This implies the restored task will inherit session and process group ID from the
+\fBcriu\fR
+itself\&. This option also allows to migrate a single external tty connection, to migrate applications like
+\fBtop\fR\&. If used with
+\fBdump\fR
+command, it must be specified with
+\fBrestore\fR
+as well\&.
+.RE
+.PP
+\fB\-\-cpu\-cap\fR [\fIcap\fR[,\fIcap\fR\&...]]
+.RS 4
+Specify CPU capabilities to write to an image file\&. The argument is a comma\-separated list of:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBnone\fR
+to ignore capabilities at all; the image will not be produced on dump, neither any check performed on restore;
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBfpu\fR
+to check if FPU module is compatible;
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBins\fR
+to check if CPU supports all instructions required;
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBcpu\fR
+to check if CPU capabilities are exactly matching;
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBall\fR
+for all above set\&.
+.RE
+.sp
+By default the option is set to
+\fBfpu\fR
+and
+\fBins\fR\&.
+.RE
+.PP
+\fB\-\-cgroup\-root\fR [\fIcontroller\fR:]/\fInewroot\fR
+.RS 4
+Change the root for the controller that will be dumped\&. By default,
+\fBcriu\fR
+simply dumps everything below where any of the tasks live\&. However, if a container moves all of its tasks into a cgroup directory below the container engine\(cqs default directory for tasks, permissions will not be preserved on the upper directories with no tasks in them, which may cause problems\&.
+.RE
+.PP
+\fB\-\-lazy\-pages\fR
+.RS 4
+Perform the dump procedure without writing memory pages into the image files and prepare to service page requests over the network\&. When
+\fBdump\fR
+runs in this mode it presumes that
+\fBlazy\-pages\fR
+daemon will connect to it and fetch memory pages to lazily inject them into the restored process address space\&. This option is intended for post\-copy (lazy) migration and should be used in conjunction with
+\fBrestore\fR
+with appropriate options\&.
+.RE
+.SS "restore"
+.sp
+Restores previously checkpointed processes\&.
+.PP
+\fB\-\-inherit\-fd\fR \fBfd[\fR\fIN\fR\fB]:\fR\fIresource\fR
+.RS 4
+Inherit a file descriptor\&. This option lets
+\fBcriu\fR
+use an already opened file descriptor
+\fIN\fR
+for restoring a file identified by
+\fIresource\fR\&. This option can be used to restore an external resource dumped with the help of
+\fB\-\-external\fR
+\fBfile\fR,
+\fBtty\fR, and
+\fBunix\fR
+options\&.
+.sp
+The
+\fIresource\fR
+argument can be one of the following:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBtty[\fR\fIrdev\fR\fB:\fR\fIdev\fR\fB]\fR
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBpipe[\fR\fIinode\fR\fB]\fR
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBsocket[\fR\fIinode\fR\fB]\fR
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBfile[\fR\fImnt_id\fR\fB:\fR\fIinode\fR\fB]\fR
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fIpath/to/file\fR
+.RE
+.sp
+Note that square brackets used in this option arguments are literals and usually need to be escaped from shell\&.
+.RE
+.PP
+\fB\-d\fR, \fB\-\-restore\-detached\fR
+.RS 4
+Detach
+\fBcriu\fR
+itself once restore is complete\&.
+.RE
+.PP
+\fB\-s\fR, \fB\-\-leave\-stopped\fR
+.RS 4
+Leave tasks in stopped state after restore (rather than resuming their execution)\&.
+.RE
+.PP
+\fB\-S\fR, \fB\-\-restore\-sibling\fR
+.RS 4
+Restore root task as a sibling (makes sense only with
+\fB\-\-restore\-detached\fR)\&.
+.RE
+.PP
+\fB\-\-log\-pid\fR
+.RS 4
+Write separate logging files per each pid\&.
+.RE
+.PP
+\fB\-r\fR, \fB\-\-root\fR \fIpath\fR
+.RS 4
+Change the root filesystem to
+\fIpath\fR
+(when run in a mount namespace)\&.
+.RE
+.PP
+\fB\-\-external\fR \fItype\fR\fB[\fR\fIid\fR\fB]:\fR\fIvalue\fR
+.RS 4
+Restore an instance of an external resource\&. The generic syntax is
+\fItype\fR
+of resource, followed by resource
+\fIid\fR
+(enclosed in literal square brackets), and optional
+\fIvalue\fR
+(prepended by a literal colon)\&. The following resource types are currently supported:
+\fBmnt\fR,
+\fBdev\fR,
+\fBveth\fR,
+\fBmacvlan\fR\&. Syntax depends on type\&. Note to restore external resources dealing with opened file descriptors (such as dumped with the help of
+\fB\-\-external\fR
+\fBfile\fR,
+\fBtty\fR, and
+\fBunix\fR
+options), option
+\fB\-\-inherit\-fd\fR
+should be used\&.
+.RE
+.PP
+\fB\-\-external mnt[\fR\fIname\fR\fB]:\fR\fImountpoint\fR
+.RS 4
+Restore an external bind mount referenced in the image by
+\fIname\fR, bind\-mounting it from the host
+\fImountpoint\fR
+to a proper mount point\&.
+.RE
+.PP
+\fB\-\-external mnt[]\fR
+.RS 4
+Restore all external bind mounts (dumped with the help of
+\fB\-\-external mnt[]\fR
+auto\-detection)\&.
+.RE
+.PP
+\fB\-\-external dev[\fR\fIname\fR\fB]:\fR\fI/dev/path\fR
+.RS 4
+Restore an external mount device, identified in the image by
+\fIname\fR, using the existing block device
+\fI/dev/path\fR\&.
+.RE
+.PP
+\fB\-\-external veth[\fR\fIinner_dev\fR\fB]:\fR\fIouter_dev\fR\fB@\fR\fIbridge\fR
+.RS 4
+Set the outer VETH device name (corresponding to
+\fIinner_dev\fR
+being restored) to
+\fIouter_dev\fR\&. If optional
+\fB@\fR\fIbridge\fR
+is specified,
+\fIouter_dev\fR
+is added to that bridge\&. If the option is not used,
+\fIouter_dev\fR
+will be autogenerated by the kernel\&.
+.RE
+.PP
+\fB\-\-external macvlan[\fR\fIinner_dev\fR\fB]:\fR\fIouter_dev\fR
+.RS 4
+When restoring an image that have a MacVLAN device in it, this option must be used to specify to which
+\fIouter_dev\fR
+(an existing network device in CRIU namespace) the restored
+\fIinner_dev\fR
+should be bound to\&.
+.RE
+.PP
+\fB\-\-manage\-cgroups\fR [\fImode\fR]
+.RS 4
+Restore cgroups configuration associated with a task from the image\&. Controllers are always restored in an optimistic way \(em if already present in system,
+\fBcriu\fR
+reuses it, otherwise it will be created\&.
+.RE
+.sp
+The \fImode\fR may be one of the following:
+.PP
+\fBnone\fR
+.RS 4
+Do not restore cgroup properties but require cgroup to pre\-exist at the moment of
+\fBrestore\fR
+procedure\&.
+.RE
+.PP
+\fBprops\fR
+.RS 4
+Restore cgroup properties and require cgroup to pre\-exist\&.
+.RE
+.PP
+\fBsoft\fR
+.RS 4
+Restore cgroup properties if only cgroup has been created by
+\fBcriu\fR, otherwise do not restore properties\&. This is the default if mode is unspecified\&.
+.RE
+.PP
+\fBfull\fR
+.RS 4
+Always restore all cgroups and their properties\&.
+.RE
+.PP
+\fBstrict\fR
+.RS 4
+Restore all cgroups and their properties from the scratch, requiring them to not present in the system\&.
+.PP
+\fB\-\-cgroup\-root\fR [\fIcontroller\fR\fB:\fR]/\fInewroot\fR
+.RS 4
+Change the root cgroup the controller will be installed into\&. No controller means that root is the default for all controllers not specified\&.
+.RE
+.PP
+\fB\-\-tcp\-established\fR
+.RS 4
+Restore previously dumped established TCP connections\&. This implies that the network has been locked between
+\fBdump\fR
+and
+\fBrestore\fR
+phases so other side of a connection simply notice a kind of lag\&.
+.RE
+.PP
+\fB\-\-tcp\-close\fR
+.RS 4
+Restore connected TCP sockets in closed state\&.
+.RE
+.PP
+\fB\-\-veth\-pair\fR \fIIN\fR\fB=\fR\fIOUT\fR
+.RS 4
+Correspondence between outside and inside names of veth devices\&.
+.RE
+.PP
+\fB\-l\fR, \fB\-\-file\-locks\fR
+.RS 4
+Restore file locks from the image\&.
+.RE
+.PP
+\fB\-\-lsm\-profile\fR \fItype\fR\fB:\fR\fIname\fR
+.RS 4
+Specify an LSM profile to be used during restore\&. The
+\FCtype\F[]
+can be either
+\fBapparmor\fR
+or
+\fBselinux\fR\&.
+.RE
+.PP
+\fB\-\-auto\-dedup\fR
+.RS 4
+As soon as a page is restored it get punched out from image\&.
+.RE
+.PP
+\fB\-j\fR, \fB\-\-shell\-job\fR
+.RS 4
+Restore shell jobs, in other words inherit session and process group ID from the criu itself\&.
+.RE
+.PP
+\fB\-\-cpu\-cap\fR [\fIcap\fR[,\fIcap\fR\&...]]
+.RS 4
+Specify CPU capabilities to be present on the CPU the process is restoring\&. To inverse a capability, prefix it with
+\fB^\fR\&. This option implies that
+\fB\-\-cpu\-cap\fR
+has been passed on
+\fBdump\fR
+as well, except
+\fBfpu\fR
+option case\&. The
+\fIcap\fR
+argument can be the following (or a set of comma\-separated values):
+.RE
+.RE
+.PP
+\fBall\fR
+.RS 4
+Require all capabilities\&. This is
+\fBdefault\fR
+mode if
+\fB\-\-cpu\-cap\fR
+is passed without arguments\&. Most safe mode\&.
+.RE
+.PP
+\fBcpu\fR
+.RS 4
+Require the CPU to have all capabilities in image to match runtime CPU\&.
+.RE
+.PP
+\fBfpu\fR
+.RS 4
+Require the CPU to have compatible FPU\&. For example the process might be dumped with xsave capability but attempted to restore without it present on target CPU\&. In such case we refuse to proceed\&. This is
+\fBdefault\fR
+mode if
+\fB\-\-cpu\-cap\fR
+is not present in command line\&. Note this argument might be passed even if on the
+\fBdump\fR
+no
+\fB\-\-cpu\-cap\fR
+have been specified because FPU frames are always encoded into images\&.
+.RE
+.PP
+\fBins\fR
+.RS 4
+Require CPU compatibility on instructions level\&.
+.RE
+.PP
+\fBnone\fR
+.RS 4
+Ignore capabilities\&. Most dangerous mode\&. The behaviour is implementation dependent\&. Try to not use it until really required\&.
+.sp
+For example, this option can be used in case
+\fB\-\-cpu\-cap=cpu\fR
+was used during
+\fBdump\fR, and images are migrated to a less capable CPU and are to be restored\&. By default,
+\fBcriu\fR
+shows an error that CPU capabilities are not adequate, but this can be suppressed by using
+\fB\-\-cpu\-cap=none\fR\&.
+.PP
+\fB\-\-weak\-sysctls\fR
+.RS 4
+Silently skip restoring sysctls that are not available\&. This allows to restore on an older kernel, or a kernel configured without some options\&.
+.RE
+.PP
+\fB\-\-lazy\-pages\fR
+.RS 4
+Restore the processes without filling out the entire memory contents\&. When this option is used,
+\fBrestore\fR
+sets up the infrastructure required to fill memory pages either on demand when the process accesses them or in the background without stopping the restored process\&. This option requires running
+\fBlazy\-pages\fR
+daemon\&.
+.RE
+.RE
+.SS "check"
+.sp
+Checks whether the kernel supports the features needed by \fBcriu\fR to dump and restore a process tree\&.
+.sp
+There are three categories of kernel support, as described below\&. \fBcriu check\fR always checks Category 1 features unless \fB\-\-feature\fR is specified which only checks a specified feature\&.
+.PP
+\fBCategory 1\fR
+.RS 4
+Absolutely required\&. These are features like support for
+\fB/proc/PID/map_files\fR,
+\fBNETLINK_SOCK_DIAG\fR
+socket monitoring,
+\fB/proc/sys/kernel/ns_last_pid\fR
+etc\&.
+.RE
+.PP
+\fBCategory 2\fR
+.RS 4
+Required only for specific cases\&. These are features like AIO remap,
+\fB/dev/net/tun\fR
+and others that are only required if a process being dumped or restored is using those\&.
+.RE
+.PP
+\fBCategory 3\fR
+.RS 4
+Experimental\&. These are features like
+\fBtask\-diag\fR
+that are used for experimental purposes (mostly during development)\&.
+.RE
+.sp
+If there are no errors or warnings, \fBcriu\fR prints "Looks good\&." and its exit code is 0\&.
+.sp
+A missing Category 1 feature causes \fBcriu\fR to print "Does not look good\&." and its exit code is non\-zero\&.
+.sp
+Missing Category 2 and 3 features cause \fBcriu\fR to print "Looks good but \&..." and its exit code is be non\-zero\&.
+.sp
+Without any options, \fBcriu check\fR checks Category 1 features\&. This behavior can be changed by using the following options:
+.PP
+\fB\-\-extra\fR
+.RS 4
+Check kernel support for Category 2 features\&.
+.RE
+.PP
+\fB\-\-experimental\fR
+.RS 4
+Check kernel support for Category 3 features\&.
+.RE
+.PP
+\fB\-\-all\fR
+.RS 4
+Check kernel support for Category 1, 2, and 3 features\&.
+.RE
+.PP
+\fB\-\-feature\fR \fIname\fR
+.RS 4
+Check a specific feature\&. If
+\fIname\fR
+is
+\fBlist\fR, a list of valid kernel feature names that can be checked will be printed\&.
+.RE
+.SS "page\-server"
+.sp
+Launches \fBcriu\fR in page server mode\&.
+.PP
+\fB\-\-daemon\fR
+.RS 4
+Runs page server as a daemon (background process)\&.
+.RE
+.PP
+\fB\-\-status\-fd\fR
+.RS 4
+Write \e0 to the FD and close it once page\-server is ready to handle requests\&. The status\-fd allows to not daemonize a process and get its exit code at the end\&. It isn\(cqt supposed to use \-\-daemon and \-\-status\-fd together\&.
+.RE
+.PP
+\fB\-\-address\fR \fIaddress\fR
+.RS 4
+Page server IP address or hostname\&.
+.RE
+.PP
+\fB\-\-port\fR \fInumber\fR
+.RS 4
+Page server port number\&.
+.RE
+.PP
+\fB\-\-ps\-socket\fR \fIfd\fR
+.RS 4
+Use provided file descriptor as socket for incoming connection\&. In this case \-\-address and \-\-port are ignored\&. Useful for intercepting page\-server traffic e\&.g\&. to add encryption or authentication\&.
+.RE
+.PP
+\fB\-\-lazy\-pages\fR
+.RS 4
+Serve local memory dump to a remote
+\fBlazy\-pages\fR
+daemon\&. In this mode the
+\fBpage\-server\fR
+reads local memory dump and allows the remote
+\fBlazy\-pages\fR
+daemon to request memory pages in random order\&.
+.RE
+.SS "lazy\-pages"
+.sp
+Launches \fBcriu\fR in lazy\-pages daemon mode\&.
+.sp
+The \fBlazy\-pages\fR daemon is responsible for managing user\-level demand paging for the restored processes\&. It gets information required to fill the process memory pages from the \fBrestore\fR and from the checkpoint directory\&. When a restored process access certain memory page for the first time, the \fBlazy\-pages\fR daemon injects its contents into the process address space\&. The memory pages that are not yet requested by the restored processes are injected in the background\&.
+.SS "exec"
+.sp
+Executes a system call inside a destination task\*(Aqs context\&. This functionality is deprecated; please use \fBCompel\fR instead\&.
+.SS "service"
+.sp
+Launches \fBcriu\fR in RPC daemon mode, where \fBcriu\fR is listening for RPC commands over socket to perform\&. This is convenient for a case where daemon itself is running in a privileged (superuser) mode but clients are not\&.
+.SS "dedup"
+.sp
+Starts pagemap data deduplication procedure, where \fBcriu\fR scans over all pagemap files and tries to minimize the number of pagemap entries by obtaining the references from a parent pagemap image\&.
+.SS "cpuinfo dump"
+.sp
+Fetches current CPU features and write them into an image file\&.
+.SS "cpuinfo check"
+.sp
+Fetches current CPU features (i\&.e\&. CPU the \fBcriu\fR is running on) and test if they are compatible with the ones present in an image file\&.
+.SH "CONFIGURATION FILES"
+.sp
+\fBCriu\fR supports usage of configuration files to avoid the need of writing every option on command line, which is useful especially with repeated usage of same options\&. A specific configuration file can be passed with the "\fB\-\-config\fR \fIfile\fR" option\&. If no file is passed, the default configuration files \fI/etc/criu/default\&.conf\fR and \fI$HOME/\&.criu/default\&.conf\fR are parsed (if present on the system)\&. If the environment variable CRIU_CONFIG_FILE is set, it will also be parsed\&.
+.sp
+The options passed to CRIU via CLI, RPC or configuration file are evaluated in the following order:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+apply_config(/etc/criu/default\&.conf)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+apply_config($HOME/\&.criu/default\&.conf)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+apply_config(CRIU_CONFIG_FILE)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+apply_config(\fB\-\-config\fR
+\fIfile\fR)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+apply_config(CLI) or apply_config(RPC)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+apply_config(RPC configuration file) (only for RPC mode)
+.RE
+.sp
+Default configuration file parsing can be deactivated with "\fB\-\-no\-default\-config\fR" if needed\&. Parsed configuration files are merged with command line options, which allows overriding boolean options\&.
+.SS "Configuration file syntax"
+.sp
+Comments are supported using \*(Aq#\*(Aq sign\&. The rest of the line is ignored\&. Options are the same as command line options without the \*(Aq\-\-\*(Aq prefix, use one option per line (with corresponding argument if applicable, divided by whitespaces)\&. If needed, the argument can be provided in double quotes (this should be needed only if the argument contains whitespaces)\&. In case this type of argument contains a literal double quote as well, it can be escaped using the \*(Aq\e\*(Aq sign\&. Usage of commands is disallowed and all other escape sequences are interpreted literally\&.
+.sp
+Example of configuration file to illustrate syntax:
+.sp
+.if n \{\
+.RS 4
+.\}
+.fam C
+.ps -1
+.nf
+.BB lightgray
+$ cat ~/\&.criu/default\&.conf
+tcp\-established
+work\-dir "/home/USERNAME/criu/my \e"work\e" directory"
+#this is a comment
+no\-restore\-sibling # this is another comment
+.EB lightgray
+.fi
+.fam
+.ps +1
+.if n \{\
+.RE
+.\}
+.SS "Configuration files in RPC mode"
+.sp
+Not only does \fBcriu\fR evaluate configuration files in CLI mode, it also evaluates configuration files in RPC mode\&. Just as in CLI mode the configuration file values are evaluated first\&. This means that any option set via RPC will overwrite the configuration file setting\&. The user can thus change \fBcriu\fR\*(Aqs default behavior but it is not possible to change settings which are explicitly set by the RPC client\&.
+.sp
+The RPC client can, however, specify an additional configuration file which will be evaluated after the RPC options (see above for option evaluation order)\&. The RPC client can specify this additional configuration file via "req\&.opts\&.config_file = \fI/path/to/file\fR"\&. The values from this configuration file will overwrite all other configuration file settings or RPC options\&. \fBThis can lead to undesired behavior of criu and should only be used carefully\&.\fR
+.SH "EXAMPLES"
+.sp
+To checkpoint a program with pid of \fB1234\fR and write all image files into directory \fBcheckpoint\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.fam C
+.ps -1
+.nf
+.BB lightgray
+ criu dump \-D checkpoint \-t 1234
+.EB lightgray
+.fi
+.fam
+.ps +1
+.if n \{\
+.RE
+.\}
+.sp
+To restore this program detaching criu itself:
+.sp
+.if n \{\
+.RS 4
+.\}
+.fam C
+.ps -1
+.nf
+.BB lightgray
+ criu restore \-d \-D checkpoint
+.EB lightgray
+.fi
+.fam
+.ps +1
+.if n \{\
+.RE
+.\}
+.SH "AUTHOR"
+.sp
+The CRIU team\&.
+.SH "COPYRIGHT"
+.sp
+Copyright (C) 2011\-2016, Parallels Holdings, Inc\&.
diff --git a/criu.pc.patch b/criu.pc.patch
deleted file mode 100644
index 6211f2c..0000000
--- a/criu.pc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 341ef149ee259d9432ea4c01507eefab2ef8b83c Mon Sep 17 00:00:00 2001
-From: Radostin Stoyanov
-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
----
- 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
-
diff --git a/criu.spec b/criu.spec
index ec8bb31..24bcf32 100644
--- a/criu.spec
+++ b/criu.spec
@@ -1,66 +1,69 @@
+%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: 4.2
-Release: 11%{?dist}
+Version: 3.15
+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
+Source0: http://download.openvz.org/criu/criu-%{version}.tar.bz2
-# 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
+%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
-Source5: criu-tmpfiles.conf
+Source4: criu-tmpfiles.conf
BuildRequires: gcc
BuildRequires: systemd
BuildRequires: libnet-devel
BuildRequires: protobuf-devel protobuf-c-devel %{py_prefix}-devel libnl3-devel libcap-devel
-BuildRequires: %{py_prefix}-pip
-BuildRequires: %{py_prefix}-setuptools
-BuildRequires: (%{py_prefix}-wheel if %{py_prefix}-setuptools < 71)
-BuildRequires: %{py_prefix}-protobuf
-BuildRequires: asciidoctor
+%if 0%{?fedora} || 0%{?rhel} > 7
+BuildRequires: asciidoc xmlto
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
-BuildRequires: make
+%endif
# 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 riscv64
+ExclusiveArch: x86_64 %{arm} ppc64le aarch64 s390x
%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}.
@@ -71,25 +74,18 @@ Requires: %{name} = %{version}-%{release}
%description libs
This package contains the libraries for %{name}
-
-%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}
+%endif
%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}.
@@ -102,56 +98,63 @@ 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
+
+%if 0%{?rhel} && 0%{?rhel} <= 7
+%patch100 -p1
+%endif
%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} PLUGINDIR=%{_libdir}/criu NETWORK_LOCK_DEFAULT=NETWORK_LOCK_NFTABLES
-make V=1 WERROR=0 PREFIX=%{_prefix} PLUGINDIR=%{_libdir}/criu amdgpu_plugin
+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
make docs V=1
+%endif
%install
-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-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
make install-man DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
-rm -f $RPM_BUILD_ROOT%{_mandir}/man1/compel.1
+%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
mkdir -p %{buildroot}%{_tmpfilesdir}
-install -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf
+install -m 0644 %{SOURCE4} %{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
@@ -159,206 +162,23 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a
%files libs
%{_libdir}/*.so.*
-
-%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
+%endif
%files -n %{py_prefix}-%{name}
-%{python3_sitelib}/pycriu*
+%if 0%{?rhel} && 0%{?rhel} <= 7
+%{python2_sitelib}/pycriu/*
+%{python2_sitelib}/*egg-info
+%else
+%{python3_sitelib}/pycriu/*
+%{python3_sitelib}/*egg-info
+%endif
%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 - 4.2-11
-- Convert STI tests to TMT (rhbz#2382879)
-
-* Mon Nov 17 2025 Adrian Reber - 4.2-5
-- Update to 4.2
-
-* Fri Sep 19 2025 Python Maint - 4.1.1-4
-- Rebuilt for Python 3.14.0rc3 bytecode
-
-* Wed Aug 27 2025 Miro HronĨok - 4.1.1-3
-- Drop unused BuildRequires on python3-wheel
-
-* Fri Aug 15 2025 Python Maint - 4.1.1-2
-- Rebuilt for Python 3.14.0rc2 bytecode
-
-* Wed Jul 30 2025 Adrian Reber - 4.1.1-1
-- Update to 4.1.1
-
-* Wed Jul 23 2025 Fedora Release Engineering - 4.1-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
-
-* Tue Jun 17 2025 Python Maint - 4.1-4
-- Rebuilt for Python 3.14
-
-* Wed Apr 23 2025 David Abdurachmanov - 4.1-3
-- Enable for riscv64
-
-* Mon Apr 21 2025 Adrian Reber - 4.1-2
-- Apply upstream patch to fix a runc regression
-
-* Mon Apr 07 2025 Radostin Stoyanov - 4.1-1
-- Update to 4.1
-
-* Thu Jan 16 2025 Fedora Release Engineering - 4.0-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
-
-* Sun Dec 08 2024 Radostin Stoyanov - 4.0-3
-- Apply patch to handle vvar_vclock vma-s in rawhide
-
-* Thu Oct 17 2024 Adrian Reber - 4.0-2
-- Recommends: iptables
-
-* Thu Sep 26 2024 Radostin Stoyanov - 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 - 3.19-7
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
-
-* Tue Jul 09 2024 Radostin Stoyanov - 3.19-6
-- Add package for amdgpu-plugin
-
-* Sat Jun 08 2024 Python Maint - 3.19-5
-- Rebuilt for Python 3.13
-
-* Wed Jan 24 2024 Fedora Release Engineering - 3.19-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
-
-* Fri Jan 19 2024 Fedora Release Engineering - 3.19-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
-
-* Tue Nov 28 2023 Adrian Reber - 3.19-2
-- Fix test setup
-
-* Tue Nov 28 2023 Adrian Reber - 3.19-1
-- Update to 3.19
-
-* Wed Jul 19 2023 Fedora Release Engineering - 3.18-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
-
-* Thu Jul 06 2023 Adrian Reber - 3.18-3
-- migrated to SPDX license
-- remove RHEL 7 conditionals
-
-* Tue Jun 13 2023 Python Maint - 3.18-2
-- Rebuilt for Python 3.12
-
-* Tue Apr 25 2023 Adrian Reber - 3.18-1
-- Update to 3.18
-- Apply patch from upstream to support newer CPUs
-
-* Thu Jan 19 2023 Fedora Release Engineering - 3.17.1-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
-
-* Fri Dec 2 2022 Florian Weimer - 3.17.1-4
-- Fix FTBFS with glibc 2.36
-
-* Wed Jul 20 2022 Fedora Release Engineering - 3.17.1-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
-
-* Fri Jul 08 2022 Adrian Reber - 3.17.1-2
-- Rebuilt to pick up glibc rseq() changes
-
-* Mon Jun 27 2022 Radostin Stoyanov - 3.17.1-1
-- Update to release version 3.17.1
-
-* Mon Jun 20 2022 Adrian Reber - 3.17-4
-- Apply upstream patch to fix mount v2 errors
-
-* Mon Jun 13 2022 Python Maint - 3.17-3
-- Rebuilt for Python 3.11
-
-* Thu May 19 2022 Radostin Stoyanov - 3.17-2
-- Use mntns-compat-mode as a temporary fix for runc
-
-* Fri May 6 2022 Radostin Stoyanov - 3.17-1
-- Update to release version 3.17
-- Do not install compel and amdgpu_plugin man pages
-
-* Tue Apr 5 2022 Radostin Stoyanov - 3.16.1-12
-- Update rseq patches
-
-* Tue Apr 5 2022 Radostin Stoyanov - 3.16.1-11
-- Update rseq patches
-
-* Tue Apr 5 2022 Radostin Stoyanov - 3.16.1-10
-- Update fixup patch
-
-* Tue Apr 5 2022 Radostin Stoyanov - 3.16.1-9
-- Update rseq support patches
-
-* Fri Feb 18 2022 Radostin Stoyanov - 3.16.1-8
-- rebuilt
-
-* Tue Feb 8 2022 Radostin Stoyanov - 3.16.1-7
-- Drop global -ffreestanding
-
-* Mon Jan 31 2022 Radostin Stoyanov - 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 - 3.16.1-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
-
-* Sat Nov 06 2021 Adrian Reber - 3.16.1-4
-- Rebuilt for protobuf 3.19.0
-
-* Mon Oct 25 2021 Adrian Reber - 3.16.1-3
-- Rebuilt for protobuf 3.18.1
-
-* Tue Oct 19 2021 Radostin Stoyanov - 3.16.1-2
-- Update protobuf-c to libprotobuf-c requirement
-
-* Thu Oct 14 2021 Radostin Stoyanov - 3.16.1-1
-- Update to 3.16.1
-- Add protobuf-c as required dependency (#2013775)
-
-* Tue Oct 05 2021 Adrian Reber - 3.16-3
-- Fix build on RHEL 8
-
-* Thu Sep 23 2021 Adrian Reber - 3.16-2
-- Include criu-ns sub package
-- Use new github Source0 location
-
-* Wed Sep 22 2021 Adrian Reber - 3.16-1
-- Update to 3.16
-
-* Wed Jul 21 2021 Fedora Release Engineering - 3.15-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
-
-* Fri Jun 04 2021 Python Maint - 3.15-5
-- Rebuilt for Python 3.10
-
-* Fri Apr 09 2021 Adrian Reber - 3.15-4
-- Test for testing
-
-* Tue Jan 26 2021 Fedora Release Engineering - 3.15-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
-
-* Wed Jan 13 2021 Adrian Reber - 3.15-2
-- Rebuilt for protobuf 3.14
-
* Wed Nov 04 2020 Adrian Reber - 3.15-1
- Update to 3.15
diff --git a/gating.yaml b/gating.yaml
index bb1d8ee..4b4c460 100644
--- a/gating.yaml
+++ b/gating.yaml
@@ -1,14 +1,12 @@
--- !Policy
product_versions:
- fedora-*
-decision_contexts: [bodhi_update_push_testing]
-subject_type: koji_build
+decision_context: bodhi_update_push_testing
rules:
- - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
+ - !PassingTestCaseRule {test_case_name: org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete }
--- !Policy
product_versions:
- fedora-*
-decision_contexts: [bodhi_update_push_stable]
-subject_type: koji_build
+decision_context: bodhi_update_push_stable
rules:
- - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
+ - !PassingTestCaseRule {test_case_name: org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete }
diff --git a/plans.fmf b/plans.fmf
deleted file mode 100644
index 946731e..0000000
--- a/plans.fmf
+++ /dev/null
@@ -1,21 +0,0 @@
-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
diff --git a/rpminspect.yaml b/rpminspect.yaml
deleted file mode 100644
index 93f2777..0000000
--- a/rpminspect.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-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
diff --git a/sources b/sources
index 8f69f50..551a2a9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (criu-4.2.tar.gz) = f7e0ac17d46dd560bb2439f617a0a3b3933eb86f4b8b9b16852d300e4ffc6a4851d72be9342dfd40792a53fca8b65d26fde4e1b1f02bcd04923a8b6f0e5c8a62
+SHA512 (criu-3.15.tar.bz2) = 7bfd32053e47b95d10cdd5e99494bff6a21aa3179518179f8c72e870f0aab960dd76c9f6cb6982e5b881472cf6962eefee3cf7d8ae9128b3379bcaecc937ebbc
diff --git a/tests/run-podman-checkpoint-restore.sh b/tests/run-podman-checkpoint-restore.sh
index 6ed7ad6..0e082b4 100755
--- a/tests/run-podman-checkpoint-restore.sh
+++ b/tests/run-podman-checkpoint-restore.sh
@@ -3,18 +3,43 @@
set -eux
ls -la
-uname -a
-rpm -qi criu || true
-criu --version
-echo "Start container"
-podman --log-level debug run -d quay.io/adrianreber/counter
+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 "See which containers are running"
podman ps
-echo "Connect to the container"
-curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8088
+# 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 "Checkpoint container"
podman --log-level debug container checkpoint -l
@@ -25,6 +50,7 @@ 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'`:8088
+curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8080/examples/servlets/servlet/HelloWorldExample -v
ls -la
+echo test
diff --git a/tests/run-zdtm.sh b/tests/run-zdtm.sh
index ab046e1..7ad7d25 100755
--- a/tests/run-zdtm.sh
+++ b/tests/run-zdtm.sh
@@ -1,10 +1,21 @@
#!/bin/bash
-set -xe
+set -x
uname -a
-rpm -qi criu || true
-criu --version
+
+# 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
# These zdtm tests are skipped because they fail only in CI system
EXCLUDES=" \
@@ -15,31 +26,15 @@ 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() {
- python3 ./zdtm.py run --criu-bin /usr/sbin/criu ${EXCLUDES} \
+ ./zdtm.py run --criu-bin /usr/sbin/criu ${EXCLUDES} \
-a --ignore-taint --keep-going
RESULT=$?
@@ -48,13 +43,17 @@ run_test() {
RESULT=42
-# this socket breaks CRIU's test cases
+# 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
rm -f /var/lib/sss/pipes/nss
-cd ../criu-$(crit --version)
+cd source
echo "Build CRIU"
-make -j"$(nproc)"
+make
cd test
diff --git a/tests/main.fmf b/tests/tests.yml
similarity index 50%
rename from tests/main.fmf
rename to tests/tests.yml
index a743210..8a4fa80 100644
--- a/tests/main.fmf
+++ b/tests/tests.yml
@@ -1,14 +1,21 @@
-/zdtm:
- summary: Test zdtm
- test: ./run-zdtm.sh
- duration: 30m
- require:
+---
+- hosts: localhost
+ roles:
+ - role: standard-test-source
+ tags:
+ - classic
+ - role: standard-test-basic
+ tags:
+ - classic
+ required_packages:
+ - podman
+ - curl
+ - jq
- checkpolicy
- policycoreutils
- make
- gcc
- python3
- - coreutils
- libnet-devel
- protobuf-devel
- protobuf-c-devel
@@ -16,17 +23,9 @@
- libnl3-devel
- libcap-devel
- libaio-devel
- - libuuid-devel
- - nftables-devel
- python3-pyyaml
- python3-protobuf
- - python-unversioned-command
- - crit
- - python3-criu
-/podman:
- summary: Test podman
- test: ./run-podman-checkpoint-restore.sh
- require:
- - podman
- - curl
- - jq
+ tests:
+ - zdtm:
+ dir: .
+ run: ./run-zdtm.sh