sys-process/criu: fix build failure against glibc-2.26
authorSergei Trofimovich <slyfox@gentoo.org>
Fri, 1 Sep 2017 07:35:20 +0000 (08:35 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Fri, 1 Sep 2017 07:35:31 +0000 (08:35 +0100)
Package-Manager: Portage-2.3.8, Repoman-2.3.3

sys-process/criu/criu-2.12.1.ebuild
sys-process/criu/files/criu-2.12.1-glibc-2.26.patch [new file with mode: 0644]

index fd0c92becf69cb97772391e339030b1c8608bfbc..76b63750a522eb58eb747e538bf1160151582c09 100644 (file)
@@ -43,6 +43,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-2.8-automagic-libbsd.patch
        "${FILESDIR}"/2.0/${PN}-2.0-sysroot.patch
        "${FILESDIR}"/2.3/${PN}-2.3-aarch64.patch
+       "${FILESDIR}"/${PN}-2.12.1-glibc-2.26.patch
 )
 
 criu_arch() {
diff --git a/sys-process/criu/files/criu-2.12.1-glibc-2.26.patch b/sys-process/criu/files/criu-2.12.1-glibc-2.26.patch
new file mode 100644 (file)
index 0000000..d378cc8
--- /dev/null
@@ -0,0 +1,49 @@
+From d77d8cc402e597bb38edfb4e81db89fd7d96d0b6 Mon Sep 17 00:00:00 2001
+From: Adrian Reber <areber@redhat.com>
+Date: Thu, 29 Jun 2017 14:19:32 +0000
+Subject: [PATCH] fix building with newer glibc
+
+Newer glibc releases have removed SIGUNUSED from bits/signum.h which
+breaks building criu on those systems:
+
+https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8082d91e1c449e0cb137468b731004a5e605c8c6
+
+SIGSYS returns the same value as SIGUNUSED and testing has shown
+that criu still successfully completes zdtm with this patch.
+
+Signed-off-by: Adrian Reber <areber@redhat.com>
+Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
+Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
+---
+ criu/cr-restore.c            | 1 -
+ test/zdtm/static/pthread01.c | 2 +-
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/criu/cr-restore.c b/criu/cr-restore.c
+index e8fb4adf..6ba50f18 100644
+--- a/criu/cr-restore.c
++++ b/criu/cr-restore.c
+@@ -880,7 +880,6 @@ static void zombie_prepare_signals(void)
+               (1 << SIGPOLL)  |\
+               (1 << SIGIO)    |\
+               (1 << SIGSYS)   |\
+-              (1 << SIGUNUSED)|\
+               (1 << SIGSTKFLT)|\
+               (1 << SIGPWR)    \
+       )
+diff --git a/test/zdtm/static/pthread01.c b/test/zdtm/static/pthread01.c
+index 52f849c0..2520fcfe 100644
+--- a/test/zdtm/static/pthread01.c
++++ b/test/zdtm/static/pthread01.c
+@@ -43,7 +43,7 @@ static char *decode_signal(const sigset_t *s, char *buf)
+       COLLECT(SIGTERM); COLLECT(SIGSTKFLT); COLLECT(SIGCHLD); COLLECT(SIGCONT); COLLECT(SIGSTOP);
+       COLLECT(SIGTSTP); COLLECT(SIGTTIN); COLLECT(SIGTTOU); COLLECT(SIGURG); COLLECT(SIGXCPU);
+       COLLECT(SIGXFSZ); COLLECT(SIGVTALRM); COLLECT(SIGPROF); COLLECT(SIGWINCH); COLLECT(SIGIO);
+-      COLLECT(SIGPOLL); COLLECT(SIGPWR); COLLECT(SIGSYS); COLLECT(SIGUNUSED);
++      COLLECT(SIGPOLL); COLLECT(SIGPWR); COLLECT(SIGSYS);
+ #undef COLLECT
+ 
+       return buf;
+-- 
+2.14.1
+