[CRIU] [PATCH] criu: add a shell wrapper

Andrew Vagin avagin at virtuozzo.com
Tue Apr 19 19:41:33 PDT 2016


On Wed, Apr 20, 2016 at 01:51:03AM +0300, Andrey Vagin wrote:
> From: Andrew Vagin <avagin at virtuozzo.com>
> 
> This is a way to solve a problem with loading libsoccr.so.

Pls, ignore this one. I sent an out-of-date version
> 
> Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
> ---
>  .gitignore    |  2 +-
>  criu/Makefile | 10 +++++-----
>  criu/criu     |  7 +++++++
>  3 files changed, 13 insertions(+), 6 deletions(-)
>  create mode 100755 criu/criu
> 
> diff --git a/.gitignore b/.gitignore
> index fedb73b..af3f7e2 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -20,7 +20,7 @@ images/*.h
>  images/google/protobuf/*.c
>  images/google/protobuf/*.h
>  .gitid
> -criu/criu
> +criu/.criu
>  criu/arch/*/sys-exec-tbl.c
>  criu/arch/*/syscalls.S
>  criu/include/config.h
> diff --git a/criu/Makefile b/criu/Makefile
> index 66c046a..386a57c 100644
> --- a/criu/Makefile
> +++ b/criu/Makefile
> @@ -163,7 +163,7 @@ PROGRAM-BUILTINS	+= pie/lib.a
>  built-in.o: pie
>  	$(Q) $(MAKE) $(call build-as,Makefile.crtools,.) all
>  
> -criu: $(PROGRAM-BUILTINS)
> +.criu: $(PROGRAM-BUILTINS)
>  	$(call msg-link, $@)
>  	$(Q) $(CC) $(CFLAGS) $^ $(ARCH-LIB) $(LIBS) $(LDFLAGS) $(GMONLDOPT) -rdynamic -o $@
>  
> @@ -172,7 +172,7 @@ subclean:
>  	$(Q) $(RM) ./*.{gcda,gcno,gcov}
>  	$(Q) $(RM) ./pie/*.{gcda,gcno,gcov}
>  	$(Q) $(RM) -r ./gcov
> -	$(Q) $(RM) criu
> +	$(Q) $(RM) .criu
>  .PHONY: subclean
>  
>  #
> @@ -199,16 +199,16 @@ mrproper: subclean
>  
>  UAPI_HEADERS := include/criu-plugin.h include/criu-log.h
>  
> -install: criu
> +install: .criu
>  	$(E) "  INSTALL " criu
>  	$(Q) mkdir -p $(DESTDIR)$(SBINDIR)
> -	$(Q) install -m 755 criu $(DESTDIR)$(SBINDIR)
> +	$(Q) install -m 755 .criu $(DESTDIR)$(SBINDIR)/criu
>  	$(Q) mkdir -p $(DESTDIR)$(INCLUDEDIR)
>  	$(Q) install -m 644 $(UAPI_HEADERS) $(DESTDIR)$(INCLUDEDIR)
>  .PHONY: install
>  
>  #
>  # Final @all target.
> -all: criu
> +all: .criu
>  	@true
>  .PHONY: all
> diff --git a/criu/criu b/criu/criu
> new file mode 100755
> index 0000000..a1faa46
> --- /dev/null
> +++ b/criu/criu
> @@ -0,0 +1,7 @@
> +#!/bin/sh -x
> +
> +# This is a wrapper around @REALBIN@ to be able to run it with a library
> +# from @LIB_PATH@ that might not yet be installed into a proper place.
> +
> +BASEDIR=$(dirname $0)
> +LD_LIBRARY_PATH=${BASEDIR}/../soccr exec ${BASEDIR}/.criu
> -- 
> 2.5.0
> 


More information about the CRIU mailing list