diff options
author | Naresh Bhat <naresh.bhat@linaro.org> | 2016-12-01 09:44:24 +0000 |
---|---|---|
committer | Naresh Bhat <naresh.bhat@linaro.org> | 2016-12-02 02:02:25 +0530 |
commit | 0f062bc73a8a81f195cf6ae1f91ebede6b7f8399 (patch) | |
tree | 5488b3e7b6adfce0b0d05e07a062d2204668a40f /bigtop-packages/src/deb | |
parent | c5cf4d1d29f227f79d47ac9b649d4bce46b0dd93 (diff) |
spark: Fix the debian and rpm build issue
This patch move the patch file from bigtop-packages/src/common/spark/0001-branch-2.0-Add-deb-profile-to-assembly-pom.xml.patch -> bigtop-packages/src/deb/spark/0001-branch-2.0-Add-deb-profile-to-assembly-pom.xml.patch area, Because the patch is related to only spark debian package build. The patch is being applied in the file bigtop-packages/src/deb/spark/rules and removed from the file bigtop-packages/src/common/spark/do-component-build
Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
Diffstat (limited to 'bigtop-packages/src/deb')
-rw-r--r-- | bigtop-packages/src/deb/spark/0001-branch-2.0-Add-deb-profile-to-assembly-pom.xml.patch | 251 | ||||
-rw-r--r-- | bigtop-packages/src/deb/spark/rules | 1 |
2 files changed, 252 insertions, 0 deletions
diff --git a/bigtop-packages/src/deb/spark/0001-branch-2.0-Add-deb-profile-to-assembly-pom.xml.patch b/bigtop-packages/src/deb/spark/0001-branch-2.0-Add-deb-profile-to-assembly-pom.xml.patch new file mode 100644 index 00000000..49ea2a2c --- /dev/null +++ b/bigtop-packages/src/deb/spark/0001-branch-2.0-Add-deb-profile-to-assembly-pom.xml.patch @@ -0,0 +1,251 @@ +From a28b0ed2f6a1495d2439e798263cfc92988eade4 Mon Sep 17 00:00:00 2001 +From: Naresh Bhat <naresh.bhat@linaro.org> +Date: Mon, 7 Nov 2016 12:33:21 +0000 +Subject: [PATCH] [branch-2.0] Add deb profile to assembly/pom.xml + +This patch has been forward ported from the patch 148757e in +branch-1.3 to branch-2.0 + +Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org> +--- + assembly/pom.xml | 183 +++++++++++++++++++++++++++++++++++++++ + assembly/src/deb/RELEASE | 2 + + assembly/src/deb/control/control | 8 ++ + 3 files changed, 193 insertions(+) + create mode 100644 assembly/src/deb/RELEASE + create mode 100644 assembly/src/deb/control/control + +diff --git a/assembly/pom.xml b/assembly/pom.xml +index de09fce..09e9b1f 100644 +--- a/assembly/pom.xml ++++ b/assembly/pom.xml +@@ -35,6 +35,13 @@ + <sbt.project.name>assembly</sbt.project.name> + <build.testJarPhase>none</build.testJarPhase> + <build.copyDependenciesPhase>package</build.copyDependenciesPhase> ++ <spark.jar.dir>scala-${scala.binary.version}</spark.jar.dir> ++ <spark.jar.basename>spark-assembly-${project.version}-hadoop${hadoop.version}.jar</spark.jar.basename> ++ <spark.jar>${project.build.directory}/${spark.jar.dir}/${spark.jar.basename}</spark.jar> ++ <deb.pkg.name>spark</deb.pkg.name> ++ <deb.install.path>/usr/share/spark</deb.install.path> ++ <deb.user>root</deb.user> ++ <deb.bin.filemode>755</deb.bin.filemode> + </properties> + + <dependencies> +@@ -125,6 +132,56 @@ + </target> + </configuration> + </plugin> ++ ++ <!-- Use the shade plugin to create a big JAR with all the dependencies --> ++ <plugin> ++ <groupId>org.apache.maven.plugins</groupId> ++ <artifactId>maven-shade-plugin</artifactId> ++ <configuration> ++ <shadedArtifactAttached>false</shadedArtifactAttached> ++ <outputFile>${spark.jar}</outputFile> ++ <artifactSet> ++ <includes> ++ <include>*:*</include> ++ </includes> ++ </artifactSet> ++ <filters> ++ <filter> ++ <artifact>*:*</artifact> ++ <excludes> ++ <exclude>org/datanucleus/**</exclude> ++ <exclude>META-INF/*.SF</exclude> ++ <exclude>META-INF/*.DSA</exclude> ++ <exclude>META-INF/*.RSA</exclude> ++ </excludes> ++ </filter> ++ </filters> ++ </configuration> ++ <executions> ++ <execution> ++ <phase>package</phase> ++ <goals> ++ <goal>shade</goal> ++ </goals> ++ <configuration> ++ <transformers> ++ <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /> ++ <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> ++ <resource>META-INF/services/org.apache.hadoop.fs.FileSystem</resource> ++ </transformer> ++ <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> ++ <resource>reference.conf</resource> ++ </transformer> ++ <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer"> ++ <resource>log4j.properties</resource> ++ </transformer> ++ <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/> ++ <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/> ++ </transformers> ++ </configuration> ++ </execution> ++ </executions> ++ </plugin> + </plugins> + </build> + +@@ -197,6 +254,132 @@ + </build> + </profile> + ++ <profile> ++ <id>deb</id> ++ <build> ++ <plugins> ++ <plugin> ++ <artifactId>maven-antrun-plugin</artifactId> ++ <executions> ++ <execution> ++ <phase>prepare-package</phase> ++ <goals> ++ <goal>run</goal> ++ </goals> ++ <configuration> ++ <target> ++ <echo> ++ NOTE: Debian packaging is deprecated and is scheduled to be removed in Spark 1.4. ++ </echo> ++ </target> ++ </configuration> ++ </execution> ++ </executions> ++ </plugin> ++ <plugin> ++ <groupId>org.codehaus.mojo</groupId> ++ <artifactId>buildnumber-maven-plugin</artifactId> ++ <version>1.2</version> ++ <executions> ++ <execution> ++ <phase>validate</phase> ++ <goals> ++ <goal>create</goal> ++ </goals> ++ <configuration> ++ <shortRevisionLength>8</shortRevisionLength> ++ </configuration> ++ </execution> ++ </executions> ++ </plugin> ++ <plugin> ++ <groupId>org.vafer</groupId> ++ <artifactId>jdeb</artifactId> ++ <version>1.0</version> ++ <executions> ++ <execution> ++ <phase>package</phase> ++ <goals> ++ <goal>jdeb</goal> ++ </goals> ++ <configuration> ++ <deb>${project.build.directory}/${deb.pkg.name}_${project.version}-${buildNumber}_all.deb</deb> ++ <attach>false</attach> ++ <compression>gzip</compression> ++ <dataSet> ++ <data> ++ <src>${spark.jar}</src> ++ <type>file</type> ++ <mapper> ++ <type>perm</type> ++ <user>${deb.user}</user> ++ <group>${deb.user}</group> ++ <prefix>${deb.install.path}/jars</prefix> ++ </mapper> ++ </data> ++ <data> ++ <src>${basedir}/src/deb/RELEASE</src> ++ <type>file</type> ++ <mapper> ++ <type>perm</type> ++ <user>${deb.user}</user> ++ <group>${deb.user}</group> ++ <prefix>${deb.install.path}</prefix> ++ </mapper> ++ </data> ++ <data> ++ <src>${basedir}/../conf</src> ++ <type>directory</type> ++ <mapper> ++ <type>perm</type> ++ <user>${deb.user}</user> ++ <group>${deb.user}</group> ++ <prefix>${deb.install.path}/conf</prefix> ++ <filemode>${deb.bin.filemode}</filemode> ++ </mapper> ++ </data> ++ <data> ++ <src>${basedir}/../bin</src> ++ <type>directory</type> ++ <mapper> ++ <type>perm</type> ++ <user>${deb.user}</user> ++ <group>${deb.user}</group> ++ <prefix>${deb.install.path}/bin</prefix> ++ <filemode>${deb.bin.filemode}</filemode> ++ </mapper> ++ </data> ++ <data> ++ <src>${basedir}/../sbin</src> ++ <type>directory</type> ++ <mapper> ++ <type>perm</type> ++ <user>${deb.user}</user> ++ <group>${deb.user}</group> ++ <prefix>${deb.install.path}/sbin</prefix> ++ <filemode>${deb.bin.filemode}</filemode> ++ </mapper> ++ </data> ++ <data> ++ <src>${basedir}/../python</src> ++ <type>directory</type> ++ <mapper> ++ <type>perm</type> ++ <user>${deb.user}</user> ++ <group>${deb.user}</group> ++ <prefix>${deb.install.path}/python</prefix> ++ <filemode>${deb.bin.filemode}</filemode> ++ </mapper> ++ </data> ++ </dataSet> ++ </configuration> ++ </execution> ++ </executions> ++ </plugin> ++ </plugins> ++ </build> ++ </profile> ++ + <!-- Profiles that disable inclusion of certain dependencies. --> + <profile> + <id>hadoop-provided</id> +diff --git a/assembly/src/deb/RELEASE b/assembly/src/deb/RELEASE +new file mode 100644 +index 0000000..aad50ee +--- /dev/null ++++ b/assembly/src/deb/RELEASE +@@ -0,0 +1,2 @@ ++compute-classpath.sh uses the existence of this file to decide whether to put the assembly jar on the ++classpath or instead to use classfiles in the source tree. +\ No newline at end of file +diff --git a/assembly/src/deb/control/control b/assembly/src/deb/control/control +new file mode 100644 +index 0000000..05fa77f5 +--- /dev/null ++++ b/assembly/src/deb/control/control +@@ -0,0 +1,8 @@ ++Package: [[deb.pkg.name]] ++Version: [[version]]-[[buildNumber]] ++Section: misc ++Priority: extra ++Architecture: all ++Maintainer: Naresh Bhat <naresh.bhat@linaro.org> ++Description: [[name]] ++Distribution: development +-- +2.4.0 + diff --git a/bigtop-packages/src/deb/spark/rules b/bigtop-packages/src/deb/spark/rules index 58815189..c0a6b0f2 100644 --- a/bigtop-packages/src/deb/spark/rules +++ b/bigtop-packages/src/deb/spark/rules @@ -26,6 +26,7 @@ export DH_OPTIONS dh $@ override_dh_auto_build: + patch -p1 < ./debian/0001-branch-2.0-Add-deb-profile-to-assembly-pom.xml.patch bash debian/do-component-build svcs=spark-master spark-worker spark-history-server spark-thriftserver |