X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=2ae907148f21b18894bbc830353269e573703c8c;hb=058206ebf8f17c2f9e740d4ee5116391809a6c76;hp=453ddc441dcc526e3465592886baade46d93c502;hpb=f9921d92b34d10588dc7bb240095fc3fa8f946c5;p=lxc-userspace.git diff --git a/Makefile b/Makefile index 453ddc4..2ae9071 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,11 @@ -all: - python setup.py build +all: vsh setns + +vsh: vsh.c gcc vsh.c -o vsh +setns: setns.c + python setup.py build + ########## sync # for use with the test framework; push local stuff on a test node # howto use: go on testmaster in the build you want to use and just run @@ -15,7 +19,7 @@ all: # $ export NODE=vnode01.pl.sophia.inria.fr # and then just run # $ make sync -# this will attempt to compile vsh from vsh.c (and will push Makefile.vsh in /usr/sbin/) +# this will attempt to compile vsh from vsh.c # so you might have to yum install gcc LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' @@ -33,10 +37,14 @@ ifeq (,$(NODEURL)) @echo " e.g. make sync NODE=vnode01.inria.fr" @exit 1 else - +$(RSYNC) ./lxcsu ./lxcsu-internal ./vsh.c ./Makefile.vsh $(NODEURL)/usr/sbin/ - ssh -i $(NODE).key.rsa root@$(NODE) make -C /usr/sbin -f Makefile.vsh vsh - ssh -i $(NODE).key.rsa root@$(NODE) chown root:root /usr/sbin/lxcsu /usr/sbin/vsh - ssh -i $(NODE).key.rsa root@$(NODE) chmod u+s /usr/sbin/lxcsu /usr/sbin/vsh + +$(RSYNC) ./slicesu ./lxcsu ./lxcsu-internal ./vsh.c $(NODEURL)/usr/sbin/ + ssh -i $(NODE).key.rsa root@$(NODE) chown root:root /usr/sbin/lxcsu + ssh -i $(NODE).key.rsa root@$(NODE) chown root:root /usr/sbin/slicesu + ssh -i $(NODE).key.rsa root@$(NODE) chmod u+s /usr/sbin/lxcsu + ssh -i $(NODE).key.rsa root@$(NODE) chmod u+s /usr/sbin/slicesu + ssh -i $(NODE).key.rsa root@$(NODE) gcc -o /usr/sbin/vsh /usr/sbin/vsh.c + ssh -i $(NODE).key.rsa root@$(NODE) chown root:root /usr/sbin/vsh + ssh -i $(NODE).key.rsa root@$(NODE) chmod u+s /usr/sbin/vsh endif ### fetching the key @@ -59,3 +67,16 @@ else @echo "FETCHING key" +scp $(KEYURL) $@ endif + +### poor man's install + +install: setns vsh + mkdir -p /usr/sbin + install -D -m 755 vsh /usr/sbin/vsh + install -D -m 755 lxcsu /usr/sbin/lxcsu + install -D -m 755 slicesu /usr/sbin/slicesu + install -D -m 755 lxcsu-internal /usr/sbin/lxcsu-internal + chmod u+s /usr/sbin/lxcsu + chmod u+s /usr/sbin/slicesu + chmod u+s /usr/sbin/vsh + cp build/lib*/setns.so /usr/sbin