From 80c60d956e157384f54fbf16cb166a5a569824d1 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Wed, 14 Sep 2016 08:36:55 +0100 Subject: [PATCH 01/12] Add the jemalloc install to CMake This puts the library in the right place, post-install creates the symlink and the scripts run the LD_PRELOAD with it. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 40572e699..9f27e309a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,4 +199,5 @@ ADD_SUBDIRECTORY(writeengine/server) ADD_SUBDIRECTORY(writeengine/bulk) ADD_SUBDIRECTORY(writeengine/splitter) +INSTALL(FILES utils/jemalloc/libjemalloc.so.3.3.0 DESTINATION ${ENGINE_LIBDIR}) From d551b7d6e0e6fa18cedb24cbf9e658926678c9f1 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Wed, 14 Sep 2016 19:58:11 +0100 Subject: [PATCH 02/12] MCOL-298 Fix saturated date/datetime handling Saturated DML updates would be set to NULL as were saturated cpimport values. This sets them to the zero date/datetime value. --- utils/dataconvert/dataconvert.cpp | 22 +++-------------- writeengine/bulk/we_bulkloadbuffer.cpp | 34 +++----------------------- writeengine/bulk/we_tableinfo.cpp | 17 +++---------- writeengine/splitter/we_sdhandler.cpp | 4 +-- 4 files changed, 14 insertions(+), 63 deletions(-) diff --git a/utils/dataconvert/dataconvert.cpp b/utils/dataconvert/dataconvert.cpp index fbe599c33..27da7ccce 100644 --- a/utils/dataconvert/dataconvert.cpp +++ b/utils/dataconvert/dataconvert.cpp @@ -1100,16 +1100,8 @@ boost::any } else { - if ( isUpdate) //@Bug 5222 set to null for ot of range value - { - uint32_t d = joblist::DATENULL; - value = d; - pushWarning = true; - } - else - { - throw QueryDataExcept("Invalid date", formatErr); - } + value = 0; + pushWarning = true; } } break; @@ -1123,14 +1115,8 @@ boost::any } else { - if ( isUpdate) //@Bug 5222 set to null for ot of range value - { - uint64_t d = joblist::DATETIMENULL; - value = d; - pushWarning = true; - } - else - throw QueryDataExcept("Invalid datetime", formatErr); + value = 0; + pushWarning = true; } } break; diff --git a/writeengine/bulk/we_bulkloadbuffer.cpp b/writeengine/bulk/we_bulkloadbuffer.cpp index c28ebc02a..9f75c6873 100644 --- a/writeengine/bulk/we_bulkloadbuffer.cpp +++ b/writeengine/bulk/we_bulkloadbuffer.cpp @@ -965,19 +965,8 @@ void BulkLoadBuffer::convert(char *field, int fieldLength, bufStats.maxBufferVal = llDate; } else { - if(!column.fNotNull) - { - // @bug 3375: reset invalid date/time to NULL, - // and track as a saturated value. - llDate = joblist::DATETIMENULL; - bufStats.satCount++; - } - else - { - //Bug5383 - 4.0@1400-01-01 00:00:00 Below it is 0000-01-01 00:00:00 - llDate = 0x578104000000000; //394082834458869760 - bufStats.satCount++; - } + llDate = 0; + bufStats.satCount++; } pVal = &llDate; @@ -1262,23 +1251,8 @@ void BulkLoadBuffer::convert(char *field, int fieldLength, bufStats.maxBufferVal = iDate; } else { - - - if (!column.fNotNull) - { - // @bug 3375: reset invalid date to NULL, - // and track as a saturated value. - iDate = joblist::DATENULL; - bufStats.satCount++; - } - else - { - // Bug5383 - 1400-01-01 -// iDate = 0x5781068; // for versions below 4.0 it is 0x1068 - // MariaDB bug 740 - iDate = 0x578107E; - bufStats.satCount++; - } + iDate = 0; + bufStats.satCount++; } pVal = &iDate; diff --git a/writeengine/bulk/we_tableinfo.cpp b/writeengine/bulk/we_tableinfo.cpp index 76a51a397..0e651b55d 100644 --- a/writeengine/bulk/we_tableinfo.cpp +++ b/writeengine/bulk/we_tableinfo.cpp @@ -924,24 +924,15 @@ void TableInfo::reportTotals(double elapsedTime) fColumns[i].column.colName << "; Number of "; if (fColumns[i].column.dataType == CalpontSystemCatalog::DATE) { - //bug5383 - if(!fColumns[i].column.fNotNull) - ossSatCnt << - "invalid dates replaced with null: "; - else - ossSatCnt << - "invalid dates replaced with minimum value : "; + ossSatCnt << + "invalid dates replaced with zero value : "; } else if (fColumns[i].column.dataType == CalpontSystemCatalog::DATETIME) { //bug5383 - if(!fColumns[i].column.fNotNull) - ossSatCnt << - "invalid date/times replaced with null: "; - else - ossSatCnt << - "invalid date/times replaced with minimum value : "; + ossSatCnt << + "invalid date/times replaced with zero value : "; } else if (fColumns[i].column.dataType == CalpontSystemCatalog::CHAR) ossSatCnt << diff --git a/writeengine/splitter/we_sdhandler.cpp b/writeengine/splitter/we_sdhandler.cpp index bea25bb42..28ded9649 100644 --- a/writeengine/splitter/we_sdhandler.cpp +++ b/writeengine/splitter/we_sdhandler.cpp @@ -1669,10 +1669,10 @@ void WESDHandler::onCleanupResult(int PmId, messageqcpp::SBS& Sbs) { switch ((*aIt).fColType) { case CalpontSystemCatalog::DATE: - ossSatCnt << "invalid dates replaced with null: "; + ossSatCnt << "invalid dates replaced with zero value: "; break; case CalpontSystemCatalog::DATETIME: - ossSatCnt << "invalid date/times replaced with null: "; + ossSatCnt << "invalid date/times replaced with zero value: "; break; case CalpontSystemCatalog::CHAR: ossSatCnt << "character strings truncated: "; From 1e277575f9fc5e6ea095e4cd7dd68983cf372747 Mon Sep 17 00:00:00 2001 From: David Hall Date: Wed, 14 Sep 2016 17:06:39 -0500 Subject: [PATCH 03/12] Remove extraneous debug log lines --- dbcon/execplan/intervalcolumn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbcon/execplan/intervalcolumn.cpp b/dbcon/execplan/intervalcolumn.cpp index a075fb17a..49e44b391 100644 --- a/dbcon/execplan/intervalcolumn.cpp +++ b/dbcon/execplan/intervalcolumn.cpp @@ -48,7 +48,7 @@ IntervalColumn::IntervalColumn() IntervalColumn::IntervalColumn(SRCP& val, int intervalType): fVal(val->clone()), fIntervalType(intervalType) { - cout << "intervalType=" << fIntervalType << endl; +// cout << "intervalType=" << fIntervalType << endl; } IntervalColumn::IntervalColumn( const IntervalColumn& rhs, const uint32_t sessionID): From 3ef45a2c6da11bed91571949bce96dc31fcc1ce3 Mon Sep 17 00:00:00 2001 From: David Hall Date: Wed, 14 Sep 2016 17:09:17 -0500 Subject: [PATCH 04/12] MCOL-290 Decomsrv showing as initialize --- oam/oamcpp/liboamcpp.cpp | 50 ++++++------ oam/oamcpp/liboamcpp.h | 4 +- oamapps/mcsadmin/mcsadmin.cpp | 43 +++++----- oamapps/postConfigure/amazonInstaller.cpp | 98 +++++++++++------------ oamapps/postConfigure/postConfigure.cpp | 6 +- 5 files changed, 93 insertions(+), 108 deletions(-) diff --git a/oam/oamcpp/liboamcpp.cpp b/oam/oamcpp/liboamcpp.cpp index d1244d3ca..9c7354483 100644 --- a/oam/oamcpp/liboamcpp.cpp +++ b/oam/oamcpp/liboamcpp.cpp @@ -1368,7 +1368,8 @@ namespace oam void Oam::getSystemStatus(SystemStatus& systemstatus, bool systemStatusOnly) { - checkSystemRunning("getSystemStatus"); + if (!checkSystemRunning()) + return; #ifdef _MSC_VER // TODO: Remove when we create OAM for Windows @@ -2136,8 +2137,8 @@ namespace oam void Oam::getProcessStatus(SystemProcessStatus& systemprocessstatus, string port) { - checkSystemRunning("getProcessStatus"); - + if (!checkSystemRunning()) + exceptionControl("getProcessStatus", API_FAILURE); ProcessStatus processstatus; systemprocessstatus.processstatus.clear(); @@ -2236,7 +2237,8 @@ namespace oam return; #endif - checkSystemRunning("getProcessStatus"); + if (!checkSystemRunning()) + exceptionControl("getProcessStatus", API_FAILURE); for ( int i = 0 ; i < 5 ; i ++) { @@ -2331,8 +2333,8 @@ namespace oam void Oam::setProcessStatus(const std::string process, const std::string module, const int state, pid_t PID) { - checkSystemRunning("setProcessStatus"); - + if (!checkSystemRunning()) + exceptionControl("setProcessStatus", API_FAILURE); //send and wait for ack and resend if not received //retry 5 time max for ( int i=0; i < 5 ; i++) @@ -2848,7 +2850,8 @@ namespace oam exceptionControl("getMyProcessStatus", API_FAILURE); } - checkSystemRunning("getMyProcessStatus"); + if (!checkSystemRunning()) + exceptionControl("getMyProcessStatus", API_FAILURE); for ( int i = 0 ; i < 5 ; i ++) { @@ -4865,7 +4868,8 @@ namespace oam ********************************************************************/ bool Oam::switchParentOAMModule(std::string moduleName, GRACEFUL_FLAG gracefulflag) { - checkSystemRunning("switchParentOAMModule"); + if (!checkSystemRunning()) + exceptionControl("switchParentOAMModule", API_FAILURE); int returnStatus; // We assume that moduleName is a valid pm @@ -6308,7 +6312,8 @@ namespace oam exceptionControl("sysConfig->write", API_FAILURE); } - checkSystemRunning("addDbroot"); + if (!checkSystemRunning()) + exceptionControl("addDbroot", API_FAILURE); //get updated Columnstore.xml distributed distributeConfigFile("system"); @@ -6345,11 +6350,9 @@ namespace oam * ****************************************************************************/ - void Oam::distributeFstabUpdates(std::string entry, std::string toPM) + void Oam::distributeFstabUpdates(std::string entry, std::string toPM) { - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (!checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (!checkSystemRunning()) return; ACK_FLAG ackflag = oam::ACK_YES; @@ -8772,7 +8775,7 @@ namespace oam GRACEFUL_FLAG gracefulflag, ACK_FLAG ackflag, const std::string argument1, const std::string argument2, int timeout) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return API_CONN_REFUSED; int returnStatus = API_SUCCESS; //default @@ -8873,7 +8876,7 @@ namespace oam int Oam::sendMsgToProcMgr2(messageqcpp::ByteStream::byte requestType, DeviceNetworkList devicenetworklist, GRACEFUL_FLAG gracefulflag, ACK_FLAG ackflag, const std::string password, const std::string mysqlpw) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return API_CONN_REFUSED; int returnStatus = API_TIMEOUT; //default @@ -8987,7 +8990,7 @@ namespace oam int Oam::sendMsgToProcMgr3(messageqcpp::ByteStream::byte requestType, AlarmList& alarmlist, const std::string date) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return API_CONN_REFUSED; int returnStatus = API_SUCCESS; //default @@ -9088,7 +9091,7 @@ namespace oam GRACEFUL_FLAG gracefulflag, ACK_FLAG ackflag, const std::string argument1, const std::string argument2, int timeout) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return API_CONN_REFUSED; int returnStatus = API_STILL_WORKING; @@ -9274,7 +9277,7 @@ namespace oam void Oam::sendStatusUpdate(ByteStream obs, ByteStream::byte returnRequestType) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return; for ( int i = 0 ; i < 5 ; i ++) @@ -9650,8 +9653,10 @@ namespace oam return returnStatus; } - bool Oam::checkSystemRunning(const char* function) + bool Oam::checkSystemRunning() { + // string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; + // system(cmd.c_str()); struct stat st; if (stat("/var/lock/subsys/columnstore", &st) == 0) { @@ -9668,13 +9673,6 @@ namespace oam return true; } } - ostringstream os; - os << function << " system is not running: " << strerror(errno); - writeLog(os.str(), LOG_TYPE_ERROR ); - if (strlen(function)) - { - throw runtime_error(os.str()); - } return false; } } //namespace oam diff --git a/oam/oamcpp/liboamcpp.h b/oam/oamcpp/liboamcpp.h index b1ed7ebae..883123aa4 100644 --- a/oam/oamcpp/liboamcpp.h +++ b/oam/oamcpp/liboamcpp.h @@ -2449,6 +2449,8 @@ namespace oam */ void writeLog(const std::string logContent, const logging::LOG_TYPE logType = logging::LOG_TYPE_INFO); + bool checkSystemRunning(); + private: int sendMsgToProcMgr3(messageqcpp::ByteStream::byte requestType, snmpmanager::AlarmList& alarmlist, const std::string date); @@ -2482,8 +2484,6 @@ namespace oam */ void sendStatusUpdate(messageqcpp::ByteStream obs, messageqcpp::ByteStream::byte returnRequestType); - bool checkSystemRunning(const char* function); - std::string CalpontConfigFile; std::string AlarmConfigFile; std::string ProcessConfigFile; diff --git a/oamapps/mcsadmin/mcsadmin.cpp b/oamapps/mcsadmin/mcsadmin.cpp index 69ccac917..2786ad472 100644 --- a/oamapps/mcsadmin/mcsadmin.cpp +++ b/oamapps/mcsadmin/mcsadmin.cpp @@ -503,7 +503,7 @@ int processCommand(string* arguments) CC_SUSPEND_ANSWER suspendAnswer = CANCEL; bool bNeedsConfirm = true; string password; - + string cmd; // get command info from Command config file CmdID = -1; @@ -1999,7 +1999,7 @@ int processCommand(string* arguments) if ( DBRootStorageType == "hdfs") { - string cmd = "pdsh -a '/" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; + cmd = "pdsh -a '/" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; system(cmd.c_str()); if (oam.checkLogStatus("/tmp/cc-stop.pdsh", "exit") ) { cout << endl << "ERROR: Stopping MariaDB Columnstore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl; @@ -2007,7 +2007,7 @@ int processCommand(string* arguments) } else { - string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; + cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; system(cmd.c_str()); } } @@ -2017,7 +2017,7 @@ int processCommand(string* arguments) if ( gracefulTemp == FORCEFUL ) { - string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; + cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; system(cmd.c_str()); cout << endl << " Successful shutdown of System (stopped local columnstore service) " << endl << endl; } @@ -2025,7 +2025,7 @@ int processCommand(string* arguments) if (Failed.find("Connection refused") != string::npos) { cout << endl << "**** shutdownSystem Error : ProcessManager not Active, stopping columnstore service" << endl; - string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; + cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; system(cmd.c_str()); cout << endl << " Successful stop of local columnstore service " << endl << endl; } @@ -2044,7 +2044,7 @@ int processCommand(string* arguments) if ( DBRootStorageType == "hdfs") { - string cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; + cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; system(cmd.c_str()); if (oam.checkLogStatus("/tmp/cc-stop.pdsh", "exit") ) { cout << endl << "ERROR: Stopping MariaDB Columnstore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl; @@ -2071,9 +2071,7 @@ int processCommand(string* arguments) // this would be used after a shutdownSystem command // if columnstore service is up, send message to ProcMgr to start system (which starts all processes) - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (!oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (!oam.checkSystemRunning()) { cout << "startSystem command, 'columnstore' service is down, sending command to" << endl; cout << "start the 'columnstore' service on all modules" << endl << endl; @@ -2142,7 +2140,7 @@ int processCommand(string* arguments) if ( DBRootStorageType == "hdfs") { - string cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; + cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; system(cmd.c_str()); if (oam.checkLogStatus("/tmp/cc-restart.pdsh", "exit") ) { cout << endl << "ERROR: Restart MariaDB Columnstore Service failure, check /tmp/cc-restart.pdsh. exit..." << endl; @@ -2289,9 +2287,7 @@ int processCommand(string* arguments) // this would be used after a shutdownSystem command // if columnstore service is up, send message to ProcMgr to start system (which starts all processes) - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (!oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (!oam.checkSystemRunning()) { if (bNeedsConfirm) { @@ -2363,7 +2359,7 @@ int processCommand(string* arguments) if ( DBRootStorageType == "hdfs") { - string cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; + cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; system(cmd.c_str()); if (oam.checkLogStatus("/tmp/cc-restart.pdsh", "exit") ) { cout << endl << "ERROR: Restart MariaDB Columnstore Service failue, check /tmp/cc-restart.pdsh. exit..." << endl; @@ -2457,7 +2453,7 @@ int processCommand(string* arguments) //just kick off local server cout << " System being restarted, please wait..."; cout.flush(); - string cmd = startup::StartUp::installDir() + "/bin/columnstore restart > /tmp/start.log 2>&1"; + cmd = startup::StartUp::installDir() + "/bin/columnstore restart > /tmp/start.log 2>&1"; int rtnCode = system(cmd.c_str()); if (WEXITSTATUS(rtnCode) != 0) { cout << endl << "error with running 'columnstore start' on local module " << endl; @@ -2712,7 +2708,7 @@ int processCommand(string* arguments) cout << endl << "Monitor for System Alarms" << endl; cout << " Enter control-C to return to command line" << endl << endl; - string cmd = "tail -n 0 -f " + snmpmanager::ALARM_FILE; + cmd = "tail -n 0 -f " + snmpmanager::ALARM_FILE; system(cmd.c_str()); } break; @@ -3287,9 +3283,7 @@ int processCommand(string* arguments) } //check the system status / service status and only allow command when System is MAN_OFFLINE - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (oam.checkSystemRunning()) { SystemStatus systemstatus; try { @@ -3764,9 +3758,7 @@ int processCommand(string* arguments) } //check the system status / service status and only allow command when System is MAN_OFFLINE - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (!oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (!oam.checkSystemRunning()) { cout << endl << "**** assignDbrootPmConfig Failed, System is down. Needs to be running" << endl; break; @@ -6584,7 +6576,7 @@ int processCommand(string* arguments) oam.startModule(devicenetworklist, ackTemp); //reload DBRM with new configuration, needs to be done here after startModule - string cmd = startup::StartUp::installDir() + "/bin/dbrmctl reload > /dev/null 2>&1"; + cmd = startup::StartUp::installDir() + "/bin/dbrmctl reload > /dev/null 2>&1"; system(cmd.c_str()); sleep(15); @@ -6643,6 +6635,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[]) ACK_FLAG ackTemp = ACK_YES; CC_SUSPEND_ANSWER suspendAnswer = WAIT; bool bNeedsConfirm = true; + string cmd; switch( CommandID ) { @@ -6875,7 +6868,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[]) //run remote command script HostConfigList::iterator pt1 = (*pt).hostConfigList.begin(); - string cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " reboot " ; + cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " reboot " ; int rtnCode = system(cmd.c_str()); if (WEXITSTATUS(rtnCode) != 0) { cout << "Failed with running remote_command.sh" << endl; @@ -6979,7 +6972,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[]) HostConfigList::iterator pt1 = (*pt).hostConfigList.begin(); string ipAddr = (*pt1).IPAddr; //run remote command script - string cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + ipAddr + " " + password + " reboot " ; + cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + ipAddr + " " + password + " reboot " ; int rtnCode = system(cmd.c_str()); if (WEXITSTATUS(rtnCode) != 0) cout << "Failed with running remote_command.sh" << endl; diff --git a/oamapps/postConfigure/amazonInstaller.cpp b/oamapps/postConfigure/amazonInstaller.cpp index 617af94e4..a40069759 100644 --- a/oamapps/postConfigure/amazonInstaller.cpp +++ b/oamapps/postConfigure/amazonInstaller.cpp @@ -184,8 +184,8 @@ int main(int argc, char *argv[]) { if( string("-h") == argv[i] || string("--help") == argv[i]) { cout << endl; - cout << "This is the Amazon InfiniDB AMI System Configuration and Installation tool." << endl; - cout << "It will Configure and startup an Amazon InfiniDB System." << endl << endl; + cout << "This is the Amazon columnstore AMI System Configuration and Installation tool." << endl; + cout << "It will Configure and startup an Amazon columnstore System." << endl << endl; cout << "It will read the system configuration settings from /root/amazonConfig.xml." << endl; cout << "Or user can provide a different configuration file with the -c option." << endl; cout << "Or if /root/amazonConfig.xml doesn't exist, then user will be prompted for settings." << endl; @@ -194,8 +194,8 @@ int main(int argc, char *argv[]) cout << " -h Help" << endl; cout << " -c system config file, default is '/root/amazonConfig.xml'" << endl; cout << " -l logfile for postConfigure output to /root/postConfigure.log" << endl; - cout << " -v InfiniDB version" << endl; - cout << " -pc postConfigure failure System Cleanup, used to run System Cleanup if InfiniDB fails to install" << endl; + cout << " -v columnstore version" << endl; + cout << " -pc postConfigure failure System Cleanup, used to run System Cleanup if columnstore fails to install" << endl; cout << " -d Delete Cluster, used to delete Instances and Volumes on a shutdowned system" << endl; cout << " Require argument, include name of local Amazon Configure File '-c' option" << endl; cout << " -s Stop Cluster, used to stop Instances on a shutdowned system" << endl; @@ -223,7 +223,7 @@ int main(int argc, char *argv[]) SystemSoftware systemsoftware; oam.getSystemSoftware(systemsoftware); - cout << endl << "InfiniDB Version: " << systemsoftware.Version << "-" << systemsoftware.Release << endl; + cout << endl << "columnstore Version: " << systemsoftware.Version << "-" << systemsoftware.Release << endl; exit (0); } else if( string("-pc") == argv[i] ) { @@ -246,13 +246,11 @@ int main(int argc, char *argv[]) } } - //check if InfiniDB is up and running - string cmd = installDir + "/bin/infinidb status > /tmp/status.log"; - system(cmd.c_str()); - if (oam.checkLogStatus("/tmp/status.log", "InfiniDB is running") ) { - cout << endl << "InfiniDB is running, can't run AmazonInstaller while InfiniDB is running. Exiting.." << endl; + //check if columnstore is up and running + if (oam.checkSystemRunning()) { + cout << endl << "columnstore is running, can't run AmazonInstaller while columnstore is running. Exiting.." << endl; exit (0); - } + } if ( systemCleanup || systemStop ) { @@ -430,21 +428,19 @@ int main(int argc, char *argv[]) } cout << endl; - cout << "This is the Amazon InfiniDB AMI System Configuration and Installation tool." << endl; - cout << "It will Configure and startup an Amazon InfiniDB System." << endl; + cout << "This is the Amazon columnstore AMI System Configuration and Installation tool." << endl; + cout << "It will Configure and startup an Amazon columnstore System." << endl; - //check if InfiniDB is up and running - cmd = installDir + "/bin/infinidb status > /tmp/status.log"; - system(cmd.c_str()); - if (oam.checkLogStatus("/tmp/status.log", "InfiniDB is running") ) { - cout << "InfiniDB is running, can't run amazonInstaller while InfiniDB is running. Exiting.." << endl; + //check if columnstore is up and running + if (oam.checkSystemRunning()) { + cout << "columnstore is running, can't run amazonInstaller while columnstore is running. Exiting.." << endl; exit (0); } //backup current Columnstore.xml string configFile = installDir + "/etc/Columnstore.xml"; string saveFile = installDir + "/etc/Columnstore.xml.save"; - cmd = "rm -f " + saveFile; + string cmd = "rm -f " + saveFile; system(cmd.c_str()); cmd = "cp " + configFile + " " + saveFile; system(cmd.c_str()); @@ -573,7 +569,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; exit(1); } @@ -1039,7 +1035,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << endl << "ERROR: Problem setting AmazonRegion from the InfiniDB System Configuration file" << endl; + cout << endl << "ERROR: Problem setting AmazonRegion from the columnstore System Configuration file" << endl; exit(1); } } @@ -1062,7 +1058,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; exit(1); } @@ -1271,7 +1267,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; exit(1); } @@ -1296,7 +1292,7 @@ int main(int argc, char *argv[]) SystemSoftware systemsoftware; oam.getSystemSoftware(systemsoftware); - cout << "InfiniDB Version = " << systemsoftware.Version << "-" << systemsoftware.Release << endl; + cout << "columnstore Version = " << systemsoftware.Version << "-" << systemsoftware.Release << endl; cout << "System Type = " << systemType << endl; if ( subnetID != oam::UnassignedName ) { @@ -1392,7 +1388,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << endl << "ERROR: Problem setting SystemName from the InfiniDB System Configuration file" << endl; + cout << endl << "ERROR: Problem setting SystemName from the columnstore System Configuration file" << endl; exit(1); } } @@ -1404,7 +1400,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << endl << "ERROR: Problem setting SystemName from the InfiniDB System Configuration file" << endl; + cout << endl << "ERROR: Problem setting SystemName from the columnstore System Configuration file" << endl; exit(1); } } @@ -1415,7 +1411,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting UMSecurityGroup from the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting UMSecurityGroup from the columnstore System Configuration file" << endl; exit(1); } @@ -1425,7 +1421,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting InstanceType from the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting InstanceType from the columnstore System Configuration file" << endl; exit(1); } @@ -1441,7 +1437,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting InstanceType from the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting InstanceType from the columnstore System Configuration file" << endl; exit(1); } @@ -1465,7 +1461,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting SystemName from the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting SystemName from the columnstore System Configuration file" << endl; exit(1); } @@ -1497,7 +1493,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; exit(1); } @@ -1565,7 +1561,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1852,7 +1848,7 @@ int main(int argc, char *argv[]) cout << endl; } - cout << endl << "===== InfiniDB Configuration Setup and Installation =====" << endl << endl; + cout << endl << "===== columnstore Configuration Setup and Installation =====" << endl << endl; if ( systemType == "combined" ) { cout << "----- Combined System Type - Setup and Install Calpont-MySQL Packages -----" << endl << endl; @@ -1882,7 +1878,7 @@ int main(int argc, char *argv[]) // update /root/Columnstore.xml // - cout << "----- Updating InfiniDB Configuration File (Columnstore.xml) -----" << endl << endl; + cout << "----- Updating columnstore Configuration File (Columnstore.xml) -----" << endl << endl; //setup for multi-server install try { @@ -1910,7 +1906,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting AmazonElasticIPCount in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting AmazonElasticIPCount in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1931,7 +1927,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Volume/Device Names in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Volume/Device Names in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1946,7 +1942,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting DBRoot Count in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting DBRoot Count in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1959,7 +1955,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting DBRoot Count in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting DBRoot Count in the columnstore System Configuration file" << endl; cleanupSystem(); } } @@ -1980,7 +1976,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Host Name in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Host Name in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1990,7 +1986,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting IP address in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting IP address in the columnstore System Configuration file" << endl; cleanupSystem(); } } @@ -2011,7 +2007,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Host Name in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Host Name in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2021,7 +2017,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting IP address in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting IP address in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2032,7 +2028,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting dbroot count in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting dbroot count in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2053,7 +2049,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting DBRoot ID in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting DBRoot ID in the columnstore System Configuration file" << endl; cleanupSystem(); } } @@ -2068,7 +2064,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting UMStorageType in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting UMStorageType in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2089,7 +2085,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Volume/Device Names in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Volume/Device Names in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2104,7 +2100,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting DBRootStorageType in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting DBRootStorageType in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2139,7 +2135,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Volume/Device Names in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Volume/Device Names in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2161,7 +2157,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2246,7 +2242,7 @@ void snmpAppCheck() cout << endl << "===== Setup the Network Management System (NMS) Server Configuration =====" << endl << endl; - cout << "This would be used to receive SNMP Traps from InfiniDB, like a Network Control Center" << endl; + cout << "This would be used to receive SNMP Traps from columnstore, like a Network Control Center" << endl; cout << "Default to 0.0.0.0 to not enable snmptrap forwarding" << endl << endl; prompt1 = "Enter IP Address(es) of NMS Server (0.0.0.0) > "; pcommand1 = readline(prompt1.c_str()); @@ -2863,7 +2859,7 @@ void cleanupSystem(bool terminate) if ( systemType == "combined" ) { cout << "----- Combined System Type Uninstall Calpont-MySQL Packages -----" << endl << endl; - system("rpm -e infinidb-mysql infinidb-storage-engine"); + system("rpm -e infinidb-mysql infinidb-storage-engine"); } cout << endl << "Cleanup finished, exiting" << endl << endl; diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp index e669745d2..2c5db22f4 100644 --- a/oamapps/postConfigure/postConfigure.cpp +++ b/oamapps/postConfigure/postConfigure.cpp @@ -214,7 +214,7 @@ int main(int argc, char *argv[]) bool startOfflinePrompt = false; noPrompting = false; string password; - + string cmd; // struct sysinfo myinfo; // hidden options @@ -425,9 +425,7 @@ int main(int argc, char *argv[]) } //check if MariaDB Columnstore is up and running - string cmd = installDir + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) { + if (oam.checkSystemRunning()) { cout << "MariaDB Columnstore is running, can't run postConfigure while MariaDB Columnstore is running. Exiting.." << endl; exit (0); } From d1603696eb812d625a672865fba00e3557f99c96 Mon Sep 17 00:00:00 2001 From: David Hall Date: Wed, 14 Sep 2016 17:10:23 -0500 Subject: [PATCH 05/12] MCOl-297 CHARACTER_LENGTH(datetime) returns wrong length --- utils/funcexp/func_char_length.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/funcexp/func_char_length.cpp b/utils/funcexp/func_char_length.cpp index 73f987f1b..22c576bc4 100644 --- a/utils/funcexp/func_char_length.cpp +++ b/utils/funcexp/func_char_length.cpp @@ -96,8 +96,7 @@ int64_t Func_char_length::getIntVal(rowgroup::Row& row, case execplan::CalpontSystemCatalog::DATETIME: { string date = dataconvert::DataConvert::datetimeToString(parm[0]->data()->getDatetimeIntVal(row, isNull)); - //adjust for microseconds not counted - return (int64_t)date.size() - 7; + return (int64_t)date.size(); } default: From 1fdb5f567b162a8069a6874105da6adf0e62f40c Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Thu, 15 Sep 2016 19:48:15 +0100 Subject: [PATCH 06/12] Fix casting issue for date truncation Boost::any is used for the value so it needs to be casted to a type --- utils/dataconvert/dataconvert.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/dataconvert/dataconvert.cpp b/utils/dataconvert/dataconvert.cpp index 27da7ccce..473282595 100644 --- a/utils/dataconvert/dataconvert.cpp +++ b/utils/dataconvert/dataconvert.cpp @@ -1100,7 +1100,7 @@ boost::any } else { - value = 0; + value = (uint32_t) 0; pushWarning = true; } } @@ -1115,7 +1115,7 @@ boost::any } else { - value = 0; + value = (uint64_t) 0; pushWarning = true; } } From 7bf6e55a588dc9074aba326b828bf73b990dec90 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Mon, 19 Sep 2016 10:11:47 -0500 Subject: [PATCH 07/12] Jemalloc missing from .spec file --- build/columnstore.community.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/columnstore.community.spec.in b/build/columnstore.community.spec.in index 95ab58ba0..ad80b46c7 100644 --- a/build/columnstore.community.spec.in +++ b/build/columnstore.community.spec.in @@ -284,7 +284,7 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}.%{release} /usr/local/mariadb/columnstore/lib/libmysqlcl_idb.so.1.0.0 /usr/local/mariadb/columnstore/lib/libquerystats.so.1.0.0 /usr/local/mariadb/columnstore/lib/libwriteengineredistribute.so.1.0.0 -#/usr/local/mariadb/columnstore/lib/libjemalloc.so.3.3.0 +/usr/local/mariadb/columnstore/lib/libjemalloc.so.3.3.0 /usr/local/mariadb/columnstore/lib/libidbdatafile.so.1.0.0 #/usr/local/mariadb/columnstore/lib/hdfs-20.so #/usr/local/mariadb/columnstore/lib/hdfs-12.so From b2f380a4f34c2a93120ccc5e62a946f8a7a1fda5 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Tue, 20 Sep 2016 15:36:22 -0500 Subject: [PATCH 08/12] MCOL-303 fix performance issue Between 1.0.1 and 1.0.2 there were chnages to the build system which allow for different build options with CMake. Unfortunately the default was not set correctly so the default build was not optimised. This change allows for the default build to be optimised again. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f27e309a..a9fdbdc02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}") OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON) SET(CMAKE_BUILD_TYPE RELWITHDEBINFO CACHE STRING - "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel") + "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel" FORCE) #set( CMAKE_VERBOSE_MAKEFILE on ) From d6366d9ee590b2e85e65d466cb54be2d95398d53 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Tue, 20 Sep 2016 16:13:29 -0500 Subject: [PATCH 09/12] Make the CMAKE_BUILD_TYPE work with user setting --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9fdbdc02..49605d589 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,8 +29,10 @@ MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}") # custom packaging steps. OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON) -SET(CMAKE_BUILD_TYPE RELWITHDEBINFO CACHE STRING - "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel" FORCE) +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE RELWITHDEBINFO CACHE STRING + "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel" FORCE) +ENDIF(NOT CMAKE_BUILD_TYPE) #set( CMAKE_VERBOSE_MAKEFILE on ) From 1cb95cee728e8fc3124c05e084501134c514bf21 Mon Sep 17 00:00:00 2001 From: David Hill Date: Tue, 20 Sep 2016 22:34:12 +0000 Subject: [PATCH 10/12] bump release --- build/releasenum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/releasenum b/build/releasenum index 29f66e13f..2a2f2550c 100644 --- a/build/releasenum +++ b/build/releasenum @@ -1,3 +1,3 @@ -version=1.0.3 +version=1.0.4 release=1 From 7d3cd26af97378874916d68132907add341fe601 Mon Sep 17 00:00:00 2001 From: Ben Thompson Date: Thu, 22 Sep 2016 10:14:18 -0400 Subject: [PATCH 11/12] MCOL-160 MCOL-262 CMake Build Fixes for out-of-tree builds and engine RPMS --- .gitignore | 5 ++ CMakeLists.txt | 52 +++++++++--- build/postInstall_libs.sh | 11 +++ build/postInstall_platform.sh | 12 +++ build/postInstall_storage_engine.sh | 12 +++ build/preUn_libs.sh | 11 +++ build/preUn_platform.sh | 15 ++++ build/preUn_storage_engine.sh | 11 +++ build/releasenum | 1 - build/releasenum.in | 2 + cpackEngineRPM.cmake | 99 +++++++++++++++++++++++ dbcon/ddlpackage/CMakeLists.txt | 6 +- dbcon/ddlpackageproc/CMakeLists.txt | 2 +- dbcon/dmlpackage/CMakeLists.txt | 6 +- dbcon/dmlpackageproc/CMakeLists.txt | 2 +- dbcon/execplan/CMakeLists.txt | 2 +- dbcon/joblist/CMakeLists.txt | 2 +- dbcon/mysql/CMakeLists.txt | 11 +-- ddlproc/CMakeLists.txt | 2 +- decomsvr/CMakeLists.txt | 2 +- dmlproc/CMakeLists.txt | 2 +- exemgr/CMakeLists.txt | 2 +- oam/cloud/CMakeLists.txt | 2 +- oam/etc/CMakeLists.txt | 2 +- oam/install_scripts/CMakeLists.txt | 5 +- oam/oamcpp/CMakeLists.txt | 2 +- oam/post/CMakeLists.txt | 2 +- oamapps/columnstoreDB/CMakeLists.txt | 2 +- oamapps/columnstoreSupport/CMakeLists.txt | 4 +- oamapps/mcsadmin/CMakeLists.txt | 2 +- oamapps/postConfigure/CMakeLists.txt | 10 +-- oamapps/sendtrap/CMakeLists.txt | 2 +- oamapps/serverMonitor/CMakeLists.txt | 2 +- oamapps/traphandler/CMakeLists.txt | 2 +- primitives/primproc/CMakeLists.txt | 2 +- procmgr/CMakeLists.txt | 2 +- procmon/CMakeLists.txt | 2 +- snmpd/etc/CMakeLists.txt | 6 +- snmpd/snmpmanager/CMakeLists.txt | 2 +- tools/clearShm/CMakeLists.txt | 2 +- tools/cleartablelock/CMakeLists.txt | 2 +- tools/configMgt/CMakeLists.txt | 2 +- tools/cplogger/CMakeLists.txt | 2 +- tools/dbbuilder/CMakeLists.txt | 2 +- tools/dbloadxml/CMakeLists.txt | 2 +- tools/ddlcleanup/CMakeLists.txt | 2 +- tools/editem/CMakeLists.txt | 2 +- tools/getConfig/CMakeLists.txt | 2 +- tools/idbmeminfo/CMakeLists.txt | 2 +- tools/setConfig/CMakeLists.txt | 4 +- tools/viewtablelock/CMakeLists.txt | 2 +- utils/batchloader/CMakeLists.txt | 2 +- utils/boost_idb/CMakeLists.txt | 2 +- utils/cacheutils/CMakeLists.txt | 2 +- utils/common/CMakeLists.txt | 2 +- utils/compress/CMakeLists.txt | 2 +- utils/configcpp/CMakeLists.txt | 2 +- utils/dataconvert/CMakeLists.txt | 2 +- utils/ddlcleanup/CMakeLists.txt | 2 +- utils/funcexp/CMakeLists.txt | 2 +- utils/idbdatafile/CMakeLists.txt | 2 +- utils/idbhdfs/hdfs-12/CMakeLists.txt | 2 +- utils/idbhdfs/hdfs-20/CMakeLists.txt | 2 +- utils/joiner/CMakeLists.txt | 2 +- utils/loggingcpp/CMakeLists.txt | 8 +- utils/messageqcpp/CMakeLists.txt | 2 +- utils/mysqlcl_idb/CMakeLists.txt | 2 +- utils/querystats/CMakeLists.txt | 2 +- utils/querytele/CMakeLists.txt | 2 +- utils/rowgroup/CMakeLists.txt | 2 +- utils/rwlock/CMakeLists.txt | 2 +- utils/threadpool/CMakeLists.txt | 2 +- utils/thrift/CMakeLists.txt | 2 +- utils/udfsdk/CMakeLists.txt | 16 +++- utils/windowfunction/CMakeLists.txt | 2 +- versioning/BRM/CMakeLists.txt | 16 ++-- writeengine/bulk/CMakeLists.txt | 2 +- writeengine/client/CMakeLists.txt | 2 +- writeengine/redistribute/CMakeLists.txt | 2 +- writeengine/server/CMakeLists.txt | 2 +- writeengine/splitter/CMakeLists.txt | 2 +- writeengine/wrapper/CMakeLists.txt | 2 +- 82 files changed, 329 insertions(+), 114 deletions(-) create mode 100644 build/postInstall_libs.sh create mode 100644 build/postInstall_platform.sh create mode 100644 build/postInstall_storage_engine.sh create mode 100644 build/preUn_libs.sh create mode 100644 build/preUn_platform.sh create mode 100644 build/preUn_storage_engine.sh create mode 100644 build/releasenum.in create mode 100644 cpackEngineRPM.cmake diff --git a/.gitignore b/.gitignore index 5f0c4de78..c9dc8e53a 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,8 @@ utils/loggingcpp/messageids.h CPackConfig.cmake CPackSourceConfig.cmake build/columnstore.community.spec +*.rpm +install_manifest_libs.txt +install_manifest_platform.txt +install_manifest_storage-engine.txt +_CPack_Packages diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f27e309a..8ea44d478 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,8 @@ SET (INSTALL_ENGINE "/usr/local/mariadb/columnstore") INCLUDE (configureEngine.cmake) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/releasenum.in ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum @ONLY IMMEDIATE) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum DESTINATION ${INSTALL_ENGINE} COMPONENT platform) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) INCLUDE(bison.cmake) @@ -107,6 +109,20 @@ SET (ENGINE_WRITE_LIBS ddlpackageproc ddlpackage dmlpackageproc dmlpackage SET (ENGINE_COMMON_LDFLAGS "") +IF (SERVER_BUILD_INCLUDE_DIR) + SET (SERVER_BUILD_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${SERVER_BUILD_INCLUDE_DIR}) +ELSE() + SET (SERVER_BUILD_INCLUDE_DIR ${CMAKE_BINARY_DIR}/../include) +ENDIF() + +IF (SERVER_SOURCE_ROOT_DIR) + SET (SERVER_SOURCE_ROOT_DIR ${CMAKE_BINARY_DIR}/${SERVER_SOURCE_ROOT_DIR}) +ELSE() + SET (SERVER_SOURCE_ROOT_DIR ${CMAKE_BINARY_DIR}/..) +ENDIF() + +MESSAGE("SERVER_BUILD_INCLUDE_DIR = ${SERVER_BUILD_INCLUDE_DIR}") +MESSAGE("SERVER_SOURCE_ROOT_DIR = ${SERVER_SOURCE_ROOT_DIR}") #SET (ENGINE_UTILS_BOOSTIDB_INCLUDE "{CMAKE_CURRENT_SOURCE_DIR}/utils/boost_idb") SET (ENGINE_UTILS_XML_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/libxml") @@ -145,18 +161,15 @@ SET (ENGINE_UTILS_BATCHLDR_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/batchlo SET (ENGINE_UTILS_DDLCLEANUP_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/ddlcleanup") SET (ENGINE_UTILS_QUERYSTATS_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/querystats") SET (ENGINE_WE_CONFIGCPP_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/writeengine/xml") -SET (ENGINE_SERVER_SQL_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../../../sql") -SET (ENGINE_SERVER_SQL2_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../sql") -SET (ENGINE_SERVER_INCLUDE_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../../../include") -SET (ENGINE_SERVER_INCLUDE_INCLUDE2 "${CMAKE_CURRENT_SOURCE_DIR}/../include") -SET (ENGINE_SERVER_PCRE_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../../../pcre") -SET (ENGINE_SERVER_PCRE_INCLUDE2 "${CMAKE_CURRENT_SOURCE_DIR}/../pcre") +SET (ENGINE_SERVER_SQL_INCLUDE "${SERVER_SOURCE_ROOT_DIR}/sql") +SET (ENGINE_SERVER_INCLUDE_INCLUDE "${SERVER_SOURCE_ROOT_DIR}/include") +SET (ENGINE_SERVER_PCRE_INCLUDE "${SERVER_SOURCE_ROOT_DIR}/pcre") SET (ENGINE_NETSNMP_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/net-snmp/net-snmp") SET (ENGINE_NETSNMP_INCLUDE2 "${CMAKE_CURRENT_SOURCE_DIR}/net-snmp/net-snmp/include") -SET (ENGINE_DEFAULT_INCLUDES "." "../" "../..") +SET (ENGINE_DEFAULT_INCLUDES "." "../" "../../" ${SERVER_BUILD_INCLUDE_DIR}) -SET (ENGINE_COMMON_INCLUDES ${ENGINE_DEFAULT_INCLUDES} ${Boost_INCLUDE_DIR} ${ENGINE_UTILS_XML_INCLUDE} ${ENGINE_UTILS_MESSAGEQCPP_INCLUDE} ${ENGINE_WE_SHARED_INCLUDE} ${ENGINE_UTILS_IDBDATAFILE_INCLUDE} ${ENGINE_UTILS_LOGGINGCPP_INCLUDE} ${ENGINE_UTILS_CONFIGCPP_INCLUDE} ${ENGINE_UTILS_COMPRESS_INCLUDE} ${ENGINE_VERSIONING_BRM_INCLUDE} ${ENGINE_UTILS_ROWGROUP_INCLUDE} ${ENGINE_UTILS_COMMON_INCLUDE} ${ENGINE_UTILS_DATACONVERT_INCLUDE} ${ENGINE_UTILS_RWLOCK_INCLUDE} ${ENGINE_UTILS_FUNCEXP_INCLUDE} ${ENGINE_SNMPD_SNMPMANAGER_INCLUDE} ${ENGINE_UTILS_INCLUDE} ${ENGINE_OAM_OAMCPP_INCLUDE} ${ENGINE_DBCON_DDLPKGPROC_INCLUDE} ${ENGINE_DBCON_DDLPKG_INCLUDE} ${ENGINE_DBCON_EXECPLAN_INCLUDE} ${ENGINE_UTILS_STARTUP_INCLUDE} ${ENGINE_DBCON_JOBLIST_INCLUDE} ${ENGINE_WE_WRAPPER_INCLUDE} ${ENGINE_WE_SERVER_INCLUDE} ${ENGINE_DBCON_DMLPKG_INCLUDE} ${ENGINE_WE_CLIENT_INCLUDE} ${ENGINE_DBCON_DMLPKGPROC_INCLUDE} ${ENGINE_UTILS_CACHEUTILS_INCLUDE} ${ENGINE_UTILS_MYSQLCL_INCLUDE} ${ENGINE_UTILS_QUERYTELE_INCLUDE} ${ENGINE_UTILS_THRIFT_INCLUDE} ${ENGINE_UTILS_JOINER_INCLUDE} ${ENGINE_UTILS_THREADPOOL_INCLUDE} ${ENGINE_UTILS_BATCHLDR_INCLUDE} ${ENGINE_UTILS_DDLCLEANUP_INCLUDE} ${ENGINE_UTILS_QUERYSTATS_INCLUDE} ${ENGINE_WE_CONFIGCPP_INCLUDE} ${ENGINE_SERVER_SQL_INCLUDE} ${ENGINE_SERVER_INCLUDE_INCLUDE} ${ENGINE_SERVER_PCRE_INCLUDE} ${ENGINE_SERVER_SQL2_INCLUDE} ${ENGINE_SERVER_INCLUDE_INCLUDE2} ${ENGINE_SERVER_PCRE_INCLUDE2} ${ENGINE_NETSNMP_INCLUDE} ${ENGINE_NETSNMP_INCLUDE2}) +SET (ENGINE_COMMON_INCLUDES ${ENGINE_DEFAULT_INCLUDES} ${Boost_INCLUDE_DIR} ${ENGINE_UTILS_XML_INCLUDE} ${ENGINE_UTILS_MESSAGEQCPP_INCLUDE} ${ENGINE_WE_SHARED_INCLUDE} ${ENGINE_UTILS_IDBDATAFILE_INCLUDE} ${ENGINE_UTILS_LOGGINGCPP_INCLUDE} ${ENGINE_UTILS_CONFIGCPP_INCLUDE} ${ENGINE_UTILS_COMPRESS_INCLUDE} ${ENGINE_VERSIONING_BRM_INCLUDE} ${ENGINE_UTILS_ROWGROUP_INCLUDE} ${ENGINE_UTILS_COMMON_INCLUDE} ${ENGINE_UTILS_DATACONVERT_INCLUDE} ${ENGINE_UTILS_RWLOCK_INCLUDE} ${ENGINE_UTILS_FUNCEXP_INCLUDE} ${ENGINE_SNMPD_SNMPMANAGER_INCLUDE} ${ENGINE_UTILS_INCLUDE} ${ENGINE_OAM_OAMCPP_INCLUDE} ${ENGINE_DBCON_DDLPKGPROC_INCLUDE} ${ENGINE_DBCON_DDLPKG_INCLUDE} ${ENGINE_DBCON_EXECPLAN_INCLUDE} ${ENGINE_UTILS_STARTUP_INCLUDE} ${ENGINE_DBCON_JOBLIST_INCLUDE} ${ENGINE_WE_WRAPPER_INCLUDE} ${ENGINE_WE_SERVER_INCLUDE} ${ENGINE_DBCON_DMLPKG_INCLUDE} ${ENGINE_WE_CLIENT_INCLUDE} ${ENGINE_DBCON_DMLPKGPROC_INCLUDE} ${ENGINE_UTILS_CACHEUTILS_INCLUDE} ${ENGINE_UTILS_MYSQLCL_INCLUDE} ${ENGINE_UTILS_QUERYTELE_INCLUDE} ${ENGINE_UTILS_THRIFT_INCLUDE} ${ENGINE_UTILS_JOINER_INCLUDE} ${ENGINE_UTILS_THREADPOOL_INCLUDE} ${ENGINE_UTILS_BATCHLDR_INCLUDE} ${ENGINE_UTILS_DDLCLEANUP_INCLUDE} ${ENGINE_UTILS_QUERYSTATS_INCLUDE} ${ENGINE_WE_CONFIGCPP_INCLUDE} ${ENGINE_SERVER_SQL_INCLUDE} ${ENGINE_SERVER_INCLUDE_INCLUDE} ${ENGINE_SERVER_PCRE_INCLUDE} ${ENGINE_NETSNMP_INCLUDE} ${ENGINE_NETSNMP_INCLUDE2}) INCLUDE (ExternalProject) @@ -199,5 +212,26 @@ ADD_SUBDIRECTORY(writeengine/server) ADD_SUBDIRECTORY(writeengine/bulk) ADD_SUBDIRECTORY(writeengine/splitter) -INSTALL(FILES utils/jemalloc/libjemalloc.so.3.3.0 DESTINATION ${ENGINE_LIBDIR}) +#This should go away when netsnmp is removed from the builds +INSTALL(PROGRAMS ${ENGINE_LIBDIR}/libnetsnmpagent.so.30.0.3 + ${ENGINE_LIBDIR}/libnetsnmpagent.so.30 + ${ENGINE_LIBDIR}/libnetsnmpagent.so + ${ENGINE_LIBDIR}/libnetsnmphelpers.so.30.0.3 + ${ENGINE_LIBDIR}/libnetsnmphelpers.so.30 + ${ENGINE_LIBDIR}/libnetsnmphelpers.so + ${ENGINE_LIBDIR}/libnetsnmpmibs.so.30.0.3 + ${ENGINE_LIBDIR}/libnetsnmpmibs.so.30 + ${ENGINE_LIBDIR}/libnetsnmpmibs.so + ${ENGINE_LIBDIR}/libnetsnmp.so.30.0.3 + ${ENGINE_LIBDIR}/libnetsnmp.so.30 + ${ENGINE_LIBDIR}/libnetsnmp.so + ${ENGINE_LIBDIR}/libnetsnmptrapd.so.30.0.3 + ${ENGINE_LIBDIR}/libnetsnmptrapd.so.30 + ${ENGINE_LIBDIR}/libnetsnmptrapd.so + DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) +INSTALL(PROGRAMS ${ENGINE_SBINDIR}/snmpd ${ENGINE_SBINDIR}/snmptrapd DESTINATION ${ENGINE_SBINDIR} COMPONENT platform) + +INSTALL(PROGRAMS utils/jemalloc/libjemalloc.so.3.3.0 DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) + +INCLUDE(cpackEngineRPM.cmake) diff --git a/build/postInstall_libs.sh b/build/postInstall_libs.sh new file mode 100644 index 000000000..b4e8c04e4 --- /dev/null +++ b/build/postInstall_libs.sh @@ -0,0 +1,11 @@ +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +echo "MariaDB ColumnStore RPM install completed" + diff --git a/build/postInstall_platform.sh b/build/postInstall_platform.sh new file mode 100644 index 000000000..78e7b0288 --- /dev/null +++ b/build/postInstall_platform.sh @@ -0,0 +1,12 @@ +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +test -x /usr/local/mariadb/columnstore/bin/post-install && /usr/local/mariadb/columnstore/bin/post-install --prefix=$prefix --rpmmode=$rpmmode + +echo "MariaDB ColumnStore RPM install completed" diff --git a/build/postInstall_storage_engine.sh b/build/postInstall_storage_engine.sh new file mode 100644 index 000000000..3c346b537 --- /dev/null +++ b/build/postInstall_storage_engine.sh @@ -0,0 +1,12 @@ +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +echo "MariaDB ColumnStore RPM install completed" + + diff --git a/build/preUn_libs.sh b/build/preUn_libs.sh new file mode 100644 index 000000000..64c23c654 --- /dev/null +++ b/build/preUn_libs.sh @@ -0,0 +1,11 @@ +rpmmode=upgrade +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=erase + fi +else + rpmmode=erase +fi + +exit 0 + diff --git a/build/preUn_platform.sh b/build/preUn_platform.sh new file mode 100644 index 000000000..7cb2059e1 --- /dev/null +++ b/build/preUn_platform.sh @@ -0,0 +1,15 @@ +rpmmode=upgrade +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=erase + fi +else + rpmmode=erase +fi + +if [ $rpmmode = erase ]; then + test -x /usr/local/mariadb/columnstore/bin/pre-uninstall && /usr/local/mariadb/columnstore/bin/pre-uninstall +fi + +exit 0 + diff --git a/build/preUn_storage_engine.sh b/build/preUn_storage_engine.sh new file mode 100644 index 000000000..64c23c654 --- /dev/null +++ b/build/preUn_storage_engine.sh @@ -0,0 +1,11 @@ +rpmmode=upgrade +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=erase + fi +else + rpmmode=erase +fi + +exit 0 + diff --git a/build/releasenum b/build/releasenum index 2a2f2550c..0aa2a30a8 100644 --- a/build/releasenum +++ b/build/releasenum @@ -1,3 +1,2 @@ version=1.0.4 release=1 - diff --git a/build/releasenum.in b/build/releasenum.in new file mode 100644 index 000000000..ea20eb5c1 --- /dev/null +++ b/build/releasenum.in @@ -0,0 +1,2 @@ +version=@CPACK_RPM_PACKAGE_VERSION@ +release=@CPACK_RPM_PACKAGE_RELEASE@ diff --git a/cpackEngineRPM.cmake b/cpackEngineRPM.cmake new file mode 100644 index 000000000..c50195876 --- /dev/null +++ b/cpackEngineRPM.cmake @@ -0,0 +1,99 @@ +IF(RPM) + +SET(CMAKE_INSTALL_PREFIX ${INSTALL_ENGINE}) + +SET(CPACK_GENERATOR "RPM") +SET(CPACK_RPM_PACKAGE_DEBUG 1) +SET(CPACK_PACKAGING_INSTALL_PREFIX ${INSTALL_ENGINE}) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7) + +SET(CPACK_RPM_COMPONENT_INSTALL ON) + +SET(CPACK_COMPONENTS_ALL platform libs storage-engine) + +SET(CPACK_PACKAGE_NAME "mariadb-columnstore") +SET(ENGINE_ARCH "x86_64") + +IF (NOT CPACK_RPM_PACKAGE_VERSION) +SET (CPACK_RPM_PACKAGE_VERSION "1.0.0") +ENDIF() +IF (NOT CPACK_RPM_PACKAGE_RELEASE) +SET (CPACK_RPM_PACKAGE_RELEASE "0") +ENDIF() + +SET(CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) +SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}.${CPACK_RPM_PACKAGE_RELEASE}-${ENGINE_ARCH}-${RPM}") + +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MariaDB Columnstore: a very fast and robust SQL database server") +SET(CPACK_PACKAGE_URL "http://mariadb.org") + +SET(CPACK_PACKAGE_SUMMARY "MariaDB-Columnstore software") +SET(CPACK_PACKAGE_VENDOR "MariaDB Corporation Ab") +SET(CPACK_PACKAGE_LICENSE "Copyright (c) 2016 MariaDB Corporation Ab., all rights reserved; redistributable under the terms of the GPL, see the file COPYING for details.") + + +SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2") +SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE) +SET(CPACK_PACKAGE_RELOCATABLE FALSE) +SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases") +SET(CPACK_RPM_PACKAGE_URL ${CPACK_PACKAGE_URL}) +SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_SUMMARY}) +SET(CPACK_RPM_PACKAGE_VENDOR ${CPACK_PACKAGE_VENDOR}) +SET(CPACK_RPM_PACKAGE_LICENSE ${CPACK_PACKAGE_LICENSE}) + +SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY} + +It is GPL v2 licensed, which means you can use the it free of charge under the +conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/). + +MariaDB documentation can be found at https://mariadb.com/kb +MariaDB bug reports should be submitted through https://jira.mariadb.org + +") + +SET(CPACK_RPM_platform_PACKAGE_DESCRIPTION "MariaDB-Columnstore binary files") +SET(CPACK_RPM_platform_PACKAGE_SUMMARY "MariaDB-Columnstore software binaries") +SET(CPACK_RPM_platform_PACKAGE_GROUP "Applications") + +SET(CPACK_RPM_libs_PACKAGE_DESCRIPTION "MariaDB-Columnstore libraries") +SET(CPACK_RPM_libs_PACKAGE_SUMMARY "MariaDB-Columnstore software libraries") + +SET(CPACK_RPM_storage-engine_PACKAGE_DESCRIPTION "MariaDB Columnstore connector binary files") +SET(CPACK_RPM_storage-engine_PACKAGE_SUMMARY "MariaDB-Columnstore software MariaDB connector") +SET(CPACK_RPM_storage-engine_PACKAGE_GROUP "Applications") + +# "set/append array" - append a set of strings, separated by a space +MACRO(SETA var) + FOREACH(v ${ARGN}) + SET(${var} "${${var}} ${v}") + ENDFOREACH() +ENDMACRO(SETA) + +SETA(CPACK_RPM_libs_PACKAGE_PROVIDES "mariadb-columnstore-libs") +SETA(CPACK_RPM_platform_PACKAGE_PROVIDES "mariadb-columnstore-platform") +SETA(CPACK_RPM_storage-engine_PACKAGE_PROVIDES "mariadb-columnstore-storage-engine") + +SETA(CPACK_RPM_libs_PACKAGE_OBSOLETES "mariadb-columnstore-libs") +SETA(CPACK_RPM_platform_PACKAGE_OBSOLETES "mariadb-columnstore-platform") +SETA(CPACK_RPM_storage-engine_PACKAGE_OBSOLETES "mariadb-columnstore-storage-engine") + +SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "boost >= 1.53.0" "mariadb-columnstore-libs") +SETA(CPACK_RPM_storage-engine_PACKAGE_REQUIRES "mariadb-columnstore-libs") + +SET(CPACK_RPM_platform_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/postInstall_platform.sh) +SET(CPACK_RPM_libs_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/postInstall_libs.sh) +SET(CPACK_RPM_storage-engine_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/postInstall_storage_engine.sh) + +SET(CPACK_RPM_platform_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/preUn_platform.sh) +SET(CPACK_RPM_libs_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/preUn_libs.sh) +SET(CPACK_RPM_storage-engine_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/preUn_storage_engine.sh) + + +#SET(CPACK_RPM_SPEC_MORE_DEFINE " +#%define _prefix ${CMAKE_INSTALL_PREFIX} +#") + + +INCLUDE (CPack) + +ENDIF() diff --git a/dbcon/ddlpackage/CMakeLists.txt b/dbcon/ddlpackage/CMakeLists.txt index 87c3a8ef4..27d2a3015 100644 --- a/dbcon/ddlpackage/CMakeLists.txt +++ b/dbcon/ddlpackage/CMakeLists.txt @@ -2,7 +2,7 @@ include_directories( ${ENGINE_COMMON_INCLUDES} ) ADD_CUSTOM_COMMAND( - OUTPUT ddl-gram.cpp ddl-scan.cpp + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ddl-gram.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ddl-scan.cpp COMMAND ./ddl-gram.sh ${BISON_EXECUTABLE} COMMAND ./ddl-scan.sh ${LEX_EXECUTABLE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} @@ -32,9 +32,9 @@ set(ddlpackage_LIB_SRCS add_library(ddlpackage SHARED ${ddlpackage_LIB_SRCS}) -add_dependencies(ddlpackage ddl-gram.cpp ddl-scan.cpp) +add_dependencies(ddlpackage ${CMAKE_CURRENT_SOURCE_DIR}/ddl-gram.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ddl-scan.cpp) set_target_properties(ddlpackage PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS ddlpackage DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS ddlpackage DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/dbcon/ddlpackageproc/CMakeLists.txt b/dbcon/ddlpackageproc/CMakeLists.txt index 840d0f1ed..0c88ae97b 100644 --- a/dbcon/ddlpackageproc/CMakeLists.txt +++ b/dbcon/ddlpackageproc/CMakeLists.txt @@ -18,5 +18,5 @@ add_dependencies(ddlpackageproc libnetsnmpmibs) set_target_properties(ddlpackageproc PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS ddlpackageproc DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS ddlpackageproc DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/dbcon/dmlpackage/CMakeLists.txt b/dbcon/dmlpackage/CMakeLists.txt index 5bca5e0f1..43536a48d 100644 --- a/dbcon/dmlpackage/CMakeLists.txt +++ b/dbcon/dmlpackage/CMakeLists.txt @@ -2,7 +2,7 @@ include_directories( ${ENGINE_COMMON_INCLUDES} ) ADD_CUSTOM_COMMAND( - OUTPUT dml-gram.cpp dml-scan.cpp + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dml-gram.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dml-scan.cpp COMMAND ./dml-gram.sh ${BISON_EXECUTABLE} COMMAND ./dml-scan.sh ${LEX_EXECUTABLE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} @@ -32,9 +32,9 @@ set(dmlpackage_LIB_SRCS add_library(dmlpackage SHARED ${dmlpackage_LIB_SRCS}) -add_dependencies(dmlpackage dml-gram.cpp dml-scan.cpp) +add_dependencies(dmlpackage ${CMAKE_CURRENT_SOURCE_DIR}/dml-gram.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dml-scan.cpp) set_target_properties(dmlpackage PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS dmlpackage DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS dmlpackage DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/dbcon/dmlpackageproc/CMakeLists.txt b/dbcon/dmlpackageproc/CMakeLists.txt index bd394683c..f1f9505b6 100644 --- a/dbcon/dmlpackageproc/CMakeLists.txt +++ b/dbcon/dmlpackageproc/CMakeLists.txt @@ -19,6 +19,6 @@ add_dependencies(dmlpackageproc libnetsnmpmibs) set_target_properties(dmlpackageproc PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS dmlpackageproc DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS dmlpackageproc DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/dbcon/execplan/CMakeLists.txt b/dbcon/execplan/CMakeLists.txt index 6e79a5709..f26923e4b 100644 --- a/dbcon/execplan/CMakeLists.txt +++ b/dbcon/execplan/CMakeLists.txt @@ -49,5 +49,5 @@ add_dependencies(execplan libnetsnmpmibs) set_target_properties(execplan PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS execplan DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS execplan DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/dbcon/joblist/CMakeLists.txt b/dbcon/joblist/CMakeLists.txt index 59f5d70e8..aeac82027 100644 --- a/dbcon/joblist/CMakeLists.txt +++ b/dbcon/joblist/CMakeLists.txt @@ -65,6 +65,6 @@ add_dependencies(joblist libnetsnmpmibs) set_target_properties(joblist PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS joblist DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS joblist DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/dbcon/mysql/CMakeLists.txt b/dbcon/mysql/CMakeLists.txt index eaa38b893..6d9a9ff86 100644 --- a/dbcon/mysql/CMakeLists.txt +++ b/dbcon/mysql/CMakeLists.txt @@ -1,9 +1,6 @@ include_directories( ${ENGINE_COMMON_INCLUDES} - /usr/include/libxml2 - ../../../mysql/include - ../../../mysql/sql - ../../../mysql/regex ) + /usr/include/libxml2 ) SET ( libcalmysql_SRCS @@ -34,16 +31,16 @@ target_link_libraries(calmysql ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} threadpool set_target_properties(calmysql PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS calmysql DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS calmysql DESTINATION ${ENGINE_LIBDIR} COMPONENT storage-engine) install(FILES syscatalog_mysql.sql dumpcat_mysql.sql calsetuserpriority.sql calremoveuserpriority.sql calshowprocesslist.sql my.cnf - DESTINATION ${ENGINE_MYSQLDIR}) + DESTINATION ${ENGINE_MYSQLDIR} COMPONENT storage-engine) install(PROGRAMS install_calpont_mysql.sh mysql-Columnstore dumpcat.pl - DESTINATION ${ENGINE_MYSQLDIR}) + DESTINATION ${ENGINE_MYSQLDIR} COMPONENT storage-engine) #AM_CPPFLAGS = $(idb_common_includes) $(idb_cppflags) diff --git a/ddlproc/CMakeLists.txt b/ddlproc/CMakeLists.txt index 6da3a1690..6e57261f2 100644 --- a/ddlproc/CMakeLists.txt +++ b/ddlproc/CMakeLists.txt @@ -12,5 +12,5 @@ add_dependencies(DDLProc libnetsnmpmibs) target_link_libraries(DDLProc ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} threadpool) -install(TARGETS DDLProc DESTINATION ${ENGINE_BINDIR}) +install(TARGETS DDLProc DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/decomsvr/CMakeLists.txt b/decomsvr/CMakeLists.txt index 441dbb41a..5c4e5e6a7 100644 --- a/decomsvr/CMakeLists.txt +++ b/decomsvr/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(DecomSvr ${DecomSvr_SRCS}) target_link_libraries(DecomSvr ${ENGINE_LDFLAGS} ${Boost_LIBRARIES} pthread rt) -install(TARGETS DecomSvr DESTINATION ${ENGINE_BINDIR}) +install(TARGETS DecomSvr DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/dmlproc/CMakeLists.txt b/dmlproc/CMakeLists.txt index 4d40ec8ac..e0d7c3bfa 100644 --- a/dmlproc/CMakeLists.txt +++ b/dmlproc/CMakeLists.txt @@ -16,7 +16,7 @@ add_dependencies(DMLProc libnetsnmpmibs) target_link_libraries(DMLProc ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} threadpool ddlcleanuputil batchloader) -install(TARGETS DMLProc DESTINATION ${ENGINE_BINDIR}) +install(TARGETS DMLProc DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/exemgr/CMakeLists.txt b/exemgr/CMakeLists.txt index d7847a536..8844e80a4 100644 --- a/exemgr/CMakeLists.txt +++ b/exemgr/CMakeLists.txt @@ -12,7 +12,7 @@ add_dependencies(ExeMgr libnetsnmpmibs) target_link_libraries(ExeMgr ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS} cacheutils threadpool) -install(TARGETS ExeMgr DESTINATION ${ENGINE_BINDIR}) +install(TARGETS ExeMgr DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### install files ############### diff --git a/oam/cloud/CMakeLists.txt b/oam/cloud/CMakeLists.txt index 1e99fc87d..6e6469b41 100644 --- a/oam/cloud/CMakeLists.txt +++ b/oam/cloud/CMakeLists.txt @@ -1,2 +1,2 @@ -install(PROGRAMS IDBInstanceCmds.sh IDBVolumeCmds.sh DESTINATION ${ENGINE_BINDIR}) +install(PROGRAMS IDBInstanceCmds.sh IDBVolumeCmds.sh DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oam/etc/CMakeLists.txt b/oam/etc/CMakeLists.txt index 066c24601..6e334e7b6 100644 --- a/oam/etc/CMakeLists.txt +++ b/oam/etc/CMakeLists.txt @@ -5,4 +5,4 @@ install(FILES AlarmConfig.xml ConsoleCmds.xml Columnstore.xml.singleserver ProcessConfig.xml.singleserver - DESTINATION ${ENGINE_ETCDIR}) + DESTINATION ${ENGINE_ETCDIR} COMPONENT platform) diff --git a/oam/install_scripts/CMakeLists.txt b/oam/install_scripts/CMakeLists.txt index 14555c3ad..09e72fdb1 100644 --- a/oam/install_scripts/CMakeLists.txt +++ b/oam/install_scripts/CMakeLists.txt @@ -22,7 +22,6 @@ install(PROGRAMS post-install columnstoreSyslog-ng syslogSetup.sh remote_scp_put.sh - columnstoreUninstall.sh columnstore.def remotessh.exp rsync.sh @@ -35,7 +34,7 @@ install(PROGRAMS post-install myCnf-include-args.text myCnf-exclude-args.text columnstore.service - DESTINATION ${ENGINE_BINDIR}) + DESTINATION ${ENGINE_BINDIR} COMPONENT platform) -install(FILES module DESTINATION ${ENGINE_LOCALDIR}) +install(FILES module DESTINATION ${ENGINE_LOCALDIR} COMPONENT platform) diff --git a/oam/oamcpp/CMakeLists.txt b/oam/oamcpp/CMakeLists.txt index 522465888..05d579835 100644 --- a/oam/oamcpp/CMakeLists.txt +++ b/oam/oamcpp/CMakeLists.txt @@ -12,6 +12,6 @@ add_dependencies(oamcpp libnetsnmpmibs) set_target_properties(oamcpp PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS oamcpp DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS oamcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/oam/post/CMakeLists.txt b/oam/post/CMakeLists.txt index d8cfd7056..f6d5a95c7 100644 --- a/oam/post/CMakeLists.txt +++ b/oam/post/CMakeLists.txt @@ -1,3 +1,3 @@ -install(PROGRAMS functions test-001.sh test-002.sh test-003.sh test-004.sh DESTINATION ${ENGINE_POSTDIR}) +install(PROGRAMS functions test-001.sh test-002.sh test-003.sh test-004.sh DESTINATION ${ENGINE_POSTDIR} COMPONENT platform) diff --git a/oamapps/columnstoreDB/CMakeLists.txt b/oamapps/columnstoreDB/CMakeLists.txt index d53cb97d7..60dca6ac1 100644 --- a/oamapps/columnstoreDB/CMakeLists.txt +++ b/oamapps/columnstoreDB/CMakeLists.txt @@ -12,5 +12,5 @@ add_dependencies(columnstoreDBWrite libnetsnmpmibs) target_link_libraries(columnstoreDBWrite ${ENGINE_LDFLAGS} readline ncurses ${ENGINE_EXEC_LIBS}) -install(TARGETS columnstoreDBWrite DESTINATION ${ENGINE_BINDIR}) +install(TARGETS columnstoreDBWrite DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/columnstoreSupport/CMakeLists.txt b/oamapps/columnstoreSupport/CMakeLists.txt index 4cdd958ca..662f8dc84 100644 --- a/oamapps/columnstoreSupport/CMakeLists.txt +++ b/oamapps/columnstoreSupport/CMakeLists.txt @@ -12,9 +12,9 @@ add_dependencies(columnstoreSupport libnetsnmpmibs) target_link_libraries(columnstoreSupport ${ENGINE_LDFLAGS} readline ncurses ${ENGINE_EXEC_LIBS}) -install(TARGETS columnstoreSupport DESTINATION ${ENGINE_BINDIR}) +install(TARGETS columnstoreSupport DESTINATION ${ENGINE_BINDIR} COMPONENT platform) install(PROGRAMS alarmReport.sh bulklogReport.sh configReport.sh hadoopReport.sh hardwareReport.sh logReport.sh resourceReport.sh softwareReport.sh - DESTINATION ${ENGINE_BINDIR}) + DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/mcsadmin/CMakeLists.txt b/oamapps/mcsadmin/CMakeLists.txt index 273cb69d0..8fc9b692f 100644 --- a/oamapps/mcsadmin/CMakeLists.txt +++ b/oamapps/mcsadmin/CMakeLists.txt @@ -12,5 +12,5 @@ add_dependencies(mcsadmin libnetsnmpmibs) target_link_libraries(mcsadmin ${ENGINE_LDFLAGS} readline ncurses ${ENGINE_EXEC_LIBS}) -install(TARGETS mcsadmin DESTINATION ${ENGINE_BINDIR}) +install(TARGETS mcsadmin DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/postConfigure/CMakeLists.txt b/oamapps/postConfigure/CMakeLists.txt index 6388da44c..658492a8d 100644 --- a/oamapps/postConfigure/CMakeLists.txt +++ b/oamapps/postConfigure/CMakeLists.txt @@ -12,7 +12,7 @@ add_dependencies(postConfigure libnetsnmpmibs) target_link_libraries(postConfigure ${ENGINE_LDFLAGS} readline ncurses ${ENGINE_EXEC_LIBS}) -install(TARGETS postConfigure DESTINATION ${ENGINE_BINDIR}) +install(TARGETS postConfigure DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -25,7 +25,7 @@ add_dependencies(installer libnetsnmpmibs) target_link_libraries(installer ${ENGINE_LDFLAGS} readline ncurses ${ENGINE_EXEC_LIBS}) -install(TARGETS installer DESTINATION ${ENGINE_BINDIR}) +install(TARGETS installer DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -38,7 +38,7 @@ add_dependencies(getMySQLpw libnetsnmpmibs) target_link_libraries(getMySQLpw ${ENGINE_LDFLAGS} readline ncurses ${ENGINE_EXEC_LIBS}) -install(TARGETS getMySQLpw DESTINATION ${ENGINE_BINDIR}) +install(TARGETS getMySQLpw DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -51,7 +51,7 @@ add_dependencies(amazonInstaller libnetsnmpmibs) target_link_libraries(amazonInstaller ${ENGINE_LDFLAGS} readline ncurses ${ENGINE_EXEC_LIBS}) -install(TARGETS amazonInstaller DESTINATION ${ENGINE_BINDIR}) +install(TARGETS amazonInstaller DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -64,5 +64,5 @@ add_dependencies(mycnfUpgrade libnetsnmpmibs) target_link_libraries(mycnfUpgrade ${ENGINE_LDFLAGS} readline ncurses ${ENGINE_EXEC_LIBS}) -install(TARGETS mycnfUpgrade DESTINATION ${ENGINE_BINDIR}) +install(TARGETS mycnfUpgrade DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/sendtrap/CMakeLists.txt b/oamapps/sendtrap/CMakeLists.txt index e453e4970..e61f5a2bf 100644 --- a/oamapps/sendtrap/CMakeLists.txt +++ b/oamapps/sendtrap/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(sendtrap ${sendtrap_SRCS}) target_link_libraries(sendtrap ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS}) -install(TARGETS sendtrap DESTINATION ${ENGINE_BINDIR}) +install(TARGETS sendtrap DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/serverMonitor/CMakeLists.txt b/oamapps/serverMonitor/CMakeLists.txt index 7e3821fc4..04296114a 100644 --- a/oamapps/serverMonitor/CMakeLists.txt +++ b/oamapps/serverMonitor/CMakeLists.txt @@ -19,5 +19,5 @@ add_executable(ServerMonitor ${ServerMonitor_SRCS}) target_link_libraries(ServerMonitor ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS}) -install(TARGETS ServerMonitor DESTINATION ${ENGINE_BINDIR}) +install(TARGETS ServerMonitor DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/traphandler/CMakeLists.txt b/oamapps/traphandler/CMakeLists.txt index 14247c146..d79cb5d37 100644 --- a/oamapps/traphandler/CMakeLists.txt +++ b/oamapps/traphandler/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(trapHandler ${trapHandler_SRCS}) target_link_libraries(trapHandler ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS}) -install(TARGETS trapHandler DESTINATION ${ENGINE_BINDIR}) +install(TARGETS trapHandler DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/primitives/primproc/CMakeLists.txt b/primitives/primproc/CMakeLists.txt index 0886ef27f..6bc6c584a 100644 --- a/primitives/primproc/CMakeLists.txt +++ b/primitives/primproc/CMakeLists.txt @@ -28,6 +28,6 @@ add_dependencies(PrimProc libnetsnmpmibs) target_link_libraries(PrimProc ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} threadpool cacheutils dbbc processor) -install(TARGETS PrimProc DESTINATION ${ENGINE_BINDIR}) +install(TARGETS PrimProc DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/procmgr/CMakeLists.txt b/procmgr/CMakeLists.txt index a5a96becd..b3a70e93a 100644 --- a/procmgr/CMakeLists.txt +++ b/procmgr/CMakeLists.txt @@ -12,5 +12,5 @@ add_dependencies(ProcMgr libnetsnmpmibs) target_link_libraries(ProcMgr ${ENGINE_LDFLAGS} cacheutils ${ENGINE_EXEC_LIBS}) -install(TARGETS ProcMgr DESTINATION ${ENGINE_BINDIR}) +install(TARGETS ProcMgr DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/procmon/CMakeLists.txt b/procmon/CMakeLists.txt index 4deef2ee7..e3d7c0898 100644 --- a/procmon/CMakeLists.txt +++ b/procmon/CMakeLists.txt @@ -12,5 +12,5 @@ add_dependencies(ProcMon libnetsnmpmibs) target_link_libraries(ProcMon ${ENGINE_LDFLAGS} cacheutils ${ENGINE_EXEC_LIBS}) -install(TARGETS ProcMon DESTINATION ${ENGINE_BINDIR}) +install(TARGETS ProcMon DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/snmpd/etc/CMakeLists.txt b/snmpd/etc/CMakeLists.txt index 273441be1..bb27b20ee 100644 --- a/snmpd/etc/CMakeLists.txt +++ b/snmpd/etc/CMakeLists.txt @@ -5,7 +5,7 @@ install(FILES snmpd.conf snmptrapd.conf snmpd.conf.singleserver snmptrapd.conf.singleserver - DESTINATION ${ENGINE_ETCDIR}) + DESTINATION ${ENGINE_ETCDIR} COMPONENT platform) install(FILES CALPONT-MIB.txt AGENTX-MIB.txt @@ -63,6 +63,6 @@ install(FILES CALPONT-MIB.txt UCD-DLMOD-MIB.txt UCD-IPFWACC-MIB.txt UCD-SNMP-MIB.txt - UDP-MIB.txt DESTINATION ${ENGINE_MIBDIR} ) + UDP-MIB.txt DESTINATION ${ENGINE_MIBDIR} COMPONENT platform ) -install(FILES snmpdx.conf snmpdx.conf.singleserver DESTINATION ${ENGINE_LOCALDIR}) +install(FILES snmpdx.conf snmpdx.conf.singleserver DESTINATION ${ENGINE_LOCALDIR} COMPONENT platform) diff --git a/snmpd/snmpmanager/CMakeLists.txt b/snmpd/snmpmanager/CMakeLists.txt index b113763c8..3652952f7 100644 --- a/snmpd/snmpmanager/CMakeLists.txt +++ b/snmpd/snmpmanager/CMakeLists.txt @@ -12,6 +12,6 @@ add_dependencies(snmpmanager libnetsnmpmibs) set_target_properties(snmpmanager PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS snmpmanager DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS snmpmanager DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/tools/clearShm/CMakeLists.txt b/tools/clearShm/CMakeLists.txt index 41527417f..6258cddd5 100644 --- a/tools/clearShm/CMakeLists.txt +++ b/tools/clearShm/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(clearShm ${clearShm_SRCS}) target_link_libraries(clearShm ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS}) -install(TARGETS clearShm DESTINATION ${ENGINE_BINDIR}) +install(TARGETS clearShm DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/cleartablelock/CMakeLists.txt b/tools/cleartablelock/CMakeLists.txt index 6d7311685..7ec0c17a2 100644 --- a/tools/cleartablelock/CMakeLists.txt +++ b/tools/cleartablelock/CMakeLists.txt @@ -12,5 +12,5 @@ add_dependencies(cleartablelock libnetsnmpmibs) target_link_libraries(cleartablelock ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS}) -install(TARGETS cleartablelock DESTINATION ${ENGINE_BINDIR}) +install(TARGETS cleartablelock DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/configMgt/CMakeLists.txt b/tools/configMgt/CMakeLists.txt index 5ee01f1cf..11e2d63e4 100644 --- a/tools/configMgt/CMakeLists.txt +++ b/tools/configMgt/CMakeLists.txt @@ -25,7 +25,7 @@ add_dependencies(autoConfigure libnetsnmpmibs) target_link_libraries(autoConfigure ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS}) -install(TARGETS autoConfigure DESTINATION ${ENGINE_BINDIR}) +install(TARGETS autoConfigure DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### diff --git a/tools/cplogger/CMakeLists.txt b/tools/cplogger/CMakeLists.txt index f80505b93..06bd1da95 100644 --- a/tools/cplogger/CMakeLists.txt +++ b/tools/cplogger/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(cplogger ${cplogger_SRCS}) target_link_libraries(cplogger ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS}) -install(TARGETS cplogger DESTINATION ${ENGINE_BINDIR}) +install(TARGETS cplogger DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/dbbuilder/CMakeLists.txt b/tools/dbbuilder/CMakeLists.txt index 0b04c9035..e48b054a8 100644 --- a/tools/dbbuilder/CMakeLists.txt +++ b/tools/dbbuilder/CMakeLists.txt @@ -12,5 +12,5 @@ add_dependencies(dbbuilder libnetsnmpmibs) target_link_libraries(dbbuilder ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS}) -install(TARGETS dbbuilder DESTINATION ${ENGINE_BINDIR}) +install(TARGETS dbbuilder DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/dbloadxml/CMakeLists.txt b/tools/dbloadxml/CMakeLists.txt index 7f68cf0af..48b636a7f 100644 --- a/tools/dbloadxml/CMakeLists.txt +++ b/tools/dbloadxml/CMakeLists.txt @@ -15,5 +15,5 @@ add_executable(colxml ${colxml_SRCS}) target_link_libraries(colxml ${ENGINE_LDFLAGS} dbload ${ENGINE_WRITE_LIBS}) -install(TARGETS colxml DESTINATION ${ENGINE_BINDIR}) +install(TARGETS colxml DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/ddlcleanup/CMakeLists.txt b/tools/ddlcleanup/CMakeLists.txt index 2d340dd1a..de44d977e 100644 --- a/tools/ddlcleanup/CMakeLists.txt +++ b/tools/ddlcleanup/CMakeLists.txt @@ -12,5 +12,5 @@ add_dependencies(ddlcleanup libnetsnmpmibs) target_link_libraries(ddlcleanup ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ddlcleanuputil) -install(TARGETS ddlcleanup DESTINATION ${ENGINE_BINDIR}) +install(TARGETS ddlcleanup DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/editem/CMakeLists.txt b/tools/editem/CMakeLists.txt index bf75b9c46..ffdc238a4 100644 --- a/tools/editem/CMakeLists.txt +++ b/tools/editem/CMakeLists.txt @@ -12,5 +12,5 @@ add_dependencies(editem libnetsnmpmibs) target_link_libraries(editem ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS}) -install(TARGETS editem DESTINATION ${ENGINE_BINDIR}) +install(TARGETS editem DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/getConfig/CMakeLists.txt b/tools/getConfig/CMakeLists.txt index cb9114017..1ee303f81 100644 --- a/tools/getConfig/CMakeLists.txt +++ b/tools/getConfig/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(getConfig ${getConfig_SRCS}) target_link_libraries(getConfig ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS}) -install(TARGETS getConfig DESTINATION ${ENGINE_BINDIR}) +install(TARGETS getConfig DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/idbmeminfo/CMakeLists.txt b/tools/idbmeminfo/CMakeLists.txt index 1666d31c0..4c9908b23 100644 --- a/tools/idbmeminfo/CMakeLists.txt +++ b/tools/idbmeminfo/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(idbmeminfo ${idbmeminfo_SRCS}) target_link_libraries(idbmeminfo ${ENGINE_LDFLAGS}) -install(TARGETS idbmeminfo DESTINATION ${ENGINE_BINDIR}) +install(TARGETS idbmeminfo DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/setConfig/CMakeLists.txt b/tools/setConfig/CMakeLists.txt index 02383838c..24be54baf 100644 --- a/tools/setConfig/CMakeLists.txt +++ b/tools/setConfig/CMakeLists.txt @@ -12,7 +12,7 @@ add_dependencies(setConfig libnetsnmpmibs) target_link_libraries(setConfig ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS}) -install(TARGETS setConfig DESTINATION ${ENGINE_BINDIR}) +install(TARGETS setConfig DESTINATION ${ENGINE_BINDIR} COMPONENT platform) -install(PROGRAMS configxml.sh DESTINATION ${ENGINE_BINDIR}) +install(PROGRAMS configxml.sh DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/viewtablelock/CMakeLists.txt b/tools/viewtablelock/CMakeLists.txt index bc6db623d..f0734f05d 100644 --- a/tools/viewtablelock/CMakeLists.txt +++ b/tools/viewtablelock/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(viewtablelock ${viewtablelock_SRCS}) target_link_libraries(viewtablelock ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS}) -install(TARGETS viewtablelock DESTINATION ${ENGINE_BINDIR}) +install(TARGETS viewtablelock DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/utils/batchloader/CMakeLists.txt b/utils/batchloader/CMakeLists.txt index 1ee5044da..d423e0083 100644 --- a/utils/batchloader/CMakeLists.txt +++ b/utils/batchloader/CMakeLists.txt @@ -12,6 +12,6 @@ add_dependencies(batchloader libnetsnmpmibs) set_target_properties(batchloader PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS batchloader DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS batchloader DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/boost_idb/CMakeLists.txt b/utils/boost_idb/CMakeLists.txt index 202a524b9..81602a970 100644 --- a/utils/boost_idb/CMakeLists.txt +++ b/utils/boost_idb/CMakeLists.txt @@ -37,5 +37,5 @@ add_library(boost_idb SHARED ${boost_idb_LIB_SRCS}) set_target_properties(boost_idb PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS boost_idb DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS boost_idb DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/cacheutils/CMakeLists.txt b/utils/cacheutils/CMakeLists.txt index 97e574700..bb8c766a6 100644 --- a/utils/cacheutils/CMakeLists.txt +++ b/utils/cacheutils/CMakeLists.txt @@ -10,5 +10,5 @@ add_library(cacheutils SHARED ${cacheutils_LIB_SRCS}) set_target_properties(cacheutils PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS cacheutils DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS cacheutils DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/common/CMakeLists.txt b/utils/common/CMakeLists.txt index b178d2462..54900167e 100644 --- a/utils/common/CMakeLists.txt +++ b/utils/common/CMakeLists.txt @@ -17,5 +17,5 @@ add_dependencies(common loggingcpp) set_target_properties(common PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS common DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS common DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/compress/CMakeLists.txt b/utils/compress/CMakeLists.txt index 276f2e92a..543f6cff9 100644 --- a/utils/compress/CMakeLists.txt +++ b/utils/compress/CMakeLists.txt @@ -16,5 +16,5 @@ add_library(compress SHARED ${compress_LIB_SRCS}) set_target_properties(compress PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS compress DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS compress DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/configcpp/CMakeLists.txt b/utils/configcpp/CMakeLists.txt index cb916d2f6..cae83c461 100644 --- a/utils/configcpp/CMakeLists.txt +++ b/utils/configcpp/CMakeLists.txt @@ -9,5 +9,5 @@ add_library(configcpp SHARED ${configcpp_LIB_SRCS}) set_target_properties(configcpp PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS configcpp DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS configcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/dataconvert/CMakeLists.txt b/utils/dataconvert/CMakeLists.txt index 713bc26c6..e9a11648d 100644 --- a/utils/dataconvert/CMakeLists.txt +++ b/utils/dataconvert/CMakeLists.txt @@ -10,4 +10,4 @@ add_library(dataconvert SHARED ${dataconvert_LIB_SRCS}) set_target_properties(dataconvert PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS dataconvert DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS dataconvert DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/ddlcleanup/CMakeLists.txt b/utils/ddlcleanup/CMakeLists.txt index 2f5d33c12..4cb8b2a7a 100644 --- a/utils/ddlcleanup/CMakeLists.txt +++ b/utils/ddlcleanup/CMakeLists.txt @@ -12,5 +12,5 @@ add_dependencies(ddlcleanuputil libnetsnmpmibs) set_target_properties(ddlcleanuputil PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS ddlcleanuputil DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS ddlcleanuputil DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/funcexp/CMakeLists.txt b/utils/funcexp/CMakeLists.txt index d13ec8050..67ede1027 100644 --- a/utils/funcexp/CMakeLists.txt +++ b/utils/funcexp/CMakeLists.txt @@ -112,6 +112,6 @@ add_dependencies(funcexp libnetsnmpmibs) set_target_properties(funcexp PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS funcexp DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS funcexp DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/idbdatafile/CMakeLists.txt b/utils/idbdatafile/CMakeLists.txt index 48ebe107b..d98aeafb9 100644 --- a/utils/idbdatafile/CMakeLists.txt +++ b/utils/idbdatafile/CMakeLists.txt @@ -20,4 +20,4 @@ add_dependencies(idbdatafile libnetsnmpmibs) set_target_properties(idbdatafile PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS idbdatafile DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS idbdatafile DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/idbhdfs/hdfs-12/CMakeLists.txt b/utils/idbhdfs/hdfs-12/CMakeLists.txt index 82436c71f..dadafc991 100644 --- a/utils/idbhdfs/hdfs-12/CMakeLists.txt +++ b/utils/idbhdfs/hdfs-12/CMakeLists.txt @@ -18,5 +18,5 @@ set_target_properties(hdfs-12 PROPERTIES VERSION 1.0.0 SOVERSION 1) install(TARGETS hdfs-12 DESTINATION ${ENGINE_LIBDIR}) -install(PROGRAMS setenv-hdfs-12 DESTINATION ${ENGINE_BINDIR}) +install(PROGRAMS setenv-hdfs-12 DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/utils/idbhdfs/hdfs-20/CMakeLists.txt b/utils/idbhdfs/hdfs-20/CMakeLists.txt index d5a369ebd..b2f71dc8b 100644 --- a/utils/idbhdfs/hdfs-20/CMakeLists.txt +++ b/utils/idbhdfs/hdfs-20/CMakeLists.txt @@ -20,5 +20,5 @@ set_target_properties(hdfs-20 PROPERTIES VERSION 1.0.0 SOVERSION 1) install(TARGETS hdfs-20 DESTINATION ${ENGINE_LIBDIR}) -install(PROGRAMS setenv-hdfs-20 DESTINATION ${ENGINE_BINDIR}) +install(PROGRAMS setenv-hdfs-20 DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/utils/joiner/CMakeLists.txt b/utils/joiner/CMakeLists.txt index 9da265a59..cc67192cf 100644 --- a/utils/joiner/CMakeLists.txt +++ b/utils/joiner/CMakeLists.txt @@ -10,6 +10,6 @@ add_library(joiner SHARED ${joiner_LIB_SRCS}) set_target_properties(joiner PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS joiner DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS joiner DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/loggingcpp/CMakeLists.txt b/utils/loggingcpp/CMakeLists.txt index a6736fbcc..d27b11e3c 100644 --- a/utils/loggingcpp/CMakeLists.txt +++ b/utils/loggingcpp/CMakeLists.txt @@ -14,13 +14,13 @@ set(loggingcpp_LIB_SRCS idberrorinfo.cpp) ADD_CUSTOM_COMMAND( - OUTPUT messageids.h errorids.h + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/messageids.h ${CMAKE_CURRENT_SOURCE_DIR}/errorids.h COMMAND ./genMsgAndErrId.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS genMsgId.pl genErrId.pl ) -ADD_CUSTOM_TARGET(genMsgAndErrId DEPENDS messageids.h errorids.h) +ADD_CUSTOM_TARGET(genMsgAndErrId DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/messageids.h ${CMAKE_CURRENT_SOURCE_DIR}/errorids.h) add_library(loggingcpp SHARED ${loggingcpp_LIB_SRCS}) @@ -28,7 +28,7 @@ add_dependencies(loggingcpp genMsgAndErrId) set_target_properties(loggingcpp PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS loggingcpp DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS loggingcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) -install(FILES MessageFile.txt ErrorMessage.txt DESTINATION ${ENGINE_ETCDIR}) +install(FILES MessageFile.txt ErrorMessage.txt DESTINATION ${ENGINE_ETCDIR} COMPONENT platform) diff --git a/utils/messageqcpp/CMakeLists.txt b/utils/messageqcpp/CMakeLists.txt index 5359396bc..25c3fa251 100644 --- a/utils/messageqcpp/CMakeLists.txt +++ b/utils/messageqcpp/CMakeLists.txt @@ -15,4 +15,4 @@ add_library(messageqcpp SHARED ${messageqcpp_LIB_SRCS}) set_target_properties(messageqcpp PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS messageqcpp DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS messageqcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/mysqlcl_idb/CMakeLists.txt b/utils/mysqlcl_idb/CMakeLists.txt index 574ce95b2..0ef0b5f97 100644 --- a/utils/mysqlcl_idb/CMakeLists.txt +++ b/utils/mysqlcl_idb/CMakeLists.txt @@ -23,5 +23,5 @@ add_library(mysqlcl_idb SHARED ${mysqlcl_idb_LIB_SRCS}) set_target_properties(mysqlcl_idb PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS mysqlcl_idb DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS mysqlcl_idb DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/querystats/CMakeLists.txt b/utils/querystats/CMakeLists.txt index bb3975cef..940749a6b 100644 --- a/utils/querystats/CMakeLists.txt +++ b/utils/querystats/CMakeLists.txt @@ -10,5 +10,5 @@ add_library(querystats SHARED ${querystats_LIB_SRCS}) set_target_properties(querystats PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS querystats DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS querystats DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/querytele/CMakeLists.txt b/utils/querytele/CMakeLists.txt index 2ab3e8c6d..404c3fc73 100644 --- a/utils/querytele/CMakeLists.txt +++ b/utils/querytele/CMakeLists.txt @@ -16,5 +16,5 @@ add_library(querytele SHARED ${querytele_LIB_SRCS}) set_target_properties(querytele PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS querytele DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS querytele DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/rowgroup/CMakeLists.txt b/utils/rowgroup/CMakeLists.txt index f89ba8a09..b663df174 100644 --- a/utils/rowgroup/CMakeLists.txt +++ b/utils/rowgroup/CMakeLists.txt @@ -14,5 +14,5 @@ add_dependencies(rowgroup libnetsnmpmibs) set_target_properties(rowgroup PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS rowgroup DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS rowgroup DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/rwlock/CMakeLists.txt b/utils/rwlock/CMakeLists.txt index c29926ee0..a6201d40f 100644 --- a/utils/rwlock/CMakeLists.txt +++ b/utils/rwlock/CMakeLists.txt @@ -11,5 +11,5 @@ add_library(rwlock SHARED ${rwlock_LIB_SRCS}) set_target_properties(rwlock PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS rwlock DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS rwlock DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/threadpool/CMakeLists.txt b/utils/threadpool/CMakeLists.txt index c75958b8d..47a09d88b 100644 --- a/utils/threadpool/CMakeLists.txt +++ b/utils/threadpool/CMakeLists.txt @@ -10,4 +10,4 @@ add_library(threadpool SHARED ${threadpool_LIB_SRCS}) set_target_properties(threadpool PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS threadpool DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS threadpool DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/thrift/CMakeLists.txt b/utils/thrift/CMakeLists.txt index a335afaae..1521cb617 100644 --- a/utils/thrift/CMakeLists.txt +++ b/utils/thrift/CMakeLists.txt @@ -18,5 +18,5 @@ add_library(thrift SHARED ${thrift_LIB_SRCS}) set_target_properties(thrift PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS thrift DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS thrift DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/udfsdk/CMakeLists.txt b/utils/udfsdk/CMakeLists.txt index 71354d589..69479798b 100644 --- a/utils/udfsdk/CMakeLists.txt +++ b/utils/udfsdk/CMakeLists.txt @@ -1,9 +1,7 @@ include_directories( ${ENGINE_COMMON_INCLUDES} - ../../dbcon/mysql - ../../mysql/include - ../../mysql/sql - ../../mysql/regex ) + ../../dbcon/mysql ) + ########### next target ############### set(udfsdk_LIB_SRCS udfinfinidb.cpp) @@ -16,3 +14,13 @@ set_target_properties(udfsdk PROPERTIES VERSION 1.0.0 SOVERSION 1) install(TARGETS udfsdk DESTINATION ${ENGINE_LIBDIR}) + + +set(udf_mysql_LIB_SRCS udfmysql.cpp) + +add_library(udf_mysql SHARED ${udf_mysql_LIB_SRCS}) + +set_target_properties(udf_mysql PROPERTIES VERSION 1.0.0 SOVERSION 1) + +install(TARGETS udf_mysql DESTINATION ${ENGINE_LIBDIR}) + diff --git a/utils/windowfunction/CMakeLists.txt b/utils/windowfunction/CMakeLists.txt index ec1be152a..3482ad776 100644 --- a/utils/windowfunction/CMakeLists.txt +++ b/utils/windowfunction/CMakeLists.txt @@ -27,5 +27,5 @@ add_library(windowfunction SHARED ${windowfunction_LIB_SRCS}) set_target_properties(windowfunction PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS windowfunction DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS windowfunction DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/versioning/BRM/CMakeLists.txt b/versioning/BRM/CMakeLists.txt index 32f98e44c..482fe2159 100644 --- a/versioning/BRM/CMakeLists.txt +++ b/versioning/BRM/CMakeLists.txt @@ -36,7 +36,7 @@ set_target_properties(brm PROPERTIES VERSION 1.0.0 SOVERSION 1) add_dependencies(brm libnetsnmpmibs) -install(TARGETS brm DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS brm DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) ########### next target ############### @@ -49,7 +49,7 @@ add_dependencies(controllernode libnetsnmpmibs) target_link_libraries(controllernode ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${ENGINE_NETSNMP_LIBS}) -install(TARGETS controllernode DESTINATION ${ENGINE_BINDIR}) +install(TARGETS controllernode DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -62,7 +62,7 @@ add_dependencies(workernode libnetsnmpmibs) target_link_libraries(workernode ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${ENGINE_NETSNMP_LIBS}) -install(TARGETS workernode DESTINATION ${ENGINE_BINDIR}) +install(TARGETS workernode DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -73,7 +73,7 @@ add_executable(dbrmctl ${dbrmctl_SRCS}) target_link_libraries(dbrmctl ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${ENGINE_NETSNMP_LIBS}) -install(TARGETS dbrmctl DESTINATION ${ENGINE_BINDIR}) +install(TARGETS dbrmctl DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -84,7 +84,7 @@ add_executable(reset_locks ${reset_locks_SRCS}) target_link_libraries(reset_locks ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${ENGINE_NETSNMP_LIBS}) -install(TARGETS reset_locks DESTINATION ${ENGINE_BINDIR}) +install(TARGETS reset_locks DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -95,7 +95,7 @@ add_executable(rollback ${rollback_SRCS}) target_link_libraries(rollback ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${ENGINE_NETSNMP_LIBS}) -install(TARGETS rollback DESTINATION ${ENGINE_BINDIR}) +install(TARGETS rollback DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -106,7 +106,7 @@ add_executable(save_brm ${save_brm_SRCS}) target_link_libraries(save_brm ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${ENGINE_NETSNMP_LIBS}) -install(TARGETS save_brm DESTINATION ${ENGINE_BINDIR}) +install(TARGETS save_brm DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -117,5 +117,5 @@ add_executable(load_brm ${load_brm_SRCS}) target_link_libraries(load_brm ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${ENGINE_NETSNMP_LIBS}) -install(TARGETS load_brm DESTINATION ${ENGINE_BINDIR}) +install(TARGETS load_brm DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/writeengine/bulk/CMakeLists.txt b/writeengine/bulk/CMakeLists.txt index 5817be886..9fd08c107 100644 --- a/writeengine/bulk/CMakeLists.txt +++ b/writeengine/bulk/CMakeLists.txt @@ -40,5 +40,5 @@ add_dependencies(cpimport.bin libnetsnmpmibs) target_link_libraries(cpimport.bin ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} we_bulk we_xml) -install(TARGETS cpimport.bin DESTINATION ${ENGINE_BINDIR}) +install(TARGETS cpimport.bin DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/writeengine/client/CMakeLists.txt b/writeengine/client/CMakeLists.txt index 12c2a20ed..3b0019ab4 100644 --- a/writeengine/client/CMakeLists.txt +++ b/writeengine/client/CMakeLists.txt @@ -12,6 +12,6 @@ add_dependencies(writeengineclient libnetsnmpmibs) set_target_properties(writeengineclient PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS writeengineclient DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS writeengineclient DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/writeengine/redistribute/CMakeLists.txt b/writeengine/redistribute/CMakeLists.txt index 410f1f18e..7ab78cb48 100644 --- a/writeengine/redistribute/CMakeLists.txt +++ b/writeengine/redistribute/CMakeLists.txt @@ -15,5 +15,5 @@ add_dependencies(writeengineredistribute libnetsnmpmibs) set_target_properties(writeengineredistribute PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS writeengineredistribute DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS writeengineredistribute DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/writeengine/server/CMakeLists.txt b/writeengine/server/CMakeLists.txt index 1696d24b3..5d4eeb0a5 100644 --- a/writeengine/server/CMakeLists.txt +++ b/writeengine/server/CMakeLists.txt @@ -22,5 +22,5 @@ add_dependencies(WriteEngineServer libnetsnmpmibs) target_link_libraries(WriteEngineServer ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} threadpool writeengineredistribute) -install(TARGETS WriteEngineServer DESTINATION ${ENGINE_BINDIR}) +install(TARGETS WriteEngineServer DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/writeengine/splitter/CMakeLists.txt b/writeengine/splitter/CMakeLists.txt index 06766cb0d..a404e78ab 100644 --- a/writeengine/splitter/CMakeLists.txt +++ b/writeengine/splitter/CMakeLists.txt @@ -21,5 +21,5 @@ add_dependencies(cpimport libnetsnmpmibs) target_link_libraries(cpimport ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} batchloader threadpool) -install(TARGETS cpimport DESTINATION ${ENGINE_BINDIR}) +install(TARGETS cpimport DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/writeengine/wrapper/CMakeLists.txt b/writeengine/wrapper/CMakeLists.txt index f700a3078..933865515 100644 --- a/writeengine/wrapper/CMakeLists.txt +++ b/writeengine/wrapper/CMakeLists.txt @@ -43,5 +43,5 @@ add_dependencies(writeengine libnetsnmpmibs) set_target_properties(writeengine PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS writeengine DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS writeengine DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) From 94cc3c1f5b10c90cf76971a4b17173e4d2a48344 Mon Sep 17 00:00:00 2001 From: Ben Thompson Date: Thu, 22 Sep 2016 11:49:22 -0400 Subject: [PATCH 12/12] Add udf_mysql and udfsdk to RPM --- utils/udfsdk/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/udfsdk/CMakeLists.txt b/utils/udfsdk/CMakeLists.txt index 69479798b..5e4428cd9 100644 --- a/utils/udfsdk/CMakeLists.txt +++ b/utils/udfsdk/CMakeLists.txt @@ -12,7 +12,7 @@ add_library(udfsdk SHARED ${udfsdk_LIB_SRCS}) set_target_properties(udfsdk PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS udfsdk DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS udfsdk DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) @@ -22,5 +22,5 @@ add_library(udf_mysql SHARED ${udf_mysql_LIB_SRCS}) set_target_properties(udf_mysql PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS udf_mysql DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS udf_mysql DESTINATION ${ENGINE_LIBDIR} COMPONENT storage-engine)