More SOURCE_DATE_EPOCH? #150

Open
opened 2024-06-18 02:44:39 -05:00 by wolfv · 0 comments
wolfv commented 2024-06-18 02:44:39 -05:00 (Migrated from github.com)

I am looking into better support for "reproducible builds". I added support for SOURCE_DATE_EPOCH in one place in #140 - however, there are a few more timestamps in debug symbols or the strip command.

There is already a configuration option using ZERO_AR_DATE which works in all these places. It replaces the timestamp with a timestamp of 0.

I find SOURCE_DATE_EPOCH a little more elegant since it preserves a proper timestamp instead of setting it to some date in 1970. I would be happy to make the effort of enabling SOURCE_DATE_EPOCH in all places where ZERO_AR_DATE works right now. If we want to do it properly, we would probably change the interface / code in a few places though.

I haven't fully understood the relation to upstream in this repository. Would you accept a change like this? Do you know if I could contribute this back upstream to Apple as well?

A bigger change might be to replace fZeroModTimeInDebugMap with a timestamp and return a timestamp in zeroModTimeInDebugMap (or rename that function, even?).

Thanks!

I am looking into better support for "reproducible builds". I added support for `SOURCE_DATE_EPOCH` in one place in #140 - however, there are a few more timestamps in debug symbols or the `strip` command. There is already a configuration option using `ZERO_AR_DATE` which works in all these places. It replaces the timestamp with a timestamp of `0`. I find `SOURCE_DATE_EPOCH` a little more elegant since it preserves a proper timestamp instead of setting it to some date in 1970. I would be happy to make the effort of enabling `SOURCE_DATE_EPOCH` in all places where `ZERO_AR_DATE` works right now. If we want to do it properly, we would probably change the interface / code in a few places though. I haven't fully understood the relation to upstream in this repository. Would you accept a change like this? Do you know if I could contribute this back upstream to Apple as well? A bigger change might be to replace [`fZeroModTimeInDebugMap`](https://github.com/tpoechtrager/cctools-port/blob/986-ld64-711/cctools/ld64/src/ld/Options.cpp#L4757-L4760) with a timestamp and return a timestamp in [`zeroModTimeInDebugMap`](https://github.com/tpoechtrager/cctools-port/blob/986-ld64-711/cctools/ld64/src/ld/Options.h#L550) (or rename that function, even?). Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
miles/cctools-port#150
No description provided.