Added patches to handle changes in glibc

This commit is contained in:
Adrian Reber 2017-07-20 18:11:12 +02:00
parent 8b3fd53fea
commit 5be39b437d
3 changed files with 101 additions and 1 deletions

View File

@ -0,0 +1,35 @@
From b0de9a656116e8f596c1c6d7f9bb4038eee6fb6b Mon Sep 17 00:00:00 2001
From: Adrian Reber <areber@redhat.com>
Date: Thu, 20 Jul 2017 02:57:08 -0400
Subject: [PATCH 1/4] compel/aarch64: glibc renamed ucontext to ucontext_t
The upcoming glibc release renamed 'struct ucontext' to
'struct ucontext_t':
https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=251287734e89a52da3db682a8241eb6bccc050c9;hp=c86ed71d633c22d6f638576f7660c52a5f783d66
Instead of using 'struct ucontext' this patch changes it
to the typedef ucontext_t which already exists in older and
new versions of glibc.
Signed-off-by: Adrian Reber <areber@redhat.com>
---
compel/arch/aarch64/src/lib/include/uapi/asm/sigframe.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compel/arch/aarch64/src/lib/include/uapi/asm/sigframe.h b/compel/arch/aarch64/src/lib/include/uapi/asm/sigframe.h
index c890d103..22246b8f 100644
--- a/compel/arch/aarch64/src/lib/include/uapi/asm/sigframe.h
+++ b/compel/arch/aarch64/src/lib/include/uapi/asm/sigframe.h
@@ -27,7 +27,7 @@ struct aux_context {
struct rt_sigframe {
siginfo_t info;
- struct ucontext uc;
+ ucontext_t uc;
uint64_t fp;
uint64_t lr;
};
--
2.13.2

View File

@ -0,0 +1,56 @@
From a2bac7a99fd62c8f7f2fae6d7d85677c5e1607c7 Mon Sep 17 00:00:00 2001
From: Adrian Reber <areber@redhat.com>
Date: Thu, 20 Jul 2017 11:33:48 -0400
Subject: [PATCH 3/4] compel/ppc64: glibc renamed ucontext to ucontext_t
The upcoming glibc release renamed 'struct ucontext' to
'struct ucontext_t':
https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=251287734e89a52da3db682a8241eb6bccc050c9;hp=c86ed71d633c22d6f638576f7660c52a5f783d66
Instead of using 'struct ucontext' this patch changes it
to the typedef ucontext_t which already exists in older and
new versions of glibc.
Signed-off-by: Adrian Reber <areber@redhat.com>
---
compel/arch/ppc64/src/lib/include/uapi/asm/sigframe.h | 6 +++---
criu/arch/ppc64/crtools.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/compel/arch/ppc64/src/lib/include/uapi/asm/sigframe.h b/compel/arch/ppc64/src/lib/include/uapi/asm/sigframe.h
index bfaee878..6f8b6ec5 100644
--- a/compel/arch/ppc64/src/lib/include/uapi/asm/sigframe.h
+++ b/compel/arch/ppc64/src/lib/include/uapi/asm/sigframe.h
@@ -28,12 +28,12 @@
#define TRAMP_SIZE 6
/*
- * ucontext defined in /usr/include/powerpc64le-linux-gnu/sys/ucontext.h
+ * ucontext_t defined in /usr/include/powerpc64le-linux-gnu/sys/ucontext.h
*/
struct rt_sigframe {
/* sys_rt_sigreturn requires the ucontext be the first field */
- struct ucontext uc;
- struct ucontext uc_transact; /* Transactional state */
+ ucontext_t uc;
+ ucontext_t uc_transact; /* Transactional state */
unsigned long _unused[2];
unsigned int tramp[TRAMP_SIZE];
struct rt_siginfo *pinfo;
diff --git a/criu/arch/ppc64/crtools.c b/criu/arch/ppc64/crtools.c
index ecda5ce9..5a5966ad 100644
--- a/criu/arch/ppc64/crtools.c
+++ b/criu/arch/ppc64/crtools.c
@@ -259,7 +259,7 @@ static int put_tm_regs(struct rt_sigframe *f, UserPpc64TmRegsEntry *tme)
* For the case of getting a signal and simply returning from it,
* we don't need to re-copy them here.
*/
- struct ucontext *tm_uc = &f->uc_transact;
+ ucontext_t *tm_uc = &f->uc_transact;
pr_debug("Restoring TM registers FP:%d VR:%d VSX:%d\n",
!!(tme->fpstate), !!(tme->vrstate), !!(tme->vsxstate));
--
2.13.2

View File

@ -1,6 +1,6 @@
Name: criu
Version: 3.3
Release: 1%{?dist}
Release: 2%{?dist}
Provides: crtools = %{version}-%{release}
Obsoletes: crtools <= 1.0-2
Summary: Tool for Checkpoint/Restore in User-space
@ -9,6 +9,10 @@ License: GPLv2
URL: http://criu.org/
Source0: http://download.openvz.org/criu/criu-%{version}.tar.bz2
# Patches are submitted upstream
Patch0: 0001-compel-aarch64-glibc-renamed-ucontext-to-ucontext_t.patch
Patch1: 0003-compel-ppc64-glibc-renamed-ucontext-to-ucontext_t.patch
%if 0%{?rhel}
# RHEL has no asciidoc; take man-page from Fedora 24
# zcat /usr/share/man/man8/criu.8.gz > criu.8
@ -71,6 +75,8 @@ their content in human-readable form.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
# %{?_smp_mflags} does not work
@ -135,6 +141,9 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig
%changelog
* Thu Jul 20 2017 Adrian Reber <adrian@lisas.de> - 3.3-2
- Added patches to handle changes in glibc
* Wed Jul 19 2017 Adrian Reber <adrian@lisas.de> - 3.3-1
- Update to 3.3