You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by pa...@apache.org on 2017/06/01 06:58:46 UTC
incubator-hawq git commit: HAWQ-1478. Enable hawq build on suse11
Repository: incubator-hawq
Updated Branches:
refs/heads/master 4068f3ce0 -> abd74ed1c
HAWQ-1478. Enable hawq build on suse11
This was done by amyrazz44, edespino, internma and liming01 intermittently.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/abd74ed1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/abd74ed1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/abd74ed1
Branch: refs/heads/master
Commit: abd74ed1cc6a1df538ea5ac9df4bef5ce6b52c29
Parents: 4068f3c
Author: interma <in...@outlook.com>
Authored: Tue Apr 25 15:35:36 2017 +0800
Committer: Paul Guo <pa...@gmail.com>
Committed: Thu Jun 1 14:44:05 2017 +0800
----------------------------------------------------------------------
src/bin/gpfdist/Makefile | 3 ++-
src/pl/Makefile | 21 ++++++++++++++++-----
src/pl/plr.spec | 4 +++-
src/pl/vplr.spec | 3 ++-
tools/bin/hawqregister | 6 +++---
tools/bin/lib/hawqinit.sh | 2 ++
6 files changed, 28 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/abd74ed1/src/bin/gpfdist/Makefile
----------------------------------------------------------------------
diff --git a/src/bin/gpfdist/Makefile b/src/bin/gpfdist/Makefile
index 1ff2ed8..ef20efe 100644
--- a/src/bin/gpfdist/Makefile
+++ b/src/bin/gpfdist/Makefile
@@ -20,7 +20,8 @@ subdir = src/bin/gpfdist
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-LIBS := -levent -lyaml -lz -lbz2 -lssl -lcrypto
+#LIBS := -levent -lyaml -lz -lbz2 -lssl -lcrypto
+LIBS := $(LDFLAGS) -levent -lyaml -lz -lbz2 -lssl -lcrypto
ifeq ($(BUILD_TYPE), gcov)
LIBS := -lgcov $(LIBS)
CFLAGS := -fprofile-arcs -ftest-coverage $(CFLAGS)
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/abd74ed1/src/pl/Makefile
----------------------------------------------------------------------
diff --git a/src/pl/Makefile b/src/pl/Makefile
index e399396..4ac2ef7 100644
--- a/src/pl/Makefile
+++ b/src/pl/Makefile
@@ -53,24 +53,35 @@ ABS_PLR_SRCDIR = $(abs_top_srcdir)/$(subdir)/plr
HAWQ_VERSION := $(shell cat $(abs_top_srcdir)/VERSION | awk '{print $$1}')
HAWQ_VERSION_STR := $(shell cat $(abs_top_srcdir)/VERSION | awk '{print $$1}' | sed 's/\./_/g')
HAWQ_BUILD_NUMBER := $(shell cat $(abs_top_srcdir)/VERSION | awk '{print $$3}')
-REDHAT_MAJOR_VERSION := $(shell cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*// | awk -F '.' '{print $$1}')
+OS_VERSION_DISTRO := $(shell \
+distro_name=""; \
+distro_version=""; \
+if [ -f /etc/redhat-release ]; then \
+ distro_name="el"; \
+ distro_version=`cat /etc/redhat-release | sed 's/.*release\ //' | sed 's/\ .*//' | awk -F '.' '{print $$1}'`; \
+elif [ -f /etc/SuSE-release ]; then \
+ distro_name="sles"; \
+ distro_version=`cat /etc/SuSE-release | grep 'VERSION' | awk -F '=' '{print $$2}'| sed 's/\ *//' | awk -F '.' '{print $$1}'`; \
+fi; \
+echo $$distro_name$$distro_version; \
+)
# rpm only so far.
plr_pkgbuild: plr_prepare
- if [ ! -f /etc/redhat-release ]; then echo "rpm build is not supported on the platform."; exit 1; fi
+ if [ ! -f /etc/redhat-release ] && [ ! -f /etc/SuSE-release ]; then echo "rpm build is not supported on the platform."; exit 1; fi
if [ ! -f $(abs_top_srcdir)/VERSION ]; then echo "VERSION file is missing. Forgot to run configure?"; exit 1; fi
- rm -rf plr/build; mkdir -p plr/build;
+ rm -rf plr/build; mkdir -p plr/build/BUILD; mkdir -p plr/build/RPMS/;
rpmbuild -bb plr.spec --define 'plr_srcdir $(ABS_PLR_SRCDIR)' \
--define 'hawq_version $(HAWQ_VERSION)' \
--define 'hawq_version_str $(HAWQ_VERSION_STR)' \
--define 'hawq_build_number $(HAWQ_BUILD_NUMBER)' \
- --define 'redhat_major_version $(REDHAT_MAJOR_VERSION)' \
+ --define 'os_version_distro $(OS_VERSION_DISTRO)' \
--define '_topdir $(ABS_PLR_SRCDIR)/build' --define '__os_install_post \%{nil}'
rpmbuild -bb vplr.spec \
--define 'hawq_version $(HAWQ_VERSION)' \
--define 'hawq_version_str $(HAWQ_VERSION_STR)' \
--define 'hawq_build_number $(HAWQ_BUILD_NUMBER)' \
- --define 'redhat_major_version $(REDHAT_MAJOR_VERSION)' \
+ --define 'os_version_distro $(OS_VERSION_DISTRO)' \
--define '_topdir $(ABS_PLR_SRCDIR)/build'
ifeq ($(with_r), yes)
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/abd74ed1/src/pl/plr.spec
----------------------------------------------------------------------
diff --git a/src/pl/plr.spec b/src/pl/plr.spec
index 0f47322..d468edd 100644
--- a/src/pl/plr.spec
+++ b/src/pl/plr.spec
@@ -1,12 +1,14 @@
Summary: PL/R module for HAWQ
Name: plr-hawq_%{hawq_version_str}
Version: 08.03.00.14.%{hawq_version}
-Release: %{hawq_build_number}.el%{redhat_major_version}
+Release: %{hawq_build_number}.%{os_version_distro}
Prefix: /usr/local/hawq_%{hawq_version_str}
License: GPL
+Group: Applications/Databases
BuildRequires: R-core-devel
Requires: R
Provides: plr-hawq
+BuildRoot: %{_tmppath}/%{name}-buildroot
%define _unpackaged_files_terminate_build 0
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/abd74ed1/src/pl/vplr.spec
----------------------------------------------------------------------
diff --git a/src/pl/vplr.spec b/src/pl/vplr.spec
index 3931c98..b826090 100644
--- a/src/pl/vplr.spec
+++ b/src/pl/vplr.spec
@@ -1,8 +1,9 @@
Name: plr-hawq
Summary: PL/R module for HAWQ
Version: 08.03.00.14.%{hawq_version}
-Release: %{hawq_build_number}.el%{redhat_major_version}
+Release: %{hawq_build_number}.%{os_version_distro}
License: GPL
+Group: Applications/Databases
Prefix: /usr/local
Requires: plr-hawq_%{hawq_version_str}
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/abd74ed1/tools/bin/hawqregister
----------------------------------------------------------------------
diff --git a/tools/bin/hawqregister b/tools/bin/hawqregister
index ff2bb96..80f65b4 100755
--- a/tools/bin/hawqregister
+++ b/tools/bin/hawqregister
@@ -835,13 +835,13 @@ class HawqRegister(object):
def _check_parquet_format(self, files):
'''Check whether the file to be registered is parquet format'''
for f in files:
- hdfscmd = 'hadoop fs -du -h %s | head -c 1' % f
+ hdfscmd = 'hadoop fs -du -h %s | head -c1' % f
rc, out, err = local_ssh_output(hdfscmd)
if out == '0':
continue
- hdfscmd = 'hadoop fs -cat %s | head -c 4 | grep PAR1' % f
+ hdfscmd = 'hadoop fs -cat %s | head -c4 | grep PAR1' % f
result1 = local_ssh(hdfscmd)
- hdfscmd = 'hadoop fs -cat %s | tail -c 4 | grep PAR1' % f
+ hdfscmd = 'hadoop fs -cat %s | tail -c4 | grep PAR1' % f
result2 = local_ssh(hdfscmd)
if result1 or result2:
logger.error('File %s is not parquet format' % f)
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/abd74ed1/tools/bin/lib/hawqinit.sh
----------------------------------------------------------------------
diff --git a/tools/bin/lib/hawqinit.sh b/tools/bin/lib/hawqinit.sh
index 5ed0f26..0bc2441 100755
--- a/tools/bin/lib/hawqinit.sh
+++ b/tools/bin/lib/hawqinit.sh
@@ -192,6 +192,8 @@ LOAD_GP_TOOLKIT () {
get_master_ipv6_addresses() {
if [ "${distro_based_on}" = "Mac" ]; then
MASTER_IPV6_LOCAL_ADDRESS_ALL=(`${IFCONFIG} | ${GREP} inet6 | ${AWK} '{print $2}' | cut -d'%' -f1`)
+ elif [ -f /etc/SuSE-release ]; then
+ MASTER_IPV6_LOCAL_ADDRESS_ALL=(`${IFCONFIG} | ${GREP} inet6 | ${AWK} '{print $3}' | cut -d'%' -f1 | awk -F '/' '{print $1}'`)
else
MASTER_IPV6_LOCAL_ADDRESS_ALL=(`ip -6 address show |${GREP} inet6|${AWK} '{print $2}' |cut -d'/' -f1`)
fi