Page MenuHomeFreeBSD

Mk: reproducible_builds: set SOURCE_DATE_EPOCH for TIMESTAMPed ports
Needs ReviewPublic

Authored by guest-svmhdvn on Tue, Jun 17, 3:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 20, 5:11 PM
Unknown Object (File)
Wed, Jun 18, 4:22 PM

Details

Reviewers
emaste
antoine
bapt
Group Reviewers
portmgr
Summary

Continuing the work from D24586. Original summary:

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

Changes since previous patch:

  • simplified awk command line to parse TIMESTAMP
  • added SOURCE_DATE_EPOCH to WRK_ENV for it to be visible to all phases of the build
Test Plan

Currently writing some tooling around Poudriere to verify reproducible builds across the ports tree in an automated way. I've verified the following:

  • SOURCE_DATE_EPOCH is propagated to both configure and build phases
  • a few example ports build reproducibly using poudriere with PKG_REPRODUCIBLE=yes in poudriere.conf after this patch
  • those same example ports do NOT build reproducibly without this patch

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

guest-svmhdvn created this revision.

before requesting an exp-run or anything like that, have you tested on a bulk of known problematic ports ? python for example or emacs?

Also part of this will only be visible at runtime, like build your python package, install them on a machine, run some python things, just importing the library is enough to trigger the issue (run as root) and check with pkg check if some files have been rebuilt

before requesting an exp-run or anything like that, have you tested on a bulk of known problematic ports ? python for example or emacs?

I'll do that now, is there a list of problematic ports already known? I see the history of python and emacs, but if you have a quick list of some others that are widely used, I'll test them now.

Also part of this will only be visible at runtime, like build your python package, install them on a machine, run some python things, just importing the library is enough to trigger the issue (run as root) and check with pkg check if some files have been rebuilt

Sorry I didn't understand this part. "just importing the library is enough to trigger the issue" -> what issue are you referring to?

OSZAR »