bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mackror...@apache.org
Subject git commit: BIGTOP-1356. Build hive.install by excluding subpackages lib. (contributed by Julien Eid <julien.eid@cloudera.com>)
Date Fri, 25 Jul 2014 22:28:21 GMT
Repository: bigtop
Updated Branches:
  refs/heads/master 33dad631f -> 1cbbb28cb


BIGTOP-1356. Build hive.install by excluding subpackages lib. (contributed by Julien Eid <julien.eid@cloudera.com>)


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/1cbbb28c
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/1cbbb28c
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/1cbbb28c

Branch: refs/heads/master
Commit: 1cbbb28cb50c2ba10f20333583d74bd2352205e5
Parents: 33dad63
Author: Sean Mackrory <mackrorysd@apache.org>
Authored: Fri Jul 25 15:26:20 2014 -0700
Committer: Sean Mackrory <mackrorysd@apache.org>
Committed: Fri Jul 25 15:27:20 2014 -0700

----------------------------------------------------------------------
 .../src/deb/hive/build-hive-install-file.sh     | 26 +++++++
 bigtop-packages/src/deb/hive/hive.install       | 72 --------------------
 .../src/deb/hive/hive.install.include           |  9 +++
 bigtop-packages/src/deb/hive/rules              |  1 +
 4 files changed, 36 insertions(+), 72 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/1cbbb28c/bigtop-packages/src/deb/hive/build-hive-install-file.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hive/build-hive-install-file.sh b/bigtop-packages/src/deb/hive/build-hive-install-file.sh
new file mode 100644
index 0000000..f82d0e4
--- /dev/null
+++ b/bigtop-packages/src/deb/hive/build-hive-install-file.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+# This script is meant to include only libraries in the main hive package not already included
in other hive subpackages.
+# It does this by listing the contents of hive/lib into a temporary file and then it will
+# lists all libs in in the .install files for other subpackages, adding those lines to a
tmp exclude file
+# It will then do a grep diff between the list of hive/lib and the exclude file and only
include lines not found in the exclude
+# It then reads what should be included to stdout as well as some files that should also
be in the package, which is listed in hive.install.include.
+for i in debian/tmp/usr/lib/hive/lib/*
+do
+	echo ${i} >> debian/hive.include
+done
+
+get_excludes () {
+	while read line
+	do
+		echo ${line:0:(-5)} >> debian/hive.exclude			# get rid of *.jar and add to excludes
list
+	done <$1												# Read in .install file for subpackage
+}
+
+# Exclude all libraries listed in these files.
+get_excludes "debian/hive-jdbc.install"
+get_excludes "debian/hive-hbase.install"
+
+# Exclude the libraries from above and put the remaining libs in hive.install.
+grep -Fv -f debian/hive.exclude debian/hive.include
+# Add extra files that aren't libs.
+cat debian/hive.install.include

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1cbbb28c/bigtop-packages/src/deb/hive/hive.install
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hive/hive.install b/bigtop-packages/src/deb/hive/hive.install
deleted file mode 100644
index 99d374b..0000000
--- a/bigtop-packages/src/deb/hive/hive.install
+++ /dev/null
@@ -1,72 +0,0 @@
-etc/hive
-usr/bin/hive
-usr/bin/beeline
-usr/bin/hiveserver2
-usr/lib/hive/bin
-usr/lib/hive/conf
-usr/lib/hive/scripts
-usr/share/man/man1/hive.1.gz
-usr/share/doc/hive
-usr/lib/hive/lib/activation-*.jar
-usr/lib/hive/lib/ant-*.jar
-usr/lib/hive/lib/ant-launcher-*.jar
-usr/lib/hive/lib/antlr-*.jar
-usr/lib/hive/lib/antlr-runtime-*.jar
-usr/lib/hive/lib/asm-*.jar
-usr/lib/hive/lib/asm-commons-*.jar
-usr/lib/hive/lib/asm-tree-*.jar
-usr/lib/hive/lib/avro-*.jar
-usr/lib/hive/lib/bonecp-0.8.0.RELEASE.jar
-usr/lib/hive/lib/commons-cli-*.jar
-usr/lib/hive/lib/commons-codec-*.jar
-usr/lib/hive/lib/commons-collections-*.jar
-usr/lib/hive/lib/commons-compress-*.jar
-usr/lib/hive/lib/commons-httpclient-*.jar
-usr/lib/hive/lib/commons-io-*.jar
-usr/lib/hive/lib/commons-lang-*.jar
-usr/lib/hive/lib/commons-lang3-*.jar
-usr/lib/hive/lib/datanucleus-api-jdo-*.jar
-usr/lib/hive/lib/datanucleus-core-*.jar
-usr/lib/hive/lib/datanucleus-rdbms-*.jar
-usr/lib/hive/lib/derby-*.jar
-usr/lib/hive/lib/geronimo-annotation_1.0_spec-*.jar
-usr/lib/hive/lib/geronimo-jaspic_1.0_spec-*.jar
-usr/lib/hive/lib/geronimo-jta_1.1_spec-*.jar
-usr/lib/hive/lib/groovy-all-*.jar
-usr/lib/hive/lib/guava-*.jar
-usr/lib/hive/lib/hamcrest-core-*.jar
-usr/lib/hive/lib/hive-ant*.jar
-usr/lib/hive/lib/hive-beeline*.jar
-usr/lib/hive/lib/hive-cli*.jar
-usr/lib/hive/lib/hive-common*.jar
-usr/lib/hive/lib/hive-contrib*.jar
-usr/lib/hive/lib/hive-hbase-handler*.jar
-usr/lib/hive/lib/hive-hwi*.jar
-usr/lib/hive/lib/hive-shims*.jar
-usr/lib/hive/lib/hive-testutils*.jar
-usr/lib/hive/lib/httpclient-*.jar
-usr/lib/hive/lib/httpcore-*.jar
-usr/lib/hive/lib/jdo-api-*.jar
-usr/lib/hive/lib/jetty-*.jar
-usr/lib/hive/lib/jetty-all-*.jar
-usr/lib/hive/lib/jetty-util-*.jar
-usr/lib/hive/lib/jline-*.jar
-usr/lib/hive/lib/jpam-*.jar
-usr/lib/hive/lib/jsr305-*.jar
-usr/lib/hive/lib/jta-*.jar
-usr/lib/hive/lib/junit-*.jar
-usr/lib/hive/lib/mail-*.jar
-usr/lib/hive/lib/oro-*.jar
-usr/lib/hive/lib/paranamer-*.jar
-usr/lib/hive/lib/php
-usr/lib/hive/lib/py
-usr/lib/hive/lib/servlet-api-*.jar
-usr/lib/hive/lib/servlet-api-*.jar
-usr/lib/hive/lib/snappy-java-*.jar
-usr/lib/hive/lib/ST4-*.jar
-usr/lib/hive/lib/stax-api-*.jar
-usr/lib/hive/lib/stringtemplate-*.jar
-usr/lib/hive/lib/tempus-fugit-*.jar
-usr/lib/hive/lib/velocity-*.jar
-usr/lib/hive/lib/xz-*.jar
-usr/lib/hive/lib/zookeeper*.jar

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1cbbb28c/bigtop-packages/src/deb/hive/hive.install.include
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hive/hive.install.include b/bigtop-packages/src/deb/hive/hive.install.include
new file mode 100644
index 0000000..4c9b2dc
--- /dev/null
+++ b/bigtop-packages/src/deb/hive/hive.install.include
@@ -0,0 +1,9 @@
+etc/hive
+usr/bin/hive
+usr/bin/beeline
+usr/bin/hiveserver2
+usr/lib/hive/bin
+usr/lib/hive/conf
+usr/lib/hive/scripts
+usr/share/man/man1/hive.1.gz
+usr/share/doc/hive

http://git-wip-us.apache.org/repos/asf/bigtop/blob/1cbbb28c/bigtop-packages/src/deb/hive/rules
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hive/rules b/bigtop-packages/src/deb/hive/rules
index db73a13..f77e3c5 100755
--- a/bigtop-packages/src/deb/hive/rules
+++ b/bigtop-packages/src/deb/hive/rules
@@ -55,6 +55,7 @@ override_dh_auto_install: server server2 metastore hcatalog-server webhcat-serve
 	ln -s  /usr/lib/zookeeper/zookeeper.jar debian/tmp/usr/lib/hive/lib
 	# Workaround for BIGTOP-583
 	rm -f debian/tmp/usr/lib/hive/lib/slf4j-log4j12-*.jar
+	bash debian/build-hive-install-file.sh >> debian/hive.install
 
 	# Hive source contains a directory docs/changes that is interpreted a special way in Debian
7+ packaging
 	mv docs/changes docs/changes_


Mime
View raw message