From: Thierry Parmentelat Date: Wed, 16 Jan 2013 07:36:47 +0000 (+0100) Subject: more for building sfa on debian X-Git-Tag: 5.2.1~143 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4a1234576cd81793b5fb34cae8794b11eed995b1;p=build.git more for building sfa on debian new config.planetlab/develsfa.pkgs use -P to select another set of preinstalled packages than devel.pkgs/vtest.pkgs --- diff --git a/build.common b/build.common index c887f3a0..c11fd456 100644 --- a/build.common +++ b/build.common @@ -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 index 00000000..b7b142fb --- /dev/null +++ b/config.planetlab/develsfa.pkgs @@ -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 diff --git a/vbuild-init-vserver.sh b/vbuild-init-vserver.sh index 70b900f7..15d03bb4 100755 --- a/vbuild-init-vserver.sh +++ b/vbuild-init-vserver.sh @@ -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" ;; diff --git a/vbuild-nightly.sh b/vbuild-nightly.sh index 7af4cac5..8d52232d 100755 --- a/vbuild-nightly.sh +++ b/vbuild-nightly.sh @@ -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