Page MenuHomeFreeBSD

Activate reproducible builds
Needs RevisionPublic

Authored by bapt on Apr 27 2020, 7:57 AM.
Tags
None
Referenced Files
F126913994: D24586.id71036.diff
Mon, Aug 25, 2:00 PM
F126908529: D24586.id71035.diff
Mon, Aug 25, 12:30 PM
Unknown Object (File)
Mon, Aug 18, 6:35 PM
Unknown Object (File)
Fri, Aug 15, 1:03 AM
Unknown Object (File)
Thu, Aug 14, 10:36 PM
Unknown Object (File)
Thu, Aug 7, 10:36 PM
Unknown Object (File)
Mon, Jul 28, 3:29 PM
Unknown Object (File)
Jul 24 2025, 12:09 PM

Details

Reviewers
antoine
Group Reviewers
portmgr

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 30749
Build 28475: arc lint + arc unit

Event Timeline

bapt requested review of this revision.Apr 27 2020, 7:57 AM

Pass SOURCE_DATE_EPOCH in build environnement if the timestamp is
defined in the distinfo

Define at the right moment

Remove spaces from SOURCE_DATA_EPOCH env var

I remember a review by @emaste (I think) about this, he had a default value for the TIMESTAMP.

In D24586#541575, @mat wrote:

I remember a review by @emaste (I think) about this, he had a default value for the TIMESTAMP.

Yes the initial patch was: https://people.freebsd.org/~bapt/reproduciblebuild.diff

I decided in the version to drop the default TIMESTAMP as it can generate failures on packages, and prefer to only have reproducibility on packages having a timestamp (most of them should have now)

I was wondering about ports without a distinfo file (like, say, ports-mgmt/portlint) but they could gain a distinfo file with only a TIMESTAMP in it.

Mk/bsd.port.mk
2054

Maybe this should be in a .else for the next .if.

2056

Can you cache this using the usual mechanism so that we do not run awk in each submake?

Seems reasonable as a first step. Do we address the python issue with this change?

Mk/bsd.port.mk
2054

I think it's because we want it to be 0 also if DISTINFO_FILE exists but does not have a TIMESTAMP line

Mark python < 3.7 as not reproducible with the new NOT_REPRODUCIBLE knob
Cache the timestamp

antoine requested changes to this revision.Jun 2 2020, 9:13 AM
antoine added a subscriber: antoine.

This is not enough, the lang/python{27,35,36} ports need to set NOT_REPRODUCIBLE too

This revision now requires changes to proceed.Jun 2 2020, 9:13 AM

I'd like to take over this patch and the previous one at D4385 to help push this in. I am also currently building some tooling around Poudriere to help verify reproducibilty across the ports tree. Have there been any more recent discussions around implementing SOURCE_DATE_EPOCH in the Ports tree other than these two Phabricator reviews? If not, I'll start testing this and working on the feedback, then resubmit a v2.