From 478e42f1a85dbc6e4e7ff45fb7e46afbf161a8b7 Mon Sep 17 00:00:00 2001 From: Bernhard M. Wiedemann Date: Jan 17 2024 16:48:41 +0000 Subject: update --- diff --git a/.files b/.files index 14784f3..ee66d2f 100644 Binary files a/.files and b/.files differ diff --git a/.rev b/.rev index db15705..b0d0493 100644 --- a/.rev +++ b/.rev @@ -527,4 +527,12 @@ 1091124 + + 1c1c182a96e24d5deaa1b9c55f5bd1fa + 3.19 + + anag+factory + + 1129642 + diff --git a/0002-Fix-build-with-nftables-installed-in-different-direc.patch b/0002-Fix-build-with-nftables-installed-in-different-direc.patch index 590ed6f..8c3ce18 100644 --- a/0002-Fix-build-with-nftables-installed-in-different-direc.patch +++ b/0002-Fix-build-with-nftables-installed-in-different-direc.patch @@ -39,4 +39,4 @@ Signed-off-by: Takashi Iwai +export CFLAGS += $(FEATURE_DEFINES) $(FEATURE_CFLAGS) FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \ - SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW MEMFD_CREATE \ + SETPROCTITLE_INIT TCP_REPAIR_WINDOW MEMFD_CREATE \ diff --git a/crit.py b/crit.py new file mode 100644 index 0000000..54c8f77 --- /dev/null +++ b/crit.py @@ -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()) diff --git a/criu-3.18.tar.gz b/criu-3.18.tar.gz deleted file mode 120000 index b8011d1..0000000 --- a/criu-3.18.tar.gz +++ /dev/null @@ -1 +0,0 @@ -/ipfs/bafybeiexhyb6xemwxhzzldieouiaf7uypg3y4iprrmdxqa7i5nuon5ezri \ No newline at end of file diff --git a/criu-3.19.tar.gz b/criu-3.19.tar.gz new file mode 120000 index 0000000..47d2add --- /dev/null +++ b/criu-3.19.tar.gz @@ -0,0 +1 @@ +/ipfs/bafybeid4zmt3geybsorql542lm54zaxofjmlpta4ntl3dxfb544shardne \ No newline at end of file diff --git a/criu-amdgpu-plugin-fix.patch b/criu-amdgpu-plugin-fix.patch deleted file mode 100644 index 53457a3..0000000 --- a/criu-amdgpu-plugin-fix.patch +++ /dev/null @@ -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 -+#include - #include - - /* diff --git a/criu-py-install-fix.diff b/criu-py-install-fix.diff index 1c3c243..a8cf992 100644 --- a/criu-py-install-fix.diff +++ b/criu-py-install-fix.diff @@ -1,56 +1,113 @@ --- - lib/Makefile | 7 ++++++- - scripts/crit-setup.py | 25 +++++++++++++++++++++++++ - 2 files changed, 31 insertions(+), 1 deletion(-) + crit/Makefile | 12 +----------- + lib/Makefile | 12 +----------- + scripts/crit-setup.py | 28 ++++++++++++++++++++++++++++ + scripts/pycriu-setup.py | 28 ++++++++++++++++++++++++++++ + 4 files changed, 58 insertions(+), 22 deletions(-) ---- a/lib/Makefile -+++ b/lib/Makefile -@@ -2,6 +2,10 @@ CRIU_SO := libcriu.so - CRIU_A := libcriu.a - UAPI_HEADERS := lib/c/criu.h images/rpc.proto images/rpc.pb-c.h criu/include/version.h +--- a/crit/Makefile ++++ b/crit/Makefile +@@ -10,18 +10,8 @@ ${VERSION_FILE}: + $(Q) echo "__version__ = '${CRIU_VERSION}'" > $@ -+# -+# File to keep track of files installed by setup.py -+CRIT_SETUP_FILES := lib/.crit-setup.files -+ - all-y += lib-c lib-a lib-py + install: ${VERSION_FILE} +-ifeq ($(PYTHON_EXTERNALLY_MANAGED),1) +-ifeq ($(PIP_BREAK_SYSTEM_PACKAGES),0) +- $(E) " SKIP INSTALL crit: Externally managed python environment (See PEP 668 for more information)" +- $(E) " Consider using PIP_BREAK_SYSTEM_PACKAGES=1 make install" +-else + $(E) " INSTALL " crit +- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./crit +-endif +-else +- $(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 - # -@@ -56,7 +60,8 @@ install: lib-c lib-a lib-py crit/crit li + 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),python3) - $(E) " INSTALL " crit -- $(Q) $(PYTHON) -m pip install --upgrade --force-reinstall --prefix=$(DESTDIR)$(PREFIX) ./crit -+ # $(Q) $(PYTHON) -m pip install --upgrade --force-reinstall --prefix=$(DESTDIR)$(PREFIX) ./crit -+ $(Q) $(PYTHON) scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES) - endif +-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 +++ b/scripts/crit-setup.py -@@ -0,0 +1,25 @@ +@@ -0,0 +1,28 @@ +import os +from distutils.core import setup + -+criu_version = "0.0.1" -+env = os.environ ++def get_version(): ++ 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 ++ ++ ++setup( ++ 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 + -+if 'CRIU_VERSION_MAJOR' in env and 'CRIU_VERSION_MINOR' in env: -+ criu_version = '{}.{}'.format( -+ env['CRIU_VERSION_MAJOR'], -+ env['CRIU_VERSION_MINOR'] -+ ) ++def get_version(): ++ 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_SUBLEVEL' in env and env['CRIU_VERSION_SUBLEVEL']: -+ criu_version += '.' + env['CRIU_VERSION_SUBLEVEL'] + -+setup(name="crit", -+ version=criu_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/py'}, -+ packages=["pycriu", "pycriu.images"], -+ scripts=["crit/crit"]) ++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=[], ++) diff --git a/criu.changes b/criu.changes index 95a0d3f..88b317e 100644 --- a/criu.changes +++ b/criu.changes @@ -1,4 +1,24 @@ ------------------------------------------------------------------- +Tue Nov 28 15:04:29 UTC 2023 - Takashi Iwai + +- 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 - Update to criu 3.18: diff --git a/criu.spec b/criu.spec index fead411..0749228 100644 --- a/criu.spec +++ b/criu.spec @@ -33,16 +33,17 @@ %define proto_c_ver %(protoc-c --version | head -1 | awk '{print $2}') Name: criu -Version: 3.18 +Version: 3.19 Release: 0 Summary: Checkpoint/Restore In Userspace Tools License: GPL-2.0-only Group: System/Console URL: https://criu.org/ 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 Patch2: 0002-Fix-build-with-nftables-installed-in-different-direc.patch -Patch3: criu-amdgpu-plugin-fix.patch Patch4: plugin-dir-path.patch Patch5: criu-ns-python3-shebang.patch BuildRequires: libcap-devel @@ -120,12 +121,7 @@ This package contains all necessary include files and libraries needed to develop applications with CRIU library. %prep -%setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 +%autosetup -p1 # default off echo "BINFMT_MISC_VIRTUALIZED" > .config @@ -145,6 +141,8 @@ make V=1 %{?_smp_mflags} %{?make_options} WERROR=0 \ PREFIX=%{_prefix} \ LIBDIR=%{_libdir} \ LIBEXECDIR=%{_libexecdir} +install -c -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/crit + # remove static libs rm -f %{buildroot}%{_libdir}/lib*.a \ %{buildroot}%{_libexecdir}/compel/*.a @@ -156,7 +154,7 @@ ln -s criu %{buildroot}%{_sbindir}/crtools ln -s criu.8 %{buildroot}%{_mandir}/man8/crtools.8 %if ! %{with_amdgpu_plugin} -rm -f %{buildroot}%{_mandir}/man1/amdgpu_plugin.1 +rm -f %{buildroot}%{_mandir}/man1/criu-amdgpu-plugin.1 %endif %post -n libcriu2 -p /sbin/ldconfig @@ -179,13 +177,14 @@ rm -f %{buildroot}%{_mandir}/man1/amdgpu_plugin.1 %{_mandir}/man8/crtools.8%{?ext_man} %{_libexecdir}/criu %{_libexecdir}/compel -%{python3_sitelib}/crit-*.egg-info +%{python3_sitelib}/*.egg-info +%{python3_sitelib}/crit %{python3_sitelib}/pycriu %if %{with_amdgpu_plugin} %files plugin-amdgpu %doc plugins/amdgpu/README.md -%{_mandir}/man1/amdgpu_plugin.1%{?ext_man} +%{_mandir}/man1/criu-amdgpu-plugin.1%{?ext_man} %dir %{_libdir}/criu %{_libdir}/criu/amdgpu_plugin.so %endif