Source: poti Version: 4.2-1 Severity: wishlist Tags: patch User: [email protected] Usertags: randomness X-Debbugs-Cc: [email protected]
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that poti could not be built reproducibly. This is due to missing .git/ directory, but we might as well make this fallback nicely if Git itself is not available either. Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` [email protected] / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.diff 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible-build.diff 2017-04-12 19:41:40.927523511 +0100 @@ -0,0 +1,17 @@ +Description: Make the build reproducible +Author: Chris Lamb <[email protected]> +Last-Update: 2017-04-12 + +--- poti-4.2.orig/CMakeLists.txt ++++ poti-4.2/CMakeLists.txt +@@ -16,8 +16,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + PROJECT(poti) + SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") + +-EXEC_PROGRAM("git --git-dir=${PROJECT_SOURCE_DIR}/.git log --oneline -1" OUTPUT_VARIABLE "POTI_GITVERSION") +-EXEC_PROGRAM("git --git-dir=${PROJECT_SOURCE_DIR}/.git log -n 1 --format=%ai" OUTPUT_VARIABLE "POTI_GITDATE") ++EXEC_PROGRAM("git --git-dir=${PROJECT_SOURCE_DIR}/.git log --oneline -1 2>/dev/null || echo '(unknown)'" OUTPUT_VARIABLE "POTI_GITVERSION") ++EXEC_PROGRAM("git --git-dir=${PROJECT_SOURCE_DIR}/.git log -n 1 --format=%ai 2>/dev/null || echo '(unknown)'" OUTPUT_VARIABLE "POTI_GITDATE") + + SET(CMAKE_C_FLAGS "-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror ") + --- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/series 2017-04-12 19:39:15.210922005 +0100 @@ -0,0 +1 @@ +reproducible-build.diff

