import criu-3.15-1.module+el8.4.0+10198+36d1d0e3

This commit is contained in:
CentOS Sources 2021-03-30 11:45:33 -04:00 committed by Stepan Oksanichenko
parent a6fb57017d
commit 7abcb6366b
4 changed files with 15 additions and 130 deletions

View File

@ -1 +1 @@
548d575d89e872c153a756c274e438995eb4e823 SOURCES/criu-3.14.tar.bz2
b79142b186cfff9e5b43d9d7057fdd88560cbe76 SOURCES/v3.15.tar.gz

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/criu-3.14.tar.bz2
SOURCES/v3.15.tar.gz

View File

@ -1,121 +0,0 @@
From ce733f4be5791911c009c57e803f3a08d3270a0c Mon Sep 17 00:00:00 2001
From: Adrian Reber <areber@redhat.com>
Date: Wed, 20 May 2020 11:57:22 +0000
Subject: [PATCH 1/3] coverity: fix RESOURCE_LEAK criu/timens.c: 67
7. criu-3.14/criu/timens.c:67: leaked_storage: Variable "img" going out of scope leaks the storage it points to.
65| if (id == 0 && empty_image(img)) {
66| pr_warn("Clocks values have not been dumped\n");
67|-> return 0;
68| }
Signed-off-by: Adrian Reber <areber@redhat.com>
---
criu/timens.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/criu/timens.c b/criu/timens.c
index 2a7e952845..f81808abf8 100644
--- criu-3.14/criu/timens.c
+++ criu-3.14/criu/timens.c
@@ -64,6 +64,7 @@ int prepare_timens(int id)
if (id == 0 && empty_image(img)) {
pr_warn("Clocks values have not been dumped\n");
+ close_image(img);
return 0;
}
From e7e4e46cfebd69efe8681395380528826df0d529 Mon Sep 17 00:00:00 2001
From: Adrian Reber <areber@redhat.com>
Date: Wed, 20 May 2020 12:19:36 +0000
Subject: [PATCH 2/3] coverity: fix FORWARD_NULL in criu/proc_parse.c: 1481
8. criu-3.14/criu/proc_parse.c:1511: var_deref_model: Passing null pointer "f" to "fclose", which dereferences it.
1509| exit_code = 0;
1510| out:
1511|-> fclose(f);
1512| return exit_code;
1513| }
Signed-off-by: Adrian Reber <areber@redhat.com>
---
criu/proc_parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/criu/proc_parse.c b/criu/proc_parse.c
index 4a22700aa3..d1ccd9281b 100644
--- criu-3.14/criu/proc_parse.c
+++ criu-3.14/criu/proc_parse.c
@@ -1480,7 +1480,7 @@ int parse_timens_offsets(struct timespec *boff, struct timespec *moff)
f = fopen_proc(PROC_SELF, "timens_offsets");
if (!f) {
pr_perror("Unable to open /proc/self/timens_offsets");
- goto out;
+ return exit_code;
}
while (fgets(buf, BUF_SIZE, f)) {
int64_t sec, nsec;
From 6b44ddf4587ecbda65c15d462a94708ac2f6f602 Mon Sep 17 00:00:00 2001
From: Adrian Reber <areber@redhat.com>
Date: Wed, 20 May 2020 12:38:55 +0000
Subject: [PATCH 3/3] clang: Branch condition evaluates to a garbage value
criu-3.14/criu/namespaces.c:692:7: warning: Branch condition evaluates to a garbage value
criu-3.14/criu/namespaces.c:690:3: note: 'supported' declared without an initial value
protobuf_c_boolean supported;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
criu-3.14/criu/namespaces.c:691:8: note: Calling 'get_ns_id'
id = get_ns_id(pid, &time_for_children_ns_desc, &supported);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
criu-3.14/criu/namespaces.c:479:9: note: Calling '__get_ns_id'
return __get_ns_id(pid, nd, supported, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
criu-3.14/criu/namespaces.c:454:6: note: Assuming 'proc_dir' is < 0
if (proc_dir < 0)
^~~~~~~~~~~~
criu-3.14/criu/namespaces.c:454:2: note: Taking true branch
if (proc_dir < 0)
^
criu-3.14/criu/namespaces.c:455:3: note: Returning without writing to '*supported'
return 0;
^
criu-3.14/criu/namespaces.c:479:9: note: Returning from '__get_ns_id'
return __get_ns_id(pid, nd, supported, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
criu-3.14/criu/namespaces.c:479:2: note: Returning without writing to '*supported'
return __get_ns_id(pid, nd, supported, NULL);
^
criu-3.14/criu/namespaces.c:691:8: note: Returning from 'get_ns_id'
id = get_ns_id(pid, &time_for_children_ns_desc, &supported);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
criu-3.14/criu/namespaces.c:692:7: note: Branch condition evaluates to a garbage value
if (!supported || !id) {
^~~~~~~~~~
690| protobuf_c_boolean supported;
691| id = get_ns_id(pid, &time_for_children_ns_desc, &supported);
692|-> if (!supported || !id) {
693| pr_err("Can't make timens id\n");
694|
Signed-off-by: Adrian Reber <areber@redhat.com>
---
criu/namespaces.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/criu/namespaces.c b/criu/namespaces.c
index 89d97c7bce..04f242505d 100644
--- criu-3.14/criu/namespaces.c
+++ criu-3.14/criu/namespaces.c
@@ -687,7 +687,7 @@ int dump_task_ns_ids(struct pstree_item *item)
}
if (ids->has_time_ns_id) {
unsigned int id;
- protobuf_c_boolean supported;
+ protobuf_c_boolean supported = false;
id = get_ns_id(pid, &time_for_children_ns_desc, &supported);
if (!supported || !id) {
pr_err("Can't make timens id\n");

View File

@ -5,19 +5,20 @@
# parasite code breaks if annobin is enabled.
%undefine _annotated_build
%global git0 https://github.com/checkpoint-restore/criu/
%global commit0 f68da4a86fee62af216e9e7520f4916aa29e797b
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
Name: criu
Version: 3.14
Release: 2%{?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: GPLv2
URL: http://criu.org/
Source0: http://download.openvz.org/criu/criu-%{version}.tar.bz2
Source0: %{git0}/archive/%{commit0}/v%{version}.tar.gz
Source1: criu-tmpfiles.conf
# related bug: https://bugzilla.redhat.com/show_bug.cgi?id=1838991
# patch: https://patch-diff.githubusercontent.com/raw/checkpoint-restore/criu/pull/1075.patch
Patch0: criu-1838991.patch
BuildRequires: gcc
BuildRequires: systemd
BuildRequires: libnet-devel
@ -25,6 +26,7 @@ BuildRequires: protobuf-devel protobuf-c-devel %{py_prefix}-devel libnl3-devel l
BuildRequires: asciidoc xmlto
BuildRequires: perl-interpreter
BuildRequires: libselinux-devel
BuildRequires: git
# Checkpointing containers with a tmpfs requires tar
Recommends: tar
@ -56,7 +58,7 @@ crit is a tool designed to decode CRIU binary dump files and show
their content in human-readable form.
%prep
%autosetup -p1
%autosetup -Sgit -n %{name}-%{commit0}
%build
# %{?_smp_mflags} does not work
@ -96,6 +98,10 @@ rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name}
%doc %{_mandir}/man1/crit.1*
%changelog
* Wed Nov 04 2020 Jindrich Novy <jnovy@redhat.com> - 3.15-1
- update to https://github.com/checkpoint-restore/criu/releases/tag/v3.15
- Related: #1883490
* Mon May 25 2020 Jindrich Novy <jnovy@redhat.com> - 3.14-2
- fix "Need to fix bugs found by coverity."
- Related: #1821193