diff --git a/client/pom.xml b/client/pom.xml index 6e13cc7ada9..056e560baff 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -164,7 +164,7 @@ + todir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -213,6 +255,39 @@ + + + org.apache.maven.plugins + maven-dependency-plugin + 2.5.1 + + + copy + package + + copy + + + + + org.jasypt + jasypt + 1.9.0` + false + ${project.build.directory}/pythonlibs + + + org.jasypt + jasypt + 1.8` + false + ${project.build.directory}/pythonlibs + + + + + + diff --git a/client/tomcatconf/server-nonssl.xml b/client/tomcatconf/server-nonssl.xml.in similarity index 100% rename from client/tomcatconf/server-nonssl.xml rename to client/tomcatconf/server-nonssl.xml.in diff --git a/packaging/centos63/cloud-ipallocator.rc b/packaging/centos63/cloud-ipallocator.rc new file mode 100755 index 00000000000..ffeffa342c8 --- /dev/null +++ b/packaging/centos63/cloud-ipallocator.rc @@ -0,0 +1,98 @@ +#!/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. + +# chkconfig: 35 99 10 +# description: Cloud Agent + +# WARNING: if this script is changed, then all other initscripts MUST BE changed to match it as well + +. /etc/rc.d/init.d/functions + +whatami=cloud-external-ipallocator + +# set environment variables + +SHORTNAME="$whatami" +PIDFILE=/var/run/"$whatami".pid +LOCKFILE=/var/lock/subsys/"$SHORTNAME" +LOGFILE=/var/log/cloud/ipallocator/ipallocator.log +PROGNAME="External IPAllocator" + +unset OPTIONS +[ -r /etc/sysconfig/"$SHORTNAME" ] && source /etc/sysconfig/"$SHORTNAME" +DAEMONIZE=/usr/bin/cloud-daemonize +PROG=/usr/bin/cloud-external-ipallocator.py +OPTIONS=8083 + +start() { + echo -n $"Starting $PROGNAME: " + if hostname --fqdn >/dev/null 2>&1 ; then + daemon --check=$SHORTNAME --pidfile=${PIDFILE} "$DAEMONIZE" \ + -n "$SHORTNAME" -p "$PIDFILE" -l "$LOGFILE" "$PROG" $OPTIONS + RETVAL=$? + echo + else + failure + echo + echo The host name does not resolve properly to an IP address. Cannot start "$PROGNAME". > /dev/stderr + RETVAL=9 + fi + [ $RETVAL = 0 ] && touch ${LOCKFILE} + return $RETVAL +} + +stop() { + echo -n $"Stopping $PROGNAME: " + killproc -p ${PIDFILE} $SHORTNAME # -d 10 $SHORTNAME + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PIDFILE} +} + + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status -p ${PIDFILE} $SHORTNAME + RETVAL=$? + ;; + restart) + stop + sleep 3 + start + ;; + condrestart) + if status -p ${PIDFILE} $SHORTNAME >&/dev/null; then + stop + sleep 3 + start + fi + ;; + *) + echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}" + RETVAL=3 +esac + +exit $RETVAL + diff --git a/packaging/centos63/cloud-management.rc b/packaging/centos63/cloud-management.rc new file mode 100755 index 00000000000..48c2ab44a62 --- /dev/null +++ b/packaging/centos63/cloud-management.rc @@ -0,0 +1,107 @@ +#!/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. +# +# cloud-management This shell script takes care of starting and stopping Tomcat +# +# chkconfig: - 80 20 +# +### BEGIN INIT INFO +# Provides: tomcat6 +# Required-Start: $network $syslog +# Required-Stop: $network $syslog +# Default-Start: +# Default-Stop: +# Description: Release implementation for Servlet 2.5 and JSP 2.1 +# Short-Description: start and stop tomcat +### END INIT INFO +# +# - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot +# - heavily rewritten by Deepak Bhole and Jason Corley +# + +if [ -r /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions +fi +if [ -r /lib/lsb/init-functions ]; then + . /lib/lsb/init-functions +fi + + +NAME="$(basename $0)" +stop() { + SHUTDOWN_WAIT="30" + count="0" + if [ -f /var/run/cloud-management.pid ]; then + pid=`cat /var/run/cloud-management.pid` + kill $pid &>/dev/null + until [ "$(ps --pid $pid | grep -c $pid)" -eq "0" ] || \ + [ "$count" -gt "$SHUTDOWN_WAIT" ] + do + sleep 1 + let count="${count}+1" + done + if [ "$(ps --pid $pid | grep -c $pid)" -eq "0" ]; then + log_success_msg "Stopping cloud-management:" + else + log_failure_msg "Stopping cloud-management:" + fi + else + echo "Cannot find PID file of Cloud-management" + log_failure_msg "Stopping cloud-management:" + fi +} + +set_ulimit() { + fd_limit=`ulimit -n` + if [ "$fd_limit" != "4096" ]; then + user=`whoami` + if [ $user == "root" ]; then + ulimit -n 4096 + fi + fi +} + +handle_pid_file() { + if [ "$1" -ne 0 ] ; then + echo "The pid file locates at /var/run/cloud-management.pid and lock file at /var/lock/subsys/cloud-management. + Starting cloud-management will take care of them or you can manually clean up." + fi +} + +# See how we were called. +case "$1" in + status) + status ${NAME} + RETVAL=$? + handle_pid_file $RETVAL + ;; + stop) + stop + ;; + restart) + stop + set start + set_ulimit + . /etc/rc.d/init.d/tomcat6 + ;; + *) + set_ulimit + . /etc/rc.d/init.d/tomcat6 +esac + +exit $RETVAL diff --git a/packaging/centos63/cloud-management.sysconfig b/packaging/centos63/cloud-management.sysconfig new file mode 100644 index 00000000000..15df8cdab92 --- /dev/null +++ b/packaging/centos63/cloud-management.sysconfig @@ -0,0 +1,23 @@ +# 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. + +# This file is loaded in /etc/init.d/vmopsmanagement +# ATM we only do two things here: + +dummy=1 ; export TOMCAT_CFG=/etc/cloud/management/tomcat6.conf ; . /etc/cloud/management/tomcat6.conf +#-------------------------- + diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec new file mode 100644 index 00000000000..b0f4046fef5 --- /dev/null +++ b/packaging/centos63/cloud.spec @@ -0,0 +1,278 @@ +# 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. + +%define __os_install_post %{nil} +%global debug_package %{nil} + +# DISABLE the post-percentinstall java repacking and line number stripping +# we need to find a way to just disable the java repacking and line number stripping, but not the autodeps + +Name: cloud +Summary: CloudStack IaaS Platform +#http://fedoraproject.org/wiki/PackageNamingGuidelines#Pre-Release_packages +%if "%{?_prerelease}" != "" +%define _maventag %{_ver}-SNAPSHOT +Release: %{_rel}%{dist} +%else +%define _maventag %{_ver} +Release: %{_rel}%{dist} +%endif +Version: %{_ver} +License: Apache License 2.0 +Vendor: Apache CloudStack +Packager: Apache CloudStack +Group: System Environment/Libraries +# FIXME do groups for every single one of the subpackages +Source0: %{name}-%{_maventag}.tgz +BuildRoot: %{_tmppath}/%{name}-%{_maventag}-%{release}-build + +BuildRequires: java-1.6.0-openjdk-devel +BuildRequires: tomcat6 +BuildRequires: ws-commons-util +BuildRequires: jpackage-utils +BuildRequires: gcc +BuildRequires: glibc-devel +BuildRequires: /usr/bin/mkisofs +BuildRequires: MySQL-python +#BuildRequires: maven => 3.0.0 + +%description +CloudStack is a highly-scalable elastic, open source, +intelligent IaaS cloud implementation. + +%package management-server +Summary: CloudStack management server UI +Requires: tomcat6 +Requires: java >= 1.6.0 +Requires: python +Requires: bash +Requires: bzip2 +Requires: gzip +Requires: unzip +Requires: /sbin/mount.nfs +Requires: openssh-clients +Requires: nfs-utils +Requires: wget +Requires: mysql-connector-java +Requires: ws-commons-util +Requires: jpackage-utils +Requires: sudo +Requires: /sbin/service +Requires: /sbin/chkconfig +Requires: /usr/bin/ssh-keygen +Requires: mkisofs +Requires: MySQL-python +Requires: python-paramiko +Requires: ipmitool +Requires: %{name}-setup = %{_ver} +Group: System Environment/Libraries +%description management-server +The CloudStack management server is the central point of coordination, +management, and intelligence in CloudStack. + +%package setup +Summary: CloudStack database setup scripts +Requires: java >= 1.6.0 +Requires: python +Requires: MySQL-python +Requires: %{name}-python = %{_ver} +Group: System Environment/Libraries +%description setup +The scripts and commands used to setup and configure the database + +%package python +Summary: CloudStack Python library +# FIXME nuke the archdependency +Requires: python +Group: System Environment/Libraries +%description python +The CloudStack Python library contains a few Python modules that the +CloudStack uses. + + +%prep +echo Doing CloudStack build + +%setup -q -n %{name}-%{_maventag} + +%build + +# this fixes the /usr/com bug on centos5 +%define _localstatedir /var +%define _sharedstatedir /var/lib +cp packaging/centos63/replace.properties build/replace.properties +echo VERSION=%{_maventag} >> build/replace.properties +echo PACKAGE=%{name} >> build/replace.properties +mvn package -Dsystemvm + +%install +[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} +mkdir -p ${RPM_BUILD_ROOT}%{_bindir} +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}/setup +mkdir -p ${RPM_BUILD_ROOT}/usr/share/%{name}/management/ +ln -sf /usr/share/tomcat6/bin ${RPM_BUILD_ROOT}/usr/share/%{name}/management/bin +ln -sf /etc/cloud/management ${RPM_BUILD_ROOT}/usr/share/%{name}/management/conf +ln -sf /usr/share/tomcat6/lib ${RPM_BUILD_ROOT}/usr/share/%{name}/management/lib +ln -sf /var/log/cloud/management ${RPM_BUILD_ROOT}/usr/share/%{name}/management/logs +ln -sf /var/cache/cloud/management/temp ${RPM_BUILD_ROOT}/usr/share/%{name}/management/temp +ln -sf /var/cache/cloud/management/work ${RPM_BUILD_ROOT}/usr/share/%{name}/management/work +mkdir -p ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client +mkdir -p ${RPM_BUILD_ROOT}/var/log/%{name}/management +mkdir -p ${RPM_BUILD_ROOT}/var/log/%{name}/agent +mkdir -p ${RPM_BUILD_ROOT}/var/log/%{name}/awsapi +mkdir -p ${RPM_BUILD_ROOT}/var/log/%{name}/ipallocator +mkdir -p ${RPM_BUILD_ROOT}/var/cache/%{name}/management/work +mkdir -p ${RPM_BUILD_ROOT}/var/cache/%{name}/management/temp +mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{name}/mnt +mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{name}/management +mkdir -p ${RPM_BUILD_ROOT}/etc/%{name}/management +mkdir -p ${RPM_BUILD_ROOT}/etc/%{name}/management/Catalina/localhost/client +mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d +mkdir -p ${RPM_BUILD_ROOT}/etc/sysconfig +mkdir -p ${RPM_BUILD_ROOT}/etc/%{name}/management/Catalina/localhost/client + +install -D client/target/utilities/bin/* ${RPM_BUILD_ROOT}%{_bindir} +install -D console-proxy/dist/systemvm.iso ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client/WEB-INF/classes/vms/systemvm.iso +install -D console-proxy/dist/systemvm.zip ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client/WEB-INF/classes/vms/systemvm.zip + +cp -r client/target/utilities/scripts/db/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}/setup +cp -r client/target/cloud-client-ui-4.1.0-SNAPSHOT/* ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client + +for name in db.properties log4j-cloud.xml tomcat6-nonssl.conf tomcat6-ssl.conf server-ssl.xml server-nonssl.xml \ + catalina.policy catalina.properties db-enc.properties classpath.conf tomcat-users.xml web.xml ; do + mv ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client/WEB-INF/classes/$name \ + ${RPM_BUILD_ROOT}/etc/%{name}/management/$name +done +mv ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client/WEB-INF/classes/context.xml \ + ${RPM_BUILD_ROOT}/etc/%{name}/management/Catalina/localhost/client + +mkdir -p ${RPM_BUILD_ROOT}/usr/lib/python2.6/site-packages/ +cp -r python/lib/cloudutils ${RPM_BUILD_ROOT}/usr/lib/python2.6/site-packages/ +cp -r cloud-cli/cloudtool ${RPM_BUILD_ROOT}/usr/lib/python2.6/site-packages/ +install python/lib/cloud_utils.py ${RPM_BUILD_ROOT}/usr/lib/python2.6/site-packages/cloud_utils.py +install cloud-cli/cloudapis/cloud.py ${RPM_BUILD_ROOT}/usr/lib/python2.6/site-packages/cloudapis.py +install python/bindir/cloud-external-ipallocator.py ${RPM_BUILD_ROOT}%{_bindir}/ +install -D client/target/pythonlibs/jasypt-1.9.0.jar ${RPM_BUILD_ROOT}%{_javadir}/jasypt-1.9.0.jar +install -D client/target/pythonlibs/jasypt-1.8.jar ${RPM_BUILD_ROOT}%{_javadir}/jasypt-1.8.jar + +install -D packaging/centos63/cloud-ipallocator.rc ${RPM_BUILD_ROOT}/etc/rc.d/init.d/%{name}-ipallocator +install -D packaging/centos63/cloud-management.rc ${RPM_BUILD_ROOT}/etc/rc.d/init.d/%{name}-management +install -D packaging/centos63/cloud-management.sysconfig ${RPM_BUILD_ROOT}/etc/sysconfig/%{name}-management + +chmod 770 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina +chmod 770 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost +chmod 770 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost/client +chmod 770 ${RPM_BUILD_ROOT}%{_sharedstatedir}/%{name}/mnt +chmod 770 ${RPM_BUILD_ROOT}%{_sharedstatedir}/%{name}/management +chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/cache/%{name}/management/work +chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/cache/%{name}/management/temp +chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/management +chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/agent +chmod -R ugo+x ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client/WEB-INF/classes/scripts +%clean + +[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} + + +%preun management-server +/sbin/service %{name}-management stop || true +if [ "$1" == "0" ] ; then + /sbin/chkconfig --del %{name}-management > /dev/null 2>&1 || true + /sbin/service %{name}-management stop > /dev/null 2>&1 || true +fi + +%pre management-server +id %{name} > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \ + -r -s /bin/sh -d %{_sharedstatedir}/%{name}/management %{name}|| true + +# set max file descriptors for cloud user to 4096 +sed -i /"cloud hard nofile"/d /etc/security/limits.conf +sed -i /"cloud soft nofile"/d /etc/security/limits.conf +echo "cloud hard nofile 4096" >> /etc/security/limits.conf +echo "cloud soft nofile 4096" >> /etc/security/limits.conf +rm -rf %{_localstatedir}/cache/%{name} +# user harcoded here, also hardcoded on wscript + +%post management-server +if [ "$1" == "1" ] ; then + /sbin/chkconfig --add %{name}-management > /dev/null 2>&1 || true + /sbin/chkconfig --level 345 %{name}-management on > /dev/null 2>&1 || true +fi + +if [ ! -f %{_datadir}/%{name}/management/webapps/client/WEB-INF/classes/scripts/scripts/vm/hypervisor/xenserver/vhd-util ] ; then + echo Please download vhd-util from http://download.cloud.com.s3.amazonaws.com/tools/vhd-util and put it in + echo %{_datadir}/%{name}/management/webapps/client/WEB-INF/classes/scripts/vm/hypervisor/xenserver/ +fi + +#No default permission as the permission setup is complex +%files management-server +%defattr(-,root,root,-) +%doc LICENSE +%doc NOTICE +%dir %attr(0770,root,%{name}) %{_sysconfdir}/%{name}/management/Catalina +%dir %attr(0770,root,%{name}) %{_sysconfdir}/%{name}/management/Catalina/localhost +%dir %attr(0770,root,%{name}) %{_sysconfdir}/%{name}/management/Catalina/localhost/client +%dir %{_datadir}/%{name}/management +%dir %attr(0770,root,%{name}) %{_sharedstatedir}/%{name}/mnt +%dir %attr(0770,%{name},%{name}) %{_sharedstatedir}/%{name}/management +%dir %attr(0770,root,%{name}) %{_localstatedir}/cache/%{name}/management +%dir %attr(0770,root,%{name}) %{_localstatedir}/cache/%{name}/management/work +%dir %attr(0770,root,%{name}) %{_localstatedir}/cache/%{name}/management/temp +%dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/management +%dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/agent +%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-management +%config(noreplace) %{_sysconfdir}/%{name}/management +%config(noreplace) %attr(0640,root,%{name}) %{_sysconfdir}/%{name}/management/db.properties +%config(noreplace) %{_sysconfdir}/%{name}/management/log4j-%{name}.xml +%config(noreplace) %{_sysconfdir}/%{name}/management/tomcat6-nonssl.conf +%config(noreplace) %{_sysconfdir}/%{name}/management/tomcat6-ssl.conf +%attr(0755,root,root) %{_initrddir}/%{name}-management +%attr(0755,root,root) %{_bindir}/%{name}-setup-management +%attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses +%{_datadir}/%{name}/management/* + +%files setup +%attr(0755,root,root) %{_bindir}/%{name}-setup-databases +%attr(0755,root,root) %{_bindir}/%{name}-migrate-databases +%attr(0755,root,root) %{_bindir}/%{name}-set-guest-password +%attr(0755,root,root) %{_bindir}/%{name}-set-guest-sshkey +%attr(0755,root,root) %{_bindir}/%{name}-sysvmadm +%attr(0755,root,root) %{_bindir}/%{name}-setup-encryption +%dir %{_datadir}/%{name}/setup +%{_datadir}/%{name}/setup/*.sql +%{_datadir}/%{name}/setup/db/*.sql +%{_datadir}/%{name}/setup/*.sh +%{_datadir}/%{name}/setup/server-setup.xml +%{_javadir}/jasypt-1.9.0.jar +%{_javadir}/jasypt-1.8.jar +%doc LICENSE +%doc NOTICE + +%files python +%defattr(0644,root,root,0755) +%{_prefix}/lib*/python*/site-packages/%{name}* +%attr(0755,root,root) %{_bindir}/cloud-external-ipallocator.py +%attr(0755,root,root) %{_initrddir}/cloud-ipallocator +%dir %attr(0770,root,root) %{_localstatedir}/log/%{name}/ipallocator +%doc LICENSE +%doc NOTICE + + +%changelog +* Fri Oct 03 2012 Hugo Trippaers 4.1.0 +- new style spec file + diff --git a/packaging/centos63/package.sh b/packaging/centos63/package.sh new file mode 100644 index 00000000000..f693f90df7b --- /dev/null +++ b/packaging/centos63/package.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +CWD=`pwd` +RPMDIR=$CWD/../../dist/rpmbuild + + + +VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep -v '^\['` +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/cloud-$VERSION + + +(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/cloud-$VERSION -x ) +(cd $RPMDIR/SOURCES/; tar -czf cloud-$VERSION.tgz cloud-$VERSION) + +cp cloud.spec $RPMDIR/SPECS + +(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE" ) diff --git a/packaging/centos63/replace.properties b/packaging/centos63/replace.properties new file mode 100644 index 00000000000..e6efc76278c --- /dev/null +++ b/packaging/centos63/replace.properties @@ -0,0 +1,61 @@ +# 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. + +DBUSER=cloud +DBPW=cloud +DBROOTPW= +MSLOG=vmops.log +APISERVERLOG=api.log +DBHOST=localhost +MSMNTDIR=/mnt +COMPONENTS-SPEC=components-premium.xml +AWSAPILOG=awsapi.log +REMOTEHOST=localhost +AGENTCLASSPATH= +AGENTLOG=/var/log/cloud/agent/agent.log +AGENTLOGDIR=/var/log/cloud/agent/ +AGENTSYSCONFDIR=/etc/cloud/agent +APISERVERLOG=/var/log/cloud/management/apilog.log +AWSAPILOG=/var/log/cloud/awsapi/awsapi.log +BINDIR=/usr/bin +COMMONLIBDIR=/usr/share/java +CONFIGUREVARS= +DEPSCLASSPATH= +DOCDIR= +IPALOCATORLOG=/var/log/cloud/management/ipallocator.log +JAVADIR=/usr/share/java +LIBEXECDIR=/usr/libexec +LOCKDIR=/var/lock +MSCLASSPATH= +MSCONF=/etc/cloud/management +MSENVIRON=/usr/share/cloud/management +MSLOG=/var/log/cloud/management/management-server.log +MSLOGDIR=/var/log/cloud/management/ +MSMNTDIR=/var/lib/cloud/mnt +MSUSER=cloud +PIDDIR=/var/run +PLUGINJAVADIR= +PREMIUMJAVADIR= +PYTHONDIR=/usr/lib/python2.6/site-packages/ +SERVERSYSCONFDIR=/etc/sysconfig +SETUPDATADIR=/usr/share/cloud/setup +SYSCONFDIR=/etc/sysconfig +SYSTEMCLASSPATH= +SYSTEMJARS= +USAGECLASSPATH= +USAGELOG=/var/log/cloud/usage +USAGESYSCONFDIR=/etc/sysconfig