Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B5D7617373 for ; Mon, 13 Oct 2014 04:41:31 +0000 (UTC) Received: (qmail 21428 invoked by uid 500); 13 Oct 2014 04:41:20 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 21363 invoked by uid 500); 13 Oct 2014 04:41:20 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 20708 invoked by uid 99); 13 Oct 2014 04:41:19 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Oct 2014 04:41:19 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8D89E90457F; Mon, 13 Oct 2014 04:41:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ke4qqq@apache.org To: commits@cloudstack.apache.org Date: Mon, 13 Oct 2014 04:41:53 -0000 Message-Id: <5b641487200446819bc00d162924fd86@git.apache.org> In-Reply-To: <6e970e9d4fb34ec3806772577f9fed13@git.apache.org> References: <6e970e9d4fb34ec3806772577f9fed13@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [36/50] [abbrv] git commit: updated refs/heads/4.5 to 50ee981 updated packge scripts to support simularot rpm build (cherry picked from commit f96c65416a2802bcf2a1f8d5a5070ffe6a29111f) Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dfdf9edd Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dfdf9edd Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dfdf9edd Branch: refs/heads/4.5 Commit: dfdf9edd529eae6169379986dd886df3e982b4a0 Parents: eb447f1 Author: rayeesn Authored: Thu Sep 18 15:02:35 2014 -0700 Committer: David Nalley Committed: Mon Oct 13 00:35:31 2014 -0400 ---------------------------------------------------------------------- packaging/centos63/cloud.spec | 21 ++++++++++++++++----- packaging/centos63/package.sh | 24 +++++++++++++++++++++--- 2 files changed, 37 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dfdf9edd/packaging/centos63/cloud.spec ---------------------------------------------------------------------- diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec index 7306d1f..e977e34 100644 --- a/packaging/centos63/cloud.spec +++ b/packaging/centos63/cloud.spec @@ -206,12 +206,23 @@ touch build/gitrev.txt echo $(git rev-parse HEAD) > build/gitrev.txt if [ "%{_ossnoss}" == "NOREDIST" -o "%{_ossnoss}" == "noredist" ] ; then - echo "Executing mvn packaging with non-redistributable libraries ..." - mvn -Pawsapi,systemvm -Dnoredist clean package + echo "Executing mvn packaging with non-redistributable libraries" + if [ "%{_sim}" == "SIMULATOR" -o "%{_sim}" == "simulator" ] ; then + echo "Executing mvn noredist packaging with simulator ..." + mvn -Pawsapi,systemvm -Dnoredist -Dsimulator clean package + else + echo "Executing mvn noredist packaging without simulator..." + mvn -Pawsapi,systemvm -Dnoredist clean package + fi else - echo "Executing mvn packaging ..." - mvn -Pawsapi,systemvm clean package -fi + if [ "%{_sim}" == "SIMULATOR" -o "%{_sim}" == "simulator" ] ; then + echo "Executing mvn default packaging simulator ..." + mvn -Pawsapi,systemvm -Dsimulator clean package + else + echo "Executing mvn default packaging without simulator ..." + mvn -Pawsapi,systemvm clean package + fi +fi %install [ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dfdf9edd/packaging/centos63/package.sh ---------------------------------------------------------------------- diff --git a/packaging/centos63/package.sh b/packaging/centos63/package.sh index 6a2d168..bbc3736 100755 --- a/packaging/centos63/package.sh +++ b/packaging/centos63/package.sh @@ -25,6 +25,7 @@ function usage() { echo "-p|--pack noredist|NOREDIST To package with non-redistributable libraries" echo "-o default|DEFAULT To build in default Operating System mode" echo "-o rhel7|RHEL7 To build for rhel7" + echo "-s simulator|SIMULATOR To build for Simulator" echo "" echo "Examples: ./package.sh -p|--pack oss|OSS" echo " ./package.sh -p|--pack noredist|NOREDIST" @@ -44,6 +45,10 @@ function packaging() { DEFOSSNOSS="-D_ossnoss $2" echo "$DEFOSSNOSS" fi + if [ -n "$3" ] ; then + DEFSIM="-D_sim $3" + echo "$DEFSIM" + fi VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep --color=none '^[0-9]\.'` if echo $VERSION | grep -q SNAPSHOT ; then @@ -90,7 +95,7 @@ if [ $# -lt 1 ] ; then packaging "default" elif [ $# -gt 0 ] ; then SHORTOPTS="hp:o:" - LONGOPTS="help,pack:,operating-system:" + LONGOPTS="help,pack:,operating-system:,simulator:" ARGS=$(getopt -s bash -u -a --options $SHORTOPTS --longoptions $LONGOPTS --name $0 -- "$@") eval set -- "$ARGS" echo "$ARGS" @@ -127,6 +132,19 @@ elif [ $# -gt 0 ] ; then fi shift ;; + -s | --simulator) + sim=$2 + echo "$sim" + if [ "$sim" == "default" -o "$sim" == "DEFAULT" ] ; then + sim = "false" + elif [ "$sim" == "simulator" -o "$sim" == "SIMULATOR" ] ; then + sim="simulator" + else + echo "Error: Incorrect value provided in package.sh script for -o, Please see help ./package.sh --help|-h for more details." + exit 1 + fi + shift + ;; -) echo "Unrecognized option..." usage @@ -142,8 +160,8 @@ elif [ $# -gt 0 ] ; then echo "Setting os to default" os="default" fi - echo "Passed OS = $os and packageval = $packageval" - packaging $os $packageval + echo "Passed OS = $os, packageval = $packageval and Simulator build = $sim" + packaging $os $packageval $sim else echo "Incorrect choice. Nothing to do." >&2 echo "Please, execute ./package.sh --help for more help"