mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix build system in preparation for repo split
This commit is contained in:
parent
05c020e1f6
commit
9d5c1f2dcf
42
build.xml
42
build.xml
@ -10,7 +10,15 @@
|
|||||||
</description>
|
</description>
|
||||||
|
|
||||||
<dirname property="base.dir" file="${ant.file.Cloud.com Cloud Stack Build Dispatch}"/>
|
<dirname property="base.dir" file="${ant.file.Cloud.com Cloud Stack Build Dispatch}"/>
|
||||||
<property name="build.dir" location="${base.dir}/build"/>
|
|
||||||
|
<condition property="build.dir" value="${base.dir}/build" else="${base.dir}/build"> <!-- silly no-op -->
|
||||||
|
<and>
|
||||||
|
<available file="cloudstack-proprietary/build/build-cloud-premium.xml"/>
|
||||||
|
<not>
|
||||||
|
<isset property="OSS"/>
|
||||||
|
</not>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
|
||||||
<condition property="build-cloud.properties.file" value="${build.dir}/override/build-cloud.properties" else="${build.dir}/build-cloud.properties">
|
<condition property="build-cloud.properties.file" value="${build.dir}/override/build-cloud.properties" else="${build.dir}/build-cloud.properties">
|
||||||
<available file="${build.dir}/override/build-cloud.properties" />
|
<available file="${build.dir}/override/build-cloud.properties" />
|
||||||
@ -21,57 +29,57 @@
|
|||||||
<property name="dist.dir" location="${base.dir}/dist"/>
|
<property name="dist.dir" location="${base.dir}/dist"/>
|
||||||
<property name="target.dir" location="${base.dir}/target"/>
|
<property name="target.dir" location="${base.dir}/target"/>
|
||||||
|
|
||||||
<condition property="build.file" value="premium/build-cloud-premium.xml" else="build-cloud.xml">
|
<condition property="build.file" value="cloudstack-proprietary/build/build-cloud-premium.xml" else="${build.dir}/build-cloud.xml">
|
||||||
<and>
|
<and>
|
||||||
<available file="build/premium/build-cloud-premium.xml"/>
|
<available file="cloudstack-proprietary/build/build-cloud-premium.xml"/>
|
||||||
<not>
|
<not>
|
||||||
<isset property="OSS"/>
|
<isset property="OSS"/>
|
||||||
</not>
|
</not>
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
<condition property="package.file" value="premium/package-premium.xml" else="package.xml">
|
<condition property="package.file" value="cloudstack-proprietary/build/package-premium.xml" else="${build.dir}/package.xml">
|
||||||
<and>
|
<and>
|
||||||
<available file="build/premium/package-premium.xml"/>
|
<available file="cloudstack-proprietary/build/package-premium.xml"/>
|
||||||
<not>
|
<not>
|
||||||
<isset property="OSS"/>
|
<isset property="OSS"/>
|
||||||
</not>
|
</not>
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
<condition property="developer.file" value="premium/developer-premium.xml" else="developer.xml">
|
<condition property="developer.file" value="cloudstack-proprietary/build/developer-premium.xml" else="${build.dir}/developer.xml">
|
||||||
<and>
|
<and>
|
||||||
<available file="build/premium/developer-premium.xml"/>
|
<available file="cloudstack-proprietary/build/developer-premium.xml"/>
|
||||||
<not>
|
<not>
|
||||||
<isset property="OSS"/>
|
<isset property="OSS"/>
|
||||||
</not>
|
</not>
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
<condition property="docs.file" value="premium/build-docs-premium.xml" else="build-docs.xml">
|
<condition property="docs.file" value="cloudstack-proprietary/build/build-docs-premium.xml" else="${build.dir}/build-docs.xml">
|
||||||
<and>
|
<and>
|
||||||
<available file="build/premium/build-docs-premium.xml"/>
|
<available file="cloudstack-proprietary/build/build-docs-premium.xml"/>
|
||||||
<not>
|
<not>
|
||||||
<isset property="OSS"/>
|
<isset property="OSS"/>
|
||||||
</not>
|
</not>
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
<condition property="test.file" value="premium/build-tests-premium.xml" else="build-tests.xml">
|
<condition property="test.file" value="cloudstack-proprietary/build/build-tests-premium.xml" else="${build.dir}/build-tests.xml">
|
||||||
<and>
|
<and>
|
||||||
<available file="build/premium/build-tests-premium.xml"/>
|
<available file="cloudstack-proprietary/build/build-tests-premium.xml"/>
|
||||||
<not>
|
<not>
|
||||||
<isset property="OSS"/>
|
<isset property="OSS"/>
|
||||||
</not>
|
</not>
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
<import file="${base.dir}/plugins/zynga/build.xml" optional='true'/>
|
<import file="${base.dir}/cloudstack-proprietary/plugins/zynga/build.xml" optional='true'/>
|
||||||
<import file="${build.dir}/${build.file}" optional="false"/>
|
<import file="${build.file}" optional="false"/>
|
||||||
<import file="${build.dir}/${docs.file}" optional="true"/>
|
<import file="${docs.file}" optional="true"/>
|
||||||
<import file="${build.dir}/${test.file}" optional="true"/>
|
<import file="${test.file}" optional="true"/>
|
||||||
<import file="${build.dir}/${package.file}" optional="true"/>
|
<import file="${package.file}" optional="true"/>
|
||||||
<import file="${build.dir}/${developer.file}" optional="true"/>
|
<import file="${developer.file}" optional="true"/>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,9 @@
|
|||||||
<property name="dep.cache.dir" location="${target.dir}/dep-cache" />
|
<property name="dep.cache.dir" location="${target.dir}/dep-cache" />
|
||||||
<property name="build.log" location="${target.dir}/ant_verbose.txt" />
|
<property name="build.log" location="${target.dir}/ant_verbose.txt" />
|
||||||
|
|
||||||
<property name="thirdparty.dir" location="${base.dir}/thirdparty" />
|
<property name="proprietary.dir" location="${base.dir}/cloudstack-proprietary" />
|
||||||
|
|
||||||
|
<property name="thirdparty.dir" location="${proprietary.dir}/thirdparty" />
|
||||||
<property name="deps.dir" location="${base.dir}/deps" />
|
<property name="deps.dir" location="${base.dir}/deps" />
|
||||||
|
|
||||||
<!-- directories for client compilation-->
|
<!-- directories for client compilation-->
|
||||||
|
|||||||
@ -236,7 +236,8 @@
|
|||||||
</delete>
|
</delete>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="sendjarfiles" depends="compile-utils, compile-core, compile-server, compile-agent, compile-console-common, compile-console-proxy, build-console-viewer">
|
<!-- The following target is OBSOLETE. If you need to add a jar file / target, go to the function def runant(target): in wscrpit_build, and list the jar file and the target in the appropriate places -->
|
||||||
|
<target name="sendjarfiles" depends="compile-utils, compile-core, compile-server, compile-agent, compile-console-common, compile-console-proxy, build-console-viewer">
|
||||||
<copy todir="${waf.artifacts}">
|
<copy todir="${waf.artifacts}">
|
||||||
<fileset dir="${target.dir}/jar"/>
|
<fileset dir="${target.dir}/jar"/>
|
||||||
</copy>
|
</copy>
|
||||||
|
|||||||
@ -35,7 +35,7 @@ BuildRequires: jpackage-utils
|
|||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
|
|
||||||
%global _premium %(tar jtvmf %{SOURCE0} '*/premium/' --occurrence=1 2>/dev/null | wc -l)
|
%global _premium %(tar jtvmf %{SOURCE0} '*/cloudstack-proprietary/' --occurrence=1 2>/dev/null | wc -l)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This is the Cloud.com Stack, a highly-scalable elastic, open source,
|
This is the Cloud.com Stack, a highly-scalable elastic, open source,
|
||||||
|
|||||||
103
wscript
103
wscript
@ -135,9 +135,41 @@ def svninfo(*args):
|
|||||||
retcode = p.wait()
|
retcode = p.wait()
|
||||||
# If the guess fails, just return nothing.
|
# If the guess fails, just return nothing.
|
||||||
if retcode: return
|
if retcode: return
|
||||||
return stdout
|
# SVN available
|
||||||
|
rev = [ x for x in stdout.splitlines() if x.startswith('Revision') ]
|
||||||
|
if not rev: rev = ''
|
||||||
|
else: rev = "SVN " + rev[0].strip()
|
||||||
|
url = [ x for x in stdout.splitlines() if x.startswith('URL') ]
|
||||||
|
if not url: url = ''
|
||||||
|
else: url = "SVN " + url[0].strip()
|
||||||
|
return rev + "\n" + url
|
||||||
|
|
||||||
def _getbuildnumber():
|
def gitinfo(*args):
|
||||||
|
try: p = _Popen(['git','remote','show','-n','origin']+list(args),stdin=PIPE,stdout=PIPE,stderr=PIPE)
|
||||||
|
except OSError,e:
|
||||||
|
if e.errno == 2: return '' # svn command is not installed
|
||||||
|
raise
|
||||||
|
stdout,stderr = p.communicate('')
|
||||||
|
retcode = p.wait()
|
||||||
|
# If the guess fails, just return nothing.
|
||||||
|
if retcode: return
|
||||||
|
stdout = [ s.strip() for s in stdout.splitlines() ]
|
||||||
|
try: url = [ s[11:] for s in stdout if s.startswith("Fetch URL") ][0]
|
||||||
|
except IndexError: url = [ s[5:] for s in stdout if s.startswith("URL") ][0]
|
||||||
|
assert url
|
||||||
|
|
||||||
|
p = _Popen(['git','log','-1']+list(args),stdin=PIPE,stdout=PIPE,stderr=PIPE)
|
||||||
|
stdout,stderr = p.communicate('')
|
||||||
|
retcode = p.wait()
|
||||||
|
if retcode: return
|
||||||
|
# If the guess fails, just return nothing.
|
||||||
|
stdout = [ s.strip() for s in stdout.splitlines() ]
|
||||||
|
commitid = [ s.split()[1] for s in stdout if s.startswith("commit") ][0]
|
||||||
|
assert commitid
|
||||||
|
|
||||||
|
return "Git Revision: %s"%commitid + "\n" + "Git URL: %s"%url
|
||||||
|
|
||||||
|
def _getbuildnumber(): # FIXME implement for git
|
||||||
n = Options.options.BUILDNUMBER
|
n = Options.options.BUILDNUMBER
|
||||||
if n:
|
if n:
|
||||||
# luntbuild prepends "build-" to the build number. we work around this here:
|
# luntbuild prepends "build-" to the build number. we work around this here:
|
||||||
@ -150,10 +182,10 @@ def _getbuildnumber():
|
|||||||
stdout = svninfo()
|
stdout = svninfo()
|
||||||
if not stdout: return ''
|
if not stdout: return ''
|
||||||
# Filter lines.
|
# Filter lines.
|
||||||
rev = [ x for x in stdout.splitlines() if x.startswith('Revision') ]
|
rev = [ x for x in stdout.splitlines() if x.startswith('SVN Revision') ]
|
||||||
if not rev: return ''
|
if not rev: return ''
|
||||||
# Parse revision number.
|
# Parse revision number.
|
||||||
rev = rev[0][10:].strip()
|
rev = rev[0][14:].strip()
|
||||||
return rev
|
return rev
|
||||||
Utils.getbuildnumber = _getbuildnumber
|
Utils.getbuildnumber = _getbuildnumber
|
||||||
|
|
||||||
@ -289,7 +321,7 @@ def _install_files_filtered(self,destdir,listoffiles,**kwargs):
|
|||||||
if _isdir(f): continue
|
if _isdir(f): continue
|
||||||
if f.endswith(".in"):
|
if f.endswith(".in"):
|
||||||
source = f ; target = f[:-3]
|
source = f ; target = f[:-3]
|
||||||
tgen = self(features='subst', source=source[len(self.path.abspath())+1:], target=target[len(self.path.abspath())+1:])
|
tgen = self(features='subst', source=source[len(self.path.abspath())+1:], target=target[len(self.path.abspath())+1:], name="filtered_%s"%source)
|
||||||
tgen.dict = self.env.get_merged_dict()
|
tgen.dict = self.env.get_merged_dict()
|
||||||
else:
|
else:
|
||||||
source = f ; target = f
|
source = f ; target = f
|
||||||
@ -466,19 +498,23 @@ def list_targets(ctx):
|
|||||||
for name in lst:
|
for name in lst:
|
||||||
print(name)
|
print(name)
|
||||||
|
|
||||||
def dist(context):
|
def decorate_dist(f):
|
||||||
'''makes a tarball for redistributing the sources -- if --skip-dist is specified, does nothing'''
|
def dist(appname='',version=''):
|
||||||
if Options.options.DONTDIST:
|
'''makes a tarball for redistributing the sources -- if --skip-dist is specified, does nothing'''
|
||||||
appname=Utils.g_module.APPNAME
|
if Options.options.DONTDIST:
|
||||||
version=Utils.g_module.VERSION
|
if not appname: appname=Utils.g_module.APPNAME
|
||||||
tmp_folder=appname+'-'+version
|
if not version: version=Utils.g_module.VERSION
|
||||||
if Scripting.g_gz in['gz','bz2']:
|
tmp_folder=appname+'-'+version
|
||||||
arch_name=tmp_folder+'.tar.'+Scripting.g_gz
|
if Scripting.g_gz in['gz','bz2']:
|
||||||
|
arch_name=tmp_folder+'.tar.'+Scripting.g_gz
|
||||||
|
else:
|
||||||
|
arch_name=tmp_folder+'.'+'zip'
|
||||||
|
Logs.info('New archive skipped: %s'%(arch_name))
|
||||||
|
return arch_name
|
||||||
else:
|
else:
|
||||||
arch_name=tmp_folder+'.'+'zip'
|
return f(appname,version)
|
||||||
return arch_name
|
return dist
|
||||||
else:
|
Scripting.dist = decorate_dist(Scripting.dist)
|
||||||
return Scripting.dist()
|
|
||||||
|
|
||||||
def dist_hook():
|
def dist_hook():
|
||||||
# Clean the GARBAGE that clogs our repo to the tune of 300 MB
|
# Clean the GARBAGE that clogs our repo to the tune of 300 MB
|
||||||
@ -486,33 +522,16 @@ def dist_hook():
|
|||||||
# package over 90 MB in size
|
# package over 90 MB in size
|
||||||
[ shutil.rmtree(f) for f in _glob(_join("*","bin")) if _isdir(f) ]
|
[ shutil.rmtree(f) for f in _glob(_join("*","bin")) if _isdir(f) ]
|
||||||
[ shutil.rmtree(f) for f in [ _join("build","deploy") ] if _isdir(f) ]
|
[ shutil.rmtree(f) for f in [ _join("build","deploy") ] if _isdir(f) ]
|
||||||
[ shutil.rmtree(f) for f in _glob(_join("thirdparty","*")) if _isdir(f) ]
|
[ shutil.rmtree(f) for f in _glob(_join("cloudstack-proprietary","thirdparty","*")) if _isdir(f) ]
|
||||||
[ shutil.rmtree(_join("tools",f)) for f in [
|
[ shutil.rmtree(f) for f in [ _join("cloudstack-proprietary","tools") ] if _isdir(f) ]
|
||||||
"bin",
|
|
||||||
"meld",
|
|
||||||
"misc",
|
|
||||||
"tomcat",
|
|
||||||
"pdfdoclet",
|
|
||||||
"taglets",
|
|
||||||
] if _exists(_join("tools",f)) ]
|
|
||||||
|
|
||||||
|
|
||||||
if Options.options.OSS:
|
if Options.options.OSS:
|
||||||
[ shutil.rmtree(f) for f in "premium usage thirdparty console-proxy-premium test agent-simulator core-premium plugins vendor".split() if _exists(f) ]
|
[ shutil.rmtree(f) for f in "cloudstack-proprietary".split() if _exists(f) ]
|
||||||
[ shutil.rmtree(f) for f in [ _join("build","premium") ] if _exists(f) ]
|
|
||||||
|
|
||||||
stdout = svninfo("..")
|
stdout = svninfo("..") or gitinfo()
|
||||||
if stdout:
|
if stdout:
|
||||||
# SVN available
|
|
||||||
rev = [ x for x in stdout.splitlines() if x.startswith('Revision') ]
|
|
||||||
if not rev: rev = ''
|
|
||||||
else: rev = "SVN " + rev[0].strip()
|
|
||||||
url = [ x for x in stdout.splitlines() if x.startswith('URL') ]
|
|
||||||
if not url: url = ''
|
|
||||||
else: url = "SVN " + url[0].strip()
|
|
||||||
f = file("sccs-info","w")
|
f = file("sccs-info","w")
|
||||||
if rev: f.write("%s\n"%rev)
|
f.write(stdout)
|
||||||
if url: f.write("%s\n"%url)
|
|
||||||
f.flush()
|
f.flush()
|
||||||
f.close()
|
f.close()
|
||||||
else:
|
else:
|
||||||
@ -560,12 +579,11 @@ def rpm(context):
|
|||||||
if not Options.options.blddir: outputdir = _join(context.curdir,blddir,"rpmbuild")
|
if not Options.options.blddir: outputdir = _join(context.curdir,blddir,"rpmbuild")
|
||||||
else: outputdir = _join(_abspath(Options.options.blddir),"rpmbuild")
|
else: outputdir = _join(_abspath(Options.options.blddir),"rpmbuild")
|
||||||
Utils.pprint("GREEN","Building RPMs")
|
Utils.pprint("GREEN","Building RPMs")
|
||||||
if not Options.options.DONTDIST: Scripting.dist()
|
tarball = Scripting.dist()
|
||||||
|
|
||||||
#if _isdir(outputdir): shutil.rmtree(outputdir)
|
#if _isdir(outputdir): shutil.rmtree(outputdir)
|
||||||
for a in ["RPMS/noarch","SRPMS","BUILD","SPECS","SOURCES"]: mkdir_p(_join(outputdir,a))
|
for a in ["RPMS/noarch","SRPMS","BUILD","SPECS","SOURCES"]: mkdir_p(_join(outputdir,a))
|
||||||
specfile = "%s.spec"%APPNAME
|
specfile = "%s.spec"%APPNAME
|
||||||
tarball = "%s-%s.tar.%s"%(APPNAME,VERSION,Scripting.g_gz)
|
|
||||||
shutil.copy(tarball,_join(outputdir,"SOURCES"))
|
shutil.copy(tarball,_join(outputdir,"SOURCES"))
|
||||||
checkdeps = lambda: c(["rpmbuild","--define","_topdir %s"%outputdir,"--nobuild",specfile])
|
checkdeps = lambda: c(["rpmbuild","--define","_topdir %s"%outputdir,"--nobuild",specfile])
|
||||||
dorpm = lambda: c(["rpmbuild","--define","_topdir %s"%outputdir,"-ba",specfile]+buildnumber+prerelease)
|
dorpm = lambda: c(["rpmbuild","--define","_topdir %s"%outputdir,"-ba",specfile]+buildnumber+prerelease)
|
||||||
@ -604,11 +622,10 @@ def deb(context):
|
|||||||
if not Options.options.blddir: outputdir = _join(context.curdir,blddir,"debbuild")
|
if not Options.options.blddir: outputdir = _join(context.curdir,blddir,"debbuild")
|
||||||
else: outputdir = _join(_abspath(Options.options.blddir),"debbuild")
|
else: outputdir = _join(_abspath(Options.options.blddir),"debbuild")
|
||||||
Utils.pprint("GREEN","Building DEBs")
|
Utils.pprint("GREEN","Building DEBs")
|
||||||
if not Options.options.DONTDIST: Scripting.dist()
|
tarball = Scripting.dist()
|
||||||
|
|
||||||
#if _isdir(outputdir): shutil.rmtree(outputdir)
|
#if _isdir(outputdir): shutil.rmtree(outputdir)
|
||||||
mkdir_p(outputdir)
|
mkdir_p(outputdir)
|
||||||
tarball = "%s-%s.tar.%s"%(APPNAME,VERSION,Scripting.g_gz)
|
|
||||||
f = tarfile.open(tarball,'r:bz2')
|
f = tarfile.open(tarball,'r:bz2')
|
||||||
f.extractall(path=outputdir)
|
f.extractall(path=outputdir)
|
||||||
srcdir = "%s/%s-%s"%(outputdir,APPNAME,VERSION)
|
srcdir = "%s/%s-%s"%(outputdir,APPNAME,VERSION)
|
||||||
|
|||||||
@ -35,7 +35,7 @@ for e in required_env:
|
|||||||
|
|
||||||
sourcedir = bld.srcnode.abspath()
|
sourcedir = bld.srcnode.abspath()
|
||||||
builddir = bld.path.abspath(bld.env)
|
builddir = bld.path.abspath(bld.env)
|
||||||
buildpremium = _exists(_join(sourcedir,"premium"))
|
buildpremium = _exists(_join(sourcedir,"cloudstack-proprietary"))
|
||||||
filelist = bld.path.ant_glob
|
filelist = bld.path.ant_glob
|
||||||
|
|
||||||
sccsinfo = _join(sourcedir,"sccs-info")
|
sccsinfo = _join(sourcedir,"sccs-info")
|
||||||
@ -153,7 +153,7 @@ if bld.env.DISTRO not in ['Windows','Mac']:
|
|||||||
# ================ Third-party / dependency installation ===============
|
# ================ Third-party / dependency installation ===============
|
||||||
|
|
||||||
bld.install_files('${JAVADIR}','deps/*.jar')
|
bld.install_files('${JAVADIR}','deps/*.jar')
|
||||||
if buildpremium: bld.install_files('${PREMIUMJAVADIR}','thirdparty/*.jar')
|
if buildpremium: bld.install_files('${PREMIUMJAVADIR}','cloudstack-proprietary/thirdparty/*.jar')
|
||||||
|
|
||||||
# =================== End 3rdparty/dep install ========================
|
# =================== End 3rdparty/dep install ========================
|
||||||
|
|
||||||
@ -265,20 +265,20 @@ deps = " ".join( Utils.to_list(
|
|||||||
) )
|
) )
|
||||||
thirdparties = " ".join( Utils.to_list(
|
thirdparties = " ".join( Utils.to_list(
|
||||||
"""
|
"""
|
||||||
thirdparty/xmlrpc-client-3.1.3.jar
|
cloudstack-proprietary/thirdparty/xmlrpc-client-3.1.3.jar
|
||||||
thirdparty/xmlrpc-common-3.1.3.jar
|
cloudstack-proprietary/thirdparty/xmlrpc-common-3.1.3.jar
|
||||||
thirdparty/ws-commons-util-1.0.2.jar
|
cloudstack-proprietary/thirdparty/ws-commons-util-1.0.2.jar
|
||||||
thirdparty/log4j-1.2.15.jar
|
cloudstack-proprietary/thirdparty/log4j-1.2.15.jar
|
||||||
thirdparty/gson-1.3.jar
|
cloudstack-proprietary/thirdparty/gson-1.3.jar
|
||||||
thirdparty/apache-log4j-extras-1.0.jar
|
cloudstack-proprietary/thirdparty/apache-log4j-extras-1.0.jar
|
||||||
thirdparty/commons-httpclient-3.1.jar
|
cloudstack-proprietary/thirdparty/commons-httpclient-3.1.jar
|
||||||
thirdparty/commons-logging-1.1.1.jar
|
cloudstack-proprietary/thirdparty/commons-logging-1.1.1.jar
|
||||||
thirdparty/commons-collections-3.2.1.jar
|
cloudstack-proprietary/thirdparty/commons-collections-3.2.1.jar
|
||||||
thirdparty/commons-codec-1.4.jar
|
cloudstack-proprietary/thirdparty/commons-codec-1.4.jar
|
||||||
thirdparty/commons-pool-1.4.jar
|
cloudstack-proprietary/thirdparty/commons-pool-1.4.jar
|
||||||
thirdparty/libvirt-0.4.5.jar
|
cloudstack-proprietary/thirdparty/libvirt-0.4.5.jar
|
||||||
thirdparty/jna.jar
|
cloudstack-proprietary/thirdparty/jna.jar
|
||||||
thirdparty/cglib-nodep-2.2.jar
|
cloudstack-proprietary/thirdparty/cglib-nodep-2.2.jar
|
||||||
"""
|
"""
|
||||||
) )
|
) )
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ patterns = Utils.to_list(
|
|||||||
scripts/storage/secondary/*sh
|
scripts/storage/secondary/*sh
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
premiumpatterns = patterns + ["console-proxy-premium/certs/**"]
|
premiumpatterns = patterns + ["cloudstack-proprietary/console-proxy-premium/certs/**"]
|
||||||
|
|
||||||
artifacts = "target/jar/VMOpsConsoleApplet.jar " + " ".join( "target/jar/cloud-%s.jar"%j for j in "console-proxy console-common agent utils api core".split() )
|
artifacts = "target/jar/VMOpsConsoleApplet.jar " + " ".join( "target/jar/cloud-%s.jar"%j for j in "console-proxy console-common agent utils api core".split() )
|
||||||
premiumartifacts = artifacts + " target/jar/cloud-console-proxy-premium.jar"
|
premiumartifacts = artifacts + " target/jar/cloud-console-proxy-premium.jar"
|
||||||
@ -316,16 +316,24 @@ def zip_up(task):
|
|||||||
for inp in task.inputs:
|
for inp in task.inputs:
|
||||||
if inp.id&3==Node.BUILD:
|
if inp.id&3==Node.BUILD:
|
||||||
src = inp.bldpath(task.env)
|
src = inp.bldpath(task.env)
|
||||||
srcname = "/".join(src.split("/")[1:])
|
srcname = src
|
||||||
|
srcname = "/".join(srcname.split("/")[1:]) # chop off default/
|
||||||
if srcname.startswith("target/jar"): srcname = "/".join(srcname.split("/")[2:]) # chop off target/jar
|
if srcname.startswith("target/jar"): srcname = "/".join(srcname.split("/")[2:]) # chop off target/jar
|
||||||
else:
|
else:
|
||||||
src = inp.srcpath(task.env)
|
src = inp.srcpath(task.env)
|
||||||
srcname = "/".join(src.split("/")[2:])
|
srcname = src
|
||||||
if srcname.startswith('scripts/run') or srcname.startswith('scripts/config_ssl') \
|
srcname = "/".join(srcname.split("/")[1:]) # chop off ../
|
||||||
or srcname.startswith('scripts/config_auth') or srcname.startswith('scripts/ssvm-check'): srcname = "/".join(srcname.split("/")[1:])
|
if srcname.startswith("cloudstack-proprietary"): srcname = "/".join(srcname.split("/")[1:]) # chop off cloudstack proprietary
|
||||||
elif srcname.startswith('storage'): srcname = "scripts/" + srcname
|
srcname = "/".join(srcname.split("/")[1:]) # chop off project name
|
||||||
elif srcname.startswith('VMOpsConsoleApplet'): srcname = "applet/" + srcname
|
# post-process the paths
|
||||||
elif srcname.startswith('certs'): srcname = srcname
|
if True in [ srcname.startswith(strt) for strt in [ 'scripts/run','scripts/config_ssl','scripts/config_auth','scripts/ssvm-check' ] ]:
|
||||||
|
srcname = "/".join(srcname.split("/")[1:])
|
||||||
|
elif srcname.startswith('storage'):
|
||||||
|
srcname = "scripts/" + srcname
|
||||||
|
elif srcname.startswith('VMOpsConsoleApplet'):
|
||||||
|
srcname = "applet/" + srcname
|
||||||
|
elif srcname.startswith('certs'):
|
||||||
|
srcname = srcname
|
||||||
z.write(src,srcname)
|
z.write(src,srcname)
|
||||||
z.close()
|
z.close()
|
||||||
return 0
|
return 0
|
||||||
@ -428,9 +436,9 @@ for src,tgt,inst in zip(src_files,subst_files,inst_files):
|
|||||||
|
|
||||||
# ================== Subst / installation of scripts in bin directories ========================
|
# ================== Subst / installation of scripts in bin directories ========================
|
||||||
|
|
||||||
bld.install_files_filtered("${LIBEXECDIR}","*/libexec/*",chmod=0755)
|
bld.install_files_filtered("${LIBEXECDIR}","*/libexec/* cloudstack-proprietary/*/libexec/*",chmod=0755)
|
||||||
bld.install_files_filtered("${BINDIR}","*/bindir/*",chmod=0755)
|
bld.install_files_filtered("${BINDIR}","*/bindir/* cloudstack-proprietary/*/bindir/*",chmod=0755)
|
||||||
bld.install_files_filtered("${SBINDIR}","*/sbindir/*",chmod=0755)
|
bld.install_files_filtered("${SBINDIR}","*/sbindir/* cloudstack-proprietary/*/sbindir/*",chmod=0755)
|
||||||
|
|
||||||
# ================== End subst / installation of scripts in bin directories ========================
|
# ================== End subst / installation of scripts in bin directories ========================
|
||||||
|
|
||||||
@ -440,16 +448,16 @@ bld.install_files_filtered("${SBINDIR}","*/sbindir/*",chmod=0755)
|
|||||||
# build / install declarations of test project
|
# build / install declarations of test project
|
||||||
if buildpremium:
|
if buildpremium:
|
||||||
proj = 'test'
|
proj = 'test'
|
||||||
start_path = bld.path.find_dir("test/scripts")
|
start_path = bld.path.find_dir("cloudstack-proprietary/test/scripts")
|
||||||
bld.install_files('${LIBDIR}/${PACKAGE}/test',
|
bld.install_files('${LIBDIR}/${PACKAGE}/test',
|
||||||
start_path.ant_glob("**",src=True,bld=False,dir=False,flat=True),
|
start_path.ant_glob("**",src=True,bld=False,dir=False,flat=True),
|
||||||
cwd=start_path,relative_trick=True)
|
cwd=start_path,relative_trick=True)
|
||||||
start_path = bld.path.find_dir("test/metadata")
|
start_path = bld.path.find_dir("cloudstack-proprietary/test/metadata")
|
||||||
bld.install_files('${SHAREDSTATEDIR}/${PACKAGE}/test',
|
bld.install_files('${SHAREDSTATEDIR}/${PACKAGE}/test',
|
||||||
start_path.ant_glob("**",src=True,bld=False,dir=False,flat=True),
|
start_path.ant_glob("**",src=True,bld=False,dir=False,flat=True),
|
||||||
cwd=start_path,relative_trick=True)
|
cwd=start_path,relative_trick=True)
|
||||||
if not Options.options.PRESERVECONFIG:
|
if not Options.options.PRESERVECONFIG:
|
||||||
bld.install_files('${SYSCONFDIR}/%s/%s'%(bld.env.PACKAGE,proj),'%s/conf/*'%proj) # install config
|
bld.install_files('${SYSCONFDIR}/%s/%s'%(bld.env.PACKAGE,proj),'cloudstack-proprietary/test/conf/*')
|
||||||
|
|
||||||
# build / install declarations of server project <- this is actually now in client project
|
# build / install declarations of server project <- this is actually now in client project
|
||||||
bld.install_files("${MSENVIRON}/webapps/client/WEB-INF",'client/WEB-INF/web.xml') # install web.xml file
|
bld.install_files("${MSENVIRON}/webapps/client/WEB-INF",'client/WEB-INF/web.xml') # install web.xml file
|
||||||
@ -464,7 +472,6 @@ bld.install_files("${AGENTLIBDIR}",
|
|||||||
cwd=start_path,relative_trick=True)
|
cwd=start_path,relative_trick=True)
|
||||||
if not Options.options.PRESERVECONFIG:
|
if not Options.options.PRESERVECONFIG:
|
||||||
bld.install_files_filtered("${AGENTSYSCONFDIR}","%s/conf/*"%proj)
|
bld.install_files_filtered("${AGENTSYSCONFDIR}","%s/conf/*"%proj)
|
||||||
bld.install_files_filtered("${BINDIR}","%s/bindir/*"%proj,chmod=0755)
|
|
||||||
|
|
||||||
# build / install declarations of client UI project
|
# build / install declarations of client UI project
|
||||||
|
|
||||||
@ -521,12 +528,13 @@ bld.install_files("${MSENVIRON}/webapps/client/scripts", "ui/scripts/cloud.min.j
|
|||||||
|
|
||||||
# substitute and install generic tomcat config
|
# substitute and install generic tomcat config
|
||||||
if not Options.options.PRESERVECONFIG:
|
if not Options.options.PRESERVECONFIG:
|
||||||
bld.install_files_filtered("${MSCONF}",filelist("*/tomcatconf/*"))
|
bld.install_files_filtered("${MSCONF}","*/tomcatconf/* cloudstack-proprietary/*/tomcatconf/*")
|
||||||
bld.install_files("${MSCONF}",'client/tomcatconf/db.properties',chmod=0640)
|
bld.install_files("${MSCONF}",'client/tomcatconf/db.properties',chmod=0640)
|
||||||
bld.setownership("${MSCONF}/db.properties","root",bld.env.MSUSER)
|
bld.setownership("${MSCONF}/db.properties","root",bld.env.MSUSER)
|
||||||
|
|
||||||
# apply distro-specific config on top of the 'all' generic cloud-management config
|
# apply distro-specific config on top of the 'all' generic cloud-management config
|
||||||
distrospecificdirs=_glob(_join("*","distro",bld.env.DISTRO.lower(),"*"))
|
globspec = _join("*","distro",bld.env.DISTRO.lower(),"*") # matches premium/distro/centos/SYSCONFDIR
|
||||||
|
distrospecificdirs=_glob(globspec) + _glob(_join("cloudstack-proprietary",globspec))
|
||||||
for dsdir in distrospecificdirs:
|
for dsdir in distrospecificdirs:
|
||||||
start_path = bld.srcnode.find_dir(dsdir)
|
start_path = bld.srcnode.find_dir(dsdir)
|
||||||
subpath,varname = _split(dsdir)
|
subpath,varname = _split(dsdir)
|
||||||
@ -547,7 +555,7 @@ if buildpremium:
|
|||||||
bld.symlink_as("${USAGESYSCONFDIR}/db.properties",Utils.subst_vars("${MSCONF}/db.properties",bld.env))
|
bld.symlink_as("${USAGESYSCONFDIR}/db.properties",Utils.subst_vars("${MSCONF}/db.properties",bld.env))
|
||||||
|
|
||||||
# install db data files
|
# install db data files
|
||||||
bld.install_files_filtered("${SETUPDATADIR}",filelist("*/db/* cloudstack-proprietary/db/*",excl=Node.exclude_regs + "\ncloud-gate\ncloud-bridge"))
|
bld.install_files_filtered("${SETUPDATADIR}",filelist("*/db/* cloudstack-proprietary/*/db/*",excl=Node.exclude_regs + "\ncloud-gate\ncloud-bridge"))
|
||||||
|
|
||||||
# ================== End installation of scripts / bindirs / configuration files ===========================
|
# ================== End installation of scripts / bindirs / configuration files ===========================
|
||||||
|
|
||||||
|
|||||||
@ -234,7 +234,7 @@ conf.env.USAGECLASSPATH = pathsep.join(usageclasspath)
|
|||||||
compilecp = []# list(srcdirs)
|
compilecp = []# list(srcdirs)
|
||||||
# 2.a) the thirdparty/ directory in the source if on Windows / Mac
|
# 2.a) the thirdparty/ directory in the source if on Windows / Mac
|
||||||
# 2.b) the deps/ directory in the source if on Linux
|
# 2.b) the deps/ directory in the source if on Linux
|
||||||
if conf.env.DISTRO in ["Windows","Mac"]: compilecp+= _glob(_join("thirdparty","*.jar"))
|
if conf.env.DISTRO in ["Windows","Mac"]: compilecp+= _glob(_join("cloudstack-proprietary","thirdparty","*.jar"))
|
||||||
else: compilecp+= _glob(_join("deps","*.jar"))
|
else: compilecp+= _glob(_join("deps","*.jar"))
|
||||||
# 3. the system classpath (system-installed JARs)
|
# 3. the system classpath (system-installed JARs)
|
||||||
compilecp+= [ conf.env.SYSTEMCLASSPATH ]
|
compilecp+= [ conf.env.SYSTEMCLASSPATH ]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user