-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
podman save does not have an option to produce the same output every time #14978
Comments
@flouthoc PTAL. |
Thanks for reporting at first instance looks like issue with |
@vrothberg @mtrmac Please correct me if i got this wrong, But I think commit implementation of |
Yes, it is the timestamp that differ. When unpacking the tar's, the contents are identical. |
Strictly speaking, I’m skeptical that much of the code makes any reproducibility guarantees. Notably That said, a c/image option to pass a specific time (similar to https://wiki.debian.org/ReproducibleBuilds/TimestampsInTarball ) seems reasonable. I don’t immediately have an opinion on what the default should be. |
Default should be EPOCH |
I should say the default should be current if users want to override it they can set to EPOCH. |
While I'm fine with either way, I wonder if anyone actually cares about having "current" timestamps inside the .tar. So I don't see much reason not to default to 0. |
A friendly reminder that this issue had no activity for 30 days. |
Thanks for the reminder I guess? How can I help? |
@mtrmac @vrothberg thoughts? |
A friendly reminder that this issue had no activity for 30 days. |
Thank you for the friendly reminder. |
The reproducible community seems to be settling on having the environment variable SOURCE_DATE_EPOCH as something that can be set to a value, that is then used for all date-specific operations so that the dates stay the same with the same builds. This appears to be possible with BuildKit (https://medium.com/nttlabs/bit-for-bit-reproducible-builds-with-dockerfile-7cc2b9faed9f). I have a similar problem, I can feed the exact same .tar to
As you can see from the diff of the
I attempted to overload the system's time during the import by using
|
Is it possible to add an option of |
If you are interested in opening a PR I am sure it would be considered. podman build currently has an option like this, I believe.
|
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
Podman save does not produce the same tarball every time it is executed. That
complicated doing reproducible builds.
Describe the results you received:
The two tarball are not the same.
Describe the results you expected:
The two tarball are the same.
Additional information you deem important (e.g. issue happens only occasionally):
Current workaround I have is this repackaging script:
So there is a way around this problem, but it definitely is suboptimal that
this is necessary. Ideal solution would be to have something like
--reproducible
flag forpodman save
that would make sure to always producebit-to-bit equal tarballs given specific image id.
Output of
podman version
:Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
No
The text was updated successfully, but these errors were encountered: