[CRIU] [PATCH] [v2] crit: fix 'make install'

Kir Kolyshkin kir at openvz.org
Thu Apr 27 21:25:03 PDT 2017


Apparently, setup.py from distutils interprets --root= option without
an argument as "--root=." and we end up with what is described
in https://github.com/xemul/criu/issues/309.

Fix is to prepend DESTDIR value (if any) to --prefix argument.

v2: fix uninstall as well

Reported-by: Juraj Oršulić <juraj.orsulic at fer.hr>
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 lib/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Makefile b/lib/Makefile
index a8647ce..b1bb057 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -56,7 +56,7 @@ install: lib-c lib-py crit/crit lib/c/criu.pc.in
 	$(Q) sed -e 's, at version@,$(CRIU_VERSION),' -e 's, at libdir@,$(LIBDIR),' -e 's, at 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 --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES)
+	$(Q) $(PYTHON_BIN) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES)
 .PHONY: install
 
 uninstall:
@@ -68,5 +68,5 @@ uninstall:
 	$(E) " UNINSTALL" pkgconfig/criu.pc
 	$(Q) $(RM) $(addprefix $(DESTDIR)$(LIBDIR)/pkgconfig/,criu.pc)
 	$(E) " UNINSTALL" crit
-	$(Q) while read -r file; do $(RM) "$(DESTDIR)$$file"; done < $(CRIT_SETUP_FILES)
+	$(Q) while read -r file; do $(RM) "$$file"; done < $(CRIT_SETUP_FILES)
 .PHONY: uninstall
-- 
2.9.3



More information about the CRIU mailing list