Source: pg-gvm Version: 22.6.2-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: filesystem X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that pg-gvm could not be built reproducibly. This is because it iterated over input files in the underlying (i.e. nondeterministic) filesystem order. A patch is attached that uses sort(1) to sort them, ensuring that it will work irrespective of the current locale and whether there are spaces in the build path. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible-build.patch 2024-04-01 10:17:16.629152522 +0100 @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2024-04-01 + +--- pg-gvm-22.6.2.orig/CMakeLists.txt ++++ pg-gvm-22.6.2/CMakeLists.txt +@@ -175,7 +175,7 @@ add_custom_command( + OUTPUT ${SQLOUT} + COMMAND mkdir -p ${CMAKE_BINARY_DIR}/sqlin + COMMAND cp ${SQL} ${CMAKE_BINARY_DIR}/sqlin/ +- COMMAND cd ${CMAKE_BINARY_DIR}/sqlin/ && find -type f | xargs cat > ${CMAKE_BINARY_DIR}/${SQLOUT} ++ COMMAND cd ${CMAKE_BINARY_DIR}/sqlin/ && find -type f -print0 | LC_ALL=C sort -z | xargs -0 cat > ${CMAKE_BINARY_DIR}/${SQLOUT} + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + DEPENDS ${SQL}) + --- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/series 2024-04-01 10:17:15.685149789 +0100 @@ -0,0 +1 @@ +reproducible-build.patch