Skip to contentSkip to conversation

criu: uprev to version 3.10

PATCH In review Mark Asselstine 2 participants 2 messages Jul 30, 2018 – Aug 3, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 criu: uprev to version 3.10

A fairly straightforward uprev requiring minimal patch refreshing since a few hunks were failing due to conflicts with upstream updates.

Unfortunately upstream starting using the now overloaded "PYTHON" variable in their Makefiles, this is not the path to the python executable but rather the name 'python2' or 'python3' which is used to determine which local directories to include. Due to this we must explicitly assign values to 'PYTHON_FULL' and 'PYTHON'. We use 'python2' since we are using 'setuptools' and therefore are explicitly using python v2, at some point we might want to make this recipe work with either python v2 or v3 but for now we continue to explicitly use v2.

Instead of using version specific filename we switch to using _git.bb which is inline with similar 'git' recipes found in oe-core and other repos.

---
 recipes-containers/criu/{criu_3.9.bb => criu_git.bb}        |  8 ++++----
 .../criu/files/0001-criu-Fix-toolchain-hardcode.patch       | 13 +++++++------
 ...b-Makefile-overwrite-install-lib-to-allow-multiarc.patch |  6 +++---
 3 files changed, 14 insertions(+), 13 deletions(-)
 rename recipes-containers/criu/{criu_3.9.bb => criu_git.bb} (94%)
recipes-containers/criu/criu_git.bb renamed from recipes-containers/criu/criu_3.9.bb +4 -4
similarity index 94%
rename from recipes-containers/criu/criu_3.9.bb
rename to recipes-containers/criu/criu_git.bb
index 36c356d..00de417 100644
@@ -13,8 +13,8 @@ EXCLUDE_FROM_WORLD = "1"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2"
 
-SRCREV = "202b7745bd0c37a1732ebe2fb009a157d338bf95"
-PV = "3.9+git${SRCPV}"
+SRCREV = "c49eab368a68682475c4e693258246e04232e6d2"
+PV = "3.10+git${SRCPV}"
 
 SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
            file://0001-criu-Fix-toolchain-hardcode.patch \
@@ -67,12 +67,12 @@ do_compile_prepend() {
 }
 
 do_compile () {
-	oe_runmake
+	oe_runmake FULL_PYTHON=${PYTHON} PYTHON=python2
 }
 
 do_install () {
     export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages"
-    oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install
+    oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" FULL_PYTHON=${PYTHON} PYTHON=python2 install
 }
 
 FILES_${PN} += "${systemd_unitdir}/ \
recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch +7 -6
index d1f136c..838cbdc 100644
@@ -33,7 +33,7 @@ diff --git a/scripts/nmk/scripts/include.mk b/scripts/nmk/scripts/include.mk
 index 04ccb3a..0d63bc7 100644
 --- a/scripts/nmk/scripts/include.mk
 +++ b/scripts/nmk/scripts/include.mk
-@@ -20,7 +20,7 @@ SUBARCH := $(shell uname -m | sed       \
+@@ -22,7 +22,7 @@ SUBARCH := $(shell uname -m | sed       \
                  -e s/aarch64.*/aarch64/)
  
  ARCH		?= $(SUBARCH)
@@ -46,7 +46,7 @@ diff --git a/scripts/nmk/scripts/tools.mk b/scripts/nmk/scripts/tools.mk
 index 56dba84..1698821 100644
 --- a/scripts/nmk/scripts/tools.mk
 +++ b/scripts/nmk/scripts/tools.mk
-@@ -2,30 +2,30 @@ ifndef ____nmk_defined__tools
+@@ -2,31 +2,31 @@ ifndef ____nmk_defined__tools
  
  #
  # System tools shorthands
@@ -68,9 +68,7 @@ index 56dba84..1698821 100644
 -MKDIR		:= mkdir -p
 -AWK		:= awk
 -PERL		:= perl
--PYTHON		:= python
--FIND		:= find
--SH		:= $(shell if [ -x "$$BASH" ]; then echo $$BASH;        \
+-FULL_PYTHON	:= $(shell which python2 2>/dev/null || which python3 2>/dev/null)
 +CC		?= $(CROSS_COMPILE)$(HOSTCC)
 +CPP		?= $(CC) -E
 +AS		?= $(CROSS_COMPILE)as
@@ -83,7 +81,10 @@ index 56dba84..1698821 100644
 +MKDIR		?= mkdir -p
 +AWK		?= awk
 +PERL		?= perl
-+PYTHON		?= python
++FULL_PYTHON	?= $(shell which python2 2>/dev/null || which python3 2>/dev/null)
+ PYTHON		?= $(shell basename $(FULL_PYTHON))
+-FIND		:= find
+-SH		:= $(shell if [ -x "$$BASH" ]; then echo $$BASH;        \
 +FIND		?= find
 +SH		?= $(shell if [ -x "$$BASH" ]; then echo $$BASH;        \
                          else if [ -x /bin/bash ]; then echo /bin/bash;  \
recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch +3 -3
index 59e7bcb..70ccb28 100644
@@ -17,12 +17,12 @@ diff --git a/lib/Makefile b/lib/Makefile
 index b1bb057..06f5c5d 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
-@@ -56,7 +56,7 @@ install: lib-c lib-py crit/crit lib/c/criu.pc.in
+@@ -53,7 +53,7 @@ install: lib-c lib-py crit/crit lib/c/criu.pc.in
  	$(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
  	$(E) "  INSTALL " crit
--	$(Q) $(PYTHON_BIN) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES)
-+	$(Q) $(PYTHON_BIN) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES) --install-lib=$(DESTDIR)$(INSTALL_LIB)
+-	$(Q) $(PYTHON) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES)
++	$(Q) $(PYTHON) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES) --install-lib=$(DESTDIR)$(INSTALL_LIB)
  .PHONY: install
  
  uninstall:
Signature · 1 line
2.7.4
#1 lore raw

merged.

Bruce

Quoted 131 lines · Mark Asselstine

A fairly straightforward uprev requiring minimal patch refreshing since a few hunks were failing due to conflicts with upstream updates.

Unfortunately upstream starting using the now overloaded "PYTHON" variable in their Makefiles, this is not the path to the python executable but rather the name 'python2' or 'python3' which is used to determine which local directories to include. Due to this we must explicitly assign values to 'PYTHON_FULL' and 'PYTHON'. We use 'python2' since we are using 'setuptools' and therefore are explicitly using python v2, at some point we might want to make this recipe work with either python v2 or v3 but for now we continue to explicitly use v2.

Instead of using version specific filename we switch to using _git.bb which is inline with similar 'git' recipes found in oe-core and other repos.

---
 recipes-containers/criu/{criu_3.9.bb => criu_git.bb}        |  8 ++++----
 .../criu/files/0001-criu-Fix-toolchain-hardcode.patch       | 13 +++++++------
 ...b-Makefile-overwrite-install-lib-to-allow-multiarc.patch |  6 +++---
 3 files changed, 14 insertions(+), 13 deletions(-)
 rename recipes-containers/criu/{criu_3.9.bb => criu_git.bb} (94%)
recipes-containers/criu/criu_git.bb renamed from recipes-containers/criu/criu_3.9.bb +4 -4
similarity index 94%
rename from recipes-containers/criu/criu_3.9.bb
rename to recipes-containers/criu/criu_git.bb
index 36c356d..00de417 100644
@@ -13,8 +13,8 @@ EXCLUDE_FROM_WORLD = "1"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2"
 
-SRCREV = "202b7745bd0c37a1732ebe2fb009a157d338bf95"
-PV = "3.9+git${SRCPV}"
+SRCREV = "c49eab368a68682475c4e693258246e04232e6d2"
+PV = "3.10+git${SRCPV}"
 
 SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
            file://0001-criu-Fix-toolchain-hardcode.patch \
@@ -67,12 +67,12 @@ do_compile_prepend() {
 }
 
 do_compile () {
-       oe_runmake
+       oe_runmake FULL_PYTHON=${PYTHON} PYTHON=python2
 }
 
 do_install () {
     export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages"
-    oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install
+    oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" FULL_PYTHON=${PYTHON} PYTHON=python2 install
 }
 
 FILES_${PN} += "${systemd_unitdir}/ \
recipes-containers/criu/files/0001-criu-Fix-toolchain-hardcode.patch +7 -6
index d1f136c..838cbdc 100644
@@ -33,7 +33,7 @@ diff --git a/scripts/nmk/scripts/include.mk b/scripts/nmk/scripts/include.mk
 index 04ccb3a..0d63bc7 100644
 --- a/scripts/nmk/scripts/include.mk
 +++ b/scripts/nmk/scripts/include.mk
-@@ -20,7 +20,7 @@ SUBARCH := $(shell uname -m | sed       \
+@@ -22,7 +22,7 @@ SUBARCH := $(shell uname -m | sed       \
                  -e s/aarch64.*/aarch64/)
 
  ARCH          ?= $(SUBARCH)
@@ -46,7 +46,7 @@ diff --git a/scripts/nmk/scripts/tools.mk b/scripts/nmk/scripts/tools.mk
 index 56dba84..1698821 100644
 --- a/scripts/nmk/scripts/tools.mk
 +++ b/scripts/nmk/scripts/tools.mk
-@@ -2,30 +2,30 @@ ifndef ____nmk_defined__tools
+@@ -2,31 +2,31 @@ ifndef ____nmk_defined__tools
 
  #
  # System tools shorthands
@@ -68,9 +68,7 @@ index 56dba84..1698821 100644
 -MKDIR         := mkdir -p
 -AWK           := awk
 -PERL          := perl
--PYTHON                := python
--FIND          := find
--SH            := $(shell if [ -x "$$BASH" ]; then echo $$BASH;        \
+-FULL_PYTHON   := $(shell which python2 2>/dev/null || which python3 2>/dev/null)
 +CC            ?= $(CROSS_COMPILE)$(HOSTCC)
 +CPP           ?= $(CC) -E
 +AS            ?= $(CROSS_COMPILE)as
@@ -83,7 +81,10 @@ index 56dba84..1698821 100644
 +MKDIR         ?= mkdir -p
 +AWK           ?= awk
 +PERL          ?= perl
-+PYTHON                ?= python
++FULL_PYTHON   ?= $(shell which python2 2>/dev/null || which python3 2>/dev/null)
+ PYTHON                ?= $(shell basename $(FULL_PYTHON))
+-FIND          := find
+-SH            := $(shell if [ -x "$$BASH" ]; then echo $$BASH;        \
 +FIND          ?= find
 +SH            ?= $(shell if [ -x "$$BASH" ]; then echo $$BASH;        \
                          else if [ -x /bin/bash ]; then echo /bin/bash;  \
recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch +3 -4
index 59e7bcb..70ccb28 100644
@@ -17,12 +17,12 @@ diff --git a/lib/Makefile b/lib/Makefile
 index b1bb057..06f5c5d 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
-@@ -56,7 +56,7 @@ install: lib-c lib-py crit/crit lib/c/criu.pc.in
+@@ -53,7 +53,7 @@ install: lib-c lib-py crit/crit lib/c/criu.pc.in
        $(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
        $(E) "  INSTALL " crit
--      $(Q) $(PYTHON_BIN) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES)
-+      $(Q) $(PYTHON_BIN) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES) --install-lib=$(DESTDIR)$(INSTALL_LIB)
+-      $(Q) $(PYTHON) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES)
++      $(Q) $(PYTHON) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES) --install-lib=$(DESTDIR)$(INSTALL_LIB)
  .PHONY: install
 
  uninstall:
--

2.7.4

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"