Source: g2o
Version: 0~20230806-4.1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps buildpath
X-Debbugs-Cc: [email protected]

Hi,

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

This is because the generated PDF contained the current date which
can be fixed by exporting FORCE_SOURCE_DATE. I've also included a
fix to ensure that the build is reproducible regardless of the build
path by ensuring the value G2O_SRC_DIR is not set to the current
build path.

Patch attached.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- a/debian/rules      2025-09-10 16:04:08.957673230 -0700
--- b/debian/rules      2025-09-11 16:30:24.891847217 -0700
@@ -11,6 +11,8 @@
     MAKEFLAGS += -j$(NUMJOBS)
 endif
 
+export FORCE_SOURCE_DATE = 1
+
 %:
        dh $@ --buildsystem=cmake
 
@@ -77,6 +79,7 @@
 override_dh_auto_install-arch:
        dh_auto_install
        rm debian/tmp/usr/include/g2o/autodiff/LICENSE
+       sed -i -e 's@^\(#define G2O_SRC_DIR\).*@\1 "/nonexistent"@' 
debian/tmp/usr/include/g2o/config.h
 
 override_dh_auto_install-indep:
        true

Reply via email to