Accepting request 977879 from home:tiwai:branches:devel:tools
- Update to criu 3.17: New features: * Introduced mount-v2 engine * Added support for MAP_HUGETLB mappings * Added support for Linux Restartable Sequences * Added support for SOCK_SEQPACKET unix sockets * CRIU AMD GPU plugin Bugfixes: * GCC 12 compatibility fixes * cgroup: fix --manage-cgroups=ignore * several memory leaks fixed in net, files, mount, tun and config subsystems * Improvements: * bpf: switch from deprecated bpf_create_map_xattr to bpf_map_create * bpfmap: handle map_extra field * setsockopt(SO_BUF_LOCK) support for tcp sockets - New criu-plugin-amdgpu sub-package for AMDGPU ROCm plugin, enabled only for x86_64 and aarch64. - Build fixes for plugins: criu-amdgpu-plugin-fix.patch - Change the plugin install path to $libdir/criu: plugin-dir-path.patch OBS-URL: https://build.opensuse.org/request/show/977879 OBS-URL: https://build.opensuse.org/package/show/devel:tools/criu?expand=0&rev=109
This commit is contained in:
parent
f3a23015e4
commit
fd3d011d18
@ -12,7 +12,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|||||||
|
|
||||||
--- a/Makefile.config
|
--- a/Makefile.config
|
||||||
+++ b/Makefile.config
|
+++ b/Makefile.config
|
||||||
@@ -30,13 +30,16 @@ else
|
@@ -38,13 +38,16 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(call pkg-config-check,libnftables),y)
|
ifeq ($(call pkg-config-check,libnftables),y)
|
||||||
@ -31,7 +31,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|||||||
else
|
else
|
||||||
$(warning Warn: you have libnftables installed but it has incompatible API)
|
$(warning Warn: you have libnftables installed but it has incompatible API)
|
||||||
$(warning Warn: Building without nftables support)
|
$(warning Warn: Building without nftables support)
|
||||||
@@ -67,7 +70,7 @@ endif
|
@@ -75,7 +78,7 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export DEFINES += $(FEATURE_DEFINES)
|
export DEFINES += $(FEATURE_DEFINES)
|
||||||
@ -39,4 +39,4 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|||||||
+export CFLAGS += $(FEATURE_DEFINES) $(FEATURE_CFLAGS)
|
+export CFLAGS += $(FEATURE_DEFINES) $(FEATURE_CFLAGS)
|
||||||
|
|
||||||
FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \
|
FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \
|
||||||
SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW FSCONFIG MEMFD_CREATE
|
SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW FSCONFIG MEMFD_CREATE OPENAT2
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:13d6e2f99a34abf83ec2b9777af5bd069e739bf38582857c7f4c19a355a2b0b5
|
|
||||||
size 1228535
|
|
3
criu-3.17.tar.gz
Normal file
3
criu-3.17.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:79744c938e33032951a41af45724be7ee9004445be8b4e4f3c59e0f7438168e7
|
||||||
|
size 1321713
|
48
criu-amdgpu-plugin-fix.patch
Normal file
48
criu-amdgpu-plugin-fix.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
plugins/amdgpu/Makefile | 9 +++++----
|
||||||
|
plugins/amdgpu/kfd_ioctl.h | 2 +-
|
||||||
|
2 files changed, 6 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
--- a/plugins/amdgpu/Makefile
|
||||||
|
+++ b/plugins/amdgpu/Makefile
|
||||||
|
@@ -5,7 +5,8 @@ PLUGIN_SOBJ := amdgpu_plugin.so
|
||||||
|
PLUGIN_INCLUDE := -iquote../../../criu/include
|
||||||
|
PLUGIN_INCLUDE += -iquote../../criu/include
|
||||||
|
PLUGIN_INCLUDE += -iquote../../criu/arch/$(ARCH)/include/
|
||||||
|
-PLUGIN_INCLUDE += -iquote../../
|
||||||
|
+PLUGIN_INCLUDE += -iquote../../include
|
||||||
|
+PLUGIN_INCLUDE += -iquote../..
|
||||||
|
|
||||||
|
COMPEL := ../../compel/compel-host
|
||||||
|
LIBDRM_INC := -I/usr/include/libdrm
|
||||||
|
@@ -50,16 +51,16 @@ clean: amdgpu_plugin_clean amdgpu_plugin
|
||||||
|
mrproper: clean
|
||||||
|
|
||||||
|
install:
|
||||||
|
- $(Q) mkdir -p $(PLUGINDIR)
|
||||||
|
+ $(Q) mkdir -p $(DESTDIR)$(PLUGINDIR)
|
||||||
|
ifeq ($(CONFIG_AMDGPU),y)
|
||||||
|
$(E) " INSTALL " $(PLUGIN_NAME)
|
||||||
|
- $(Q) install -m 644 $(PLUGIN_SOBJ) $(PLUGINDIR)
|
||||||
|
+ $(Q) install -m 644 $(PLUGIN_SOBJ) $(DESTDIR)$(PLUGINDIR)
|
||||||
|
endif
|
||||||
|
.PHONY: install
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
ifeq ($(CONFIG_AMDGPU),y)
|
||||||
|
$(E) " UNINSTALL" $(PLUGIN_NAME)
|
||||||
|
- $(Q) $(RM) $(PLUGINDIR)/$(PLUGIN_SOBJ)
|
||||||
|
+ $(Q) $(RM) $(DESTDIR)$(PLUGINDIR)/$(PLUGIN_SOBJ)
|
||||||
|
endif
|
||||||
|
.PHONY: uninstall
|
||||||
|
--- a/plugins/amdgpu/kfd_ioctl.h
|
||||||
|
+++ b/plugins/amdgpu/kfd_ioctl.h
|
||||||
|
@@ -23,7 +23,7 @@
|
||||||
|
#ifndef KFD_IOCTL_H_INCLUDED
|
||||||
|
#define KFD_IOCTL_H_INCLUDED
|
||||||
|
|
||||||
|
-#include <drm/drm.h>
|
||||||
|
+#include <libdrm/drm.h>
|
||||||
|
#include <linux/ioctl.h>
|
||||||
|
|
||||||
|
/*
|
26
criu.changes
26
criu.changes
@ -1,3 +1,29 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 18 07:01:20 UTC 2022 - Takashi Iwai <tiwai@suse.com>
|
||||||
|
|
||||||
|
- Update to criu 3.17:
|
||||||
|
New features:
|
||||||
|
* Introduced mount-v2 engine
|
||||||
|
* Added support for MAP_HUGETLB mappings
|
||||||
|
* Added support for Linux Restartable Sequences
|
||||||
|
* Added support for SOCK_SEQPACKET unix sockets
|
||||||
|
* CRIU AMD GPU plugin
|
||||||
|
Bugfixes:
|
||||||
|
* GCC 12 compatibility fixes
|
||||||
|
* cgroup: fix --manage-cgroups=ignore
|
||||||
|
* several memory leaks fixed in net, files, mount, tun and config
|
||||||
|
subsystems
|
||||||
|
* Improvements:
|
||||||
|
* bpf: switch from deprecated bpf_create_map_xattr to bpf_map_create
|
||||||
|
* bpfmap: handle map_extra field
|
||||||
|
* setsockopt(SO_BUF_LOCK) support for tcp sockets
|
||||||
|
- New criu-plugin-amdgpu sub-package for AMDGPU ROCm plugin, enabled
|
||||||
|
only for x86_64 and aarch64.
|
||||||
|
- Build fixes for plugins:
|
||||||
|
criu-amdgpu-plugin-fix.patch
|
||||||
|
- Change the plugin install path to $libdir/criu:
|
||||||
|
plugin-dir-path.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Dec 15 08:29:36 CET 2021 - tiwai@suse.de
|
Wed Dec 15 08:29:36 CET 2021 - tiwai@suse.de
|
||||||
|
|
||||||
|
45
criu.spec
45
criu.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package criu
|
# spec file for package criu
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -25,10 +25,16 @@
|
|||||||
%define _lto_cflags %{nil}
|
%define _lto_cflags %{nil}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%ifarch x86_64 aarch64
|
||||||
|
%define with_amdgpu_plugin 1
|
||||||
|
%else
|
||||||
|
%define with_amdgpu_plugin 0
|
||||||
|
%endif
|
||||||
|
|
||||||
%define proto_c_ver %(protoc-c --version | head -1 | awk '{print $2}')
|
%define proto_c_ver %(protoc-c --version | head -1 | awk '{print $2}')
|
||||||
|
|
||||||
Name: criu
|
Name: criu
|
||||||
Version: 3.16.1
|
Version: 3.17
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Checkpoint/Restore In Userspace Tools
|
Summary: Checkpoint/Restore In Userspace Tools
|
||||||
License: GPL-2.0-only
|
License: GPL-2.0-only
|
||||||
@ -37,7 +43,12 @@ URL: https://criu.org/
|
|||||||
Source0: http://github.com/checkpoint-restore/criu/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: http://github.com/checkpoint-restore/criu/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
Patch1: criu-py-install-fix.diff
|
Patch1: criu-py-install-fix.diff
|
||||||
Patch2: 0002-Fix-build-with-nftables-installed-in-different-direc.patch
|
Patch2: 0002-Fix-build-with-nftables-installed-in-different-direc.patch
|
||||||
|
Patch3: criu-amdgpu-plugin-fix.patch
|
||||||
|
Patch4: plugin-dir-path.patch
|
||||||
BuildRequires: libcap-devel
|
BuildRequires: libcap-devel
|
||||||
|
%if %{with_amdgpu_plugin}
|
||||||
|
BuildRequires: libdrm-devel
|
||||||
|
%endif
|
||||||
BuildRequires: libgnutls-devel
|
BuildRequires: libgnutls-devel
|
||||||
BuildRequires: libnet-devel
|
BuildRequires: libnet-devel
|
||||||
BuildRequires: libnl3-devel
|
BuildRequires: libnl3-devel
|
||||||
@ -68,6 +79,17 @@ operating system. Using this tool, you can freeze a running application
|
|||||||
files. You can then use the files to restore and run the application from
|
files. You can then use the files to restore and run the application from
|
||||||
the point it was frozen at.
|
the point it was frozen at.
|
||||||
|
|
||||||
|
%if %{with_amdgpu_plugin}
|
||||||
|
%package plugin-amdgpu
|
||||||
|
Summary: AMDGPU plugin for CRIU
|
||||||
|
License: GPL-2.0-only
|
||||||
|
Group: System/Console
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
|
%description plugin-amdgpu
|
||||||
|
This package contains the AMDGPU ROCm support plugin for CRIU.
|
||||||
|
%endif
|
||||||
|
|
||||||
%package -n libcriu2
|
%package -n libcriu2
|
||||||
Summary: Library for CRIU
|
Summary: Library for CRIU
|
||||||
License: LGPL-2.1-only
|
License: LGPL-2.1-only
|
||||||
@ -101,6 +123,8 @@ to develop applications with CRIU library.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
# default off
|
# default off
|
||||||
echo "BINFMT_MISC_VIRTUALIZED" > .config
|
echo "BINFMT_MISC_VIRTUALIZED" > .config
|
||||||
|
|
||||||
@ -111,7 +135,10 @@ export CFLAGS="%{optflags}"
|
|||||||
export CFLAGS="$CFLAGS -Wno-error=deprecated"
|
export CFLAGS="$CFLAGS -Wno-error=deprecated"
|
||||||
%endif
|
%endif
|
||||||
# WERROR=0 is needed for avoiding warning due to doubly _GNU_SOURCE defines
|
# WERROR=0 is needed for avoiding warning due to doubly _GNU_SOURCE defines
|
||||||
make V=1 %{?_smp_mflags} %{?make_options} WERROR=0
|
make V=1 %{?_smp_mflags} %{?make_options} WERROR=0 \
|
||||||
|
PREFIX=%{_prefix} \
|
||||||
|
LIBDIR=%{_libdir} \
|
||||||
|
LIBEXECDIR=%{_libexecdir}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install V=1 %{?make_options} WERROR=0 \
|
%make_install V=1 %{?make_options} WERROR=0 \
|
||||||
@ -128,6 +155,10 @@ rm -f %{buildroot}%{_includedir}/compel/plugins/std/asm/.gitignore
|
|||||||
ln -s criu %{buildroot}%{_sbindir}/crtools
|
ln -s criu %{buildroot}%{_sbindir}/crtools
|
||||||
ln -s criu.8 %{buildroot}%{_mandir}/man8/crtools.8
|
ln -s criu.8 %{buildroot}%{_mandir}/man8/crtools.8
|
||||||
|
|
||||||
|
%if ! %{with_amdgpu_plugin}
|
||||||
|
rm -f %{buildroot}%{_mandir}/man1/amdgpu_plugin.1
|
||||||
|
%endif
|
||||||
|
|
||||||
%post -n libcriu2 -p /sbin/ldconfig
|
%post -n libcriu2 -p /sbin/ldconfig
|
||||||
%postun -n libcriu2 -p /sbin/ldconfig
|
%postun -n libcriu2 -p /sbin/ldconfig
|
||||||
%post -n libcompel1 -p /sbin/ldconfig
|
%post -n libcompel1 -p /sbin/ldconfig
|
||||||
@ -151,6 +182,14 @@ ln -s criu.8 %{buildroot}%{_mandir}/man8/crtools.8
|
|||||||
%{python3_sitelib}/crit-*.egg-info
|
%{python3_sitelib}/crit-*.egg-info
|
||||||
%{python3_sitelib}/pycriu
|
%{python3_sitelib}/pycriu
|
||||||
|
|
||||||
|
%if %{with_amdgpu_plugin}
|
||||||
|
%files plugin-amdgpu
|
||||||
|
%doc plugins/amdgpu/README.md
|
||||||
|
%{_mandir}/man1/amdgpu_plugin.1%{?ext_man}
|
||||||
|
%dir %{_libdir}/criu
|
||||||
|
%{_libdir}/criu/amdgpu_plugin.so
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n libcriu2
|
%files -n libcriu2
|
||||||
%{_libdir}/libcriu.so.*
|
%{_libdir}/libcriu.so.*
|
||||||
|
|
||||||
|
43
plugin-dir-path.patch
Normal file
43
plugin-dir-path.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
Makefile.install | 3 ++-
|
||||||
|
criu/Makefile | 3 +++
|
||||||
|
criu/include/plugin.h | 2 +-
|
||||||
|
3 files changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/Makefile.install
|
||||||
|
+++ b/Makefile.install
|
||||||
|
@@ -5,9 +5,10 @@ BINDIR ?= $(PREFIX)/bin
|
||||||
|
SBINDIR ?= $(PREFIX)/sbin
|
||||||
|
MANDIR ?= $(PREFIX)/share/man
|
||||||
|
INCLUDEDIR ?= $(PREFIX)/include
|
||||||
|
+LIBDIR ?= $(PREFIX)/lib
|
||||||
|
LIBEXECDIR ?= $(PREFIX)/libexec
|
||||||
|
RUNDIR ?= /run
|
||||||
|
-PLUGINDIR ?= /var/lib/criu
|
||||||
|
+PLUGINDIR ?= $(LIBDIR)/criu
|
||||||
|
|
||||||
|
#
|
||||||
|
# For recent Debian/Ubuntu with multiarch support.
|
||||||
|
--- a/criu/include/plugin.h
|
||||||
|
+++ b/criu/include/plugin.h
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
#include "common/compiler.h"
|
||||||
|
#include "common/list.h"
|
||||||
|
|
||||||
|
-#define CR_PLUGIN_DEFAULT "/var/lib/criu/"
|
||||||
|
+#define CR_PLUGIN_DEFAULT LIBDIR "/criu/"
|
||||||
|
|
||||||
|
void cr_plugin_fini(int stage, int err);
|
||||||
|
int cr_plugin_init(int stage);
|
||||||
|
--- a/criu/Makefile
|
||||||
|
+++ b/criu/Makefile
|
||||||
|
@@ -29,6 +29,9 @@ CFLAGS += -iquote $(ARCH_DIR)/include
|
||||||
|
CFLAGS += -iquote .
|
||||||
|
CFLAGS += $(shell $(PKG_CONFIG) --cflags libnl-3.0)
|
||||||
|
CFLAGS += $(CONFIG-DEFINES)
|
||||||
|
+CFLAGS += -DINCLUDEDIR=\"$(INCLUDEDIR)\"
|
||||||
|
+CFLAGS += -DLIBEXECDIR=\"$(LIBEXECDIR)\"
|
||||||
|
+CFLAGS += -DLIBDIR=\"$(LIBDIR)\"
|
||||||
|
|
||||||
|
ifeq ($(GMON),1)
|
||||||
|
CFLAGS += -pg
|
Loading…
x
Reference in New Issue
Block a user