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

Andrew Vagin avagin at virtuozzo.com
Wed Apr 20 07:28:58 PDT 2016


On Wed, Apr 20, 2016 at 08:06:12AM +0300, Pavel Emelyanov wrote:
> 
> > -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
> 
> Yes, the problem exists, I agree. But this solution is awful :(
> Can we better export the LD_LIBRARY_PATH in the zdtm.py script?

As far as I know Kir took the idea from autotools, so it's a standard
solution.

We can set LD_LIBRARY_PATH, but eachone who need to execute from
from source, will have to do this.

I don't know why you think it's awful:). It just works.
> 
> > diff --git a/criu/criu b/criu/criu
> > new file mode 100755
> > index 0000000..d3cf974
> > --- /dev/null
> > +++ b/criu/criu
> > @@ -0,0 +1,7 @@
> > +#!/bin/sh
> > +
> > +# 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 "$@"
> > 
> 


More information about the CRIU mailing list