Browse Source

HADOOP-11885. hadoop-dist dist-layout-stitching.sh does not work with dash. (wang)

(cherry picked from commit 7673d4f205b26a6a26cfc47d999ece96f3c42782)

 Conflicts:
	hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/pom.xml
	hadoop-mapreduce-project/pom.xml
Andrew Wang 10 years ago
parent
commit
bdaa0fed13

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -155,6 +155,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-11242. Record the time of calling in tracing span of
     IPC server. (Masatake Iwasaki via aajisaka)
 
+    HADOOP-11885. hadoop-dist dist-layout-stitching.sh does not work with dash.
+    (wang)
+
   BUG FIXES
 
     HADOOP-11802: DomainSocketWatcher thread terminates sometimes after there

+ 1 - 1
hadoop-common-project/hadoop-common/pom.xml

@@ -625,7 +625,7 @@
                 <goals><goal>run</goal></goals>
                 <configuration>
                   <target>
-                    <exec executable="sh" failonerror="true" dir="${project.build.directory}/native">
+                    <exec executable="${shell-executable}" failonerror="true" dir="${project.build.directory}/native">
                       <arg value="-c"/>
                       <arg value="[ x$SKIPTESTS = xtrue ] || ${project.build.directory}/native/test_bulk_crc32"/>
                       <env key="SKIPTESTS" value="${skipTests}"/>

+ 2 - 2
hadoop-common-project/hadoop-kms/pom.xml

@@ -383,7 +383,7 @@
                       cd "${project.build.directory}/tomcat.exp"
                       gzip -cd ../../downloads/apache-tomcat-${tomcat.version}.tar.gz | tar xf -
                     </echo>
-                    <exec executable="sh" dir="${project.build.directory}"
+                    <exec executable="${shell-executable}" dir="${project.build.directory}"
                           failonerror="true">
                       <arg line="./tomcat-untar.sh"/>
                     </exec>
@@ -426,7 +426,7 @@
                       cd "${project.build.directory}"
                       tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
                     </echo>
-                    <exec executable="sh" dir="${project.build.directory}"
+                    <exec executable="${shell-executable}" dir="${project.build.directory}"
                           failonerror="true">
                       <arg line="./dist-maketar.sh"/>
                     </exec>

+ 2 - 2
hadoop-dist/pom.xml

@@ -130,7 +130,7 @@
                       echo "Hadoop dist layout available at: ${project.build.directory}/hadoop-${project.version}"
                       echo
                     </echo>
-                    <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                    <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
                       <arg line="./dist-layout-stitching.sh"/>
                     </exec>
                   </target>
@@ -163,7 +163,7 @@
                       echo "Hadoop dist tar available at: ${project.build.directory}/hadoop-${project.version}.tar.gz"
                       echo
                     </echo>
-                    <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                    <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
                       <arg line="./dist-tar-stitching.sh"/>
                     </exec>
                   </target>

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml

@@ -517,7 +517,7 @@
                       cd "${project.build.directory}/tomcat.exp"
                       gzip -cd ../../downloads/apache-tomcat-${tomcat.version}.tar.gz | tar xf -
                     </echo>
-                    <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                    <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
                       <arg line="./tomcat-untar.sh"/>
                     </exec>
 
@@ -557,7 +557,7 @@
                       cd "${project.build.directory}"
                       tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
                     </echo>
-                    <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                    <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
                       <arg line="./dist-maketar.sh"/>
                     </exec>
                   </target>

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/pom.xml

@@ -594,7 +594,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
                 <phase>test-compile</phase>
                 <configuration>
                   <target>
-                    <exec executable="sh">
+                    <exec executable="${shell-executable}">
                       <arg value="-c"/>
                       <arg value="for i in {1..${testsThreadCount}}; do mkdir -p ${test.build.data}/$i; mkdir -p ${hadoop.tmp.dir}/$i; done"/>
                     </exec>

+ 1 - 1
hadoop-mapreduce-project/pom.xml

@@ -170,7 +170,7 @@
                   cd "${project.build.directory}"
                   tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
                 </echo>
-                <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
                   <arg line="./dist-maketar.sh"/>
                 </exec>
               </target>

+ 2 - 2
hadoop-project-dist/pom.xml

@@ -377,7 +377,7 @@
                         fi
                       fi
                     </echo>
-                    <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                    <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
                       <arg line="./dist-copynativelibs.sh"/>
                     </exec>
                   </target>
@@ -396,7 +396,7 @@
                       cd "${project.build.directory}"
                       tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
                     </echo>
-                    <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                    <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
                       <arg line="./dist-maketar.sh"/>
                     </exec>
                   </target>

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/pom.xml

@@ -203,7 +203,7 @@
                 <phase>test</phase>
                 <configuration>
                   <target>
-                    <exec executable="sh" failonerror="true" dir="${project.build.directory}/native">
+                    <exec executable="${shell-executable}" failonerror="true" dir="${project.build.directory}/native">
                       <arg value="-c"/>
                       <arg value="[ x$SKIPTESTS = xtrue ] || test-container-executor"/>
                       <env key="SKIPTESTS" value="${skipTests}"/>

+ 1 - 1
hadoop-yarn-project/pom.xml

@@ -96,7 +96,7 @@
                   cd "${project.build.directory}"
                   tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
                 </echo>
-                <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
                   <arg line="./dist-maketar.sh"/>
                 </exec>
               </target>

+ 2 - 0
pom.xml

@@ -104,6 +104,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
     <maven-bundle-plugin.version>2.5.0</maven-bundle-plugin.version>
     <maven-checkstyle-plugin.version>2.15</maven-checkstyle-plugin.version>
     <checkstyle.version>6.6</checkstyle.version>
+
+    <shell-executable>bash</shell-executable>
   </properties>
 
   <modules>