use only names in [vl]{build,test}-initvm.sh
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 9 Jan 2014 16:23:23 +0000 (17:23 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 9 Jan 2014 16:23:23 +0000 (17:23 +0100)
knowing that the v* flavours will hopefully go down the sewer soon

12 files changed:
Makefile
README-build.txt
lbuild-initvm.sh [moved from vbuild-init-lxc.sh with 97% similarity]
lbuild-nightly.sh
ltest-initvm.sh [new symlink]
lxc-tags.mk
mlab-tags.mk
onelab-tags.mk
planetlab-k32-tags.mk
vbuild-initvm.sh [moved from vbuild-init-vserver.sh with 99% similarity]
vtest-init-lxc.sh [deleted symlink]
vtest-init-vserver.sh [deleted symlink]

index 3a623fb..669471f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -381,7 +381,6 @@ endef
 $(foreach module,$(ALL.modules),$(eval $(call target_extract_module,$(module))))
 
 ### the tests area
-# use this makefile to extract tests rather than extracting manually in vbuild-nightly
 build-clean:
        rm -rf MODULES/build
 .PHONY: build-clean
index c738f35..7ee81b9 100644 (file)
@@ -12,8 +12,8 @@ devel@planet-lab.org, as all this is not precisely foolproof :)
 =====
 * install a vserver-enabled kernel and util-vserver on your build box
 * create a local fedora mirror - see vbuild-fedora-mirror.sh
-* create a vserver - see vbuild-init-vserver.sh
-* enter the vserver and svn export this build module into /build 
+* create a vserver - see vbuild-initvm.sh
+* enter the vserver and retrieve this build module into /build using git
 * cd /build and run
 # make stage1=true PLDISTRO=<yourdistro>
 # make help
similarity index 97%
rename from vbuild-init-lxc.sh
rename to lbuild-initvm.sh
index 96f3d8c..ee669c1 100755 (executable)
@@ -15,8 +15,8 @@ DEFAULT_FCDISTRO=f16
 DEFAULT_PLDISTRO=planetlab
 DEFAULT_PERSONALITY=linux64
 
-COMMAND_VBUILD="vbuild-init-lxc.sh"
-COMMAND_MYPLC="vtest-init-lxc.sh"
+COMMAND_LBUILD="lbuild-initvm.sh"
+COMMAND_LTEST="ltest-initvm.sh"
 
 libvirt_version="1.0.4"
 
@@ -509,7 +509,7 @@ EOF
     
     # for using vtest-init-lxc.sh as a general-purpose lxc creation wrapper
     # just mention 'none' as the repo url
-    if [ -n "$MYPLC_MODE" -a "$REPO_URL" != "none" ] ; then
+    if [ -n "$TEST_MODE" -a "$REPO_URL" != "none" ] ; then
        if [ ! -d $rootfs_path/etc/yum.repos.d ] ; then
            echo "WARNING : cannot create myplc repo"
        else
@@ -675,7 +675,7 @@ function devel_or_vtest_tools () {
     pkg_method=$(package_method $fcdistro)
 
     # check for .pkgs file based on pldistro
-    if [ -n "$VBUILD_MODE" ] ; then
+    if [ -n "$BUILD_MODE" ] ; then
        pkgsname=devel.pkgs
     else
        pkgsname=vtest.pkgs
@@ -718,8 +718,8 @@ function devel_or_vtest_tools () {
 }
 
 function post_install () {
-    if [ -n "$VBUILD_MODE" ] ; then
-       post_install_vbuild "$@" 
+    if [ -n "$BUILD_MODE" ] ; then
+       post_install_build "$@" 
     else
        post_install_myplc "$@"
     fi
@@ -728,7 +728,7 @@ function post_install () {
     cp /etc/localtime $rootfs_path/etc/localtime
 }
 
-function post_install_vbuild () {
+function post_install_build () {
 
     set -x 
     set -e 
@@ -853,8 +853,8 @@ function start_lxc() {
 
 function usage () {
     set +x 
-    echo "Usage: $COMMAND_VBUILD [options] lxc-name"
-    echo "Usage: $COMMAND_MYPLC [options] lxc-name repo-url [ -- lxc-options ]"
+    echo "Usage: $COMMAND_LBUILD [options] lxc-name"
+    echo "Usage: $COMMAND_LTEST [options] lxc-name repo-url [ -- lxc-options ]"
     echo "Description:"
     echo "   This command creates a fresh lxc instance, for building, or running, myplc"
     echo "Supported options"
@@ -866,7 +866,7 @@ function usage () {
     echo "  --netdev : interface to be defined inside lxc"
     echo "  --interface : IP to be defined for the lxc"
     echo "  --hostname : Hostname to be defined for the lxc"
-    echo "With $COMMAND_MYPLC you can give 'none' as the URL, in which case"
+    echo "With $COMMAND_LTEST you can give 'none' as the URL, in which case"
     echo "   myplc.repo does not get created"
     exit 1
 }
@@ -878,10 +878,10 @@ function main () {
     #trap failure ERR INT
 
     case "$COMMAND" in
-       $COMMAND_VBUILD)
-           VBUILD_MODE=true ;;
-       $COMMAND_MYPLC)
-           MYPLC_MODE=true;;
+       $COMMAND_LBUILD)
+           BUILD_MODE=true ;;
+       $COMMAND_LTEST)
+           TEST_MODE=true;;
        *)
            usage ;;
     esac
@@ -905,7 +905,7 @@ function main () {
     # parse fixed arguments
     [[ -z "$@" ]] && usage
     lxc=$1 ; shift
-    if [ -n "$MYPLC_MODE" ] ; then
+    if [ -n "$TEST_MODE" ] ; then
        [[ -z "$@" ]] && usage
        REPO_URL=$1 ; shift
     fi
@@ -933,7 +933,7 @@ function main () {
       done
 
    
-    if [ -n "$VBUILD_MODE" ] ; then
+    if [ -n "$BUILD_MODE" ] ; then
        [ -z "$IFNAME" ] && IFNAME=$DEFAULT_IFNAME
         [ -z "$HOSTNAME" ] && HOSTNAME=$lxc
     fi
@@ -958,7 +958,7 @@ function main () {
     # need bridge installed
     prepare_host    
 
-    if [ -n "$VBUILD_MODE" ] ; then
+    if [ -n "$BUILD_MODE" ] ; then
 
        # Bridge IP affectation
        x=$(echo $personality | cut -dx -f2)
index 5b5c2b9..bf79807 100755 (executable)
@@ -147,8 +147,8 @@ function failure() {
     if test -z "$WEBLOG" ; then
        WEBHOST=$(hostname)
        WEBPATH=/tmp
-       WEBBASE=/tmp/vbuild-early-$(date +%Y-%m-%d)
-       WEBLOG=/tmp/vbuild-early-$(date +%Y-%m-%d).log.txt
+       WEBBASE=/tmp/lbuild-early-$(date +%Y-%m-%d)
+       WEBLOG=/tmp/lbuild-early-$(date +%Y-%m-%d).log.txt
     fi
     webpublish mkdir -p $WEBBASE ||:
     webpublish_cp_local_to_remote $LOG $WEBLOG ||:
@@ -176,7 +176,7 @@ function success () {
     if test -z "$WEBLOG" ; then
        WEBHOST=$(hostname)
        WEBPATH=/tmp
-       WEBLOG=/tmp/vbuild-early-$(date +%Y-%m-%d).log.txt
+       WEBLOG=/tmp/lbuild-early-$(date +%Y-%m-%d).log.txt
     fi
     webpublish mkdir -p $WEBBASE
     webpublish_cp_local_to_remote $LOG $WEBLOG
@@ -672,7 +672,7 @@ function main () {
 
             # Create lxc vm
            cd $tmpdir
-           ./vbuild-init-lxc.sh $VERBOSE -f ${FCDISTRO} -d ${PLDISTRO} -p ${PERSONALITY} -i ${IFNAME} ${PREINSTALLED} ${BASE} 
+           ./lbuild-initvm.sh $VERBOSE -f ${FCDISTRO} -d ${PLDISTRO} -p ${PERSONALITY} -i ${IFNAME} ${PREINSTALLED} ${BASE} 
            # cleanup
            cd -
            rm -rf $tmpdir
diff --git a/ltest-initvm.sh b/ltest-initvm.sh
new file mode 120000 (symlink)
index 0000000..c63f195
--- /dev/null
@@ -0,0 +1 @@
+lbuild-initvm.sh
\ No newline at end of file
index 07f00c9..a3790bd 100644 (file)
@@ -1,5 +1,3 @@
-# build-GITPATH is now set by vbuild-nightly.sh to avoid duplication
-
 lxc-userspace-GITPATH           := git://git.planet-lab.org/lxc-userspace.git@master
 transforward-GITPATH            := git://git.planet-lab.org/transforward.git@transforward-0.1-4
 procprotect-GITPATH             := git://git.planet-lab.org/procprotect.git@master
index 97807ba..f2056f6 100644 (file)
@@ -1,5 +1,3 @@
-# build-GITPATH is now set by vbuild-nightly.sh to avoid duplication
-
 mkinitrd-GITPATH               := git://git.planet-lab.org/mkinitrd.git@mkinitrd-5.1.19.6-2
 linux-2.6-BRANCH               := 32 # This line is not so defunct
 linux-2.6-GITPATH              := git://git.planet-lab.org/linux-2.6.git@rhel6-mlab
index 662d0af..439784e 100644 (file)
@@ -1,5 +1,3 @@
-# build-GITPATH is now set by vbuild-nightly.sh to avoid duplication
-
 ###
 linux-2.6-BRANCH               := 32
 linux-2.6-GITPATH               := git://git.onelab.eu/linux-2.6.git@linux-2.6-32-36
index 1c05ee9..a954a8a 100644 (file)
@@ -1,5 +1,3 @@
-# build-GITPATH is now set by vbuild-nightly.sh to avoid duplication
-
 mkinitrd-GITPATH               := git://git.planet-lab.org/mkinitrd.git@mkinitrd-5.1.19.6-2
 linux-2.6-BRANCH               := 32
 linux-2.6-GITPATH               := git://git.planet-lab.org/linux-2.6.git@32
similarity index 99%
rename from vbuild-init-vserver.sh
rename to vbuild-initvm.sh
index 1e8ef4a..5eb58f6 100755 (executable)
@@ -15,8 +15,8 @@ DEFAULT_PLDISTRO=planetlab
 DEFAULT_PERSONALITY=linux64
 DEFAULT_IFNAME=eth0
 
-COMMAND_VBUILD="vbuild-init-vserver.sh"
-COMMAND_MYPLC="vtest-init-vserver.sh"
+COMMAND_VBUILD="vbuild-initvm.sh"
+COMMAND_MYPLC="vtest-initvm.sh"
 
 function failure () {
     echo "$COMMAND : Bailing out"
diff --git a/vtest-init-lxc.sh b/vtest-init-lxc.sh
deleted file mode 120000 (symlink)
index 147b155..0000000
+++ /dev/null
@@ -1 +0,0 @@
-vbuild-init-lxc.sh
\ No newline at end of file
diff --git a/vtest-init-vserver.sh b/vtest-init-vserver.sh
deleted file mode 120000 (symlink)
index 1fa8674..0000000
+++ /dev/null
@@ -1 +0,0 @@
-vbuild-init-vserver.sh
\ No newline at end of file