-
Notifications
You must be signed in to change notification settings - Fork 183
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
strip file times to make tarballs more reproducible #126
Conversation
ea67f35
to
c55cb0f
Compare
I also think it would be sensible to strip all file modes except for executable, similar to Git. Should I add this? |
@mxey sure that sounds good.. @shizhMSFT any thoughts on this? |
@mxey @jdolitsky File times are useful for many scenarios, especially for the scenario that we can use the uploaded directory (tar.gz) as a layer of a real image. Thus we should not strip file times. |
@shizhMSFT the same could be said for UID and GID, which you already strip |
It is not stripping UID and GID but BTW, the scenario I have mentioned above can be found at https://github.com/sajayantony/dotnet-oci |
Perhaps this is something we can pass as feature flag on push if necessary? |
OK, in the same sense, I am not stripping times, I am just setting them to epoch 0 |
That would work for me. |
We definitely should have parameters that clarify the manipulation of the tar headers. Different use cases will definitely have different requirements and may want the same tarball with different file attributes to be unique. It's best to have an opinion, but leave a trapdoor. Make the easy things easy, and the hard things possible. |
@jzelinskie So should I modify my pull request to make this into an option? |
I think so. What say you @jdolitsky? |
@mxey @jzelinskie sorry for delay - yes that sounds good |
c55cb0f
to
a5d69ef
Compare
No description provided.