[Distutils] reproducible builds
Robin Becker
robin at reportlab.com
Mon Mar 20 05:00:59 EDT 2017
On 17/03/2017 17:49, David Wilson wrote:
> Hey Robin,
>
>> What happens if other distros decide not to use this environment variable?
>> Do I really want distro specific code in the package?
>
> AFAIK this is seeing a great deal of use outside of Debian and even
> Linux, for instance GCC also supports this variable.
>
>
>> In short where does the distro responsibility and package maintainers
>> boundary need to be?
>
> I guess it mostly comes down to whether you'd like them to carry the
> debt of a vendor patch to implement the behaviour for you in a way you
> don't like, or you'd prefer to retain full control. :) So it's more a
> preference than a responsibility.
>
>
> David
> .
>
I think I accept the need to support this variable. Our original use case was
for testing purposes where we altered dates injected into the produced pdf meta
data and also in some cases the content.
However, if that is the implied intent of the debian variable then I will also
need to modify the behaviour of some other tests eg in one case the produced pdf
output looks like this
> The value of i is not larger than 3
> The value of i is equal to 3
> The value of i is not less than 3
> The value of i is 3
> The value of i is 2
> The value of i is 1
> {'doc': <reportlab.platypus.doctemplate.SimpleDocTemplate object at
> 0x00000000093D0240>, 'currentFrame': 'normal', 'currentPageTemplate': 'First', 'aW':
> 439.27559055118104, 'aH': 685.8897637795275, 'aWH': (439.27559055118104,
> 685.8897637795275), 'i': 0, 'availableWidth': 439.27559055118104, 'availableHeight':
> 619.8897637795275}
> The current page number is 1
ie we are introspecting internals and injecting that into the document content.
I imagine I need to clean up the reporting to avoid getting addresses etc etc
into the documents. Obviously if I have the ability to embed repr(some_object)
into the document output then it will vary (unless the underlying python is
reproducible). I'm not sure if debian runs the whole reportlab test suite, but
it makes sense to get this kind of variablity out.
When we make significant changes to existing behaviours our current workflow
consists of generating a large number of outputs and then rendering them into
jpeg pages with ghost script. Differences in the jpegs can be used to spot problems.
--
Robin Becker
More information about the Distutils-SIG
mailing list