Bug#886239: librsvg: please make the build reproducible

Chris Lamb lamby at debian.org
Wed Jan 3 12:25:42 UTC 2018


Source: librsvg
Version: 2.40.20-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

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

This is due to the binary including the absolute build path so that
it can find test data.

Patch attached that simply uses a relative source directory instead.
Another solution might be to Build-Depend on fonts-liberation and
specify /path/to/LiberationSans.ttf manually. Or even to specify the
test data path via an environment variable.

(Given it encodes the absolute *build* path, it's clearly not "meant"
to work outside of build-time as this won't exist at runtime.)

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible-build.patch	2018-01-03 12:02:22.170730036 +0000
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2018-01-03
+
+--- librsvg-2.40.20.orig/rsvg-cairo-draw.c
++++ librsvg-2.40.20/rsvg-cairo-draw.c
+@@ -398,7 +398,7 @@ set_font_options_for_testing (PangoConte
+ static void
+ create_font_config_for_testing (RsvgCairoRender *render)
+ {
+-    const char *font_path = SRCDIR "/tests/resources/LiberationSans-Regular.ttf";
++    const char *font_path = "resources/LiberationSans-Regular.ttf";
+ 
+     if (render->font_config_for_testing != NULL)
+         return;
--- a/debian/patches/series	2018-01-03 11:24:31.096515077 +0000
--- b/debian/patches/series	2018-01-03 11:59:57.854019875 +0000
@@ -1,3 +1,4 @@
 10_rsvg-gz.patch
 disable-new-failing-test.patch
 Skip-known-failing-tests-on-32-bit-architectures-at-build.patch
+reproducible-build.patch


More information about the pkg-gnome-maintainers mailing list