more for building sfa on debian
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 16 Jan 2013 07:36:47 +0000 (08:36 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 16 Jan 2013 07:36:47 +0000 (08:36 +0100)
new config.planetlab/develsfa.pkgs
use -P to select another set of preinstalled packages than devel.pkgs/vtest.pkgs

build.common
config.planetlab/develsfa.pkgs [new file with mode: 0644]
vbuild-init-vserver.sh
vbuild-nightly.sh

index c887f3a..c11fd45 100644 (file)
@@ -17,10 +17,12 @@ function pl_getDistro() {
     if [ -f "/etc/redhat-release" ] ; then
        distro=$(awk ' { print $1 } ' /etc/redhat-release)
        case $distro in Scientific*) distro="SL" ; esac
-    else
-       echo "build.common.pl_getDistro-unknown"
-       exit 1
+    elif [ -f /etc/debian_version ] ; then
+       for known in lenny squeeze wheezy jessie; do
+           grep -q $known /etc/os-release && distro=$known
+       done
     fi
+    [ -z "$distro" ] && { echo "build.common.pl_getDistro-unknown"; exit 1; }
     echo "$distro"
     return 0
 }
@@ -56,6 +58,9 @@ function pl_getReleaseName () {
        [Ss]L*)
            releasename=sl$release
            ;;
+       lenny|squeeze|wheezy|jessie)
+           releasename=$distro
+           ;;
        *)
            releasename="unknown-name-for-${pl_DISTRO}-please-edit-build.common"
            echo 1>&2 "build.common: WARNING - releasename not set for distro=$distro" 
diff --git a/config.planetlab/develsfa.pkgs b/config.planetlab/develsfa.pkgs
new file mode 100644 (file)
index 0000000..b7b142f
--- /dev/null
@@ -0,0 +1,5 @@
+# a trimmed set of devel packages for sfa only
+# primariy targets debian
+package: rpm python-rpm
+package: git make 
+package: python python-devel 
index 70b900f..15d03bb 100755 (executable)
@@ -293,13 +293,7 @@ function devel_or_vtest_tools () {
 
     pkg_method=$(package_method $fcdistro)
 
-    # check for .pkgs file based on pldistro
-    if [ -n "$VBUILD_MODE" ] ; then
-       pkgsname=devel.pkgs
-    else
-       pkgsname=vtest.pkgs
-    fi
-    pkgsfile=$(pl_locateDistroFile $DIRNAME $pldistro $pkgsname)
+    pkgsfile=$(pl_locateDistroFile $DIRNAME $pldistro $PREINSTALLED)
 
     ### install individual packages, then groups
     # get target arch - use uname -i here (we want either x86_64 or i386)
@@ -508,11 +502,19 @@ function main () {
     RESISTANT=""
     IFNAME=""
     VSERVER_OPTIONS=""
-    while getopts "f:d:p:i:rv" opt ; do
+
+    # the set of preinstalled packages - depends on vbuild or vtest
+    if [ -n "$VBUILD_MODE" ] ; then
+       PREINSTALLED=devel.pkgs
+    else
+       PREINSTALLED=vtest.pkgs
+    fi
+    while getopts "f:d:p:P:i:rv" opt ; do
        case $opt in
            f) fcdistro=$OPTARG;;
            d) pldistro=$OPTARG;;
            p) personality=$OPTARG;;
+           P) PREINSTALLED=$OPTARG;;
            i) IFNAME=$OPTARG;;
            r) RESISTANT="true";;
            v) VERBOSE="-v" ;;
index 7af4cac..8d52232 100755 (executable)
@@ -453,7 +453,7 @@ function main () {
     SIGNYUMREPO=""
 
     OPTS_ORIG=$@
-    OPTS=$(getopt -o "f:d:p:m:s:t:b:o:c:y:e:Xx:w:W:r:M:Yg:u:K:SBTnv7i:h" -l "build-branch:" -- $@)
+    OPTS=$(getopt -o "f:d:p:m:s:t:b:o:c:y:e:Xx:w:W:r:M:Yg:u:K:SBTnv7i:P:h" -l "build-branch:" -- $@)
     if [ $? != 0 ]
     then
         usage
@@ -496,6 +496,7 @@ function main () {
            -v) set -x ; VERBOSE="-v" ; shift ;;
            -7) BASE="$(date +%a|tr A-Z a-z)-@FCDISTRO@" ; shift ;;
            -i) IFNAME=$2; shift 2 ;;
+           -P) PREINSTALLED=$2; shift 2;;
            -h) usage ; shift ;;
             --) shift; break ;;
        esac
@@ -654,7 +655,7 @@ function main () {
            fi
             # Create vserver
            cd $tmpdir
-           ./vbuild-init-vserver.sh $VERBOSE -f ${FCDISTRO} -d ${PLDISTRO} -p ${PERSONALITY} -i ${IFNAME} ${BASE} 
+           ./vbuild-init-vserver.sh $VERBOSE -f ${FCDISTRO} -d ${PLDISTRO} -p ${PERSONALITY} -i ${IFNAME} -P ${PREINSTALLED} ${BASE} 
            # cleanup
            cd -
            rm -rf $tmpdir