Opened 12 months ago

Last modified 6 months ago

#59672 new enhancement

Set SOURCE_DATE_EPOCH

Reported by: ryandesign (Ryan Schmidt) Owned by:
Priority: Normal Milestone:
Component: base Version:
Keywords: Cc: kurthindenburg (Kurt Hindenburg)
Port:

Description

MacPorts base could set the SOURCE_DATE_EPOCH environment variable.

Change History (2)

comment:1 Changed 6 months ago by kurthindenburg (Kurt Hindenburg)

Cc: kurthindenburg added

I've been looking at this. is the goal to have base have reproducible builds? or that the ports should be reproducible builds?

If I understand who this would workl, it would be use SOURCE_DATE_EPOCH in place of the current time in the logs/etc to allow all builds to be the same. This would require another option somewhere to do this.

SOURCE_DATE_EPOCH could/would be set to the last commit change. SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)

comment:2 Changed 6 months ago by ryandesign (Ryan Schmidt)

As far as I know builds of base are already reproducible, at least insofar as we don't deliberately use the build date/time anywhere.

I intended this ticket to suggest that MacPorts could add SOURCE_DATE_EPOCH to the environment when it builds ports so that ports' build systems that make use of this variable will be more reproducible. (Per the link in the ticket description: "SOURCE_DATE_EPOCH is a standardised environment variable that distributions can set centrally and have build tools consume this in order to produce reproducible output.") When I filed this ticket, I had just encountered a port that had such build system and I had been unaware of this variable.

Note: See TracTickets for help on using tickets.