-
Notifications
You must be signed in to change notification settings - Fork 7.9k
phar: honor SOURCE_DATE_EPOCH for timestamps #6564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
In order to build reproducible phars, honor SOURCE_DATE_EPOCH if set Signed-off-by: Arjen de Korte <build+github@de-korte.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmb69 Does the general idea here seem reasonable?
At least partially, this looks like a workaround for https://bugs.php.net/77229 and related issues. The problem is that the timestamp of phar entries should be the mtime of the file, but we're using the current time which is wrong anyway. |
Signed-off-by: Arjen de Korte <build+github@de-korte.org>
Signed-off-by: Arjen de Korte <build+github@de-korte.org>
Sorry for the mess I created, rookie GitHub user here. Finally figured out how to build locally before submitting.
Using the mtime of the files would probably also fix the reproducible build. The thing that slightly worries me, is that the existing (wrong) timestamps have been used for as long as I can trace back and fixing this might break applications that rely on this. The change to just honor SOURCE_DATE_EPOCH would limit the exposure, as this usually is only set during packaging PHP where this is an intentional change and doesn't change the behavior if not set. |
Apparently this sneaked in again in one of my commits. Fixing again. Signed-off-by: Arjen de Korte <build+github@de-korte.org>
In order to build reproducible phars, honor SOURCE_DATE_EPOCH
if set
Signed-off-by: Arjen de Korte build+github@de-korte.org