You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by co...@apache.org on 2016/02/11 09:12:14 UTC
[1/3] bigtop git commit: BIGTOP-2319. Build initial smoke-tests
distribution
Repository: bigtop
Updated Branches:
refs/heads/BIGTOP-2320 [created] 25ba61acb
BIGTOP-2319. Build initial smoke-tests distribution
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/43fcffc9
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/43fcffc9
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/43fcffc9
Branch: refs/heads/BIGTOP-2320
Commit: 43fcffc98fec7e400c69164f5d5570aea8934e76
Parents: ea72a64
Author: Konstantin Boudnik <co...@apache.org>
Authored: Tue Feb 9 00:20:09 2016 -0800
Committer: Konstantin Boudnik <co...@apache.org>
Committed: Tue Feb 9 00:20:09 2016 -0800
----------------------------------------------------------------------
bigtop-tests/build.gradle | 63 +++++++++++++++
bigtop-tests/smoke-tests/run_itest.sh | 120 +++++++++++++++++++++++++++++
2 files changed, 183 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/43fcffc9/bigtop-tests/build.gradle
----------------------------------------------------------------------
diff --git a/bigtop-tests/build.gradle b/bigtop-tests/build.gradle
new file mode 100644
index 0000000..c8180d9
--- /dev/null
+++ b/bigtop-tests/build.gradle
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: 'distribution'
+
+distributions {
+ main {
+ baseName = project.hasProperty('assemblyname') ?
+ project.property('assemblyname') : 'bigtop-smokes-suite'
+ contents {
+ exclude '*.iml'
+ exclude '.gradle'
+ exclude 'build'
+ exclude 'target'
+ from ("$rootDir") {
+ include '*.bom'
+ include 'gradlew'
+ include '*.gradle'
+ include 'gradle/**'
+ }
+ from ("$rootDir/buildSrc") {
+ into 'buildSrc'
+ }
+ from ("$rootDir/bigtop-packages/src/common/bigtop-utils") {
+ into 'bin'
+ include '*'
+ }
+ from ('smoke-tests') {
+ into 'smoke-tests'
+ include '*.gradle'
+ include 'logger-test-config/**'
+ }
+ from ('smoke-tests') { // Put the driver script to the top-level
+ include 'run_itest.sh'
+ }
+ from ('test-artifacts') {
+ into 'bigtop-tests/test-artifacts'
+ include 'hadoop/**'
+ include 'mahout/**'
+ include 'pom.xml'
+ }
+ }
+ }
+}
+
+distZip.dependsOn clean
+distTar.dependsOn clean
+
http://git-wip-us.apache.org/repos/asf/bigtop/blob/43fcffc9/bigtop-tests/smoke-tests/run_itest.sh
----------------------------------------------------------------------
diff --git a/bigtop-tests/smoke-tests/run_itest.sh b/bigtop-tests/smoke-tests/run_itest.sh
new file mode 100755
index 0000000..b5c41c2
--- /dev/null
+++ b/bigtop-tests/smoke-tests/run_itest.sh
@@ -0,0 +1,120 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+## Borrowed heavily from
+## https://github.com/jctanner/odp-scripts/blob/master/run_itest.sh
+## Kudos to https://github.com/jctanner
+
+# https://github.com/apache/bigtop/tree/master/bigtop-test-framework
+
+# "ITEST" is an integration testing framework written for and by the
+# apache bigtop project. It consists of typical java tools/libraries
+# such as junit, gradle and maven.
+
+# This script is a helper to run itest on any hadoop system without
+# requiring intimate knowledge of bigtop. If running for the first
+# time, simply execute ./run_itest.sh without any arguments. If you
+# want more information, use these additional parameters:
+#
+# --info - turns on the log4j output
+# --debug - turns up the log4j output to maximum
+# --traceback - shows tracebacks from tests
+
+set_java_home() {
+
+ #####################################################################
+ # Use bigtop's bigtop-detect-javahome if JAVA_HOME is not already set
+ #####################################################################
+
+ if [ -z "$JAVA_HOME" ]; then
+ source bin/bigtop-detect-javahome
+ fi
+
+ echo "# DEBUG: JAVA_HOME=$JAVA_HOME"
+}
+
+set_hadoop_vars() {
+
+ #####################################################################
+ # Set the HADOOP_MAPRED_HOME and HADOOP_CONF vars
+ #####################################################################
+
+ # ITEST wants the MR dir with the examples jar ...
+ # java.lang.AssertionError: Can't find hadoop-examples.jar file
+
+ if ( [ -z "$HADOOP_HOME" ] && [ -d /usr/lib/hadoop ] ); then
+ export HADOOP_HOME=/usr/lib/hadoop
+ fi
+ if ( [ -z "$HADOOP_CONF_DIR" ] && [ -d /etc/hadoop/conf ] ); then
+ export HADOOP_CONF_DIR=/etc/hadoop/conf
+ fi
+ if ( [ -z "$HADOOP_MAPRED_HOME" ] && [ -d /usr/lib/hadoop-mapreduce-client ] ); then
+ export HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce-client
+ fi
+
+ echo "# DEBUG: HADOOP_CONF_DIR=$HADOOP_CONF_DIR"
+ echo "# DEBUG: HADOOP_MAPRED_HOME=$HADOOP_MAPRED_HOME"
+}
+
+
+print_tests() {
+ echo "######################################################"
+ echo "# RESULTS #"
+ echo "######################################################"
+
+ for TEST in $(echo $ITESTS | tr ',' '\n'); do
+ TESTDIR=bigtop-tests/smoke-tests/$TEST/build
+
+ if [ -d $TESTDIR ]; then
+ cd $TESTDIR
+
+ for FILE in $(find -L reports/tests/classes -type f -name "*.html"); do
+ echo "## $TESTDIR/$FILE"
+ if [ $(which links) ]; then
+ links $FILE -dump
+ else
+ echo "PLEASE INSTALL LINKS: sudo yum -y install links"
+ fi
+ echo ""
+ done
+ fi
+ done
+}
+
+# SET JAVA_HOME
+set_java_home
+
+# SET HADOOP SERVICE HOMES
+set_hadoop_vars
+
+echo "######################################################"
+echo "# STARTING ITEST #"
+echo "######################################################"
+echo "# Use --debug/--info/--stacktrace for more details"
+
+# SET THE DEFAULT TESTS
+if [ -z "$ITESTS" ]; then
+ export ITESTS="hcfs,hdfs,yarn,mapreduce"
+fi
+for s in `echo $ITESTS | sed -e 's#,# #g'`; do
+ ALL_SMOKE_TASKS="$ALL_SMOKE_TASKS bigtop-tests:smoke-tests:$s:test"
+done
+
+# CALL THE GRADLE WRAPPER TO RUN THE FRAMEWORK
+./gradlew -q clean test -Psmoke.tests $ALL_SMOKE_TASKS $@
+
+# SHOW RESULTS (HTML)
+print_tests
[2/3] bigtop git commit: BIGTOP-2321. Add packaging code for HAWQ
Posted by co...@apache.org.
BIGTOP-2321. Add packaging code for HAWQ
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/6e69e4d2
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/6e69e4d2
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/6e69e4d2
Branch: refs/heads/BIGTOP-2320
Commit: 6e69e4d2637bc019881139ec83ed6d71990cfaab
Parents: 43fcffc
Author: Konstantin Boudnik <co...@apache.org>
Authored: Tue Feb 9 08:27:17 2016 -0800
Committer: Konstantin Boudnik <co...@apache.org>
Committed: Thu Feb 11 10:36:03 2016 +0300
----------------------------------------------------------------------
.../src/common/hawq/do-component-build | 28 +++
bigtop-packages/src/common/hawq/hawq.1 | 59 ++++++
bigtop-packages/src/common/hawq/hawq.default | 22 +++
bigtop-packages/src/common/hawq/hawq.svc | 63 +++++++
bigtop-packages/src/common/hawq/install_hawq.sh | 142 ++++++++++++++
bigtop-packages/src/common/hawq/run-build.sh | 23 +++
bigtop-packages/src/deb/hawq/compat | 1 +
bigtop-packages/src/deb/hawq/control | 32 ++++
bigtop-packages/src/deb/hawq/copyright | 15 ++
bigtop-packages/src/deb/hawq/hawq-doc.dirs | 1 +
bigtop-packages/src/deb/hawq/hawq-doc.install | 1 +
bigtop-packages/src/deb/hawq/hawq.dirs | 4 +
bigtop-packages/src/deb/hawq/hawq.install | 3 +
bigtop-packages/src/deb/hawq/hawq.manpages | 1 +
bigtop-packages/src/deb/hawq/hawq.postinst | 47 +++++
bigtop-packages/src/deb/hawq/hawq.preinst | 61 ++++++
bigtop-packages/src/deb/hawq/hawq.prerm | 55 ++++++
bigtop-packages/src/deb/hawq/rules | 54 ++++++
bigtop-packages/src/deb/hawq/source/format | 1 +
bigtop-packages/src/rpm/hawq/BUILD/.gitignore | 0
bigtop-packages/src/rpm/hawq/RPMS/.gitignore | 0
bigtop-packages/src/rpm/hawq/SOURCES/.gitignore | 0
bigtop-packages/src/rpm/hawq/SPECS/hawq.spec | 184 +++++++++++++++++++
bigtop-packages/src/rpm/hawq/SRPMS/.gitignore | 0
bigtop.bom | 10 +
25 files changed, 807 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/common/hawq/do-component-build
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hawq/do-component-build b/bigtop-packages/src/common/hawq/do-component-build
new file mode 100755
index 0000000..3af166f
--- /dev/null
+++ b/bigtop-packages/src/common/hawq/do-component-build
@@ -0,0 +1,28 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+. `dirname $0`/bigtop.bom
+
+echo "Later we'll be running a real build here.\n \
+For the time being just pretend we did"
+
+echo "Now we'll be just unpacking a pre-built binary tarball"
+
+tar zxf ~/work/bigtop/hawq-2.0.0-incubating.tgz
+
+echo "Pre-built binaries are unpacked"
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/common/hawq/hawq.1
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hawq/hawq.1 b/bigtop-packages/src/common/hawq/hawq.1
new file mode 100644
index 0000000..96c62c0
--- /dev/null
+++ b/bigtop-packages/src/common/hawq/hawq.1
@@ -0,0 +1,59 @@
+.\" Licensed to the Apache Software Foundation (ASF) under one or more
+.\" contributor license agreements. See the NOTICE file distributed with
+.\" this work for additional information regarding copyright ownership.
+.\" The ASF licenses this file to You under the Apache License, Version 2.0
+.\" (the "License"); you may not use this file except in compliance with
+.\" the License. You may obtain a copy of the License at
+.\"
+.\" http://www.apache.org/licenses/LICENSE-2.0
+.\"
+.\" Unless required by applicable law or agreed to in writing, software
+.\" distributed under the License is distributed on an "AS IS" BASIS,
+.\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+.\" See the License for the specific language governing permissions and
+.\" limitations under the License.
+.\"
+.\" Process this file with
+.\" groff -man -Tascii ignite.1
+.\"
+.TH ignite 1 "Mar 2015 " Linux "User Manuals"
+
+.SH NAME
+Ignite \- Ignite is a filesystem and MR accelerator for Hadoop.
+
+.SH SYNOPSIS
+
+.B ignite
+\fICOMMAND\fR
+
+.SH DESCRIPTION
+
+Ignite is a filesystem and MR accelerator for Hadoop. Use it when you
+you need predictable file system caching, fast MR processing...
+
+Ignite is an open-source, distributed blah-blah
+
+For more information about Ignite, see http://ignite.apache.org/
+
+\fICOMMAND\fR may be one of the following:
+ something do something
+ else do something else
+
+Most commands print help when invoked w/o parameters or with --help.
+
+.SH ENVIRONMENT
+
+.IP JAVA_HOME
+The java implementation to use. Overrides JAVA_HOME.
+
+.IP IGNITE_HOME
+Extra Java CLASSPATH entries.
+
+.IP IGNITE_CONF_DIR
+Alternate conf dir. Default is ${IGNITE_HOME}/conf.
+
+.IP HADOOP_HOME
+Optionally, the Hadoop home to run with.
+
+.SH COPYRIGHT
+2014 - 2015, The Apache Software Foundation
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/common/hawq/hawq.default
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hawq/hawq.default b/bigtop-packages/src/common/hawq/hawq.default
new file mode 100644
index 0000000..97c46df
--- /dev/null
+++ b/bigtop-packages/src/common/hawq/hawq.default
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+export HAWQ_HOME="/usr/lib/hawq"
+export HAWQ_CONF_DIR="/etc/hawq/conf"
+
+export HAWQ_PID_DIR="/var/run/hawq"
+export HAWQ_LOG_DIR="/var/log/hawq"
+export HAWQ_WORK_DIR="/var/run/hawq/work"
+export HAWQ_IDENT_STRING=hawq
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/common/hawq/hawq.svc
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hawq/hawq.svc b/bigtop-packages/src/common/hawq/hawq.svc
new file mode 100644
index 0000000..c3ddb27
--- /dev/null
+++ b/bigtop-packages/src/common/hawq/hawq.svc
@@ -0,0 +1,63 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+DAEMON="hawq"
+DESC="hawq daemon"
+EXEC_PATH="\${HAWQ_HOME}/bin/include/service.sh"
+SVC_USER="hawq"
+PIDFILE="\${HAWQ_PID_DIR}/${DAEMON}.pid"
+
+generate_start() {
+
+cat <<'__EOT__'
+start() {
+ [ -x $EXEC_PATH ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+ log_success_msg "Starting $DESC (${DAEMON}): "
+
+ checkstatusofproc
+ status=$?
+ if [ "$status" -eq "$STATUS_RUNNING" ]; then
+ log_success_msg "${DESC} is running"
+ exit 0
+ fi
+
+ su -s /bin/bash ${SVC_USER} -c "${EXEC_PATH} start ${DAEMON}"
+
+ checkstatusofproc
+ RETVAL=$?
+ [ $RETVAL -eq $STATUS_RUNNING ] && touch $LOCKFILE
+ return $RETVAL
+}
+__EOT__
+
+}
+
+generate_stop() {
+
+cat <<'__EOT__'
+stop() {
+ log_success_msg "Stopping $DESC (${DAEMON}): "
+
+ su -s /bin/bash ${SVC_USER} -c "${EXEC_PATH} stop ${DAEMON}"
+
+ sleep 3
+ RETVAL=$?
+
+ [ $RETVAL -eq $RETVAL_SUCCESS ] && rm -f $LOCKFILE $PIDFILE
+ return $RETVAL
+}
+__EOT__
+
+}
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/common/hawq/install_hawq.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hawq/install_hawq.sh b/bigtop-packages/src/common/hawq/install_hawq.sh
new file mode 100755
index 0000000..8b17132
--- /dev/null
+++ b/bigtop-packages/src/common/hawq/install_hawq.sh
@@ -0,0 +1,142 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+usage() {
+ echo "
+usage: $0 <options>
+ Required not-so-options:
+ --build-dir=DIR path to hawq dist.dir
+ --prefix=PREFIX path to install into
+
+ Optional options:
+ --doc-dir=DIR path to install docs into [/usr/share/doc/hawq]
+ --lib-dir=DIR path to install hawq home [/usr/lib/hawq]
+ --installed-lib-dir=DIR path where lib-dir will end up on target system
+ --bin-dir=DIR path to install bins [/usr/bin]
+ --examples-dir=DIR path to install examples [doc-dir/examples]
+ ... [ see source for more similar options ]
+ "
+ exit 1
+}
+
+OPTS=$(getopt \
+ -n $0 \
+ -o '' \
+ -l 'prefix:' \
+ -l 'doc-dir:' \
+ -l 'lib-dir:' \
+ -l 'installed-lib-dir:' \
+ -l 'bin-dir:' \
+ -l 'examples-dir:' \
+ -l 'conf-dir:' \
+ -l 'build-dir:' -- "$@")
+
+if [ $? != 0 ] ; then
+ usage
+fi
+
+eval set -- "$OPTS"
+while true ; do
+ case "$1" in
+ --prefix)
+ PREFIX=$2 ; shift 2
+ ;;
+ --build-dir)
+ BUILD_DIR=$2 ; shift 2
+ ;;
+ --doc-dir)
+ DOC_DIR=$2 ; shift 2
+ ;;
+ --lib-dir)
+ LIB_DIR=$2 ; shift 2
+ ;;
+ --installed-lib-dir)
+ INSTALLED_LIB_DIR=$2 ; shift 2
+ ;;
+ --bin-dir)
+ BIN_DIR=$2 ; shift 2
+ ;;
+ --examples-dir)
+ EXAMPLES_DIR=$2 ; shift 2
+ ;;
+ --conf-dir)
+ CONF_DIR=$2 ; shift 2
+ ;;
+ --)
+ shift ; break
+ ;;
+ *)
+ echo "Unknown option: $1"
+ usage
+ exit 1
+ ;;
+ esac
+done
+
+for var in PREFIX BUILD_DIR ; do
+ if [ -z "$(eval "echo \$$var")" ]; then
+ echo Missing param: $var
+ usage
+ fi
+done
+
+MAN_DIR=${MAN_DIR:-/usr/share/man/man1}
+DOC_DIR=${DOC_DIR:-/usr/share/doc/hawq}
+LIB_DIR=${LIB_DIR:-/usr/lib/hawq}
+BIN_DIR=${BIN_DIR:-/usr/lib/hawq/bin}
+ETC_DIR=${ETC_DIR:-/etc/hawq}
+CONF_DIR=${CONF_DIR:-${ETC_DIR}/conf.dist}
+
+install -d -m 0755 $PREFIX/$LIB_DIR
+install -d -m 0755 $PREFIX/$LIB_DIR/lib
+install -d -m 0755 $PREFIX/$LIB_DIR/include
+install -d -m 0755 $PREFIX/$LIB_DIR/sbin
+install -d -m 0755 $PREFIX/$LIB_DIR/share
+install -d -m 0755 $PREFIX/$DOC_DIR
+install -d -m 0755 $PREFIX/$BIN_DIR
+install -d -m 0755 $PREFIX/$ETC_DIR
+install -d -m 0755 $PREFIX/$CONF_DIR
+install -d -m 0755 $PREFIX/$MAN_DIR
+install -d -m 0755 $PREFIX/var/run/hawq/work/
+
+UNZIP_DIR=hawq
+cp -ar $UNZIP_DIR/lib $PREFIX/$LIB_DIR
+cp -a $UNZIP_DIR/etc/* $PREFIX/$CONF_DIR
+cp -ra $UNZIP_DIR/bin/* $PREFIX/$BIN_DIR
+cp -ra $UNZIP_DIR/sbin $PREFIX/$LIB_DIR
+cp -ra $UNZIP_DIR/share $PREFIX/$LIB_DIR
+cp -ar $UNZIP_DIR/include $PREFIX/$LIB_DIR
+cp -ar $UNZIP_DIR/docs $PREFIX/$DOC_DIR
+
+ln -s $ETC_DIR/conf $PREFIX/$LIB_DIR/config
+
+wrapper=$PREFIX/usr/bin/hawq
+mkdir -p `dirname $wrapper`
+cat > $wrapper <<EOF
+#!/bin/bash
+
+BIGTOP_DEFAULTS_DIR=\${BIGTOP_DEFAULTS_DIR-/etc/default}
+[ -n "\${BIGTOP_DEFAULTS_DIR}" -a -r \${BIGTOP_DEFAULTS_DIR}/hadoop ] && . \${BIGTOP_DEFAULTS_DIR}/hadoop
+[ -n "\${BIGTOP_DEFAULTS_DIR}" -a -r \${BIGTOP_DEFAULTS_DIR}/hawq ] && . \${BIGTOP_DEFAULTS_DIR}/hawq
+
+exec /usr/lib/hawq/bin/hawq \$1 hawq
+EOF
+chmod 755 $wrapper
+
+install -d -m 0755 $PREFIX/usr/bin
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/common/hawq/run-build.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hawq/run-build.sh b/bigtop-packages/src/common/hawq/run-build.sh
new file mode 100755
index 0000000..5617702
--- /dev/null
+++ b/bigtop-packages/src/common/hawq/run-build.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+docker run --rm=true -v `pwd`:/data -u root rlei/mydocker:latest /bin/sh -c "date; \
+cd /data/hawq-src/ ; \
+./configure --prefix=/data/hawq ; \
+if [ $? != 0 ]; then
+ echo HAWQ configure failed.
+ exit 1
+fi
+date; \
+make -f Makefile.hawq-j8; \
+if [ $? != 0 ]; then
+ echo HAWQ compile failed.
+ exit 1
+fi
+date; \
+make -f Makefile.hawq install ; \
+if [ $? != 0 ]; then
+ echo HAWQ make install failed.
+ exit 1
+fi
+date; \
+"
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/compat
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/compat b/bigtop-packages/src/deb/hawq/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/compat
@@ -0,0 +1 @@
+9
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/control
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/control b/bigtop-packages/src/deb/hawq/control
new file mode 100644
index 0000000..48d9dcf
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/control
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+Source: hawq
+Section: misc
+Priority: extra
+Maintainer: Bigtop <de...@bigtop.apache.org>
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.4
+Homepage: http://hawq.incubator.apache.org/
+
+Package: hawq
+Architecture: all
+Depends: adduser, hadoop-hdfs, bigtop-utils (>= 1.1.0)
+Description: HAWQ (incubating) is an advanced analytics MPP database
+
+Package: hawq-doc
+Architecture: all
+Section: doc
+Description: HAWQ Documentation
+ Documentation for Apache HAWQ (incubating)
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/copyright
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/copyright b/bigtop-packages/src/deb/hawq/copyright
new file mode 100644
index 0000000..89a5120
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/copyright
@@ -0,0 +1,15 @@
+Format: http://dep.debian.net/deps/dep5
+Source: https://git-wip-us.apache.org/repos/asf/incubator-ignite
+Upstream-Name: none
+
+Files: *
+Copyright: 2014 - 2015, The Apache Software Foundation
+License: Apache-2.0
+
+Files debian/*
+Copyright: 2011, The Apache Software Foundation
+License: Apache-2.0
+
+License: Apache-2.0
+ On Debian systems, the complete text of the Apache 2.0 license
+ can be found in "/usr/share/common-licenses/Apache-2.0".
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/hawq-doc.dirs
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/hawq-doc.dirs b/bigtop-packages/src/deb/hawq/hawq-doc.dirs
new file mode 100644
index 0000000..61fe83a
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/hawq-doc.dirs
@@ -0,0 +1 @@
+/usr/share/doc/hawq-docs
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/hawq-doc.install
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/hawq-doc.install b/bigtop-packages/src/deb/hawq/hawq-doc.install
new file mode 100644
index 0000000..99376a2
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/hawq-doc.install
@@ -0,0 +1 @@
+/usr/share/doc/hawq-doc
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/hawq.dirs
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/hawq.dirs b/bigtop-packages/src/deb/hawq/hawq.dirs
new file mode 100644
index 0000000..3487c0d
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/hawq.dirs
@@ -0,0 +1,4 @@
+/usr/bin
+/usr/lib/hawq
+/var/log/hawq
+/etc/default
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/hawq.install
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/hawq.install b/bigtop-packages/src/deb/hawq/hawq.install
new file mode 100644
index 0000000..59d4005
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/hawq.install
@@ -0,0 +1,3 @@
+/usr/lib/hawq
+/usr/bin/hawq
+/etc/hawq
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/hawq.manpages
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/hawq.manpages b/bigtop-packages/src/deb/hawq/hawq.manpages
new file mode 100644
index 0000000..e5d94ec
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/hawq.manpages
@@ -0,0 +1 @@
+debian/hawq.1
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/hawq.postinst
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/hawq.postinst b/bigtop-packages/src/deb/hawq/hawq.postinst
new file mode 100644
index 0000000..916a8a4
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/hawq.postinst
@@ -0,0 +1,47 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# postinst script for hawq
+
+hawq_pkg_name=hawq
+
+set -e
+
+case "$1" in
+ configure)
+ # Install config alternatives
+ update-alternatives --install /etc/${hawq_pkg_name}/conf ${hawq_pkg_name}-conf \
+ /etc/${hawq_pkg_name}/conf.dist 30
+
+ mkdir -p /var/log/${hawq_pkg_name} /var/run/${hawq_pkg_name} /var/run/${hawq_pkg_name}/work || :
+ chown hawq:hawq /var/log/${hawq_pkg_name} /var/run/${hawq_pkg_name}
+ chmod g+w /var/log/${hawq_pkg_name} /var/run/${hawq_pkg_name}
+ chown hawq:hawq /var/run/${hawq_pkg_name} /var/run/${hawq_pkg_name}/work
+ chmod 0755 /var/run/${hawq_pkg_name}
+ chmod 1777 /var/run/${hawq_pkg_name}/work
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/hawq.preinst
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/hawq.preinst b/bigtop-packages/src/deb/hawq/hawq.preinst
new file mode 100644
index 0000000..0b36a7a
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/hawq.preinst
@@ -0,0 +1,61 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# preinst script for hawq
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <new-preinst> `install'
+# * <new-preinst> `install' <old-version>
+# * <new-preinst> `upgrade' <old-version>
+# * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ install|upgrade)
+ if ! getent passwd hawq >/dev/null; then
+ # Adding system user: hawq
+ adduser \
+ --system \
+ --group \
+ --home /var/run/hawq \
+ --gecos "HAWQ User" \
+ --shell /bin/bash \
+ hawq >/dev/null
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/hawq.prerm
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/hawq.prerm b/bigtop-packages/src/deb/hawq/hawq.prerm
new file mode 100644
index 0000000..0bcaf3c
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/hawq.prerm
@@ -0,0 +1,55 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# prerm script for hawq
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ update-alternatives --remove hawq-conf /etc/hawq/conf.dist || :
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/rules
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/rules b/bigtop-packages/src/deb/hawq/rules
new file mode 100755
index 0000000..21d9f00
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/rules
@@ -0,0 +1,54 @@
+#!/usr/bin/make -f
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -*- makefile -*-
+SHELL=/bin/bash
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+hawq_pkg_name=hawq
+
+%:
+ dh $@
+
+override_dh_auto_build:
+ bash debian/do-component-build
+
+
+override_dh_auto_install:
+ cp debian/hawq.default debian/${hawq_pkg_name}/etc/default/${hawq_pkg_name}
+ env HADOOP_VERSION=${HAWQ_BASE_VERSION} \
+ bash -x debian/install_hawq.sh \
+ --build-dir=target/bin \
+ --conf-dir=/etc/${hawq_pkg_name}/conf.dist \
+ --doc-dir=usr/share/doc/${hawq_pkg_name}-doc \
+ --prefix=debian/tmp
+ ln -s /var/log/${hawq_pkg_name} debian/tmp/usr/lib/${hawq_pkg_name}/logs
+ ln -s /var/run/${hawq_pkg_name} debian/tmp/usr/lib/${hawq_pkg_name}/pids
+ bash debian/init.d.tmpl debian/hawq.svc deb debian/${hawq_pkg_name}-service.init
+
+## Let's override the auto_configure and auto_clean to make sure existing
+## top-level Makefile doesn't interfere with the package creation
+override_dh_auto_configure:
+
+override_dh_auto_clean:
+
+override_dh_auto_test:
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/deb/hawq/source/format
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hawq/source/format b/bigtop-packages/src/deb/hawq/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/bigtop-packages/src/deb/hawq/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/rpm/hawq/BUILD/.gitignore
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/hawq/BUILD/.gitignore b/bigtop-packages/src/rpm/hawq/BUILD/.gitignore
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/rpm/hawq/RPMS/.gitignore
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/hawq/RPMS/.gitignore b/bigtop-packages/src/rpm/hawq/RPMS/.gitignore
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/rpm/hawq/SOURCES/.gitignore
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/hawq/SOURCES/.gitignore b/bigtop-packages/src/rpm/hawq/SOURCES/.gitignore
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/rpm/hawq/SPECS/hawq.spec
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/hawq/SPECS/hawq.spec b/bigtop-packages/src/rpm/hawq/SPECS/hawq.spec
new file mode 100644
index 0000000..39fdcdf
--- /dev/null
+++ b/bigtop-packages/src/rpm/hawq/SPECS/hawq.spec
@@ -0,0 +1,184 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+%define etc_hawq_conf %{_sysconfdir}/%{name}/conf
+%define etc_hawq_conf_dist %{etc_hawq_conf}.dist
+%define hawq_home /usr/lib/%{name}
+%define bin_hawq %{hawq_home}/bin
+%define lib_hawq %{hawq_home}/lib
+%define conf_hawq %{hawq_home}/config
+%define logs_hawq %{hawq_home}/logs
+%define pids_hawq %{hawq_home}/pids
+%define man_dir %{_mandir}
+%define hawq_username hawq
+%define vcs_tag %{hawq_version}
+
+%if %{?suse_version:1}0
+
+# Only tested on openSUSE 11.4. le'ts update it for previous release when confirmed
+%if 0%{suse_version} > 1130
+%define suse_check \# Define an empty suse_check for compatibility with older sles
+%endif
+
+# SLES is more strict anc check all symlinks point to valid path
+# But we do point to a hadoop jar which is not there at build time
+# (but would be at install time).
+# Since our package build system does not handle dependencies,
+# these symlink checks are deactivated
+%define __os_install_post \
+ %{suse_check} ; \
+ /usr/lib/rpm/brp-compress ; \
+ %{nil}
+
+%define doc_hawq %{_docdir}/%{name}
+%global initd_dir %{_sysconfdir}/rc.d
+%define alternatives_cmd update-alternatives
+
+%else
+
+# CentOS 5 does not have any dist macro
+# So I will suppose anything that is not Mageia or a SUSE will be a RHEL/CentOS/Fedora
+%if %{!?mgaversion:1}0
+
+# FIXME: brp-repack-jars uses unzip to expand jar files
+# Unfortunately guice-2.0.jar pulled by ivy contains some files and directories without any read permission
+# and make whole process to fail.
+# So for now brp-repack-jars is being deactivated until this is fixed.
+# See BIGTOP-294
+#%define __os_install_post \
+# %{_rpmconfigdir}/brp-compress ; \
+# %{_rpmconfigdir}/brp-strip-static-archive %{__strip} ; \
+# %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} ; \
+# /usr/lib/rpm/brp-python-bytecompile ; \
+# %{nil}
+%endif
+
+%define doc_hawq %{_docdir}/%{name}-%{hawq_version}
+%global initd_dir %{_sysconfdir}/rc.d/init.d
+%define alternatives_cmd alternatives
+
+%endif
+
+
+Name: hawq
+Version: %{hawq_version}
+Release: %{hawq_release}
+Summary: Apache Hawq (incubating) is an advanced analytics MPP database
+URL: http://hawq.incubator.apache.org/
+Group: Development/Libraries
+Buildroot: %{_topdir}/INSTALL/%{name}-%{version}
+License: APL2
+Source0: hawq-%{hawq_base_version}.tar.gz
+Source1: do-component-build
+Source2: install_hawq.sh
+Source3: hawq.svc
+Source4: init.d.tmpl
+Source5: hawq.default
+Requires: coreutils, /usr/sbin/useradd, /sbin/chkconfig, /sbin/service
+Requires: hadoop-hdfs, bigtop-utils >= 1.0
+
+%if 0%{?mgaversion}
+Requires: bsh-utils
+%else
+Requires: sh-utils
+%endif
+
+%description
+Hawq is an open-source, distributed, MPP database engine
+
+%package doc
+Summary: Hawq Documentation
+Group: Documentation
+BuildArch: noarch
+
+%description doc
+Documentation for Hawq platform
+
+%prep
+%setup -n hawq-%{vcs_tag}
+
+%build
+bash %{SOURCE1}
+
+%install
+%__rm -rf $RPM_BUILD_ROOT
+env HAWQ_VERSION=%{version} bash %{SOURCE2} \
+ --build-dir=target/bin \
+ --doc-dir=%{doc_hawq} \
+ --conf-dir=%{etc_hawq_conf_dist} \
+ --prefix=$RPM_BUILD_ROOT
+
+%__install -d -m 0755 $RPM_BUILD_ROOT/%{initd_dir}/
+
+%__install -d -m 0755 $RPM_BUILD_ROOT/etc/default/
+%__install -m 0644 %{SOURCE5} $RPM_BUILD_ROOT/etc/default/%{name}
+
+%__install -d -m 0755 %{buildroot}/%{_localstatedir}/log/%{name}
+
+ln -s %{_localstatedir}/log/%{name} %{buildroot}/%{logs_hawq}
+
+%__install -d -m 0755 %{buildroot}/%{_localstatedir}/run/%{name}
+ln -s %{_localstatedir}/run/%{name} %{buildroot}/%{pids_hawq}
+
+init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{name}
+bash %{SOURCE4} ${RPM_SOURCE_DIR}/hawq.svc rpm $init_file
+chmod 755 $init_file
+
+%__install -d -m 0755 $RPM_BUILD_ROOT/usr/bin
+
+%pre
+getent group hawq 2>/dev/null >/dev/null || /usr/sbin/groupadd -r hawq
+getent passwd hawq 2>&1 > /dev/null || /usr/sbin/useradd -c "hawq" -s /sbin/nologin -g hawq -r -d /var/run/hawq hawq 2> /dev/null || :
+
+%post
+%{alternatives_cmd} --install %{etc_hawq_conf} %{name}-conf %{etc_hawq_conf_dist} 30
+chkconfig --add %{name}
+
+%preun
+if [ "$1" = 0 ]; then
+ %{alternatives_cmd} --remove %{name}-conf %{etc_hawq_conf_dist} || :
+fi
+
+if [ $1 = 0 ] ; then
+ service %{name} stop > /dev/null 2>&1
+ chkconfig --del %{name}
+fi
+
+%postun
+if [ $1 -ge 1 ]; then
+ service %{name} condrestart >/dev/null 2>&1
+fi
+
+
+#######################
+#### FILES SECTION ####
+#######################
+%files
+%defattr(-,hawq,hawq)
+%attr(0755,root,root)/%{initd_dir}/%{name}
+%dir %{_localstatedir}/log/%{name}
+%dir %{_localstatedir}/run/%{name}
+
+%defattr(-,root,root)
+%config(noreplace) %{_sysconfdir}/default/%{name}
+%{hawq_home}
+/usr/bin/%{name}
+%config(noreplace) %{etc_hawq_conf_dist}
+
+%files doc
+%defattr(-,root,root)
+%doc %{doc_hawq}
+
+
+
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop-packages/src/rpm/hawq/SRPMS/.gitignore
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/hawq/SRPMS/.gitignore b/bigtop-packages/src/rpm/hawq/SRPMS/.gitignore
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6e69e4d2/bigtop.bom
----------------------------------------------------------------------
diff --git a/bigtop.bom b/bigtop.bom
index b476616..49fe575 100644
--- a/bigtop.bom
+++ b/bigtop.bom
@@ -401,5 +401,15 @@ bigtop {
site = "${apache.APACHE_MIRROR}/${download_path}"
archive = "${apache.APACHE_ARCHIVE}/${download_path}" }
}
+ 'hawq' {
+ name = 'hawq'
+ relNotes = 'Apache HAWQ (incubating)'
+ version { base = '2.0.0'; pkg = base; release = 1 }
+ tarball { source = "$name-${version.base}-incubating.zip"
+ destination = "$name-${version.base}.tar.gz" }
+ url { download_path = "/incubator/$name/${version.base}-incubating/"
+ site = "${apache.APACHE_MIRROR}/${download_path}"
+ archive = "${apache.APACHE_ARCHIVE}/${download_path}" }
+ }
}
}
[3/3] bigtop git commit: BIGTOP-2321. Use GH tag to grab the sources
of the component
Posted by co...@apache.org.
BIGTOP-2321. Use GH tag to grab the sources of the component
Until an official release is available from the incubator
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/25ba61ac
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/25ba61ac
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/25ba61ac
Branch: refs/heads/BIGTOP-2320
Commit: 25ba61acb6165d33a1c133bff4605e9adef0d3e7
Parents: 6e69e4d
Author: Konstantin Boudnik <co...@apache.org>
Authored: Thu Feb 11 11:10:50 2016 +0300
Committer: Konstantin Boudnik <co...@apache.org>
Committed: Thu Feb 11 11:10:50 2016 +0300
----------------------------------------------------------------------
bigtop.bom | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/25ba61ac/bigtop.bom
----------------------------------------------------------------------
diff --git a/bigtop.bom b/bigtop.bom
index 49fe575..17cb333 100644
--- a/bigtop.bom
+++ b/bigtop.bom
@@ -405,11 +405,11 @@ bigtop {
name = 'hawq'
relNotes = 'Apache HAWQ (incubating)'
version { base = '2.0.0'; pkg = base; release = 1 }
- tarball { source = "$name-${version.base}-incubating.zip"
+ tarball { source = "${version.base}-beta-incubating-RC4.tar.gz"
destination = "$name-${version.base}.tar.gz" }
- url { download_path = "/incubator/$name/${version.base}-incubating/"
- site = "${apache.APACHE_MIRROR}/${download_path}"
- archive = "${apache.APACHE_ARCHIVE}/${download_path}" }
+ url { download_path = "/apache/incubator-$name/archive"
+ site = "https://github.com/${download_path}"
+ archive = site }
}
}
}