Source: json-c
Version: 0.15-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
json-c could not be built reproducibly.

This is because it used the full, absolute path name as an (sanitised)
input to a filename, resulting in the binary package containing

  
/usr/share/doc/libjson-c-dev/html/md__build_1st_json-c-0_815_issues_closed_for_0_813.html
                                        ^^^^^^^^^^^^^^^^^^^^^^
or

  
/usr/share/doc/libjson-c-dev/html/md__build_2_json-c-0_815_2nd_issues_closed_for_0_813.html
                                        ^^^^^^^^^^^^^^^^^^^^^^^^

(etc. etc.)


Patch attached.

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


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/0004-reproducible-build.patch      1970-01-01 
01:00:00.000000000 +0100
--- b/debian/patches/0004-reproducible-build.patch      2020-08-01 
11:08:07.910487246 +0100
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2020-08-01
+
+--- json-c-0.15.orig/doc/Doxyfile.in
++++ json-c-0.15/doc/Doxyfile.in
+@@ -152,7 +152,7 @@ FULL_PATH_NAMES        = NO
+ # will be relative from the directory where doxygen is started.
+ # This tag requires that the tag FULL_PATH_NAMES is set to YES.
+ 
+-STRIP_FROM_PATH        =
++STRIP_FROM_PATH        = @CMAKE_SOURCE_DIR@
+ 
+ # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+ # path mentioned in the documentation of a class, which tells the reader which
--- a/debian/patches/series     2020-08-01 11:03:18.119435139 +0100
--- b/debian/patches/series     2020-08-01 11:05:35.281217833 +0100
@@ -2,3 +2,4 @@
 0002-doxygen.patch
 0001-CMakeLists-use-GNUInstallDirs.patch
 #608.patch
+0004-reproducible-build.patch
--- a/doc/Doxyfile.in   2020-08-01 11:03:18.119435139 +0100
--- b/doc/Doxyfile.in   2020-08-01 11:08:06.946479160 +0100
@@ -152,7 +152,7 @@
 # will be relative from the directory where doxygen is started.
 # This tag requires that the tag FULL_PATH_NAMES is set to YES.
 
-STRIP_FROM_PATH        =
+STRIP_FROM_PATH        = @CMAKE_SOURCE_DIR@
 
 # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
 # path mentioned in the documentation of a class, which tells the reader which

Reply via email to