incubator-hawq git commit: HAWQ-326. Fix specified HAWQ_RELEASE_VERSION for rpm build.

2017-03-29 Thread rlei
Repository: incubator-hawq
Updated Branches:
  refs/heads/2.2.0.0-incubating dc41e4c51 -> d70d7092f


HAWQ-326. Fix specified HAWQ_RELEASE_VERSION for rpm build.

This fix included:
  1) Fixed HAWQ_RELEASE_VERSION for rpm tarball.
  2) Make sure distclean delete all the rpm artifacts.
  3) Added some log output.
  4) Fix exit status


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/d70d7092
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/d70d7092
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/d70d7092

Branch: refs/heads/2.2.0.0-incubating
Commit: d70d7092ff6296a45a75368919f5803c41b026f0
Parents: dc41e4c
Author: rlei 
Authored: Tue Mar 28 22:19:29 2017 +0800
Committer: rlei 
Committed: Wed Mar 29 14:08:52 2017 +0800

--
 GNUmakefile.in|  1 +
 contrib/Makefile  |  1 +
 contrib/hawq-package/build_hawq_rpm.sh| 15 +--
 contrib/hawq-package/make_rpm_tarball.sh  | 23 +--
 pxf/Makefile  |  3 +++
 ranger-plugin/scripts/build_ranger_rpm.sh |  6 +++---
 6 files changed, 34 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d70d7092/GNUmakefile.in
--
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 8ac58e3..5e97160 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -88,6 +88,7 @@ distclean maintainer-clean:
-$(MAKE) -C tools $@
-$(MAKE) -C src feature-test-clean
-$(MAKE) -C src $@
+   -$(MAKE) -C pxf $@
-$(MAKE) -C ranger-plugin $@
-rm -f config.cache config.log config.status GNUmakefile
 # Garbage from autoconf:

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d70d7092/contrib/Makefile
--
diff --git a/contrib/Makefile b/contrib/Makefile
index a75d930..695e92a 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -28,6 +28,7 @@ clean distclean maintainer-clean:
@for dir in $(WANTED_DIRS); do \
$(MAKE) -C $$dir $@ || true; \
done
+   $(MAKE) -C hawq-package $@
 
 # We'd like check operations to run all the subtests before failing.
 check installcheck: pgcrypto_prepare

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d70d7092/contrib/hawq-package/build_hawq_rpm.sh
--
diff --git a/contrib/hawq-package/build_hawq_rpm.sh 
b/contrib/hawq-package/build_hawq_rpm.sh
index 5385aff..c3c3309 100755
--- a/contrib/hawq-package/build_hawq_rpm.sh
+++ b/contrib/hawq-package/build_hawq_rpm.sh
@@ -54,9 +54,14 @@ fi
 
 # Copy HAWQ source code tarball for rpm build
 if [ -f "${HAWQ_SOURCE_TARBALL_PATH}/${HAWQ_SOURCE_TARBALL_FILE}" ]; then
+echo "Using HAWQ source code tarball: 
${HAWQ_SOURCE_TARBALL_PATH}/${HAWQ_SOURCE_TARBALL_FILE}"
 cp ${HAWQ_SOURCE_TARBALL_PATH}/${HAWQ_SOURCE_TARBALL_FILE} 
rpmbuild/SOURCES/
 else
-echo "Can not find ${HAWQ_SOURCE_TARBALL_PATH}/${HAWQ_SOURCE_TARBALL_FILE} 
"
+echo 
"="
+echo "Can not find ${HAWQ_SOURCE_TARBALL_PATH}/${HAWQ_SOURCE_TARBALL_FILE}"
+echo "Please copy the source code tarball in place."
+echo "Or use environment variable 'HAWQ_SOURCE_TARBALL_PATH' to specify 
the find path of HAWQ source tarball."
+echo 
"="
 exit 1
 fi
 
@@ -71,8 +76,14 @@ rpmbuild --define "_topdir ${RPM_TOP_DIR}" \
  -bb SPECS/hawq.spec
 if [ $? != 0 ]; then
 echo "Build HAWQ rpm package failed, exit..."
-exit 0
+exit $?
 fi
 
 set +x
 popd > /dev/null
+
+echo 
"="
+echo "Build HAWQ rpm package successfully."
+echo 
"="
+echo ""
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d70d7092/contrib/hawq-package/make_rpm_tarball.sh
--
diff --git a/contrib/hawq-package/make_rpm_tarball.sh 
b/contrib/hawq-package/make_rpm_tarball.sh
index 90895b7..ba0c4f7 100755
--- a/contrib/hawq-package/make_rpm_tarball.sh
+++ b/contrib/hawq-package/make_rpm_tarball.sh
@@ -19,7 +19,9 @@
 CUR_DIR=$(pwd)
 SRC_TOP_DIR=../..
 
-HAWQ_RELEASE_VERSION=$(cat ../../getversion| grep ^GP_VERSION | cut -d '=' -f2 
| sed 's|"||g' | cut -d '-' -f1)
+if [ -z  "${HAWQ_RELEASE_VERSION}" ]; then
+HAWQ_RELEASE_VERSION=$(cat ../../getversion| grep ^GP_VERSION | cut -d '=' 
-f2 | sed 

incubator-hawq git commit: HAWQ-326. Fix specified HAWQ_RELEASE_VERSION for rpm build.

2017-03-28 Thread rlei
Repository: incubator-hawq
Updated Branches:
  refs/heads/master dc41e4c51 -> 2761edb60


HAWQ-326. Fix specified HAWQ_RELEASE_VERSION for rpm build.

This fix included:
  1) Fixed HAWQ_RELEASE_VERSION for rpm tarball.
  2) Make sure distclean delete all the rpm artifacts.
  3) Added some log output.
  4) Fix exit status


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/2761edb6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/2761edb6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/2761edb6

Branch: refs/heads/master
Commit: 2761edb60e48290fa011e141d544f8770dbc56c9
Parents: dc41e4c
Author: rlei 
Authored: Tue Mar 28 22:19:29 2017 +0800
Committer: rlei 
Committed: Wed Mar 29 13:26:20 2017 +0800

--
 GNUmakefile.in|  1 +
 contrib/Makefile  |  1 +
 contrib/hawq-package/build_hawq_rpm.sh| 15 +--
 contrib/hawq-package/make_rpm_tarball.sh  | 23 +--
 pxf/Makefile  |  3 +++
 ranger-plugin/scripts/build_ranger_rpm.sh |  6 +++---
 6 files changed, 34 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2761edb6/GNUmakefile.in
--
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 8ac58e3..5e97160 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -88,6 +88,7 @@ distclean maintainer-clean:
-$(MAKE) -C tools $@
-$(MAKE) -C src feature-test-clean
-$(MAKE) -C src $@
+   -$(MAKE) -C pxf $@
-$(MAKE) -C ranger-plugin $@
-rm -f config.cache config.log config.status GNUmakefile
 # Garbage from autoconf:

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2761edb6/contrib/Makefile
--
diff --git a/contrib/Makefile b/contrib/Makefile
index a75d930..695e92a 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -28,6 +28,7 @@ clean distclean maintainer-clean:
@for dir in $(WANTED_DIRS); do \
$(MAKE) -C $$dir $@ || true; \
done
+   $(MAKE) -C hawq-package $@
 
 # We'd like check operations to run all the subtests before failing.
 check installcheck: pgcrypto_prepare

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2761edb6/contrib/hawq-package/build_hawq_rpm.sh
--
diff --git a/contrib/hawq-package/build_hawq_rpm.sh 
b/contrib/hawq-package/build_hawq_rpm.sh
index 5385aff..c3c3309 100755
--- a/contrib/hawq-package/build_hawq_rpm.sh
+++ b/contrib/hawq-package/build_hawq_rpm.sh
@@ -54,9 +54,14 @@ fi
 
 # Copy HAWQ source code tarball for rpm build
 if [ -f "${HAWQ_SOURCE_TARBALL_PATH}/${HAWQ_SOURCE_TARBALL_FILE}" ]; then
+echo "Using HAWQ source code tarball: 
${HAWQ_SOURCE_TARBALL_PATH}/${HAWQ_SOURCE_TARBALL_FILE}"
 cp ${HAWQ_SOURCE_TARBALL_PATH}/${HAWQ_SOURCE_TARBALL_FILE} 
rpmbuild/SOURCES/
 else
-echo "Can not find ${HAWQ_SOURCE_TARBALL_PATH}/${HAWQ_SOURCE_TARBALL_FILE} 
"
+echo 
"="
+echo "Can not find ${HAWQ_SOURCE_TARBALL_PATH}/${HAWQ_SOURCE_TARBALL_FILE}"
+echo "Please copy the source code tarball in place."
+echo "Or use environment variable 'HAWQ_SOURCE_TARBALL_PATH' to specify 
the find path of HAWQ source tarball."
+echo 
"="
 exit 1
 fi
 
@@ -71,8 +76,14 @@ rpmbuild --define "_topdir ${RPM_TOP_DIR}" \
  -bb SPECS/hawq.spec
 if [ $? != 0 ]; then
 echo "Build HAWQ rpm package failed, exit..."
-exit 0
+exit $?
 fi
 
 set +x
 popd > /dev/null
+
+echo 
"="
+echo "Build HAWQ rpm package successfully."
+echo 
"="
+echo ""
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2761edb6/contrib/hawq-package/make_rpm_tarball.sh
--
diff --git a/contrib/hawq-package/make_rpm_tarball.sh 
b/contrib/hawq-package/make_rpm_tarball.sh
index 90895b7..ba0c4f7 100755
--- a/contrib/hawq-package/make_rpm_tarball.sh
+++ b/contrib/hawq-package/make_rpm_tarball.sh
@@ -19,7 +19,9 @@
 CUR_DIR=$(pwd)
 SRC_TOP_DIR=../..
 
-HAWQ_RELEASE_VERSION=$(cat ../../getversion| grep ^GP_VERSION | cut -d '=' -f2 
| sed 's|"||g' | cut -d '-' -f1)
+if [ -z  "${HAWQ_RELEASE_VERSION}" ]; then
+HAWQ_RELEASE_VERSION=$(cat ../../getversion| grep ^GP_VERSION | cut -d '=' 
-f2 | sed 's|"||g' | cut -d '-' -f1)