Accepting request 1129642 from devel:tools
OBS-URL: https://build.opensuse.org/request/show/1129642 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/criu?expand=0&rev=60
This commit is contained in:
commit
165fc4cfad
@ -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 MEMFD_CREATE \
|
SETPROCTITLE_INIT TCP_REPAIR_WINDOW MEMFD_CREATE \
|
||||||
|
8
crit.py
Normal file
8
crit.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from crit.__main__ import main
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||||
|
sys.exit(main())
|
BIN
criu-3.18.tar.gz
(Stored with Git LFS)
BIN
criu-3.18.tar.gz
(Stored with Git LFS)
Binary file not shown.
BIN
criu-3.19.tar.gz
(Stored with Git LFS)
Normal file
BIN
criu-3.19.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,28 +0,0 @@
|
|||||||
---
|
|
||||||
plugins/amdgpu/Makefile | 3 ++-
|
|
||||||
plugins/amdgpu/kfd_ioctl.h | 2 +-
|
|
||||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/plugins/amdgpu/Makefile
|
|
||||||
+++ b/plugins/amdgpu/Makefile
|
|
||||||
@@ -5,7 +5,8 @@ PLUGIN_SOBJ := amdgpu_plugin.so
|
|
||||||
PLUGIN_INCLUDE := -iquote../../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
|
|
||||||
--- 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>
|
|
||||||
|
|
||||||
/*
|
|
@ -1,56 +1,113 @@
|
|||||||
---
|
---
|
||||||
lib/Makefile | 7 ++++++-
|
crit/Makefile | 12 +-----------
|
||||||
scripts/crit-setup.py | 25 +++++++++++++++++++++++++
|
lib/Makefile | 12 +-----------
|
||||||
2 files changed, 31 insertions(+), 1 deletion(-)
|
scripts/crit-setup.py | 28 ++++++++++++++++++++++++++++
|
||||||
|
scripts/pycriu-setup.py | 28 ++++++++++++++++++++++++++++
|
||||||
|
4 files changed, 58 insertions(+), 22 deletions(-)
|
||||||
|
|
||||||
--- a/lib/Makefile
|
--- a/crit/Makefile
|
||||||
+++ b/lib/Makefile
|
+++ b/crit/Makefile
|
||||||
@@ -2,6 +2,10 @@ CRIU_SO := libcriu.so
|
@@ -10,18 +10,8 @@ ${VERSION_FILE}:
|
||||||
CRIU_A := libcriu.a
|
$(Q) echo "__version__ = '${CRIU_VERSION}'" > $@
|
||||||
UAPI_HEADERS := lib/c/criu.h images/rpc.proto images/rpc.pb-c.h criu/include/version.h
|
|
||||||
|
|
||||||
+#
|
install: ${VERSION_FILE}
|
||||||
+# File to keep track of files installed by setup.py
|
-ifeq ($(PYTHON_EXTERNALLY_MANAGED),1)
|
||||||
+CRIT_SETUP_FILES := lib/.crit-setup.files
|
-ifeq ($(PIP_BREAK_SYSTEM_PACKAGES),0)
|
||||||
+
|
- $(E) " SKIP INSTALL crit: Externally managed python environment (See PEP 668 for more information)"
|
||||||
all-y += lib-c lib-a lib-py
|
- $(E) " Consider using PIP_BREAK_SYSTEM_PACKAGES=1 make install"
|
||||||
|
-else
|
||||||
#
|
|
||||||
@@ -56,7 +60,8 @@ install: lib-c lib-a lib-py crit/crit li
|
|
||||||
$(Q) install -m 644 lib/c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
|
|
||||||
ifeq ($(PYTHON),python3)
|
|
||||||
$(E) " INSTALL " crit
|
$(E) " INSTALL " crit
|
||||||
- $(Q) $(PYTHON) -m pip install --upgrade --force-reinstall --prefix=$(DESTDIR)$(PREFIX) ./crit
|
- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./crit
|
||||||
+ # $(Q) $(PYTHON) -m pip install --upgrade --force-reinstall --prefix=$(DESTDIR)$(PREFIX) ./crit
|
-endif
|
||||||
+ $(Q) $(PYTHON) scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES)
|
-else
|
||||||
endif
|
- $(E) " INSTALL " crit
|
||||||
|
- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./crit
|
||||||
|
-endif
|
||||||
|
+ $(Q) $(PYTHON) scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX)
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
--- a/lib/Makefile
|
||||||
|
+++ b/lib/Makefile
|
||||||
|
@@ -57,18 +57,8 @@ install: lib-c lib-a lib-py lib/c/criu.p
|
||||||
|
$(Q) mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
|
||||||
|
$(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)/criu/),' lib/c/criu.pc.in > lib/c/criu.pc
|
||||||
|
$(Q) install -m 644 lib/c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
|
||||||
|
-ifeq ($(PYTHON_EXTERNALLY_MANAGED),1)
|
||||||
|
-ifeq ($(PIP_BREAK_SYSTEM_PACKAGES),0)
|
||||||
|
- $(E) " SKIP INSTALL pycriu: Externally managed python environment (See PEP 668 for more information)"
|
||||||
|
- $(E) " Consider using PIP_BREAK_SYSTEM_PACKAGES=1 make install"
|
||||||
|
-else
|
||||||
|
$(E) " INSTALL " pycriu
|
||||||
|
- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./lib
|
||||||
|
-endif
|
||||||
|
-else
|
||||||
|
- $(E) " INSTALL " pycriu
|
||||||
|
- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./lib
|
||||||
|
-endif
|
||||||
|
+ $(Q) $(PYTHON) scripts/pycriu-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX)
|
||||||
|
.PHONY: install
|
||||||
|
|
||||||
|
uninstall:
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/scripts/crit-setup.py
|
+++ b/scripts/crit-setup.py
|
||||||
@@ -0,0 +1,25 @@
|
@@ -0,0 +1,28 @@
|
||||||
+import os
|
+import os
|
||||||
+from distutils.core import setup
|
+from distutils.core import setup
|
||||||
+
|
+
|
||||||
+criu_version = "0.0.1"
|
+def get_version():
|
||||||
+env = os.environ
|
+ version = '0.0.1'
|
||||||
|
+ env = os.environ
|
||||||
|
+ if 'CRIU_VERSION_MAJOR' in env and 'CRIU_VERSION_MINOR' in env:
|
||||||
|
+ version = '{}.{}'.format(
|
||||||
|
+ env['CRIU_VERSION_MAJOR'],
|
||||||
|
+ env['CRIU_VERSION_MINOR']
|
||||||
|
+ )
|
||||||
|
+ if 'CRIU_VERSION_SUBLEVEL' in env and env['CRIU_VERSION_SUBLEVEL']:
|
||||||
|
+ version += '.' + env['CRIU_VERSION_SUBLEVEL']
|
||||||
|
+ return version
|
||||||
+
|
+
|
||||||
+if 'CRIU_VERSION_MAJOR' in env and 'CRIU_VERSION_MINOR' in env:
|
|
||||||
+ criu_version = '{}.{}'.format(
|
|
||||||
+ env['CRIU_VERSION_MAJOR'],
|
|
||||||
+ env['CRIU_VERSION_MINOR']
|
|
||||||
+ )
|
|
||||||
+
|
+
|
||||||
+ if 'CRIU_VERSION_SUBLEVEL' in env and env['CRIU_VERSION_SUBLEVEL']:
|
+setup(
|
||||||
+ criu_version += '.' + env['CRIU_VERSION_SUBLEVEL']
|
+ name='crit',
|
||||||
|
+ version=get_version(),
|
||||||
|
+ description='CRiu Image Tool',
|
||||||
|
+ author='CRIU team',
|
||||||
|
+ author_email='criu@openvz.org',
|
||||||
|
+ license='GPLv2',
|
||||||
|
+ url='https://github.com/checkpoint-restore/criu',
|
||||||
|
+ package_dir={'crit': 'crit/crit'},
|
||||||
|
+ packages=["crit"],
|
||||||
|
+ install_requires=[],
|
||||||
|
+)
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/scripts/pycriu-setup.py
|
||||||
|
@@ -0,0 +1,28 @@
|
||||||
|
+import os
|
||||||
|
+from distutils.core import setup
|
||||||
+
|
+
|
||||||
+setup(name="crit",
|
+def get_version():
|
||||||
+ version=criu_version,
|
+ version = '0.0.1'
|
||||||
+ description="CRiu Image Tool",
|
+ env = os.environ
|
||||||
+ author="CRIU team",
|
+ if 'CRIU_VERSION_MAJOR' in env and 'CRIU_VERSION_MINOR' in env:
|
||||||
+ author_email="criu@openvz.org",
|
+ version = '{}.{}'.format(
|
||||||
+ license="GPLv2",
|
+ env['CRIU_VERSION_MAJOR'],
|
||||||
+ url="https://github.com/checkpoint-restore/criu",
|
+ env['CRIU_VERSION_MINOR']
|
||||||
+ package_dir={'pycriu': 'lib/py'},
|
+ )
|
||||||
+ packages=["pycriu", "pycriu.images"],
|
+ if 'CRIU_VERSION_SUBLEVEL' in env and env['CRIU_VERSION_SUBLEVEL']:
|
||||||
+ scripts=["crit/crit"])
|
+ version += '.' + env['CRIU_VERSION_SUBLEVEL']
|
||||||
|
+ return version
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+setup(
|
||||||
|
+ name='pycriu',
|
||||||
|
+ version=get_version(),
|
||||||
|
+ description='CRiu Image Tool',
|
||||||
|
+ author='CRIU team',
|
||||||
|
+ author_email='criu@openvz.org',
|
||||||
|
+ license='GPLv2',
|
||||||
|
+ url='https://github.com/checkpoint-restore/criu',
|
||||||
|
+ package_dir={'pycriu': 'lib/pycriu'},
|
||||||
|
+ packages=["pycriu", "pycriu.images"],
|
||||||
|
+ install_requires=[],
|
||||||
|
+)
|
||||||
|
20
criu.changes
20
criu.changes
@ -1,3 +1,23 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 28 15:04:29 UTC 2023 - Takashi Iwai <tiwai@suse.com>
|
||||||
|
|
||||||
|
- Update to criu 3.19:
|
||||||
|
New features:
|
||||||
|
* LoongArch64 support
|
||||||
|
* C/R membarrier() registrations
|
||||||
|
* Restore THP_DISABLE prctl
|
||||||
|
* prctl: Migrate prctl(NO_NEW_PRIVS) setting
|
||||||
|
Bugfixes:
|
||||||
|
* Many fixes and improvements from the Google team
|
||||||
|
* Fix dumping hugetlb-based memfd on kernels < 4.16
|
||||||
|
* Fixes here and there
|
||||||
|
Improvements:
|
||||||
|
* drop python 2 support
|
||||||
|
* support XSAVE on newer Intel CPUs
|
||||||
|
- Refreshed criu-py-install-fix.diff;
|
||||||
|
workarounds appled to both crit and lib/pycriu
|
||||||
|
- Drop obsoleted patch criu-amdgpu-plugin-fix.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 6 15:31:57 UTC 2023 - Takashi Iwai <tiwai@suse.com>
|
Tue Jun 6 15:31:57 UTC 2023 - Takashi Iwai <tiwai@suse.com>
|
||||||
|
|
||||||
|
21
criu.spec
21
criu.spec
@ -33,16 +33,17 @@
|
|||||||
%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.18
|
Version: 3.19
|
||||||
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
|
||||||
Group: System/Console
|
Group: System/Console
|
||||||
URL: https://criu.org/
|
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
|
||||||
|
# To be generated; we keep a static one for building without pip
|
||||||
|
Source1: crit.py
|
||||||
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
|
Patch4: plugin-dir-path.patch
|
||||||
Patch5: criu-ns-python3-shebang.patch
|
Patch5: criu-ns-python3-shebang.patch
|
||||||
BuildRequires: libcap-devel
|
BuildRequires: libcap-devel
|
||||||
@ -120,12 +121,7 @@ This package contains all necessary include files and libraries needed
|
|||||||
to develop applications with CRIU library.
|
to develop applications with CRIU library.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
# default off
|
# default off
|
||||||
echo "BINFMT_MISC_VIRTUALIZED" > .config
|
echo "BINFMT_MISC_VIRTUALIZED" > .config
|
||||||
|
|
||||||
@ -145,6 +141,8 @@ make V=1 %{?_smp_mflags} %{?make_options} WERROR=0 \
|
|||||||
PREFIX=%{_prefix} \
|
PREFIX=%{_prefix} \
|
||||||
LIBDIR=%{_libdir} \
|
LIBDIR=%{_libdir} \
|
||||||
LIBEXECDIR=%{_libexecdir}
|
LIBEXECDIR=%{_libexecdir}
|
||||||
|
install -c -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/crit
|
||||||
|
|
||||||
# remove static libs
|
# remove static libs
|
||||||
rm -f %{buildroot}%{_libdir}/lib*.a \
|
rm -f %{buildroot}%{_libdir}/lib*.a \
|
||||||
%{buildroot}%{_libexecdir}/compel/*.a
|
%{buildroot}%{_libexecdir}/compel/*.a
|
||||||
@ -156,7 +154,7 @@ 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}
|
%if ! %{with_amdgpu_plugin}
|
||||||
rm -f %{buildroot}%{_mandir}/man1/amdgpu_plugin.1
|
rm -f %{buildroot}%{_mandir}/man1/criu-amdgpu-plugin.1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post -n libcriu2 -p /sbin/ldconfig
|
%post -n libcriu2 -p /sbin/ldconfig
|
||||||
@ -179,13 +177,14 @@ rm -f %{buildroot}%{_mandir}/man1/amdgpu_plugin.1
|
|||||||
%{_mandir}/man8/crtools.8%{?ext_man}
|
%{_mandir}/man8/crtools.8%{?ext_man}
|
||||||
%{_libexecdir}/criu
|
%{_libexecdir}/criu
|
||||||
%{_libexecdir}/compel
|
%{_libexecdir}/compel
|
||||||
%{python3_sitelib}/crit-*.egg-info
|
%{python3_sitelib}/*.egg-info
|
||||||
|
%{python3_sitelib}/crit
|
||||||
%{python3_sitelib}/pycriu
|
%{python3_sitelib}/pycriu
|
||||||
|
|
||||||
%if %{with_amdgpu_plugin}
|
%if %{with_amdgpu_plugin}
|
||||||
%files plugin-amdgpu
|
%files plugin-amdgpu
|
||||||
%doc plugins/amdgpu/README.md
|
%doc plugins/amdgpu/README.md
|
||||||
%{_mandir}/man1/amdgpu_plugin.1%{?ext_man}
|
%{_mandir}/man1/criu-amdgpu-plugin.1%{?ext_man}
|
||||||
%dir %{_libdir}/criu
|
%dir %{_libdir}/criu
|
||||||
%{_libdir}/criu/amdgpu_plugin.so
|
%{_libdir}/criu/amdgpu_plugin.so
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user