import criu-3.17-4.el9
This commit is contained in:
parent
d5d7642f39
commit
4d0b044fa8
@ -1 +1 @@
|
||||
91eb1ccac61a7d538db14884091883c6dab5481a SOURCES/criu-3.15.tar.bz2
|
||||
5c2725361d0d131a3f6142cb2ae8abff6d50aed3 SOURCES/criu-3.17.tar.gz
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/criu-3.15.tar.bz2
|
||||
SOURCES/criu-3.17.tar.gz
|
||||
|
@ -1,64 +0,0 @@
|
||||
From b9ae48172fff77d41b5cf19d334ccbe002ac0686 Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Reber <areber@redhat.com>
|
||||
Date: Tue, 7 Dec 2021 09:10:14 +0000
|
||||
Subject: [PATCH] util: make page-server IPv6 safe
|
||||
|
||||
The function run_tcp_server() was the last place CRIU was still using
|
||||
the IPv4 only function inet_ntoa(). It was only used during a print, so
|
||||
that it did not really break anything, but with this commit the output
|
||||
is now no longer:
|
||||
|
||||
Accepted connection from 0.0.0.0:58396
|
||||
|
||||
but correctly displaying the IPv6 address
|
||||
|
||||
Accepted connection from ::1:58398
|
||||
|
||||
if connecting via IPv6.
|
||||
|
||||
Signed-off-by: Adrian Reber <areber@redhat.com>
|
||||
---
|
||||
criu/util.c | 15 +++++++++++----
|
||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/criu/util.c b/criu/util.c
|
||||
index 2917102fd..822822186 100644
|
||||
--- a/criu/util.c
|
||||
+++ b/criu/util.c
|
||||
@@ -1098,7 +1098,7 @@ out:
|
||||
int run_tcp_server(bool daemon_mode, int *ask, int cfd, int sk)
|
||||
{
|
||||
int ret;
|
||||
- struct sockaddr_in caddr;
|
||||
+ struct sockaddr_storage caddr;
|
||||
socklen_t clen = sizeof(caddr);
|
||||
|
||||
if (daemon_mode) {
|
||||
@@ -1126,14 +1126,20 @@ int run_tcp_server(bool daemon_mode, int *ask, int cfd, int sk)
|
||||
return -1;
|
||||
|
||||
if (sk >= 0) {
|
||||
+ char port[6];
|
||||
+ char address[INET6_ADDRSTRLEN];
|
||||
*ask = accept(sk, (struct sockaddr *)&caddr, &clen);
|
||||
if (*ask < 0) {
|
||||
pr_perror("Can't accept connection to server");
|
||||
goto err;
|
||||
- } else
|
||||
- pr_info("Accepted connection from %s:%u\n",
|
||||
- inet_ntoa(caddr.sin_addr),
|
||||
- (int)ntohs(caddr.sin_port));
|
||||
+ }
|
||||
+ ret = getnameinfo((struct sockaddr *)&caddr, clen, address, sizeof(address), port, sizeof(port),
|
||||
+ NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
+ if (ret) {
|
||||
+ pr_err("Failed converting address: %s\n", gai_strerror(ret));
|
||||
+ goto err;
|
||||
+ }
|
||||
+ pr_info("Accepted connection from %s:%s\n", address, port);
|
||||
close(sk);
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
27
SOURCES/criu.pc.patch
Normal file
27
SOURCES/criu.pc.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 341ef149ee259d9432ea4c01507eefab2ef8b83c Mon Sep 17 00:00:00 2001
|
||||
From: Radostin Stoyanov <radostin@redhat.com>
|
||||
Date: Thu, 14 Oct 2021 12:58:56 +0100
|
||||
Subject: [PATCH] criu.pc: Add libprotobuf-c as a dependency
|
||||
|
||||
CRIU has a dependency on protobuf-c-devel. We express this dependency
|
||||
in pkgconfig to be auto-detected when building a package.
|
||||
|
||||
Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
|
||||
---
|
||||
lib/c/criu.pc.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lib/c/criu.pc.in b/lib/c/criu.pc.in
|
||||
index 33986d10d..bcced5033 100644
|
||||
--- a/lib/c/criu.pc.in
|
||||
+++ b/lib/c/criu.pc.in
|
||||
@@ -4,5 +4,6 @@ includedir=@includedir@
|
||||
Name: CRIU
|
||||
Description: RPC library for userspace checkpoint and restore
|
||||
Version: @version@
|
||||
+Requires.private: libprotobuf-c
|
||||
Libs: -L${libdir} -lcriu
|
||||
Cflags: -I${includedir}
|
||||
--
|
||||
2.31.1
|
||||
|
@ -6,14 +6,14 @@
|
||||
%global _lto_cflags %%{nil}
|
||||
|
||||
Name: criu
|
||||
Version: 3.15
|
||||
Release: 13%{?dist}
|
||||
Version: 3.17
|
||||
Release: 4%{?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: https://github.com/checkpoint-restore/criu/archive/v%{version}/criu-%{version}.tar.gz
|
||||
Source1: criu-tmpfiles.conf
|
||||
BuildRequires: gcc
|
||||
BuildRequires: systemd
|
||||
@ -27,8 +27,8 @@ BuildRequires: make
|
||||
# Checkpointing containers with a tmpfs requires tar
|
||||
Recommends: tar
|
||||
|
||||
Patch0: 0001-util-make-page-server-IPv6-safe.patch
|
||||
Patch1: 0001-Fix-building-with-annobin.patch
|
||||
Patch0: 0001-Fix-building-with-annobin.patch
|
||||
Patch1: criu.pc.patch
|
||||
|
||||
# user-space and kernel changes are only available for x86_64, arm,
|
||||
# ppc64le, aarch64 and s390x
|
||||
@ -43,6 +43,7 @@ Linux in user-space.
|
||||
%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}.
|
||||
@ -93,11 +94,17 @@ install -d -m 0755 %{buildroot}/run/%{name}/
|
||||
# remove static libs
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/*.a
|
||||
rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name}
|
||||
# remove compel man-page
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/compel.1*
|
||||
# remove amdgpu plugin man-page
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/amdgpu_plugin.1*
|
||||
# remove criu-ns
|
||||
rm $RPM_BUILD_ROOT%{_sbindir}/criu-ns
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/criu-ns.1*
|
||||
|
||||
%files
|
||||
%{_sbindir}/%{name}
|
||||
%{_mandir}/man8/criu.8*
|
||||
%{_mandir}/man1/compel.1*
|
||||
%dir /run/%{name}
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
%doc README.md COPYING
|
||||
@ -119,6 +126,17 @@ rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name}
|
||||
%doc %{_mandir}/man1/crit.1*
|
||||
|
||||
%changelog
|
||||
* Mon Jul 11 2022 Radostin Stoyanov <radostin@redhat.com> - 3.17-4
|
||||
- Rebuilt to pick up glibc rseq() changes
|
||||
|
||||
* Mon Jul 04 2022 Radostin Stoyanov <radostin@redhat.com> - 3.17-3
|
||||
- Add libprotobuf-c dependency requirement
|
||||
|
||||
* Mon May 09 2022 Adrian Reber <areber@redhat.com> - 3.17-2
|
||||
- Update to 3.17
|
||||
- Drop upstreamed patch
|
||||
- Remove compel man-page
|
||||
|
||||
* Mon Jan 31 2022 Adrian Reber <areber@redhat.com> - 3.15-13
|
||||
- Apply patch to build with annobin enabled
|
||||
- Apply patch to fix unsafe IPv6 handling
|
||||
|
Loading…
Reference in New Issue
Block a user