cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject [25/26] git commit: updated refs/heads/affinity_groups to 90172c3
Date Tue, 09 Apr 2013 22:49:05 GMT
packaging: sync master and 4.1 for rpm packaging


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/265cf42f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/265cf42f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/265cf42f

Branch: refs/heads/affinity_groups
Commit: 265cf42ffeb3ca304b781319ac635fd324d59ffa
Parents: ff74cbb
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Fri Apr 5 21:00:25 2013 +0200
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Fri Apr 5 21:18:16 2013 +0200

----------------------------------------------------------------------
 packaging/centos63/cloud-agent.rc |    3 +-
 packaging/centos63/cloud.spec     |   18 +--
 packaging/centos63/package.sh     |  218 +++++++++++++++++---------------
 3 files changed, 122 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/265cf42f/packaging/centos63/cloud-agent.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-agent.rc b/packaging/centos63/cloud-agent.rc
index 6d53473..b378488 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -67,7 +67,8 @@ export CLASSPATH="/usr/share/java/commons-daemon.jar:/usr/share/java/jna.jar:$AC
 start() {
     echo -n $"Starting $PROGNAME: "
     if hostname --fqdn >/dev/null 2>&1 ; then
-        $JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" -errfile SYSLOG $CLASS
+        $JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" \
+            -errfile $LOGDIR/cloudstack-agent.err -outfile $LOGDIR/cloudstack-agent.out $CLASS
         RETVAL=$?
         echo
     else

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/265cf42f/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index a3e0de2..9ce46c9 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -153,13 +153,9 @@ Provides: cloud-aws-api
 %description awsapi
 Apache Cloudstack AWS API compatibility wrapper
 
-#%package docs
-#Summary: Apache CloudStack documentation
-#%description docs
-#Apache CloudStack documentations
-
 %prep
 echo Doing CloudStack build
+
 %setup -q -n %{name}-%{_maventag}
 
 %build
@@ -169,10 +165,10 @@ echo VERSION=%{_maventag} >> build/replace.properties
 echo PACKAGE=%{name} >> build/replace.properties
 
 if [ "%{_ossnoss}" == "NONOSS" -o "%{_ossnoss}" == "nonoss" ] ; then
-    echo "Packaging nonoss components"
+    echo "Executing mvn packaging for NONOSS ..."
    mvn -Pawsapi,systemvm -Dnonoss package
 else
-    echo "Packaging oss components"
+    echo "Executing mvn packaging for OSS ..."
    mvn -Pawsapi package -Dsystemvm
 fi
 
@@ -329,6 +325,10 @@ install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-cli-
 %clean
 [ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
 
+%pre awsapi
+id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user"
\
+     -r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true
+
 %preun management
 /sbin/service cloudstack-management stop || true
 if [ "$1" == "0" ] ; then
@@ -544,10 +544,6 @@ fi
 %{_defaultdocdir}/%{name}-cli-%{version}/LICENSE
 %{_defaultdocdir}/%{name}-cli-%{version}/NOTICE
 
-#%files docs
-#%doc LICENSE
-#%doc NOTICE
-
 %files awsapi
 %defattr(0644,cloud,cloud,0755)
 %{_datadir}/%{name}-bridge/webapps/awsapi

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/265cf42f/packaging/centos63/package.sh
----------------------------------------------------------------------
diff --git a/packaging/centos63/package.sh b/packaging/centos63/package.sh
index 802cf7e..d9d5b1c 100755
--- a/packaging/centos63/package.sh
+++ b/packaging/centos63/package.sh
@@ -20,126 +20,134 @@ function usage() {
  echo ""
  echo "usage: ./package.sh [-p|--pack] [-h|--help] [ARGS]"
  echo ""
- echo "oss|OSS         To package oss components only"
- echo "nonoss|NONOSS   To package non-oss and oss components"
+ echo "The commonly used Arguments are:"
+ echo "oss|OSS         To package OSS specific"
+ echo "nonoss|NONOSS   To package NONOSS specific"
  echo ""
  echo "Examples: ./package.sh -p|--pack oss|OSS"
  echo "          ./package.sh -p|--pack nonoss|NONOSS"
  echo "          ./package.sh (Default OSS)"
- echo ""
  exit 1
 }
 
 function defaultPackaging() {
- CWD=`pwd`
- RPMDIR=$CWD/../../dist/rpmbuild
- PACK_PROJECT=cloudstack
- VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version)
| grep '^[0-9]\.'`
-
- if echo $VERSION | grep SNAPSHOT ; then
-   REALVER=`echo $VERSION | cut -d '-' -f 1`
-   DEFVER="-D_ver $REALVER"
-   DEFPRE="-D_prerelease 1"
-   DEFREL="-D_rel SNAPSHOT"
- else
-   DEFVER="-D_ver $REALVER"
-   DEFPRE=
-   DEFREL=
- fi
- mkdir -p $RPMDIR/SPECS
- mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
-
- (cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
-x)
- (cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
-
- cp cloud.spec $RPMDIR/SPECS
-
- (cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE")
-
- exit
+CWD=`pwd`
+RPMDIR=$CWD/../../dist/rpmbuild
+PACK_PROJECT=cloudstack
+
+VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version)
| grep '^[0-9]\.'`
+if echo $VERSION | grep SNAPSHOT ; then
+  REALVER=`echo $VERSION | cut -d '-' -f 1`
+  DEFVER="-D_ver $REALVER"
+  DEFPRE="-D_prerelease 1"
+  DEFREL="-D_rel SNAPSHOT"
+else
+  DEFVER="-D_ver $REALVER"
+  DEFPRE=
+  DEFREL=
+fi
+
+mkdir -p $RPMDIR/SPECS
+mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
+
+(cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
-x )
+(cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
+
+cp cloud.spec $RPMDIR/SPECS
+
+(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE")
+
+exit
 }
 
 function packaging() {
- CWD=`pwd`
- RPMDIR=$CWD/../../dist/rpmbuild
- PACK_PROJECT=cloudstack
- DEFOSSNOSS="-D_ossnoss $packageval"
- VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version)
| grep '^[0-9]\.'`
-
- if echo $VERSION | grep SNAPSHOT ; then
-   REALVER=`echo $VERSION | cut -d '-' -f 1`
-   DEFVER="-D_ver $REALVER"
-   DEFPRE="-D_prerelease 1"
-   DEFREL="-D_rel SNAPSHOT"
- else
-   DEFVER="-D_ver $REALVER"
-   DEFPRE=
-   DEFREL=
- fi
-
- mkdir -p $RPMDIR/SPECS
- mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
-
- (cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
-x )
- (cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
-
- cp cloud.spec $RPMDIR/SPECS
-
- (cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE"
"$DEFOSSNOSS")
-
- exit
+	 
+CWD=`pwd`
+RPMDIR=$CWD/../../dist/rpmbuild
+PACK_PROJECT=cloudstack
+DEFOSSNOSS="-D_ossnoss $packageval"
+
+
+VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version)
| grep '^[0-9]\.'`
+if echo $VERSION | grep SNAPSHOT ; then
+  REALVER=`echo $VERSION | cut -d '-' -f 1`
+  DEFVER="-D_ver $REALVER"
+  DEFPRE="-D_prerelease 1"
+  DEFREL="-D_rel SNAPSHOT"
+else
+  DEFVER="-D_ver $REALVER"
+  DEFPRE=
+  DEFREL=
+fi
+
+mkdir -p $RPMDIR/SPECS
+mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
+
+
+(cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
-x )
+(cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
+
+cp cloud.spec $RPMDIR/SPECS
+
+(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE"
"$DEFOSSNOSS")
+
+exit
 }
 
 
 if [ $# -lt 1 ] ; then
-  defaultPackaging
+
+	defaultPackaging
+
 elif [ $# -gt 0 ] ; then
-  SHORTOPTS="hp:"
-  LONGOPTS="help,pack:"
-  ARGS=$(getopt -s bash -u -a --options $SHORTOPTS  --longoptions $LONGOPTS --name $0 --
"$@" )
-
-  eval set -- "$ARGS"
-
-  while [ $# -gt 0 ] ; do
-   case "$1" in
-    -h | --help)
-       usage
-       exit 0
-       ;;
-    -p | --pack)
-       echo "Packaging Apache CloudStack"
-      packageval=$2
-      if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then
-         defaultPackaging
-      elif [ "$packageval" == "nonoss" -o "$packageval" == "NONOSS" ] ; then
-         packaging
-      else
-         echo "Error: Incorrect usage. See help ./package.sh --help|-h."
-         exit 1
-      fi
-      ;;
-    -)
-       echo "Unrecognized option."
-      usage
-      exit 1
-       ;;
-    --)
-       echo "Unrecognized option."
-      usage
-      exit 1
-       ;;
-    -*)
-      echo "Unrecognized option."
-     usage
-     exit 1
-     ;;
-     *)
-       shift
-       break
-       ;;
-    esac
-  done
+
+	SHORTOPTS="hp:"
+	LONGOPTS="help,pack:"
+
+	ARGS=$(getopt -s bash -u -a --options $SHORTOPTS  --longoptions $LONGOPTS --name $0 -- "$@"
)
+	eval set -- "$ARGS"
+
+	while [ $# -gt 0 ] ; do
+	case "$1" in
+	-h | --help)
+		usage
+		exit 0
+		;;
+	-p | --pack)
+		echo "Doing CloudStack Packaging ....."
+		packageval=$2
+		if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then
+			defaultPackaging
+		elif [ "$packageval" == "nonoss" -o "$packageval" == "NONOSS" ] ; then
+			packaging
+		else
+			echo "Error: Incorrect value provided in package.sh script, Please see help ./package.sh
--help|-h for more details."
+			exit 1
+		fi
+		;;
+	-)
+		echo "Unrecognized option..."
+		usage
+		exit 1
+		;;
+	--)
+		echo "Unrecognized option..."
+		usage
+		exit 1
+		;;
+	-*)
+		echo "Unrecognized option..."
+		usage
+		exit 1
+		;;
+	*)
+		shift
+		break
+		;;
+	esac
+	done
+
 else
-   echo "Incorrect choice. Nothing to do." >&2
-   echo "./package.sh --help for details"
+	echo "Incorrect choice.  Nothing to do." >&2
+	echo "Please, execute ./package.sh --help for more help"
 fi


Mime
View raw message