hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1243787 - in /hadoop/common/branches/branch-1: CHANGES.txt build.xml src/native/packageBinNativeHadoop.sh src/native/packageNativeHadoop.sh src/packages/rpm/spec/hadoop.spec
Date Tue, 14 Feb 2012 06:21:02 GMT
Author: mattf
Date: Tue Feb 14 06:21:01 2012
New Revision: 1243787

URL: http://svn.apache.org/viewvc?rev=1243787&view=rev
Log:
HADOOP-8037. Binary tarball does not preserve platform info for native builds, and RPMs fail
to provide needed symlinks for libhadoop.so. Contributed by Matt Foley.

Added:
    hadoop/common/branches/branch-1/src/native/packageBinNativeHadoop.sh
      - copied unchanged from r1243785, hadoop/common/branches/branch-1.0/src/native/packageBinNativeHadoop.sh
Modified:
    hadoop/common/branches/branch-1/CHANGES.txt   (contents, props changed)
    hadoop/common/branches/branch-1/build.xml
    hadoop/common/branches/branch-1/src/native/packageNativeHadoop.sh
    hadoop/common/branches/branch-1/src/packages/rpm/spec/hadoop.spec

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1243787&r1=1243786&r2=1243787&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Tue Feb 14 06:21:01 2012
@@ -195,6 +195,10 @@ Release 1.0.1 - 2012.02.12
     MAPREDUCE-3343. TaskTracker Out of Memory because of distributed cache.
     (Zhao Yunjiong).
 
+    HADOOP-8037. Binary tarball does not preserve platform info for native builds,
+    and RPMs fail to provide needed symlinks for libhadoop.so.  (Matt Foley)
+
+
 Release 1.0.0 - 2011.12.15
 
   NEW FEATURES

Propchange: hadoop/common/branches/branch-1/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 14 06:21:01 2012
@@ -3,7 +3,7 @@
 /hadoop/common/branches/branch-0.20-security-203/CHANGES.txt:1096071,1097011,1097249,1097269,1097281,1097966,1098816,1098819,1098823,1098827,1098832,1098839,1098854,1098863,1099088,1099191,1099324,1099330,1099333,1102071,1128115
 /hadoop/common/branches/branch-0.20-security-204/CHANGES.txt:1128390,1147228,1148069,1149316,1152887,1154413,1159730,1161741
 /hadoop/common/branches/branch-0.20-security-205/CHANGES.txt:1170696,1171234,1171294,1174368,1174370,1174917,1176042,1176248,1176638,1176645,1200050,1200078,1200199,1202378,1203419,1205530
-/hadoop/common/branches/branch-1.0/CHANGES.txt:1208934,1209370,1211431,1211738,1214655,1214658,1214661,1214675,1238997,1242072,1243204
+/hadoop/common/branches/branch-1.0/CHANGES.txt:1208934,1209370,1211431,1211738,1214655,1214658,1214661,1214675,1238997,1242072,1243204,1243785
 /hadoop/core/branches/branch-0.18/CHANGES.txt:727226
 /hadoop/core/branches/branch-0.19/CHANGES.txt:713112
 /hadoop/core/trunk/CHANGES.txt:727001,727117,727191,727212,727228,727255,727869,728187,729052,729987,732385,732572,732613,732777,732838,732869,733887,734870,734916,735082,736426,738602,738697,739416,740077,740157,741703,741762,743296,743745,743816,743892,744894,745180,745268,746010,746193,746206,746227,746233,746274,746902-746903,746925,746944,746968,746970,747279,747289,747802,748084,748090,748783,749262,749318,749863,750533,752073,752514,752555,752590,752609,752834,752836,752913,752932,753112-753113,753346,754645,754847,754927,755035,755226,755348,755370,755418,755426,755790,755905,755938,755986,755998,756352,757448,757624,757849,758156,758180,759398,759932,760502,760783,761046,761482,761632,762216,762879,763107,763502,764967,765016,765809,765951,771607,772844,772876,772884,772920,773889,776638,778962,778966,779893,781720,784661,785046,785569

Modified: hadoop/common/branches/branch-1/build.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/build.xml?rev=1243787&r1=1243786&r2=1243787&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/build.xml (original)
+++ hadoop/common/branches/branch-1/build.xml Tue Feb 14 06:21:01 2012
@@ -1465,16 +1465,16 @@
   <!--                                                                    -->
   <!-- ================================================================== -->
   <target name="package" depends="compile, jar, javadoc, docs, cn-docs, api-report, examples,
tools-jar, jar-test, ant-tasks, package-librecordio"
-	  description="Build distribution">
+	  description="assembles multi-platform artifacts for distribution">
     <delete dir="${dist.dir}"/>
     <mkdir dir="${dist.dir}"/>
-    <mkdir dir="${dist.dir}/lib"/>
-    <mkdir dir="${dist.dir}/libexec"/>
-    <mkdir dir="${dist.dir}/contrib"/>
     <mkdir dir="${dist.dir}/bin"/>
+    <mkdir dir="${dist.dir}/contrib"/>
     <mkdir dir="${dist.dir}/docs"/>
     <mkdir dir="${dist.dir}/docs/api"/>
     <mkdir dir="${dist.dir}/docs/jdiff"/>
+    <mkdir dir="${dist.dir}/lib"/>
+    <mkdir dir="${dist.dir}/libexec"/>
     <mkdir dir="${dist.dir}/sbin"/>
     <mkdir dir="${dist.dir}/share/${name}/templates/conf"/>
 
@@ -1592,7 +1592,8 @@
   <!-- ================================================================== -->
   <!-- Make release tarball                                               -->
   <!-- ================================================================== -->
-  <target name="tar" depends="package" description="Make release tarball">
+  <target name="tar" depends="package" description="Make multi-platform release tarballs,
both source and binary">
+    <!-- build source tarball -->
     <macro_tar param.destfile="${build.dir}/${final.name}.tar.gz">
       <param.listofitems>
         <tarfileset dir="${build.dir}" mode="664">
@@ -1615,15 +1616,38 @@
         </tarfileset>
       </param.listofitems>
     </macro_tar>
+    <!-- build multi-platform binary tarball -->
+    <macro_tar param.destfile="${build.dir}/${final.name}-bin.tar.gz">
+      <param.listofitems>
+        <tarfileset dir="${build.dir}" mode="664">
+          <exclude name="${final.name}/src/**" />
+          <exclude name="${final.name}/docs/**" />
+          <exclude name="${final.name}/bin/*" />
+          <exclude name="${final.name}/sbin/*" />
+          <exclude name="${final.name}/libexec/*" />
+          <exclude name="${final.name}/contrib/*/bin/*" />
+          <include name="${final.name}/**" />
+        </tarfileset>
+        <tarfileset dir="${build.dir}" mode="755">
+          <include name="${final.name}/bin/*" />
+          <include name="${final.name}/sbin/*" />
+          <include name="${final.name}/libexec/*" />
+          <include name="${final.name}/contrib/*/bin/*" />
+          <include name="${final.name}/src/contrib/ec2/bin/*" />
+          <include name="${final.name}/src/contrib/ec2/bin/image/*" />
+        </tarfileset>
+      </param.listofitems>
+    </macro_tar>
   </target>
 
   <target name="bin-package" depends="compile, jar, examples, tools-jar, jar-test, ant-tasks,
package-librecordio" 
-		description="assembles artifacts for binary target">
+		description="assembles platform-specific artifacts for binary targets">
     <delete dir="${dist.dir}"/>
     <mkdir dir="${dist.dir}"/>
     <mkdir dir="${dist.dir}/bin"/>
     <mkdir dir="${dist.dir}/etc/hadoop"/>
     <mkdir dir="${dist.dir}/lib"/>
+    <mkdir dir="${dist.dir}/lib64"/>
     <mkdir dir="${dist.dir}/libexec"/>
     <mkdir dir="${dist.dir}/sbin"/>
     <mkdir dir="${dist.dir}/share/${name}/contrib"/>
@@ -1647,20 +1671,20 @@
       </fileset>
     </copy>
 
+    <condition property="lib.data.model" value="lib64" else="lib" >
+      <and>
+        <equals arg1="${sun.arch.data.model}" arg2="64" />
+      </and>
+    </condition>
+
     <exec dir="${dist.dir}" executable="sh" failonerror="true">
       <env key="BASE_NATIVE_LIB_DIR" value="${lib.dir}/native"/>
       <env key="BUILD_NATIVE_DIR" value="${build.dir}/native"/>
-      <env key="DIST_LIB_DIR" value="${dist.dir}/native"/>
-      <arg line="${native.src.dir}/packageNativeHadoop.sh"/>
+      <env key="DIST_LIB_DIR" value="${dist.dir}/${lib.data.model}"/>
+      <env key="NATIVE_PLATFORM" value="${build.platform}" />
+      <arg line="${native.src.dir}/packageBinNativeHadoop.sh"/>
     </exec>
 
-    <move todir="${dist.dir}/lib" flatten="true">
-      <fileset dir="${dist.dir}/native">
-        <include name="*/*"/>
-      </fileset>
-    </move>
-    <delete dir="${dist.dir}/native"/>
-
     <subant target="package">
       <!--Pass down the version in case its needed again and the target
       distribution directory so contribs know where to install to.-->
@@ -1715,9 +1739,9 @@
       </fileset>
     </copy>
 
-    <copy todir="${dist.dir}/lib" includeEmptyDirs="false" flatten="true">
+    <copy todir="${dist.dir}/${lib.data.model}" includeEmptyDirs="false" flatten="true">
       <fileset dir="${build.dir}/c++">
-        <include name="**/lib/*"/>
+        <include name="${build.platform}/lib/*"/>
       </fileset>
     </copy>
 
@@ -1737,7 +1761,7 @@
   </target>
 
   <target name="binary-system" depends="bin-package, jar-system, jar-test-system"
-     description="make system test package for deployment">
+     description="make platform-specific system test package for deployment">
     <copy todir="${system-test-build-dir}/${final.name}">
       <fileset dir="${dist.dir}">
       </fileset>
@@ -1747,7 +1771,7 @@
     <copy todir="${system-test-build-dir}/${final.name}"
       file="${system-test-build-dir}/${test.final.name}.jar" overwrite="true"/>
     <macro_tar 
-      param.destfile="${system-test-build-dir}/${final.name}-bin.tar.gz">
+      param.destfile="${system-test-build-dir}/${final.name}-${os.arch}-bin.tar.gz">
         <param.listofitems>
           <tarfileset dir="${system-test-build-dir}" mode="664">
             <exclude name="${final.name}/bin/*" />
@@ -1762,8 +1786,8 @@
       </macro_tar>
   </target>
   
-  <target name="binary" depends="bin-package" description="Make tarball without source
and documentation">
-    <macro_tar param.destfile="${build.dir}/${final.name}-bin.tar.gz">
+  <target name="binary" depends="bin-package" description="Make platform-specific binary
tarball without source and documentation">
+    <macro_tar param.destfile="${build.dir}/${final.name}-${os.arch}-bin.tar.gz">
       <param.listofitems>
         <tarfileset dir="${build.dir}" mode="664">
           <exclude name="${final.name}/bin/*" />
@@ -1793,13 +1817,14 @@
     </macro_tar>
     <copy todir="${package.buildroot}/SOURCES">
       <fileset dir="${build.dir}">
-        <include name="${final.name}-bin.tar.gz" />
+        <include name="${final.name}-${os.arch}-bin.tar.gz" />
       </fileset>
     </copy>
     <copy file="${src.dir}/packages/rpm/spec/hadoop.spec" todir="${package.buildroot}/SPECS">
       <filterchain>
         <replacetokens>
           <token key="final.name" value="${final.name}" />
+          <token key="build.arch" value="${os.arch}" />
           <token key="version" value="${hadoop.version}" />
           <token key="package.release" value="${package.release}" />
           <token key="package.build.dir" value="${package.build.dir}" />
@@ -1822,7 +1847,7 @@
     <delete dir="${package.buildroot}" quiet="true" verbose="false"/>
   </target>
 
-  <target name="deb" depends="ant-tasks, binary" description="Make deb package">
+  <target name="deb" depends="ant-tasks, bin-package" description="Make deb package">
     <taskdef name="deb"
            classname="org.vafer.jdeb.ant.DebAntTask">
       <classpath refid="classpath" />

Modified: hadoop/common/branches/branch-1/src/native/packageNativeHadoop.sh
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/native/packageNativeHadoop.sh?rev=1243787&r1=1243786&r2=1243787&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/native/packageNativeHadoop.sh (original)
+++ hadoop/common/branches/branch-1/src/native/packageNativeHadoop.sh Tue Feb 14 06:21:01
2012
@@ -46,7 +46,7 @@ then
   done
 fi
 
-# Copy the custom-built libraries in $BUILD_DIR
+# Copy the custom-built libraries in $BUILD_NATIVE_DIR
 if [ -d $BUILD_NATIVE_DIR ]
 then 
   for platform in `ls $BUILD_NATIVE_DIR`

Modified: hadoop/common/branches/branch-1/src/packages/rpm/spec/hadoop.spec
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/packages/rpm/spec/hadoop.spec?rev=1243787&r1=1243786&r2=1243787&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/packages/rpm/spec/hadoop.spec (original)
+++ hadoop/common/branches/branch-1/src/packages/rpm/spec/hadoop.spec Tue Feb 14 06:21:01
2012
@@ -39,6 +39,7 @@
 # Build time settings
 %define _build_dir  @package.build.dir@
 %define _final_name @final.name@
+%define _build_arch @build.arch@
 %define debug_package %{nil}
 
 # Disable brp-java-repack-jars for aspect J
@@ -71,7 +72,7 @@ Group: Development/Libraries
 Name: %{name}
 Version: %{version}
 Release: %{release} 
-Source0: %{_final_name}-bin.tar.gz
+Source0: %{_final_name}-%{_build_arch}-bin.tar.gz
 Source1: %{_final_name}-script.tar.gz
 Prefix: %{_prefix}
 Prefix: %{_conf_dir}



Mime
View raw message