]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Synchronize used library versions reporting functions
authorAram Sargsyan <aram@isc.org>
Tue, 5 Sep 2023 15:41:42 +0000 (15:41 +0000)
committerOndřej Surý <ondrej@isc.org>
Tue, 5 Sep 2023 16:47:29 +0000 (18:47 +0200)
There are libraries which are reported in printversion(), but not
reported in setup(). Synchronize the functions, so that the log
file could have the same information as reported by the 'named -V'
command execution.

bin/named/main.c

index de431903930eb0733af09a69b5e82fae2f80857f..0e427a8b0e4e51b7f0a4393cf9c45ca61319a845 100644 (file)
@@ -1196,6 +1196,9 @@ setup(void) {
        isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
                      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
                      "linked to libuv version: %s", uv_version_string());
+       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+                     "compiled with %s version: %s", RCU_FLAVOR, RCU_VERSION);
 #if defined(JEMALLOC_VERSION)
        isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
                      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
@@ -1207,6 +1210,16 @@ setup(void) {
                      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
                      "compiled with system jemalloc version: %u", M_VERSION);
 #endif
+#if HAVE_LIBNGHTTP2
+       nghttp2_info *nginfo = NULL;
+       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+                     "compiled with libnghttp2 version: %s", NGHTTP2_VERSION);
+       nginfo = nghttp2_version(1);
+       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+                     "linked to libnghttp2 version: %s", nginfo->version_str);
+#endif
 #ifdef HAVE_LIBXML2
        isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
                      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
@@ -1232,6 +1245,21 @@ setup(void) {
                      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
                      "linked to zlib version: %s", zlibVersion());
 #endif /* if defined(HAVE_ZLIB) && defined(ZLIB_VERSION) */
+#if defined(HAVE_GEOIP2)
+       /* Unfortunately, no version define on link time */
+       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+                     "linked to maxminddb version: %s", MMDB_lib_version());
+#endif /* if defined(HAVE_GEOIP2) */
+#if defined(HAVE_DNSTAP)
+       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+                     "compiled with protobuf-c version: %s",
+                     PROTOBUF_C_VERSION);
+       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+                     "linked to protobuf-c version: %s", protobuf_c_version());
+#endif /* if defined(HAVE_DNSTAP) */
        isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
                      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
                      "----------------------------------------------------");