From 9a3ea6e358be63cbc8d9b63c7feb66311bcd62b3 Mon Sep 17 00:00:00 2001
From: Jason Hiser <jdhiser@gmail.com>
Date: Tue, 4 Feb 2025 12:16:25 -0500
Subject: [PATCH] libpqxx updates

---
 SMPStaticAnalyzer                             |   2 +-
 builtin_xforms/add_lib/SConscript             |   2 +-
 builtin_xforms/move_globals/SConscript        |   2 +-
 builtin_xforms/resolve_callbacks/SConscript   |   2 +-
 irdb-libs/SConscript                          |   2 +-
 irdb-libs/dump_insns/SConscript               |   2 +-
 irdb-libs/dump_map/SConscript                 |   2 +-
 irdb-libs/ir_builders/fix_calls.cpp           |   5 +-
 .../libIRDB-core/include/dbinterface.hpp      |   4 +-
 irdb-libs/libIRDB-core/include/pqxxdb.hpp     |   4 +-
 irdb-libs/libIRDB-core/src/fileir.cpp         |  33 ++--
 irdb-libs/libIRDB-core/src/pqxxdb.cpp         |  51 ++++-
 irdb-libs/libIRDB-util/include/Provenance.hpp |   2 -
 .../libIRDB-util/include/libIRDB-util.hpp     |   1 +
 irdb-libs/libIRDB-util/src/insn_preds.cpp     |   2 +-
 irdb-libs/libehp                              |   2 +-
 irdb-libs/meds2pdb/meds2pdb.cpp               |  21 ++-
 irdb-sdk                                      |   2 +-
 zipr/.gitlab-ci.yml                           | 178 ------------------
 zipr/src/SConscript                           |   2 +
 20 files changed, 99 insertions(+), 222 deletions(-)
 delete mode 100644 zipr/.gitlab-ci.yml

diff --git a/SMPStaticAnalyzer b/SMPStaticAnalyzer
index 27e3bc6da..8fa4854e4 160000
--- a/SMPStaticAnalyzer
+++ b/SMPStaticAnalyzer
@@ -1 +1 @@
-Subproject commit 27e3bc6da82cfe0d3b955310596e0d92df953679
+Subproject commit 8fa4854e447bf469c454592cea6b125df84e9754
diff --git a/builtin_xforms/add_lib/SConscript b/builtin_xforms/add_lib/SConscript
index 4a770b8c1..b54097726 100644
--- a/builtin_xforms/add_lib/SConscript
+++ b/builtin_xforms/add_lib/SConscript
@@ -20,7 +20,7 @@ myenv.Append(CPPPATH=Split(cpppath))
 pgm="add_lib.exe"
 
 LIBPATH="$SECURITY_TRANSFORMS_HOME/lib"
-LIBS=Split("stars "+ myenv.subst('$BASE_IRDB_LIBS')+ " irdb-elfdep irdb-transform") 
+LIBS=Split("stars "+ myenv.subst('$BASE_IRDB_LIBS')+ " irdb-elfdep irdb-transform pqxx pq") 
 pgm=myenv.Program(pgm,  files,  LIBPATH=LIBPATH, LIBS=LIBS)
 install=myenv.Install("$SECURITY_TRANSFORMS_HOME/plugins_install/", pgm)
 Default(install)
diff --git a/builtin_xforms/move_globals/SConscript b/builtin_xforms/move_globals/SConscript
index 5b2ebc37c..c4a1117b3 100644
--- a/builtin_xforms/move_globals/SConscript
+++ b/builtin_xforms/move_globals/SConscript
@@ -20,7 +20,7 @@ files=Glob( Dir('.').srcnode().abspath+"/*.cpp")
 pgm="move_globals.so"
 
 LIBPATH="$PEASOUP_HOME/irdb-libs/lib"
-LIBS=Split("irdb-core irdb-cfg irdb-util irdb-transform irdb-deep StructDiv EXEIO ") 
+LIBS=Split("irdb-core irdb-cfg irdb-util irdb-transform irdb-deep StructDiv EXEIO pqxx pq") 
 myenv.Append(CPPPATH=Split(cpppath))
 pgm=myenv.SharedLibrary(pgm,  files,  LIBPATH=LIBPATH, LIBS=LIBS)
 install=myenv.Install("$PEASOUP_HOME/irdb-libs/plugins_install/", pgm)
diff --git a/builtin_xforms/resolve_callbacks/SConscript b/builtin_xforms/resolve_callbacks/SConscript
index 7da12b8d3..0d7980224 100644
--- a/builtin_xforms/resolve_callbacks/SConscript
+++ b/builtin_xforms/resolve_callbacks/SConscript
@@ -5,7 +5,7 @@ myenv=env.Clone()
 
 cpppath=" $IRDB_SDK/include $SECURITY_TRANSFORMS_HOME/third_party/elfio-code/ "
 libpath="$SECURITY_TRANSFORMS_HOME/lib"
-LIBS=Split( " irdb-core irdb-cfg irdb-util irdb-transform ")
+LIBS=Split( " irdb-core irdb-cfg irdb-util irdb-transform pqxx pq ")
 
 
 myenv.Append(LIBPATH=Split(libpath))
diff --git a/irdb-libs/SConscript b/irdb-libs/SConscript
index 8f9047c46..7233050b3 100644
--- a/irdb-libs/SConscript
+++ b/irdb-libs/SConscript
@@ -43,7 +43,7 @@ if "PEDI_HOME" in os.environ:
 			source = "./SConscript",
 			action = os.environ['PEDI_HOME']+"/pedi -m manifest.txt " )
 
-env['BASE_IRDB_LIBS']="irdb-core"
+env['BASE_IRDB_LIBS']="irdb-core pqxx pq"
 
 libPEBLISS=SConscript("third_party/SConscript.pebliss")
 # setup libraries needed for linking
diff --git a/irdb-libs/dump_insns/SConscript b/irdb-libs/dump_insns/SConscript
index 08948a1cc..159ba4132 100644
--- a/irdb-libs/dump_insns/SConscript
+++ b/irdb-libs/dump_insns/SConscript
@@ -19,7 +19,7 @@ myenv.Append(CPPFLAGS="-std=c++17")
 pgm="dump_insns.exe"
 
 LIBPATH="$SECURITY_TRANSFORMS_HOME/lib"
-LIBS=Split( env.subst('$BASE_IRDB_LIBS')+ "  irdb-cfg irdb-util irdb-transform ") 
+LIBS=Split( env.subst('$BASE_IRDB_LIBS')+ "  irdb-cfg irdb-util irdb-transform pqxx pq") 
 myenv=myenv.Clone(CPPPATH=Split(cpppath))
 pgm=myenv.Program(pgm,  files,  LIBPATH=LIBPATH, LIBS=LIBS)
 #install=myenv.Install("$SECURITY_TRANSFORMS_HOME/bin/", pgm)
diff --git a/irdb-libs/dump_map/SConscript b/irdb-libs/dump_map/SConscript
index 9515e0384..65d59cbc9 100644
--- a/irdb-libs/dump_map/SConscript
+++ b/irdb-libs/dump_map/SConscript
@@ -14,7 +14,7 @@ cpppath='''
 myenv.Append(CPPFLAGS="-std=c++17")
 
 LIBPATH="$SECURITY_TRANSFORMS_HOME/lib"
-LIBS=Split( " irdb-core irdb-cfg irdb-util irdb-transform ") 
+LIBS=Split( " irdb-core irdb-cfg irdb-util irdb-transform pqxx pq") 
 myenv=myenv.Clone(CPPPATH=Split(cpppath))
 dm=myenv.Program("dump_map.exe", Split("dump_map.cpp"),  LIBPATH=LIBPATH, LIBS=LIBS)
 dm_install=myenv.Install("$SECURITY_TRANSFORMS_HOME/plugins_install/", "dump_map.exe")
diff --git a/irdb-libs/ir_builders/fix_calls.cpp b/irdb-libs/ir_builders/fix_calls.cpp
index 2f117bec4..f26f352e5 100644
--- a/irdb-libs/ir_builders/fix_calls.cpp
+++ b/irdb-libs/ir_builders/fix_calls.cpp
@@ -1065,11 +1065,8 @@ class FixCalls_t : public TransformStep_t
 					assert(firp && pidp);
 			
 					eh_frame_ranges.clear();
-					int elfoid=firp->getFile()->getELFOID();
-					pqxx::largeobject lo(elfoid);
-					lo.to_file(pqxx_interface->getTransaction(),"readeh_tmp_file.exe");
 					const auto    elfiop=make_unique<EXEIO::exeio>();
-					elfiop->load(string("readeh_tmp_file.exe"));
+					elfiop->load(string("a.ncexe"));
 					EXEIO::dump::header(cout,*elfiop);
 					EXEIO::dump::section_headers(cout,*elfiop);
 					// do eh_frame reading as required. 
diff --git a/irdb-libs/libIRDB-core/include/dbinterface.hpp b/irdb-libs/libIRDB-core/include/dbinterface.hpp
index fb4836ab1..895cb4d19 100644
--- a/irdb-libs/libIRDB-core/include/dbinterface.hpp
+++ b/irdb-libs/libIRDB-core/include/dbinterface.hpp
@@ -41,9 +41,9 @@ class DBinterface_t : virtual public IRDB_SDK::DBinterface_t
 	public:
 		DBinterface_t() {};
 		virtual ~DBinterface_t() {};
-                virtual void issueQuery(std::string query)=0;
+                virtual void issueQuery(const std::string& query)=0;
                 virtual void moveToNextRow()=0;
-                virtual std::string getResultColumn(std::string colname)=0;
+                virtual std::string getResultColumn(const std::string& colname)=0;
                 virtual bool isDone()=0;
                 virtual void commit()=0;
 
diff --git a/irdb-libs/libIRDB-core/include/pqxxdb.hpp b/irdb-libs/libIRDB-core/include/pqxxdb.hpp
index 031bd6353..3a6019009 100644
--- a/irdb-libs/libIRDB-core/include/pqxxdb.hpp
+++ b/irdb-libs/libIRDB-core/include/pqxxdb.hpp
@@ -30,10 +30,10 @@ class pqxxDB_t : public DBinterface_t, virtual public IRDB_SDK::pqxxDB_t
         	{
                     // do nothing
         	};
-		void issueQuery(std::string query);
+		void issueQuery(const std::string& query);
 		void issueQuery(std::stringstream & query);
 		void moveToNextRow();
-		std::string getResultColumn(std::string colname);
+		std::string getResultColumn(const std::string& colname);
 		bool isDone();
 		void commit();
 
diff --git a/irdb-libs/libIRDB-core/src/fileir.cpp b/irdb-libs/libIRDB-core/src/fileir.cpp
index 574779ae1..af28c51a5 100644
--- a/irdb-libs/libIRDB-core/src/fileir.cpp
+++ b/irdb-libs/libIRDB-core/src/fileir.cpp
@@ -36,7 +36,7 @@
 #include "cmdstr.hpp"
 #include "assemblestr.hpp"
 
-#include <pqxx/tablewriter.hxx>
+#include <pqxx/pqxx>
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
 using namespace libIRDB;
@@ -46,6 +46,14 @@ using namespace std;
 #define SCOOP_CHUNK_SIZE (10*1024*1024)  /* 10 mb  */
 #define ALLOF(a) begin(a),end(a)
 
+#if PQXX_VERSION_MAJOR < 7
+#define PQXX_TABLEWRITER_TYPE pqxx::tablewriter 
+#define PQXX_TABLEWRITER_WRITE_TO(table,value) (table) << (value)
+#else
+#define PQXX_TABLEWRITER_TYPE pqxx::stream_to 
+#define PQXX_TABLEWRITER_WRITE_TO(table,value) (table).write_row(value)
+#endif
+
 
 #undef EIP
 
@@ -693,18 +701,19 @@ void FileIR_t::writeToDB(ostream *verbose_logging)
 
 
 // write out addresses
-	pqxx::tablewriter W_addrs(pqIntr->getTransaction(),fileptr->address_table_name);
+	auto  &txn=pqIntr->getTransaction();
+	PQXX_TABLEWRITER_TYPE W_addrs(txn, fileptr->address_table_name);
 	for(const auto &a : addrs)
 	{
 		auto real_a=dynamic_cast<AddressID_t*>(a);
 		assert(real_a);
-		W_addrs << real_a->WriteToDB(fileptr,j,withHeader);
+		PQXX_TABLEWRITER_WRITE_TO(W_addrs,real_a->WriteToDB(fileptr,j,withHeader));
 	}
 	W_addrs.complete();
 
 // write out instructions
 
-	pqxx::tablewriter W(pqIntr->getTransaction(),fileptr->instruction_table_name);
+	PQXX_TABLEWRITER_TYPE W(pqIntr->getTransaction(),fileptr->instruction_table_name);
 	for(auto i=insns.begin(); i!=insns.end(); ++i)
 	{	
 		auto insnp=dynamic_cast<Instruction_t*>(*i);
@@ -750,7 +759,7 @@ void FileIR_t::writeToDB(ostream *verbose_logging)
 		}
 
 		const auto &insn_values=insnp->WriteToDB(fileptr,j);
-		W << insn_values;
+		PQXX_TABLEWRITER_WRITE_TO(W , insn_values);
 
 	}
 	W.complete();
@@ -775,10 +784,10 @@ void FileIR_t::writeToDB(ostream *verbose_logging)
 	}
 
 // ehpgms 
-	pqxx::tablewriter W_eh(pqIntr->getTransaction(),fileptr->ehpgm_table_name);
+	PQXX_TABLEWRITER_TYPE W_eh(pqIntr->getTransaction(),fileptr->ehpgm_table_name);
 	for(const auto& i : eh_pgms)
 	{
-		W_eh << dynamic_cast<EhProgram_t*>(i)->WriteToDB(fileptr);
+		PQXX_TABLEWRITER_WRITE_TO(W_eh , dynamic_cast<EhProgram_t*>(i)->WriteToDB(fileptr));
 	}
 	W_eh.complete();
 
@@ -791,14 +800,14 @@ void FileIR_t::writeToDB(ostream *verbose_logging)
 
 
 // all relocs
-	pqxx::tablewriter W_reloc(pqIntr->getTransaction(),fileptr->relocs_table_name);
+	PQXX_TABLEWRITER_TYPE W_reloc(pqIntr->getTransaction(),fileptr->relocs_table_name);
 
 // eh css relocs
 	for(const auto& i : eh_css)
 	{
 		const auto &relocs=i->getRelocations();
 		for(auto& reloc : relocs)
-			W_reloc << dynamic_cast<Relocation_t*>(reloc)->WriteToDB(fileptr,dynamic_cast<BaseObj_t*>(i));
+			PQXX_TABLEWRITER_WRITE_TO(W_reloc , dynamic_cast<Relocation_t*>(reloc)->WriteToDB(fileptr,dynamic_cast<BaseObj_t*>(i)));
 	}
 
 // eh pgms relocs
@@ -806,21 +815,21 @@ void FileIR_t::writeToDB(ostream *verbose_logging)
 	{
 		const auto &relocs=i->getRelocations();
 		for(auto& reloc : relocs)
-			W_reloc << dynamic_cast<Relocation_t*>(reloc)->WriteToDB(fileptr,dynamic_cast<BaseObj_t*>(i));
+			PQXX_TABLEWRITER_WRITE_TO(W_reloc , dynamic_cast<Relocation_t*>(reloc)->WriteToDB(fileptr,dynamic_cast<BaseObj_t*>(i)));
 	}
 // scoops relocs
 	for(const auto& i : scoops)
 	{
 		const auto &relocs=i->getRelocations();
 		for(auto& reloc : relocs)
-			W_reloc << dynamic_cast<Relocation_t*>(reloc)->WriteToDB(fileptr,dynamic_cast<BaseObj_t*>(i));
+			PQXX_TABLEWRITER_WRITE_TO(W_reloc , dynamic_cast<Relocation_t*>(reloc)->WriteToDB(fileptr,dynamic_cast<BaseObj_t*>(i)));
 	}
 // write out instruction's relocs
 	for(const auto& i : insns)
 	{
 		const auto &relocs=i->getRelocations();
 		for(auto& reloc : relocs)
-			W_reloc << dynamic_cast<Relocation_t*>(reloc)->WriteToDB(fileptr,dynamic_cast<BaseObj_t*>(i));
+			PQXX_TABLEWRITER_WRITE_TO(W_reloc , dynamic_cast<Relocation_t*>(reloc)->WriteToDB(fileptr,dynamic_cast<BaseObj_t*>(i)));
 	}
 	W_reloc.complete();
 
diff --git a/irdb-libs/libIRDB-core/src/pqxxdb.cpp b/irdb-libs/libIRDB-core/src/pqxxdb.cpp
index 37fa2e986..7ec42d13f 100644
--- a/irdb-libs/libIRDB-core/src/pqxxdb.cpp
+++ b/irdb-libs/libIRDB-core/src/pqxxdb.cpp
@@ -31,16 +31,21 @@ pqxxDB_t::pqxxDB_t() : DBinterface_t(), txn(conn)
 	/* no other init needed */
 }
 
-void pqxxDB_t::issueQuery(std::string query)
+void pqxxDB_t::issueQuery(const std::string& query)
 {
+#if PQXX_VERSION_MAJOR < 7
 	results=txn.exec(query);
 	results_iter=results.begin();
+#else
+	results= txn.exec(query);  
+	results_iter=results.begin();
+#endif
 }
 
 void pqxxDB_t::issueQuery(std::stringstream & query)
 {
-	results=txn.exec(query);
-	results_iter=results.begin();
+	this->issueQuery(query.str());
+
 }
 
 void pqxxDB_t::moveToNextRow()
@@ -49,16 +54,50 @@ void pqxxDB_t::moveToNextRow()
 	++results_iter;
 }
 
-std::string pqxxDB_t::getResultColumn(std::string colname)
+std::string pqxxDB_t::getResultColumn(const std::string& colname)
 {
+#if PQXX_VERSION_MAJOR < 7
 	if(results_iter[colname].is_null())
-		return std::string("");
+		return {""};
 
 	pqxx::binarystring bin_str(results_iter.at(colname));
 
 	return bin_str.str();
+#else
+	const auto &row=*results_iter;
+	try
+	{
+		const auto row_iter = row.at(colname);
+		const auto& field=row[colname];
+		const auto& field_str=field.as<string>();
+		constexpr pqxx::oid BYTEAOID = 17;
+		if (field.type() == BYTEAOID)
+		{
+			const auto ret = conn.unesc_bin(field.view());
+			return std::string(reinterpret_cast<const char*>(ret.data()), ret.size());
+		}
+		return field_str;
+		/*
+		const auto& length = field.size();
+		constexpr pqxx::oid BYTEAOID = 17;
+		if (field.type() == BYTEAOID)
+		{
+			const auto* data = reinterpret_cast<const std::byte*>(field.c_str());
+			std::size_t length = field.size();
+			return std::string(reinterpret_cast<const char*>(data), length);
+		}
+
+
+
+		return {field.c_str(),length};
+		*/
+	} 
+	catch (const std::out_of_range&) 
+	{
+		return {""};
+	}
 
-//	return results_iter[colname].as<std::string>();
+#endif
 }
 
 bool pqxxDB_t::isDone()
diff --git a/irdb-libs/libIRDB-util/include/Provenance.hpp b/irdb-libs/libIRDB-util/include/Provenance.hpp
index 520ac73da..6bfbefd7b 100644
--- a/irdb-libs/libIRDB-util/include/Provenance.hpp
+++ b/irdb-libs/libIRDB-util/include/Provenance.hpp
@@ -1,8 +1,6 @@
 #ifndef Provenance_h
 #define Provenance_h
 
-#include <bitset>
-
 class Provenance_t : public IRDB_SDK::Provenance_t
 {
 	private:
diff --git a/irdb-libs/libIRDB-util/include/libIRDB-util.hpp b/irdb-libs/libIRDB-util/include/libIRDB-util.hpp
index 5b091d116..b87ae3496 100644
--- a/irdb-libs/libIRDB-util/include/libIRDB-util.hpp
+++ b/irdb-libs/libIRDB-util/include/libIRDB-util.hpp
@@ -31,6 +31,7 @@
 #include <set>
 #include <map>
 #include <ostream>
+#include <bitset>
 
 namespace libIRDB 
 {
diff --git a/irdb-libs/libIRDB-util/src/insn_preds.cpp b/irdb-libs/libIRDB-util/src/insn_preds.cpp
index 405b737af..2e723aa4f 100644
--- a/irdb-libs/libIRDB-util/src/insn_preds.cpp
+++ b/irdb-libs/libIRDB-util/src/insn_preds.cpp
@@ -24,8 +24,8 @@
 #include <libIRDB-util.hpp>
 #include <irdb-util>
 
-using namespace libIRDB;
 using namespace std;
+using namespace libIRDB;
 
 
 
diff --git a/irdb-libs/libehp b/irdb-libs/libehp
index 559c0d71c..42a64aca7 160000
--- a/irdb-libs/libehp
+++ b/irdb-libs/libehp
@@ -1 +1 @@
-Subproject commit 559c0d71c3dda2067bfe757307655fad0f1c7d9f
+Subproject commit 42a64aca7619abef4741289c4da743e9963b17c4
diff --git a/irdb-libs/meds2pdb/meds2pdb.cpp b/irdb-libs/meds2pdb/meds2pdb.cpp
index d9a5d3cdd..956008686 100644
--- a/irdb-libs/meds2pdb/meds2pdb.cpp
+++ b/irdb-libs/meds2pdb/meds2pdb.cpp
@@ -22,6 +22,7 @@
 #include <iomanip>
 #include <fstream>
 #include <map>
+#include <sstream>
 #include <time.h>
 #include <string.h>
 #include "rewriter.h"
@@ -31,15 +32,23 @@
 #include "MEDS_FuncPrototypeAnnotation.hpp"
 #include <irdb-core>
 
-#include <pqxx/tablewriter.hxx>
+#include <pqxx/pqxx>
+//#include <pqxx/tablewriter.hxx>
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
+#if PQXX_VERSION_MAJOR < 7
+#define PQXX_TABLEWRITER_TYPE pqxx::tablewriter
+#define PQXX_TABLEWRITER_WRITE_TO(table,value) (table) << (value)
+#else
+#define PQXX_TABLEWRITER_TYPE pqxx::stream_to
+#define PQXX_TABLEWRITER_WRITE_TO(table,value) (table).write_row(value)
+#endif
+
 using namespace std;
 using namespace pqxx;
 using namespace IRDB_SDK;
 using namespace MEDS_Annotation;
 
-#include <sstream>
 
 string functionTable;
 string addressTable;
@@ -101,7 +110,7 @@ void insert_instructions(int fileID, const vector<wahoo::Instruction*> &instruct
 
 	assert(getenv("SELF_VALIDATE")==nullptr || instructions.size() > 0 );
 
-	pqxx::tablewriter W_addrs(txn,addressTable);
+	PQXX_TABLEWRITER_TYPE W_addrs(txn,addressTable);
 	for (auto i = 0U; i < instructions.size(); i ++ )
 	{
     		char buf[128];
@@ -127,12 +136,12 @@ void insert_instructions(int fileID, const vector<wahoo::Instruction*> &instruct
 				string(buf),
 				"-1"
 			}; 
-		W_addrs << row;
+		PQXX_TABLEWRITER_WRITE_TO(W_addrs, row);
 
 	}
 	W_addrs.complete();
 
-	pqxx::tablewriter W_insns(txn,instructionTable);
+	PQXX_TABLEWRITER_TYPE W_insns(txn,instructionTable);
   	for (auto i = 0U; i < instructions.size(); i ++)
 	{
 		const auto instruction = instructions[i];
@@ -176,7 +185,7 @@ void insert_instructions(int fileID, const vector<wahoo::Instruction*> &instruct
 				ind_target_address_id,
 				doip_id
 			}) ; 
-		W_insns << row;
+		PQXX_TABLEWRITER_WRITE_TO(W_insns , row);
 
 
 
diff --git a/irdb-sdk b/irdb-sdk
index 5548b306e..277605752 160000
--- a/irdb-sdk
+++ b/irdb-sdk
@@ -1 +1 @@
-Subproject commit 5548b306e7440df78974e581c9cf20155f55e0a4
+Subproject commit 2776057526e11d3c5ac89489be608502a157fa70
diff --git a/zipr/.gitlab-ci.yml b/zipr/.gitlab-ci.yml
deleted file mode 100644
index 0bc945542..000000000
--- a/zipr/.gitlab-ci.yml
+++ /dev/null
@@ -1,178 +0,0 @@
-before_script:
-  - "source ~gitlab-runner/cicd_support/cicd_support.shinc" 
-
-
-after_script:
-  - "echo Test Complete."
-
-stages:
-  - clean
-  - build
-  - test
-
-
-
-#
-# Cleaning
-#
-
-#template 
-.do-clean: &do-nightly-clean
-  stage: clean
-  script:
-    - ./cicd_tests/do-clean.sh
-
-# per os items
-do-nightly-clean-ubuntu18:
-  <<: *do-nightly-clean
-  tags:
-    - ubuntu18
-  variables:
-    OS: 'ubuntu18'  
-
-do-nightly-clean-ubuntu16:
-  <<: *do-nightly-clean
-  tags:
-    - ubuntu16
-  variables:
-    OS: 'ubuntu16'  
-
-do-nightly-clean-centos76:
-  <<: *do-nightly-clean
-  tags:
-    - centos76
-  variables:
-    OS: 'centos76'  
-
-
-#
-# building 
-#
-
-
-# template
-.do-build: &do-build
-  stage: build
-  script:
-    - ./cicd_tests/do-build.sh
-
-
-# per os items
-do-build-ubuntu18:
-  <<: *do-build
-  tags:
-    - ubuntu18
-  variables:
-    OS: 'ubuntu18'  
-
-
-do-build-ubuntu16:
-  <<: *do-build
-  tags:
-    - ubuntu16
-  variables:
-    OS: 'ubuntu16'  
-
-do-build-centos76:
-  <<: *do-build
-  tags:
-    - centos76
-  variables:
-    OS: 'centos76'  
-
-
-
-#
-# $PSZ ls
-#
-
-# template
-.xform-ls: &xform-ls
-  stage: test
-  script:
-    - ./cicd_tests/xform-ls.sh
-
-#per OS
-xform-ls-ubuntu18:
-  <<: *xform-ls
-  tags:
-    - ubuntu18
-  variables:
-    OS: 'ubuntu18'  
-
-xform-ls-ubuntu16:
-  <<: *xform-ls
-  tags:
-    - ubuntu16
-  variables:
-    OS: 'ubuntu16'  
-
-xform-ls-centos76:
-  <<: *xform-ls
-  tags:
-    - centos76
-  variables:
-    OS: 'centos76'  
-
-#
-# $PSZ cat
-#
-
-# template
-.xform-cat: &xform-cat
-  stage: test
-  script:
-    - ./cicd_tests/xform-cat.sh
-
-xform-cat-ubuntu18:
-  <<: *xform-cat
-  tags:
-    - ubuntu18
-  variables:
-    OS: 'ubuntu18'  
-    
-xform-cat-ubuntu16:
-  <<: *xform-cat
-  tags:
-    - ubuntu16
-  variables:
-    OS: 'ubuntu16'  
-
-xform-cat-centos76:
-  <<: *xform-cat
-  tags:
-    - centos76
-  variables:
-    OS: 'centos76'  
-
-#
-# run zipr internal tests
-#
-
-# template
-.internal-tests: &internal-tests
-  stage: test
-  script:
-    - ./cicd_tests/internal-tests.sh
-
-#per OS
-internal-tests-ubuntu18:
-  <<: *internal-tests
-  tags:
-    - ubuntu18
-  variables:
-    OS: 'ubuntu18'  
-
-internal-tests-ubuntu16:
-  <<: *internal-tests
-  tags:
-    - ubuntu16
-  variables:
-    OS: 'ubuntu16'  
-
-internal-tests-centos76:
-  <<: *internal-tests
-  tags:
-    - centos76
-  variables:
-    OS: 'centos76'  
diff --git a/zipr/src/SConscript b/zipr/src/SConscript
index dc07c45e5..18388c4db 100644
--- a/zipr/src/SConscript
+++ b/zipr/src/SConscript
@@ -63,6 +63,8 @@ libs='''
 	StructDiv
 	pebliss
 	dl 
+	pqxx 
+	pq
 	'''
 
 libpath='''
-- 
GitLab