From 8b731b8d06b710ce25dcef8134db30e1389dd92f Mon Sep 17 00:00:00 2001 From: "Randall S. Becker" Date: Wed, 19 Jun 2024 13:24:21 -0400 Subject: [PATCH 1/3] version: --build-options reports OpenSSL version information This change uses the OpenSSL supplied OPENSSL_VERSION_TEXT #define supplied for this purpose by that project. If the #define is not present, the version is not reported. Signed-off-by: Randall S. Becker Signed-off-by: Junio C Hamano --- help.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/help.c b/help.c index 1d057aa607..ce55aaa2c0 100644 --- a/help.c +++ b/help.c @@ -757,6 +757,9 @@ void get_version_info(struct strbuf *buf, int show_build_options) if (fsmonitor_ipc__is_supported()) strbuf_addstr(buf, "feature: fsmonitor--daemon\n"); +#if defined OPENSSL_VERSION_TEXT + strbuf_addf(buf, "OpenSSL: %s\n", OPENSSL_VERSION_TEXT); +#endif } } From 2e2203163df8640a9c66de663fd6337ceee710c8 Mon Sep 17 00:00:00 2001 From: "Randall S. Becker" Date: Fri, 21 Jun 2024 14:09:46 -0400 Subject: [PATCH 2/3] version: teach --build-options to reports libcurl version information Show LIBCURL_VERSION, if defined, in "git version --build-options" output. Signed-off-by: Randall S. Becker Signed-off-by: Junio C Hamano --- help.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/help.c b/help.c index ce55aaa2c0..92bfef140b 100644 --- a/help.c +++ b/help.c @@ -15,6 +15,10 @@ #include "prompt.h" #include "fsmonitor-ipc.h" +#ifndef NO_CURL +#include "git-curl-compat.h" /* For LIBCURL_VERSION only */ +#endif + struct category_description { uint32_t category; const char *desc; @@ -757,6 +761,9 @@ void get_version_info(struct strbuf *buf, int show_build_options) if (fsmonitor_ipc__is_supported()) strbuf_addstr(buf, "feature: fsmonitor--daemon\n"); +#if defined LIBCURL_VERSION + strbuf_addf(buf, "libcurl: %s\n", LIBCURL_VERSION); +#endif #if defined OPENSSL_VERSION_TEXT strbuf_addf(buf, "OpenSSL: %s\n", OPENSSL_VERSION_TEXT); #endif From 57139818bf076e7231ddae446f5647407b167ea2 Mon Sep 17 00:00:00 2001 From: "Randall S. Becker" Date: Fri, 21 Jun 2024 14:09:47 -0400 Subject: [PATCH 3/3] version: teach --build-options to reports zlib version information Show ZLIB_VERSION, if defined, in "git version --build-options" output. Signed-off-by: Randall S. Becker Signed-off-by: Junio C Hamano --- help.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/help.c b/help.c index 92bfef140b..84770b3571 100644 --- a/help.c +++ b/help.c @@ -766,6 +766,9 @@ void get_version_info(struct strbuf *buf, int show_build_options) #endif #if defined OPENSSL_VERSION_TEXT strbuf_addf(buf, "OpenSSL: %s\n", OPENSSL_VERSION_TEXT); +#endif +#if defined ZLIB_VERSION + strbuf_addf(buf, "zlib: %s\n", ZLIB_VERSION); #endif } }