diff options
| author | Stan Grishin <stangri@melmac.ca> | 2022-10-24 21:39:06 +0000 |
|---|---|---|
| committer | Stan Grishin <stangri@melmac.ca> | 2022-10-24 21:46:51 +0000 |
| commit | 61ca2f4d16464a34e638806bd3b9d801d6446b35 (patch) | |
| tree | 2e3e7574d06f202e50236aa15887f57f1a7434cd /net/https-dns-proxy/patches | |
| parent | 8f6831b64b89243e7c1be5948f33e6737f7ddfc3 (diff) | |
https-dns-proxy: add version information to binary
* add patches/020-cmakelists-add-version.patch (thanks @baranyaib90)
to add version information to the binary and fix https://github.com/aarond10/https_dns_proxy/issues/149
* modify Makefile to add version information for the binary
* rename patches/010-fix-cmakelists.patch for better readability
* revert back to service restart in WAN/WAN6 trigger
* update test.sh to test both init script and binary versions
Signed-off-by: Stan Grishin <stangri@melmac.ca>
Diffstat (limited to 'net/https-dns-proxy/patches')
| -rw-r--r-- | net/https-dns-proxy/patches/010-cmakelists-remove-cflags.patch (renamed from net/https-dns-proxy/patches/010-fix-cmakelists.patch) | 0 | ||||
| -rw-r--r-- | net/https-dns-proxy/patches/020-cmakelists-add-version.patch | 51 |
2 files changed, 51 insertions, 0 deletions
diff --git a/net/https-dns-proxy/patches/010-fix-cmakelists.patch b/net/https-dns-proxy/patches/010-cmakelists-remove-cflags.patch index a765a5bbd..a765a5bbd 100644 --- a/net/https-dns-proxy/patches/010-fix-cmakelists.patch +++ b/net/https-dns-proxy/patches/010-cmakelists-remove-cflags.patch diff --git a/net/https-dns-proxy/patches/020-cmakelists-add-version.patch b/net/https-dns-proxy/patches/020-cmakelists-add-version.patch new file mode 100644 index 000000000..8debfe94f --- /dev/null +++ b/net/https-dns-proxy/patches/020-cmakelists-add-version.patch @@ -0,0 +1,51 @@ +From 2ca80486ba6a4e5acbdf0ff581d9754af17fa33b Mon Sep 17 00:00:00 2001 +From: baranyaib90 <5031516+baranyaib90@users.noreply.github.com> +Date: Mon, 24 Oct 2022 22:53:37 +0200 +Subject: [PATCH] Allow external setting of GIT_VERSION + +--- + CMakeLists.txt | 34 ++++++++++++++++++---------------- + 1 file changed, 18 insertions(+), 16 deletions(-) + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,22 +36,24 @@ endif() + + # VERSION + +-find_package(Git) +-if(Git_FOUND) +- execute_process( +- COMMAND "${GIT_EXECUTABLE}" show --date=format:%Y.%m.%d --format=%ad-%h --no-patch +- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" +- OUTPUT_VARIABLE GIT_VERSION +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- message(STATUS "Version: ${GIT_VERSION}") ++if(NOT GIT_VERSION) ++ find_package(Git) ++ if(Git_FOUND) ++ execute_process( ++ COMMAND "${GIT_EXECUTABLE}" show --date=format:%Y.%m.%d --format=%ad-%h --no-patch ++ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" ++ OUTPUT_VARIABLE GIT_VERSION ++ OUTPUT_STRIP_TRAILING_WHITESPACE) ++ message(STATUS "Version: ${GIT_VERSION}") + +- # May not update version in some cases (example: git commit --amend) +- set_property(GLOBAL APPEND +- PROPERTY CMAKE_CONFIGURE_DEPENDS +- "${CMAKE_SOURCE_DIR}/.git/index") +-else() +- set(GIT_VERSION "UNKNOWN") +- message(WARNING "Could not find git command! Version is set to: ${GIT_VERSION}") ++ # May not update version in some cases (example: git commit --amend) ++ set_property(GLOBAL APPEND ++ PROPERTY CMAKE_CONFIGURE_DEPENDS ++ "${CMAKE_SOURCE_DIR}/.git/index") ++ else() ++ set(GIT_VERSION "UNKNOWN") ++ message(WARNING "Could not find git command! Version is set to: ${GIT_VERSION}") ++ endif() + endif() + + # LIBRARY DEPENDENCIES |
