You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2016/05/27 16:40:59 UTC

[04/15] incubator-trafodion git commit: Installing odbc linux driver along with server component

Installing odbc linux driver along with server component


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

Branch: refs/heads/master
Commit: 908e2422c56f6fd1aba46dd53b00dcf265cf3af4
Parents: 6c7cac6
Author: Anuradha Hegde <he...@edev05.esgyn.local>
Authored: Thu May 19 23:55:19 2016 +0000
Committer: Anuradha Hegde <he...@edev05.esgyn.local>
Committed: Thu May 19 23:55:19 2016 +0000

----------------------------------------------------------------------
 core/conn/odbc/src/odbc/Makefile                              | 7 ++++---
 core/conn/unixodbc/odbc/odbcclient/unixcli/makefile.lnx       | 6 +-----
 .../conn/unixodbc/odbc/odbcclient/unixcli/package/mklnxpkg.sh | 2 ++
 .../odbc/odbcclient/unixcli/package/runconnect_test.sh        | 5 +++++
 core/sqf/Makefile                                             | 1 +
 core/sqf/sql/scripts/install_traf_components                  | 3 ++-
 core/sqf/sqvers                                               | 2 +-
 install/installer/traf_package_setup                          | 2 +-
 8 files changed, 17 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/908e2422/core/conn/odbc/src/odbc/Makefile
----------------------------------------------------------------------
diff --git a/core/conn/odbc/src/odbc/Makefile b/core/conn/odbc/src/odbc/Makefile
index 4fd630c..7c7ccb9 100644
--- a/core/conn/odbc/src/odbc/Makefile
+++ b/core/conn/odbc/src/odbc/Makefile
@@ -72,11 +72,12 @@ cleanall: cleanallndcs cleanlnx_drvr
 include $(MY_SQROOT)/macros.gmk
 bldlnx_drvr:
 	cd $(MY_SQROOT)/../conn/unixodbc/odbc/odbcclient/unixcli;$(MAKE) -f makefile.lnx linux64_$(SQ_BUILD_TYPE)
-	cd $(MY_SQROOT)/../conn/unixodbc/odbc/odbcclient/unixcli/package;rm -rf *.gz; ./mklnxpkg.sh -f; cp -p trafodbc_Linux64_pkg.tar.gz $(MY_SQROOT)/../conn/clients/TRAF_ODBC_Linux_Driver_64.tar.gz
+	cd $(MY_SQROOT)/../conn/unixodbc/odbc/odbcclient/unixcli/package;rm -rf *.gz $(LIBEXPDIR)/libicu* $(LIBEXPDIR)/libtrafodbc*; ./mklnxpkg.sh -f; cp -p trafodbc_Linux64_pkg.tar.gz $(MY_SQROOT)/../conn/clients/TRAF_ODBC_Linux_Driver_64.tar.gz; cp -p relfiles/linux64/lib* $(LIBEXPDIR);ln -s $(LIBEXPDIR)/libicudata.so.44  $(LIBEXPDIR)/libicudata.so;ln -s $(LIBEXPDIR)/libicuuc.so.44  $(LIBEXPDIR)/libicuuc.so;ln -s $(LIBEXPDIR)/libtrafodbc_l64.so  $(LIBEXPDIR)/libtrafodbc64.so;ln -s $(LIBEXPDIR)/libtrafodbc_l64_drvr.so  $(LIBEXPDIR)/libtrafodbc_drvr64.so;cp -p relfiles/linux64/{connect_test.cpp,TRAFDSN,runconnect_test.sh} $(MY_SQROOT)/samples
 
 # Linux ODBC driver clean targets	
 .PHONY: cleanlnx_drvr
 cleanlnx_drvr:
 	cd $(MY_SQROOT)/../conn/unixodbc/odbc/odbcclient/unixcli;$(MAKE) -f makefile.lnx clean; 
-	/bin/rm -f $(LIBEXPDIR)/libtrafodbc*
-
+	/bin/rm -f $(LIBEXPDIR)/libtrafodbc* $(LIBEXPDIR)/libicu*
+	cd $(MY_SQROOT)/../conn/unixodbc/odbc/odbcclient/unixcli/package;rm -rf *.gz relfiles
+	cd $(MY_SQROOT)/samples;rm -rf connect_test* runconnect_test.sh TRAFDSN

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/908e2422/core/conn/unixodbc/odbc/odbcclient/unixcli/makefile.lnx
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/makefile.lnx b/core/conn/unixodbc/odbc/odbcclient/unixcli/makefile.lnx
index 926b3eb..1d5d935 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/makefile.lnx
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/makefile.lnx
@@ -72,14 +72,10 @@ DRVREXPOBJ = $(addprefix $(OBJDIR), $(EXPOBJS))
 linux64_debug: dmanager cli interface common ipv4 exp trace
 	$(LINK) -fPIC -m64 -shared -rdynamic -Wl,-soname,$(ODBC_SO_FILE)_l64.so -o $(ODBC_SO_FILE)_l64.so $(DRVROBJ) $(DRVRMGROBJ) $(INCLUDE) $(LIBS)
 	$(LINK) -fPIC -m64 -shared -rdynamic -Wl,-soname,$(ODBC_SO_FILE)_l64_drvr.so -o $(ODBC_SO_FILE)_l64_drvr.so $(DRVROBJ) $(DRVREXPOBJ) $(INCLUDE) $(LIBS)
-	ln -s -f $(ODBC_SO_FILE)_l64_drvr.so $(ODBC_SO_FILE)_drvr_l64.so
-	cp -p $(ODBC_SO_FILE)_drvr_l64.so $(LIBEXPDIR)/.
 
 linux64_release: dmanager cli interface common ipv4 exp trace
 	$(LINK) -m64 -shared -rdynamic -Wl,-soname,$(ODBC_SO_FILE)_l64.so -o $(ODBC_SO_FILE)_l64.so $(DRVROBJ) $(DRVRMGROBJ) $(INCLUDE) $(LIBS)
 	$(LINK) -m64 -shared -rdynamic -Wl,-soname,$(ODBC_SO_FILE)_l64_drvr.so -o $(ODBC_SO_FILE)_l64_drvr.so $(DRVROBJ) $(DRVREXPOBJ) $(INCLUDE) $(LIBS)
-	ln -s -f $(ODBC_SO_FILE)_l64_drvr.so $(ODBC_SO_FILE)_drvr_l64.so
-	cp -p $(ODBC_SO_FILE)_drvr_l64.so $(LIBEXPDIR)/.
 
 dmanager: $(DMOBJS)
 
@@ -97,7 +93,7 @@ exp: $(EXPOBJS)
 
 clean:
 	rm -rf obj
-	rm -rf libtrafodbc_*
+	rm -rf libtrafodbc_* 
 	rm -rf trace/version.cpp trace/version_drvr.cpp
 
 .cpp.o:

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/908e2422/core/conn/unixodbc/odbc/odbcclient/unixcli/package/mklnxpkg.sh
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/package/mklnxpkg.sh b/core/conn/unixodbc/odbc/odbcclient/unixcli/package/mklnxpkg.sh
index 7c20984..c790a64 100755
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/package/mklnxpkg.sh
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/package/mklnxpkg.sh
@@ -116,6 +116,8 @@ then
     ((err += $?))
     cp ../../connect_test.cpp   connect_test.cpp
     ((err += $?))
+    cp ../../runconnect_test.sh   runconnect_test.sh
+    ((err += $?))
     cp $MY_SQROOT/../../licenses/Apache license.txt
     ((err += $?))
     cd ..

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/908e2422/core/conn/unixodbc/odbc/odbcclient/unixcli/package/runconnect_test.sh
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/package/runconnect_test.sh b/core/conn/unixodbc/odbc/odbcclient/unixcli/package/runconnect_test.sh
new file mode 100755
index 0000000..d2e7f92
--- /dev/null
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/package/runconnect_test.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+g++ -g connect_test.cpp -L${MY_SQROOT}/export/lib64 -I/usr/include/odbc -ltrafodbc64 -o connect_test
+
+./connect_test -d Default_DataSource -u ss -p ss
+

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/908e2422/core/sqf/Makefile
----------------------------------------------------------------------
diff --git a/core/sqf/Makefile b/core/sqf/Makefile
index 1a13269..551f649 100644
--- a/core/sqf/Makefile
+++ b/core/sqf/Makefile
@@ -286,6 +286,7 @@ PKG_BIN_OBJS += LICENSE NOTICE
 
 PKG_BIN_DIRS ?= sql export
 PKG_BIN_DIRS += trafci
+PKG_BIN_DIRS += samples
 
 # Package Regression variables (parser file is for compGeneral/TESTTOK2)
 PKG_REGRESS_OBJS ?= $(SQL_W)/regress inc/seaquest/sqtypes.h inc/fs/feerrors.h $(SQL_W)/cli/sqlcli.h $(SQL_W)/cli/SQLCLIdev.h $(SQL_W)/parser/sqlparser.y

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/908e2422/core/sqf/sql/scripts/install_traf_components
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/install_traf_components b/core/sqf/sql/scripts/install_traf_components
index 921de71..626a9dd 100755
--- a/core/sqf/sql/scripts/install_traf_components
+++ b/core/sqf/sql/scripts/install_traf_components
@@ -371,7 +371,8 @@ YES
 EOF
     cd .. 
     mv TRAFDSN TRAFDSN.orig 
-    sed -e "s@TCP:1.2.3.4:23400@TCP:localhost:$MY_DCS_MASTER_PORT@" TRAFDSN.orig >> TRAFDSN 
+    sed -e "s@TCP:localhost:23400@TCP:localhost:$MY_DCS_MASTER_PORT@" TRAFDSN.orig >> TRAFDSN 
+    cp -p TRAFDSN $MY_SQROOT/samples
     echo "Successfully installed linux driver in $LNXDRVR"| tee -a ${MY_LOG_FILE}
     echo "Creating odbcinst.ini file..." |tee -a ${MY_LOG_FILE}
     cat <<EOF >$LNXDRVR/odbcinst.ini

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/908e2422/core/sqf/sqvers
----------------------------------------------------------------------
diff --git a/core/sqf/sqvers b/core/sqf/sqvers
index 6f753a8..313474f 100755
--- a/core/sqf/sqvers
+++ b/core/sqf/sqvers
@@ -171,7 +171,7 @@ sub find_elfs ($$) {
 		if ($file =~ /libQtGuiCmpDbg.so.4/) {
 			$dochk = 0;
 		}
-		if ($file =~ /libhdfs.so|libhadoop.so|libmysql|libthrift|libzookeeper|libcurl|^liblog4cxx/) {
+		if ($file =~ /libhdfs.so|libhadoop.so|libmysql|libthrift|libzookeeper|libcurl|^liblog4cxx|^libicu/) {
 			$dochk = 0;
 		}
 		if ($file =~ /mpirun|hydra_pmi_proxy/) {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/908e2422/install/installer/traf_package_setup
----------------------------------------------------------------------
diff --git a/install/installer/traf_package_setup b/install/installer/traf_package_setup
index e9cf949..4469e06 100755
--- a/install/installer/traf_package_setup
+++ b/install/installer/traf_package_setup
@@ -151,7 +151,7 @@ if [[ $SUSE_LINUX == "false" ]]; then
    # it doesn't hurt if it was already enabled and we try to enable it again
    $TRAF_PDSH sudo yum-config-manager --enable RedHat-6-x86_64-Fedora-EPEL 2>> $YUM_LOG >> $YUM_LOG
 
-   package_list="apr apr-util sqlite expect perl-DBD-SQLite* protobuf xerces-c perl-Params-Validate perl-Time-HiRes gzip lzo lzop unzip"
+   package_list="apr apr-util sqlite expect perl-DBD-SQLite* protobuf xerces-c perl-Params-Validate perl-Time-HiRes gzip lzo lzop unzip unixODBC unixODBC-devel libiodbc libiodbc-devel"
    if [[ $internetAccess == "true" ]]; then
       for package in $package_list
       do