Author: trader
Date: 2010-03-15 16:13:15 -0700 (Mon, 15 Mar 2010)
New Revision: 14380
URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14380
Modified:
branches/HQ_4_2_0_PATCH/installer/data/setup-db-common.xml
Log:
[HQ-2090] HQ installer doesn't set ant property data.dir
The summary is right, the property wasn't set at all. The real issue is that if you download and untar as root, and then try to install as another user, the install fails because part of the install creates a tmp directory under the install tree. That still exists, but now at least the error complains about filesystem permissions, not some non-existent property.
Modified: branches/HQ_4_2_0_PATCH/installer/data/setup-db-common.xml
===================================================================
--- branches/HQ_4_2_0_PATCH/installer/data/setup-db-common.xml 2010-03-15 18:47:10 UTC (rev 14379)
+++ branches/HQ_4_2_0_PATCH/installer/data/setup-db-common.xml 2010-03-15 23:13:15 UTC (rev 14380)
@@ -6,6 +6,8 @@
<project name="setup-db-common" default="direct-error" basedir=".">
+ <property name="data.dir" value="${install.dir}/data/tmp"/>
+
&hibernate-build;
<target name="direct-error">
@@ -15,6 +17,16 @@
</fail>
</target>
+ <target name="check.data.dir">
+ <available property="has.data.dir" file="${data.dir}"/>
+ <antcall target="create.datatmp"/>
+ </target>
+
+ <target name="create.datatmp" unless="${data.dir}">
+ <mkdir dir="${install.dir}/data/tmp"/>
+ <property name="data.dir" value="${install.dir}/data/tmp"/>
+ </target>
+
<target name="dbsetup-process-file">
<property name="server.jdbc-url" value="${server.database-url}"/>
@@ -64,6 +76,7 @@
</target>
<target name="dbsetup" depends="hibernate-setup">
+ <antcall target="check.data.dir"/>
<antcall target="dbsetup-process-file">
<param name="dbsetupfile" value="${data.dir}/data.xml"/>
<param name="data" value="true"/>
@@ -124,6 +137,7 @@
</target>
<target name="replace-dbservice-values">
+ <antcall target="check.data.dir"/>
<echo>using url: ${server.database-url} </echo>
<property name="server.deploy"
value="${server.installdir}/server-${version}/hq-engine/server/default/deploy"/>
|