Source: fckit
Version: 0.9.0-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
fckit could not be built reproducibly.

This is because it embeds the build path in various places, including
in the "--usage" help message. Not sure if the CMake file is even
useful in the binary package, so that might be something to confirm
before patching it.

Anyway, patch attached that makes the build (mostly) reproducible; the
rest of the unreproducibility is due to the Fortran toolchain, such as
assertions in the binary and in dh-fortran-mod (addressed in #965255).

 [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   2020-10-17 11:12:34.597243518 
+0100
@@ -0,0 +1,41 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2020-10-17
+
+--- fckit-0.9.0.orig/fckit-import.cmake.in
++++ fckit-0.9.0/fckit-import.cmake.in
+@@ -6,14 +6,9 @@
+ # granted to it by virtue of its status as an intergovernmental organisation 
nor
+ # does it submit to any jurisdiction.
+ 
+-if( @PROJECT_NAME@_IS_BUILD_DIR_EXPORT )
+-  set( FCTEST_GENERATOR @PYTHON_EXECUTABLE@ 
@CMAKE_CURRENT_SOURCE_DIR@/tools/fctest-generate-runner.py )
+-  set( FYPP @CMAKE_CURRENT_SOURCE_DIR@/tools/fckit-eval.sh 
@PYTHON_EXECUTABLE@ @CMAKE_CURRENT_SOURCE_DIR@/tools/fckit-fypp.py )
+-else()
+-  set( FCKIT_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/../../.. )
+-  set( FCTEST_GENERATOR @PYTHON_EXECUTABLE@ 
${FCKIT_INSTALL_PREFIX}/libexec/fctest-generate-runner.py )
+-  set( FYPP ${FCKIT_INSTALL_PREFIX}/libexec/fckit-eval.sh @PYTHON_EXECUTABLE@ 
${FCKIT_INSTALL_PREFIX}/libexec/fckit-fypp.py )
+-endif()
++set( FCKIT_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/../../.. )
++set( FCTEST_GENERATOR @PYTHON_EXECUTABLE@ 
${FCKIT_INSTALL_PREFIX}/libexec/fctest-generate-runner.py )
++set( FYPP ${FCKIT_INSTALL_PREFIX}/libexec/fckit-eval.sh @PYTHON_EXECUTABLE@ 
${FCKIT_INSTALL_PREFIX}/libexec/fckit-fypp.py )
+ 
+ @FCKIT_PREPROCESS_FYPP@
+ 
+--- fckit-0.9.0.orig/src/apps/fckit.in
++++ fckit-0.9.0/src/apps/fckit.in
+@@ -42,14 +42,10 @@ info()
+   echo ""
+   echo "Build:"
+   echo "  build type      : @CMAKE_BUILD_TYPE@"
+-  echo "  timestamp       : @EC_BUILD_TIMESTAMP@"
+   echo "  op. system      : @CMAKE_SYSTEM@ (@EC_OS_NAME@.@EC_OS_BITS@)"
+   echo "  processor       : @CMAKE_SYSTEM_PROCESSOR@"
+-  echo "  sources         : @PROJECT_SOURCE_DIR@"
+   echo "  c++ compiler    : @CMAKE_CXX_COMPILER_ID@ 
@CMAKE_CXX_COMPILER_VERSION@"
+-  echo "    flags         : @EC_CXX_FLAGS@"
+   echo "  fortran compiler: @CMAKE_Fortran_COMPILER_ID@ 
@CMAKE_Fortran_COMPILER_VERSION@"
+-  echo "    flags         : @EC_Fortran_FLAGS@"
+   echo ""
+   echo "Features:"
+   echo "  MPI             : $(print_feature @eckit_HAVE_MPI@)"
--- a/debian/patches/series     2020-10-17 10:42:19.834474336 +0100
--- b/debian/patches/series     2020-10-17 11:12:33.485228123 +0100
@@ -1,2 +1,3 @@
 shared_lib.patch
 paths.patch
+reproducible_build.patch

Reply via email to