From 465e6bbd115048767817a5e58cae69dc217923ca Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 03:06:19 +0000 Subject: import criu-3.5-4.el7a --- diff --git a/.criu.metadata b/.criu.metadata index a7d72a4..2f610b2 100644 --- a/.criu.metadata +++ b/.criu.metadata @@ -1 +1 @@ -daec5be3c57e7539137601bfad5026dc1a302754 SOURCES/criu-2.12.tar.bz2 +e87902d8c4958dcc9dd046a2402acb3af82e3a17 SOURCES/criu-3.5.tar.bz2 diff --git a/.gitignore b/.gitignore index bc9f047..52d35d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/criu-2.12.tar.bz2 +SOURCES/criu-3.5.tar.bz2 diff --git a/SOURCES/0001-Fix-ppc64el-build-failure-by-not-redefining-AT_VECTO.patch b/SOURCES/0001-Fix-ppc64el-build-failure-by-not-redefining-AT_VECTO.patch deleted file mode 100644 index c138294..0000000 --- a/SOURCES/0001-Fix-ppc64el-build-failure-by-not-redefining-AT_VECTO.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 3ef0c620a15994097e3e30d2ba4a90afb39d17fe Mon Sep 17 00:00:00 2001 -From: Adrian Reber -Date: Fri, 4 Aug 2017 03:13:26 -0400 -Subject: [PATCH] Fix ppc64el build failure, by not redefining - AT_VECTOR_SIZE_ARCH - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1477803 - -Backport of following commit on the 2.12 release: - -commit c10e0d215412edac55e941f57cc4ba80422968dd -Author: Gianfranco Costamagna -Date: Wed Jul 5 12:50:07 2017 +0200 - - Fix ppc64el build failure, by not redefining AT_VECTOR_SIZE_ARCH - - This fixes the ppc64el build failure - CC criu/arch/ppc64/sigframe.o - In file included from criu/arch/ppc64/sigframe.c:5:0: - criu/arch/ppc64/include/asm/types.h:32:0: error: "AT_VECTOR_SIZE_ARCH" redefined [-Werror] - #define AT_VECTOR_SIZE_ARCH 6 - - Signed-off-by: Andrei Vagin - -Signed-off-by: Adrian Reber ---- - criu/arch/ppc64/include/asm/infect-types.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/criu/arch/ppc64/include/asm/infect-types.h b/criu/arch/ppc64/include/asm/infect-types.h -index 1969ca2..e07bf1e 100644 ---- a/criu/arch/ppc64/include/asm/infect-types.h -+++ b/criu/arch/ppc64/include/asm/infect-types.h -@@ -83,7 +83,9 @@ typedef struct { - * include/linux/mm_types.h - */ - #define AT_VECTOR_SIZE_BASE 20 -+#if !defined AT_VECTOR_SIZE_ARCH - #define AT_VECTOR_SIZE_ARCH 6 -+#endif - #define AT_VECTOR_SIZE (2*(AT_VECTOR_SIZE_ARCH + AT_VECTOR_SIZE_BASE + 1)) - - typedef uint64_t auxv_t; --- -1.8.3.1 - diff --git a/SOURCES/0001-fix-building-on-newest-glibc-and-kernel.patch b/SOURCES/0001-fix-building-on-newest-glibc-and-kernel.patch new file mode 100644 index 0000000..4a4beb4 --- /dev/null +++ b/SOURCES/0001-fix-building-on-newest-glibc-and-kernel.patch @@ -0,0 +1,41 @@ +From cb21b73e859de77804dde8579c6d1d1f84eec3a6 Mon Sep 17 00:00:00 2001 +From: Adrian Reber +Date: Thu, 28 Sep 2017 09:13:33 +0000 +Subject: [PATCH] fix building on newest glibc and kernel + +On Fedora rawhide with kernel-headers-4.14.0-0.rc2.git0.1.fc28.x86_64 +glibc-devel-2.26.90-15.fc28.x86_64 criu does not build any more: + +In file included from /usr/include/linux/aio_abi.h:31:0, + from criu/cr-check.c:24: +/usr/include/sys/mount.h:35:3: error: expected identifier before numeric constant + MS_RDONLY = 1, /* Mount read-only. */ + ^ +make[2]: *** [/builddir/build/BUILD/criu-3.5/scripts/nmk/scripts/build.mk:111: criu/cr-check.o] Error 1 +make[1]: *** [criu/Makefile:73: criu/built-in.o] Error 2 +make: *** [Makefile:233: criu] Error 2 + +This simple re-ordering of includes fixes it for me. + +Signed-off-by: Adrian Reber +--- + criu/cr-check.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/criu/cr-check.c b/criu/cr-check.c +index 5dd448b..8986ec4 100644 +--- a/criu/cr-check.c ++++ b/criu/cr-check.c +@@ -21,8 +21,8 @@ + #include + #include + #include +-#include + #include ++#include + + #include "../soccr/soccr.h" + +-- +1.8.3.1 + diff --git a/SOURCES/0001-kerndat-Detect-if-we-have-guard-page-mangle-in-procf.patch b/SOURCES/0001-kerndat-Detect-if-we-have-guard-page-mangle-in-procf.patch deleted file mode 100644 index 09ebdb7..0000000 --- a/SOURCES/0001-kerndat-Detect-if-we-have-guard-page-mangle-in-procf.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 8a4a164f3e33be9b2d28d54fe430e92f40626054 Mon Sep 17 00:00:00 2001 -From: Cyrill Gorcunov -Date: Mon, 26 Jun 2017 23:55:28 +0300 -Subject: [PATCH 1/2] kerndat: Detect if we have guard page mangle in procfs - output - -In vanilla kernel commit 1be7107fbe18eed3e319a6c3e83c78254b693acb -show_map_vma() no longer report PAGE_SIZE. Detect it with -simple test and remember in kdat settings. - -Suggested-by: Oleg Nesterov -Signed-off-by: Cyrill Gorcunov -Signed-off-by: Andrei Vagin ---- - criu/include/kerndat.h | 1 + - criu/kerndat.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 77 insertions(+) - -diff --git a/criu/include/kerndat.h b/criu/include/kerndat.h -index ba8c10da7..891cbdd41 100644 ---- a/criu/include/kerndat.h -+++ b/criu/include/kerndat.h -@@ -44,6 +44,7 @@ struct kerndat_s { - unsigned int has_xtlocks; - unsigned long mmap_min_addr; - bool has_tcp_half_closed; -+ bool stack_guard_gap_hidden; - }; - - extern struct kerndat_s kdat; -diff --git a/criu/kerndat.c b/criu/kerndat.c -index 354fb672b..80ec58bcf 100644 ---- a/criu/kerndat.c -+++ b/criu/kerndat.c -@@ -563,6 +563,80 @@ int kerndat_tcp_repair(void) - return exit_code; - } - -+static int kerndat_detect_stack_guard_gap(void) -+{ -+ int num, ret = -1, detected = 0; -+ unsigned long start, end; -+ char r, w, x, s; -+ char buf[1024]; -+ FILE *maps; -+ void *mem; -+ -+ mem = mmap(NULL, (3ul << 20), PROT_READ | PROT_WRITE, -+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_GROWSDOWN, -1, 0); -+ if (mem == MAP_FAILED) { -+ pr_perror("Can't mmap stack area"); -+ return -1; -+ } -+ munmap(mem, (3ul << 20)); -+ -+ mem = mmap(mem + (2ul << 20), (1ul << 20), PROT_READ | PROT_WRITE, -+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED | MAP_GROWSDOWN, -1, 0); -+ if (mem == MAP_FAILED) { -+ pr_perror("Can't mmap stack area"); -+ return -1; -+ } -+ -+ maps = fopen("/proc/self/maps", "r"); -+ if (maps == NULL) { -+ munmap(mem, 4096); -+ return -1; -+ } -+ -+ while (fgets(buf, sizeof(buf), maps)) { -+ num = sscanf(buf, "%lx-%lx %c%c%c%c", -+ &start, &end, &r, &w, &x, &s); -+ if (num < 6) { -+ pr_err("Can't parse: %s\n", buf); -+ goto err; -+ } -+ -+ /* -+ * When reading /proc/$pid/[s]maps the -+ * start/end addresses migh be cutted off -+ * with PAGE_SIZE on kernels prior 4.12 -+ * (see kernel commit 1be7107fbe18ee). -+ * -+ * Same time there was semi-complete -+ * patch released which hitted a number -+ * of repos (Ubuntu, Fedora) where instead -+ * of PAGE_SIZE the 1M gap is cutted off. -+ */ -+ if (start == (unsigned long)mem) { -+ kdat.stack_guard_gap_hidden = false; -+ detected = 1; -+ break; -+ } else if (start == ((unsigned long)mem + (1ul << 20))) { -+ pr_warn("Unsupported stack guard detected, confused but continue\n"); -+ kdat.stack_guard_gap_hidden = true; -+ detected = 1; -+ break; -+ } else if (start == ((unsigned long)mem + PAGE_SIZE)) { -+ kdat.stack_guard_gap_hidden = true; -+ detected = 1; -+ break; -+ } -+ } -+ -+ if (detected) -+ ret = 0; -+ -+err: -+ munmap(mem, (1ul << 20)); -+ fclose(maps); -+ return ret; -+} -+ - int kerndat_init(void) - { - int ret; -@@ -676,6 +750,8 @@ int kerndat_init(void) - ret = kerndat_iptables_has_xtlocks(); - if (!ret) - ret = kerndat_tcp_repair(); -+ if (!ret) -+ ret = kerndat_detect_stack_guard_gap(); - - kerndat_lsm(); - kerndat_mmap_min_addr(); --- -2.13.0 - diff --git a/SOURCES/0002-mem-Don-t-assume-guard-page-is-returned-in-procfs-wi.patch b/SOURCES/0002-mem-Don-t-assume-guard-page-is-returned-in-procfs-wi.patch deleted file mode 100644 index 09cc160..0000000 --- a/SOURCES/0002-mem-Don-t-assume-guard-page-is-returned-in-procfs-wi.patch +++ /dev/null @@ -1,115 +0,0 @@ -From be37925cff8aaf43f14866bd0a60dca6068a8d97 Mon Sep 17 00:00:00 2001 -From: Cyrill Gorcunov -Date: Mon, 26 Jun 2017 23:55:29 +0300 -Subject: [PATCH 2/2] mem: Don't assume guard page is returned in procfs with - new kernels - -If the guard page is not reported in show_map_vma we should -not ajust vma address neither we should call unmap_guard_pages -in restorer. - -https://github.com/xemul/criu/issues/322 - -Signed-off-by: Cyrill Gorcunov -Signed-off-by: Andrei Vagin ---- - criu/include/mem.h | 2 ++ - criu/mem.c | 19 ++++++++++++++----- - criu/proc_parse.c | 3 ++- - 3 files changed, 18 insertions(+), 6 deletions(-) - -diff --git a/criu/include/mem.h b/criu/include/mem.h -index 2fae797c6..2fc8e1e0e 100644 ---- a/criu/include/mem.h -+++ b/criu/include/mem.h -@@ -9,11 +9,13 @@ struct parasite_ctl; - struct vm_area_list; - struct page_pipe; - struct pstree_item; -+struct vma_area; - - struct mem_dump_ctl { - bool pre_dump; - }; - -+extern bool vma_has_guard_gap_hidden(struct vma_area *vma); - extern bool page_in_parent(bool dirty); - extern int prepare_mm_pid(struct pstree_item *i); - extern int do_task_reset_dirty_track(int pid); -diff --git a/criu/mem.c b/criu/mem.c -index 2c4323d8c..cd41829b2 100644 ---- a/criu/mem.c -+++ b/criu/mem.c -@@ -499,7 +499,7 @@ int prepare_mm_pid(struct pstree_item *i) - - if (vma_area_is_private(vma, kdat.task_size)) { - ri->vmas.priv_size += vma_area_len(vma); -- if (vma->e->flags & MAP_GROWSDOWN) -+ if (vma_has_guard_gap_hidden(vma)) - ri->vmas.priv_size += PAGE_SIZE; - } - -@@ -634,7 +634,7 @@ static int premap_private_vma(struct pstree_item *t, struct vma_area *vma, void - * A grow-down VMA has a guard page, which protect a VMA below it. - * So one more page is mapped here to restore content of the first page - */ -- if (vma->e->flags & MAP_GROWSDOWN) { -+ if (vma_has_guard_gap_hidden(vma)) { - vma->e->start -= PAGE_SIZE; - if (paddr) - paddr -= PAGE_SIZE; -@@ -702,7 +702,7 @@ static int premap_private_vma(struct pstree_item *t, struct vma_area *vma, void - pr_debug("\tpremap %#016"PRIx64"-%#016"PRIx64" -> %016lx\n", - vma->e->start, vma->e->end, (unsigned long)addr); - -- if (vma->e->flags & MAP_GROWSDOWN) { /* Skip gurad page */ -+ if (vma_has_guard_gap_hidden(vma)) { /* Skip gurad page */ - vma->e->start += PAGE_SIZE; - vma->premmaped_addr += PAGE_SIZE; - } -@@ -1046,6 +1047,11 @@ out: - return ret; - } - -+bool vma_has_guard_gap_hidden(struct vma_area *vma) -+{ -+ return kdat.stack_guard_gap_hidden && (vma->e->flags & MAP_GROWSDOWN); -+} -+ - /* - * A gard page must be unmapped after restoring content and - * forking children to restore COW memory. -@@ -1055,6 +1061,9 @@ int unmap_guard_pages(struct pstree_item *t) - struct vma_area *vma; - struct list_head *vmas = &rsti(t)->vmas.h; - -+ if (!kdat.stack_guard_gap_hidden) -+ return 0; -+ - list_for_each_entry(vma, vmas, list) { - if (!vma_area_is_private(vma, kdat.task_size)) - continue; -diff --git a/criu/proc_parse.c b/criu/proc_parse.c -index f1237cf9f..5e36db540 100644 ---- a/criu/proc_parse.c -+++ b/criu/proc_parse.c -@@ -25,6 +25,7 @@ - #include "kerndat.h" - #include "vdso.h" - #include "vma.h" -+#include "mem.h" - #include "bfd.h" - #include "proc_parse.h" - #include "fdinfo.h" -@@ -637,7 +638,7 @@ static int vma_list_add(struct vma_area *vma_area, - } - - /* Add a guard page only if here is enough space for it */ -- if ((vma_area->e->flags & MAP_GROWSDOWN) && -+ if (vma_has_guard_gap_hidden(vma_area) && - *prev_end < vma_area->e->start) - vma_area->e->start -= PAGE_SIZE; /* Guard page */ - *prev_end = vma_area->e->end; --- -2.13.0 - diff --git a/SOURCES/aio-fix.patch b/SOURCES/aio-fix.patch new file mode 100644 index 0000000..8589d55 --- /dev/null +++ b/SOURCES/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/SOURCES/crit.1 b/SOURCES/crit.1 index 4ec17ac..f613476 100644 --- a/SOURCES/crit.1 +++ b/SOURCES/crit.1 @@ -1,13 +1,13 @@ '\" t .\" Title: crit .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/09/2017 +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 09/28/2017 .\" Manual: CRIU Manual -.\" Source: criu 2.12 +.\" Source: criu 3.5 .\" Language: English .\" -.TH "CRIT" "1" "03/09/2017" "criu 2\&.12" "CRIU Manual" +.TH "CRIT" "1" "09/28/2017" "criu 3\&.5" "CRIU Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/SOURCES/criu-tmpfiles.conf b/SOURCES/criu-tmpfiles.conf new file mode 100644 index 0000000..66cc5bf --- /dev/null +++ b/SOURCES/criu-tmpfiles.conf @@ -0,0 +1 @@ +d /run/criu 0755 root root - diff --git a/SOURCES/criu.8 b/SOURCES/criu.8 index 5456233..73ac8e1 100644 --- a/SOURCES/criu.8 +++ b/SOURCES/criu.8 @@ -1,13 +1,13 @@ '\" t .\" Title: criu .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/09/2017 +.\" Generator: DocBook XSL Stylesheets vsnapshot +.\" Date: 09/28/2017 .\" Manual: CRIU Manual -.\" Source: criu 2.12 +.\" Source: criu 3.5 .\" Language: English .\" -.TH "CRIU" "8" "03/09/2017" "criu 2\&.12" "CRIU Manual" +.TH "CRIU" "8" "09/28/2017" "criu 3\&.5" "CRIU Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -181,18 +181,20 @@ criu \- checkpoint/restore in userspace .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\-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\&. +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\-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\&. @@ -630,6 +632,11 @@ This option skips in\-flight TCP connections\&. If any TCP connections that are 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\-\-tcp\-close\fR +.RS 4 +Restore connected TCP sockets in closed state\&. +.RE +.PP \fB\-\-evasive\-devices\fR .RS 4 Use any path to a device file if the original one is inaccessible\&. @@ -708,6 +715,17 @@ 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\&. @@ -1013,6 +1031,15 @@ shows an error that CPU capabilities are not adequate, but this can be suppresse .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 @@ -1097,6 +1124,22 @@ Page server IP address\&. .RS 4 Page server port number\&. .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 +deamon 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 checkpont 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\&. diff --git a/SPECS/criu.spec b/SPECS/criu.spec index 3e120b2..26734f1 100644 --- a/SPECS/criu.spec +++ b/SPECS/criu.spec @@ -1,5 +1,11 @@ +%if 0%{?fedora} > 27 +%global py2_prefix python2 +%else +%global py2_prefix python +%endif + Name: criu -Version: 2.12 +Version: 3.5 Release: 4%{?dist} Provides: crtools = %{version}-%{release} Obsoletes: crtools <= 1.0-2 @@ -8,36 +14,33 @@ Group: System Environment/Base License: GPLv2 URL: http://criu.org/ Source0: http://download.openvz.org/criu/criu-%{version}.tar.bz2 -Patch1: 0001-kerndat-Detect-if-we-have-guard-page-mangle-in-procf.patch -Patch2: 0002-mem-Don-t-assume-guard-page-is-returned-in-procfs-wi.patch -Patch3: 0001-Fix-ppc64el-build-failure-by-not-redefining-AT_VECTO.patch - -%if 0%{?rhel} || 0%{?rhel_alt} -BuildRequires: systemd +Patch0: 0001-fix-building-on-newest-glibc-and-kernel.patch -# RHEL has no asciidoc; take man-page from Fedora 24 +%if ! 0%{?fedora} +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 +# The patch aio-fix.patch is needed as RHEL7 +# doesn't do "nr_events *= 2" in ioctx_alloc(). +Patch100: aio-fix.patch %endif +Source3: criu-tmpfiles.conf + +BuildRequires: systemd BuildRequires: libnet-devel BuildRequires: protobuf-devel protobuf-c-devel python2-devel libnl3-devel libcap-devel -BuildRequires: perl %if 0%{?fedora} BuildRequires: asciidoc xmlto +BuildRequires: perl-interpreter %endif -# user-space and kernel changes are only available for x86_64 and ARM -# code is very architecture specific -# once imported in RCS it needs a bug openend explaining the ExclusiveArch +# 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 -%if 0%{?fedora} -ExclusiveArch: x86_64 %{arm} ppc64le aarch64 -%else -ExclusiveArch: x86_64 ppc64le aarch64 -%endif - +ExclusiveArch: x86_64 %{arm} ppc64le aarch64 s390x %description criu is the user-space part of Checkpoint/Restore in User-space @@ -54,17 +57,18 @@ Requires: %{name} = %{version}-%{release} This package contains header files and libraries for %{name}. %endif -%package -n python-%{name} +%package -n %{py2_prefix}-%{name} +%{?python_provide:%python_provide %{py2_prefix}-%{name}} Summary: Python bindings for %{name} Group: Development/Languages Requires: %{name} = %{version}-%{release} python-ipaddr protobuf-python -%description -n python-%{name} +%description -n %{py2_prefix}-%{name} python-%{name} contains Python bindings for %{name}. %package -n crit Summary: CRIU image tool -Requires: python-%{name} = %{version}-%{release} +Requires: %{py2_prefix}-%{name} = %{version}-%{release} %description -n crit crit is a tool designed to decode CRIU binary dump files and show @@ -73,14 +77,12 @@ their content in human-readable form. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%patch0 -p1 %build # %{?_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} +CFLAGS+=`echo %{optflags} | sed -e 's,-fstack-protector\S*,,g'` make V=1 WERROR=0 PREFIX=%{_prefix} RUNDIR=/run/criu %if 0%{?fedora} make docs V=1 %endif @@ -90,7 +92,7 @@ make docs V=1 make install-criu DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} make install-lib DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} %if 0%{?fedora} -# ony install documentation on Fedora as it requires asciidoc, +# 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} %else @@ -98,7 +100,11 @@ 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 %endif -%if 0%{?rhel} || 0%{?rhel_alt} +mkdir -p %{buildroot}%{_tmpfilesdir} +install -m 0644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/%{name}.conf +install -d -m 0755 %{buildroot}/run/%{name}/ + +%if ! 0%{?fedora} # remove devel package rm -rf $RPM_BUILD_ROOT%{_includedir}/criu rm $RPM_BUILD_ROOT%{_libdir}/*.so* @@ -116,6 +122,8 @@ rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name} %{_libdir}/*.so.* %{_libexecdir}/%{name} %endif +%dir /run/%{name} +%{_tmpfilesdir}/%{name}.conf %doc README.md COPYING %if 0%{?fedora} @@ -125,7 +133,7 @@ rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name} %{_libdir}/pkgconfig/*.pc %endif -%files -n python-%{name} +%files -n %{py2_prefix}-%{name} %{python2_sitelib}/pycriu/* %{python2_sitelib}/*egg-info @@ -135,22 +143,73 @@ rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name} %changelog -* Tue Sep 12 2017 Adrian Reber - 2.12-4 -- One more patch to use the correct define for AT_VECTOR_SIZE_ARCH - on the rhel-alt-7.4 branch +* Tue Oct 10 2017 Adrian Reber - 3.5-4 +- Upgrade imported manpages to 3.5 + +* Mon Oct 09 2017 Adrian Reber - 3.5-3 +- Fix ExclusiveArch on RHEL + +* Mon Oct 02 2017 Adrian Reber - 3.5-2 +- Merge RHEL and Fedora spec file -* Tue Sep 12 2017 Adrian Reber - 2.12-3 -- Removed aio-fix.patch for rhel-alt-7.4 rebuild -- Made spec-file rhel-alt-7.4 defines aware -- Rebuilt for rhel-alt-7.4 to pick up correct kernel defines -- Added aarch64 architecture for rhel-alt-7.4 +* Thu Sep 28 2017 Adrian Reber - 3.5-1 +- Update to 3.5 (#1496614) + +* Sun Aug 27 2017 Adrian Reber - 3.4-1 +- Update to 3.4 (#1483774) +- Removed upstreamed patches +- Added s390x (#1475719) + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 3.3-5 +- Python 2 binary package renamed to python2-criu + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Wed Aug 02 2017 Fedora Release Engineering - 3.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 3.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Jul 20 2017 Adrian Reber - 3.3-2 +- Added patches to handle changes in glibc + +* Wed Jul 19 2017 Adrian Reber - 3.3-1 +- Update to 3.3 + +* Fri Jun 30 2017 Adrian Reber - 3.2.1-2 +- Added patches to handle unified hierarchy and new glibc + +* Wed Jun 28 2017 Adrian Reber - 3.2.1-1 +- Update to 3.2.1-1 * Wed Jun 28 2017 Adrian Reber - 2.12-2 - Added patches for guard page kernel fixes -* Thu Mar 09 2017 Adrian Reber - 2.12-1 +* Thu Mar 09 2017 Adrian Reber - 2.12-1 - Update to 2.12 +* Fri Feb 17 2017 Adrian Reber - 2.11.1-1 +- Update to 2.11.1 + +* Thu Feb 16 2017 Adrian Reber - 2.11-1 +- Update to 2.11 + +* Mon Feb 13 2017 Adrian Reber - 2.10-4 +- Added patch to fix build on ppc64le + +* Fri Feb 10 2017 Fedora Release Engineering - 2.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Jan 23 2017 Orion Poplawski - 2.10-2 +- Rebuild for protobuf 3.2.0 + +* Mon Jan 16 2017 Adrian Reber - 2.10-1 +- Update to 2.10 + +* Mon Dec 12 2016 Adrian Reber - 2.9-1 +- Update to 2.9 +- Added crit manpage to crit subpackage + * Tue Jun 14 2016 Adrian Reber - 2.3-2 - Added patches to handle in-flight TCP connections