Setting tag lxc-userspace-2.0-0
[lxc-userspace.git] / Makefile
index f6298c4..44bc3fd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ vsh: vsh.c
        gcc vsh.c -o vsh
 
 setns: setns.c
-       python setup.py build
+       python3 setup.py build
 
 ########## sync
 # for use with the test framework; push local stuff on a test node
@@ -19,10 +19,10 @@ setns: setns.c
 # $ 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' 
+LOCAL_RSYNC_EXCLUDES   := --exclude '*.pyc'
 RSYNC_EXCLUDES         := --exclude .git  --exclude .svn --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
 RSYNC_COND_DRY_RUN     := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
 RSYNC                  := rsync -e "ssh -i $(NODE).key.rsa" -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
@@ -37,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
@@ -70,6 +74,9 @@ 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
-       cp build/lib*/setns.so /usr/sbin
+       chmod u+s /usr/sbin/slicesu
+       chmod u+s /usr/sbin/vsh
+       cp build/lib*/setns.*.so /usr/sbin/setns.so