Page MenuHomeFreeBSD

Record TIMESTAMP in `make makesum`
ClosedPublic

Authored by emaste on Apr 20 2016, 7:05 PM.

Details

Summary

For future reproducible builds support record the timestamp when 'make makesum' updates the distinfo.

This change is extracted from D4385 so that we can start recording this as ports are otherwise updated.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

emaste updated this revision to Diff 15396.Apr 20 2016, 7:05 PM
emaste retitled this revision from to Record TIMESTAMP in `make makesum`.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added reviewers: bapt, bdrewery.

That should be "extracted from D4385 and modified slightly"

bapt accepted this revision.Apr 20 2016, 7:59 PM
bapt edited edge metadata.
This revision is now accepted and ready to land.Apr 20 2016, 7:59 PM
bdrewery edited edge metadata.Apr 21 2016, 5:15 PM

The code seems fine but this line will be problematic unless explained very well. For example in security/openssh-portable every time I update its major version I run 'make makesum' and it removes all of the optional patches. I then re-add the optional patches and one-by-one manually update the distinfo for them and test since they are conflicting and cannot all build together. Often I have to mark an option broken for days/weeks while I fix it or wait for the patch upstream to release an updated version. I'm sure other people have similar experiences. In this case I would likely forget to touch the TIMESTAMP or consider it out-of-scope.

I think a $FreeBSD$ keyword comment at the top would be more accurate as it will capture all changes. If someone runs 'make makesum' and the file doesn't change then the comment also will not change and keep the existing timestamp. In this case we would just use the revision in the comment and not the date.

The code seems fine but this line will be problematic unless explained very well. For example in security/openssh-portable every time I update its major version I run 'make makesum' and it removes all of the optional patches. I then re-add the optional patches and one-by-one manually update the distinfo for them and test since they are conflicting and cannot all build together. Often I have to mark an option broken for days/weeks while I fix it or wait for the patch upstream to release an updated version. I'm sure other people have similar experiences. In this case I would likely forget to touch the TIMESTAMP or consider it out-of-scope.

The intended use of the timestamp here is to control the metadata for files in the package, and I think it's not a problem if it updates only when the main source files change.

I think a $FreeBSD$ keyword comment at the top would be more accurate as it will capture all changes. If someone runs 'make makesum' and the file doesn't change then the comment also will not change and keep the existing timestamp. In this case we would just use the revision in the comment and not the date.

The date from $FreeBSD$ seems like a good idea, except it's not expanded in ports git mirrors and so might introduce subtle breakage in some cases.

emaste added a subscriber: swills.Apr 22 2016, 5:26 PM
bapt added a comment.May 9 2016, 7:06 PM

The code seems fine but this line will be problematic unless explained very well. For example in security/openssh-portable every time I update its major version I run 'make makesum' and it removes all of the optional patches. I then re-add the optional patches and one-by-one manually update the distinfo for them and test since they are conflicting and cannot all build together. Often I have to mark an option broken for days/weeks while I fix it or wait for the patch upstream to release an updated version. I'm sure other people have similar experiences. In this case I would likely forget to touch the TIMESTAMP or consider it out-of-scope.

The intended use of the timestamp here is to control the metadata for files in the package, and I think it's not a problem if it updates only when the main source files change.

I think a $FreeBSD$ keyword comment at the top would be more accurate as it will capture all changes. If someone runs 'make makesum' and the file doesn't change then the comment also will not change and keep the existing timestamp. In this case we would just use the revision in the comment and not the date.

The date from $FreeBSD$ seems like a good idea, except it's not expanded in ports git mirrors and so might introduce subtle breakage in some cases.

The goal of this date is to not be updated to often but still often enough so that it is at least as old as the main sources

bdrewery accepted this revision.May 12 2016, 3:38 PM
bdrewery edited edge metadata.

I think this will be error-prone to keeping it consistent but I don't really object to trying.

This revision was automatically updated to reflect the committed changes.