Browse Source

HADOOP-7698. jsvc target fails on x86_64. Contributed by Daryn. (harsh)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1@1388980 13f79535-47bb-0310-9956-ffa450edef68
Harsh J 13 years ago
parent
commit
3071df520c
2 changed files with 10 additions and 1 deletions
  1. 2 0
      CHANGES.txt
  2. 8 1
      build.xml

+ 2 - 0
CHANGES.txt

@@ -246,6 +246,8 @@ Release 1.2.0 - unreleased
     HDFS-3961. FSEditLog preallocate() preallocated more than 1MB. (Jing Zhoa
     via suresh)
 
+    HADOOP-7698. jsvc target fails on x86_64. (daryn via harsh)
+
 Release 1.1.0 - unreleased
 
   INCOMPATIBLE CHANGES

+ 8 - 1
build.xml

@@ -172,6 +172,13 @@
 
   <property name="jsvc.build.dir" value="${build.dir}/jsvc.${os.arch}" />
   <property name="jsvc.install.dir" value="${dist.dir}/libexec" /> 
+  <exec executable="sh" outputproperty="os-name">
+    <arg value="-c" />
+    <arg value="uname -s | tr '[:upper:]' '[:lower:]'" />
+  </exec>
+  <condition property="os-arch" value="universal">
+    <equals arg1="darwin" arg2="${os-name}" />
+  </condition>
   <condition property="os-arch" value="x86_64">
     <and>
       <os arch="amd64" />
@@ -186,7 +193,7 @@
       <os arch="x86" />
     </or>
   </condition>
-  <property name="jsvc.location" value="http://archive.apache.org/dist/commons/daemon/binaries/1.0.2/linux/commons-daemon-1.0.2-bin-linux-${os-arch}.tar.gz" />
+  <property name="jsvc.location" value="http://archive.apache.org/dist/commons/daemon/binaries/1.0.2/${os-name}/commons-daemon-1.0.2-bin-${os-name}-${os-arch}.tar.gz" />
   <property name="jsvc.dest.name" value="jsvc.${os.arch}.tar.gz" />
 
   <!-- task-controller properties set here -->