[rb-general] Status of Reproducible Builds on NetBSD

Pierre Pronchery khorben at defora.org
Mon Oct 23 01:48:43 CEST 2017


			Hi everyone,

On 20/10/2017 14:27, Holger Levsen wrote:
> thanks for your interesting answer!

Very welcome :)

> On Fri, Oct 20, 2017 at 01:44:23AM +0200, Pierre Pronchery wrote:
>>> What's the status on indiviual packages or ports (as you call them, iirc)?
>>
>> Our packages come from the pkgsrc project, which is also managed by the
>> NetBSD Foundation. There is no knob there at the moment to force the
>> generation of reproducible packages, however a significant part of the
>> underlying work has been done (handling CFLAGS and LDFLAGS across every
>> package based on C/C++).
>
> do you think such a knob could be made and if so, how?

Yes, typically we set a value in a configuration file, like /etc/mk.conf 
(or $LOCALBASE/etc/mk.conf). It should be a variable called 
PKGSRC_MKREPRO, just like for NetBSD's base system, which would behave 
similarly and set something along the lines of:

> REPROFLAGS+=    -fdebug-prefix-map=\$$LOCALBASE=/usr/pkgsrc
> REPROFLAGS+=    -fdebug-regex-map=\$$WRKOBJDIR=/usr/pkgsrc/work'

And then inject REPROFLAGS into both CFLAGS and CXXFLAGS.

When I tried this, I couldn't find any difference between the resulting 
binaries involving debugging symbols, so I did not commit this change. 
Of course I would like to investigate it again.

Another variable may also have to be determined for setting 
$SOURCE_DATE_EPOCH, and a mechanism to guess a common value 
automatically otherwise.

Cheers!
-- 
khorben


More information about the rb-general mailing list