diff options
author | Gerard Ryan <G.M0N3Y.2503@gmail.com> | 2020-11-08 12:09:36 +1000 |
---|---|---|
committer | Daniel Golle <dangowrt@users.noreply.github.com> | 2020-12-15 12:52:33 +0000 |
commit | f8a9c3d82af2f7ebf50f8293b0ed3e4d225a7baf (patch) | |
tree | 701d7d6b77868c5c2620457c0987e5059da91377 /utils/tini/patches | |
parent | 9cfaa96bcf223ac3adca28f10faac820460f617b (diff) |
tini: Updated to v0.19.0 for dockerd
* Removed obsolete workaround
* Set Git source hash for executables to display
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
Diffstat (limited to 'utils/tini/patches')
-rw-r--r-- | utils/tini/patches/001-override-git-version.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/utils/tini/patches/001-override-git-version.patch b/utils/tini/patches/001-override-git-version.patch new file mode 100644 index 000000000..e1870d079 --- /dev/null +++ b/utils/tini/patches/001-override-git-version.patch @@ -0,0 +1,70 @@ +commit 31b0908a5eff3926195670beecc8548c429ceff5 +Author: Gerard Ryan <G.M0N3Y.2503@gmail.com> +Date: Sat Oct 31 16:53:39 2020 +1000 + + Added support for setting git version externally + * This to help when building from source snapshots + that don't have the .git file structure. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 332b361..3f6f44b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,27 +13,37 @@ if(MINIMAL) + add_definitions(-DTINI_MINIMAL=1) + endif() + +-# Extract git version and dirty-ness +-execute_process ( +- COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" log -n 1 --date=local --pretty=format:%h +- WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" +- RESULT_VARIABLE git_version_check_ret +- OUTPUT_VARIABLE tini_VERSION_GIT +-) +- +-execute_process( +- COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" status --porcelain --untracked-files=no +- WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" +- OUTPUT_VARIABLE git_dirty_check_out +-) +- +-if("${git_version_check_ret}" EQUAL 0) +- set(tini_VERSION_GIT " - git.${tini_VERSION_GIT}") +- if(NOT "${git_dirty_check_out}" STREQUAL "") +- set(tini_VERSION_GIT "${tini_VERSION_GIT}-dirty") +- endif() ++# Set the git version ++if (NOT "${TINI_VERSION_GIT}" STREQUAL "") ++ # Set by the user directly ++ set(tini_VERSION_GIT "${TINI_VERSION_GIT}") + else() +- set(tini_VERSION_GIT "") ++ # Extract git version ++ execute_process ( ++ COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" log -n 1 --date=local --pretty=format:%h ++ WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" ++ RESULT_VARIABLE git_version_check_ret ++ OUTPUT_VARIABLE tini_VERSION_GIT ++ ) ++ ++ if("${git_version_check_ret}" EQUAL 0) ++ # Extract git dirty-ness ++ execute_process( ++ COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" status --porcelain --untracked-files=no ++ WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" ++ OUTPUT_VARIABLE git_dirty_check_out ++ ) ++ ++ if(NOT "${git_dirty_check_out}" STREQUAL "") ++ set(tini_VERSION_GIT "${tini_VERSION_GIT}-dirty") ++ endif() ++ else() ++ set(tini_VERSION_GIT "") ++ endif() ++endif() ++ ++if(NOT ${tini_VERSION_GIT} STREQUAL "") ++ set(tini_VERSION_GIT " - git.${tini_VERSION_GIT}") + endif() + + # Flags |