Skip to content
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

Closed
nim-nim opened this issue Nov 9, 2018 · 10 comments
Closed

RFE: provide a way to set upload modification times #21

nim-nim opened this issue Nov 9, 2018 · 10 comments

Comments

@nim-nim
Copy link

nim-nim commented Nov 9, 2018

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

@clime
Copy link
Contributor

clime commented Nov 14, 2018

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?

@nim-nim
Copy link
Author

nim-nim commented Nov 14, 2018

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.

@clime
Copy link
Contributor

clime commented Nov 15, 2018

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.

@nim-nim
Copy link
Author

nim-nim commented Nov 15, 2018

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.

@clime
Copy link
Contributor

clime commented Nov 15, 2018

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.

@nim-nim
Copy link
Author

nim-nim commented Nov 15, 2018

Thanks a lot!

@clime
Copy link
Contributor

clime commented Nov 15, 2018

Please, check the attached PR.

@clime
Copy link
Contributor

clime commented Nov 16, 2018

Ok, the PR has been reviewed and merged.

@clime clime closed this as completed Nov 16, 2018
@nim-nim
Copy link
Author

nim-nim commented Nov 16, 2018

Michal, thanks!

@lubomir
Copy link

lubomir commented Nov 19, 2018

Yup, this should work nicely. Fedpkg will just need to send the value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants