criu: update to 3.17.1.

This commit is contained in:
classabbyamp 2022-08-22 15:38:57 -04:00 committed by classabbyamp
parent 9b88f1b935
commit d8277dc07d
3 changed files with 59 additions and 32 deletions

View File

@ -11,7 +11,7 @@ Get rid of some header conflicts and glibc specific things.
#include <stdbool.h>
#include <signal.h>
#include <stdint.h>
@@ -55,8 +57,8 @@ typedef struct {
@@ -55,8 +57,8 @@
#define MSR_TM_ACTIVE(x) ((((x)&MSR_TM) && ((x) & (MSR_TMA | MSR_TMS))) != 0)
typedef struct {
@ -22,7 +22,7 @@ Get rid of some header conflicts and glibc specific things.
uint64_t vsxregs[NVSXREG];
int flags;
@@ -66,8 +68,8 @@ typedef struct {
@@ -66,8 +68,8 @@
uint64_t tfhar, texasr, tfiar;
} tm_spr_regs;
user_regs_struct_t regs;
@ -43,7 +43,7 @@ Get rid of some header conflicts and glibc specific things.
#include <sys/mman.h>
#include <stdint.h>
#include <errno.h>
@@ -57,15 +56,15 @@ static void put_fpu_regs(mcontext_t *mc, uint64_t *fpregs)
@@ -57,15 +56,15 @@
{
uint64_t *mcfp = (uint64_t *)mc->fp_regs;
@ -72,7 +72,7 @@ Get rid of some header conflicts and glibc specific things.
#include <asm/unistd.h>
#include <sys/uio.h>
@@ -33,7 +32,7 @@ static UserPpc64FpstateEntry *copy_fp_regs(uint64_t *fpregs)
@@ -33,7 +32,7 @@
return NULL;
user_ppc64_fpstate_entry__init(fpe);
@ -81,7 +81,7 @@ Get rid of some header conflicts and glibc specific things.
fpe->fpregs = xmalloc(fpe->n_fpregs * sizeof(fpe->fpregs[0]));
if (!fpe->fpregs) {
xfree(fpe);
@@ -41,7 +40,7 @@ static UserPpc64FpstateEntry *copy_fp_regs(uint64_t *fpregs)
@@ -41,7 +40,7 @@
}
/* FPSRC is the last (33th) register in the set */
@ -90,7 +90,7 @@ Get rid of some header conflicts and glibc specific things.
fpe->fpregs[i] = fpregs[i];
return fpe;
@@ -69,7 +68,7 @@ static UserPpc64VrstateEntry *copy_altivec_regs(__vector128 *vrregs)
@@ -69,7 +68,7 @@
user_ppc64_vrstate_entry__init(vse);
/* protocol buffer store only 64bit entries and we need 128bit */
@ -99,7 +99,7 @@ Get rid of some header conflicts and glibc specific things.
vse->vrregs = xmalloc(vse->n_vrregs * sizeof(vse->vrregs[0]));
if (!vse->vrregs) {
xfree(vse);
@@ -77,13 +76,13 @@ static UserPpc64VrstateEntry *copy_altivec_regs(__vector128 *vrregs)
@@ -77,13 +76,13 @@
}
/* Vectors are 2*64bits entries */
@ -115,7 +115,7 @@ Get rid of some header conflicts and glibc specific things.
vse->vrsave = *p32;
return vse;
@@ -95,7 +94,7 @@ static int put_altivec_regs(mcontext_t *mc, UserPpc64VrstateEntry *vse)
@@ -95,7 +94,7 @@
pr_debug("Restoring Altivec registers\n");
@ -124,12 +124,12 @@ Get rid of some header conflicts and glibc specific things.
pr_err("Corrupted Altivec dump data\n");
return -1;
}
@@ -104,7 +103,7 @@ static int put_altivec_regs(mcontext_t *mc, UserPpc64VrstateEntry *vse)
@@ -103,7 +102,7 @@
/* Note that this should only be done in the case MSR_VEC is set but
* this is not a big deal to do that in all cases.
*/
memcpy(&v_regs->vrregs[0][0], vse->vrregs,
- sizeof(uint64_t) * 2 * (NVRREG-1));
+ sizeof(uint64_t) * 2 * (ELF_NVRREG-1));
- memcpy(&v_regs->vrregs[0][0], vse->vrregs, sizeof(uint64_t) * 2 * (NVRREG - 1));
+ memcpy(&v_regs->vrregs[0][0], vse->vrregs, sizeof(uint64_t) * 2 * (ELF_NVRREG - 1));
/* vscr has been restored with the previous memcpy which copied 32
* 128bits registers + a 128bits field containing the vscr value in
* the low part.

View File

@ -0,0 +1,29 @@
--- /dev/null
+++ b/include/signal_compat.h
@@ -0,0 +1,4 @@
+#define SIGEV_SIGNAL 0 /* notify via signal */
+#define SIGEV_NONE 1 /* other notification: meaningless */
+#define SIGEV_THREAD 2 /* deliver via thread creation */
+#define SIGEV_THREAD_ID 4 /* deliver to thread */
--- a/criu/pie/restorer.c
+++ b/criu/pie/restorer.c
@@ -50,6 +50,10 @@
#include "shmem.h"
#include "restorer.h"
+#ifndef __GLIBC__
+#include "signal_compat.h"
+#endif
+
#ifndef PR_SET_PDEATHSIG
#define PR_SET_PDEATHSIG 1
#endif
@@ -1067,7 +1071,7 @@
#ifdef __GLIBC__
sev._sigev_un._tid = args->posix_timers[i].spt.notify_thread_id;
#else
- sev.sigev_notify_thread_id = args->posix_timers[i].spt.notify_thread_id;
+ sev.sigev_notify_function = args->posix_timers[i].spt.notify_thread_id;
#endif
sev.sigev_value.sival_ptr = args->posix_timers[i].spt.sival_ptr;

View File

@ -1,13 +1,14 @@
# Template file for 'criu'
pkgname=criu
version=3.14
revision=4
version=3.17.1
revision=1
# i686 unsupported upstream: https://criu.org/32bit_tasks_C/R#Compatible_applications
# ppc64 big endian not supported upstream
archs="x86_64* aarch64* ppc64le* armv7l*"
build_style=gnu-makefile
make_use_env=compliant
make_build_args="WERROR=0"
make_install_args="LOGROTATEDIR=/etc/logrotate.d LIBDIR=/usr/lib SBINDIR=/usr/bin"
hostmakedepends="asciidoc pkg-config xmlto protobuf which"
makedepends="libcap-devel libnet-devel libnl3-devel protobuf-c-devel
protobuf-devel"
@ -15,14 +16,11 @@ short_desc="Utility to checkpoint/restore a process tree"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.1-only"
homepage="http://criu.org/"
distfiles="https://download.openvz.org/criu/criu-${version}.tar.bz2"
checksum=f63f30188b84e9a611429f732381f27e37c60cde0afc9821600f8597d21e39cb
distfiles="https://github.com/checkpoint-restore/criu/archive/refs/tags/v${version}.tar.gz"
checksum=f90fe2323ed1b84f273dc41dde1a38dd424157a57f713d1ba39094e70f90eca6
nocross="fails to run protobuf internals"
do_install() {
make DESTDIR=${DESTDIR} PREFIX=/usr LOGROTATEDIR=/etc/logrotate.d \
LIBDIR=/usr/lib SBINDIR=/usr/bin install
rm -rf ${DESTDIR}/usr/lib/systemd
post_install() {
vsv criu
}