mirror of https://github.com/apache/cloudstack.git
fixing rpmbuild CS-14509
This commit is contained in:
parent
177c5277c8
commit
859e367380
|
|
@ -91,9 +91,6 @@
|
|||
<property name="scripts.dir" location="${base.dir}/scripts" />
|
||||
<property name="scripts.target.dir" location="${target.dir}/scripts"/>
|
||||
|
||||
<!-- directories for console proxy compilation-->
|
||||
<property name="console-proxy.dir" location="${base.dir}/console-proxy" />
|
||||
<property name="console-proxy.dist.dir" location="${dist.dir}/console-proxy" />
|
||||
|
||||
<property name="tools.dir" location="${base.dir}/tools" />
|
||||
<!-- <property name="antcontrib.dir" location="${tools.dir}/tools/ant/apache-ant-1.8.0/lib" />-->
|
||||
|
|
@ -112,7 +109,6 @@
|
|||
<property name="utils.jar" value="cloud-utils.jar" />
|
||||
<property name="server.jar" value="cloud-server.jar" />
|
||||
<property name="agent.jar" value="cloud-agent.jar" />
|
||||
<property name="console-proxy.jar" value="cloud-console-proxy.jar" />
|
||||
<property name="api.jar" value="cloud-api.jar"/>
|
||||
<property name="vmware-base.jar" value="cloud-vmware-base.jar" />
|
||||
|
||||
|
|
@ -310,95 +306,8 @@
|
|||
</copy>
|
||||
</target>
|
||||
|
||||
<path id="console-proxy.classpath">
|
||||
<path refid="deps.classpath" />
|
||||
<path refid="dist.classpath" />
|
||||
</path>
|
||||
<target name="compile-console-proxy" depends="-init" description="Compile the console proxy.">
|
||||
<compile-java jar.name="${console-proxy.jar}" top.dir="${console-proxy.dir}" classpath="console-proxy.classpath" >
|
||||
<include-files>
|
||||
<fileset dir="${console-proxy.dir}/certs">
|
||||
<include name="*.keystore" />
|
||||
<include name="*.crt" />
|
||||
<include name="*.key" />
|
||||
</fileset>
|
||||
</include-files>
|
||||
</compile-java>
|
||||
</target>
|
||||
|
||||
<target name="copy-console-proxy" depends="-init">
|
||||
<property name="copyto.dir" value="${console-proxy.dist.dir}" />
|
||||
<mkdir dir="${copyto.dir}" />
|
||||
<mkdir dir="${copyto.dir}/conf" />
|
||||
<mkdir dir="${copyto.dir}/logs" />
|
||||
<mkdir dir="${copyto.dir}/applet" />
|
||||
<mkdir dir="${copyto.dir}/images" />
|
||||
<mkdir dir="${copyto.dir}/js" />
|
||||
<mkdir dir="${copyto.dir}/ui" />
|
||||
<mkdir dir="${copyto.dir}/css" />
|
||||
<mkdir dir="${copyto.dir}/certs" />
|
||||
|
||||
<copy todir="${copyto.dir}">
|
||||
<fileset dir="${deps.dir}">
|
||||
<include name="log4j-1.2.15.jar" />
|
||||
<include name="apache-log4j-extras-1.0.jar" />
|
||||
<include name="gson.jar" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${copyto.dir}">
|
||||
<fileset dir="${jar.dir}">
|
||||
<include name="cloud-console-proxy.jar" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${copyto.dir}/conf">
|
||||
<fileset dir="${production.dir}/consoleproxy/conf">
|
||||
<include name="log4j-cloud.xml" />
|
||||
<include name="consoleproxy.properties" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${copyto.dir}/images">
|
||||
<fileset dir="${console-proxy.dir}/images">
|
||||
<include name="*.jpg" />
|
||||
<include name="*.gif" />
|
||||
<include name="*.png" />
|
||||
<include name="*.cur" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${copyto.dir}/js">
|
||||
<fileset dir="${console-proxy.dir}/js">
|
||||
<include name="*.js" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${copyto.dir}/ui">
|
||||
<fileset dir="${console-proxy.dir}/ui">
|
||||
<include name="*.ftl" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${copyto.dir}/css">
|
||||
<fileset dir="${console-proxy.dir}/css">
|
||||
<include name="*.css" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${copyto.dir}/certs">
|
||||
<fileset dir="${console-proxy.dir}/certs">
|
||||
<include name="*.keystore" />
|
||||
<include name="*.crt" />
|
||||
<include name="*.key" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="build-console-proxy" depends="-init, compile-console-proxy, copy-console-proxy">
|
||||
<copy todir="${console-proxy.dist.dir}">
|
||||
<fileset dir="${console-proxy.dir}/scripts">
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${console-proxy.dist.dir}/conf">
|
||||
<fileset dir="${console-proxy.dir}/conf">
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<path id="agent.classpath">
|
||||
<path refid="deps.classpath" />
|
||||
|
|
@ -412,7 +321,7 @@
|
|||
<compile-java jar.name="${agent.jar}" top.dir="${agent.dir}" classpath="agent.classpath" />
|
||||
</target>
|
||||
|
||||
<target name="build-agent" depends="-init, build-console-proxy, compile-agent">
|
||||
<target name="build-agent" depends="-init, compile-agent">
|
||||
<mkdir dir="${agent.dist.dir}" />
|
||||
<mkdir dir="${agent.dist.dir}/scripts" />
|
||||
<mkdir dir="${agent.dist.dir}/conf" />
|
||||
|
|
@ -463,7 +372,7 @@
|
|||
|
||||
<target name="build-servers" depends="-init, build-server" />
|
||||
|
||||
<target name="build-opensource" depends="-init, build-server, build-agent, build-console-proxy, build-scripts, build-ui, build-ovm, package-oss-systemvm-iso">
|
||||
<target name="build-opensource" depends="-init, build-server, build-agent, build-scripts, build-ui, build-ovm, package-oss-systemvm-iso">
|
||||
<copy overwrite="true" todir="${dist.dir}">
|
||||
<fileset dir="${base.dir}/build/deploy/">
|
||||
<include name="deploy-agent.sh" />
|
||||
|
|
|
|||
|
|
@ -209,8 +209,6 @@
|
|||
<include name="${api.jar}" />
|
||||
<include name="${vmware-base.jar}" />
|
||||
</zipfileset>
|
||||
<zipfileset dir="${console-proxy.dist.dir}" filemode="555">
|
||||
</zipfileset>
|
||||
<zipfileset dir="${scripts.dir}/storage/secondary" prefix="scripts/storage/secondary" filemode="555">
|
||||
<exclude name="**/.project" />
|
||||
<exclude name="**/.classpath" />
|
||||
|
|
@ -281,7 +279,7 @@
|
|||
</target>
|
||||
|
||||
<!-- 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-proxy">
|
||||
<target name="sendjarfiles" depends="compile-utils, compile-core, compile-server, compile-agent">
|
||||
<copy todir="${waf.artifacts}">
|
||||
<fileset dir="${target.dir}/jar"/>
|
||||
</copy>
|
||||
|
|
|
|||
|
|
@ -290,6 +290,9 @@ echo Doing CloudStack build
|
|||
[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
|
||||
# we put the build number again here, otherwise state checking will cause an almost-full recompile
|
||||
./waf install --destdir=$RPM_BUILD_ROOT --nochown --build-number=%{?_build_number}
|
||||
rm $RPM_BUILD_ROOT/etc/rc.d/init.d/cloud-console-proxy
|
||||
rm $RPM_BUILD_ROOT/usr/bin/cloud-setup-console-proxy
|
||||
rm $RPM_BUILD_ROOT/usr/libexec/console-proxy-runner
|
||||
|
||||
%clean
|
||||
|
||||
|
|
|
|||
10
wscript
10
wscript
|
|
@ -815,11 +815,11 @@ def run_agent(args):
|
|||
_check_call("sudo",[_join(conf.env.LIBEXECDIR,"agent-runner")])
|
||||
|
||||
@throws_command_errors
|
||||
def run_console_proxy(args):
|
||||
"""runs the console proxy""" # FIXME: make this use the run/debug options
|
||||
conf = _getbuildcontext()
|
||||
if not _exists(_join(conf.env.LIBEXECDIR,"console-proxy-runner")): Scripting.install(conf)
|
||||
_check_call("sudo",[_join(conf.env.LIBEXECDIR,"console-proxy-runner")])
|
||||
#def run_console_proxy(args):
|
||||
# """runs the console proxy""" # FIXME: make this use the run/debug options
|
||||
# conf = _getbuildcontext()
|
||||
# if not _exists(_join(conf.env.LIBEXECDIR,"console-proxy-runner")): Scripting.install(conf)
|
||||
# _check_call("sudo",[_join(conf.env.LIBEXECDIR,"console-proxy-runner")])
|
||||
|
||||
def simulate_agent(args):
|
||||
"""runs the agent simulator, compiling and installing files as needed
|
||||
|
|
|
|||
|
|
@ -88,18 +88,18 @@ def build_jars ():
|
|||
bld.install_files ('${JAVADIR}', ant_jars)
|
||||
|
||||
|
||||
def build_python_and_daemonize ():
|
||||
obj = bld(features = 'py',name='pythonmodules')
|
||||
obj.find_sources_in_dirs('python/lib', exts=['.py'])
|
||||
|
||||
if bld.env.DISTRO not in ['Windows','Mac']:
|
||||
# build / install declarations of the daemonization utility - except for Windows
|
||||
bld(
|
||||
name='daemonize',
|
||||
features='cc cprogram',
|
||||
source='daemonize/daemonize.c',
|
||||
target='daemonize/cloud-daemonize'
|
||||
)
|
||||
#def build_python_and_daemonize ():
|
||||
# obj = bld(features = 'py',name='pythonmodules')
|
||||
# obj.find_sources_in_dirs('python/lib', exts=['.py'])
|
||||
#
|
||||
# if bld.env.DISTRO not in ['Windows','Mac']:
|
||||
# # build / install declarations of the daemonization utility - except for Windows
|
||||
# bld(
|
||||
# name='daemonize',
|
||||
# features='cc cprogram',
|
||||
# source='daemonize/daemonize.c',
|
||||
# target='daemonize/cloud-daemonize'
|
||||
# )
|
||||
|
||||
def build_premium ():
|
||||
if buildpremium: bld.recurse(["cloudstack-proprietary/"],'build')
|
||||
|
|
@ -120,16 +120,16 @@ def build_dependences ():
|
|||
start_path = bld.path.find_dir ("cloudstack-proprietary/premium/deps")
|
||||
bld.install_files('${JAVADIR}',start_path.ant_glob("*.jar", excl = excludes), cwd=start_path)
|
||||
|
||||
def build_console_proxy ():
|
||||
#def build_console_proxy ():
|
||||
# binary unsubstitutable files:
|
||||
start_path = bld.path.find_dir ("console-proxy")
|
||||
bld.install_files("${CPLIBDIR}",start_path.ant_glob("images/**",src=True,bld=False,dir=False,flat=True),cwd=start_path,relative_trick=True)
|
||||
# start_path = bld.path.find_dir ("console-proxy")
|
||||
# bld.install_files("${CPLIBDIR}",start_path.ant_glob("images/**",src=True,bld=False,dir=False,flat=True),cwd=start_path,relative_trick=True)
|
||||
|
||||
# text substitutable files (substitute with tokens from the environment bld.env):
|
||||
bld.substitute('css/** js/** ui/** scripts/**',install_to="${CPLIBDIR}", cwd=start_path)
|
||||
# bld.substitute('css/** js/** ui/** scripts/**',install_to="${CPLIBDIR}", cwd=start_path)
|
||||
|
||||
# config files (do not replace them if preserve config option is true)
|
||||
if not Options.options.PRESERVECONFIG: bld.install_files_filtered("${CPSYSCONFDIR}","conf.dom0/*", cwd=start_path)
|
||||
# if not Options.options.PRESERVECONFIG: bld.install_files_filtered("${CPSYSCONFDIR}","conf.dom0/*", cwd=start_path)
|
||||
|
||||
def build_patches ():
|
||||
# done here because the patches require substituted files
|
||||
|
|
@ -139,7 +139,6 @@ def build_patches ():
|
|||
for virttech in Utils.to_list(start_path.ant_glob("*",dir=True)):
|
||||
if virttech in ["shared"]: continue
|
||||
patchfiles = start_path.ant_glob('shared/** %s/debian/config/**'%virttech,src=False,bld=True,dir=False,flat=True)
|
||||
|
||||
tmp = bld.path
|
||||
bld.path = start_path
|
||||
tgen = bld(
|
||||
|
|
@ -177,7 +176,7 @@ def build_dirs_symlinks ():
|
|||
("${MSLOGDIR}",0770,x),
|
||||
("${AGENTLOGDIR}",0770,x),
|
||||
("${USAGELOGDIR}",0770,x),
|
||||
("${CPLOGDIR}",0770,x),
|
||||
# ("${CPLOGDIR}",0770,x),
|
||||
("${IPALLOCATORLOGDIR}",0770,x),
|
||||
("${LOCALSTATEDIR}/cache/${MSPATH}",0770,x),
|
||||
("${LOCALSTATEDIR}/cache/${MSPATH}/temp",0770,x),
|
||||
|
|
@ -205,10 +204,10 @@ def build_dirs_symlinks ():
|
|||
('${MSENVIRON}/temp', '${LOCALSTATEDIR}/cache/${MSPATH}/temp'),
|
||||
('${MSENVIRON}/work','${LOCALSTATEDIR}/cache/${MSPATH}/work'),
|
||||
('${MSENVIRON}/conf', '${SYSCONFDIR}/${MSPATH}'),
|
||||
("${AGENTLIBDIR}/css", '${CPLIBDIR}/css'),
|
||||
("${AGENTLIBDIR}/images", '${CPLIBDIR}/images'),
|
||||
("${AGENTLIBDIR}/js", '${CPLIBDIR}/js'),
|
||||
("${AGENTLIBDIR}/ui", '${CPLIBDIR}/ui'),
|
||||
# ("${AGENTLIBDIR}/css", '${CPLIBDIR}/css'),
|
||||
# ("${AGENTLIBDIR}/images", '${CPLIBDIR}/images'),
|
||||
# ("${AGENTLIBDIR}/js", '${CPLIBDIR}/js'),
|
||||
# ("${AGENTLIBDIR}/ui", '${CPLIBDIR}/ui'),
|
||||
("${MSCONF}/server.xml", '${MSCONF}/server-nonssl.xml'),
|
||||
("${MSCONF}/tomcat6.conf", '${MSCONF}/tomcat6-nonssl.conf'),
|
||||
]
|
||||
|
|
@ -388,11 +387,10 @@ def build_usage_dir ():
|
|||
# Get started to execute here
|
||||
build_utils_docs ()
|
||||
build_jars ()
|
||||
build_python_and_daemonize ()
|
||||
#build_python_and_daemonize ()
|
||||
build_premium ()
|
||||
#build_thirdparty_dir()
|
||||
build_dependences ()
|
||||
build_console_proxy ()
|
||||
#build_patches ()
|
||||
build_systemvm_patch ()
|
||||
build_dirs_symlinks ()
|
||||
|
|
|
|||
Loading…
Reference in New Issue