aboutsummaryrefslogtreecommitdiff
path: root/bigtop-packages/src/deb/spark/0001-branch-2.0-Add-deb-profile-to-assembly-pom.xml.patch
diff options
context:
space:
mode:
Diffstat (limited to 'bigtop-packages/src/deb/spark/0001-branch-2.0-Add-deb-profile-to-assembly-pom.xml.patch')
-rw-r--r--bigtop-packages/src/deb/spark/0001-branch-2.0-Add-deb-profile-to-assembly-pom.xml.patch251
1 files changed, 251 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
+