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 C0309101E4 for ; Mon, 24 Nov 2014 17:15:42 +0000 (UTC) Received: (qmail 75145 invoked by uid 500); 24 Nov 2014 17:15:42 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 75106 invoked by uid 500); 24 Nov 2014 17:15:42 -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 75097 invoked by uid 99); 24 Nov 2014 17:15:42 -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, 24 Nov 2014 17:15:42 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 39F09A16C6F; Mon, 24 Nov 2014 17:15:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hugo@apache.org To: commits@cloudstack.apache.org Date: Mon, 24 Nov 2014 17:15:42 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: updated refs/heads/feature/centos7-rpm to 870ede5 Repository: cloudstack Updated Branches: refs/heads/feature/centos7-rpm 744134d6a -> 870ede5a0 (forced update) http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/environment.properties ---------------------------------------------------------------------- diff --git a/packaging/centos7/tomcat7/environment.properties b/packaging/centos7/tomcat7/environment.properties new file mode 100644 index 0000000..3254cf6 --- /dev/null +++ b/packaging/centos7/tomcat7/environment.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# management server compile-time environment parameters + +paths.script=/usr/share/cloudstack-common +mount.parent=/var/cloudstack/mnt +cloud-stack-components-specification=components.xml http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/log4j-cloud.xml ---------------------------------------------------------------------- diff --git a/packaging/centos7/tomcat7/log4j-cloud.xml b/packaging/centos7/tomcat7/log4j-cloud.xml new file mode 100644 index 0000000..ef7904c --- /dev/null +++ b/packaging/centos7/tomcat7/log4j-cloud.xml @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/server.xml ---------------------------------------------------------------------- diff --git a/packaging/centos7/tomcat7/server.xml b/packaging/centos7/tomcat7/server.xml new file mode 100644 index 0000000..6a3c974 --- /dev/null +++ b/packaging/centos7/tomcat7/server.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/tomcat-users.xml ---------------------------------------------------------------------- diff --git a/packaging/centos7/tomcat7/tomcat-users.xml b/packaging/centos7/tomcat7/tomcat-users.xml new file mode 100644 index 0000000..81422a0 --- /dev/null +++ b/packaging/centos7/tomcat7/tomcat-users.xml @@ -0,0 +1,31 @@ + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/centos7/tomcat7/web.xml ---------------------------------------------------------------------- diff --git a/packaging/centos7/tomcat7/web.xml b/packaging/centos7/tomcat7/web.xml new file mode 100644 index 0000000..44b6eab --- /dev/null +++ b/packaging/centos7/tomcat7/web.xml @@ -0,0 +1,1188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + default + org.apache.catalina.servlets.DefaultServlet + + debug + 0 + + + listings + false + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jsp + org.apache.jasper.servlet.JspServlet + + fork + false + + + xpoweredBy + false + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + default + / + + + + + + + + jsp + *.jsp + + + + jsp + *.jspx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 30 + + + + + + + + + + + + abs + audio/x-mpeg + + + ai + application/postscript + + + aif + audio/x-aiff + + + aifc + audio/x-aiff + + + aiff + audio/x-aiff + + + aim + application/x-aim + + + art + image/x-jg + + + asf + video/x-ms-asf + + + asx + video/x-ms-asf + + + au + audio/basic + + + avi + video/x-msvideo + + + avx + video/x-rad-screenplay + + + bcpio + application/x-bcpio + + + bin + application/octet-stream + + + bmp + image/bmp + + + body + text/html + + + cdf + application/x-cdf + + + cer + application/x-x509-ca-cert + + + class + application/java + + + cpio + application/x-cpio + + + csh + application/x-csh + + + css + text/css + + + dib + image/bmp + + + doc + application/msword + + + dtd + application/xml-dtd + + + dv + video/x-dv + + + dvi + application/x-dvi + + + eps + application/postscript + + + etx + text/x-setext + + + exe + application/octet-stream + + + gif + image/gif + + + gtar + application/x-gtar + + + gz + application/x-gzip + + + hdf + application/x-hdf + + + hqx + application/mac-binhex40 + + + htc + text/x-component + + + htm + text/html + + + html + text/html + + + hqx + application/mac-binhex40 + + + ief + image/ief + + + jad + text/vnd.sun.j2me.app-descriptor + + + jar + application/java-archive + + + java + text/plain + + + jnlp + application/x-java-jnlp-file + + + jpe + image/jpeg + + + jpeg + image/jpeg + + + jpg + image/jpeg + + + js + text/javascript + + + jsf + text/plain + + + jspf + text/plain + + + kar + audio/x-midi + + + latex + application/x-latex + + + m3u + audio/x-mpegurl + + + mac + image/x-macpaint + + + man + application/x-troff-man + + + mathml + application/mathml+xml + + + me + application/x-troff-me + + + mid + audio/x-midi + + + midi + audio/x-midi + + + mif + application/x-mif + + + mov + video/quicktime + + + movie + video/x-sgi-movie + + + mp1 + audio/x-mpeg + + + mp2 + audio/x-mpeg + + + mp3 + audio/x-mpeg + + + mp4 + video/mp4 + + + mpa + audio/x-mpeg + + + mpe + video/mpeg + + + mpeg + video/mpeg + + + mpega + audio/x-mpeg + + + mpg + video/mpeg + + + mpv2 + video/mpeg2 + + + ms + application/x-wais-source + + + nc + application/x-netcdf + + + oda + application/oda + + + + odb + application/vnd.oasis.opendocument.database + + + + odc + application/vnd.oasis.opendocument.chart + + + + odf + application/vnd.oasis.opendocument.formula + + + + odg + application/vnd.oasis.opendocument.graphics + + + + odi + application/vnd.oasis.opendocument.image + + + + odm + application/vnd.oasis.opendocument.text-master + + + + odp + application/vnd.oasis.opendocument.presentation + + + + ods + application/vnd.oasis.opendocument.spreadsheet + + + + odt + application/vnd.oasis.opendocument.text + + + ogg + application/ogg + + + + otg + application/vnd.oasis.opendocument.graphics-template + + + + oth + application/vnd.oasis.opendocument.text-web + + + + otp + application/vnd.oasis.opendocument.presentation-template + + + + ots + application/vnd.oasis.opendocument.spreadsheet-template + + + + ott + application/vnd.oasis.opendocument.text-template + + + pbm + image/x-portable-bitmap + + + pct + image/pict + + + pdf + application/pdf + + + pgm + image/x-portable-graymap + + + pic + image/pict + + + pict + image/pict + + + pls + audio/x-scpls + + + png + image/png + + + pnm + image/x-portable-anymap + + + pnt + image/x-macpaint + + + ppm + image/x-portable-pixmap + + + ppt + application/vnd.ms-powerpoint + + + pps + application/vnd.ms-powerpoint + + + ps + application/postscript + + + psd + image/x-photoshop + + + qt + video/quicktime + + + qti + image/x-quicktime + + + qtif + image/x-quicktime + + + ras + image/x-cmu-raster + + + rdf + application/rdf+xml + + + rgb + image/x-rgb + + + rm + application/vnd.rn-realmedia + + + roff + application/x-troff + + + rtf + application/rtf + + + rtx + text/richtext + + + sh + application/x-sh + + + shar + application/x-shar + + + + smf + audio/x-midi + + + sit + application/x-stuffit + + + snd + audio/basic + + + src + application/x-wais-source + + + sv4cpio + application/x-sv4cpio + + + sv4crc + application/x-sv4crc + + + svg + image/svg+xml + + + svgz + image/svg+xml + + + swf + application/x-shockwave-flash + + + t + application/x-troff + + + tar + application/x-tar + + + tcl + application/x-tcl + + + tex + application/x-tex + + + texi + application/x-texinfo + + + texinfo + application/x-texinfo + + + tif + image/tiff + + + tiff + image/tiff + + + tr + application/x-troff + + + tsv + text/tab-separated-values + + + txt + text/plain + + + ulw + audio/basic + + + ustar + application/x-ustar + + + vxml + application/voicexml+xml + + + xbm + image/x-xbitmap + + + xht + application/xhtml+xml + + + xhtml + application/xhtml+xml + + + xls + application/vnd.ms-excel + + + xml + application/xml + + + xpm + image/x-xpixmap + + + xsl + application/xml + + + xslt + application/xslt+xml + + + xul + application/vnd.mozilla.xul+xml + + + xwd + image/x-xwindowdump + + + vsd + application/x-visio + + + wav + audio/x-wav + + + + wbmp + image/vnd.wap.wbmp + + + + wml + text/vnd.wap.wml + + + + wmlc + application/vnd.wap.wmlc + + + + wmls + text/vnd.wap.wmlscript + + + + wmlscriptc + application/vnd.wap.wmlscriptc + + + wmv + video/x-ms-wmv + + + wrl + x-world/x-vrml + + + wspolicy + application/wspolicy+xml + + + Z + application/x-compress + + + z + application/x-compress + + + zip + application/zip + + + + + + + + + + + + + + + + index.html + index.htm + index.jsp + + + http://git-wip-us.apache.org/repos/asf/cloudstack/blob/870ede5a/packaging/package.sh ---------------------------------------------------------------------- diff --git a/packaging/package.sh b/packaging/package.sh new file mode 100755 index 0000000..96b4afa --- /dev/null +++ b/packaging/package.sh @@ -0,0 +1,156 @@ +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +function usage() { + echo "" + echo "usage: ./package.sh [-p|--pack] [-h|--help] [-o|--operating-system] [ARGS]" + echo "" + echo "The commonly used Arguments are:" + echo "-p|--pack oss|OSS To package with only redistributable libraries (default)" + echo "-p|--pack noredist|NOREDIST To package with non-redistributable libraries" + echo "-d centos7|centos63 To build a package for a distribution" + echo "-s simulator|SIMULATOR To build for Simulator" + echo "" + echo "Examples: ./package.sh -p|--pack oss|OSS" + echo " ./package.sh -p|--pack noredist|NOREDIST" + echo " ./package.sh (Default OSS)" + exit 1 +} + +# packaging +# $1 redist flag +# $2 simulator flag +# $3 distribution name +function packaging() { + CWD=`pwd` + RPMDIR=$CWD/../dist/rpmbuild + PACK_PROJECT=cloudstack + if [ -n "$1" ] ; then + DEFOSSNOSS="-D_ossnoss $1" + fi + if [ -n "$2" ] ; then + DEFSIM="-D_sim $2" + fi + + DISTRO=$3 + + 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 + REALVER=`echo $VERSION | cut -d '-' -f 1` + DEFVER="-D_ver $REALVER" + DEFPRE="-D_prerelease 1" + DEFREL="-D_rel SNAPSHOT" + else + REALVER=`echo $VERSION` + DEFVER="-D_ver $REALVER" + DEFREL="-D_rel 1" + fi + + echo Preparing to package Apache CloudStack ${VERSION} + + mkdir -p $RPMDIR/SPECS + mkdir -p $RPMDIR/BUILD + mkdir -p $RPMDIR/RPMS + mkdir -p $RPMDIR/SRPMS + mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION + + echo ". preparing source tarball" + (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) + + echo ". executing rpmbuild" + cp $DISTRO/cloud.spec $RPMDIR/SPECS + + (cd $RPMDIR; rpmbuild --define "_topdir $RPMDIR" "${DEFVER}" "${DEFREL}" ${DEFPRE+"${DEFPRE}"} ${DEFOSSNOSS+"$DEFOSSNOSS"} ${DEFSIM+"$DEFSIM"} -bb SPECS/cloud.spec) + + if [ $? -ne 0 ]; then + echo "RPM Build Failed " + exit 1 + else + echo "RPM Build Done" + fi + exit + +} + + +TARGETDISTRO="" +sim="" +packageval="" + + SHORTOPTS="hp:d:" + LONGOPTS="help,pack:,simulator:distribution" + ARGS=$(getopt -s bash -u -a --options $SHORTOPTS --longoptions $LONGOPTS --name $0 -- "$@") + eval set -- "$ARGS" + echo "$ARGS" + while [ $# -gt 0 ] ; do + case "$1" in + -h | --help) + usage + exit 0 + ;; + -p | --pack) + echo "Doing CloudStack Packaging ....." + packageval=$2 + echo "$packageval" + if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then + packageval = "" + elif [ "$packageval" == "noredist" -o "$packageval" == "NOREDIST" ] ; then + packageval="noredist" + else + echo "Error: Incorrect value provided in package.sh script, Please see help ./package.sh --help|-h for more details." + exit 1 + 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 + ;; + -d | --distribution) + TARGETDISTRO=$2 + shift + ;; + -) + echo "Unrecognized option..." + usage + exit 1 + ;; + *) + shift + ;; + esac + done + + if [ -z "$TARGETDISTRO" ] + then + echo "Missing target distribution" + usage + exit 1 + fi + + packaging "$packageval" "$sim" "$TARGETDISTRO"