Source: libcerf
Version: 2.3-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: buildpath
X-Debbugs-Cc: [email protected]

Hi,

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

This is because the manual pages embedded absolute build path in the
title of the page.

A patch is attached that specifies a specific, deterministic title to
pod2man, thus making the build reproducible.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- a/CMakeLists.txt    2023-08-03 09:45:26.863220289 +0100
--- b/CMakeLists.txt    2023-08-03 09:56:16.000000000 +0100
@@ -74,7 +74,7 @@
 
     add_compile_options(-Wno-sign-compare -fno-omit-frame-pointer)
     if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL 
"GNU" )
-        option(PORTABLE "Build a portable binary without host-specific 
optimization" ON)
+        option(PORTABLE "Build a portable binary without host-specific 
optimization" OFF)
         if(NOT PORTABLE)
             add_compile_options(-march=native)
         endif()
--- a/debian/patches/0003-Fix-name-of-manual-pages.patch        1970-01-01 
01:00:00.000000000 +0100
--- b/debian/patches/0003-Fix-name-of-manual-pages.patch        2023-08-03 
09:56:15.241522363 +0100
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <[email protected]>
+Last-Update: 2023-08-03
+
+--- libcerf-2.3.orig/man/CMakeLists.txt
++++ libcerf-2.3/man/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ function(one_page pname section srcname)
+     add_custom_command(
+         OUTPUT "${pname}.${section}"
+-        COMMAND pod2man -s ${section} -c "libcerf manual"
++        COMMAND pod2man -s ${section} -c "libcerf manual" -n "${pname}"
+             "${CMAKE_CURRENT_SOURCE_DIR}/${srcname}.pod"
+             "${CMAKE_CURRENT_BINARY_DIR}/${pname}.${section}"
+         DEPENDS ${srcname}.pod
--- a/debian/patches/series     2023-08-03 09:45:26.863220289 +0100
--- b/debian/patches/series     2023-08-03 09:54:34.393918105 +0100
@@ -1,2 +1,3 @@
 0001-Fix-install-paths-for-.cmake-files.patch
 0002-Fix-arch-native-compilation.patch
+0003-Fix-name-of-manual-pages.patch

Reply via email to