Debian Bug report logs - #886239
librsvg: please make the build reproducible

version graph

Package: src:librsvg; Maintainer for src:librsvg is Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>;

Reported by: Chris Lamb <lamby@debian.org>

Date: Wed, 3 Jan 2018 12:27:02 UTC

Severity: wishlist

Tags: fixed-upstream, patch

Found in version librsvg/2.40.20-2

Fixed in version 2.44.1-1

Done: Simon McVittie <smcv@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#886239; Package src:librsvg. (Wed, 03 Jan 2018 12:27:05 GMT) (full text, mbox, link).


Acknowledgement sent to Chris Lamb <lamby@debian.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Wed, 03 Jan 2018 12:27:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Chris Lamb <lamby@debian.org>
To: submit@bugs.debian.org
Subject: librsvg: please make the build reproducible
Date: Wed, 03 Jan 2018 12:25:42 +0000
[Message part 1 (text/plain, inline)]
Source: librsvg
Version: 2.40.20-2
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs@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@debian.org / chris-lamb.co.uk
       `-
[librsvg.diff.txt (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#886239; Package src:librsvg. (Wed, 03 Jan 2018 12:54:05 GMT) (full text, mbox, link).


Acknowledgement sent to Simon McVittie <smcv@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Wed, 03 Jan 2018 12:54:05 GMT) (full text, mbox, link).


Message #10 received at 886239@bugs.debian.org (full text, mbox, reply):

From: Simon McVittie <smcv@debian.org>
To: Chris Lamb <lamby@debian.org>, 886239@bugs.debian.org
Subject: Re: Bug#886239: librsvg: please make the build reproducible
Date: Wed, 3 Jan 2018 12:51:35 +0000
On Wed, 03 Jan 2018 at 12:25:42 +0000, Chris Lamb wrote:
> This is due to the binary including the absolute build path so that
> it can find test data.

It should probably use g_test_build_filename() now that that exists
(relative to $G_TEST_SRCDIR or $G_TEST_BUILDDIR as appropriate, falling
back to dirname(argv[0]) for both if unspecified).

I'm surprised this wasn't done as part of
https://gitlab.gnome.org/GNOME/librsvg/commit/b7e9ae8ce57a553add0cbd34ba7863b441178097
or at a similar time - perhaps GNOME always runs its installed-tests
with the built directory still visible?

> Patch attached that simply uses a relative source directory instead.

This isn't going to be upstreamable, since it won't work for
srcdir != builddir as far as I can see. I want to add autopkgtests at
some point anyway; I'll take a look at this as part of that work.

> Another solution might be to Build-Depend on fonts-liberation and
> specify /path/to/LiberationSans.ttf manually.

It needs to be the bundled copy, because rsvg's tests assert
almost-pixel-perfect rendering against a reference image (there's a small
amount of tolerance to account for rounding errors), so any improvements
to the font hinting etc. in fonts-liberation would result in failure.

> (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.)

IMO that's a bug, and should be fixed at some point so that rsvg's
installed-tests can be used as autopkgtests.

    smcv



Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#886239; Package src:librsvg. (Wed, 03 Jan 2018 13:27:03 GMT) (full text, mbox, link).


Acknowledgement sent to Chris Lamb <lamby@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Wed, 03 Jan 2018 13:27:03 GMT) (full text, mbox, link).


Message #15 received at 886239@bugs.debian.org (full text, mbox, reply):

From: Chris Lamb <lamby@debian.org>
To: Simon McVittie <smcv@debian.org>, 886239@bugs.debian.org
Subject: Re: Bug#886239: librsvg: please make the build reproducible
Date: Wed, 03 Jan 2018 13:23:34 +0000
Hi Simon,

> > 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.
> 
> IMO that's a bug, and should be fixed at some point so that rsvg's
> installed-tests can be used as autopkgtests.

Indeed, hence why I didn't "bother" making my patch upstreamable, if
you see what I mean.

Anyway, thanks for considering. :)


Best wishes,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-



Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>:
Bug#886239; Package src:librsvg. (Wed, 29 Aug 2018 17:15:02 GMT) (full text, mbox, link).


Acknowledgement sent to Simon McVittie <smcv@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>. (Wed, 29 Aug 2018 17:15:02 GMT) (full text, mbox, link).


Message #20 received at 886239@bugs.debian.org (full text, mbox, reply):

From: Simon McVittie <smcv@debian.org>
To: Chris Lamb <lamby@debian.org>, 886239@bugs.debian.org
Subject: Re: Bug#886239: librsvg: please make the build reproducible
Date: Wed, 29 Aug 2018 18:12:35 +0100
Forwarded: https://gitlab.gnome.org/GNOME/librsvg/issues/259
Control: tags -1 + fixed-upstream pending

On Wed, 03 Jan 2018 at 12:51:35 +0000, Simon McVittie wrote:
> On Wed, 03 Jan 2018 at 12:25:42 +0000, Chris Lamb wrote:
> > This is due to the binary including the absolute build path so that
> > it can find test data.
> 
> It should probably use g_test_build_filename() now that that exists
> (relative to $G_TEST_SRCDIR or $G_TEST_BUILDDIR as appropriate, falling
> back to dirname(argv[0]) for both if unspecified).

This appears to have been done in the version that I'll be uploading
to experimental soon.

    smcv



Added tag(s) fixed-upstream and pending. Request was from Simon McVittie <smcv@debian.org> to 886239-submit@bugs.debian.org. (Wed, 29 Aug 2018 17:15:02 GMT) (full text, mbox, link).


Reply sent to Simon McVittie <smcv@debian.org>:
You have taken responsibility. (Wed, 29 Aug 2018 19:39:03 GMT) (full text, mbox, link).


Notification sent to Chris Lamb <lamby@debian.org>:
Bug acknowledged by developer. (Wed, 29 Aug 2018 19:39:03 GMT) (full text, mbox, link).


Message #27 received at 886239-done@bugs.debian.org (full text, mbox, reply):

From: Simon McVittie <smcv@debian.org>
To: Chris Lamb <lamby@debian.org>, 886239-done@bugs.debian.org
Subject: Re: Bug#886239: librsvg: please make the build reproducible
Date: Wed, 29 Aug 2018 20:35:58 +0100
Version: 2.44.1-1

On Wed, 29 Aug 2018 at 18:12:35 +0100, Simon McVittie wrote:
> On Wed, 03 Jan 2018 at 12:51:35 +0000, Simon McVittie wrote:
> > It should probably use g_test_build_filename() now that that exists
> > (relative to $G_TEST_SRCDIR or $G_TEST_BUILDDIR as appropriate, falling
> > back to dirname(argv[0]) for both if unspecified).
> 
> This appears to have been done in the version that I'll be uploading
> to experimental soon.



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 01 Dec 2018 07:27:39 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 13:46:30 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.