From: Stephen Kitt Date: Tue, 18 Dec 2018 08:20:55 +0000 (+0000) Subject: Avoid storing non-reproducible information X-Git-Tag: archive/raspbian/3.6-1+rpi1~1^2^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0f8d759afd1dd4f78cacb1d30b41fe6b54442009;p=lgogdownloader.git Avoid storing non-reproducible information This drops git information as well as the build architecture (from the user agent). The former varies depending on the availability of git tools, the latter varies depending on the build host. Gbp-Pq: Name reproducible.patch --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c6389b8..f42d900 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,46 +51,9 @@ file(GLOB SRC_FILES src/ziputil.cpp ) -set(GIT_CHECKOUT FALSE) -if(EXISTS ${PROJECT_SOURCE_DIR}/.git) - if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow) - find_package(Git) - if(GIT_FOUND) - set(GIT_CHECKOUT TRUE) - else(GIT_FOUND) - message(WARNING "Git executable not found") - endif(GIT_FOUND) - else(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow) - message(STATUS "Shallow Git clone detected, not attempting to retrieve version info") - endif(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow) -endif(EXISTS ${PROJECT_SOURCE_DIR}/.git) - -if(GIT_CHECKOUT) - execute_process(COMMAND ${GIT_EXECUTABLE} diff --shortstat - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE GIT_SHORTSTAT - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE GIT_REV_PARSE - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if(GIT_SHORTSTAT) - set(GIT_DIRTY ON) - endif(GIT_SHORTSTAT) - - if(GIT_DIRTY) - set(PROJECT_VERSION_MINOR ${PROJECT_VERSION_MINOR}M) - endif(GIT_DIRTY) - - set(PROJECT_VERSION_PATCH ${GIT_REV_PARSE}) - set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) -endif(GIT_CHECKOUT) - set(VERSION_NUMBER ${PROJECT_VERSION}) set(VERSION_STRING "LGOGDownloader ${VERSION_NUMBER}") -set(DEFAULT_USER_AGENT "LGOGDownloader/${VERSION_NUMBER} (${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR})") +set(DEFAULT_USER_AGENT "LGOGDownloader/${VERSION_NUMBER}") add_definitions(-D_FILE_OFFSET_BITS=64 -DVERSION_NUMBER="${VERSION_NUMBER}" -DVERSION_STRING="${VERSION_STRING}" -DDEFAULT_USER_AGENT="${DEFAULT_USER_AGENT}")