From c52a8685fb6b54488bf89b256f60819ee1eba6c3 Mon Sep 17 00:00:00 2001 From: kth5 Date: Mon, 24 Jul 2023 19:45:26 +0200 Subject: [PATCH] * update criu to 3.18-1 --- criu/PKGBUILD | 58 ++++++++++++++++++++++++++---- criu/no-amdgpu-manpage.patch | 10 ++++++ criu/no-python-pip.patch | 13 +++++++ criu/no-recompile-on-install.patch | 21 +++++++++++ 4 files changed, 96 insertions(+), 6 deletions(-) create mode 100644 criu/no-amdgpu-manpage.patch create mode 100644 criu/no-python-pip.patch create mode 100644 criu/no-recompile-on-install.patch diff --git a/criu/PKGBUILD b/criu/PKGBUILD index 143b7e98c9..f1a92ed9ca 100644 --- a/criu/PKGBUILD +++ b/criu/PKGBUILD @@ -1,15 +1,14 @@ -# POWER Maintainer: Alexander Baldeck # Maintainer: George Rawlinson # Contributor: Pavel Borzenkov # Contributor: aksr pkgname=criu -pkgver=3.17.1 +pkgver=3.18 pkgrel=1 pkgdesc='Utilities to checkpoint and restore processes in userspace' arch=(x86_64 powerpc64le) url='https://criu.org' -license=('GPL2') +license=('GPL2' 'LGPL2.1') depends=( 'libbsd' 'libnet' @@ -23,11 +22,26 @@ makedepends=( 'git' 'xmlto' 'asciidoc' + 'python-build' + 'python-installer' + 'python-setuptools' + 'python-wheel' ) +# can't run tests due to privilege escalation +# https://github.com/checkpoint-restore/criu/issues/434 +#checkdepends=('libaio' 'python-yaml') options=('!buildflags' '!lto') -_commit='d46f40f4ff0c724e0b9f0f8a2e8c043806897e94' -source=("$pkgname::git+https://github.com/checkpoint-restore/criu#commit=$_commit") -b2sums=('SKIP') +_commit='4c1a2ac41bb80843c927d2fde8f2ff4186f8d278' +source=( + "$pkgname::git+https://github.com/checkpoint-restore/criu#commit=$_commit" + 'no-python-pip.patch' + 'no-recompile-on-install.patch' + 'no-amdgpu-manpage.patch' +) +b2sums=('SKIP' + 'd83da0ce0222c1aea1fc0c97bbf8a40f3cd5a6b5d55ee973b64f97bd9769df265b148e89cee8ee6564f065adc00552b511904f322555ac659b735933d42a9a64' + 'e4b7c4831fa513d602c73e377847705240a6a42ee1986effd10a589784bd0ad818032ff8283c1f9fd17cb7ddf3204e4a932796a1df816afc30a0e594c92b50f6' + '9c713724e8f6b062f7a09e34555d31e5aa0315db6308b7527835484eaad8dbf5deac5c66521bf5a819462d5f38c64f6602ba421f7bbb73180a3b05189816c8f6') pkgver() { cd "$pkgname" @@ -35,15 +49,47 @@ pkgver() { git describe --tags | sed 's/^v//' } +prepare() { + cd "$pkgname" + + # do not invoke pip + patch -p1 -i "$srcdir/no-python-pip.patch" + + # prevent recompilation with `make install` + patch -p1 -i "$srcdir/no-recompile-on-install.patch" + + # do not install amdgpu_plugin manpage + patch -p1 -i "$srcdir/no-amdgpu-manpage.patch" +} + build() { cd "$pkgname" make + + + # build python wheel + cd crit + + export CRIU_VERSION_MAJOR="${pkgver%%.*}" + export CRIU_VERSION_MINOR="${pkgver##*.}" + + python -m build --wheel --no-isolation } +#check() { +# cd "$pkgname" +# +# make test +#} + package() { cd "$pkgname" + # install python wheel + python -m installer --destdir="$pkgdir" crit/dist/*.whl + + # rest of the application make \ DESTDIR="$pkgdir" \ PREFIX=/usr \ diff --git a/criu/no-amdgpu-manpage.patch b/criu/no-amdgpu-manpage.patch new file mode 100644 index 0000000000..eca824188e --- /dev/null +++ b/criu/no-amdgpu-manpage.patch @@ -0,0 +1,10 @@ +--- a/Documentation/Makefile ++++ b/Documentation/Makefile +@@ -16,7 +16,6 @@ ifeq ($(PYTHON),python3) + SRC1 += criu-ns.txt + endif + SRC1 += compel.txt +-SRC1 += amdgpu_plugin.txt + SRC8 += criu.txt + SRC := $(SRC1) $(SRC8) + XMLS := $(patsubst %.txt,%.xml,$(SRC)) diff --git a/criu/no-python-pip.patch b/criu/no-python-pip.patch new file mode 100644 index 0000000000..4512012843 --- /dev/null +++ b/criu/no-python-pip.patch @@ -0,0 +1,13 @@ +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -54,10 +54,6 @@ install: lib-c lib-a lib-py crit/crit lib/c/criu.pc.in + $(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 +-endif + .PHONY: install + + uninstall: diff --git a/criu/no-recompile-on-install.patch b/criu/no-recompile-on-install.patch new file mode 100644 index 0000000000..2b50f544e5 --- /dev/null +++ b/criu/no-recompile-on-install.patch @@ -0,0 +1,21 @@ +--- a/Makefile.install ++++ b/Makefile.install +@@ -33,15 +33,15 @@ install-man: + $(Q) $(MAKE) -C Documentation install + .PHONY: install-man + +-install-lib: lib ++install-lib: + $(Q) $(MAKE) $(build)=lib install + .PHONY: install-lib + +-install-criu: criu ++install-criu: + $(Q) $(MAKE) $(build)=criu install + .PHONY: install-criu + +-install-amdgpu_plugin: amdgpu_plugin ++install-amdgpu_plugin: + $(Q) $(MAKE) -C plugins/amdgpu install + .PHONY: install-amdgpu_plugin +