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
RFE: provide a way to set upload modification times #21
Comments
Hello Nicolas, I think it should be expected that mtime of a file changes when you upload it somewhere. In the end, mtime records file modification time in a local filesystem. If you want to maintain the timestamp upon downloading it from DistGit, you can do so client-side by reading LastModified http header. In other words, I would prefer if the timestamp was pulled from DistGit when downloading, not pushed when uploading. Would that cover your use-case? |
Hi Michal, That's not how mtime works, otherwise all the files installed on you system would have as mtime installation time or download from mirror time not the time they were last modified in the upstream project. For better or worse, mtime is supposed to mean original file creation/modification time, not upload or download or whatever network transit time. Practically packagers want all the mtime-related things they do on their test packaging systems to be unaffected by upload to the buildsys (and by mass-rebuilds, coji/copr/bohdi ping pongs, etc). mtime is effectively part of the data entrusted for safe-keeping to the build system and dist-git. |
Ok, given that mtime is a file-content modification timestamp on the local filesytem, I don't think it is a suitable attribute to do any package auditing because packages (and their sources) often move from one place to another. Probably better value to audit on would be TAR_MTIME if we are talking about tarballs. |
That does not work because we have a gazillon of possible source formats and the only modification time they have in common is the mtime. |
Okay, I'll extend the uploading protocol to support this. I agree that preserving time stamps is a useful feature from the file safe-keeping point of view. I.e. as a DistGit user I am probably more interested in when the file was last edited, not when it was uploaded. |
Thanks a lot! |
Please, check the attached PR. |
Ok, the PR has been reviewed and merged. |
Michal, thanks! |
Yup, this should work nicely. Fedpkg will just need to send the value. |
The dist-git cgi script does not provide a way to set upload modification times, which means dist-git clients do not preserve mtime, which breaks various audit and release management workflows.
See also
https://pagure.io/fedpkg/issue/220
and the date-related messages in
https://pagure.io/packaging-committee/issue/719
The text was updated successfully, but these errors were encountered: