From 1d2b96b843f0195c4c670176d88ba3d382aa92c6 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 9 Jan 2014 17:23:23 +0100 Subject: [PATCH] use only names in [vl]{build,test}-initvm.sh knowing that the v* flavours will hopefully go down the sewer soon --- Makefile | 1 - README-build.txt | 4 +-- vbuild-init-lxc.sh => lbuild-initvm.sh | 34 +++++++++++----------- lbuild-nightly.sh | 8 ++--- ltest-initvm.sh | 1 + lxc-tags.mk | 2 -- mlab-tags.mk | 2 -- onelab-tags.mk | 2 -- planetlab-k32-tags.mk | 2 -- vbuild-init-vserver.sh => vbuild-initvm.sh | 4 +-- vtest-init-lxc.sh | 1 - vtest-init-vserver.sh | 1 - 12 files changed, 26 insertions(+), 36 deletions(-) rename vbuild-init-lxc.sh => lbuild-initvm.sh (97%) create mode 120000 ltest-initvm.sh rename vbuild-init-vserver.sh => vbuild-initvm.sh (99%) delete mode 120000 vtest-init-lxc.sh delete mode 120000 vtest-init-vserver.sh diff --git a/Makefile b/Makefile index 3a623fb8..669471f0 100644 --- 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 diff --git a/README-build.txt b/README-build.txt index c738f35c..7ee81b94 100644 --- a/README-build.txt +++ b/README-build.txt @@ -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= # make help diff --git a/vbuild-init-lxc.sh b/lbuild-initvm.sh similarity index 97% rename from vbuild-init-lxc.sh rename to lbuild-initvm.sh index 96f3d8cd..ee669c19 100755 --- a/vbuild-init-lxc.sh +++ b/lbuild-initvm.sh @@ -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) diff --git a/lbuild-nightly.sh b/lbuild-nightly.sh index 5b5c2b9e..bf798079 100755 --- a/lbuild-nightly.sh +++ b/lbuild-nightly.sh @@ -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 index 00000000..c63f1959 --- /dev/null +++ b/ltest-initvm.sh @@ -0,0 +1 @@ +lbuild-initvm.sh \ No newline at end of file diff --git a/lxc-tags.mk b/lxc-tags.mk index 07f00c9e..a3790bde 100644 --- a/lxc-tags.mk +++ b/lxc-tags.mk @@ -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 diff --git a/mlab-tags.mk b/mlab-tags.mk index 97807ba2..f2056f68 100644 --- a/mlab-tags.mk +++ b/mlab-tags.mk @@ -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 diff --git a/onelab-tags.mk b/onelab-tags.mk index 662d0af2..439784e5 100644 --- a/onelab-tags.mk +++ b/onelab-tags.mk @@ -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 diff --git a/planetlab-k32-tags.mk b/planetlab-k32-tags.mk index 1c05ee9c..a954a8ab 100644 --- a/planetlab-k32-tags.mk +++ b/planetlab-k32-tags.mk @@ -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 diff --git a/vbuild-init-vserver.sh b/vbuild-initvm.sh similarity index 99% rename from vbuild-init-vserver.sh rename to vbuild-initvm.sh index 1e8ef4a5..5eb58f62 100755 --- a/vbuild-init-vserver.sh +++ b/vbuild-initvm.sh @@ -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 index 147b1553..00000000 --- a/vtest-init-lxc.sh +++ /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 index 1fa8674a..00000000 --- a/vtest-init-vserver.sh +++ /dev/null @@ -1 +0,0 @@ -vbuild-init-vserver.sh \ No newline at end of file -- 2.43.0