2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-22 09:57:41 +00:00

[#3254] show premium source in extended version

This commit is contained in:
Andrei Pavel 2024-03-22 14:25:14 +02:00
parent 11d636c074
commit a764025dfd
No known key found for this signature in database
GPG Key ID: D4E804481939CB21
6 changed files with 24 additions and 17 deletions

View File

@ -147,6 +147,9 @@ AC_SUBST(PREMIUM_DIR)
AC_SUBST(DISTCHECK_PREMIUM_CONFIGURE_FLAG)
AX_PREMIUM
# Export PREMIUM to kea_version.h.
AC_SUBST(PREMIUM)
# Include contrib configuration
# (currently only a provision copied from premium support)
CONTRIB_DIR=

View File

@ -1,2 +1,3 @@
#define EXTENDED_VERSION "@KEA_SRCID@"
#define PREMIUM_EXTENDED_VERSION "@PREMIUM@"
#define PACKAGE_VERSION_TYPE "@PACKAGE_VERSION_TYPE@"

View File

@ -4833,17 +4833,18 @@ Dhcpv4Srv::getVersion(bool extended) {
tmp << VERSION;
if (extended) {
tmp << endl << EXTENDED_VERSION << endl;
tmp << "premium: " << PREMIUM_EXTENDED_VERSION << endl;
tmp << "linked with:" << endl;
tmp << Logger::getVersion() << endl;
tmp << CryptoLink::getVersion() << endl;
tmp << "database:" << endl;
tmp << "- " << Logger::getVersion() << endl;
tmp << "- " << CryptoLink::getVersion() << endl;
tmp << "backends:" << endl;
#ifdef HAVE_MYSQL
tmp << MySqlLeaseMgr::getDBVersion() << endl;
tmp << "- " << MySqlLeaseMgr::getDBVersion() << endl;
#endif
#ifdef HAVE_PGSQL
tmp << PgSqlLeaseMgr::getDBVersion() << endl;
tmp << "- " << PgSqlLeaseMgr::getDBVersion() << endl;
#endif
tmp << Memfile_LeaseMgr::getDBVersion(Memfile_LeaseMgr::V4);
tmp << "- " << Memfile_LeaseMgr::getDBVersion(Memfile_LeaseMgr::V4);
// @todo: more details about database runtime
}

View File

@ -4654,17 +4654,18 @@ Dhcpv6Srv::getVersion(bool extended) {
tmp << VERSION;
if (extended) {
tmp << endl << EXTENDED_VERSION << endl;
tmp << "premium: " << PREMIUM_EXTENDED_VERSION << endl;
tmp << "linked with:" << endl;
tmp << Logger::getVersion() << endl;
tmp << CryptoLink::getVersion() << endl;
tmp << "database:" << endl;
tmp << "- " << Logger::getVersion() << endl;
tmp << "- " << CryptoLink::getVersion() << endl;
tmp << "backends:" << endl;
#ifdef HAVE_MYSQL
tmp << MySqlLeaseMgr::getDBVersion() << endl;
tmp << "- " << MySqlLeaseMgr::getDBVersion() << endl;
#endif
#ifdef HAVE_PGSQL
tmp << PgSqlLeaseMgr::getDBVersion() << endl;
tmp << "- " << PgSqlLeaseMgr::getDBVersion() << endl;
#endif
tmp << Memfile_LeaseMgr::getDBVersion(Memfile_LeaseMgr::V6);
tmp << "- " << Memfile_LeaseMgr::getDBVersion(Memfile_LeaseMgr::V6);
// @todo: more details about database runtime
}

View File

@ -328,12 +328,12 @@ LFCController::getVersion(const bool extended) const{
} else if (protocol_version_ == 6) {
db_version = Memfile_LeaseMgr::getDBVersion(Memfile_LeaseMgr::V6);
}
version_stream << std::endl << EXTENDED_VERSION;
if (!db_version.empty()) {
db_version = "database: " + db_version;
db_version = "backend: " + db_version;
version_stream << std::endl << db_version;
}
version_stream << std::endl
<< EXTENDED_VERSION << std::endl
<< db_version;
}
return (version_stream.str());

View File

@ -864,8 +864,9 @@ DControllerBase::getVersion(bool extended) {
tmp << VERSION;
if (extended) {
tmp << std::endl << EXTENDED_VERSION << std::endl;
tmp << "premium: " << PREMIUM_EXTENDED_VERSION << std::endl;
tmp << "linked with:" << std::endl;
tmp << isc::log::Logger::getVersion() << std::endl;
tmp << "- " << isc::log::Logger::getVersion() << std::endl;
tmp << getVersionAddendum();
}